m_alm_turbine Module

Horizontal-axis wind turbines for the actuator line model (ALM).

Ported from Incompact3d's acl_turb.f90 and the turbine half of acl_model.f90. A turbine owns its blades and optional tower (each an actuator_line_t), its airfoil polars, and its rotor state (azimuth, angular velocity, collective pitch, controller). This module is free of fields and MPI: the flow velocity at the actuator points is sampled and the forces are projected by m_alm.

A turbine is described by a &TurbineSpecs namelist file (.turb), in the same format as Incompact3d. Supported options: - TypeFlag = 1 (horizontal axis) - OperFlag = 1 (constant rotation, omega = ureftsr/R), 2 (NREL 5 MW torque and pitch controller) or 4 (omega = U_upstreamtsr/R from an upstream probe) - RotFlag = 1 (clockwise) or 2 (counterclockwise) - towerFlag = 0/1, EndEffectsFlag = 0 (none), 1 (Glauert) or 2 (Shen et al. 2005) with TipCorr/RootCorr OperFlag = 3 (list controller), AddedMassFlag, DynStallFlag, RandomWalkForcingFlag, ConstantCirculationFlag and AeroElastFlag are not ported and stop the run when set.


Uses

  • module~~m_alm_turbine~~UsesGraph module~m_alm_turbine m_alm_turbine module~m_alm_airfoil m_alm_airfoil module~m_alm_turbine->module~m_alm_airfoil module~m_alm_controller m_alm_controller module~m_alm_turbine->module~m_alm_controller module~m_alm_element m_alm_element module~m_alm_turbine->module~m_alm_element module~m_common m_common module~m_alm_turbine->module~m_common module~m_logger m_logger module~m_alm_turbine->module~m_logger module~m_alm_airfoil->module~m_common module~m_alm_airfoil->module~m_logger module~m_alm_controller->module~m_common module~m_alm_controller->module~m_logger module~m_alm_element->module~m_alm_airfoil module~m_alm_element->module~m_common module~m_common->module~m_logger m_mpi m_mpi module~m_common->m_mpi iso_fortran_env iso_fortran_env module~m_logger->iso_fortran_env module~m_logger->m_mpi

Used by

  • module~~m_alm_turbine~~UsedByGraph module~m_alm_turbine m_alm_turbine module~m_alm m_alm module~m_alm->module~m_alm_turbine module~m_turbine_setup m_turbine_setup module~m_turbine_setup->module~m_alm module~m_case_abl m_case_abl module~m_case_abl->module~m_turbine_setup module~m_case_wind_turbine m_case_wind_turbine module~m_case_wind_turbine->module~m_turbine_setup module~m_case_factory m_case_factory module~m_case_factory->module~m_case_abl module~m_case_factory->module~m_case_wind_turbine module~m_memcheck_build m_memcheck_build module~m_memcheck_build->module~m_case_abl module~m_memcheck_build->module~m_case_factory program~x3d2_memcheck x3d2_memcheck program~x3d2_memcheck->module~m_memcheck_build program~xcompact xcompact program~xcompact->module~m_case_factory

Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: OPER_CONSTANT = 1
integer, public, parameter :: OPER_NREL = 2
integer, public, parameter :: OPER_UPSTREAM = 4

Derived Types

type, public ::  turbine_t

Components

Type Visibility Attributes Name Initial
character(len=100), public :: name = ''
character(len=256), public :: blade_geom_file = ''
character(len=256), public :: tower_geom_file = ''
integer, public :: n_blades = 0
real(kind=dp), public :: origin(3) = 0._dp
real(kind=dp), public :: rot_n(3) = [1._dp, 0._dp, 0._dp]

rotation axis

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

[deg]

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

[deg]

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

[deg]

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

rotor radius

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

swept area

real(kind=dp), public :: blade_inertia = 0._dp
real(kind=dp), public :: i_rotor = 0._dp
integer, public :: oper = OPER_CONSTANT
logical, public :: clockwise = .true.
real(kind=dp), public :: tsr = 0._dp
real(kind=dp), public :: uref = 0._dp
real(kind=dp), public :: azim_angle = 0._dp
real(kind=dp), public :: angular_vel = 0._dp
real(kind=dp), public :: delta_omega = 0._dp
real(kind=dp), public :: cbp = 0._dp

collective blade pitch [rad]

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

collective blade pitch [rad]

real(kind=dp), public :: u_upstream(3) = 0._dp
type(controller_t), public :: controller
logical, public :: end_effects = .false.
logical, public :: end_glauert = .false.
logical, public :: end_shen = .false.
logical, public :: tip_correction = .false.
logical, public :: root_correction = .false.
real(kind=dp), public :: shen_c1 = 0.125_dp
real(kind=dp), public :: shen_c2 = 21._dp
logical, public :: has_tower = .false.
real(kind=dp), public :: tower_height = 0._dp
real(kind=dp), public :: tower_offset = 0._dp
real(kind=dp), public :: tower_drag = 1._dp
real(kind=dp), public :: tower_lift = 0.3_dp
real(kind=dp), public :: tower_strouhal = 0.21_dp
type(airfoil_t), public, allocatable :: airfoils(:)
type(actuator_line_t), public, allocatable :: blade(:)
type(actuator_line_t), public :: tower
real(kind=dp), public :: thrust = 0._dp
real(kind=dp), public :: torque = 0._dp
real(kind=dp), public :: power = 0._dp
real(kind=dp), public :: ct = 0._dp
real(kind=dp), public :: cp = 0._dp
real(kind=dp), public :: ctr = 0._dp
real(kind=dp), public :: cfx = 0._dp
real(kind=dp), public :: cfy = 0._dp
real(kind=dp), public :: cfz = 0._dp

Functions

public pure function upstream_probe(turb) result(point)

Probe point for the controlled modes, two radii along -rot_n from the rotor centre (as Incompact3d; for a counterclockwise rotor rot_n points upstream, so the probe lies downstream).

Arguments

Type IntentOptional Attributes Name
type(turbine_t), intent(in) :: turb

Return Value real(kind=dp), (3)


Subroutines

public subroutine read_turbine_file(turb, filename, u_inflow)

Read a &TurbineSpecs namelist file and the airfoils it lists. u_inflow is the initial reference speed of the NREL controller (Incompact3d uses 0.5*(u1 + u2)).

Arguments

Type IntentOptional Attributes Name
type(turbine_t), intent(inout) :: turb
character(len=*), intent(in) :: filename
real(kind=dp), intent(in) :: u_inflow

public subroutine set_turbine_geometry(turb, restart)

Build the blades (and tower) at the current azimuth and collective pitch. Unless restart, the angular velocity is set to uref*tsr/R.

Arguments

Type IntentOptional Attributes Name
type(turbine_t), intent(inout) :: turb
logical, intent(in) :: restart

public subroutine compute_turbine_forces(turb, rho_air, visc, time, tower_noise)

Loads on the blades (with end effects) and tower from the element velocities, then the rotor performance.

Arguments

Type IntentOptional Attributes Name
type(turbine_t), intent(inout) :: turb
real(kind=dp), intent(in) :: rho_air
real(kind=dp), intent(in) :: visc
real(kind=dp), intent(in) :: time
real(kind=dp), intent(in) :: tower_noise(:)

public subroutine advance_turbine(turb, time, dt)

Advance the rotor by one time step: update the angular velocity (and pitch) from the operating mode, then rotate the blades. For the controlled modes u_upstream must already hold the probe velocity.

Arguments

Type IntentOptional Attributes Name
type(turbine_t), intent(inout) :: turb
real(kind=dp), intent(in) :: time
real(kind=dp), intent(in) :: dt