mus_particle_checks_module contains a number of debugging routines to calculate the fluid and particle momentum so that the conservation of total momentum can be verified.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public, | save | :: | iMomNow | = | 2 | |
| integer, | public, | save | :: | iMomLast | = | 1 |
compute_fluid_momentum calculates the total momentum of the fluid for all fluid elements in the global domain. The result "totalMomentum" is returned in physical units.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_scheme_type), | intent(in) | :: | scheme |
scheme for access to auxfield |
||
| integer, | intent(in) | :: | lev |
level in the octree to compute total momentum on |
||
| type(mus_param_type), | intent(in) | :: | params |
params for access to dt, dx, etc. |
||
| real(kind=rk), | intent(out) | :: | totalMomentum(3) |
output: total momentum on ENTIRE fluid domain (across all procs) |
||
| integer | :: | comm |
MPI communicator |
|||
| integer | :: | myRank |
My MPI rank |
|||
| integer | :: | nProcs |
Number of MPI processes in communicator |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_group_type), | intent(in) | :: | particleGroup | |||
| integer, | intent(in) | :: | lev |
Level in the octree that the particles are represented on |
||
| type(mus_param_type), | intent(in) | :: | params |
Params for access to dt, dx, etc. |
||
| real(kind=rk), | intent(out) | :: | totalMomentum(3) |
output: total momentum on ENTIRE fluid domain (across all procs) |
||
| integer, | intent(in) | :: | comm |
MPI communicator |
||
| integer, | intent(in) | :: | myRank |
My MPI rank |
||
| integer, | intent(in) | :: | nProcs |
Number of MPI processes in communicator |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(inout) | :: | iMomNow | |||
| integer, | intent(inout) | :: | iMomLast |