OpenFAST
Wind turbine multiphysics simulator
Functions/Subroutines | Variables
ifw_bladedffwind Module Reference

This module uses full-field binary wind files to determine the wind inflow. More...

Functions/Subroutines

subroutine, public ifw_bladedffwind_init (InitData, ParamData, MiscVars, Interval, InitOutData, ErrStat, ErrMsg)
 This routine is used read the full-field turbulence data. More...
 
subroutine, public ifw_bladedffwind_calcoutput (Time, PositionXYZ, ParamData, 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, ParamData, MiscVars, ErrStat, ErrMsg)
 This function is used to interpolate into the full-field wind array or tower array if it has been defined and is necessary for the given inputs. More...
 
subroutine, public ifw_bladedffwind_end (ParamData, MiscVars, ErrStat, ErrMsg)
 

Variables

type(progdesc), parameter ifw_bladedffwind_ver = ProgDesc( 'IfW_BladedFFWind', '', '' )
 

Detailed Description

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 shifted by half the grid width to account for turbine yaw (so that data in the X direction actually starts at -1*ParamDataFFYHWid meters).

Function/Subroutine Documentation

◆ ff_interp()

real(reki) function, dimension(3) ifw_bladedffwind::ff_interp ( real(dbki), intent(in)  Time,
real(reki), dimension(3), intent(in)  Position,
type(ifw_bladedffwind_parametertype), intent(in)  ParamData,
type(ifw_bladedffwind_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 or tower array if it has been defined and is necessary for the given inputs.

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 bilinear interpolation for each time slice. Linear interpolation is then used to interpolate between time slices. 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.

If tower points are used, it assumes the velocity at the ground is 0. It interpolates between heights and between time slices, but ignores the Y input.

11/07/1994 - Created by M. Buhl from the original TURBINT. 09/25/1997 - Modified by M. Buhl to use f90 constructs and new variable names. Renamed to FF_Interp. 09/23/2009 - Modified by B. Jonkman to use arguments instead of modules to determine time and position. Height is now relative to the ground 16-Apr-2013 - A. Platt, NREL. Converted to modular framework. Modified for NWTC_Library 2.0

Parameters
[in]timetime (s)
[in]positiontakes the place of XGrnd, YGrnd, ZGrnd
[in]paramdataParameters
[in,out]miscvarsmisc/optimization data (storage for the main data)
Returns
The U, V, W velocities
Parameters
[out]errstaterror status
[out]errmsgerror message

◆ ifw_bladedffwind_calcoutput()

subroutine, public ifw_bladedffwind::ifw_bladedffwind_calcoutput ( real(dbki), intent(in)  Time,
real(reki), dimension(:,:), intent(in)  PositionXYZ,
type(ifw_bladedffwind_parametertype), intent(in)  ParamData,
real(reki), dimension(:,:), intent(inout)  Velocity,
real(reki), dimension(3), intent(out)  DiskVel,
type(ifw_bladedffwind_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]timetime from the start of the simulation
[in]positionxyzArray of XYZ coordinates, 3xN
[in]paramdataParameters
[in,out]velocityVelocity output at Time (Set to INOUT so that array does not get deallocated)
[out]diskvelHACK for AD14: disk velocity output at Time
[in,out]miscvarsmisc/optimization data (storage for the main data)
[out]errstaterror status
[out]errmsgThe error message

◆ ifw_bladedffwind_end()

subroutine, public ifw_bladedffwind::ifw_bladedffwind_end ( type(ifw_bladedffwind_parametertype), intent(inout)  ParamData,
type(ifw_bladedffwind_miscvartype), intent(inout)  MiscVars,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
Parameters
[in,out]paramdataParameters
[in,out]miscvarsmisc/optimization data (storage for the main data)
[out]errstatdetermines if an error has been encountered
[out]errmsgMessage about errors

◆ ifw_bladedffwind_init()

subroutine, public ifw_bladedffwind::ifw_bladedffwind_init ( type(ifw_bladedffwind_initinputtype), intent(in)  InitData,
type(ifw_bladedffwind_parametertype), intent(out)  ParamData,
type(ifw_bladedffwind_miscvartype), intent(out)  MiscVars,
real(dbki), intent(in)  Interval,
type(ifw_bladedffwind_initoutputtype), intent(out)  InitOutData,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

This routine is used read the full-field turbulence data.

09/25/1997 - Created by M. Buhl from GETFILES in ViewWind. 09/23/2009 - modified by B. Jonkman: this subroutine was split into several subroutines (was ReadFF) 16-Apr-2013 - A. Platt, NREL. Converted to modular framework. Modified for NWTC_Library 2.0

Parameters
[in]initdataInitialization data passed to the module
[out]paramdataParameters
[out]miscvarsmisc/optimization data (storage for the main data)
[out]initoutdataInitial output
[in]intervalTime Interval to use (passed through here)
[out]errstatdetermines if an error has been encountered
[out]errmsgMessage about errors