![]() |
OpenFAST
Wind turbine multiphysics simulator
|
This module contains all the data and procedures that define uniform wind files (formerly known as hub-height files). More...
Functions/Subroutines | |
subroutine, public | ifw_uniformwind_init (InitData, ParamData, MiscVars, Interval, InitOutData, ErrStat, ErrMsg) |
A subroutine to initialize the UniformWind module. More... | |
subroutine, public | ifw_uniformwind_calcoutput (Time, PositionXYZ, p, Velocity, DiskVel, m, ErrStat, ErrMsg) |
This routine and its subroutines calculate the wind velocity at a set of points given in PositionXYZ. More... | |
subroutine | interpparams (Time, p, m, op) |
This subroutine linearly interpolates the parameters that are used to compute uniform wind. More... | |
subroutine | getwindspeed (InputPosition, p, m, op, WindSpeed, ErrStat, ErrMsg) |
This subroutine linearly interpolates the columns in the uniform input file to get the values for the requested time, then uses the interpolated values to calclate the wind speed at a point in space represented by InputPosition. More... | |
real(reki) function, dimension(3) | windinf_adhack_diskvel (t, p, m, ErrStat, ErrMsg) |
This function should be deleted ASAP. More... | |
subroutine, public | ifw_uniformwind_end (ParamData, MiscVars, ErrStat, ErrMsg) |
This routine closes any open files and clears all data stored in UniformWind derived Types. More... | |
subroutine, public | ifw_uniformwind_jacobianpinput (t, Position, CosPropDir, SinPropDir, p, m, dYdu) |
Routine to compute the Jacobians of the output (Y) function with respect to the inputs (u). More... | |
subroutine, public | ifw_uniformwind_getop (t, p, m, OP_out) |
Routine to compute the Jacobians of the output (Y) function with respect to the inputs (u). More... | |
Variables | |
type(progdesc), parameter | ifw_uniformwind_ver = ProgDesc( 'IfW_UniformWind', '', '' ) |
This module contains all the data and procedures that define uniform wind files (formerly known as hub-height files).
This could more accurately be called a point wind file since the wind speed at any point is calculated by shear applied to the point where wind is defined. It is basically uniform wind over the rotor disk. The entire file is read on initialization, then the columns that make up the wind file are interpolated to the time requested, and wind is calculated based on the location in space.
the file contains header information (rows that contain "!"), followed by numeric data stored in 8 columns:
Column | Description | Variable Name | Units |
---|---|---|---|
1 | Time | Time | [s] |
2 | Horizontal wind speed | V | [m/s] |
3 | Wind direction | Delta | [deg] |
4 | Vertical wind speed | VZ | [m/s] |
5 | Horizontal linear shear | HLinShr | [-] |
6 | Vertical power-law shear | VShr | [-] |
7 | Vertical linear shear | VLinShr | [-] |
8 | Gust (horizontal) velocity | VGust | [m/s] |
The horizontal wind speed at (X, Y, Z) is then calculated using the interpolated columns by
\begin{eqnarray} V_h & = & V \, \left( \frac{Z}{Z_{Ref}} \right) ^ {VShr} & \mbox{power-law wind shear} \\ & + & V \, \frac{H_{LinShr}}{RefWid} \, \left( Y \cos(Delta) + X \sin(Delta) \right) & \mbox{horizontal linear shear} \\ & + & V \, \frac{V_{LinShr}}{RefWid} \, \left( Z-Z_{Ref} \right) & \mbox{vertical linear shear} \\ & + & V_{Gust} & \mbox{gust speed} \end{eqnarray}
|
private |
This subroutine linearly interpolates the columns in the uniform input file to get the values for the requested time, then uses the interpolated values to calclate the wind speed at a point in space represented by InputPosition.
16-Apr-2013 - A. Platt, NREL. Converted to modular framework. Modified for NWTC_Library 2.0
[in] | inputposition | input information: positions X,Y,Z |
[in] | p | Parameters |
[in,out] | m | Misc variables (stores last index into array time for efficiency) |
[in] | op | operating point values; interpolated UniformWind parameters for this time (for glue-code linearization operating point) |
[out] | errstat | error status |
[out] | errmsg | The error message |
[out] | windspeed | return velocities (U,V,W) |
Let
\begin{eqnarray} V_h & = & V \, \left( \frac{Z}{Z_{ref}} \right) ^ {V_{shr}} & \mbox{power-law wind shear} \\ & + & V \, \frac{H_{LinShr}}{RefWid} \, \left( Y \cos(Delta) + X \sin(Delta) \right) & \mbox{horizontal linear shear} \\ & + & V \, \frac{V_{LinShr}}{RefWid} \, \left( Z - Z_{ref} \right) & \mbox{vertical linear shear} \\ & + & V_{Gust} & \mbox{gust speed} \end{eqnarray}
Then the returned wind speed, \(Vt\), is
\(Vt_u = V_h \, \cos(Delta) \)
\(Vt_v = -V_h \, \sin(Delta) \)
\(Vt_w = V_z \)
using input positions \(X,Y,Z\) and interpolated values for time-dependent input-file parameters \(V, Delta, V_z, H_{LinShr}, V_{Shr}, V_{LinShr}, V_{Gust}\).
subroutine, public ifw_uniformwind::ifw_uniformwind_calcoutput | ( | real(dbki), intent(in) | Time, |
real(reki), dimension(:,:), intent(in) | PositionXYZ, | ||
type(ifw_uniformwind_parametertype), intent(in) | p, | ||
real(reki), dimension(:,:), intent(inout) | Velocity, | ||
real(reki), dimension(3), intent(out) | DiskVel, | ||
type(ifw_uniformwind_miscvartype), intent(inout) | m, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine and its subroutines calculate the wind velocity at a set of points given in PositionXYZ.
The UVW velocities are returned in Velocity
[in] | time | time from the start of the simulation |
[in] | positionxyz | Array of XYZ coordinates, 3xN |
[in] | p | Parameters |
[in,out] | velocity | Velocity output at Time (Set to INOUT so that array does not get deallocated) |
[out] | diskvel | HACK for AD14: disk velocity output at Time |
[in,out] | m | Misc variables for optimization (not copied in glue code) |
[out] | errstat | error status |
[out] | errmsg | The error message |
subroutine, public ifw_uniformwind::ifw_uniformwind_end | ( | type(ifw_uniformwind_parametertype), intent(inout) | ParamData, |
type(ifw_uniformwind_miscvartype), intent(inout) | MiscVars, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This routine closes any open files and clears all data stored in UniformWind derived Types.
[in,out] | paramdata | Parameters |
[in,out] | miscvars | Misc variables for optimization (not copied in glue code) |
[out] | errstat | determines if an error has been encountered |
[out] | errmsg | Message about errors |
subroutine, public ifw_uniformwind::ifw_uniformwind_getop | ( | real(dbki), intent(in) | t, |
type(ifw_uniformwind_parametertype), intent(in) | p, | ||
type(ifw_uniformwind_miscvartype), intent(inout) | m, | ||
real(reki), dimension(2), intent(out) | OP_out | ||
) |
Routine to compute the Jacobians of the output (Y) function with respect to the inputs (u).
The partial derivative dY/du is returned. This submodule does not follow the modularization framework.
[in] | t | Current simulation time in seconds |
[out] | op_out | operating point (HWindSpeed and PLexp |
[in] | p | Parameters |
[in,out] | m | Misc/optimization variables |
subroutine, public ifw_uniformwind::ifw_uniformwind_init | ( | type(ifw_uniformwind_initinputtype), intent(in) | InitData, |
type(ifw_uniformwind_parametertype), intent(out) | ParamData, | ||
type(ifw_uniformwind_miscvartype), intent(out) | MiscVars, | ||
real(dbki), intent(in) | Interval, | ||
type(ifw_uniformwind_initoutputtype), intent(out) | InitOutData, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
A subroutine to initialize the UniformWind module.
It reads the uniform wind file and stores the data in an array to use later. It requires an initial reference height (hub height) and width (rotor diameter), both in meters, which are used to define the volume where wind velocities will be calculated. This information is necessary because of the way the shears are defined.
[in] | initdata | Input data for initialization |
[out] | paramdata | Parameters |
[out] | miscvars | Misc variables for optimization (not copied in glue code) |
[out] | initoutdata | Initial output |
[in] | interval | We don't change this. |
[out] | errstat | determines if an error has been encountered |
[out] | errmsg | A message about the error |
subroutine, public ifw_uniformwind::ifw_uniformwind_jacobianpinput | ( | real(dbki), intent(in) | t, |
real(reki), dimension(3), intent(in) | Position, | ||
real(reki), intent(in) | CosPropDir, | ||
real(reki), intent(in) | SinPropDir, | ||
type(ifw_uniformwind_parametertype), intent(in) | p, | ||
type(ifw_uniformwind_miscvartype), intent(inout) | m, | ||
real(r8ki), dimension(3,6), intent(inout) | dYdu | ||
) |
Routine to compute the Jacobians of the output (Y) function with respect to the inputs (u).
The partial derivative dY/du is returned. This submodule does not follow the modularization framework.
[in] | t | Current simulation time in seconds |
[in] | position | XYZ Position at which to find velocity (operating point) |
[in] | cospropdir | cosine of InflowWind propagation direction |
[in] | sinpropdir | sine of InflowWind propagation direction |
[in] | p | Parameters |
[in,out] | m | Misc/optimization variables |
[in,out] | dydu | Partial derivatives of output functions (Y) with respect to the inputs (u) |
\( \frac{\partial Vt_u}{\partial X} = \left[\cos(PropagationDir)\cos(Delta) - \sin(PropagationDir)\sin(Delta) \right] V \, \frac{H_{LinShr}}{RefWid} \, \sin(Delta) \cos(PropagationDir) \)
\( \frac{\partial Vt_v}{\partial X} = \left[-\sin(PropagationDir)\cos(Delta) - \cos(PropagationDir)\sin(Delta) \right] V \, \frac{H_{LinShr}}{RefWid} \, \sin(Delta) \cos(PropagationDir) \)
\( \frac{\partial Vt_w}{\partial X} = 0 \)
\( \frac{\partial Vt_u}{\partial Y} = \left[\cos(PropagationDir)\cos(Delta) - \sin(PropagationDir)\sin(Delta) \right] V \, \frac{H_{LinShr}}{RefWid} \, \cos(Delta) \cos(PropagationDir) \)
\( \frac{\partial Vt_v}{\partial Y} = \left[-\sin(PropagationDir)\cos(Delta) - \cos(PropagationDir)\sin(Delta) \right] V \, \frac{H_{LinShr}}{RefWid} \, \cos(Delta) \cos(PropagationDir) \)
\( \frac{\partial Vt_w}{\partial Y} = 0 \)
\( \frac{\partial Vt_u}{\partial Z} = \left[\cos(PropagationDir)\cos(Delta) - \sin(PropagationDir)\sin(Delta) \right] V \, \left[ \frac{V_{shr}}{Z_{ref}} \left( \frac{Z}{Z_{ref}} \right) ^ {V_{shr}-1} + \frac{V_{LinShr}}{RefWid} \right] \)
\( \frac{\partial Vt_v}{\partial Z} = \left[-\sin(PropagationDir)\cos(Delta) - \cos(PropagationDir)\sin(Delta) \right] V \, \left[ \frac{V_{shr}}{Z_{ref}} \left( \frac{Z}{Z_{ref}} \right) ^ {V_{shr}-1} + \frac{V_{LinShr}}{RefWid} \right] \)
\( \frac{\partial Vt_w}{\partial Z} = 0 \)
\( \frac{\partial Vt_w}{\partial V} = 0 \)
\( \frac{\partial Vt_w}{\partial VShr} = 0 \)
\( \frac{\partial Vt_w}{\partial PropDir} = 0 \)
|
private |
This subroutine linearly interpolates the parameters that are used to compute uniform wind.
[in] | time | time from the start of the simulation |
[in] | p | Parameters |
[in,out] | m | Misc variables (index) |
[out] | op | interpolated V values at input TIME |
|
private |
This function should be deleted ASAP.
Its purpose is to reproduce results of AeroDyn 12.57; when a consensus on the definition of "average velocity" is determined, this function will be removed.
[in] | t | Time |
[in] | p | Parameters |
[in,out] | m | misc/optimization data (storage for efficiency index) |
[out] | errstat | error status from this function |
[out] | errmsg | error message from this function |