This module provides the MUSUBI specific functions for calculating macroscopic quantities for the isothermal acoustic equations from the state variables
Do not use get_Element or get_Point routines to update the state !
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | private, | parameter | :: | = | 19 |
Definition of the discrete velocity set |
|
integer, | private, | parameter | :: | qN00 | = | 1 | |
integer, | private, | parameter | :: | q0N0 | = | 2 | |
integer, | private, | parameter | :: | q00N | = | 3 | |
integer, | private, | parameter | :: | q100 | = | 4 | |
integer, | private, | parameter | :: | q010 | = | 5 | |
integer, | private, | parameter | :: | q001 | = | 6 | |
integer, | private, | parameter | :: | q0NN | = | 7 | |
integer, | private, | parameter | :: | q0N1 | = | 8 | |
integer, | private, | parameter | :: | q01N | = | 9 | |
integer, | private, | parameter | :: | q011 | = | 10 | |
integer, | private, | parameter | :: | qN0N | = | 11 | |
integer, | private, | parameter | :: | q10N | = | 12 | |
integer, | private, | parameter | :: | qN01 | = | 13 | |
integer, | private, | parameter | :: | q101 | = | 14 | |
integer, | private, | parameter | :: | qNN0 | = | 15 | |
integer, | private, | parameter | :: | qN10 | = | 16 | |
integer, | private, | parameter | :: | q1N0 | = | 17 | |
integer, | private, | parameter | :: | q110 | = | 18 | |
integer, | private, | parameter | :: | q000 | = | 19 | |
real(kind=rk), | private, | parameter | :: | f1 | = | 2.0_rk/5.0_rk | |
real(kind=rk), | private, | parameter | :: | f2 | = | 1.0_rk/30.0_rk | |
real(kind=rk), | private, | parameter | :: | f8 | = | 1.0_rk/30.0_rk |
subroutine to add derive variables for isothermal acoustic equations (schemekind = 'isotherm_acEq') 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 |
Calculate the density of a given set of elements (sum up all links).
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. |
Calculate the pressure of a given set of elements (sum up all links).
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. |
Initiates the calculation of velocity This routine sets the function Pointer for velocity calcualtion and calls the generice get Element from PDF routine
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. |
Calculate the equlibrium of given elements with the given input state array.
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. |
This routine computes velocity from state array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | state(:) |
Array of state n * layout%fStencil%QQ * nFields |
||
integer, | intent(in) | :: | iField |
Current field |
||
integer, | intent(in) | :: | nElems |
number of elements |
||
type(tem_varSys_type), | intent(in) | :: | varSys |
variable system which is required to access fieldProp information via variable method data c_ptr |
||
type(mus_scheme_layout_type), | intent(in) | :: | layout |
scheme layout contains stencil definition and lattice weights |
||
real(kind=rk), | intent(out) | :: | res(:) |
Output of this routine Dimension: n * nComponents of res |
This routine computes equil from state array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | state(:) |
Array of state n * layout%fStencil%QQ * nFields |
||
integer, | intent(in) | :: | iField |
Current field |
||
integer, | intent(in) | :: | nElems |
number of elements |
||
type(tem_varSys_type), | intent(in) | :: | varSys |
variable system which is required to access fieldProp information via variable method data c_ptr |
||
type(mus_scheme_layout_type), | intent(in) | :: | layout |
scheme layout contains stencil definition and lattice weights |
||
real(kind=rk), | intent(out) | :: | res(:) |
Output of this routine Dimension: n * nComponents of res |
This routine computes equilbrium from density and velocity This must comply with interface in mus_variable_module derive_FromMacro
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | density(:) |
Array of density. Single species: dens_1, dens_2 .. dens_n multi-species: dens_1_sp1, dens_1_sp2, dens_2_sp1, dens_2_sp2 ... dens_n_sp1, dens_n_sp2 |
||
real(kind=rk), | intent(in) | :: | velocity(:,:) |
Array of velocity. Size: dimension 1: n*nFields. dimension 2: 3 (nComp) 1st dimension arrangement for multi-species is same as density |
||
integer, | intent(in) | :: | iField |
Current field |
||
integer, | intent(in) | :: | nElems |
number of elements |
||
type(tem_varSys_type), | intent(in) | :: | varSys |
variable system which is required to access fieldProp information via variable method data c_ptr |
||
type(mus_scheme_layout_type), | intent(in) | :: | layout |
scheme layout contains stencil definition and lattice weights |
||
real(kind=rk), | intent(out) | :: | res(:) |
Output of this routine Dimension: n*nComponents of res |
This routine computes equilbrium from auxField
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mus_derVarPos_type), | intent(in) | :: | derVarPos |
Position of derive variable in variable system |
||
real(kind=rk), | intent(in) | :: | auxField(:) |
Array of auxField. Single species: dens_1, vel_1, dens_2, vel_2, .. dens_n, vel_n multi-species: dens_1_sp1, vel_1_spc1, dens_1_sp2, vel_1_spc2, dens_2_sp1, vel_2_spc2, dens_2_sp2, vel_2_spc2 ... dens_n_sp1, vel_n_sp1, dens_n_sp2, vel_n_spc2 Access: (iElem-1)*nAuxScalars + auxField_varPos |
||
integer, | intent(in) | :: | iField |
Current field |
||
integer, | intent(in) | :: | nElems |
number of elements |
||
type(tem_varSys_type), | intent(in) | :: | varSys |
variable system which is required to access fieldProp information via variable method data c_ptr |
||
type(mus_scheme_layout_type), | intent(in) | :: | layout |
scheme layout contains stencil definition and lattice weights |
||
real(kind=rk), | intent(out) | :: | fEq(:) |
Output of this routine Dimension: n*QQ of res |
Initiates the calculation of equilibrium. This routine sets the function Pointer for equilibrium calcualtion and calls the generice get Value of Index routine
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. |
||
type(tem_time_type), | intent(in) | :: | time |
Point in time at which to evaluate the variable. |
||
integer, | intent(in) | :: | iLevel |
Level on which values are requested |
||
integer, | intent(in) | :: | idx(:) |
Index of points in the growing array and variable val array to return. Size: most times nVals, if contiguous arrays are used it depends on the number of first indices |
||
integer, | intent(in), | optional | :: | idxLen(:) |
With idx as start index in contiguous memory, idxLength defines length of each contiguous memory Size: dependes on number of first index for contiguous array, but the sum of all idxLen is equal to nVals |
|
integer, | intent(in) | :: | nVals |
Number of values to obtain for this variable (vectorized access). |
||
real(kind=rk), | intent(out) | :: | res(:) |
Resulting values for the requested variable. |
Calculate the velocity of a given element number with the given input vector (sum up all values)
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. |
||
type(tem_stencilHeader_type), | intent(in) | :: | stencil |
fluid stencil defintion |
||
integer, | intent(in) | :: | iLevel |
current Level |
||
integer, | intent(in) | :: | posInState(:) |
Position of element in levelwise state array |
||
real(kind=rk), | intent(in) | :: | pdf(:) |
pdf array |
||
real(kind=rk), | intent(out) | :: | res(:) |
results |
||
integer, | intent(in) | :: | nVals |
nVals to get |
Calculate the equlibrium of given elements with the given input state array.
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. |
||
type(tem_stencilHeader_type), | intent(in) | :: | stencil |
fluid stencil defintion |
||
integer, | intent(in) | :: | iLevel |
current Level |
||
integer, | intent(in) | :: | posInState(:) |
Position of element in levelwise state array |
||
real(kind=rk), | intent(in) | :: | pdf(:) |
pdf array |
||
real(kind=rk), | intent(out) | :: | res(:) |
results |
||
integer, | intent(in) | :: | nVals |
nVals to get |