mus_Smagorinsky_module Module

This module contains function to compute eddy viscosity for Smagorinsky les turbulence model. author: Kannan Masilamani


Uses

  • module~~mus_smagorinsky_module~~UsesGraph module~mus_smagorinsky_module mus_Smagorinsky_module module~env_module env_module module~mus_smagorinsky_module->module~env_module module~mus_graddata_module mus_gradData_module module~mus_smagorinsky_module->module~mus_graddata_module module~tem_param_module tem_param_module module~mus_smagorinsky_module->module~tem_param_module module~tem_compileconf_module tem_compileconf_module module~mus_smagorinsky_module->module~tem_compileconf_module module~mus_scheme_layout_module mus_scheme_layout_module module~mus_smagorinsky_module->module~mus_scheme_layout_module module~mus_derivedquantities_module2 mus_derivedQuantities_module2 module~mus_smagorinsky_module->module~mus_derivedquantities_module2 module~mus_turbulence_module mus_turbulence_module module~mus_smagorinsky_module->module~mus_turbulence_module module~mus_graddata_module->module~env_module module~mus_graddata_module->module~tem_param_module module~tem_aux_module tem_aux_module module~mus_graddata_module->module~tem_aux_module module~tem_debug_module tem_debug_module module~mus_graddata_module->module~tem_debug_module module~tem_stencil_module tem_stencil_module module~mus_graddata_module->module~tem_stencil_module module~tem_construction_module tem_construction_module module~mus_graddata_module->module~tem_construction_module module~tem_logging_module tem_logging_module module~mus_graddata_module->module~tem_logging_module module~mus_scheme_layout_module->module~env_module module~mus_scheme_layout_module->module~tem_param_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~mus_scheme_layout_module->module~tem_aux_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~mus_scheme_layout_module->module~tem_stencil_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_scheme_layout_module->module~tem_logging_module module~mus_derivedquantities_module2->module~env_module module~mus_derivedquantities_module2->module~tem_param_module module~mus_derivedquantities_module2->module~mus_scheme_layout_module module~mus_derivedquantities_module2->module~tem_aux_module module~tem_float_module tem_float_module module~mus_derivedquantities_module2->module~tem_float_module module~mus_derivedquantities_module2->module~tem_debug_module module~mus_derivedquantities_module2->module~tem_stencil_module module~mus_derivedquantities_module2->module~tem_logging_module module~mus_moments_module mus_moments_module module~mus_derivedquantities_module2->module~mus_moments_module module~mus_turbulence_module->module~env_module module~mus_turbulence_module->module~mus_graddata_module module~mus_turbulence_module->module~mus_scheme_layout_module module~mus_turbulence_module->module~tem_tools_module module~tem_comm_module tem_comm_module module~mus_turbulence_module->module~tem_comm_module module~mus_turbulence_module->module~aotus_module module~mus_turbulence_module->module~tem_aux_module module~mus_turbulence_module->module~aot_table_module module~mus_turbulence_module->module~tem_construction_module module~mus_turbulence_module->module~tem_logging_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 module~mus_moments_module->module~env_module module~mus_moments_module->module~mus_moments_type_module module~mus_moments_module->module~tem_aux_module module~mus_moments_module->module~tem_debug_module module~mus_moments_module->module~tem_logging_module module~mus_moments_module->module~tem_matrix_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~mus_scheme_header_module->module~env_module module~mus_scheme_header_module->module~tem_tools_module module~mus_scheme_header_module->module~aotus_module module~mus_scheme_header_module->module~tem_aux_module module~mus_scheme_header_module->module~aot_table_module module~mus_scheme_header_module->module~aot_out_module module~mus_scheme_header_module->module~tem_logging_module module~mus_mrtinit_module->module~env_module module~mus_mrtinit_module->module~tem_param_module

Used by

  • module~~mus_smagorinsky_module~~UsedByGraph module~mus_smagorinsky_module mus_Smagorinsky_module module~mus_turb_viscosity_module mus_turb_viscosity_module module~mus_turb_viscosity_module->module~mus_smagorinsky_module module~mus_fluid_module mus_fluid_module module~mus_fluid_module->module~mus_turb_viscosity_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_hvs_aux_module mus_hvs_aux_module module~mus_hvs_aux_module->module~mus_fluid_module module~mus_field_module mus_field_module module~mus_field_module->module~mus_fluid_module module~mus_dynloadbal_module mus_dynLoadBal_module module~mus_dynloadbal_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_interpolate_average_module mus_interpolate_average_module module~mus_interpolate_average_module->module~mus_fluid_module module~mus_aux_module mus_aux_module module~mus_aux_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_flow_module mus_flow_module module~mus_flow_module->module~mus_fluid_module

Contents


Subroutines

public subroutine mus_turbVisc_Smagorinsky_fromGradU3D(turbVisc, turbConfig, gradData, auxField, velPos, nSolve, nAuxScalars, dxL, dtL, Grad)

Calculate eddy viscosity with smagorinsky model for compressible model using gradient of velocity The formula is taken from https://caefn.com/openfoam/smagorinsky-sgs-model nu_t = C_k delta sqrt(k_sgs) k_sgs = ((-b+sqrt(b^2+4ac))/2a)^2 a = C_e/delta, b=2/3 tr(dev(Strain)), c = 2 C_k delta (dev(Strain):Strain)

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(out) :: turbVisc(:)

output: turbulent viscosity

type(mus_turbulence_config_type), intent(in) :: turbConfig

Contains turbulenct coefficients

type(mus_gradData_type), intent(in) :: gradData

gradient data

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

Auxiliary field variable array

integer, intent(in) :: velPos(3)

position of velocity components in auxField

integer, intent(in) :: nSolve

Number of element to solve in this level

integer, intent(in) :: nAuxScalars

number of scalars in auxField array

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

current level lattice element size

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

current level lattice time step size

type(mus_Grad_type), intent(in) :: Grad

Object that contains pointers to calculate gradients

public subroutine mus_turbVisc_Smagorinsky_fromGradU2D(turbVisc, turbConfig, gradData, auxField, velPos, nSolve, nAuxScalars, dxL, dtL, Grad)

Calculate eddy viscosity with smagorinsky model for compressible model using gradient of velocity for 2D layout

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(out) :: turbVisc(:)

output: turbulent viscosity

type(mus_turbulence_config_type), intent(in) :: turbConfig

Contains turbulenct coefficients

type(mus_gradData_type), intent(in) :: gradData

gradient data

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

Auxiliary field variable array

integer, intent(in) :: velPos(3)

position of velocity components in auxField

integer, intent(in) :: nSolve

Number of element to solve in this level

integer, intent(in) :: nAuxScalars

number of scalars in auxField array

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

current level lattice element size

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

current level lattice time step size

type(mus_Grad_type), intent(in) :: Grad

Object that contains pointers to calculate gradients

public subroutine mus_turbVisc_Smagorinsky_fromGradU3D_incomp(turbVisc, turbConfig, gradData, auxField, velPos, nSolve, nAuxScalars, dxL, dtL, Grad)

Calculate eddy viscosity with smagorinsky model for incompressible model using gradient of velocity

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(out) :: turbVisc(:)

output: turbulent viscosity

type(mus_turbulence_config_type), intent(in) :: turbConfig

Contains turbulenct coefficients

type(mus_gradData_type), intent(in) :: gradData

gradient data

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

Auxiliary field variable array

integer, intent(in) :: velPos(3)

position of velocity components in auxField

integer, intent(in) :: nSolve

Number of element to solve in this level

integer, intent(in) :: nAuxScalars

number of scalars in auxField array

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

current level lattice element size

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

current level lattice time step size

type(mus_Grad_type), intent(in) :: Grad

Object that contains pointers to calculate gradients

public subroutine mus_turbVisc_Smagorinsky_fromGradU2D_incomp(turbVisc, turbConfig, gradData, auxField, velPos, nSolve, nAuxScalars, dxL, dtL, Grad)

Calculate eddy viscosity with smagorinsky model for incompressible model using gradient of velocity for 2D layout

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(out) :: turbVisc(:)

output: turbulent viscosity

type(mus_turbulence_config_type), intent(in) :: turbConfig

Contains turbulenct coefficients

type(mus_gradData_type), intent(in) :: gradData

gradient data

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

Auxiliary field variable array

integer, intent(in) :: velPos(3)

position of velocity components in auxField

integer, intent(in) :: nSolve

Number of element to solve in this level

integer, intent(in) :: nAuxScalars

number of scalars in auxField array

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

current level lattice element size

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

current level lattice time step size

type(mus_Grad_type), intent(in) :: Grad

Object that contains pointers to calculate gradients

public subroutine mus_turbVisc_Smagorinsky_fromPreColPDF(turbVisc, turbConfig, state, neigh, auxField, densPos, velPos, nSize, nSolve, nScalars, nAuxScalars, layout, dxL, dtL, viscKine)

Calculate eddy viscosity with smagorinsky model for compressible model using pre-collision PDF. Schneider, A. (2015). A Consistent Large Eddy Approach for Lattice Boltzmann Methods and its Application to Complex Flows. Technical University Kaiserslautern.

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(out) :: turbVisc(:)

output: turbulent viscosity

type(mus_turbulence_config_type), intent(in) :: turbConfig

Contains turbulenct coefficients

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

state array

integer, intent(in) :: neigh(:)

neigh array to obtain precollision pdf

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

Auxiliary field variable array

integer, intent(in) :: densPos

position of density in auxField

integer, intent(in) :: velPos(3)

position of velocity components in auxField

integer, intent(in) :: nSize

number of elements in state array

integer, intent(in) :: nSolve

Number of element to solve in this level

integer, intent(in) :: nScalars

number of scalars in state array

integer, intent(in) :: nAuxScalars

number of scalars in auxField array

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

scheme layout

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

current level lattice element size

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

current level lattice time step size

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

Background kinematic viscosity in lattice divided by dtL

public subroutine mus_turbVisc_Smagorinsky_fromPreColPDF_incomp(turbVisc, turbConfig, state, neigh, auxField, densPos, velPos, nSize, nSolve, nScalars, nAuxScalars, layout, dxL, dtL, viscKine)

Calculate eddy viscosity with smagorinsky model for incompressible model using pre-collision PDF

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(out) :: turbVisc(:)

output: turbulent viscosity

type(mus_turbulence_config_type), intent(in) :: turbConfig

Contains turbulenct coefficients

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

state array

integer, intent(in) :: neigh(:)

neigh array to obtain precollision pdf

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

Auxiliary field variable array

integer, intent(in) :: densPos

position of density in auxField

integer, intent(in) :: velPos(3)

position of velocity components in auxField

integer, intent(in) :: nSize

number of elements in state array

integer, intent(in) :: nSolve

Number of element to solve in this level

integer, intent(in) :: nScalars

number of scalars in state array

integer, intent(in) :: nAuxScalars

number of scalars in auxField array

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

scheme layout

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

current level lattice element size

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

current level lattice time step size

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

Background kinematic viscosity in lattice divided by dtL