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

Abbreviations: More...

Functions/Subroutines

subroutine, public fvw_init (AFInfo, InitInp, u, p, x, xd, z, OtherState, y, m, Interval, InitOut, ErrStat, ErrMsg)
 This routine is called at the start of the simulation to perform initialization steps. More...
 
subroutine fvw_initmiscvars (p, m, ErrStat, ErrMsg)
 
subroutine fvw_initmiscvarspostparam (p, m, ErrStat, ErrMsg)
 
subroutine fvw_initstates (x, p, ErrStat, ErrMsg)
 
subroutine fvw_initconstraint (z, p, m, ErrStat, ErrMsg)
 
subroutine fvw_init_y (p, u, y, ErrStat, ErrMsg)
 
subroutine fvw_setparametersfrominputs (InitInp, p, ErrStat, ErrMsg)
 Setting parameters and misc from module inputs. More...
 
subroutine fvw_setparametersfrominputfile (InputFileData, p, m, ErrStat, ErrMsg)
 
subroutine fvw_tostring (p, m)
 
subroutine, public fvw_end (u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg)
 This routine is called at the end of the simulation. More...
 
subroutine, public fvw_updatestates (t, n, u, utimes, p, x, xd, z, OtherState, AFInfo, m, errStat, errMsg)
 Loose coupling routine for solving for constraint states, integrating continuous states, and updating discrete and other states. More...
 
subroutine fvw_calccontstatederiv (t, u, p, x, xd, z, OtherState, m, dxdt, ErrStat, ErrMsg)
 This is a tight coupling routine for computing derivatives of continuous states. More...
 
subroutine fvw_euler1 (t, u, p, x, xd, z, OtherState, m, ErrStat, ErrMsg)
 
subroutine fvw_calcconstrstateresidual (t, u, p, x, xd, z_guess, OtherState, m, z_out, AFInfo, ErrStat, ErrMsg, iLabel)
 This is a tight coupling routine for solving for the residual of the constraint state functions. More...
 
subroutine, public fvw_calcoutput (t, u, p, x, xd, z, OtherState, AFInfo, y, m, ErrStat, ErrMsg)
 Routine for computing outputs, used in both loose and tight coupling. More...
 
subroutine ua_init_wrapper (AFInfo, InitInp, interval, p, x, xd, OtherState, m, ErrStat, ErrMsg)
 
subroutine ua_updatestate_wrapper (AFInfo, n, u, p, x, xd, OtherState, m, ErrStat, ErrMsg)
 

Variables

type(progdesc), parameter fvw_ver = ProgDesc( 'FVW', '', '' )
 
real(dbki), parameter oneminusepsilon = 1 - 10000*EPSILON(1.0_DbKi)
 

Detailed Description

Abbreviations:

Function/Subroutine Documentation

◆ fvw_calcconstrstateresidual()

subroutine fvw::fvw_calcconstrstateresidual ( real(dbki), intent(in)  t,
type(fvw_inputtype), intent(in)  u,
type(fvw_parametertype), intent(in)  p,
type(fvw_continuousstatetype), intent(in)  x,
type(fvw_discretestatetype), intent(in)  xd,
type(fvw_constraintstatetype), intent(in)  z_guess,
type(fvw_otherstatetype), intent(in)  OtherState,
type(fvw_miscvartype), intent(inout)  m,
type(fvw_constraintstatetype), intent(out)  z_out,
type(afi_parametertype), dimension(:), intent(in)  AFInfo,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg,
integer(intki), intent(in)  iLabel 
)
private

This is a tight coupling routine for solving for the residual of the constraint state functions.

Parameters
[in]tCurrent simulation time in seconds
[in]uInputs at t
[in]pParameters
[in]xContinuous states at t
[in]xdDiscrete states at t
[in]z_guessConstraint states at t (possibly a guess)
[in]otherstateOther states at t
[in,out]mMisc variables for optimization (not copied in glue code)
[out]z_outResidual of the constraint state functions using
[in]afinfoThe airfoil parameter data
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ fvw_calccontstatederiv()

subroutine fvw::fvw_calccontstatederiv ( real(dbki), intent(in)  t,
type(fvw_inputtype), intent(in)  u,
type(fvw_parametertype), intent(in)  p,
type(fvw_continuousstatetype), intent(in)  x,
type(fvw_discretestatetype), intent(in)  xd,
type(fvw_constraintstatetype), intent(in)  z,
type(fvw_otherstatetype), intent(in)  OtherState,
type(fvw_miscvartype), intent(inout)  m,
type(fvw_continuousstatetype), intent(out)  dxdt,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private

This is a tight coupling routine for computing derivatives of continuous states.

Parameters
[in]tCurrent simulation time in seconds
[in]uInputs at t
[in]pParameters
[in]xContinuous states at t
[in]xdDiscrete states at t
[in]zConstraint states at t
[in]otherstateOther states at t
[in,out]mMisc variables for optimization (not copied in glue code)
[out]dxdtContinuous state derivatives at t
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ fvw_calcoutput()

subroutine, public fvw::fvw_calcoutput ( real(dbki), intent(in)  t,
type(fvw_inputtype), intent(in)  u,
type(fvw_parametertype), intent(in)  p,
type(fvw_continuousstatetype), intent(in)  x,
type(fvw_discretestatetype), intent(in)  xd,
type(fvw_constraintstatetype), intent(in)  z,
type(fvw_otherstatetype), intent(in)  OtherState,
type(afi_parametertype), dimension(:), intent(in)  AFInfo,
type(fvw_outputtype), intent(inout)  y,
type(fvw_miscvartype), intent(inout)  m,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

Routine for computing outputs, used in both loose and tight coupling.

This subroutine is used to compute the output channels (motions and loads) and place them in the WriteOutput() array. The descriptions of the output channels are not given here. Please see the included OutListParameters.xlsx sheet for for a complete description of each output parameter.

Parameters
[in]tCurrent simulation time in seconds
[in]uInputs at Time t
[in]pParameters
[in]xContinuous states at t
[in]xdDiscrete states at t
[in]zConstraint states at t
[in]otherstateOther states at t
[in]afinfoThe airfoil parameter data
[in,out]yOutputs computed at t (Input only so that mesh con- nectivity information does not have to be recalculated)
[in,out]mMisc/optimization variables
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ fvw_end()

subroutine, public fvw::fvw_end ( type(fvw_inputtype), dimension(:), intent(inout)  u,
type(fvw_parametertype), intent(inout)  p,
type(fvw_continuousstatetype), intent(inout)  x,
type(fvw_discretestatetype), intent(inout)  xd,
type(fvw_constraintstatetype), intent(inout)  z,
type(fvw_otherstatetype), intent(inout)  OtherState,
type(fvw_outputtype), intent(inout)  y,
type(fvw_miscvartype), intent(inout)  m,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

This routine is called at the end of the simulation.

Parameters
[in,out]uSystem inputs
[in,out]pParameters
[in,out]xContinuous states
[in,out]xdDiscrete states
[in,out]zConstraint states
[in,out]otherstateOther states
[in,out]ySystem outputs
[in,out]mMisc/optimization variables
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ fvw_euler1()

subroutine fvw::fvw_euler1 ( real(dbki), intent(in)  t,
type(fvw_inputtype), intent(in)  u,
type(fvw_parametertype), intent(in)  p,
type(fvw_continuousstatetype), intent(inout)  x,
type(fvw_discretestatetype), intent(in)  xd,
type(fvw_constraintstatetype), intent(in)  z,
type(fvw_otherstatetype), intent(inout)  OtherState,
type(fvw_miscvartype), intent(inout)  m,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private
Parameters
[in]tCurrent simulation time in seconds
[in]uInput at t
[in]pParameters
[in,out]xContinuous states at t on input at t + dt on output
[in]xdDiscrete states at t
[in]zConstraint states at t (possibly a guess)
[in,out]otherstateOther states at t on input at t + dt on output
[in,out]mMisc/optimization variables
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ fvw_init()

subroutine, public fvw::fvw_init ( type(afi_parametertype), dimension(:), intent(in)  AFInfo,
type(fvw_initinputtype), intent(inout)  InitInp,
type(fvw_inputtype), intent(out)  u,
type(fvw_parametertype), intent(out)  p,
type(fvw_continuousstatetype), intent(out)  x,
type(fvw_discretestatetype), intent(out)  xd,
type(fvw_constraintstatetype), intent(out)  z,
type(fvw_otherstatetype), intent(out)  OtherState,
type(fvw_outputtype), intent(out)  y,
type(fvw_miscvartype), intent(out)  m,
real(dbki), intent(inout)  Interval,
type(fvw_initoutputtype), intent(out)  InitOut,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

This routine is called at the start of the simulation to perform initialization steps.

The parameters are set here and not changed during the simulation. The initial states and initial guess for the input are defined.

Parameters
[in]afinfoThe airfoil parameter data, temporary, for UA..
[in,out]initinpInput data for initialization routine (inout so we can use MOVE_ALLOC)
[out]uAn initial guess for the input; input mesh must be defined
[out]pParameters
[out]xInitial continuous states
[out]xdInitial discrete states
[out]zInitial guess of the constraint states
[out]otherstateInitial other states
[out]yInitial system outputs (outputs are not calculated; only the output mesh is initialized)
[out]mInitial misc/optimization variables
[in,out]intervalCoupling interval in seconds: the rate that (1) FVW_UpdateStates() is called in loose coupling & (2) FVW_UpdateDiscState() is called in tight coupling. Input is the suggested time from the glue code; Output is the actual coupling interval that will be used by the glue code.
[out]initoutOutput for initialization routine
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ fvw_init_y()

subroutine fvw::fvw_init_y ( type(fvw_parametertype), intent(in)  p,
type(fvw_inputtype), intent(inout)  u,
type(fvw_outputtype), intent(out)  y,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private
Parameters
[in]pParameters
[in,out]uAn initial guess for the input; input mesh must be defined
[out]yConstraints
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ fvw_initconstraint()

subroutine fvw::fvw_initconstraint ( type(fvw_constraintstatetype), intent(out)  z,
type(fvw_parametertype), intent(in)  p,
type(fvw_miscvartype), intent(in)  m,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private
Parameters
[out]zConstraints
[in]pParameters
[in]mInitial misc/optimization variables
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ fvw_initmiscvars()

subroutine fvw::fvw_initmiscvars ( type(fvw_parametertype), intent(in)  p,
type(fvw_miscvartype), intent(inout)  m,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private
Parameters
[in]pParameters
[in,out]mInitial misc/optimization variables
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ fvw_initmiscvarspostparam()

subroutine fvw::fvw_initmiscvarspostparam ( type(fvw_parametertype), intent(in)  p,
type(fvw_miscvartype), intent(inout)  m,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private
Parameters
[in]pParameters
[in,out]mInitial misc/optimization variables
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ fvw_initstates()

subroutine fvw::fvw_initstates ( type(fvw_continuousstatetype), intent(out)  x,
type(fvw_parametertype), intent(in)  p,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private
Parameters
[out]xStates
[in]pParameters
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ fvw_setparametersfrominputfile()

subroutine fvw::fvw_setparametersfrominputfile ( type(fvw_inputfile), intent(in)  InputFileData,
type(fvw_parametertype), intent(inout)  p,
type(fvw_miscvartype), intent(inout)  m,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private
Parameters
[in]inputfiledataData stored in the module's input file
[in,out]pParameters
[in,out]mMisc
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ fvw_setparametersfrominputs()

subroutine fvw::fvw_setparametersfrominputs ( type(fvw_initinputtype), intent(inout)  InitInp,
type(fvw_parametertype), intent(inout)  p,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private

Setting parameters and misc from module inputs.

Parameters
[in,out]initinpInput data for initialization routine (inout so we can use MOVE_ALLOC)
[in,out]pParameters
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ fvw_tostring()

subroutine fvw::fvw_tostring ( type(fvw_parametertype), intent(in)  p,
type(fvw_miscvartype), intent(inout)  m 
)
private
Parameters
[in]pParameters
[in,out]mMisc

◆ fvw_updatestates()

subroutine, public fvw::fvw_updatestates ( real(dbki), intent(in)  t,
integer(intki), intent(in)  n,
type(fvw_inputtype), dimension(:), intent(inout)  u,
real(dbki), dimension(:), intent(in)  utimes,
type(fvw_parametertype), intent(in)  p,
type(fvw_continuousstatetype), intent(inout)  x,
type(fvw_discretestatetype), intent(inout)  xd,
type(fvw_constraintstatetype), intent(inout)  z,
type(fvw_otherstatetype), intent(inout)  OtherState,
type(afi_parametertype), dimension(:), intent(in)  AFInfo,
type(fvw_miscvartype), intent(inout)  m,
integer(intki), intent(out)  errStat,
character(*), intent(out)  errMsg 
)

Loose coupling routine for solving for constraint states, integrating continuous states, and updating discrete and other states.

Continuous, constraint, discrete, and other states are updated for t + Interval

Parameters
[in]tCurrent simulation time in seconds
[in]nCurrent simulation time step n = 0,1,...
[in,out]uInputs at utimes (out only for mesh record-keeping in ExtrapInterp routine)
[in]utimesTimes associated with u(:), in seconds
[in]pParameters
[in,out]xInput: Continuous states at t; Output: at t+DTaero
[in,out]xdInput: Discrete states at t; Output: at t+DTaero
[in,out]zInput: Constraint states at t; Output: at t+DTaero
[in,out]otherstateInput: Other states at t; Output: at t+DTaero
[in]afinfoThe airfoil parameter data
[in,out]mMisc/optimization variables
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ ua_init_wrapper()

subroutine fvw::ua_init_wrapper ( type(afi_parametertype), dimension(:), intent(in)  AFInfo,
type(fvw_initinputtype), intent(inout)  InitInp,
real(dbki), intent(inout)  interval,
type(fvw_parametertype), intent(inout)  p,
type(fvw_continuousstatetype), intent(inout)  x,
type(fvw_discretestatetype), intent(inout)  xd,
type(fvw_otherstatetype), intent(inout)  OtherState,
type(fvw_miscvartype), intent(inout)  m,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private
Parameters
[in]afinfoThe airfoil parameter data, temporary, for UA..
[in,out]initinpInput data for initialization routine (inout so we can use MOVE_ALLOC)
[in,out]intervaltime interval
[in,out]pParameters
[in,out]xInitial continuous states
[in,out]xdInitial discrete states
[in,out]otherstateInitial other states
[in,out]mInitial misc/optimization variables
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ ua_updatestate_wrapper()

subroutine fvw::ua_updatestate_wrapper ( type(afi_parametertype), dimension(:), intent(in)  AFInfo,
integer(intki), intent(in)  n,
type(fvw_inputtype), intent(in)  u,
type(fvw_parametertype), intent(in)  p,
type(fvw_continuousstatetype), intent(inout)  x,
type(fvw_discretestatetype), intent(inout)  xd,
type(fvw_otherstatetype), intent(inout)  OtherState,
type(fvw_miscvartype), intent(inout)  m,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private
Parameters
[in]afinfoThe airfoil parameter data, temporary, for UA..
[in]ntime step
[in]pParameters
[in]uInputs
[in,out]xInitial continuous states
[in,out]xdInitial discrete states
[in,out]otherstateInitial other states
[in,out]mInitial misc/optimization variables
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None