This module contains functions for Cumulant and Cascaded for D3Q27 stencil. author: Gregorio Gerardo Spinelli
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | private, | parameter | :: | = | 27 | ||
integer, | private, | parameter | :: | q000 | = | 27 |
allocate weights from D3Q27 ordered disposition to cumulant disposition
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | layout_weight(27) | layout weights |
Calculating central moment weights This follows equation 3 in cumulent paper (Geier .et al 2017)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ii | indeces of the pdf |
||
integer, | intent(in) | :: | jj | indeces of the pdf |
||
integer, | intent(in) | :: | ig | order gamma of moments |
||
real(kind=rk), | intent(in) | :: | w(-1:1,-1:1,-1:1) | cumulant ordered weights |
Calculating central moment weights This follows equation 3 in cumulent paper (Geier .et al 2017)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ii | indeces of the pdf |
||
integer, | intent(in) | :: | ib | order gamma of moments |
||
integer, | intent(in) | :: | ig | order gamma of moments |
||
real(kind=rk), | intent(in) | :: | w_ij_g(-1:1,-1:1,0:2) | partial weights_ij_g |
Calculating central moment weights This follows equation 5 in cumulent paper (Geier .et al 2017)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ia | order gamma of moments |
||
integer, | intent(in) | :: | ib | order gamma of moments |
||
integer, | intent(in) | :: | ig | order gamma of moments |
||
real(kind=rk), | intent(in) | :: | w_i_bg(-1:1,0:2,0:2) | partial weights_i_bg |
Calculating central moment by spliting among directions. This follows equations 43, 44, 45 in cumulent paper (Geier .et al 2015) We first do x direction for better performance.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | f(-1:1,-1:1,-1:1) | |||
integer, | intent(in) | :: | a | order of central moments |
||
integer, | intent(in) | :: | b | order of central moments |
||
integer, | intent(in) | :: | g | order of central moments |
||
real(kind=rk), | intent(in) | :: | ux | |||
real(kind=rk), | intent(in) | :: | uy | |||
real(kind=rk), | intent(in) | :: | uz |
Calculating central moment. This follows equations 21 in cumulent paper ( Geier .et al 2015 )
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | f(-1:1,-1:1,-1:1) | |||
integer, | intent(in) | :: | a | order of central moments |
||
integer, | intent(in) | :: | b | order of central moments |
||
integer, | intent(in) | :: | g | order of central moments |
||
real(kind=rk), | intent(in) | :: | ux | |||
real(kind=rk), | intent(in) | :: | uy | |||
real(kind=rk), | intent(in) | :: | uz |
Calculating central moment This follows equations 6-8 in cumulent paper (Geier .et al 2017)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | f(-1:1,-1:1,-1:1) | |||
integer, | intent(in) | :: | ii | indeces of the pdf |
||
integer, | intent(in) | :: | jj | indeces of the pdf |
||
integer, | intent(in) | :: | gg | order gamma of moments |
||
real(kind=rk), | intent(in) | :: | uz | z-component of velocity |
||
real(kind=rk), | intent(in) | :: | w_ij_g(-1:1,-1:1,0:2) | partial weights_ij_g |
Calculating central moment This follows equations 9-11 in cumulent paper (Geier .et al 2017)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ii | indeces of the pdf |
||
integer, | intent(in) | :: | bb | order gamma of moments |
||
integer, | intent(in) | :: | gg | order gamma of moments |
||
real(kind=rk), | intent(in) | :: | uy | y-, z-component of velocity |
||
real(kind=rk), | intent(in) | :: | w_i_bg(-1:1,0:2,0:2) | partial weights_i_bg |
||
real(kind=rk), | intent(in) | :: | k_ij_g(-1:1,-1:1,0:2) | partial cumulants_ij_g |
Calculating central moment This follows equations 12-14 in cumulent paper (Geier .et al 2017)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | aa | order gamma of moments |
||
integer, | intent(in) | :: | bb | order gamma of moments |
||
integer, | intent(in) | :: | gg | order gamma of moments |
||
real(kind=rk), | intent(in) | :: | ux | x-, y-, z-component of velocity |
||
real(kind=rk), | intent(in) | :: | w_abg(0:2,0:2,0:2) | partial weights_abg |
||
real(kind=rk), | intent(in) | :: | k_i_bg(-1:1,0:2,0:2) | partial cumulants_i_bg |
Back to central moment This follows equations 57-59 in cumulent paper (Geier .et al 2017)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | k(0:2,0:2,0:2) | cumulant |
||
integer, | intent(in) | :: | ii | indeces of the pdf |
||
integer, | intent(in) | :: | bb | order gamma of moments |
||
integer, | intent(in) | :: | gg | order gamma of moments |
||
real(kind=rk), | intent(in) | :: | ux | x-component of velocity |
||
real(kind=rk), | intent(in) | :: | w_abg(0:2,0:2,0:2) | partial weights_abg |
Back to central moment This follows equations 60-62 in cumulent paper (Geier .et al 2017)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ii | indeces of the pdf |
||
integer, | intent(in) | :: | jj | indeces of the pdf |
||
integer, | intent(in) | :: | gg | order gamma of moments |
||
real(kind=rk), | intent(in) | :: | uy | y-component of velocity |
||
real(kind=rk), | intent(in) | :: | w_i_bg(-1:1,0:2,0:2) | partial weights_i_bg |
||
real(kind=rk), | intent(in) | :: | k_i_bg(-1:1,0:2,0:2) | partial cumulant_i_bg |
Back to central moment This follows equations 63-65 in cumulent paper (Geier .et al 2017)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ii | indeces of the pdf |
||
integer, | intent(in) | :: | jj | indeces of the pdf |
||
integer, | intent(in) | :: | kk | indeces of the pdf |
||
real(kind=rk), | intent(in) | :: | uz | x-, y-, z-component of velocity |
||
real(kind=rk), | intent(in) | :: | w_ij_g(-1:1,-1:1,0:2) | partial weights_ij_g |
||
real(kind=rk), | intent(in) | :: | k_ij_g(-1:1,-1:1,0:2) | partial cumulants_ij_g |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | k(0:2,0:2,0:2) | |||
real(kind=rk), | intent(in) | :: | ux | |||
real(kind=rk), | intent(in) | :: | uy | |||
real(kind=rk), | intent(in) | :: | uz |
No comment yet!
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_field_prop_type), | intent(in) | :: | fieldProp(:) | Array of field properties (fluid or species) |
||
real(kind=rk), | intent(in) | :: | inState(nElems*varSys%nScalars) | input pdf vector |
||
real(kind=rk), | intent(out) | :: | outState(nElems*varSys%nScalars) | output pdf vector |
||
real(kind=rk), | intent(inout) | :: | auxField(nElems*varSys%nAuxScalars) | Auxiliary field computed from pre-collision state Is updated with correct velocity field for multicomponent models |
||
integer, | intent(in) | :: | neigh(nElems*layout%fStencil%QQ) | connectivity vector |
||
integer, | intent(in) | :: | nElems | number of elements in state Array |
||
integer, | intent(in) | :: | nSolve | number of elements solved in kernel |
||
integer, | intent(in) | :: | level | current level |
||
type(mus_scheme_layout_type), | intent(in) | :: | layout | current layout |
||
type(mus_param_type), | intent(in) | :: | params | global parameters |
||
type(tem_varSys_type), | intent(in) | :: | varSys | variable system definition |
||
type(mus_derVarPos_type), | intent(in) | :: | derVarPos(:) | position of derived quantities in varsys for all fields |
Cumulant kernel based on Geier2017 and optimized. Just omega(2) is given in input. omega(2)=-1 means omega2=omegaBulk. Limiters read from input. lim(N)=10^10 means unlimited. lim(N) is for omega(N+2). Just omega(3:5) are limited as in the paper. omega(6:10) = 1._rk
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_field_prop_type), | intent(in) | :: | fieldProp(:) | Array of field properties (fluid or species) |
||
real(kind=rk), | intent(in) | :: | inState(nElems*varSys%nScalars) | input pdf vector |
||
real(kind=rk), | intent(out) | :: | outState(nElems*varSys%nScalars) | output pdf vector |
||
real(kind=rk), | intent(inout) | :: | auxField(nElems*varSys%nAuxScalars) | Auxiliary field computed from pre-collision state Is updated with correct velocity field for multicomponent models |
||
integer, | intent(in) | :: | neigh(nElems*layout%fStencil%QQ) | connectivity vector |
||
integer, | intent(in) | :: | nElems | number of elements in state Array |
||
integer, | intent(in) | :: | nSolve | number of elements solved in kernel |
||
integer, | intent(in) | :: | level | current level |
||
type(mus_scheme_layout_type), | intent(in) | :: | layout | current layout |
||
type(mus_param_type), | intent(in) | :: | params | global parameters |
||
type(tem_varSys_type), | intent(in) | :: | varSys | variable system definition |
||
type(mus_derVarPos_type), | intent(in) | :: | derVarPos(:) | position of derived quantities in varsys for all fields |
Cumulant based on Geier2017 paper. With all modifications and limiters. All omegas are given in input. When omega(N) = -1 means adjusted in this routine. omega(2)=-1 means omega2=omegaBulk. Limiters read from input. lim(N)=10^10 means unlimited. lim(N) is for omega(N+2). Just omega(3:5) are limited as in the paper.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_field_prop_type), | intent(in) | :: | fieldProp(:) | Array of field properties (fluid or species) |
||
real(kind=rk), | intent(in) | :: | inState(nElems*varSys%nScalars) | input pdf vector |
||
real(kind=rk), | intent(out) | :: | outState(nElems*varSys%nScalars) | output pdf vector |
||
real(kind=rk), | intent(inout) | :: | auxField(nElems*varSys%nAuxScalars) | Auxiliary field computed from pre-collision state Is updated with correct velocity field for multicomponent models |
||
integer, | intent(in) | :: | neigh(nElems*layout%fStencil%QQ) | connectivity vector |
||
integer, | intent(in) | :: | nElems | number of elements in state Array |
||
integer, | intent(in) | :: | nSolve | number of elements solved in kernel |
||
integer, | intent(in) | :: | level | current level |
||
type(mus_scheme_layout_type), | intent(in) | :: | layout | current layout |
||
type(mus_param_type), | intent(in) | :: | params | global parameters |
||
type(tem_varSys_type), | intent(in) | :: | varSys | variable system definition |
||
type(mus_derVarPos_type), | intent(in) | :: | derVarPos(:) | position of derived quantities in varsys for all fields |
No comment yet!
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_field_prop_type), | intent(in) | :: | fieldProp(:) | Array of field properties (fluid or species) |
||
real(kind=rk), | intent(in) | :: | inState(nElems*varSys%nScalars) | input pdf vector |
||
real(kind=rk), | intent(out) | :: | outState(nElems*varSys%nScalars) | output pdf vector |
||
real(kind=rk), | intent(inout) | :: | auxField(nElems*varSys%nAuxScalars) | Auxiliary field computed from pre-collision state Is updated with correct velocity field for multicomponent models |
||
integer, | intent(in) | :: | neigh(nElems*layout%fStencil%QQ) | connectivity vector |
||
integer, | intent(in) | :: | nElems | number of elements in state Array |
||
integer, | intent(in) | :: | nSolve | number of elements solved in kernel |
||
integer, | intent(in) | :: | level | current level |
||
type(mus_scheme_layout_type), | intent(in) | :: | layout | current layout |
||
type(mus_param_type), | intent(in) | :: | params | global parameters |
||
type(tem_varSys_type), | intent(in) | :: | varSys | variable system definition |
||
type(mus_derVarPos_type), | intent(in) | :: | derVarPos(:) | position of derived quantities in varsys for all fields |