OpenFAST
Wind turbine multiphysics simulator
Data Types | Functions/Subroutines | Variables
supercontroller Module Reference

The SuperController module implements a super controller for the FAST.Farm code. More...

Data Types

interface  SC_DLL_CalcOutput
 
interface  SC_DLL_CalcOutput_PROC
 
interface  SC_DLL_End
 
interface  SC_DLL_End_PROC
 
interface  SC_DLL_GetInitData
 
interface  SC_DLL_GetInitData_PROC
 
interface  SC_DLL_Init
 
interface  SC_DLL_Init_PROC
 Definition of the DLL Interface for the SuperController. More...
 
interface  SC_DLL_UpdateStates
 
interface  SC_DLL_UpdateStates_PROC
 

Functions/Subroutines

subroutine, public sc_end (u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg)
 
subroutine, public sc_init (InitInp, u, p, x, xd, z, OtherState, y, m, interval, InitOut, errStat, errMsg)
 
subroutine, public sc_calcoutput (t, u, p, x, xd, z, OtherState, y, m, errStat, errMsg)
 
subroutine, public sc_updatestates (t, n, u, utimes, p, x, xd, z, OtherState, m, ErrStat, ErrMsg)
 This is a loose coupling routine for solving constraint states, integrating continuous states, and updating discrete and other states. More...
 

Variables

type(progdesc), parameter sc_ver = ProgDesc( 'Super Controller', '', '' )
 

Detailed Description

The SuperController module implements a super controller for the FAST.Farm code.

SuperController_Types will be auto-generated by the FAST registry program, based on the variables specified in the SuperController_Registry.txt file.

Function/Subroutine Documentation

◆ sc_calcoutput()

subroutine, public supercontroller::sc_calcoutput ( real(dbki), intent(in)  t,
type(sc_inputtype), intent(in)  u,
type(sc_parametertype), intent(in)  p,
type(sc_continuousstatetype), intent(in)  x,
type(sc_discretestatetype), intent(in)  xd,
type(sc_constraintstatetype), intent(in)  z,
type(sc_otherstatetype), intent(in)  OtherState,
type(sc_outputtype), intent(inout)  y,
type(sc_miscvartype), intent(inout)  m,
integer(intki), intent(out)  errStat,
character(*), intent(out)  errMsg 
)
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
[in,out]yOutputs computed at t (Input only so that mesh con- nectivity information does not have to be recalculated)
[in,out]mMisc variables for optimization (not copied in glue code)
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ sc_end()

subroutine, public supercontroller::sc_end ( type(sc_inputtype), intent(inout)  u,
type(sc_parametertype), intent(inout)  p,
type(sc_continuousstatetype), intent(inout)  x,
type(sc_discretestatetype), intent(inout)  xd,
type(sc_constraintstatetype), intent(inout)  z,
type(sc_otherstatetype), intent(inout)  OtherState,
type(sc_outputtype), intent(inout)  y,
type(sc_miscvartype), intent(inout)  m,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
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]mInitial misc (optimization) variables
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ sc_init()

subroutine, public supercontroller::sc_init ( type(sc_initinputtype), intent(in)  InitInp,
type(sc_inputtype), intent(out)  u,
type(sc_parametertype), intent(out)  p,
type(sc_continuousstatetype), intent(out)  x,
type(sc_discretestatetype), intent(out)  xd,
type(sc_constraintstatetype), intent(out)  z,
type(sc_otherstatetype), intent(out)  OtherState,
type(sc_outputtype), intent(out)  y,
type(sc_miscvartype), intent(out)  m,
real(dbki), intent(in)  interval,
type(sc_initoutputtype), intent(out)  InitOut,
integer(intki), intent(out)  errStat,
character(1024), intent(out)  errMsg 
)
Parameters
[in]initinpInput data for initialization routine
[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]mMisc variables for optimization (not copied in glue code)
[in]intervalCoupling interval in seconds
[out]initoutOutput for initialization routine
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ sc_updatestates()

subroutine, public supercontroller::sc_updatestates ( real(dbki), intent(in)  t,
integer(intki), intent(in)  n,
type(sc_inputtype), intent(inout)  u,
real(dbki), dimension(:), intent(in)  utimes,
type(sc_parametertype), intent(in)  p,
type(sc_continuousstatetype), intent(inout)  x,
type(sc_discretestatetype), intent(inout)  xd,
type(sc_constraintstatetype), intent(inout)  z,
type(sc_otherstatetype), intent(inout)  OtherState,
type(sc_miscvartype), intent(inout)  m,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

This is a loose coupling routine for solving constraint states, integrating continuous states, and updating discrete and other states.

Continuous, constraint, discrete, and other states are updated to values at 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: Continuous states at t + Interval
[in,out]xdInput: Discrete states at t; Output: Discrete states at t + Interval
[in,out]zInput: Constraint states at t; Output: Constraint states at t + Interval
[in,out]otherstateOther states: Other states at t; Output: Other states at t + Interval
[in,out]mMisc variables for optimization (not copied in glue code)
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None