m_alm_element Module

Actuator lines for the actuator line model (ALM): blade-element geometry, rigid-body kinematics and aerodynamic loads.

Ported from Incompact3d's acl_elem.f90 and acl_utils.f90. An actuator line is defined by its stations (element ends) on the quarter-chord line; element centres, unit vectors (spanwise s, chordwise t, normal n), areas and chords are derived from them by make_line_geometry. Loads come from the static airfoil polars, with , and the normal and chordwise components of the fluid velocity relative to the element.

The dynamic-stall, added-mass, random-walk and constant-circulation options of Incompact3d are not ported.


Uses

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

Used by

  • module~~m_alm_element~~UsedByGraph module~m_alm_element m_alm_element module~m_alm m_alm module~m_alm->module~m_alm_element module~m_alm_output m_alm_output module~m_alm->module~m_alm_output module~m_alm_turbine m_alm_turbine module~m_alm->module~m_alm_turbine module~m_alm_output->module~m_alm_element module~m_alm_turbine->module~m_alm_element 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
real(kind=dp), public, parameter :: deg2rad = pi/180._dp

Derived Types

type, public ::  actuator_line_t

Components

Type Visibility Attributes Name Initial
character(len=256), public :: name = ''
integer, public :: n_elem = 0
logical, public :: flip_n = .false.

flip the normal (clockwise rotor)

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

centre of rotation

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

reference length (blade radius)

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

(3, n_elem + 1) quarter-chord points

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

(3, n_elem + 1) chordwise unit vec

real(kind=dp), public, allocatable :: chord(:)
real(kind=dp), public, allocatable :: thick(:)

thickness to chord ratio

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

station pitch [rad]

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

(3, n_elem) element centres

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

chordwise unit vector

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

normal unit vector

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

spanwise unit vector

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

chord

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

spanwise length

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

planform area

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

distance from cor

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

thickness to chord ratio

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

pitch [rad]

integer, public, allocatable :: eairfoil(:)

index into the owner's airfoils

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

(3, n_elem) sampled fluid velocity

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

(3, n_elem) body velocity

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

angle of attack [rad]

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

chord Reynolds number

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

relative speed

real(kind=dp), public, allocatable :: ecl(:)
real(kind=dp), public, allocatable :: ecd(:)
real(kind=dp), public, allocatable :: ecm(:)
real(kind=dp), public, allocatable :: ecn(:)
real(kind=dp), public, allocatable :: ect(:)
real(kind=dp), public, allocatable :: efn(:)
real(kind=dp), public, allocatable :: eft(:)
real(kind=dp), public, allocatable :: ems(:)
real(kind=dp), public, allocatable :: ef(:,:)

(3, n_elem) force [N]

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

tip/root loss factor


Functions

public pure function quat_rot(v, theta, axis, origin) result(v_rot)

Rotate point v by theta [rad] about axis through origin (right-hand rule). Equivalent to Incompact3d's quaternion QuatRot, written in Rodrigues' form; axis need not be normalised.

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: v(3)
real(kind=dp), intent(in) :: theta
real(kind=dp), intent(in) :: axis(3)
real(kind=dp), intent(in) :: origin(3)

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

public pure function cross(a, b) result(c)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: a(3)
real(kind=dp), intent(in) :: b(3)

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


Subroutines

public subroutine allocate_line(line, n_stations)

(Re)allocate the station and element arrays of line.

Arguments

Type IntentOptional Attributes Name
type(actuator_line_t), intent(inout) :: line
integer, intent(in) :: n_stations

public subroutine read_line_geometry(filename, length, span_vec, r_over_l, c_over_l, pitch, thick)

Read an actuator line geometry (.al) file: <label>: <length>, <label>: <sx> <sy> <sz>, <label>: <n>, then n rows of r/L c/L pitch[deg] t/c.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: filename
real(kind=dp), intent(out) :: length
real(kind=dp), intent(out) :: span_vec(3)
real(kind=dp), intent(out), allocatable :: r_over_l(:)
real(kind=dp), intent(out), allocatable :: c_over_l(:)
real(kind=dp), intent(out), allocatable :: pitch(:)
real(kind=dp), intent(out), allocatable :: thick(:)

public subroutine make_line_geometry(line)

Element centres, unit vectors, areas and chords from the stations.

Arguments

Type IntentOptional Attributes Name
type(actuator_line_t), intent(inout) :: line

public subroutine rotate_line(line, origin, axis, theta)

Rotate the stations of line by theta about axis through origin (chordwise vectors about axis through zero). Element geometry is not rebuilt; call make_line_geometry afterwards.

Arguments

Type IntentOptional Attributes Name
type(actuator_line_t), intent(inout) :: line
real(kind=dp), intent(in) :: origin(3)
real(kind=dp), intent(in) :: axis(3)
real(kind=dp), intent(in) :: theta

public subroutine pitch_line(line, pitch_angle)

Pitch every station by pitch_angle [rad] about the line's root-to-tip direction, then rebuild the element geometry.

Arguments

Type IntentOptional Attributes Name
type(actuator_line_t), intent(inout) :: line
real(kind=dp), intent(in) :: pitch_angle

public subroutine populate_line_airfoils(line, airfoils)

Give every element the airfoil whose thickness ratio is closest to its own, clamped to the thinnest and thickest available.

Arguments

Type IntentOptional Attributes Name
type(actuator_line_t), intent(inout) :: line
type(airfoil_t), intent(in) :: airfoils(:)

public subroutine compute_line_forces(line, airfoils, rho_air, visc)

Blade-element loads of every element from the sampled fluid velocity, the body velocity and the static polars.

Arguments

Type IntentOptional Attributes Name
type(actuator_line_t), intent(inout) :: line
type(airfoil_t), intent(in) :: airfoils(:)
real(kind=dp), intent(in) :: rho_air
real(kind=dp), intent(in) :: visc

public subroutine compute_tower_forces(tower, rho_air, visc, time, cl, cd, strouhal, noise)

Tower loads: constant drag and a lift oscillating at the shedding frequency St*U/D, perturbed by noise (uniform in [0, 1) per element).

Arguments

Type IntentOptional Attributes Name
type(actuator_line_t), intent(inout) :: tower
real(kind=dp), intent(in) :: rho_air
real(kind=dp), intent(in) :: visc
real(kind=dp), intent(in) :: time
real(kind=dp), intent(in) :: cl
real(kind=dp), intent(in) :: cd
real(kind=dp), intent(in) :: strouhal
real(kind=dp), intent(in) :: noise(:)