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.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public, | parameter | :: | OPER_CONSTANT | = | 1 | |
| integer, | public, | parameter | :: | OPER_NREL | = | 2 | |
| integer, | public, | parameter | :: | OPER_UPSTREAM | = | 4 |
| 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 |
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).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(turbine_t), | intent(in) | :: | turb |
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)).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(turbine_t), | intent(inout) | :: | turb | |||
| character(len=*), | intent(in) | :: | filename | |||
| real(kind=dp), | intent(in) | :: | u_inflow |
Build the blades (and tower) at the current azimuth and collective
pitch. Unless restart, the angular velocity is set to uref*tsr/R.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(turbine_t), | intent(inout) | :: | turb | |||
| logical, | intent(in) | :: | restart |
Loads on the blades (with end effects) and tower from the element velocities, then the rotor performance.
| Type | Intent | Optional | 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(:) |
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.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(turbine_t), | intent(inout) | :: | turb | |||
| real(kind=dp), | intent(in) | :: | time | |||
| real(kind=dp), | intent(in) | :: | dt |