This module deals with the calculation of moments from pdfs
Calculate the moment of a centain order
The moment of a distribution is defined as:\n
The fucntion argument expX
is array of size 3,
which contains the values of \f$p, q, r\f$
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ||||
integer, | intent(in) | :: | cxDir(3,QQ) | |||
integer, | intent(in) | :: | expX(3) | |||
real(kind=rk), | intent(in) | :: | pdf(QQ) |
distribution value |
get the moment vector to calculate the moment from the pdf
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ||||
integer, | intent(in) | :: | cxDir(3,QQ) | |||
integer, | intent(in) | :: | expX(3) |
exponents of the moments |
moment vector
The integer moment vector for a given cxDir and order.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | cxDir(:,:) |
discrete velocity |
||
integer, | intent(in) | :: | expX(3) |
order in each direction |
||
integer, | intent(in) | :: |
number of velocity channels (include rest) |
Initialize the moment space
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_moment_type), | intent(inout) | :: | me | |||
integer, | intent(in) | :: | ||||
integer, | intent(in) | :: | cxDir(3,QQ) | |||
character(len=labelLen) | :: | label | ||||
type(mus_scheme_header_type), | intent(in) | :: | schemeHeader |
identifier of the scheme |
set indices for accessing the pressure, velocity and the shear from a 1d vector
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nDims |
number of dimensions |
||
integer, | intent(out) | :: | iPress |
index for the pressure / density |
||
integer, | intent(out) | :: | iVelMin |
starting index for velocity |
||
integer, | intent(out) | :: | iVelMax |
ending index for velocity |
||
integer, | intent(out) | :: | iSMin |
starting index for shear |
||
integer, | intent(out) | :: | iSMax |
ending index for shear |
Dump moments matrix: toPDF and toMoment
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_moment_type), | intent(in) | :: | me | |||
integer, | intent(in) | :: | outUnit |
Initialize Moments transformation matrix for LBM compressible and incompressible fluid model. This matrix must be consistent with the relaxation matrix used in compute kernel and interpolation routines
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ||||
integer, | intent(in) | :: | cxDir(3,QQ) | |||
character(len=labelLen) | :: | label | ||||
type(mus_moment_type), | intent(inout) | :: | me | |||
real(kind=rk), | intent(inout) | :: | toMoment(me%toMoments%nEntries(1),me%toMoments%nEntries(2)) | |||
real(kind=rk), | intent(inout) | :: | toPdf(me%toPDF%nEntries(1),me%toPDF%nEntries(2)) |
Intialize the moment transformation matrix for multispecies. This matrix must be consistent with relaxation matrix used for multispecies MRT collision routines
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ||||
integer, | intent(in) | :: | cxDir(3,QQ) | |||
character(len=labelLen) | :: | label | ||||
type(mus_moment_type), | intent(inout) | :: | me | |||
real(kind=rk), | intent(inout) | :: | toMoment(me%toMoments%nEntries(1),me%toMoments%nEntries(2)) | |||
real(kind=rk), | intent(inout) | :: | toPdf(me%toPDF%nEntries(1),me%toPDF%nEntries(2)) |