mus_d3q27_module Module

Routines and parameter definitions for the standard D3Q27 model


Uses

Used by

  • module~~mus_d3q27_module~~UsedByGraph module~mus_d3q27_module mus_d3q27_module module~mus_initfluid_module mus_initFluid_module module~mus_initfluid_module->module~mus_d3q27_module module~mus_initfluidincomp_module mus_initFluidIncomp_module module~mus_initfluidincomp_module->module~mus_d3q27_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 =27
integer, private, parameter:: q000 =27

Functions

public pure function feq_d3q27(i, j, k, rho, u, v, w) result(eq)

D3Q27 equilibirium definition in product form. Given in paper: The cumulant lattice Boltzmann equation in three dimensions: Theory and validation, Martin Geier .et al, Computers and Mathematics with Applicaitons, 2015.

Read more…

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: i

i, j, k are direction index, taking the value of -1, 0, 1

integer, intent(in) :: j

i, j, k are direction index, taking the value of -1, 0, 1

integer, intent(in) :: k

i, j, k are direction index, taking the value of -1, 0, 1

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

density and velocity

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

density and velocity

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

density and velocity

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

density and velocity

Return Value real(kind=rk)

equilibirium density

public pure function central_moment_split(f, a, b, g, ux, uy, uz) result(kappa)

Calculating central moment by spliting among directions. This follows equations 43, 44, 45 in cumulent paper (Geier .et al 2015) We first do x direction for better performance.

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: f(-1:1,-1:1,-1:1)

PDF

integer, intent(in) :: a

order of central moments

integer, intent(in) :: b

order of central moments

integer, intent(in) :: g

order of central moments

real(kind=rk), intent(in) :: ux
real(kind=rk), intent(in) :: uy
real(kind=rk), intent(in) :: uz

Return Value real(kind=rk)

public pure function central_moment(f, a, b, g, ux, uy, uz) result(kappa)

Calculating central moment. This follows equations 21 in cumulent paper ( Geier .et al 2015 )

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: f(-1:1,-1:1,-1:1)

PDF

integer, intent(in) :: a

order of central moments

integer, intent(in) :: b

order of central moments

integer, intent(in) :: g

order of central moments

real(kind=rk), intent(in) :: ux
real(kind=rk), intent(in) :: uy
real(kind=rk), intent(in) :: uz

Return Value real(kind=rk)

public pure function cm_to_pdf(k, ux, uy, uz) result(f)

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: k(0:2,0:2,0:2)
real(kind=rk), intent(in) :: ux
real(kind=rk), intent(in) :: uy
real(kind=rk), intent(in) :: uz

Return Value real(kind=rk)(-1:1,-1:1,-1:1)


Subroutines

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

Advection relaxation routine for the D3Q27 model with BGK with standard equilibrium function

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

Advection relaxation routine for the D3Q27 model with BGK with standard equilibrium function for incompressible 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 cumulant_d3q27(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 cascaded_d3q27(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 trt_advRel_d3q27(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