bgk_advRel_d3q19f3_MSGas Subroutine

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

Optimized Advection relaxation routine for the MSGas BGK model for d3q19 layout with three species.

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


Contents


Variables

TypeVisibilityAttributesNameInitial
real(kind=rk), private :: pdfTmp(QQ,3)
integer, private :: iElem
integer, private :: nFields
integer, private :: nScalars
integer, private :: iFld
real(kind=rk), private, dimension(3):: rsigma
real(kind=rk), private, dimension(3):: uxsigma
real(kind=rk), private, dimension(3):: uysigma
real(kind=rk), private, dimension(3):: uzsigma
real(kind=rk), private, dimension(3):: qxsigma
real(kind=rk), private, dimension(3):: qysigma
real(kind=rk), private, dimension(3):: qzsigma
real(kind=rk), private, dimension(3):: gqxsigma
real(kind=rk), private, dimension(3):: gqysigma
real(kind=rk), private, dimension(3):: gqzsigma
real(kind=rk), private, dimension(3):: uxstar
real(kind=rk), private, dimension(3):: uystar
real(kind=rk), private, dimension(3):: uzstar
real(kind=rk), private, dimension(3):: m_sigma
real(kind=rk), private, dimension(3):: m_rsig
real(kind=rk), private, dimension(3):: m_inv
real(kind=rk), private :: r
real(kind=rk), private :: p
real(kind=rk), private :: mm
real(kind=rk), private :: usqr(3)
real(kind=rk), private :: ucx(6,3)
real(kind=rk), private :: theta
real(kind=rk), private, dimension(3,3):: A
real(kind=rk), private, dimension(3,3):: B
real(kind=rk), private, dimension(3,3):: chi
real(kind=rk), private :: zfac
real(kind=rk), private :: yfac
real(kind=rk), private :: a12_11
real(kind=rk), private :: a13_11
real(kind=rk), private :: a23fac
real(kind=rk), private :: a21_11
real(kind=rk), private :: a31_11
real(kind=rk), private :: zcoeff
real(kind=rk), private :: pdivr
real(kind=rk), private :: r1divr
real(kind=rk), private :: r2divr
real(kind=rk), private :: r3divr
real(kind=rk), private :: B_inv(3)
real(kind=rk), private :: r_inv
real(kind=rk), private :: a11_inv
real(kind=rk), private :: a22fac_inv
real(kind=rk), private :: chi12
real(kind=rk), private :: chi13
real(kind=rk), private :: chi21
real(kind=rk), private :: chi23
real(kind=rk), private :: chi31
real(kind=rk), private :: chi32
real(kind=rk), private, dimension(3):: lamfac_o
real(kind=rk), private, dimension(3):: lamrho
real(kind=rk), private, dimension(3):: lamrho_d
real(kind=rk), private, dimension(3):: lamrho_dm
real(kind=rk), private, dimension(3):: lamrho_o
real(kind=rk), private, dimension(3):: lamrho_om
real(kind=rk), private, dimension(3):: lambda
real(kind=rk), private, dimension(3):: lam_fac
real(kind=rk), private, dimension(3):: fac_1
real(kind=rk), private, dimension(3):: fac_2
real(kind=rk), private, dimension(3):: fac_3
real(kind=rk), private, dimension(3):: fac_4
real(kind=rk), private, dimension(3):: fac_5
real(kind=rk), private, dimension(3):: fac_6
real(kind=rk), private, dimension(3):: fac_7
real(kind=rk), private, dimension(3):: fac_8
real(kind=rk), private, dimension(3):: fac_9
real(kind=rk), private, dimension(3):: sum1_1
real(kind=rk), private, dimension(3):: sum2_1
real(kind=rk), private, dimension(3):: sum3_1
real(kind=rk), private, dimension(3):: sum4_1
real(kind=rk), private, dimension(3):: sum5_1
real(kind=rk), private, dimension(3):: sum6_1
real(kind=rk), private, dimension(3):: sum7_1
real(kind=rk), private, dimension(3):: sum8_1
real(kind=rk), private, dimension(3):: sum9_1
real(kind=rk), private, dimension(3):: sum1_2
real(kind=rk), private, dimension(3):: sum2_2
real(kind=rk), private, dimension(3):: sum3_2
real(kind=rk), private, dimension(3):: sum4_2
real(kind=rk), private, dimension(3):: sum5_2
real(kind=rk), private, dimension(3):: sum6_2
real(kind=rk), private, dimension(3):: sum7_2
real(kind=rk), private, dimension(3):: sum8_2
real(kind=rk), private, dimension(3):: sum9_2
real(kind=rk), private :: mbb(3,3)
integer, private :: dens_pos(3)
integer, private :: mom_pos(3,3)
integer, private :: elemOff