bgk_advRel_MSGas_generic Subroutine

public subroutine bgk_advRel_MSGas_generic(fieldProp, inState, outState, auxField, neigh, nElems, nSolve, level, layout, params, varSys, derVarPos)

Unoptimized Advection relaxation routine for the multispecies BGK model for testing

This routine contains the implementation of semi-implicit lattice boltzmann equation using variable transformation based on the paper "Multi-species Lattice Boltzmann Model and Practical Examples. Short Course material Pietro Asinari PhD." \n Refer page: Multispecies for more information In the variable tranformation steps, we can skip the step 1 and step 3 and evaluate only step 2 based on tranformed variable g only prerequisite is to compute feq which depends on original f not on g. feq is depend on density and velocity. Where density can be computed directly from g and velocity computed from linear system of equation given in the reference page Multispecies. KM: This is an non-optimized kernel

This subroutine interface must match the abstract interface definition kernel in scheme/mus_scheme_type_module.f90 in order to be callable via compute function pointer.

Arguments

TypeIntentOptionalAttributesName
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


Calls

proc~~bgk_advrel_msgas_generic~~CallsGraph proc~bgk_advrel_msgas_generic bgk_advRel_MSGas_generic proc~tem_abort tem_abort proc~bgk_advrel_msgas_generic->proc~tem_abort proc~invert_matrix invert_matrix proc~bgk_advrel_msgas_generic->proc~invert_matrix

Contents


Variables

TypeVisibilityAttributesNameInitial
real(kind=rk), private :: pdfTmp(varSys%nScalars)
integer, private :: iElem
integer, private :: s
integer, private :: vs
integer, private :: nFields
integer, private :: iDir
integer, private :: QQ
integer, private :: iFld
type(mus_varSys_data_type), private, pointer:: fPtr
type(mus_scheme_type), private, pointer:: scheme
integer, private :: vPos(layout%fStencil%QQ)
integer, private :: stateVarMap(varSys%nStateVars)
real(kind=rk), private, dimension(varSys%nStateVars):: rsigma
real(kind=rk), private, dimension(varSys%nStateVars):: psigma
real(kind=rk), private, dimension(varSys%nStateVars):: uxsigma
real(kind=rk), private, dimension(varSys%nStateVars):: uysigma
real(kind=rk), private, dimension(varSys%nStateVars):: uzsigma
real(kind=rk), private, dimension(varSys%nStateVars):: qxsigma
real(kind=rk), private, dimension(varSys%nStateVars):: qysigma
real(kind=rk), private, dimension(varSys%nStateVars):: qzsigma
real(kind=rk), private, dimension(varSys%nStateVars):: gqxsigma
real(kind=rk), private, dimension(varSys%nStateVars):: gqysigma
real(kind=rk), private, dimension(varSys%nStateVars):: gqzsigma
real(kind=rk), private, dimension(varSys%nStateVars):: uxstar
real(kind=rk), private, dimension(varSys%nStateVars):: uystar
real(kind=rk), private, dimension(varSys%nStateVars):: uzstar
real(kind=rk), private, dimension(varSys%nStateVars):: chisigma
real(kind=rk), private, dimension(varSys%nStateVars):: lambda
real(kind=rk), private, dimension(varSys%nStateVars):: m_sigma
real(kind=rk), private, dimension(varSys%nStateVars):: m_rsig
real(kind=rk), private :: r
real(kind=rk), private :: p
real(kind=rk), private :: mm
real(kind=rk), private :: temp
real(kind=rk), private :: usqr
real(kind=rk), private :: ucx
real(kind=rk), private :: feq
real(kind=rk), private :: theta
real(kind=rk), private, dimension(varSys%nStateVars, varSys%nStateVars):: A
real(kind=rk), private, dimension(varSys%nStateVars, varSys%nStateVars):: B
real(kind=rk), private, dimension(varSys%nStateVars, varSys%nStateVars):: chi
real(kind=rk), private, dimension(varSys%nStateVars, varSys%nStateVars):: Ainv
integer, private :: dens_pos(varSys%nStateVars)
integer, private :: mom_pos(3,varSys%nStateVars)
integer, private :: elemOff