This module contains routine to retrieve auxiliary field variables for getElement, getPoint, setupIndices and getValOfIndex. Auxilary field variables are: * density and velocity for fluid * species desity and velocity for multispecies * potential for poisson
Interface to compute auxField vars i.e. conserved macroscopic moments from pre-collision PDF for fluid and ghostFromCoarser. auxField on GhostFromFiner elements are interpolated and halo elements are exchanged For Multicomponent models: in calcAuxField function, the velocity is computed on transformed PDF such that force term can be added to it in addSrcToAuxField routine. The auxField is updated with correct velocity field in compute kernel i.e. velocity of original PDF is obtained by solving linear equation system in compute kernel
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(inout) | :: | auxField(:) | output auxField array |
||
real(kind=rk), | intent(in) | :: | state(:) | input state array |
||
integer, | intent(in) | :: | neigh(:) | connectivity array |
||
integer, | intent(in) | :: | nSize | number of elements in the state array |
||
integer, | intent(in) | :: | nSolve | number of fluid elements + ghostFromCoarser |
||
integer, | intent(in) | :: | iLevel | current level |
||
type(tem_stencilHeader_type), | intent(in) | :: | stencil | stencil header |
||
type(tem_varSys_type), | intent(in) | :: | varSys | variable system definition |
||
type(mus_derVarPos_type), | intent(in) | :: | derVarPos(:) | position of derived quantities in varsys |
Contains auxiliary field variable values per level and communication buffers
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=rk), | private, | allocatable | :: | val(:) | auxiliary field variable values computed from pre-collision PDF after PDF exchange Size: nSizenScalars Element order is same as state array Access: (iElem-1)nScalars + varSys%method%val(iVar)%auxField_varPos See mus_append_auxField for the name of the variable stored in this array as it depends on the scheme kind. |
||
type(tem_communication_type), | private | :: | sendBuffer | Local Fluids required by remote processes |
|||
type(tem_communication_type), | private | :: | sendBufferFromCoarser | Local ghostFromCoarser required by remote processes |
|||
type(tem_communication_type), | private | :: | sendBufferFromFiner | Local ghostFromFiner required by remote processes |
|||
type(tem_communication_type), | private | :: | recvBuffer | My halos which are fluids on remote processes |
|||
type(tem_communication_type), | private | :: | recvBufferFromCoarser | My halos which are ghostFromCoarser on remote processes |
|||
type(tem_communication_type), | private | :: | recvBufferFromFiner | My halos which are ghostFromFiner on remote processes |
This routine initialize auxField var val array and communication buffers
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_auxFieldVar_type), | intent(out) | :: | me | Auxiliary field variable |
||
type(tem_levelDesc_type), | intent(in) | :: | levelDesc | levelDesc to access communication buffers of state array |
||
type(tem_commPattern_type), | intent(in) | :: | pattern | communication pattern |
||
integer, | intent(in) | :: | nSize | Number of elements in state array |
||
integer, | intent(in) | :: | nAuxScalars | Number of scalars in auxiliary variables |
This routine initializes auxField for fluid elements using SAVE access on PDF initialized by IC
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_auxFieldVar_type), | intent(inout) | :: | auxField | auxilary field array |
||
real(kind=rk), | intent(in) | :: | state(:) | state array |
||
integer, | intent(in) | :: | neigh(:) | connectivity vector |
||
integer, | intent(in) | :: | nElems | number of elements to compute auxField |
||
integer, | intent(in) | :: | nSize | number of elements in state array |
||
integer, | intent(in) | :: | nFields | number of fields |
||
type(tem_stencilHeader_type), | intent(in) | :: | stencil | stencil header |
||
type(tem_varSys_type), | intent(in) | :: | varSys | variable system |
||
type(mus_derVarPos_type), | intent(in) | :: | derVarPos(:) | contains auxField position of all fields in varSys |
||
integer, | intent(in) | :: | iLevel | current level |
||
type(tem_general_type), | intent(in) | :: | general | contains commPattern, MPI communicator and simControl |
This routine compute auxField variable from pre-collision pdf and exchange halos
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_auxFieldVar_type), | intent(inout) | :: | auxField | auxilary field array |
||
procedure(mus_proc_calcAuxField), | intent(in), | pointer | :: | calcAuxField | function pointer to calculate auxField |
|
real(kind=rk), | intent(in) | :: | state(:) | state array |
||
type(pdf_data_type), | intent(in) | :: | pdfData | contains neigh array and nElems on current level |
||
integer, | intent(in) | :: | nFields | Number of fields |
||
type(mus_field_type), | intent(inout) | :: | field(nFields) | contains sources of all fields |
||
type(mus_source_type), | intent(inout) | :: | globSrc | global source |
||
type(tem_stencilHeader_type), | intent(in) | :: | stencil | stencil header |
||
type(tem_varSys_type), | intent(in) | :: | varSys | variable system |
||
type(mus_derVarPos_type), | intent(in) | :: | derVarPos(:) | contains auxField position of all fields in varSys |
||
type(mus_convertFac_type), | intent(in) | :: | phyConvFac | physics conversion factors for this level |
||
type(tem_general_type), | intent(in) | :: | general | contains commPattern, MPI communicator and simControl |
||
integer, | intent(in) | :: | iLevel | current level |
||
integer, | intent(in) | :: | minLevel | minlevel |
||
type(mus_scheme_header_type), | intent(in) | :: | schemeHeader | scheme header |
This routine interpolate auxField variable for ghostFromFiner and exchange halos
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_interpolation_type), | intent(inout) | :: | intp | Interpolation type |
||
type(mus_auxFieldVar_type), | intent(inout) | :: | tAuxField | target auxilary field array |
||
type(mus_auxFieldVar_type), | intent(in) | :: | sAuxField | source auxilary field array |
||
type(tem_levelDesc_type), | intent(in) | :: | tLevelDesc | level descriptor on target level |
||
type(tem_stencilHeader_type), | intent(in) | :: | stencil | stencil header |
||
integer, | intent(in) | :: | iLevel | current level |
||
integer, | intent(in) | :: | nAuxScalars | number of scalars to interpolate |
||
type(tem_general_type), | intent(in) | :: | general | contains commPattern, MPI communicator and simControl |
This routine interpolate auxField variable for ghostFromCoarser and exchange halos
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_interpolation_type), | intent(inout) | :: | intp | Interpolation type |
||
type(mus_auxFieldVar_type), | intent(inout) | :: | tAuxField | target auxilary field array |
||
type(mus_auxFieldVar_type), | intent(in) | :: | sAuxField | source auxilary field array |
||
type(tem_levelDesc_type), | intent(in) | :: | tLevelDesc | level descriptor on target level |
||
type(tem_stencilHeader_type), | intent(in) | :: | stencil | stencil header |
||
integer, | intent(in) | :: | iLevel | current level |
||
integer, | intent(in) | :: | nAuxScalars | number of scalars to interpolate |
||
type(tem_general_type), | intent(in) | :: | general | contains commPattern, MPI communicator and simControl |