mus_d2q9_module Module

Routines and parameter definitions for the standard D2Q9 model


Uses

Used by

  • module~~mus_d2q9_module~~UsedByGraph module~mus_d2q9_module mus_d2q9_module module~mus_initfluid_module mus_initFluid_module module~mus_initfluid_module->module~mus_d2q9_module module~mus_initfluidincomp_module mus_initFluidIncomp_module module~mus_initfluidincomp_module->module~mus_d2q9_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 =9

Definition of the discrete velocity set

integer, private, parameter:: q00 =9
integer, private, parameter:: q__0 =9

Subroutines

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

Improved BGK model (with Galilean correction term) taken from Martin Geier cumulent paper 2015 Geier, M., Schönherr, M., Pasquali, A., & Krafczyk, M. (2015). The cumulant lattice Boltzmann equation in three dimensions : Theory and validation. Computers and Mathematics with Applications.

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_d2q9(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 subroutine mrt_advRel_d2q9(fieldProp, inState, outState, auxField, neigh, nElems, nSolve, level, layout, params, varSys, derVarPos)

Advection relaxation routine for the D2Q9 MRT model f( x+c, t+1 ) = f(x,t) - M^(-1)S( m - meq )

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 mrt_advRel_d2q9_incomp(fieldProp, inState, outState, auxField, neigh, nElems, nSolve, level, layout, params, varSys, derVarPos)

Advection relaxation routine for the D2Q9 MRT model f( x+c, t+1 ) = f(x,t) - M^(-1)S( m - meq )

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_d2q9_incomp(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_d2q9(weight, rho, u_x, u_y, feq, f1, a12xx, a12yy, a12xy)

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(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

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

Coefficients of f1: a12xx, a12yy, a12xy

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

Coefficients of f1: a12xx, a12yy, a12xy

public pure subroutine f_f_eq_regularized_4th_ord_d2q9(weight, rho, u_x, u_y, feq, f1, a12xx, a12yy, a12xy)

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(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

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

coefficients of f1: a12xx, a12yy, a12xy

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

coefficients of f1: a12xx, a12yy, a12xy

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

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_d2q9(fieldProp, inState, outState, auxField, neigh, nElems, nSolve, level, layout, params, varSys, derVarPos)

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_d2q9(fieldProp, inState, outState, auxField, neigh, nElems, nSolve, level, layout, params, varSys, derVarPos)

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_d2q9(fieldProp, inState, outState, auxField, neigh, nElems, nSolve, level, layout, params, varSys, derVarPos)

Hybrid recursive regularization relaxation routine for the BGK model. todo add paper todo add some more information if needed

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

Vurrent 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_d2q9(fieldProp, inState, outState, auxField, neigh, nElems, nSolve, level, layout, params, varSys, derVarPos)

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