mus_particle_boundary_module contains routines and data types to handle the interaction of particles with (periodic) boundaries
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(mus_particle_boundarydata_type), | public, | save | :: | pgBndData |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=rk), | public | :: | bnd(6) |
boundary locations [xmin, xmax, ymin, ymax, zmin, zma] |
|||
| real(kind=rk), | public | :: | domain_size(3) |
length of domain in x, y, z directions |
|||
| integer, | public | :: | bnd_coord(6) |
integer coordinates of bnd in x, y, z directions |
|||
| logical, | public | :: | useBnd |
logical set to TRUE if particle domain boundaries are active |
|||
| logical, | public | :: | periodicBnd(6) | ||||
| logical, | public | :: | wallBnd(6) |
getNeighborCoord gets the coordinate of the element offset from input coord by (nx,ny,nz) while taking into account periodicity
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | coord(4) | |||
| integer, | intent(in) | :: | nx | |||
| integer, | intent(in) | :: | ny | |||
| integer, | intent(in) | :: | nz | |||
| type(mus_particle_boundarydata_type), | intent(in) | :: | boundaryData |
computeDistance computes the shortest distance between points x1 and x2 In doing so it takes possible periodic boundaries into account.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rk) | :: | x1(3) |
xyz coordinates of point 1 |
|||
| real(kind=rk) | :: | x2(3) |
xyz coordinates of point 2 |
|||
| type(mus_particle_boundarydata_type), | intent(in) | :: | boundaryData |
Boundary data tells us the domain bounds and if we have periodic bounds |
wrapPeriodicCoord modifies the input coord to take into account periodicity
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(inout) | :: | coord(4) | |||
| type(mus_particle_boundarydata_type), | intent(in) | :: | boundaryData |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rk), | intent(inout) | :: | pos(3) | |||
| type(mus_particle_boundarydata_type) | :: | boundaryData |
calcPeriodicRsurface is used to calculate the vector from the particle origin to a point on the surface in presence of periodic boundaries. Usage: first calculate the distance from the particle origin to a surface element using r = baryOfSurface - x_origin. If the particle is close to a periodic boundary this vector may not be correct. In that case a call to calcPeriodicRsurface modifies the vector r to take into account the periodicity. This is done by checking if the magnitude of r is less than the particle radius R_particle (which can be modified with some tolerance if needed). This routine is used for fully resolved (MEM) particles only.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rk), | intent(inout) | :: | r(3) |
Original vector r |
||
| real(kind=rk), | intent(inout) | :: | R_particle |
Particle radius + a tolerance if desired |
||
| type(mus_particle_boundarydata_type), | intent(in) | :: | boundaryData |
Datatype containing periodic boundary data |
wrap_periodic checks whether a distance r from x_particle to
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rk), | intent(inout) | :: | ri |
Distance (in one of the Cartesian directions xi) from the particle origin to the barycenter of a point on the surface. |
||
| real(kind=rk), | intent(in) | :: | R |
Radius of the particle |
||
| real(kind=rk), | intent(in) | :: | L |
Length of the periodic domain (in direction xi ) |