trt_advRel_d3q19 Subroutine

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

Advection relaxation routine for the D3Q19 model with TRT collision operator In TRT, there are two relaxation parameters one can choose. They have a relationship, which is so-called magic number: Lambda = ( 1/omegaP - 1/2 ) * ( 1/omegaN - 1/2 ) Different value of Lambda results different error: Lambda = 1/4 is the best stability for the LBE. As well, this number gives the solution for the steady-state case dependant only on the equilibirium funciton. Lambda = 1/12 removes the third-order advection error Lambda = 1/6 removes fourth-order diffusion errors Lambda = 3/16 gives exact location of bounce-back walls for the Poiseuille flow. omegaP is usually fixed by viscosity, another one is fixed through the above magic number combination.

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
integer, private :: iElem
real(kind=rk), private :: fN00
real(kind=rk), private :: f0N0
real(kind=rk), private :: f00N
real(kind=rk), private :: f100
real(kind=rk), private :: f010
real(kind=rk), private :: f001
real(kind=rk), private :: f0NN
real(kind=rk), private :: f0N1
real(kind=rk), private :: f01N
real(kind=rk), private :: f011
real(kind=rk), private :: fN0N
real(kind=rk), private :: f10N
real(kind=rk), private :: fN01
real(kind=rk), private :: f101
real(kind=rk), private :: fNN0
real(kind=rk), private :: fN10
real(kind=rk), private :: f1N0
real(kind=rk), private :: f110
real(kind=rk), private :: f000
real(kind=rk), private :: rho
real(kind=rk), private :: u_x
real(kind=rk), private :: u_y
real(kind=rk), private :: u_z
real(kind=rk), private :: usq
real(kind=rk), private :: omega
real(kind=rk), private :: omega_h
real(kind=rk), private :: asym_omega
real(kind=rk), private :: asym_omega_h
real(kind=rk), private :: ui
real(kind=rk), private :: asym
real(kind=rk), private :: sym
real(kind=rk), private :: feq_common
real(kind=rk), private :: t1x2
real(kind=rk), private :: t2x2
real(kind=rk), private :: fac1
real(kind=rk), private :: fac2
real(kind=rk), private, parameter:: t1x2_0 =1._rk/18._rk*2._rk
real(kind=rk), private, parameter:: t2x2_0 =1._rk/36._rk*2._rk
integer, private :: dens_pos
integer, private :: vel_pos(3)
integer, private :: elemOff