les_t Derived Type

type, public :: les_t


Inherits

type~~les_t~~InheritsGraph type~les_t les_t type~field_t field_t type~les_t->type~field_t nut, mixing_length_sq type~field_t->type~field_t next

Inherited by

type~~les_t~~InheritedByGraph type~les_t les_t type~solver_t solver_t type~solver_t->type~les_t les type~base_case_t base_case_t type~base_case_t->type~solver_t solver type~case_abl_t case_abl_t type~case_abl_t->type~base_case_t type~case_channel_t case_channel_t type~case_channel_t->type~base_case_t type~case_cylinder_t case_cylinder_t type~case_cylinder_t->type~base_case_t type~case_generic_t case_generic_t type~case_generic_t->type~base_case_t type~case_tgv_t case_tgv_t type~case_tgv_t->type~base_case_t

Components

Type Visibility Attributes Name Initial
character(len=20), public :: model = 'none'
real(kind=dp), public :: smagorinsky_constant = 0.14_dp
logical, public :: wall_damping = .false.
real(kind=dp), public :: wall_damping_n = 3._dp
logical, public :: wall_supplied = .false.

Wall the Mason-Thomson damping measures from, supplied by the case through configure_wall_damping (the ABL case uses its kappa and z0)

real(kind=dp), public :: von_karman_constant = 0._dp
real(kind=dp), public :: roughness_length = 0._dp
logical, public :: abl_wall_boundary_enabled = .false.
real(kind=dp), public :: abl_wall_sampling_height = 0._dp

y-vertex the wall model samples the velocity at (1 is the wall).

integer, public :: abl_wall_sample_plane = 2
class(field_t), public, pointer :: nut => null()
class(field_t), public, pointer :: mixing_length_sq => null()

Constructor

public interface les_t

  • private pure function les_init(config) result(les)

    Arguments

    Type IntentOptional Attributes Name
    type(les_config_t), intent(in) :: config

    Return Value type(les_t)


Type-Bound Procedures

procedure, public :: mixing_length

  • private pure function mixing_length(self, spacing, wall_distance) result(length)

    Smagorinsky mixing length, optionally Mason-Thomson wall-damped.

    Returns zero when wall damping is requested without a wall distance, which in turn zeroes the eddy viscosity built from it.

    Arguments

    Type IntentOptional Attributes Name
    class(les_t), intent(in) :: self
    real(kind=dp), intent(in) :: spacing(3)
    real(kind=dp), intent(in), optional :: wall_distance

    Return Value real(kind=dp)

procedure, public :: nut_from_gradient

  • private pure function nut_from_gradient(self, velocity_gradient, spacing, wall_distance) result(nut)

    Arguments

    Type IntentOptional Attributes Name
    class(les_t), intent(in) :: self
    real(kind=dp), intent(in) :: velocity_gradient(3,3)
    real(kind=dp), intent(in) :: spacing(3)
    real(kind=dp), intent(in), optional :: wall_distance

    Return Value real(kind=dp)

procedure, public :: compute_nut

  • private subroutine compute_nut(self, backend, mesh, u, v, w, xdirps, ydirps, zdirps)

    Compute the Smagorinsky eddy-viscosity field in DIR_X layout.

    Arguments

    Type IntentOptional Attributes Name
    class(les_t), intent(inout) :: self
    class(base_backend_t), intent(inout) :: backend
    type(mesh_t), intent(in) :: mesh
    class(field_t), intent(in) :: u
    class(field_t), intent(in) :: v
    class(field_t), intent(in) :: w
    type(dirps_t), intent(in) :: xdirps
    type(dirps_t), intent(in) :: ydirps
    type(dirps_t), intent(in) :: zdirps

procedure, public :: apply_sgs_stress

  • private subroutine apply_sgs_stress(self, backend, mesh, du, dv, dw, u, v, w, xdirps, ydirps, zdirps)

    Add div(2nutS_ij) to the momentum right-hand-side fields.

    Arguments

    Type IntentOptional Attributes Name
    class(les_t), intent(inout) :: self
    class(base_backend_t), intent(inout) :: backend
    type(mesh_t), intent(in) :: mesh
    class(field_t), intent(inout) :: du
    class(field_t), intent(inout) :: dv
    class(field_t), intent(inout) :: dw
    class(field_t), intent(in) :: u
    class(field_t), intent(in) :: v
    class(field_t), intent(in) :: w
    type(dirps_t), intent(in) :: xdirps
    type(dirps_t), intent(in) :: ydirps
    type(dirps_t), intent(in) :: zdirps

procedure, public :: configure_wall_damping

  • private subroutine configure_wall_damping(self, kappa, roughness_length)

    Supply the wall the Mason-Thomson damping measures from. The wall distance is taken from the lower y boundary, so this suits cases with a single wall there.

    Arguments

    Type IntentOptional Attributes Name
    class(les_t), intent(inout) :: self
    real(kind=dp), intent(in) :: kappa
    real(kind=dp), intent(in) :: roughness_length

procedure, public :: configure_abl_wall_boundary

  • private subroutine configure_abl_wall_boundary(self, kappa, roughness_length, sampling_height, sample_plane)

    Arguments

    Type IntentOptional Attributes Name
    class(les_t), intent(inout) :: self
    real(kind=dp), intent(in) :: kappa
    real(kind=dp), intent(in) :: roughness_length
    real(kind=dp), intent(in) :: sampling_height
    integer, intent(in) :: sample_plane

procedure, public :: finalise

  • private subroutine finalise(self, backend)

    Arguments

    Type IntentOptional Attributes Name
    class(les_t), intent(inout) :: self
    class(base_backend_t), intent(inout) :: backend