|
subroutine, public | ifw_hawcwind_init (InitInp, p, MiscVars, Interval, InitOut, ErrStat, ErrMsg) |
| This routine is used to initialize the parameters for using HAWC wind format files. More...
|
|
subroutine | validateinput (InitInp, ErrStat, ErrMsg) |
| This routine is used to make sure the initInp data is valid. More...
|
|
subroutine | readturbulencedata (p, InitInp, ErrStat, ErrMsg) |
| This routine is used read the full-field turbulence data stored in HAWC format. More...
|
|
subroutine | scaleturbulence (p, InitInp, Interval, InitOut, MiscVars, ErrStat, ErrMsg) |
| This routine is used read scale the full-field turbulence data stored in HAWC format. More...
|
|
subroutine | addmeanvelocity (p, InitInp, ErrStat, ErrMsg) |
| This routine is used to add a mean wind profile to the HAWC format turbulence data. More...
|
|
subroutine, public | ifw_hawcwind_calcoutput (Time, PositionXYZ, p, Velocity, DiskVel, MiscVars, ErrStat, ErrMsg) |
| This routine acts as a wrapper for the GetWindSpeed routine. More...
|
|
real(reki) function, dimension(3) | ff_interp (Time, Position, p, MiscVars, ErrStat, ErrMsg) |
| This function is used to interpolate into the full-field wind array. More...
|
|
subroutine, public | ifw_hawcwind_end (p, MiscVars, ErrStat, ErrMsg) |
| This subroutine cleans up any data that is still allocated. More...
|
|
|
type(progdesc), parameter | ifw_hawcwind_ver = ProgDesc( 'IfW_HAWCWind', '', '' ) |
|
integer(intki), parameter | nc = 3 |
| number of wind components
|
|
integer(intki), parameter | windprofiletype_none = -1 |
| don't add wind profile; already included in input data
|
|
integer(intki), parameter | windprofiletype_constant = 0 |
| constant wind
|
|
integer(intki), parameter | windprofiletype_log = 1 |
| logarithmic
|
|
integer(intki), parameter | windprofiletype_pl = 2 |
| power law
|
|
integer(intki), parameter | scalemethod_none = 0 |
| no scaling
|
|
integer(intki), parameter | scalemethod_direct = 1 |
| direct scaling factors
|
|
integer(intki), parameter | scalemethod_stddev = 2 |
| requested standard deviation
|
|
This module uses full-field binary wind files to determine the wind inflow.
This module assumes that the origin, (0,0,0), is located at the tower centerline at ground level, and that all units are specified in the metric system (using meters and seconds). Data is assumed periodic in the X direction (and thus not shifted like FFWind files are).
real(reki) function, dimension(3) ifw_hawcwind::ff_interp |
( |
real(dbki), intent(in) |
Time, |
|
|
real(reki), dimension(3), intent(in) |
Position, |
|
|
type(ifw_hawcwind_parametertype), intent(in) |
p, |
|
|
type(ifw_hawcwind_miscvartype), intent(inout) |
MiscVars, |
|
|
integer(intki), intent(out) |
ErrStat, |
|
|
character(*), intent(out) |
ErrMsg |
|
) |
| |
|
private |
This function is used to interpolate into the full-field wind array.
It receives X, Y, Z and TIME from the calling routine. It then computes a time shift due to a nonzero X based upon the average windspeed. The modified time is used to decide which pair of time slices to interpolate within and between. After finding the two time slices, it decides which four grid points bound the (Y,Z) pair. It does a 3-d linear interpolation. This routine assumes that X is downwind, Y is to the left when looking downwind and Z is up. It also assumes that no extrapolation will be needed.
- Parameters
-
[in] | time | Time at which to find wind speed |
[in] | position | takes the place of XGrnd, YGrnd, ZGrnd |
[in] | p | Parameters |
[in,out] | miscvars | Misc variables for optimization (not copied in glue code) |
- Returns
- The U, V, W velocities
- Parameters
-
[out] | errstat | error status |
[out] | errmsg | error message |
subroutine, public ifw_hawcwind::ifw_hawcwind_calcoutput |
( |
real(dbki), intent(in) |
Time, |
|
|
real(reki), dimension(:,:), intent(in) |
PositionXYZ, |
|
|
type(ifw_hawcwind_parametertype), intent(in) |
p, |
|
|
real(reki), dimension(:,:), intent(inout) |
Velocity, |
|
|
real(reki), dimension(3), intent(out) |
DiskVel, |
|
|
type(ifw_hawcwind_miscvartype), intent(inout) |
MiscVars, |
|
|
integer(intki), intent(out) |
ErrStat, |
|
|
character(*), intent(out) |
ErrMsg |
|
) |
| |
This routine acts as a wrapper for the GetWindSpeed routine.
It steps through the array of input positions and calls the GetWindSpeed routine to calculate the velocities at each point.
There are inefficiencies in how this set of routines is coded, but that is a problem for another day. For now, it merely needs to be functional. It can be fixed up and made all pretty later.
16-Apr-2013 - A. Platt, NREL. Converted to modular framework. Modified for NWTC_Library 2.0
- Parameters
-
[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] | miscvars | Misc variables for optimization (not copied in glue code) |
[out] | errstat | error status |
[out] | errmsg | The error message |