This module contains the data type for MRT.
Also provides functions and routines to set relaxation parameters for single-component and multispecies.
Contains STfun of viscosity variable and relaxation parameter for each level
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(tem_spacetime_fun_type), | public | :: | STfun |
space-time function |
|||
type(grw_realarray_type), | public, | allocatable | :: | dataOnLvl(:) |
viscosity value evaluated from STfun |
||
type(mus_relaxationParam_type), | public, | allocatable | :: | omLvl(:) |
relaxation paramter omega for each level |
Contains relaxation parameter for a level
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=rk), | public, | allocatable | :: | val(:) |
Relaxation parameter computed from viscosity For kinematic viscosity, if turbulence is active, this omega refers to effective omega which is omega_bg + omega_turb size: nElems_solve |
This function compute relaxation paramter omega from viscosity
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | visc |
scaled lattice viscosity i.e vL_c/dtL |
lattice time step size in current level real(kind=rk), intent(in) :: dtL output: relaxation parameter omega
This routine initialize relaxation parameter
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_relaxationParam_type), | intent(out), | allocatable | :: | omLvl(:) |
relaxation paramter |
|
integer, | intent(in) | :: | minLevel |
minlevel and maxLevel |
||
integer, | intent(in) | :: | maxLevel |
minlevel and maxLevel |
||
integer, | intent(in) | :: | nElems(minLevel:maxLevel) |
number of local elements per level |
Update kinematic viscosity from STfun and calculate turbulent viscosity from velocity gradient or nonEqPDF Viscosity obtained from this routine are normalized to the level
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_viscosity_type), | intent(inout) | :: | viscKine |
Kinematic viscosity |
||
real(kind=rk), | intent(in) | :: | state(:) |
state array |
||
integer, | intent(in) | :: | neigh(:) |
neighbor connectivity array |
||
real(kind=rk), | intent(in) | :: | auxField(:) |
Auxiliary field variable array |
||
type(mus_gradData_type), | intent(in) | :: | gradData |
gradient data |
||
type(mus_scheme_layout_type), | intent(in) | :: | layout |
stencil layout |
||
real(kind=rk), | intent(in) | :: | baryOfTotal(:,:) |
bary of treeID in total list |
||
type(tem_time_type), | intent(in) | :: | tNow |
current simulation time |
||
integer, | intent(in) | :: | nSize |
number of elements in state array |
||
integer, | intent(in) | :: | nFluids |
number of fluid elements in state array |
||
integer, | intent(in) | :: | nGhostFromCoarser |
Number of ghostFromCoarser element in state array |
||
integer, | intent(in) | :: | nGhostFromFiner |
Number of ghostFromFiner element in state array |
||
integer, | intent(in) | :: | nHalo |
Number of halo element in state array |
||
type(tem_varSys_type), | intent(in) | :: | varSys |
variable system |
||
integer, | intent(in) | :: | iLevel |
current level |
||
type(mus_convertFac_type), | intent(in) | :: | convFac |
reference physical conversion factors for current level |
||
real(kind=rk), | intent(in) | :: | dxL |
lattice element size in current level |
||
real(kind=rk), | intent(in) | :: | dtL |
lattice time step size in current level |
||
type(mus_derVarPos_type), | intent(in) | :: | derVarPos |
contains position of in varSys |
||
type(mus_turbulence_type), | intent(inout) | :: | turb |
turbulence type |
||
type(mus_nNwtn_type), | intent(in) | :: | nNwtn |
non-Newtonian type |
||
type(mus_Grad_type), | intent(in) | :: | Grad |
Object that contains pointers to calculate gradients |
Update kinematic relaxation parameter from viscosity and check omega
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_viscosity_type), | intent(inout) | :: | viscKine |
Kinematic viscosity |
||
type(mus_turbulence_type), | intent(in) | :: | turb |
turbulence type |
||
integer, | intent(in) | :: | nSolve |
Number of elements to solve in compute kernel |
||
integer, | intent(in) | :: | iLevel |
current level |
This routine is used to initialize relaxation paramter and update bulk viscosity at every time step Bulk visocisty is defined as space-time function to apply ramping and spatial sponge in bulk viscosity
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(inout) | :: | omega(:) |
relaxation parameter |
||
real(kind=rk), | intent(inout) | :: | visc(:) |
Kinematic viscosity |
||
type(tem_spacetime_fun_type), | intent(in) | :: | viscSTfun |
viscosity space-time function |
||
integer, | intent(in) | :: | nElems |
Number of local elements including halos |
||
real(kind=rk), | intent(in) | :: | baryOfTotal(:,:) |
baryID of total list |
||
type(tem_time_type), | intent(in) | :: | tNow |
current simulation time |
||
real(kind=rk), | intent(in) | :: | viscRef |
reference physical viscosity on current level i.e. (dxP_l)^2/dtP_l Dividing physical viscosity with the viscRef gives vL_l/dtL_l |
This routine checks whether omega is within the stability limit. If not it will terminate the simulation with error message. Using limits given in Tölke, J., Freudiger, S., & Krafczyk, M. (2006). An adaptive scheme using hierarchical grids for lattice Boltzmann multi-phase flow simulations. Computers & Fluids, 35(8–9), 820–830. For BGK: 2/3 < omega < 1.976 For MRT: 2/3 < omega < 1.999
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | schemeRelax |
scheme relaxation type |
||
type(mus_relaxationParam_type), | intent(in) | :: | omLvlKine(minLevel:maxLevel) |
array of kinematic relaxation parameter on all levels |
||
integer, | intent(in) | :: | nSolve(minLevel:maxLevel) |
Number of elements to solve in compute kernel |
||
integer, | intent(in) | :: | minLevel |
minlevel and maxlevel |
||
integer, | intent(in) | :: | maxLevel |
minlevel and maxlevel |
||
type(tem_general_type), | intent(inout) | :: | general |
Contains proc, simControl, solveHead |