In this module the routines for interactions between particles in the DEM solver are implemented.
isLocalCollision checks if collision between two particles is local This is the case when they are both owned by this process
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_MEM_type), | intent(in) | :: | particleA |
First particle to collide |
||
| type(mus_particle_MEM_type), | intent(in) | :: | particleB |
Second particle to collide |
||
| integer, | intent(in) | :: | myRank |
This process's rank |
isLocalCollision checks if collision between two particles is local This is the case when they are both owned by this process
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_DPS_type), | intent(in) | :: | particleA |
First particle to collide |
||
| type(mus_particle_DPS_type), | intent(in) | :: | particleB |
Second particle to collide |
||
| integer, | intent(in) | :: | myRank |
This process's rank |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_MEM_type), | intent(in) | :: | particleA |
First particle to collide |
||
| type(mus_particle_MEM_type), | intent(in) | :: | particleB |
Second particle to collide |
||
| integer, | intent(in) | :: | myRank |
This process's rank |
||
| type(mus_particles_communication_type), | intent(in) | :: | send |
Communication type for sending |
||
| logical, | intent(out) | :: | isRemoteCollision |
logical indicating if this is a remote collision that needs to be resolved on this process |
||
| integer, | intent(out) | :: | otherRank |
Other particle's rank as an output |
||
| integer, | intent(out) | :: | otherRankIndex |
Position of other particle's rank in send%proc |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_DPS_type), | intent(in) | :: | particleA |
First particle to collide |
||
| type(mus_particle_DPS_type), | intent(in) | :: | particleB |
Second particle to collide |
||
| integer, | intent(in) | :: | myRank |
This process's rank |
||
| type(mus_particles_communication_type), | intent(in) | :: | send |
Communication type for sending |
||
| logical, | intent(out) | :: | isRemoteCollision |
logical indicating if this is a remote collision that needs to be resolved on this process |
||
| integer, | intent(out) | :: | otherRank |
Other particle's rank as an output |
||
| integer, | intent(out) | :: | otherRankIndex |
Position of other particle's rank in send%proc |
checkAndCollideDEM checks if two particles A and B collide This is the case if the continuous representations overlap If there is a collision, a collision force is applied to each particle checkAndCollideDEM checks if two particles A and B collide This is the case if the continuous representations overlap If there is a collision, a collision force is applied to each particle
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_MEM_type), | intent(inout) | :: | particleA |
First particle to collide |
||
| type(mus_particle_MEM_type), | intent(inout) | :: | particleB |
Second particle to collide |
||
| logical, | intent(out) | :: | hasCollided |
Logical which indicates whether particles have indeed collided |
||
| real(kind=rk), | intent(in) | :: | eps |
Threshold gap at which to call it a collision |
||
| real(kind=rk), | intent(in) | :: | Tc |
Collision time, used to compute DEM spring and damper constant |
||
| real(kind=rk), | intent(in) | :: | mu |
Dynamic viscosity, in physical units |
checkAndCollideDEM checks if two particles A and B collide This is the case if the continuous representations overlap If there is a collision, a collision force is applied to each particle
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_DPS_type), | intent(inout) | :: | particleA |
First particle to collide |
||
| type(mus_particle_DPS_type), | intent(inout) | :: | particleB |
Second particle to collide |
||
| logical, | intent(out) | :: | hasCollided |
Logical which indicates whether particles have indeed collided |
||
| real(kind=rk), | intent(in) | :: | eps |
Threshold gap at which to call it a collision |
||
| real(kind=rk), | intent(in) | :: | Tc |
Collision time, used to compute DEM spring and damper constant |
||
| real(kind=rk), | intent(in) | :: | mu |
Dynamic viscosity, in physical units |
computeWallPosSum computes the sum of the locations of wall boundaries in the area surrounding the particle. It also sets rmflag to true if an open boundary is detected, indicating that this particle should be removed from the global domain (in a different routine)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_MEM_type), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | BCinteraction(:) |
Array of length nBCs which tells us how particles should interact with each boundary. Indexed using boundary ID! |
||
| type(mus_scheme_type), | intent(inout) | :: | scheme |
Scheme for access to level descriptor |
||
| type(tem_stencilHeader_type), | intent(in) | :: | stencil |
Stencil for access to cq |
||
| type(mus_geom_type), | intent(in) | :: | geometry |
Geometry information to determine TreeIDs of elements 'covered' by particle |
||
| type(mus_param_type), | intent(in) | :: | params |
Parameters for access to conversion factors between units |
||
| logical, | intent(out) | :: | rmflag |
Flag to indicate whether particle should be removed because it just hit a non-wall BC |
||
| logical, | intent(out) | :: | foundWall |
Flag to indicate whether we found a wall or not |
||
| real(kind=rk), | intent(out) | :: | wallPosSum(3) |
Sum of locations (x,y,z) of the detected walls |
||
| integer, | intent(out) | :: | nWallPos |
Number of elements in wallPosSum |
computeWallPosSum computes the sum of the locations of wall boundaries in the area surrounding the particle. It also sets rmflag to true if an open boundary is detected, indicating that this particle should be removed from the global domain (in a different routine)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_DPS_type), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | BCinteraction(:) |
Array of length nBCs which tells us how particles should interact with each boundary. Indexed using boundary ID! |
||
| type(mus_scheme_type), | intent(inout) | :: | scheme |
Scheme for access to level descriptor |
||
| type(tem_stencilHeader_type), | intent(in) | :: | stencil |
Stencil for access to cq |
||
| type(mus_geom_type), | intent(in) | :: | geometry |
Geometry information to determine TreeIDs of elements 'covered' by particle |
||
| type(mus_param_type), | intent(in) | :: | params |
Parameters for access to conversion factors between units |
||
| logical, | intent(out) | :: | rmflag |
Flag to indicate whether particle should be removed because it just hit a non-wall BC |
||
| logical, | intent(out) | :: | foundWall |
Flag to indicate whether we found a wall or not |
||
| real(kind=rk), | intent(out) | :: | wallPosSum(3) |
Sum of locations (x,y,z) of the detected walls |
||
| integer, | intent(out) | :: | nWallPos |
Number of elements in wallPosSum |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_MEM_type), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | BCinteraction(:) |
Array of length nBCs which tells us how particles should interact with each boundary. Indexed using boundary ID! |
||
| type(mus_scheme_type), | intent(inout) | :: | scheme |
Scheme for access to level descriptor |
||
| type(mus_geom_type), | intent(in) | :: | geometry |
Geometry information to determine TreeIDs of elements 'covered' by particle |
||
| type(mus_param_type), | intent(in) | :: | params |
Parameters for access to conversion factors between units |
||
| real(kind=rk), | intent(in) | :: | Tc |
Collision time |
||
| real(kind=rk), | intent(in) | :: | eps |
threshold gap for collision |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_DPS_type), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | BCinteraction(:) |
Array of length nBCs which tells us how particles should interact with each boundary. Indexed using boundary ID! |
||
| type(mus_scheme_type), | intent(inout) | :: | scheme |
Scheme for access to level descriptor |
||
| type(mus_geom_type), | intent(in) | :: | geometry |
Geometry information to determine TreeIDs of elements 'covered' by particle |
||
| type(mus_param_type), | intent(in) | :: | params |
Parameters for access to conversion factors between units |
||
| real(kind=rk), | intent(in) | :: | Tc |
Collision time |
||
| real(kind=rk), | intent(in) | :: | eps |
threshold gap for collision |
isLocalCollision checks if collision between two particles is local This is the case when they are both owned by this process
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_MEM_type), | intent(in) | :: | particleA |
First particle to collide |
||
| type(mus_particle_MEM_type), | intent(in) | :: | particleB |
Second particle to collide |
||
| integer, | intent(in) | :: | myRank |
This process's rank |
isLocalCollision checks if collision between two particles is local This is the case when they are both owned by this process
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_DPS_type), | intent(in) | :: | particleA |
First particle to collide |
||
| type(mus_particle_DPS_type), | intent(in) | :: | particleB |
Second particle to collide |
||
| integer, | intent(in) | :: | myRank |
This process's rank |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rk), | intent(in) | :: | om(3) | |||
| real(kind=rk), | intent(in) | :: | particle_radius | |||
| real(kind=rk), | intent(in) | :: | n(3) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rk), | intent(in) | :: | h |
Gap between particles (physical units) |
||
| real(kind=rk), | intent(in) | :: | hc |
Critical gap (physical units) If h < hc we use hc to compute the lubrication forces to prevent them from diverging as h -> 0. |
||
| real(kind=rk), | intent(in) | :: | mu |
Dynamic viscosity (physical units) |
||
| real(kind=rk), | intent(in) | :: | R |
Radius of the particles |
||
| real(kind=rk), | intent(in) | :: | un |
Relative velocity in normal direction between the two particles |
||
| real(kind=rk), | intent(in) | :: | norm_rab(3) |
Unit vector pointing in the direction from particle A to particle B |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rk), | intent(in) | :: | h |
Gap between particles (physical units) |
||
| real(kind=rk), | intent(in) | :: | hc |
Critical gap (physical units) If h < hc we use hc to compute the lubrication forces to prevent them from diverging as h -> 0. |
||
| real(kind=rk), | intent(in) | :: | mu |
Dynamic viscosity (physical units) |
||
| real(kind=rk), | intent(in) | :: | R |
Radius of the particles |
||
| real(kind=rk), | intent(in) | :: | ut(3) |
Relative velocity in tangential direction between the two particles |
||
| real(kind=rk), | intent(in) | :: | utr(3) |
Relative velocity in tangential direction caused by rotational motion of particles |
computeWallForce_1D computes the 1D DEM force between a particle at position xp with velocity un to a wall at position xwall.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rk), | intent(in) | :: | xp |
Particle position |
||
| real(kind=rk), | intent(in) | :: | up |
Particle velocity |
||
| real(kind=rk), | intent(in) | :: | Rp |
Particle radius |
||
| real(kind=rk), | intent(in) | :: | xwall |
Wall position |
||
| real(kind=rk), | intent(in) | :: | kn |
Spring constant |
||
| real(kind=rk), | intent(in) | :: | dn |
Damping coefficient |
||
| real(kind=rk), | intent(in) | :: | eps |
Threshold distance at which to execute a collision |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_MEM_type), | intent(in) | :: | particleA |
First particle to collide |
||
| type(mus_particle_MEM_type), | intent(in) | :: | particleB |
Second particle to collide |
||
| integer, | intent(in) | :: | myRank |
This process's rank |
||
| type(mus_particles_communication_type), | intent(in) | :: | send |
Communication type for sending |
||
| logical, | intent(out) | :: | isRemoteCollision |
logical indicating if this is a remote collision that needs to be resolved on this process |
||
| integer, | intent(out) | :: | otherRank |
Other particle's rank as an output |
||
| integer, | intent(out) | :: | otherRankIndex |
Position of other particle's rank in send%proc |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_DPS_type), | intent(in) | :: | particleA |
First particle to collide |
||
| type(mus_particle_DPS_type), | intent(in) | :: | particleB |
Second particle to collide |
||
| integer, | intent(in) | :: | myRank |
This process's rank |
||
| type(mus_particles_communication_type), | intent(in) | :: | send |
Communication type for sending |
||
| logical, | intent(out) | :: | isRemoteCollision |
logical indicating if this is a remote collision that needs to be resolved on this process |
||
| integer, | intent(out) | :: | otherRank |
Other particle's rank as an output |
||
| integer, | intent(out) | :: | otherRankIndex |
Position of other particle's rank in send%proc |
checkAndCollideDEM checks if two particles A and B collide This is the case if the continuous representations overlap If there is a collision, a collision force is applied to each particle checkAndCollideDEM checks if two particles A and B collide This is the case if the continuous representations overlap If there is a collision, a collision force is applied to each particle
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_MEM_type), | intent(inout) | :: | particleA |
First particle to collide |
||
| type(mus_particle_MEM_type), | intent(inout) | :: | particleB |
Second particle to collide |
||
| logical, | intent(out) | :: | hasCollided |
Logical which indicates whether particles have indeed collided |
||
| real(kind=rk), | intent(in) | :: | eps |
Threshold gap at which to call it a collision |
||
| real(kind=rk), | intent(in) | :: | Tc |
Collision time, used to compute DEM spring and damper constant |
||
| real(kind=rk), | intent(in) | :: | mu |
Dynamic viscosity, in physical units |
checkAndCollideDEM checks if two particles A and B collide This is the case if the continuous representations overlap If there is a collision, a collision force is applied to each particle
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_DPS_type), | intent(inout) | :: | particleA |
First particle to collide |
||
| type(mus_particle_DPS_type), | intent(inout) | :: | particleB |
Second particle to collide |
||
| logical, | intent(out) | :: | hasCollided |
Logical which indicates whether particles have indeed collided |
||
| real(kind=rk), | intent(in) | :: | eps |
Threshold gap at which to call it a collision |
||
| real(kind=rk), | intent(in) | :: | Tc |
Collision time, used to compute DEM spring and damper constant |
||
| real(kind=rk), | intent(in) | :: | mu |
Dynamic viscosity, in physical units |
computeWallPosSum computes the sum of the locations of wall boundaries in the area surrounding the particle. It also sets rmflag to true if an open boundary is detected, indicating that this particle should be removed from the global domain (in a different routine)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_MEM_type), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | BCinteraction(:) |
Array of length nBCs which tells us how particles should interact with each boundary. Indexed using boundary ID! |
||
| type(mus_scheme_type), | intent(inout) | :: | scheme |
Scheme for access to level descriptor |
||
| type(tem_stencilHeader_type), | intent(in) | :: | stencil |
Stencil for access to cq |
||
| type(mus_geom_type), | intent(in) | :: | geometry |
Geometry information to determine TreeIDs of elements 'covered' by particle |
||
| type(mus_param_type), | intent(in) | :: | params |
Parameters for access to conversion factors between units |
||
| logical, | intent(out) | :: | rmflag |
Flag to indicate whether particle should be removed because it just hit a non-wall BC |
||
| logical, | intent(out) | :: | foundWall |
Flag to indicate whether we found a wall or not |
||
| real(kind=rk), | intent(out) | :: | wallPosSum(3) |
Sum of locations (x,y,z) of the detected walls |
||
| integer, | intent(out) | :: | nWallPos |
Number of elements in wallPosSum |
computeWallPosSum computes the sum of the locations of wall boundaries in the area surrounding the particle. It also sets rmflag to true if an open boundary is detected, indicating that this particle should be removed from the global domain (in a different routine)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_DPS_type), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | BCinteraction(:) |
Array of length nBCs which tells us how particles should interact with each boundary. Indexed using boundary ID! |
||
| type(mus_scheme_type), | intent(inout) | :: | scheme |
Scheme for access to level descriptor |
||
| type(tem_stencilHeader_type), | intent(in) | :: | stencil |
Stencil for access to cq |
||
| type(mus_geom_type), | intent(in) | :: | geometry |
Geometry information to determine TreeIDs of elements 'covered' by particle |
||
| type(mus_param_type), | intent(in) | :: | params |
Parameters for access to conversion factors between units |
||
| logical, | intent(out) | :: | rmflag |
Flag to indicate whether particle should be removed because it just hit a non-wall BC |
||
| logical, | intent(out) | :: | foundWall |
Flag to indicate whether we found a wall or not |
||
| real(kind=rk), | intent(out) | :: | wallPosSum(3) |
Sum of locations (x,y,z) of the detected walls |
||
| integer, | intent(out) | :: | nWallPos |
Number of elements in wallPosSum |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_MEM_type), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | BCinteraction(:) |
Array of length nBCs which tells us how particles should interact with each boundary. Indexed using boundary ID! |
||
| type(mus_scheme_type), | intent(inout) | :: | scheme |
Scheme for access to level descriptor |
||
| type(mus_geom_type), | intent(in) | :: | geometry |
Geometry information to determine TreeIDs of elements 'covered' by particle |
||
| type(mus_param_type), | intent(in) | :: | params |
Parameters for access to conversion factors between units |
||
| real(kind=rk), | intent(in) | :: | Tc |
Collision time |
||
| real(kind=rk), | intent(in) | :: | eps |
threshold gap for collision |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_DPS_type), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | BCinteraction(:) |
Array of length nBCs which tells us how particles should interact with each boundary. Indexed using boundary ID! |
||
| type(mus_scheme_type), | intent(inout) | :: | scheme |
Scheme for access to level descriptor |
||
| type(mus_geom_type), | intent(in) | :: | geometry |
Geometry information to determine TreeIDs of elements 'covered' by particle |
||
| type(mus_param_type), | intent(in) | :: | params |
Parameters for access to conversion factors between units |
||
| real(kind=rk), | intent(in) | :: | Tc |
Collision time |
||
| real(kind=rk), | intent(in) | :: | eps |
threshold gap for collision |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_DPS_type), | intent(inout) | :: | this |
Particle to collide with wall |
||
| integer, | intent(in) | :: | dir |
Cartesian direction to collide with (x,y,z) = (1,2,3) |
||
| real(kind=rk), | intent(in) | :: | xwall |
Wall position (in one of three Cartesian coordinates |
||
| real(kind=rk), | intent(in) | :: | Tc |
Collision time |
||
| real(kind=rk), | intent(in) | :: | eps |
threshold gap for collision |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_group_type), | intent(inout) | :: | particleGroup |
particleGroup to search for collisions in |
||
| type(mus_scheme_type), | intent(inout) | :: | scheme |
Scheme for access to leveldescriptor |
||
| type(mus_geom_type), | intent(in) | :: | geometry |
Geometry for access to tree |
||
| type(mus_param_type), | intent(in) | :: | params |
Params for access to dt, dx, etc. |
||
| real(kind=rk) | :: | Tc |
Collision time |
|||
| real(kind=rk) | :: | eps |
Threshold gap for DEM collisions |