alm_t Derived Type

type, public, extends(turbine_model_t) :: alm_t


Inherits

type~~alm_t~~InheritsGraph type~alm_t alm_t type~allocator_t allocator_t type~alm_t->type~allocator_t host_allocator type~base_backend_t base_backend_t type~alm_t->type~base_backend_t backend type~mesh_t mesh_t type~alm_t->type~mesh_t mesh type~scalar_series_t scalar_series_t type~alm_t->type~scalar_series_t perf type~turbine_model_t turbine_model_t type~alm_t->type~turbine_model_t type~turbine_t turbine_t type~alm_t->type~turbine_t turbine type~field_t field_t type~allocator_t->type~field_t first type~base_backend_t->type~allocator_t allocator type~base_backend_t->type~mesh_t mesh type~poisson_fft_t poisson_fft_t type~base_backend_t->type~poisson_fft_t poisson_fft type~geo_t geo_t type~mesh_t->type~geo_t geo type~grid_t grid_t type~mesh_t->type~grid_t grid type~par_t par_t type~mesh_t->type~par_t par type~checkpoint_state_t checkpoint_state_t type~turbine_model_t->type~checkpoint_state_t type~actuator_line_t actuator_line_t type~turbine_t->type~actuator_line_t blade, tower type~airfoil_t airfoil_t type~turbine_t->type~airfoil_t airfoils type~controller_t controller_t type~turbine_t->type~controller_t controller type~field_t->type~field_t next type~poisson_fft_t->type~mesh_t mesh

Components

Type Visibility Attributes Name Initial
character(len=256), public, allocatable :: turbine_files(:)
real(kind=dp), public :: rho_air = 1._dp
real(kind=dp), public :: eps_factor = 2._dp

kernel width in cell sizes

real(kind=dp), public :: nu = 0._dp

kinematic viscosity (element Re)

real(kind=dp), public :: u_inflow = 0._dp

initial reference speed (NREL mode)

integer, public :: stats_start = 1
integer, public :: stats_freq = 1
integer, public :: n_turb = 0
type(turbine_t), public, allocatable :: turbine(:)
integer, public :: n_src = 0

actuator points over all turbines

integer, public :: n_tower_elem = 0
real(kind=dp), public :: eps
real(kind=dp), public :: r_cut
real(kind=dp), public :: prefactor
real(kind=dp), public :: dt
real(kind=dp), public :: ctime = 0._dp

rotor time, as Incompact3d's ctime

real(kind=dp), public :: last_update_time = -huge(1._dp)
integer, public :: current_iter = 0
logical, public :: new_step = .true.
integer, public :: sample_count = 0
real(kind=dp), public, allocatable :: thrust_mean(:)

Sources of the current step: positions and acceleration coefficients

real(kind=dp), public, allocatable :: torque_mean(:)

Sources of the current step: positions and acceleration coefficients

real(kind=dp), public, allocatable :: power_mean(:)

Sources of the current step: positions and acceleration coefficients

real(kind=dp), public, allocatable :: src_points(:,:)
real(kind=dp), public, allocatable :: src_coeffs(:,:)
type(scalar_series_t), public, allocatable :: perf(:)
class(base_backend_t), public, pointer :: backend => null()
type(mesh_t), public, pointer :: mesh => null()
type(allocator_t), public, pointer :: host_allocator => null()

Type-Bound Procedures

procedure, public :: init => init_alm

  • private subroutine init_alm(self, backend, mesh, host_allocator, dt)

    Arguments

    Type IntentOptional Attributes Name
    class(alm_t), intent(inout) :: self
    class(base_backend_t), intent(in), target :: backend
    type(mesh_t), intent(in), target :: mesh
    type(allocator_t), intent(in), target :: host_allocator
    real(kind=dp), intent(in) :: dt

procedure, public :: update => update_alm

  • private subroutine update_alm(self, t, dt)

    Arguments

    Type IntentOptional Attributes Name
    class(alm_t), intent(inout) :: self
    real(kind=dp), intent(in) :: t
    real(kind=dp), intent(in) :: dt

procedure, public :: project_forces => project_forces_alm

  • private subroutine project_forces_alm(self, du, dv, dw, u, v, w)

    Arguments

    Type IntentOptional Attributes Name
    class(alm_t), intent(inout) :: self
    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

procedure, public :: write_output => write_output_alm

  • private subroutine write_output_alm(self, iter, is_root)

    Arguments

    Type IntentOptional Attributes Name
    class(alm_t), intent(inout) :: self
    integer, intent(in) :: iter
    logical, intent(in) :: is_root

procedure, public :: setup_output => setup_output_alm

  • private subroutine setup_output_alm(self, is_root, append)

    Arguments

    Type IntentOptional Attributes Name
    class(alm_t), intent(inout) :: self
    logical, intent(in) :: is_root
    logical, intent(in) :: append

procedure, public :: write_checkpoint => write_checkpoint_alm

  • private subroutine write_checkpoint_alm(self, writer)

    Arguments

    Type IntentOptional Attributes Name
    class(alm_t), intent(inout) :: self
    type(writer_session_t), intent(inout) :: writer

procedure, public :: read_checkpoint => read_checkpoint_alm

  • private subroutine read_checkpoint_alm(self, reader)

    Arguments

    Type IntentOptional Attributes Name
    class(alm_t), intent(inout) :: self
    type(reader_session_t), intent(inout) :: reader

procedure, public :: finalise => finalise_alm

  • private subroutine finalise_alm(self)

    Arguments

    Type IntentOptional Attributes Name
    class(alm_t), intent(inout) :: self

procedure, public :: gather_points

  • private subroutine gather_points(self, points)

    Element centres of all blades and towers, in the source order used throughout: turbine by turbine, blades then tower.

    Arguments

    Type IntentOptional Attributes Name
    class(alm_t), intent(in) :: self
    real(kind=dp), intent(out) :: points(:,:)

procedure, public :: sample_velocity

  • private subroutine sample_velocity(self, points, vel, u, v, w)

    Trilinear interpolation of (u, v, w) at points over all ranks.

    Arguments

    Type IntentOptional Attributes Name
    class(alm_t), intent(inout) :: self
    real(kind=dp), intent(in) :: points(:,:)
    real(kind=dp), intent(out) :: vel(:,:)
    class(field_t), intent(in) :: u
    class(field_t), intent(in) :: v
    class(field_t), intent(in) :: w