mus_d3q19_module Module

Routines and parameter definitions for the standard D3Q19 model


Uses

Used by

  • module~~mus_d3q19_module~~UsedByGraph module~mus_d3q19_module mus_d3q19_module module~mus_initfluid_module mus_initFluid_module module~mus_initfluid_module->module~mus_d3q19_module module~mus_initfluidincomp_module mus_initFluidIncomp_module module~mus_initfluidincomp_module->module~mus_d3q19_module module~mus_flow_module mus_flow_module module~mus_flow_module->module~mus_initfluid_module module~mus_flow_module->module~mus_initfluidincomp_module module~mus_dynloadbal_module mus_dynLoadBal_module module~mus_dynloadbal_module->module~mus_flow_module program~mus_harvesting mus_harvesting program~mus_harvesting->module~mus_flow_module module~mus_program_module mus_program_module module~mus_program_module->module~mus_flow_module module~mus_program_module->module~mus_dynloadbal_module program~musubi musubi program~musubi->module~mus_program_module

Contents


Variables

TypeVisibilityAttributesNameInitial
integer, private, parameter:: QQ =19

Definition of the discrete velocity set

integer, private, parameter:: q000 =19

Subroutines

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

Advection relaxation routine for the D3Q19 model with BGK.

Read more…

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

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

Advection relaxation routine for the D3Q19 model with BGK for incompressible lbm model

Read more…

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

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.

Read more…

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

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

Advection relaxation routine for the D3Q19 model with TRT collision operator.

Read more…

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

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

No comment yet!

Read more…

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

public pure subroutine f_f_eq_regularized_2nd_ord_d3q19(weight, rho, u_x, u_y, u_z, feq, f1, a12xx, a12yy, a12zz, a12xy, a12xz, a12yz)

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: weight(QQ)

weights of the stencil

real(kind=rk), intent(in) :: rho

density, velocity components

real(kind=rk), intent(in) :: u_x
real(kind=rk), intent(in) :: u_y
real(kind=rk), intent(in) :: u_z
real(kind=rk), intent(out) :: feq(QQ)

equilibrium pdf and full pdf

real(kind=rk), intent(out) :: f1(QQ)
real(kind=rk), intent(in) :: a12xx

coefficients of f1: a12xx, a12yy, a12xy, etc ...

real(kind=rk), intent(in) :: a12yy

coefficients of f1: a12xx, a12yy, a12xy, etc ...

real(kind=rk), intent(in) :: a12zz

coefficients of f1: a12xx, a12yy, a12xy, etc ...

real(kind=rk), intent(in) :: a12xy

coefficients of f1: a12xx, a12yy, a12xy, etc ...

real(kind=rk), intent(in) :: a12xz

coefficients of f1: a12xx, a12yy, a12xy, etc ...

real(kind=rk), intent(in) :: a12yz

coefficients of f1: a12xx, a12yy, a12xy, etc ...

public pure subroutine f_f_eq_regularized_4th_ord_d3q19(weight, rho, u_x, u_y, u_z, feq, f1, a12xx, a12yy, a12zz, a12xy, a12xz, a12yz)

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: weight(QQ)

weights of the stencil

real(kind=rk), intent(in) :: rho

density, velocity components

real(kind=rk), intent(in) :: u_x
real(kind=rk), intent(in) :: u_y
real(kind=rk), intent(in) :: u_z
real(kind=rk), intent(out) :: feq(QQ)

equilibrium pdf and full pdf

real(kind=rk), intent(out) :: f1(QQ)
real(kind=rk), intent(in) :: a12xx

coefficients of f1: a12xx, a12yy, a12xy, etc ...

real(kind=rk), intent(in) :: a12yy

coefficients of f1: a12xx, a12yy, a12xy, etc ...

real(kind=rk), intent(in) :: a12zz

coefficients of f1: a12xx, a12yy, a12xy, etc ...

real(kind=rk), intent(in) :: a12xy

coefficients of f1: a12xx, a12yy, a12xy, etc ...

real(kind=rk), intent(in) :: a12xz

coefficients of f1: a12xx, a12yy, a12xy, etc ...

real(kind=rk), intent(in) :: a12yz

coefficients of f1: a12xx, a12yy, a12xy, etc ...

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

Regularized relaxation routine for the D3Q19 and 27 model with BGK. 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. works for both d3q19 and d3q27

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

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

Recursive Regularized relaxation routine for the D3Q19 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. works for both d3q19 and d3q27

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

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

Projected Recursive Regularized relaxation routine for the D3Q19 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. works for both d3q19 and d3q27

Read more…

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

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

Projected Recursive Regularized relaxation routine for the D3Q19 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. works for both d3q19 and d3q27

Read more…

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

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

Recursive Regularized relaxation routine for the D3Q19 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. works for both d3q19 and d3q27

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

private pure subroutine f_f_eq_regularized_4th_ord_d3q19_corr(weight, rho, u_x, u_y, u_z, feq, f1, a12xx, a12yy, a12zz, a12xy, a12xz, a12yz)

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: weight(QQ)

weights of the stencil

real(kind=rk), intent(in) :: rho

density, velocity components

real(kind=rk), intent(in) :: u_x
real(kind=rk), intent(in) :: u_y
real(kind=rk), intent(in) :: u_z
real(kind=rk), intent(out) :: feq(QQ)

equilibrium pdf and full pdf

real(kind=rk), intent(out) :: f1(QQ)
real(kind=rk), intent(in) :: a12xx

coefficients of f1: a12xx, a12yy, a12xy, etc ...

real(kind=rk), intent(in) :: a12yy

coefficients of f1: a12xx, a12yy, a12xy, etc ...

real(kind=rk), intent(in) :: a12zz

coefficients of f1: a12xx, a12yy, a12xy, etc ...

real(kind=rk), intent(in) :: a12xy

coefficients of f1: a12xx, a12yy, a12xy, etc ...

real(kind=rk), intent(in) :: a12xz

coefficients of f1: a12xx, a12yy, a12xy, etc ...

real(kind=rk), intent(in) :: a12yz

coefficients of f1: a12xx, a12yy, a12xy, etc ...