mus_derivedQuantities_module2 Module

This module provides functions for calculating macroscopic quantities


Uses

  • module~~mus_derivedquantities_module2~~UsesGraph module~mus_derivedquantities_module2 mus_derivedQuantities_module2 module~env_module env_module module~mus_derivedquantities_module2->module~env_module module~tem_aux_module tem_aux_module module~mus_derivedquantities_module2->module~tem_aux_module module~tem_param_module tem_param_module module~mus_derivedquantities_module2->module~tem_param_module module~tem_logging_module tem_logging_module module~mus_derivedquantities_module2->module~tem_logging_module module~tem_float_module tem_float_module module~mus_derivedquantities_module2->module~tem_float_module module~tem_debug_module tem_debug_module module~mus_derivedquantities_module2->module~tem_debug_module module~tem_stencil_module tem_stencil_module module~mus_derivedquantities_module2->module~tem_stencil_module module~mus_scheme_layout_module mus_scheme_layout_module module~mus_derivedquantities_module2->module~mus_scheme_layout_module module~mus_moments_module mus_moments_module module~mus_derivedquantities_module2->module~mus_moments_module module~mus_scheme_layout_module->module~env_module module~mus_scheme_layout_module->module~tem_aux_module module~mus_scheme_layout_module->module~tem_param_module module~mus_scheme_layout_module->module~tem_logging_module module~mus_scheme_layout_module->module~tem_stencil_module module~tem_tools_module tem_tools_module module~mus_scheme_layout_module->module~tem_tools_module module~mus_moments_type_module mus_moments_type_module module~mus_scheme_layout_module->module~mus_moments_type_module module~aotus_module aotus_module module~mus_scheme_layout_module->module~aotus_module module~aot_table_module aot_table_module module~mus_scheme_layout_module->module~aot_table_module module~aot_out_module aot_out_module module~mus_scheme_layout_module->module~aot_out_module module~tem_grow_array_module tem_grow_array_module module~mus_scheme_layout_module->module~tem_grow_array_module module~tem_dyn_array_module tem_dyn_array_module module~mus_scheme_layout_module->module~tem_dyn_array_module module~tem_comm_env_module tem_comm_env_module module~mus_scheme_layout_module->module~tem_comm_env_module mpi mpi module~mus_scheme_layout_module->mpi module~mus_moments_module->module~env_module module~mus_moments_module->module~tem_aux_module module~mus_moments_module->module~tem_logging_module module~mus_moments_module->module~tem_debug_module module~mus_moments_module->module~mus_moments_type_module module~mus_scheme_header_module mus_scheme_header_module module~mus_moments_module->module~mus_scheme_header_module module~mus_mrtinit_module mus_mrtInit_module module~mus_moments_module->module~mus_mrtinit_module module~tem_math_module tem_math_module module~mus_moments_module->module~tem_math_module module~tem_matrix_module tem_matrix_module module~mus_moments_module->module~tem_matrix_module module~mus_moments_type_module->module~env_module module~mus_moments_type_module->module~tem_matrix_module module~mus_scheme_header_module->module~env_module module~mus_scheme_header_module->module~tem_aux_module module~mus_scheme_header_module->module~tem_logging_module module~mus_scheme_header_module->module~tem_tools_module module~mus_scheme_header_module->module~aotus_module module~mus_scheme_header_module->module~aot_table_module module~mus_scheme_header_module->module~aot_out_module module~mus_mrtinit_module->module~env_module module~mus_mrtinit_module->module~tem_param_module

Used by

  • module~~mus_derivedquantities_module2~~UsedByGraph module~mus_derivedquantities_module2 mus_derivedQuantities_module2 module~mus_d3q27_module mus_d3q27_module module~mus_d3q27_module->module~mus_derivedquantities_module2 module~mus_d2q9_module mus_d2q9_module module~mus_d2q9_module->module~mus_derivedquantities_module2 module~mus_bc_fluid_noneqexpol_module mus_bc_fluid_nonEqExpol_module module~mus_bc_fluid_noneqexpol_module->module~mus_derivedquantities_module2 module~mus_ibm_module mus_IBM_module module~mus_ibm_module->module~mus_derivedquantities_module2 module~mus_d3q19_module mus_d3q19_module module~mus_d3q19_module->module~mus_derivedquantities_module2 module~mus_interpolate_linear_module mus_interpolate_linear_module module~mus_interpolate_linear_module->module~mus_derivedquantities_module2 module~mus_derquanps_module mus_derQuanPS_module module~mus_derquanps_module->module~mus_derivedquantities_module2 module~mus_derquan_module mus_derQuan_module module~mus_derquanps_module->module~mus_derquan_module module~mus_smagorinsky_module mus_Smagorinsky_module module~mus_smagorinsky_module->module~mus_derivedquantities_module2 module~mus_derquanincomp_module mus_derQuanIncomp_module module~mus_derquanincomp_module->module~mus_derivedquantities_module2 module~mus_derquanincomp_module->module~mus_derquan_module module~mus_derquanpoisson_module mus_derQuanPoisson_module module~mus_derquanpoisson_module->module~mus_derivedquantities_module2 module~mus_interpolate_average_module mus_interpolate_average_module module~mus_interpolate_average_module->module~mus_derivedquantities_module2 module~mus_derquan_module->module~mus_derivedquantities_module2 module~mus_interpolate_quadratic_module mus_interpolate_quadratic_module module~mus_interpolate_quadratic_module->module~mus_derivedquantities_module2 module~mus_derquanisothermaceq_module mus_derQuanIsothermAcEq_module module~mus_derquanisothermaceq_module->module~mus_derivedquantities_module2 module~mus_flow_module mus_flow_module module~mus_flow_module->module~mus_derivedquantities_module2 module~mus_bc_general_module mus_bc_general_module module~mus_bc_general_module->module~mus_bc_fluid_noneqexpol_module module~mus_geom_module mus_geom_module module~mus_geom_module->module~mus_ibm_module module~mus_initfluid_module mus_initFluid_module module~mus_initfluid_module->module~mus_d3q27_module module~mus_initfluid_module->module~mus_d2q9_module module~mus_initfluid_module->module~mus_d3q19_module module~mus_construction_module mus_construction_module module~mus_construction_module->module~mus_ibm_module module~mus_variable_module mus_variable_module module~mus_variable_module->module~mus_derquanps_module module~mus_variable_module->module~mus_derquanincomp_module module~mus_variable_module->module~mus_derquanpoisson_module module~mus_variable_module->module~mus_derquan_module module~mus_variable_module->module~mus_derquanisothermaceq_module module~mus_interpolate_module mus_interpolate_module module~mus_interpolate_module->module~mus_interpolate_linear_module module~mus_interpolate_module->module~mus_interpolate_average_module module~mus_interpolate_module->module~mus_interpolate_quadratic_module module~mus_turb_viscosity_module mus_turb_viscosity_module module~mus_turb_viscosity_module->module~mus_smagorinsky_module module~mus_control_module mus_control_module module~mus_control_module->module~mus_ibm_module module~mus_initfluidincomp_module mus_initFluidIncomp_module module~mus_initfluidincomp_module->module~mus_d3q27_module module~mus_initfluidincomp_module->module~mus_d2q9_module module~mus_initfluidincomp_module->module~mus_d3q19_module module~mus_dynloadbal_module mus_dynLoadBal_module module~mus_dynloadbal_module->module~mus_ibm_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_ibm_module module~mus_program_module->module~mus_flow_module module~mus_aux_module mus_aux_module module~mus_aux_module->module~mus_ibm_module module~mus_tools_module mus_tools_module module~mus_tools_module->module~mus_ibm_module

Contents


Interfaces

public interface getEquilibrium

  • private pure function getEquilibrium_forElemfromState(state, elem, layout, varPos, nScalars, neigh) result(equil)

    Calculate the equilibrium distribution function in all directions

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=rk), intent(in) :: state(:)
    integer, intent(in) :: elem
    type(mus_scheme_layout_type), intent(in) :: layout
    integer, intent(in) :: varPos(:)
    integer, intent(in) :: nScalars
    integer, intent(in) :: neigh(:)

    Return Value real(kind=rk)(layout%fStencil%QQ)

  • public pure function getEqByDensVel(dens, vel, layout) result(equil)

    Calculate the equilibrium distribution function in all directions

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=rk), intent(in) :: dens
    real(kind=rk), intent(in) :: vel(3)
    type(mus_scheme_layout_type), intent(in) :: layout

    Return Value real(kind=rk)(layout%fStencil%QQ)

  • private pure function getEquilibrium_forPdfSubset(subset, layout, varPos) result(equil)

    Calculate the equilibrium distribution function in all directions

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=rk), intent(in) :: subset(:)
    type(mus_scheme_layout_type), intent(in) :: layout
    integer, intent(in) :: varPos(:)

    Return Value real(kind=rk)(layout%fStencil%QQ)

public interface getDensity

  • private pure function getDensity_forElemFromState(state, elem, stencil, varPos, nScalars) result(res)

    Calculate the density of a given element number with the given state vector (sum up all values)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=rk), intent(in) :: state(:)
    integer, intent(in) :: elem
    type(tem_stencilHeader_type), intent(in) :: stencil
    integer, intent(in) :: varPos(:)
    integer, intent(in) :: nScalars

    Return Value real(kind=rk)

  • private pure function getDensity_forPdfSubset(subset, stencil, varPos) result(res)

    Calculate the density of a given subset of pdfs vector (sum up all values)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=rk), intent(in) :: subset(:)
    type(tem_stencilHeader_type), intent(in) :: stencil
    integer, intent(in) :: varPos(:)

    Return Value real(kind=rk)

public interface getVelocity

  • private pure function getVelocity_forElemFromState_noForce(state, elem, stencil, varPos, nScalars) result(vel)

    Calculate the velocity in all 3 directions from the element indicated (elem), reading the pdf (state information) from the state array. state array includes all the pdfs of all elements. The access to the state array has to be done via the generic access macro IDX, as we want to access post-collision values.

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=rk), intent(in) :: state(:)
    integer, intent(in) :: elem

    element index, for which to calc velocity

    type(tem_stencilHeader_type), intent(in) :: stencil
    integer, intent(in) :: varPos(:)
    integer, intent(in) :: nScalars

    Return Value real(kind=rk)(3)

  • private pure function getVelocity_forPdfSubset(subset, stencil, varPos) result(vel)

    Calculate the velocity in all 3 directions from a subset given, ordered according to the stencil

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=rk), intent(in) :: subset(:)
    type(tem_stencilHeader_type), intent(in) :: stencil
    integer, intent(in) :: varPos(:)

    Return Value real(kind=rk)(3)

public interface getVelocity_incomp

  • private pure function getVelocity_forPdfSubset_incomp(subset, stencil, varPos) result(vel)

    Calculate the velocity in all 3 directions from a subset given, ordered according to the stencil

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=rk), intent(in) :: subset(:)
    type(tem_stencilHeader_type), intent(in) :: stencil
    integer, intent(in) :: varPos(:)

    Return Value real(kind=rk)(3)


Functions

public pure function getEqByDensVel(dens, vel, layout) result(equil)

Calculate the equilibrium distribution function in all directions

Read more…

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: dens
real(kind=rk), intent(in) :: vel(3)
type(mus_scheme_layout_type), intent(in) :: layout

Return Value real(kind=rk)(layout%fStencil%QQ)

public pure function getShearRate(strain) result(shear)

Author
Jiaxing Qi

Calculate the Shear Rate

Read more…

Arguments

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

strain rate tensor: xx, yy, zz, xy, yz, zx

Return Value real(kind=rk)

public function getNEq_acoustic(layout, omega, Sxx) result(nEq)

Author
Jiaxing Qi

Setting the non-equilibrium part based on the acoustic scaling

Read more…

Arguments

TypeIntentOptionalAttributesName
type(mus_scheme_layout_type), intent(in) :: layout
real(kind=rk), intent(in) :: omega
real(kind=rk), intent(in) :: Sxx(3,3)

strain rate tensor

Return Value real(kind=rk)(layout%fStencil%QQ)

public function getNEq_diffusive(layout, omega, Sxx) result(nEq)

Author
Jiaxing Qi

Calculate the non-equilibrium part of pdf from strain rate tensor based on the diffusive scaling

Read more…

Arguments

TypeIntentOptionalAttributesName
type(mus_scheme_layout_type), intent(in) :: layout
real(kind=rk), intent(in) :: omega
real(kind=rk), intent(in) :: Sxx(3,3)

Strain rate tensor. It is a symmetric 3x3 matrix

Return Value real(kind=rk)(layout%fStencil%QQ)

public pure function convPrePost(omega) result(conv)

Author
Jiaxing Qi

Conversion factor betwen the pre- and post-collision quantity for the shear stress.

Read more…

Arguments

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

Return Value real(kind=rk)

public pure function getNonEqFac_intp(omegaS, omegaT) result(fac)

Calculate the conversion factor to convert nonEq moments between fine and coarser.

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: omegaS
real(kind=rk), intent(in) :: omegaT

Return Value real(kind=rk)

public pure function getNonEqFac_intp_coarse_to_fine(omegaC, omegaF) result(fac)

Calculate the conversion factor to convert nonEq pdfs from coarse to fine.

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: omegaC
real(kind=rk), intent(in) :: omegaF

Return Value real(kind=rk)

public pure function getNonEqFac_intp_fine_to_coarse(omegaC, omegaF) result(fac)

Calculate the conversion factor to convert nonEq pdfs from fine to coarse.

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: omegaC
real(kind=rk), intent(in) :: omegaF

Return Value real(kind=rk)

public pure function getEquilibriumIncomp(dens, vel, layout, rho0) result(equil)

Calculate the equilibrium distribution function in all directions This is the incompressible formulation with reference density rho0

Read more…

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: dens
real(kind=rk), intent(in) :: vel(3)
type(mus_scheme_layout_type), intent(in) :: layout
real(kind=rk), intent(in) :: rho0

Return Value real(kind=rk)(layout%fStencil%QQ)

public pure function second_order_moments_2D(f, layout) result(SOM)

Calculating second order moments 2D

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: f(layout%fStencil%QQ)

PDF

type(mus_scheme_layout_type), intent(in) :: layout

current layout

Return Value real(kind=rk)(3)

public pure function second_order_moments_3D(f, layout) result(SOM)

Calculating second order moments 3D

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: f(layout%fStencil%QQ)

PDF

type(mus_scheme_layout_type), intent(in) :: layout

current layout

Return Value real(kind=rk)(6)

public pure function secondMom(cxcx, f, QQ) result(m)

Calculate second moments of some quantity where Q is number of discrete velocity.\n The output is 1 dimentional array which has 6 componenents.\n Specifically, This function is used by shear stress and strain rate.

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: cxcx(6,QQ)
real(kind=rk), intent(in) :: f(QQ)

quantity to which second moment is applied

integer, intent(in) :: QQ

Return Value real(kind=rk)(6)

private pure function getDensity_forPdfSubset(subset, stencil, varPos) result(res)

Calculate the density of a given subset of pdfs vector (sum up all values)

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: subset(:)
type(tem_stencilHeader_type), intent(in) :: stencil
integer, intent(in) :: varPos(:)

Return Value real(kind=rk)

private pure function getDensity_forElemFromState(state, elem, stencil, varPos, nScalars) result(res)

Calculate the density of a given element number with the given state vector (sum up all values)

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: state(:)
integer, intent(in) :: elem
type(tem_stencilHeader_type), intent(in) :: stencil
integer, intent(in) :: varPos(:)
integer, intent(in) :: nScalars

Return Value real(kind=rk)

private pure function getVelocity_forPdfSubset(subset, stencil, varPos) result(vel)

Calculate the velocity in all 3 directions from a subset given, ordered according to the stencil

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: subset(:)
type(tem_stencilHeader_type), intent(in) :: stencil
integer, intent(in) :: varPos(:)

Return Value real(kind=rk)(3)

private pure function getVelocity_forPdfSubset_incomp(subset, stencil, varPos) result(vel)

Calculate the velocity in all 3 directions from a subset given, ordered according to the stencil

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: subset(:)
type(tem_stencilHeader_type), intent(in) :: stencil
integer, intent(in) :: varPos(:)

Return Value real(kind=rk)(3)

private pure function getVelocity_forElemFromState_noForce(state, elem, stencil, varPos, nScalars) result(vel)

Calculate the velocity in all 3 directions from the element indicated (elem), reading the pdf (state information) from the state array. state array includes all the pdfs of all elements. The access to the state array has to be done via the generic access macro IDX, as we want to access post-collision values.

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: state(:)
integer, intent(in) :: elem

element index, for which to calc velocity

type(tem_stencilHeader_type), intent(in) :: stencil
integer, intent(in) :: varPos(:)
integer, intent(in) :: nScalars

Return Value real(kind=rk)(3)

private pure function getEquilibrium_forPdfSubset(subset, layout, varPos) result(equil)

Calculate the equilibrium distribution function in all directions

Read more…

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: subset(:)
type(mus_scheme_layout_type), intent(in) :: layout
integer, intent(in) :: varPos(:)

Return Value real(kind=rk)(layout%fStencil%QQ)

private pure function getEquilibrium_forElemfromState(state, elem, layout, varPos, nScalars, neigh) result(equil)

Calculate the equilibrium distribution function in all directions

Read more…

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: state(:)
integer, intent(in) :: elem
type(mus_scheme_layout_type), intent(in) :: layout
integer, intent(in) :: varPos(:)
integer, intent(in) :: nScalars
integer, intent(in) :: neigh(:)

Return Value real(kind=rk)(layout%fStencil%QQ)


Subroutines

public subroutine getHermitepolynomials(nDims, QQ, layout, H_order)

This function computes Hermite polinomial. It gives in output minimum

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: nDims

number of physical dimensions

integer, intent(in) :: QQ

number of stencil streaming directions

type(mus_scheme_layout_type), intent(in) :: layout

current layout

integer, intent(in) :: H_order

maximum order of the Hermite polynomials

public subroutine getHermitepolynomials_D3Q19(layout)

This function computes Hermite polinomial. It gives in output minimum

Arguments

TypeIntentOptionalAttributesName
type(mus_scheme_layout_type), intent(in) :: layout

current layout