mus_mrtRelaxation_module Module

This module contains functions for MRT relaxation paramater for different stencil layouts. NOTE: The order of relaxation entries is consistent with moments transformation matrix used in compute kernel. author: Kannan Masilamani


Uses

  • module~~mus_mrtrelaxation_module~~UsesGraph module~mus_mrtrelaxation_module mus_mrtRelaxation_module module~mus_scheme_header_module mus_scheme_header_module module~mus_mrtrelaxation_module->module~mus_scheme_header_module module~mus_moments_type_module mus_moments_type_module module~mus_mrtrelaxation_module->module~mus_moments_type_module module~tem_float_module tem_float_module module~mus_mrtrelaxation_module->module~tem_float_module module~env_module env_module module~mus_mrtrelaxation_module->module~env_module module~tem_aux_module tem_aux_module module~mus_mrtrelaxation_module->module~tem_aux_module module~mus_scheme_header_module->module~env_module module~mus_scheme_header_module->module~tem_aux_module module~aot_table_module aot_table_module module~mus_scheme_header_module->module~aot_table_module module~aotus_module aotus_module module~mus_scheme_header_module->module~aotus_module module~tem_tools_module tem_tools_module module~mus_scheme_header_module->module~tem_tools_module module~tem_logging_module tem_logging_module module~mus_scheme_header_module->module~tem_logging_module module~aot_out_module aot_out_module module~mus_scheme_header_module->module~aot_out_module module~mus_moments_type_module->module~env_module module~tem_matrix_module tem_matrix_module module~mus_moments_type_module->module~tem_matrix_module

Used by

  • module~~mus_mrtrelaxation_module~~UsedByGraph module~mus_mrtrelaxation_module mus_mrtRelaxation_module module~mus_mrt_module mus_mrt_module module~mus_mrt_module->module~mus_mrtrelaxation_module module~mus_mrt_d3q27_module mus_mrt_d3q27_module module~mus_mrt_d3q27_module->module~mus_mrtrelaxation_module module~mus_fluid_module mus_fluid_module module~mus_fluid_module->module~mus_mrtrelaxation_module module~mus_d2q9_module mus_d2q9_module module~mus_d2q9_module->module~mus_mrtrelaxation_module module~mus_aux_module mus_aux_module module~mus_aux_module->module~mus_fluid_module module~mus_interpolate_d3q27_module mus_interpolate_d3q27_module module~mus_interpolate_d3q27_module->module~mus_fluid_module module~mus_interpolate_quadratic_module mus_interpolate_quadratic_module module~mus_interpolate_quadratic_module->module~mus_fluid_module module~mus_interpolate_d2q9_module mus_interpolate_d2q9_module module~mus_interpolate_d2q9_module->module~mus_fluid_module module~mus_interpolate_average_module mus_interpolate_average_module module~mus_interpolate_average_module->module~mus_fluid_module module~mus_field_module mus_field_module module~mus_field_module->module~mus_fluid_module module~mus_interpolate_compact_module mus_interpolate_compact_module module~mus_interpolate_compact_module->module~mus_fluid_module module~mus_interpolate_debug_module mus_interpolate_debug_module module~mus_interpolate_debug_module->module~mus_fluid_module module~mus_dynloadbal_module mus_dynLoadBal_module module~mus_dynloadbal_module->module~mus_fluid_module module~mus_initfluid_module mus_initFluid_module module~mus_initfluid_module->module~mus_mrt_module module~mus_initfluid_module->module~mus_mrt_d3q27_module module~mus_initfluid_module->module~mus_d2q9_module module~mus_interpolate_d3q19_module mus_interpolate_d3q19_module module~mus_interpolate_d3q19_module->module~mus_fluid_module module~mus_flow_module mus_flow_module module~mus_flow_module->module~mus_fluid_module module~mus_hvs_aux_module mus_hvs_aux_module module~mus_hvs_aux_module->module~mus_fluid_module module~mus_field_prop_module mus_field_prop_module module~mus_field_prop_module->module~mus_fluid_module module~mus_interpolate_linear_module mus_interpolate_linear_module module~mus_interpolate_linear_module->module~mus_fluid_module module~mus_initfluidincomp_module mus_initFluidIncomp_module module~mus_initfluidincomp_module->module~mus_mrt_module module~mus_initfluidincomp_module->module~mus_mrt_d3q27_module module~mus_initfluidincomp_module->module~mus_d2q9_module

Contents


Abstract Interfaces

abstract interface

  • public pure function mus_proc_mrt(omegaKine, omegaBulk, QQ) result(s_mrt)

    function pointers to obtain relaxation matrix for MRT collision operator

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=rk), intent(in) :: omegaKine

    omega related to kinematic viscosity

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

    omega related to bulk viscosity for compressible model

    integer, intent(in) :: QQ

    number of directions

    Return Value real(kind=rk)(QQ)

    output: MRT diagonal relaxation parameter

abstract interface

  • public pure function mus_proc_intp_nonEqScalingFacs(omegaKine_SRC, omegaKine_TGT, omegaBulk_SRC, omegaBulk_TGT, scaleFac, QQ) result(nonEqScalingFacs)

    function pointers to obtain nonEquilibrim scaling factor to convert nonEquilibrium in interpolation routines.

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=rk), intent(in) :: omegaKine_SRC

    source kinematic viscosity omega

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

    target kinemaitc viscosity omega

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

    source bulk viscosity omega

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

    target bulk viscosity omega

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

    factor for omega and non-conserved moments

    integer, intent(in) :: QQ

    number of stencil directions

    Return Value real(kind=rk)(QQ)

    output: nonequilibrium scaling facs


Functions

public pure function mus_intp_getNonEqScalingFacs(schemeHeader, viscOmegaSRC, viscOmegaTGT, bulkOmegaSRC, bulkOmegaTGT, scaleFac, QQ) result(nonEqScalingFacs)

This function returns scaling factor for nonequilibrium moments for transformation from coarser to finer elements and vice versa. To get scaling factor to convert fine to coarse, scaleFac = 2.0 and to convert coarse to fine, scaleFac = 0.5. The order of return fac must be consistent with transformation matrix used in compute kernels

Arguments

TypeIntentOptionalAttributesName
type(mus_scheme_header_type), intent(in) :: schemeHeader
real(kind=rk), intent(in) :: viscOmegaSRC

source viscosity omega

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

target viscosity omega

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

source bulk viscosity omega

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

target bulk viscosity omega

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

factor for omega and non-conserved moments

integer, intent(in) :: QQ

number of stencil directions

Return Value real(kind=rk)(QQ)

public pure function mrt_d2q9(omegaKine, omegaBulk, QQ) result(s_mrt)

This function returns mrt relaxation diagonal matrix for d2q9 layout Parameters are taken from: Lallemand, P., & Luo, L. (2000). Theory of the lattice boltzmann method: dispersion, dissipation, isotropy, galilean invariance, and stability. Physical Review. E, Statistical Physics, Plasmas, Fluids, and Related Interdisciplinary Topics, 61(6 Pt A), 6546–62.

Read more…

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: omegaKine

omega related to kinematic viscosity

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

omega related to bulk viscosity

integer, intent(in) :: QQ

number of directions

Return Value real(kind=rk)(QQ)

output mrt diagonal matrix

public pure function mrt_d3q19(omegaKine, omegaBulk, QQ) result(s_mrt)

This function returns mrt relaxation diagonal matrix for d3q19 layout Parameters are taken from: D’Humières, D., Ginzburg, I., Krafczyk, M., Lallemand, P., & Luo, L.-S. (2002). Multiple-relaxation-time lattice Boltzmann models in three dimensions. Philosophical Transactions. Series A, Mathematical, Physical, and Engineering Sciences, 360(1792), 437–51.

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: omegaKine

omega related to kinematic viscosity

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

omega related to bulk viscosity

integer, intent(in) :: QQ

number of directions

Return Value real(kind=rk)(QQ)

output mrt diagonal matrix

public pure function mrt_d3q27(omegaKine, omegaBulk, QQ) result(s_mrt)

This function returns mrt relaxation diagonal matrix for d3q27 layout

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: omegaKine

omega related to kinematic viscosity

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

omega related to bulk viscosity

integer, intent(in) :: QQ

number of directions

Return Value real(kind=rk)(QQ)

output mrt diagonal matrix

private pure function mrt_d3q15(omegaKine, omegaBulk, QQ) result(s_mrt)

This function returns mrt relaxation diagonal matrix for d3q15 layout Parameters are taken from: D’Humières, D., Ginzburg, I., Krafczyk, M., Lallemand, P., & Luo, L.-S. (2002). Multiple-relaxation-time lattice Boltzmann models in three dimensions. Philosophical Transactions. Series A, Mathematical, Physical, and Engineering Sciences, 360(1792), 437–51.

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: omegaKine

omega related to kinematic viscosity

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

omega related to bulk viscosity

integer, intent(in) :: QQ

number of directions

Return Value real(kind=rk)(QQ)

output mrt diagonal matrix

private pure function mrt_bgk(omegaKine, omegaBulk, QQ) result(s_mrt)

set all relaxation parameter to same omega, results in bgk collision

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: omegaKine

omega related to kinematic viscosity

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

omega related to bulk viscosity

integer, intent(in) :: QQ

number of directions

Return Value real(kind=rk)(QQ)

output mrt diagonal matrix

private pure function nonEqScalingFacs_d2q9(omegaKine_SRC, omegaKine_TGT, omegaBulk_SRC, omegaBulk_TGT, scaleFac, QQ) result(nonEqScalingFacs)

This function returns nonequilibrium scaling factor for d2q9 layout

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: omegaKine_SRC

source viscosity omega

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

target viscosity omega

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

source bulk viscosity omega

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

target bulk viscosity omega

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

factor for omega and non-conserved moments

integer, intent(in) :: QQ

number of stencil directions

Return Value real(kind=rk)(QQ)

output: nonequilibrium scaling facs

private pure function nonEqScalingFacs_d3q15(omegaKine_SRC, omegaKine_TGT, omegaBulk_SRC, omegaBulk_TGT, scaleFac, QQ) result(nonEqScalingFacs)

This function returns nonequilibrium scaling factor for d3q15 layout

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: omegaKine_SRC

source viscosity omega

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

target viscosity omega

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

source bulk viscosity omega

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

target bulk viscosity omega

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

factor for omega and non-conserved moments

integer, intent(in) :: QQ

number of stencil directions

Return Value real(kind=rk)(QQ)

output: nonequilibrium scaling facs

private pure function nonEqScalingFacs_d3q19(omegaKine_SRC, omegaKine_TGT, omegaBulk_SRC, omegaBulk_TGT, scaleFac, QQ) result(nonEqScalingFacs)

This function returns nonequilibrium scaling factor for d3q19 layout

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: omegaKine_SRC

source viscosity omega

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

target viscosity omega

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

source bulk viscosity omega

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

target bulk viscosity omega

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

factor for omega and non-conserved moments

integer, intent(in) :: QQ

number of stencil directions

Return Value real(kind=rk)(QQ)

output: nonequilibrium scaling facs

private pure function nonEqScalingFacs_d3q27(omegaKine_SRC, omegaKine_TGT, omegaBulk_SRC, omegaBulk_TGT, scaleFac, QQ) result(nonEqScalingFacs)

This function returns nonequilibrium scaling factor for d3q27 layout

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: omegaKine_SRC

source viscosity omega

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

target viscosity omega

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

source bulk viscosity omega

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

target bulk viscosity omega

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

factor for omega and non-conserved moments

integer, intent(in) :: QQ

number of stencil directions

Return Value real(kind=rk)(QQ)

output: nonequilibrium scaling facs

private pure function nonEqScalingFacs_bgk_d2q9(omegaKine_SRC, omegaKine_TGT, omegaBulk_SRC, omegaBulk_TGT, scaleFac, QQ) result(nonEqScalingFacs)

This function returns nonequilibrium scaling factor for bgk model

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: omegaKine_SRC

source viscosity omega

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

target viscosity omega

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

source bulk viscosity omega

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

target bulk viscosity omega

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

factor for omega and non-conserved moments

integer, intent(in) :: QQ

number of stencil directions

Return Value real(kind=rk)(QQ)

output: nonequilibrium scaling facs

private pure function nonEqScalingFacs_bgk_d3q19(omegaKine_SRC, omegaKine_TGT, omegaBulk_SRC, omegaBulk_TGT, scaleFac, QQ) result(nonEqScalingFacs)

This function returns nonequilibrium scaling factor for bgk model

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: omegaKine_SRC

source viscosity omega

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

target viscosity omega

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

source bulk viscosity omega

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

target bulk viscosity omega

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

factor for omega and non-conserved moments

integer, intent(in) :: QQ

number of stencil directions

Return Value real(kind=rk)(QQ)

output: nonequilibrium scaling facs

private pure function nonEqScalingFacs_bgk_d3q27(omegaKine_SRC, omegaKine_TGT, omegaBulk_SRC, omegaBulk_TGT, scaleFac, QQ) result(nonEqScalingFacs)

This function returns nonequilibrium scaling factor for bgk model

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: omegaKine_SRC

source viscosity omega

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

target viscosity omega

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

source bulk viscosity omega

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

target bulk viscosity omega

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

factor for omega and non-conserved moments

integer, intent(in) :: QQ

number of stencil directions

Return Value real(kind=rk)(QQ)

output: nonequilibrium scaling facs


Subroutines

public subroutine mus_assign_mrt_ptr(mrtPtr, schemeHeader)

This function returns mrt function pointer according to scheme definition. In Jonas Toelke paper (2006) about MRT, the following notions are used:\n s(a) = s(2) s(b) = s(3) s(c) = s(5) = s(7) = s(9) s(d) = s(11) = s(13 s(e) = s(17) = s(18) = s(19) s(w) = s(10) = s(12) = s(14) = s(15) = s(16) It is suggested that, for D3Q19, s(a) = s(b) = s(c) = s(d) = s(e) = max( s(w), -1.0 ) Notice that the collision matrix S used in this papar corresponds to -omega in BGK model, because it express the LB equation is slightly different way.

Arguments

TypeIntentOptionalAttributesName
procedure(mus_proc_mrt), pointer:: mrtPtr

mrt function pointer

type(mus_scheme_header_type), intent(in) :: schemeHeader

Scheme header information

public subroutine mus_assign_intp_nonEqScalingFacs_ptr(nEqScalFacPtr, schemeHeader)

This function returns function pointer of nonEquilibrium scaling for interpolation according to scheme definition

Arguments

TypeIntentOptionalAttributesName
procedure(mus_proc_intp_nonEqScalingFacs), pointer:: nEqScalFacPtr

mrt function pointer

type(mus_scheme_header_type), intent(in) :: schemeHeader

Scheme header information