This module provides the MUSUBI specific functions for calculating macroscopic quantities from the state variables for incompressible LBM models.\n Notice that only those quantities that related to density should have a formula which differs from normal LBM model.
The depending common interface between MUSUBI and ATELES is defined in the tem_derived_module. The functionality for accessing a variable from the state and evaluating a lua function are also provided in the tem_derived module.
Do not use get_Element or get_Point routines to update the state !
subroutine to add derive variables for incompressible LBM (schemekind = 'fluid_incompressible') to the varsys.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_varSys_type), | intent(inout) | :: | varSys |
global variable system |
||
type(mus_varSys_solverData_type), | intent(in), | target | :: | solverData |
Contains pointer to solver data types |
|
type(mus_scheme_header_type), | intent(in) | :: | schemeHeader |
identifier of the scheme |
||
type(tem_stencilHeader_type), | intent(in) | :: | stencil |
compute stencil defintion |
||
character(len=*), | intent(in) | :: | fldLabel |
array of field label prefix. Size=nFields |
||
type(grw_labelarray_type), | intent(inout) | :: | derVarName |
array of derive physical variables |
Derive absorb layer variable defined as a source term.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tem_varSys_op_type), | intent(in) | :: | fun |
Description of the method to obtain the variables, here some preset values might be stored, like the space time function to use or the required variables. |
||
type(tem_varSys_type), | intent(in) | :: | varSys |
The variable system to obtain the variable from. |
||
integer, | intent(in) | :: | elempos(:) |
Position of the TreeID of the element to get the variable for in the global treeID list. |
||
type(tem_time_type), | intent(in) | :: | time |
Point in time at which to evaluate the variable. |
||
type(treelmesh_type), | intent(in) | :: | tree |
global treelm mesh info |
||
integer, | intent(in) | :: | nElems |
Number of values to obtain for this variable (vectorized access). |
||
integer, | intent(in) | :: | nDofs |
Number of degrees of freedom within an element. |
||
real(kind=rk), | intent(out) | :: | res(:) |
Resulting values for the requested variable. |
Update state with source variable "absorb_layer". absorb_layer is used to absorb the flow and gradually reduce the flow quantities like pressure and velocity to a fixed value for incompressible model. It is based on: Xu, H., & Sagaut, P. (2013). Analysis of the absorbing layers for the weakly-compressible lattice Boltzmann methods. Journal of Computational Physics, 245(x), 14–42.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mus_source_op_type), | intent(in) | :: | fun |
Description of method to apply source terms |
||
real(kind=rk), | intent(in) | :: | inState(:) |
input pdf vector |
||
real(kind=rk), | intent(inout) | :: | outState(:) |
output pdf vector |
||
integer, | intent(in) | :: | neigh(:) |
connectivity Array corresponding to state vector |
||
real(kind=rk), | intent(in) | :: | auxField(:) |
auxField array |
||
integer, | intent(in) | :: | nPdfSize |
number of elements in state Array |
||
integer, | intent(in) | :: | iLevel |
current level |
||
type(tem_varSys_type), | intent(in) | :: | varSys |
variable system |
||
type(tem_time_type), | intent(in) | :: | time |
Point in time at which to evaluate the variable. |
||
type(mus_convertFac_type), | intent(in) | :: | phyConvFac |
Physics conversion factor for current level |
||
type(mus_derVarPos_type), | intent(in) | :: | derVarPos(:) |
position of derived quantities in varsys |