mus_turb_wallFunc_module Module

This module contains turbulent wall function type and routines to calculate friction velocity and stream-wise velocity component.

Constant parameters for Implicit equation solver


Uses

  • module~~mus_turb_wallfunc_module~~UsesGraph module~mus_turb_wallfunc_module mus_turb_wallFunc_module aotus_module aotus_module module~mus_turb_wallfunc_module->aotus_module env_module env_module module~mus_turb_wallfunc_module->env_module module~mus_wall_function_abstract_module mus_wall_function_abstract_module module~mus_turb_wallfunc_module->module~mus_wall_function_abstract_module module~mus_wall_function_musker_module mus_wall_function_musker_module module~mus_turb_wallfunc_module->module~mus_wall_function_musker_module module~mus_wall_function_reichardt_module mus_wall_function_reichardt_module module~mus_turb_wallfunc_module->module~mus_wall_function_reichardt_module module~mus_wall_function_schmitt_module mus_wall_function_schmitt_module module~mus_turb_wallfunc_module->module~mus_wall_function_schmitt_module tem_aux_module tem_aux_module module~mus_turb_wallfunc_module->tem_aux_module tem_float_module tem_float_module module~mus_turb_wallfunc_module->tem_float_module tem_logging_module tem_logging_module module~mus_turb_wallfunc_module->tem_logging_module module~mus_wall_function_abstract_module->env_module module~mus_wall_function_musker_module->env_module module~mus_wall_function_musker_module->module~mus_wall_function_abstract_module module~mus_wall_function_reichardt_module->env_module module~mus_wall_function_reichardt_module->module~mus_wall_function_abstract_module module~mus_wall_function_schmitt_module->env_module module~mus_wall_function_schmitt_module->module~mus_wall_function_abstract_module

Used by

  • module~~mus_turb_wallfunc_module~~UsedByGraph module~mus_turb_wallfunc_module mus_turb_wallFunc_module module~mus_bc_fluid_turbulent_module mus_bc_fluid_turbulent_module module~mus_bc_fluid_turbulent_module->module~mus_turb_wallfunc_module module~mus_bc_header_module mus_bc_header_module module~mus_bc_fluid_turbulent_module->module~mus_bc_header_module module~mus_bc_header_module->module~mus_turb_wallfunc_module module~mus_bc_fluid_experimental_module mus_bc_fluid_experimental_module module~mus_bc_fluid_experimental_module->module~mus_bc_header_module module~mus_bc_fluid_module mus_bc_fluid_module module~mus_bc_fluid_module->module~mus_bc_header_module module~mus_bc_fluid_noneqexpol_module mus_bc_fluid_nonEqExpol_module module~mus_bc_fluid_noneqexpol_module->module~mus_bc_header_module module~mus_bc_fluid_wall_module mus_bc_fluid_wall_module module~mus_bc_fluid_wall_module->module~mus_bc_header_module module~mus_bc_general_module mus_bc_general_module module~mus_bc_general_module->module~mus_bc_fluid_turbulent_module module~mus_bc_general_module->module~mus_bc_header_module module~mus_bc_nernstplanck_module mus_bc_nernstPlanck_module module~mus_bc_nernstplanck_module->module~mus_bc_header_module module~mus_bc_passivescalar_module mus_bc_passiveScalar_module module~mus_bc_passivescalar_module->module~mus_bc_header_module module~mus_bc_poisson_module mus_bc_poisson_module module~mus_bc_poisson_module->module~mus_bc_header_module module~mus_bc_species_module mus_bc_species_module module~mus_bc_species_module->module~mus_bc_header_module module~mus_bc_var_module mus_bc_var_module module~mus_bc_var_module->module~mus_bc_header_module module~mus_bndforce_module mus_bndForce_module module~mus_bndforce_module->module~mus_bc_header_module module~mus_connectivity_module mus_connectivity_module module~mus_connectivity_module->module~mus_bc_header_module module~mus_construction_module mus_construction_module module~mus_construction_module->module~mus_bc_header_module module~mus_dynloadbal_module mus_dynLoadBal_module module~mus_dynloadbal_module->module~mus_bc_header_module module~mus_field_module mus_field_module module~mus_field_module->module~mus_bc_header_module module~mus_scheme_type_module mus_scheme_type_module module~mus_scheme_type_module->module~mus_bc_header_module module~mus_weights_module mus_weights_module module~mus_weights_module->module~mus_bc_header_module

Variables

Type Visibility Attributes Name Initial
integer, private, parameter :: imEq_nIter = 1000
real(kind=rk), private, parameter :: imEq_tol = 1e-10

Abstract Interfaces

abstract interface

Interface definition for the turbulent wall bc routines

  • private pure function mus_iterative_method_interface(velTau_initialGuess, velSW, y, nu, wall_function) result(velTau_new)

    This routine computes friction velocity from wall model profile using Newton iteration method

    Arguments

    Type IntentOptional 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

    Return Value real(kind=rk)

    Friction velocity computed in this routine

abstract interface

Interface definition for the turbulent wall bc routines

  • private pure subroutine mus_proc_calcFricVel(this, velTau, velSW, distToBnd, viscKine, nElems)

    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.

    Arguments

    Type IntentOptional 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

abstract interface

Interface definition for the turbulent wall bc routines

  • private pure subroutine mus_proc_calcStreamWiseVel(velSW, velTau, distToBnd, viscKine, nElems, wall_function)

    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.

    Arguments

    Type IntentOptional 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


Derived Types

type, public ::  mus_turb_wallFunc_type

Contains function pointers to compute friction velocity and stream-wise velocity component

Components

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

type, private ::  mus_turb_wallFunc_data_type

Contains friction velocity and turbulent viscosity on boundary elements on each level

Components

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)


Functions

private pure function newton_method(velTau_initialGuess, velSW, y, nu, wall_function) result(velTau_new)

This routine computes friction velocity from wall model profile using Newton iteration method

Arguments

Type IntentOptional 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

Return Value real(kind=rk)

Friction velocity computed in this routine

private pure function fixedPoint_method(velTau_initialGuess, velSW, y, nu, wall_function) result(velTau_new)

This routine computes friction velocity from wall model profile using fixed-point iterative method

Arguments

Type IntentOptional 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

Return Value real(kind=rk)

Friction velocity computed in this routine


Subroutines

public subroutine mus_load_turb_wallFunc(me, conf, parent)

This routine loads wall model and nonlinear solver type for nonlinear equation

Arguments

Type IntentOptional 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

private subroutine load_iterativeMethod(me, conf, parent)

Load the iterativeMethod to use in the turbulent wall model from the user configuration.

Arguments

Type IntentOptional 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

private subroutine load_wall_function(me, conf, parent)

Load the iterativeMethod to use in the turbulent wall model from the user configuration.

Arguments

Type IntentOptional 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

private pure subroutine fricVel_Schmitt(this, velTau, velSW, distToBnd, viscKine, nElems)

This routine computes friction velocity from Schmitt wall model.

Arguments

Type IntentOptional 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

private pure subroutine compute_fricVel(this, velTau, velSW, distToBnd, viscKine, nElems)

This routine computes friction velocity from wall model profile using Newton iteration method

Arguments

Type IntentOptional 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

private pure subroutine computeStreamWiseVel(velSW, velTau, distToBnd, viscKine, nElems, wall_function)

This routines computes streamWise velocity component from friction velocity and distance to boundary using any wall function profile.

Arguments

Type IntentOptional 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