mus_auxField_module Module

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


Uses

Used by

  • module~~mus_auxfield_module~~UsedByGraph module~mus_auxfield_module mus_auxField_module module~mus_bc_general_module mus_bc_general_module module~mus_bc_general_module->module~mus_auxfield_module module~mus_scheme_type_module mus_scheme_type_module module~mus_scheme_type_module->module~mus_auxfield_module module~mus_construction_module mus_construction_module module~mus_construction_module->module~mus_auxfield_module module~mus_control_module mus_control_module module~mus_control_module->module~mus_auxfield_module module~mus_auxfieldvar_module mus_auxFieldVar_module module~mus_auxfieldvar_module->module~mus_auxfield_module module~mus_dynloadbal_module mus_dynLoadBal_module module~mus_dynloadbal_module->module~mus_auxfield_module module~mus_flow_module mus_flow_module module~mus_flow_module->module~mus_auxfield_module

Contents


Abstract Interfaces

abstract interface

  • public subroutine mus_proc_calcAuxField(auxField, state, neigh, nSize, nSolve, iLevel, stencil, varSys, derVarPos)

    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

    Arguments

    TypeIntentOptionalAttributesName
    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


Derived Types

type, public :: mus_auxFieldVar_type

Contains auxiliary field variable values per level and communication buffers

Components

TypeVisibilityAttributesNameInitial
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


Subroutines

public subroutine mus_init_auxFieldArrays(me, levelDesc, pattern, nSize, nAuxScalars)

This routine initialize auxField var val array and communication buffers

Arguments

TypeIntentOptionalAttributesName
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

public subroutine mus_initAuxFieldFluidAndExchange(auxField, state, neigh, nElems, nSize, nFields, stencil, varSys, derVarPos, iLevel, general)

This routine initializes auxField for fluid elements using SAVE access on PDF initialized by IC

Arguments

TypeIntentOptionalAttributesName
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

public subroutine mus_calcAuxFieldAndExchange(auxField, calcAuxField, state, pdfData, nFields, field, globSrc, stencil, varSys, derVarPos, phyConvFac, general, iLevel, minLevel, schemeHeader)

This routine compute auxField variable from pre-collision pdf and exchange halos

Arguments

TypeIntentOptionalAttributesName
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

public subroutine mus_intpAuxFieldCoarserAndExchange(intp, tAuxField, sAuxField, tLevelDesc, stencil, iLevel, nAuxScalars, general)

This routine interpolate auxField variable for ghostFromFiner and exchange halos

Arguments

TypeIntentOptionalAttributesName
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

public subroutine mus_intpAuxFieldFinerAndExchange(intp, tAuxField, sAuxField, tLevelDesc, stencil, iLevel, nAuxScalars, general)

This routine interpolate auxField variable for ghostFromCoarser and exchange halos

Arguments

TypeIntentOptionalAttributesName
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