PeriDEM 0.2.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
|
Functions | |
particle_locations (filename, radius, centers, pp_tag=None) | |
Variables | |
parser = argparse.ArgumentParser(description='Setup and run PeriDEM simulation') | |
default | |
type | |
help | |
args = parser.parse_args() | |
str | fpath = './' |
list | center = [0., 0., 0.] |
origin (this center is used to discretize the particle and later discretization is translated and rotated appropriately) | |
list | g = [0., -10., 0.] |
gravity | |
float | R = 0.001 |
radius of p | |
float | h = R / 8. |
mesh size (use smaller radius to decide) | |
int | horizon = 3. * h |
peridynamics horizon (typically taken as 2 to 4 times the mesh size) | |
list | wall_rect = [0., 0., 0., 2.*R, horizon, 0.] |
wall geometry (corner point coordinates) | |
float | d = 0.001 |
initial distance between particle and wall | |
float | delta = d - horizon |
list | v0 = [0, -np.sqrt(2. * np.abs(g[1]) * delta), 0.] |
float | T = 0.1 |
final time and time step | |
int | N_steps = 2000000 |
float | dt = T / N_steps |
int | N_out = N_steps / 100 |
float | nu1 = 0.25 |
material for zone 1 (in this case zone 1 has just one particle) | |
int | rho1 = 1200. |
float | K1 = 2.16e+7 |
E1 = get_E(K1, nu1) | |
G1 = get_G(E1, nu1) | |
int | Gc1 = 50. |
float | nu2 = 0.25 |
int | rho2 = 1200. |
float | K2 = 2.16e+7 |
E2 = get_E(K2, nu2) | |
G2 = get_G(E2, nu2) | |
int | Gc2 = 50. |
float | R_contact_factor = 0.95 |
contact radius is taken as R_contact_factor * h_{min} where h_{min} is the minimum mesh size over all meshes (it is computed at the begining of simulation) we only specify the R_contact_factor | |
int | Kn_11 = 18. * get_eff_k(K1, K1) / (np.pi * np.power(horizon, 5)) |
define Kn parameter for normal contact force (see PeriDEM paper for more details) | |
int | Kn_22 = 18. * get_eff_k(K2, K2) / (np.pi * np.power(horizon, 5)) |
int | Kn_12 = 18. * get_eff_k(K1, K2) / (np.pi * np.power(horizon, 5)) |
float | beta_n_eps = 0.9 |
define beta_n parameter for normal damping | |
int | beta_n_factor = 5000. |
bool | damping_active = True |
float | friction_coeff = 0.5 |
friction coefficient | |
bool | friction_active = False |
list | centers = [] |
inpf = open(fpath + 'input.yaml','w') | |
file below creates .geo file (see util.py) | |
list | contain_params = [0., 0., 0., 2.*R, 4.*R, 0.] |
provide model specific details | |
list | p_geom = [R, center[0], center[1], center[2]] |
zone info we have two zones | |
str | cmd = "gmsh p.geo -2 &> /dev/null" |
Neighbor info at present, this block has no impact in the simulation. | |
process = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE) | |
output | |
error | |
particle_wall.particle_locations | ( | filename, | |
radius, | |||
centers, | |||
pp_tag = None |
|||
) |
Creates .csv file containing the center, radius, orientation, and zone id of each particle in two-particle setup Parameters ---------- filename : str Filename of .csv file to be created radius: list List containing radius of a particle centers: list List containing the centers of a particle pp_tag: str, optional Postfix .geo file with this tag
Definition at line 12 of file particle_wall.py.
References util.print_list().
particle_wall.args = parser.parse_args() |
Definition at line 45 of file particle_wall.py.
float particle_wall.beta_n_eps = 0.9 |
define beta_n parameter for normal damping
Definition at line 114 of file particle_wall.py.
int particle_wall.beta_n_factor = 5000. |
Definition at line 116 of file particle_wall.py.
list particle_wall.center = [0., 0., 0.] |
origin (this center is used to discretize the particle and later discretization is translated and rotated appropriately)
Definition at line 54 of file particle_wall.py.
list particle_wall.centers = [] |
Definition at line 124 of file particle_wall.py.
str particle_wall.cmd = "gmsh p.geo -2 &> /dev/null" |
Neighbor info at present, this block has no impact in the simulation.
step 2: run peridem
We have it for later extensions of the library.
Material info material properties have to be specified in a zone-specific
manner
Force Gravity
force is of body force type and all particles and walls experience this force
IC
Displacement
Output info in this block, we take care of simulation output
HPX specific block (I would recommend to not touch this block unless you know what your are doing!!)
close file damn I feel tired already!!
run step 1: run gmsh
Definition at line 382 of file particle_wall.py.
provide model specific details
not used (I should get rid of this soon)
container info Container is the region in 2d (or in 3d) where you expect all activites to take place. If not sure, you can take a wild guess of bounding box of this simulation.
Definition at line 160 of file particle_wall.py.
float particle_wall.d = 0.001 |
initial distance between particle and wall
Definition at line 72 of file particle_wall.py.
bool particle_wall.damping_active = True |
Definition at line 117 of file particle_wall.py.
particle_wall.default |
Definition at line 42 of file particle_wall.py.
Definition at line 74 of file particle_wall.py.
Definition at line 81 of file particle_wall.py.
Definition at line 90 of file particle_wall.py.
Definition at line 98 of file particle_wall.py.
particle_wall.error |
Definition at line 384 of file particle_wall.py.
str particle_wall.fpath = './' |
Definition at line 51 of file particle_wall.py.
bool particle_wall.friction_active = False |
Definition at line 121 of file particle_wall.py.
float particle_wall.friction_coeff = 0.5 |
friction coefficient
Definition at line 120 of file particle_wall.py.
list particle_wall.g = [0., -10., 0.] |
gravity
Definition at line 57 of file particle_wall.py.
Definition at line 91 of file particle_wall.py.
Definition at line 99 of file particle_wall.py.
int particle_wall.Gc1 = 50. |
Definition at line 92 of file particle_wall.py.
int particle_wall.Gc2 = 50. |
Definition at line 100 of file particle_wall.py.
float particle_wall.h = R / 8. |
mesh size (use smaller radius to decide)
Definition at line 63 of file particle_wall.py.
particle_wall.help |
Definition at line 44 of file particle_wall.py.
int particle_wall.horizon = 3. * h |
peridynamics horizon (typically taken as 2 to 4 times the mesh size)
Definition at line 66 of file particle_wall.py.
particle_wall.inpf = open(fpath + 'input.yaml','w') |
file below creates .geo file (see util.py)
open a input file (we choose pretty obvious name input.yaml)
Definition at line 134 of file particle_wall.py.
float particle_wall.K1 = 2.16e+7 |
Definition at line 89 of file particle_wall.py.
float particle_wall.K2 = 2.16e+7 |
Definition at line 97 of file particle_wall.py.
define Kn parameter for normal contact force (see PeriDEM paper for more details)
Definition at line 109 of file particle_wall.py.
Definition at line 111 of file particle_wall.py.
Definition at line 110 of file particle_wall.py.
int particle_wall.N_out = N_steps / 100 |
Definition at line 83 of file particle_wall.py.
int particle_wall.N_steps = 2000000 |
Definition at line 79 of file particle_wall.py.
float particle_wall.nu1 = 0.25 |
material for zone 1 (in this case zone 1 has just one particle)
Definition at line 87 of file particle_wall.py.
float particle_wall.nu2 = 0.25 |
Definition at line 95 of file particle_wall.py.
particle_wall.output |
Definition at line 384 of file particle_wall.py.
zone info we have two zones
zone 1 (particle)
zone 2 (wall)
particle info as we said earlier, the properites are specific in a zone-specific
manner what I really mean by zone-specific
will be clear now
Definition at line 190 of file particle_wall.py.
particle_wall.parser = argparse.ArgumentParser(description='Setup and run PeriDEM simulation') |
Definition at line 40 of file particle_wall.py.
particle_wall.process = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE) |
Definition at line 383 of file particle_wall.py.
float particle_wall.R = 0.001 |
radius of p
Definition at line 60 of file particle_wall.py.
float particle_wall.R_contact_factor = 0.95 |
contact radius is taken as R_contact_factor * h_{min} where h_{min} is the minimum mesh size over all meshes (it is computed at the begining of simulation) we only specify the R_contact_factor
Definition at line 106 of file particle_wall.py.
int particle_wall.rho1 = 1200. |
Definition at line 88 of file particle_wall.py.
int particle_wall.rho2 = 1200. |
Definition at line 96 of file particle_wall.py.
float particle_wall.T = 0.1 |
final time and time step
Definition at line 78 of file particle_wall.py.
particle_wall.type |
Definition at line 43 of file particle_wall.py.
Definition at line 75 of file particle_wall.py.
wall geometry (corner point coordinates)
Definition at line 69 of file particle_wall.py.