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

This module is a placeholder for any user defined wind types. More...

Functions/Subroutines

subroutine, public ifw_4dext_init (InitInp, p, m, Interval, InitOut, ErrStat, ErrMsg)
 A subroutine to initialize the UserWind module. More...
 
subroutine, public ifw_4dext_calcoutput (Time, PositionXYZ, p, Velocity, m, ErrStat, ErrMsg)
 This routine and its subroutines calculate the wind velocity at a set of points given in PositionXYZ. More...
 
real(siki) function, dimension(3) interp4d (Time, Position, p, m, ErrStat, ErrMsg)
 This routine interpolates a 4-d dataset. More...
 
subroutine, public ifw_4dext_end (ParamData, MiscVars, ErrStat, ErrMsg)
 This routine deallocates any memory in the FDext module. More...
 

Variables

type(progdesc), parameter ifw_4dext_ver = ProgDesc( 'IfW_4Dext', '', '' )
 

Detailed Description

This module is a placeholder for any user defined wind types.

The end user can use this as a template for their code.

Note
This module does not need to exactly conform to the FAST Modularization Framework standards. Three routines are required though: – IfW_4Dext_Init – Load or create any wind data. Only called at the start of FAST. – IfW_4Dext_CalcOutput – This will be called at each timestep with a series of data points to give wind velocities at. – IfW_4Dext_End – clear out any stored stuff. Only called at the end of FAST.

Function/Subroutine Documentation

◆ ifw_4dext_calcoutput()

subroutine, public ifw_4dext::ifw_4dext_calcoutput ( real(dbki), intent(in)  Time,
real(reki), dimension(:,:), intent(in)  PositionXYZ,
type(ifw_4dext_parametertype), intent(in)  p,
real(reki), dimension(:,:), intent(inout)  Velocity,
type(ifw_4dext_miscvartype), intent(in)  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 OutDataVelocity

Parameters
[in]timetime from the start of the simulation
[in]positionxyzArray of XYZ coordinates, 3xN
[in]pParameters
[in,out]velocityVelocity output at Time (Set to INOUT so that array does not get deallocated)
[in]mMisc variables for optimization (not copied in glue code)
[out]errstaterror status
[out]errmsgThe error message

◆ ifw_4dext_end()

subroutine, public ifw_4dext::ifw_4dext_end ( type(ifw_4dext_parametertype), intent(inout)  ParamData,
type(ifw_4dext_miscvartype), intent(inout)  MiscVars,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

This routine deallocates any memory in the FDext module.

Parameters
[in,out]paramdataParameters
[in,out]miscvarsMisc variables for optimization (not copied in glue code)
[out]errstatdetermines if an error has been encountered
[out]errmsgMessage about errors

◆ ifw_4dext_init()

subroutine, public ifw_4dext::ifw_4dext_init ( type(ifw_4dext_initinputtype), intent(in)  InitInp,
type(ifw_4dext_parametertype), intent(out)  p,
type(ifw_4dext_miscvartype), intent(out)  m,
real(dbki), intent(in)  Interval,
type(ifw_4dext_initoutputtype), intent(out)  InitOut,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

A subroutine to initialize the UserWind module.

This routine will initialize the module.

Parameters
[in]initinpInput data for initialization
[out]pParameters
[out]mMisc variables for optimization (not copied in glue code)
[out]initoutInitial output
[in]intervalDo not change this!!
[out]errstatdetermines if an error has been encountered
[out]errmsgA message about the error. See NWTC_Library info for ErrID_* levels.

◆ interp4d()

real(siki) function, dimension(3) ifw_4dext::interp4d ( real(dbki), intent(in)  Time,
real(reki), dimension(3), intent(in)  Position,
type(ifw_4dext_parametertype), intent(in)  p,
type(ifw_4dext_miscvartype), intent(in)  m,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private

This routine interpolates a 4-d dataset.

This method is described here: http://rjwagner49.com/Mathematics/Interpolation.pdf

Parameters
[in]timetime from the start of the simulation
[in]positionArray of XYZ coordinates, 3
[in]pParameters
[in]mMisc variables for optimization (not copied in glue code)
[out]errstatError status
[out]errmsgError message if ErrStat /= ErrID_None
Returns
The interpolated UVW from mV