mus_particle_creator_module contains data types and routines for the particle creator object which is used to initialize new particles at specified locations at specified time steps.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(mus_particle_creator_type), | public, | save | :: | particle_creator |
Data type used to create particles with certain properties at specified time steps
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | Nparticles |
Number of particles in this particle creator object. This is the amount of particles that will be created at each interval. |
|||
| type(grw_real2darray_type), | public | :: | position |
Dynamic array containing positions of particles to be created at each iter First index corresponds to a certain particle, second to x, y, z, rx, ry, rz coordinate |
|||
| type(grw_real2darray_type), | public | :: | velocity |
Dynamic array containing velocities of particles to be created at each iter |
|||
| type(grw_real2darray_type), | public | :: | force |
Dynamic array containing forces of particles to be created at each iter |
|||
| type(grw_realarray_type), | public | :: | radius |
Dynamic array containing radii of particles to be created at each iter |
|||
| type(grw_realarray_type), | public | :: | mass |
Dynamic array containing mass of particles to be created at each iter |
|||
| type(grw_intarray_type), | public | :: | IDoffset |
Dynamic array containing the particleID offsets for each particle These are used to create unique (across all processes) ID's for each particle |
|||
| logical, | public | :: | init_particle_to_fluid_vel |
Logical to indicate whether to initialize particles to the local fluid velocity If this is set to TRUE, particles will be initialized with the local fluid velocity when they are created. In this case the particle_creator%velocities array is not used. |
|||
| integer, | public | :: | global_Nparticles |
Number of particles in the particle creators on all processes |
|||
| integer, | public | :: | N_times_called | = | 0 |
Times that the particleCreator has been called This is the same on all processes |
|
| integer, | public | :: | iter_start |
Iteration number to start creating particles |
|||
| integer, | public | :: | iter_end |
Iteration number to stop creating particles |
|||
| integer, | public | :: | iter_interval |
Create particles every this many time steps |
Routine to generate a unique particleID for a particle
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_creator_type), | intent(in) | :: | particle_creator |
Particle creator object |
||
| integer | :: | iParticle |
Index of the particle data we want to use to create this particle in the particle creator object |
Function to check whether particles should be created using the particleCreator object at the current iteration iter.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | iter |
Current simulation time (in iterations) |
||
| integer, | intent(in) | :: | i_start |
Start creating new particles at this time (in iterations) |
||
| integer, | intent(in) | :: | i_end |
Max time (in iterations) to create new particles |
||
| integer, | intent(in) | :: | interval |
Interval (in iterations) at which to create new particles |
Output logical: TRUE if particles should be created at this instant
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_creator_type), | intent(inout) | :: | me |
Particle creator object |
||
| integer, | intent(in), | optional | :: | Nparticles |
Number of particles to create at each time step |
Routine to create a new particle using the information in the particleCreator object
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rk), | intent(in) | :: | pos(6) |
Create particle at this position |
||
| real(kind=rk), | intent(in) | :: | vel(6) |
Initial velocity of particle |
||
| real(kind=rk), | intent(in) | :: | F(6) |
External forces on particle |
||
| real(kind=rk), | intent(in) | :: | radius |
Particle radius |
||
| real(kind=rk), | intent(in) | :: | mass |
Particle mass |
||
| integer, | intent(in) | :: | particleID |
ID that should be assigned to this particle |
||
| type(mus_particle_group_type), | intent(inout) | :: | particleGroup |
ParticleGroup to add this particle to |
||
| type(mus_geom_type), | intent(in) | :: | geometry |
Geometry to initialize particles on the lattice |
||
| type(mus_scheme_type), | intent(inout) | :: | scheme |
Scheme to initialize particles on the lattice |
||
| integer, | intent(in) | :: | myRank |
Params for access to dt, dx, etc. This process rank |
Routine to create a new particle using the information in the particleCreator object
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rk), | intent(in) | :: | pos(6) |
Create particle at this position |
||
| real(kind=rk), | intent(in) | :: | vel(6) |
Initial velocity of particle |
||
| real(kind=rk), | intent(in) | :: | F(6) |
External forces on particle |
||
| real(kind=rk), | intent(in) | :: | radius |
Particle radius |
||
| real(kind=rk), | intent(in) | :: | mass |
Particle mass |
||
| integer, | intent(in) | :: | particleID |
ID that should be assigned to this particle |
||
| type(mus_particle_group_type), | intent(inout) | :: | particleGroup |
ParticleGroup to add this particle to |
||
| type(mus_geom_type), | intent(in) | :: | geometry |
Geometry to initialize particles on the lattice |
||
| type(mus_scheme_type), | intent(inout) | :: | scheme |
Scheme to initialize particles on the lattice |
||
| integer, | intent(in) | :: | myRank |
Params for access to dt, dx, etc. This process rank |
Routine to create new fully resolved MEM particles
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_creator_type), | intent(inout) | :: | particle_creator |
Particle creator object |
||
| type(mus_particle_group_type), | intent(inout) | :: | particleGroup |
ParticleGroup to add this particle to |
||
| type(mus_scheme_type), | intent(inout) | :: | scheme |
Scheme to initialize particles on the lattice |
||
| type(mus_geom_type), | intent(in) | :: | geometry |
Geometry to initialize particles on the lattice |
||
| type(mus_param_type), | intent(in) | :: | params |
Params for access to dt, dx, etc. |
||
| integer, | intent(in) | :: | myRank |
This process rank |
Routine to create new unresolved DPS particles
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_creator_type), | intent(inout) | :: | particle_creator |
Particle creator object |
||
| type(mus_particle_group_type), | intent(inout) | :: | particleGroup |
ParticleGroup to add this particle to |
||
| type(mus_scheme_type), | intent(inout) | :: | scheme |
Scheme to initialize particles on the lattice |
||
| type(mus_geom_type), | intent(in) | :: | geometry |
Geometry to initialize particles on the lattice |
||
| type(mus_param_type), | intent(in) | :: | params |
Params for access to dt, dx, etc. |
||
| integer, | intent(in) | :: | myRank |
This process rank |
Routine that checks if new particles should be created and creates them if so.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_creator_type), | intent(inout) | :: | particle_creator |
Particle creator object |
||
| integer, | intent(in) | :: | iter |
Current LBM iteration |
||
| type(mus_particle_group_type), | intent(inout) | :: | particleGroup |
particleGroup to add particles to |
||
| type(mus_scheme_type), | intent(inout) | :: | scheme |
Scheme to initialize particles on the lattice |
||
| type(mus_geom_type), | intent(in) | :: | geometry |
Geometry to initialize particles on the lattice |
||
| type(mus_param_type), | intent(in) | :: | params |
Params |
||
| integer, | intent(in) | :: | myRank |
This process rank |
Routine that checks if new particles should be created and creates them if so.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_creator_type), | intent(inout) | :: | particle_creator |
Particle creator object |
||
| integer, | intent(in) | :: | iter |
Current LBM iteration |
||
| type(mus_particle_group_type), | intent(inout) | :: | particleGroup |
particleGroup to add particles to |
||
| type(mus_scheme_type), | intent(inout) | :: | scheme |
Scheme to initialize particles on the lattice |
||
| type(mus_geom_type), | intent(in) | :: | geometry |
Geometry to initialize particles on the lattice |
||
| type(mus_param_type), | intent(in) | :: | params |
Params |
||
| integer, | intent(in) | :: | myRank |
This process rank |
Routine to initialize the particle creator object from a particle blob cylinder object Check if particles should be initialized to the local fluid velocity.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_creator_type), | intent(inout) | :: | particle_creator |
Particle creator object |
||
| type(mus_particle_blob_cylinder_type), | intent(inout) | :: | particleblob |
Particle blob object describing the shape of the initial "blob" of particles |
||
| integer, | intent(in) | :: | Nparticles |
Desired number of particles to fill the ENTIRE blob with (so not just the part of it on this rank, but on all ranks) |
||
| type(mus_scheme_type), | intent(in) | :: | scheme |
Scheme to initialize particles on the lattice |
||
| type(mus_geom_type), | intent(in) | :: | geometry |
Geometry to initialize particles on the lattice |
||
| integer, | intent(in) | :: | myRank |
This process rank |
Routine to initialize the particle creator object from a particle blob prism object Check if particles should be initialized to the local fluid velocity.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_creator_type), | intent(inout) | :: | particle_creator |
Particle creator object |
||
| type(mus_particle_blob_prism_type), | intent(inout) | :: | particleblob |
Particle blob object describing the shape of the initial "blob" of particles |
||
| integer, | intent(in) | :: | Nparticles |
Desired number of particles to fill the ENTIRE blob with (so not just the part of it on this rank, but on all ranks) |
||
| type(mus_scheme_type), | intent(in) | :: | scheme |
Scheme to initialize particles on the lattice |
||
| type(mus_geom_type), | intent(in) | :: | geometry |
Geometry to initialize particles on the lattice |
||
| integer, | intent(in) | :: | myRank |
This process rank |
Routine to initialize particle creator object with random positions inside a cylinder described by blob_cylinder type
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_blob_cylinder_type), | intent(inout) | :: | particleblob |
Particleblob type |
||
| type(grw_real2darray_type), | intent(inout) | :: | positions |
Positions array to append randomly created values to |
||
| integer, | intent(in) | :: | Nparticles |
Desired number of particles |
Routine to initialize particle creator object with random positions inside a prism described by blob_prism type
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_blob_prism_type), | intent(inout) | :: | particleblob |
Particleblob type |
||
| type(grw_real2darray_type), | intent(inout) | :: | positions |
Positions array to append randomly created values to |
||
| integer, | intent(in) | :: | Nparticles |
Desired number of particles |
Print the data in particle creator object, used for debugging
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_creator_type), | intent(inout) | :: | particle_creator |
Particle creator object |
||
| integer, | intent(in) | :: | logUnit |
Unit to write to |
Print the positions in particle creator object, used for debugging
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_creator_type), | intent(inout) | :: | particle_creator |
Particle creator object |
||
| integer, | intent(in) | :: | logUnit |
Unit to write to |