bgk_advRel_d3q19f3_MSLiquid Subroutine

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

Optimized Advection relaxation routine for the MSLiquid 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 :: nScalars
integer, private :: iFld
type(mus_varSys_data_type), private, pointer:: fPtr
type(mus_scheme_type), private, pointer:: scheme
real(kind=rk), private, dimension(3):: rsigma
real(kind=rk), private, dimension(3):: uxsigma
real(kind=rk), private, dimension(3):: rsigmaInv
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):: molWeight
real(kind=rk), private, dimension(3):: molWeight_inv
real(kind=rk), private, dimension(3):: phi
real(kind=rk), private, dimension(3):: num_dens
real(kind=rk), private, dimension(3):: moleFrac
real(kind=rk), private :: usqr(3)
real(kind=rk), private :: totNum_dens_inv
real(kind=rk), private :: totMass_densInv
real(kind=rk), private :: velAvg(3)
real(kind=rk), private :: velQuadTerm_x(3)
real(kind=rk), private :: velQuadTerm_y(3)
real(kind=rk), private :: velQuadTerm_z(3)
real(kind=rk), private :: omega
real(kind=rk), private :: omegadiv2
real(kind=rk), private :: omega_fac
real(kind=rk), private :: omega_o
real(kind=rk), private, dimension(3,3):: A
real(kind=rk), private, dimension(3,3):: mbb
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 :: theta_eq
real(kind=rk), private :: theta_eq_spc
real(kind=rk), private :: paramB_inv
real(kind=rk), private :: a11_inv
real(kind=rk), private :: a22fac_inv
real(kind=rk), private :: B_12
real(kind=rk), private :: B_13
real(kind=rk), private :: B_23
real(kind=rk), private :: Bratio_12
real(kind=rk), private :: Bratio_13
real(kind=rk), private :: Bratio_23
real(kind=rk), private :: mbbEq_12
real(kind=rk), private :: mbbEq_13
real(kind=rk), private :: mbbEq_21
real(kind=rk), private :: mbbEq_23
real(kind=rk), private :: mbbEq_31
real(kind=rk), private :: mbbEq_32
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):: omegaRho
real(kind=rk), private, dimension(3):: omegaRho_d
real(kind=rk), private, dimension(3):: omegaRho_dm
real(kind=rk), private, dimension(3):: omegaRho_o
real(kind=rk), private, dimension(3):: omegaRho_om
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
integer, private :: dens_pos(3)
integer, private :: mom_pos(3,3)
integer, private :: elemOff