This module provides functions for calculating macroscopic quantities
Calculate the equilibrium distribution function in all directions
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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(:) |
Calculate the equilibrium distribution function in all directions
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | dens | |||
real(kind=rk), | intent(in) | :: | vel(3) | |||
type(mus_scheme_layout_type), | intent(in) | :: | layout |
Calculate the equilibrium distribution function in all directions
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | subset(:) | |||
type(mus_scheme_layout_type), | intent(in) | :: | layout | |||
integer, | intent(in) | :: | varPos(:) |
Calculate the density of a given element number with the given state vector (sum up all values)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
Calculate the density of a given subset of pdfs vector (sum up all values)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | subset(:) | |||
type(tem_stencilHeader_type), | intent(in) | :: | stencil | |||
integer, | intent(in) | :: | varPos(:) |
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.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
Calculate the velocity in all 3 directions from a subset given, ordered according to the stencil
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | subset(:) | |||
type(tem_stencilHeader_type), | intent(in) | :: | stencil | |||
integer, | intent(in) | :: | varPos(:) |
Calculate the velocity in all 3 directions from a subset given, ordered according to the stencil
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | subset(:) | |||
type(tem_stencilHeader_type), | intent(in) | :: | stencil | |||
integer, | intent(in) | :: | varPos(:) |
Calculate the equilibrium distribution function in all directions
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | dens | |||
real(kind=rk), | intent(in) | :: | vel(3) | |||
type(mus_scheme_layout_type), | intent(in) | :: | layout |
Calculate the Shear Rate
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | strain(:) | strain rate tensor: xx, yy, zz, xy, yz, zx |
Setting the non-equilibrium part based on the acoustic scaling
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
Calculate the non-equilibrium part of pdf from strain rate tensor based on the diffusive scaling
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
Conversion factor betwen the pre- and post-collision quantity for the shear stress.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | omega |
Calculate the conversion factor to convert nonEq moments between fine and coarser.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | omegaS | |||
real(kind=rk), | intent(in) | :: | omegaT |
Calculate the conversion factor to convert nonEq pdfs from coarse to fine.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | omegaC | |||
real(kind=rk), | intent(in) | :: | omegaF |
Calculate the conversion factor to convert nonEq pdfs from fine to coarse.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | omegaC | |||
real(kind=rk), | intent(in) | :: | omegaF |
Calculate the equilibrium distribution function in all directions This is the incompressible formulation with reference density rho0
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
Calculating second order moments 2D
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | f(layout%fStencil%QQ) | |||
type(mus_scheme_layout_type), | intent(in) | :: | layout | current layout |
Calculating second order moments 3D
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | f(layout%fStencil%QQ) | |||
type(mus_scheme_layout_type), | intent(in) | :: | layout | current layout |
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.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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) | :: |
Calculate the density of a given subset of pdfs vector (sum up all values)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | subset(:) | |||
type(tem_stencilHeader_type), | intent(in) | :: | stencil | |||
integer, | intent(in) | :: | varPos(:) |
Calculate the density of a given element number with the given state vector (sum up all values)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
Calculate the velocity in all 3 directions from a subset given, ordered according to the stencil
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | subset(:) | |||
type(tem_stencilHeader_type), | intent(in) | :: | stencil | |||
integer, | intent(in) | :: | varPos(:) |
Calculate the velocity in all 3 directions from a subset given, ordered according to the stencil
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | subset(:) | |||
type(tem_stencilHeader_type), | intent(in) | :: | stencil | |||
integer, | intent(in) | :: | varPos(:) |
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.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
Calculate the equilibrium distribution function in all directions
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | subset(:) | |||
type(mus_scheme_layout_type), | intent(in) | :: | layout | |||
integer, | intent(in) | :: | varPos(:) |
Calculate the equilibrium distribution function in all directions
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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(:) |
This function computes Hermite polinomial. It gives in output minimum
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nDims | number of physical dimensions |
||
integer, | intent(in) | :: | 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 |
This function computes Hermite polinomial. It gives in output minimum
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_scheme_layout_type), | intent(in) | :: | layout | current layout |