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

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

Functions/Subroutines

subroutine, public ifw_userwind_init (InitData, ParamData, MiscVars, Interval, InitOutData, ErrStat, ErrMsg)
 A subroutine to initialize the UserWind module. More...
 
subroutine, public ifw_userwind_calcoutput (Time, PositionXYZ, ParamData, Velocity, DiskVel, MiscVars, ErrStat, ErrMsg)
 This routine and its subroutines calculate the wind velocity at a set of points given in PositionXYZ. More...
 
subroutine, public ifw_userwind_end (ParamData, MiscVars, ErrStat, ErrMsg)
 This routine closes any open files and clears all data stored in UserWind derived Types. More...
 

Variables

type(progdesc), parameter ifw_userwind_ver = ProgDesc( 'IfW_UserWind', '', '' )
 

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_UserWind_Init – Load or create any wind data. Only called at the start of FAST. – IfW_UserWind_CalcOutput – This will be called at each timestep with a series of data points to give wind velocities at. – IfW_UserWind_End – clear out any stored stuff. Only called at the end of FAST.

Function/Subroutine Documentation

◆ ifw_userwind_calcoutput()

subroutine, public ifw_userwind::ifw_userwind_calcoutput ( real(dbki), intent(in)  Time,
real(reki), dimension(:,:), intent(in)  PositionXYZ,
type(ifw_userwind_parametertype), intent(in)  ParamData,
real(reki), dimension(:,:), intent(inout)  Velocity,
real(reki), dimension(3), intent(out)  DiskVel,
type(ifw_userwind_miscvartype), intent(inout)  MiscVars,
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

Note
This routine may be called multiple times in a single timestep!!!
The PositionXYZ coordinates have been rotated into the wind coordinate system where the primary wind flow is along the X-axis. The rotations to PropagationDir are taken care of in the InflowWind_CalcOutput subroutine which calls this routine.
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 variables for optimization (not copied in glue code)
[out]errstaterror status
[out]errmsgThe error message

◆ ifw_userwind_end()

subroutine, public ifw_userwind::ifw_userwind_end ( type(ifw_userwind_parametertype), intent(inout)  ParamData,
type(ifw_userwind_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 UserWind derived Types.

Note
This routine does not satisfy the Modular framework. The InputType is not used, rather an array of points is passed in.
Date
: 16-Apr-2013 - A. Platt, NREL. Converted to modular framework. Modified for NWTC_Library 2.0
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_userwind_init()

subroutine, public ifw_userwind::ifw_userwind_init ( type(ifw_userwind_initinputtype), intent(in)  InitData,
type(ifw_userwind_parametertype), intent(out)  ParamData,
type(ifw_userwind_miscvartype), intent(out)  MiscVars,
real(dbki), intent(in)  Interval,
type(ifw_userwind_initoutputtype), intent(out)  InitOutData,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

A subroutine to initialize the UserWind module.

This routine will initialize the module.

Parameters
[in]initdataInput data for initialization.
[out]paramdataParameters.
[out]miscvarsMisc variables for optimization (not copied in glue code)
[out]initoutdataInitial 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.