GENERATE_PARTICLE_DISTRIBUTION

Particle

Beta command

This command is in the beta stage and the format may change over time.

*GENERATE_PARTICLE_DISTRIBUTION
"Optional title"
sid
gid${}_1$, gid${}_2$, $\Delta_1$, $\Delta_2$, $w$, $s$

Parameter definition

Variable
Description
sid
Subdomain ID
gid${}_1$
Geometry ID of region that will be filled with particles
gid${}_2$
Geometry ID of region with increased particle density
default: not used
$\Delta_1$
Target particle spacing
$\Delta_2$
Target particle spacing in refined region
$w$
Width of transition zone from $\Delta_2$ to $\Delta_1$
default: $20 \cdot \Delta_1$
$s$
Smoothing length scale factor
default: $2.5$

Description

This is a pure pre-processing command that is used to distribute SPH particles inside a geometry. As a first step, particles are randomly distributed inside gid${}_1$. This is followed by an iterative process where the particles are repositioned for an as accurate spacing and density as possible. The SPH kernel function is used to evaluate the local density.

After each iteration a binary file with the current distribution is written to disk. This binary file can be imported and used in subsequent Surface SPH simulation models. The iterative process will automatically terminate after a maximum of 100 iterations.

Example

Filling of a geometry with SPH particles

Example where a geometry is filled with SPH particles to model an aluminum plate with a hole at its center. The generated particle distribution is stored in the binary file plist_2.bin (the suffix "2" reflects the specified sub-domain ID). Note that the generated particle distribution does not contain any material information. Hence, when used in a subsequent simulation model, the particle list must be complemented with a PARTICLE_SPH command.

Step 1 - generate particle distribution

# # --- IMPORT MESH --- # *INCLUDE mesh.k # # --- PART --- # *PART "Plate" 1 # # --- GENERATE SPH PARTICLES --- # *PARAMETER sid = 2, "Sub-domain ID" Delta_1 = 0.003, "Particle spacing" Delta_2 = 0.0015, "Particle spacing in refined region" w = 0.04, "Width of transition region" *GENERATE_PARTICLE_DISTRIBUTION [%sid] 1, 2, [%Delta_1], [%Delta_2], [%w] *GEOMETRY_PART "Plate" 1 1 *GEOMETRY_PIPE "Refined region" 2 0, 0, -0.01, 0, 0, 0.03, 0.06 *END

Step 2 - impact simulation

*UNIT_SYSTEM SI *PARAMETER R = 0.06, "Impactor radius" v0 = 400.0, "Impactor velocity" tend = 0.001, "Termination time" # # --- TIME --- # *TIME [%tend] # # --- MESH --- # *COMPONENT_SPHERE "Impactor" 1, 1, 6 0, 0, [%R+0.01], [%R] *CHANGE_P-ORDER P, 1, 2 *SMOOTH_MESH P, 1, 45.0 # # --- MATERIAL --- # *MAT_RIGID "Impactor" 1, 7800.0 *MAT_METAL "Plate" 2, 2700.0, 70.0e9, 0.3 2 *FUNCTION 2 2.0e8 + 2.0e8 * (1 - exp(-5*epsp)) # # --- PART --- # *PART "Impactor" 1, 1 # # --- VELOCITY --- # *INITIAL_VELOCITY P, 1, 0, 0, [-%v0] # # --- SPH --- # *INCLUDE_BINARY ../step_1/plist_2.bin *PARTICLE_DOMAIN P, 1 -0.3, -0.3, -0.3, 0.3, 0.3, 0.1 0, 1 *PARTICLE_SPH "Plate" 2 2 *END