This module contains turbulent wall function type and routines to calculate friction velocity and stream-wise velocity component.
Constant parameters for Implicit equation solver
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | private, | parameter | :: | imEq_nIter | = | 1000 | |
real(kind=rk), | private, | parameter | :: | imEq_tol | = | 1e-10 |
Interface definition for the turbulent wall bc routines
This routine computes friction velocity from wall model profile using Newton iteration method
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | velTau_initialGuess |
Friction velocity computed from previsous time step |
||
real(kind=rk), | intent(in) | :: | velSW |
Stream-wise velocity component from which friction velocity is computed |
||
real(kind=rk), | intent(in) | :: | y |
vertical distance from the wall |
||
real(kind=rk), | intent(in) | :: | nu |
dynamic viscosity |
||
class(mus_wall_function_type), | intent(in) | :: | wall_function |
Number of elements in input and output arrays |
Friction velocity computed in this routine
Interface definition for the turbulent wall bc routines
This abstract interface defines the interface to calculate turbulent wall friction velocity from given velocity and distance to boundary. All inputs and output are in lattice units.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mus_turb_wallFunc_type), | intent(in) | :: | this |
Turbulent wall model to use for the computation |
||
real(kind=rk), | intent(inout) | :: | velTau(:) |
Friction velocity computed from wall model. it is inout to provide velTau from previous timestep as initial velTau for fixed-point or Newton iteration solver |
||
real(kind=rk), | intent(in) | :: | velSW(:) |
Stream-wise velocity component from which friction velocity is computed |
||
real(kind=rk), | intent(in) | :: | distToBnd(:) |
Distance to the boundary in the discrete normal direction |
||
real(kind=rk), | intent(in) | :: | viscKine(:) |
Kinematic viscosity |
||
integer, | intent(in) | :: | nElems |
Number of elements in input and output arrays |
Interface definition for the turbulent wall bc routines
This abstract interface defines the interface to calculate stream-wise velocity component from friction velocity and distance to boundary. All inputs and output are in lattice units.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(out) | :: | velSW(:) |
Stream-wise velocity component from wall model |
||
real(kind=rk), | intent(in) | :: | velTau(:) |
Friction velocity computd from wall model |
||
real(kind=rk), | intent(in) | :: | distToBnd(:) |
Distance to the boundary in the discrete normai direction |
||
real(kind=rk), | intent(in) | :: | viscKine(:) |
Kinematic viscosity |
||
integer, | intent(in) | :: | nElems |
Number of elements in input and output arrays |
||
class(mus_wall_function_type), | intent(in) | :: | wall_function |
Allocate wall function object |
Contains function pointers to compute friction velocity and stream-wise velocity component
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
logical, | public | :: | isActive | = | .false. |
is true if wall function is active |
|
character(len=labelLen), | public | :: | wall_func |
Wall model function |
|||
character(len=labelLen), | public | :: | nonlinear_solver |
Nonlinear solver type |
|||
real(kind=rk), | public | :: | vonKarman | = | 0.4_rk |
Von-Karman constant. Default = 0.4_rk |
|
logical, | public | :: | useVanDriest | = | .true. |
Use vanDriest damping function to damp turbulent viscosity |
|
type(mus_turb_wallFunc_data_type), | public, | allocatable | :: | dataOnLvl(:) |
Contains data computed in turbulent wall bc routine on each level |
||
procedure(mus_proc_calcFricVel), | public, | pointer, pass(this) | :: | calcFricVel | => | null() |
Function pointer to compute friction velocity |
procedure(mus_proc_calcStreamWiseVel), | public, | pointer, nopass | :: | calcStreamWiseVel | => | null() |
Function pointer to compute strean-wise velocity component |
class(mus_wall_function_type), | public, | allocatable | :: | wall_function |
Allocate wall function object |
||
procedure(mus_iterative_method_interface), | public, | pointer, nopass | :: | iterativeMethod | => | null() |
Function pointer to the iterative method |
Contains friction velocity and turbulent viscosity on boundary elements on each level
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=rk), | public, | allocatable | :: | tVisc(:) |
Turbulent viscosity on boundary element computed using mixing length formulation in lattice unit nu_t = (vonKarmandistToBnd)*2 * |du/dy| |
||
real(kind=rk), | public, | allocatable | :: | velTau(:) |
Friction velocity on first neighbor in normal direction in lattice unit computed from wall model |
||
real(kind=rk), | public, | allocatable | :: | distToBnd(:) |
Distance to boundary from first fluid in normal direction in lattice unit. |
||
real(kind=rk), | public, | allocatable | :: | neighDistToBnd(:) |
Distance to boundary from first fluid neighbor in normal direction in lattice unit. |
||
real(kind=rk), | public, | allocatable | :: | unitNormal(:,:) |
Unit normal for each boundary element. Size: (3, nElems) |
||
real(kind=rk), | public, | allocatable | :: | bndForce(:,:) |
Force on each boundary element. Size: (3, nElems) |
||
real(kind=rk), | public, | allocatable | :: | bndMoment(:,:) |
Moment on each boundary element. Size: (3, nElems) |
This routine computes friction velocity from wall model profile using Newton iteration method
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | velTau_initialGuess |
Friction velocity computed from previsous time step |
||
real(kind=rk), | intent(in) | :: | velSW |
Stream-wise velocity component from which friction velocity is computed |
||
real(kind=rk), | intent(in) | :: | y |
vertical distance from the wall |
||
real(kind=rk), | intent(in) | :: | nu |
dynamic viscosity |
||
class(mus_wall_function_type), | intent(in) | :: | wall_function |
Number of elements in input and output arrays |
Friction velocity computed in this routine
This routine computes friction velocity from wall model profile using fixed-point iterative method
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | velTau_initialGuess |
Friction velocity computed from previsous time step |
||
real(kind=rk), | intent(in) | :: | velSW |
Stream-wise velocity component from which friction velocity is computed |
||
real(kind=rk), | intent(in) | :: | y |
vertical distance from the wall |
||
real(kind=rk), | intent(in) | :: | nu |
dynamic viscosity |
||
class(mus_wall_function_type), | intent(in) | :: | wall_function |
Number of elements in input and output arrays |
Friction velocity computed in this routine
This routine loads wall model and nonlinear solver type for nonlinear equation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_turb_wallFunc_type), | intent(inout) | :: | me |
Turbulent wall model type to fill assign wall model |
||
type(flu_State) | :: | conf |
lua flu state |
|||
integer, | intent(in) | :: | parent |
bc parent handle |
Load the iterativeMethod to use in the turbulent wall model from the user configuration.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_turb_wallFunc_type), | intent(inout) | :: | me |
Turbulent wall model type to fill assign wall model |
||
type(flu_State) | :: | conf |
lua flu state |
|||
integer, | intent(in) | :: | parent |
bc parent handle |
Load the iterativeMethod to use in the turbulent wall model from the user configuration.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_turb_wallFunc_type), | intent(inout) | :: | me |
Turbulent wall model type to fill assign wall model |
||
type(flu_State) | :: | conf |
lua flu state |
|||
integer, | intent(in) | :: | parent |
bc parent handle |
This routine computes friction velocity from Schmitt wall model.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mus_turb_wallFunc_type), | intent(in) | :: | this |
Pass the calling object as an argument |
||
real(kind=rk), | intent(inout) | :: | velTau(:) |
Friction velocity computed from wall model. it is inout to provide velTau from previous timestep as initial velTau for fixed-point or Newton iteration solver |
||
real(kind=rk), | intent(in) | :: | velSW(:) |
Stream-wise velocity component from which friction velocity is computed |
||
real(kind=rk), | intent(in) | :: | distToBnd(:) |
Distance to the boundary in the discrete normai direction |
||
real(kind=rk), | intent(in) | :: | viscKine(:) |
Kinematic viscosity |
||
integer, | intent(in) | :: | nElems |
Number of elements in input and output arrays |
This routine computes friction velocity from wall model profile using Newton iteration method
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mus_turb_wallFunc_type), | intent(in) | :: | this |
Pass the calling object as an argument |
||
real(kind=rk), | intent(inout) | :: | velTau(:) |
Friction velocity computed from wall model. it is inout to provide velTau from previous timestep as initial velTau for fixed-point or Newton iteration solver |
||
real(kind=rk), | intent(in) | :: | velSW(:) |
Stream-wise velocity component from which friction velocity is computed |
||
real(kind=rk), | intent(in) | :: | distToBnd(:) |
Distance to the boundary in the discrete normai direction |
||
real(kind=rk), | intent(in) | :: | viscKine(:) |
Kinematic viscosity |
||
integer, | intent(in) | :: | nElems |
Number of elements in input and output arrays |
This routines computes streamWise velocity component from friction velocity and distance to boundary using any wall function profile.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(out) | :: | velSW(:) |
Stream-wise velocity component from wall model |
||
real(kind=rk), | intent(in) | :: | velTau(:) |
Friction velocity computd from wall model |
||
real(kind=rk), | intent(in) | :: | distToBnd(:) |
Distance to the boundary in the discrete normai direction |
||
real(kind=rk), | intent(in) | :: | viscKine(:) |
Kinematic viscosity |
||
integer, | intent(in) | :: | nElems |
Number of elements in input and output arrays |
||
class(mus_wall_function_type), | intent(in) | :: | wall_function |
Allocate wall function object |