This module contains function to compute eddy viscosity for Smagorinsky les turbulence model. author: Kannan Masilamani
Calculate eddy viscosity with smagorinsky model for compressible model using gradient of velocity Reference paper: https://link.springer.com/content/pdf/10.1007/s10494-012-9405-0.pdf?pdf=button 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)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
Calculate eddy viscosity with smagorinsky model for compressible model using gradient of velocity for 2D layout
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
Calculate eddy viscosity with smagorinsky model for incompressible model using gradient of velocity
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
Calculate eddy viscosity with smagorinsky model for incompressible model using gradient of velocity for 2D layout
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
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.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
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.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
Calculate eddy viscosity with smagorinsky model for incompressible model using pre-collision PDF
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
Calculate eddy viscosity with smagorinsky model for incompressible model using pre-collision PDF
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |