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 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_dynloadbal_module mus_dynLoadBal_module module~mus_program_module->module~mus_dynloadbal_module module~mus_dynloadbal_module->module~mus_flow_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

real(kind=rk), dimension(9,9),parameter :: MMtrD2Q9 = & reshape((/ & 1._rk, 1._rk, 1._rk, 1._rk, 1._rk, 1._rk, 1._rk, 1._rk, 1._rk,& ! -1._rk, -1._rk, -1._rk, -1._rk, 2._rk, 2._rk, 2._rk, 2._rk, -4._rk,& !mom2 -2._rk, -2._rk, -2._rk, -2._rk, 1._rk, 1._rk, 1._rk, 1._rk, 4._rk,& !mom3 -1._rk, 0._rk, 1._rk, 0._rk, -1._rk, -1._rk, 1._rk, 1._rk, 0._rk,& 2._rk, 0._rk, -2._rk, 0._rk, -1._rk, -1._rk, 1._rk, 1._rk, 0._rk,& !mom5 0._rk, -1._rk, 0._rk, 1._rk, -1._rk, 1._rk, -1._rk, 1._rk, 0._rk,& 0._rk, 2._rk, 0._rk, -2._rk, -1._rk, 1._rk, -1._rk, 1._rk, 0._rk,& !mom7 1._rk, -1._rk, 1._rk, -1._rk, 0._rk, 0._rk, 0._rk, 0._rk, 0._rk,& !mom8 0._rk, 0._rk, 0._rk, 0._rk, 1._rk, -1._rk, -1._rk, 1._rk, 0._rk & !mom9 /),(/9,9/))

real(kind=rk), dimension(9,9), parameter :: MMIvD2Q9 = & reshape((/ & ! 1 2 3 4 5 6 7 8 9 div1_9, -div1_36, -div1_18, -div1_6, div1_6, 0._rk, 0._rk, div1_4, 0._rk, & ! W div1_9, -div1_36, -div1_18, 0._rk, 0._rk, -div1_6, div1_6, -div1_4, 0._rk, & ! S div1_9, -div1_36, -div1_18, div1_6, -div1_6, 0._rk, 0._rk, div1_4, 0._rk, & ! E div1_9, -div1_36, -div1_18, 0._rk, 0._rk, div1_6, -div1_6, -div1_4, 0._rk, & ! N div1_9, div1_18, div1_36, -div1_6, -div1_12, -div1_6, -div1_12, 0._rk, div1_4, & ! SW div1_9, div1_18, div1_36, -div1_6, -div1_12, div1_6, div1_12, 0._rk, -div1_4, & ! NW div1_9, div1_18, div1_36, div1_6, div1_12, -div1_6, -div1_12, 0._rk, -div1_4, & ! SE div1_9, div1_18, div1_36, div1_6, div1_12, div1_6, div1_12, 0._rk, div1_4, & ! NE div1_9, -div1_9, div1_9, 0._rk, 0._rk, 0._rk, 0._rk, 0._rk, 0._rk & ! 0 /),(/9,9/), order=(/2,1/))


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