GENERATE_PARTICLE_DISTRIBUTION

Particle

*GENERATE_PARTICLE_DISTRIBUTION
"Optional title"
sid
gid, gid${}_f$, $\Delta$, $\Delta_f$, $w$, $s$
gid${}_2$, sid${}_2$

Parameter definition

Variable
Description
sid
Default subdomain ID of generated particles
gid
Geometry ID of region that will be filled with particles
gid${}_f$
Geometry ID of region with increased particle density (refined region)
default: not used
$\Delta$
Target particle spacing (default)
$\Delta_f$
Target particle spacing in refined region (fine)
$w$
Width of transition zone from $\Delta_f$ to $\Delta$
default: $20 \cdot \Delta$
$s$
Smoothing length scale factor
default: $2.5$
gid${}_2$
Geometry ID of region within which particles are assigned to subdomain sid${}_2$
default: not used
sid${}_2$
Subdomain ID 2
default: not used

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. 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.

By default all particles are assigned to belong to subdomain sid. However, it is also possible to define a geometry gid${}_2$, within which particles are assigned to subdomain sid${}_2$.

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

# # --- MESH --- # *COMPONENT_BOX 1, 1, 20, 20, 1 -0.2, -0.2, 0.0, 0.2, 0.2, 0.02 *TRIM_HOLE 1 P, 1, 123, 0.08, 0.04, 0.01 *TABLE 123, 7 1, 0.0, 0.0, 0.02, 0, 0, -1 # # --- PART --- # *PART "Plate" 1 # # --- GENERATE SPH PARTICLES --- # *PARAMETER sid = 2, "Sub-domain ID" Delta = 0.003, "Particle spacing (default)" Delta_f = 0.0015, "Particle spacing in refined region" w = 0.04, "Width of transition region" *GENERATE_PARTICLE_DISTRIBUTION [%sid] 1, 2, [%Delta], [%Delta_f], [%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