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

IceDyn is a module describing ice load on offshore wind turbine supporting structures. More...

Functions/Subroutines

subroutine, public iced_init (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, public iced_end (u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg)
 This routine is called at the end of the simulation. More...
 
subroutine, public iced_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...
 
subroutine, public iced_calcoutput (t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg)
 Routine for computing outputs, used in both loose and tight coupling. More...
 
subroutine, public iced_calccontstatederiv (t, u, p, x, xd, z, OtherState, m, xdot, ErrStat, ErrMsg)
 Routine for computing derivatives of continuous states. More...
 
subroutine, public iced_updatediscstate (t, n, u, p, x, xd, z, OtherState, m, ErrStat, ErrMsg)
 Routine for updating discrete states. More...
 
subroutine, public iced_calcconstrstateresidual (t, u, p, x, xd, z, OtherState, m, Z_residual, ErrStat, ErrMsg)
 Routine for solving for the residual of the constraint state functions. More...
 
subroutine iced_readinput (InitInp, InputFileData, ErrStat, ErrMsg)
 This public subroutine reads the input required for IceDyn from the file whose name is an input parameter. More...
 
subroutine iced_validateinput (InputFileData, ErrStat, ErrMsg)
 This routine performs validity checks on data from the input file. More...
 
subroutine iced_setparameters (InputFileData, p, Interval, Tmax, LegNum, ErrStat, ErrMsg)
 This takes the primary input file data and sets the corresponding parameters. More...
 
subroutine iced_init_otherstates (OtherState, p, x, InputFileData, ErrStat, ErrMsg)
 This routine initializes the other states of the module. More...
 
subroutine iced_generate_randomnum (h, v, t, s, Dm, Pch, p, InputFileData, ErrStat, ErrMsg)
 This routine generate random numbers for the module. More...
 
subroutine iced_rk4 (t, n, u, utimes, p, x, xd, z, OtherState, m, ErrStat, ErrMsg)
 This subroutine implements the fourth-order Runge-Kutta Method (RK4) for numerically integrating ordinary differential equations: More...
 
subroutine iced_ab4 (t, n, u, utimes, p, x, xd, z, OtherState, m, ErrStat, ErrMsg)
 This subroutine implements the fourth-order Adams-Bashforth Method (RK4) for numerically integrating ordinary differential equations: More...
 
subroutine iced_abm4 (t, n, u, utimes, p, x, xd, z, OtherState, m, ErrStat, ErrMsg)
 This subroutine implements the fourth-order Adams-Bashforth-Moulton Method (RK4) for numerically integrating ordinary differential equations: More...
 

Variables

type(progdesc), parameter iced_ver = ProgDesc( 'IceDyn', 'v1.02.01', '23-Jul-2016' )
 

Detailed Description

IceDyn is a module describing ice load on offshore wind turbine supporting structures.

The module is given the module name ModuleName = IceDyn and the abbreviated name ModName = IceD. The mathematical formulation of this module is a subset of the most general form permitted by the FAST modularization framework in tight coupling, thus, the module is developed to support both loose and tight coupling (tight coupling for both time marching and linearization).

References:

Ice Module Manual, by Bingbin Yu, Dale Karr.

Function/Subroutine Documentation

◆ iced_ab4()

subroutine icedyn::iced_ab4 ( real(dbki), intent(in)  t,
integer(intki), intent(in)  n,
type(iced_inputtype), dimension(:), intent(inout)  u,
real(dbki), dimension(:), intent(in)  utimes,
type(iced_parametertype), intent(in)  p,
type(iced_continuousstatetype), intent(inout)  x,
type(iced_discretestatetype), intent(in)  xd,
type(iced_constraintstatetype), intent(in)  z,
type(iced_otherstatetype), intent(inout)  OtherState,
type(iced_miscvartype), intent(inout)  m,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private

This subroutine implements the fourth-order Adams-Bashforth Method (RK4) for numerically integrating ordinary differential equations:

Let f(t, x) = xdot denote the time (t) derivative of the continuous states (x).

x(t+dt) = x(t) + (dt / 24.) * ( 55.*f(t,x) - 59.*f(t-dt,x) + 37.*f(t-2.*dt,x) - 9.*f(t-3.*dt,x) )

See, e.g., http://en.wikipedia.org/wiki/Linear_multistep_method

or

K. E. Atkinson, "An Introduction to Numerical Analysis", 1989, John Wiley & Sons, Inc, Second Edition.

Parameters
[in]tCurrent simulation time in seconds
[in]ntime step number
[in,out]uInputs at t
[in]utimestimes of input
[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
[in,out]otherstateOther states at t
[in,out]mMisc/optimization variables
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ iced_abm4()

subroutine icedyn::iced_abm4 ( real(dbki), intent(in)  t,
integer(intki), intent(in)  n,
type(iced_inputtype), dimension(:), intent(inout)  u,
real(dbki), dimension(:), intent(in)  utimes,
type(iced_parametertype), intent(in)  p,
type(iced_continuousstatetype), intent(inout)  x,
type(iced_discretestatetype), intent(in)  xd,
type(iced_constraintstatetype), intent(in)  z,
type(iced_otherstatetype), intent(inout)  OtherState,
type(iced_miscvartype), intent(inout)  m,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private

This subroutine implements the fourth-order Adams-Bashforth-Moulton Method (RK4) for numerically integrating ordinary differential equations:

Let f(t, x) = xdot denote the time (t) derivative of the continuous states (x).

Adams-Bashforth Predictor: x^p(t+dt) = x(t) + (dt / 24.) * ( 55.*f(t,x) - 59.*f(t-dt,x) + 37.*f(t-2.*dt,x) - 9.*f(t-3.*dt,x) )

Adams-Moulton Corrector: x(t+dt) = x(t) + (dt / 24.) * ( 9.*f(t+dt,x^p) + 19.*f(t,x) - 5.*f(t-dt,x) + 1.*f(t-2.*dt,x) )

See, e.g., http://en.wikipedia.org/wiki/Linear_multistep_method

or

K. E. Atkinson, "An Introduction to Numerical Analysis", 1989, John Wiley & Sons, Inc, Second Edition.

Parameters
[in]tCurrent simulation time in seconds
[in]ntime step number
[in,out]uInputs at t
[in]utimestimes of input
[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
[in,out]otherstateOther states at t
[in,out]mMisc/optimization variables
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ iced_calcconstrstateresidual()

subroutine, public icedyn::iced_calcconstrstateresidual ( real(dbki), intent(in)  t,
type(iced_inputtype), intent(in)  u,
type(iced_parametertype), intent(in)  p,
type(iced_continuousstatetype), intent(in)  x,
type(iced_discretestatetype), intent(in)  xd,
type(iced_constraintstatetype), intent(in)  z,
type(iced_otherstatetype), intent(in)  OtherState,
type(iced_miscvartype), intent(inout)  m,
type(iced_constraintstatetype), intent(out)  Z_residual,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

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]zConstraint states at t
[in]otherstateOther states at t
[out]z_residualResidual of the constraint state functions using the input values described above
[in,out]mMisc/optimization variables
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ iced_calccontstatederiv()

subroutine, public icedyn::iced_calccontstatederiv ( real(dbki), intent(in)  t,
type(iced_inputtype), intent(in)  u,
type(iced_parametertype), intent(in)  p,
type(iced_continuousstatetype), intent(in)  x,
type(iced_discretestatetype), intent(in)  xd,
type(iced_constraintstatetype), intent(in)  z,
type(iced_otherstatetype), intent(in)  OtherState,
type(iced_miscvartype), intent(inout)  m,
type(iced_continuousstatetype), intent(out)  xdot,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

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/optimization variables
[out]xdotContinuous state derivatives at t
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ iced_calcoutput()

subroutine, public icedyn::iced_calcoutput ( real(dbki), intent(in)  t,
type(iced_inputtype), intent(in)  u,
type(iced_parametertype), intent(in)  p,
type(iced_continuousstatetype), intent(in)  x,
type(iced_discretestatetype), intent(in)  xd,
type(iced_constraintstatetype), intent(in)  z,
type(iced_otherstatetype), intent(in)  OtherState,
type(iced_outputtype), intent(inout)  y,
type(iced_miscvartype), intent(inout)  m,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

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

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]yOutputs computed at t (Input only so that mesh connectivity 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

◆ iced_end()

subroutine, public icedyn::iced_end ( type(iced_inputtype), intent(inout)  u,
type(iced_parametertype), intent(inout)  p,
type(iced_continuousstatetype), intent(inout)  x,
type(iced_discretestatetype), intent(inout)  xd,
type(iced_constraintstatetype), intent(inout)  z,
type(iced_otherstatetype), intent(inout)  OtherState,
type(iced_outputtype), intent(inout)  y,
type(iced_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

◆ iced_generate_randomnum()

subroutine icedyn::iced_generate_randomnum ( real(reki), intent(out)  h,
real(reki), intent(out)  v,
real(reki), intent(out)  t,
real(reki), intent(out)  s,
real(reki), intent(out)  Dm,
real(reki), intent(out)  Pch,
type(iced_parametertype), intent(in)  p,
type(iced_inputfile), intent(in)  InputFileData,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private

This routine generate random numbers for the module.

It assumes the parameters are set and that InputFileData contains input for generating random numbers.

Parameters
[out]hRandom ice thickness (m)
[out]vRandom ice velocity (m/s)
[out]tRandom ice loading event time (s)
[out]sRandom ice strength (Pa)
[out]dmRandom ice tooth maximum displacement (m)
[out]pchRandom ice tooth spacing (m)
[in]pParameters of the IceDyn module
[in]inputfiledataData stored in the module's input file
[out]errstatError status
[out]errmsgError message

◆ iced_init()

subroutine, public icedyn::iced_init ( type(iced_initinputtype), intent(in)  InitInp,
type(iced_inputtype), intent(out)  u,
type(iced_parametertype), intent(out)  p,
type(iced_continuousstatetype), intent(out)  x,
type(iced_discretestatetype), intent(out)  xd,
type(iced_constraintstatetype), intent(out)  z,
type(iced_otherstatetype), intent(out)  OtherState,
type(iced_outputtype), intent(out)  y,
type(iced_miscvartype), intent(out)  m,
real(dbki), intent(inout)  Interval,
type(iced_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]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]mInitial misc/optimization variables
[out]initoutOutput for initialization routine
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ iced_init_otherstates()

subroutine icedyn::iced_init_otherstates ( type(iced_otherstatetype), intent(out)  OtherState,
type(iced_parametertype), intent(in)  p,
type(iced_continuousstatetype), intent(in)  x,
type(iced_inputfile), intent(in)  InputFileData,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private

This routine initializes the other states of the module.

It assumes the parameters are set and that InputFileData contains initial conditions for the other states.

Parameters
[out]otherstateInitial other states
[in]pParameters of the IceDyn module
[in]xInitial continuous states
[in]inputfiledataData stored in the module's input file
[out]errstatError status
[out]errmsgError message

◆ iced_readinput()

subroutine icedyn::iced_readinput ( type(iced_initinputtype), intent(in)  InitInp,
type(iced_inputfile), intent(out)  InputFileData,
integer, intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private

This public subroutine reads the input required for IceDyn from the file whose name is an input parameter.

Parameters
[in]initinpthe IceDyn initial input data
[out]inputfiledataData stored in the IceDyn's input file
[out]errstatreturns a non-zero value when an error occurs
[out]errmsgError message if ErrStat /= ErrID_None

◆ iced_rk4()

subroutine icedyn::iced_rk4 ( real(dbki), intent(in)  t,
integer(intki), intent(in)  n,
type(iced_inputtype), dimension(:), intent(inout)  u,
real(dbki), dimension(:), intent(in)  utimes,
type(iced_parametertype), intent(in)  p,
type(iced_continuousstatetype), intent(inout)  x,
type(iced_discretestatetype), intent(in)  xd,
type(iced_constraintstatetype), intent(in)  z,
type(iced_otherstatetype), intent(inout)  OtherState,
type(iced_miscvartype), intent(inout)  m,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private

This subroutine implements the fourth-order Runge-Kutta Method (RK4) for numerically integrating ordinary differential equations:

Let f(t, x) = xdot denote the time (t) derivative of the continuous states (x). Define constants k1, k2, k3, and k4 as k1 = dt * f(t , x_t ) k2 = dt * f(t + dt/2 , x_t + k1/2 ) k3 = dt * f(t + dt/2 , x_t + k2/2 ), and k4 = dt * f(t + dt , x_t + k3 ). Then the continuous states at t = t + dt are x_(t+dt) = x_t + k1/6 + k2/3 + k3/3 + k4/6 + O(dt^5)

For details, see: Press, W. H.; Flannery, B. P.; Teukolsky, S. A.; and Vetterling, W. T. "Runge-Kutta Method" and "Adaptive Step Size Control for Runge-Kutta." ยง16.1 and 16.2 in Numerical Recipes in FORTRAN: The Art of Scientific Computing, 2nd ed. Cambridge, England: Cambridge University Press, pp. 704-716, 1992.

Parameters
[in]tCurrent simulation time in seconds
[in]ntime step number
[in,out]uInputs at t
[in]utimestimes of input
[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
[in,out]otherstateOther states at t
[in,out]mMisc/optimization variables
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ iced_setparameters()

subroutine icedyn::iced_setparameters ( type(iced_inputfile), intent(in)  InputFileData,
type(iced_parametertype), intent(inout)  p,
real(dbki), intent(in)  Interval,
real(dbki), intent(in)  Tmax,
integer(intki), intent(in)  LegNum,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private

This takes the primary input file data and sets the corresponding parameters.

Parameters
[in,out]pParameters of the IceDyn module
[in]inputfiledataData stored in the module's input file
[in]intervalCoupling interval in seconds
[in]tmaxTotal simulation time
[in]legnumLeg number of this IceDyn instance
[out]errstatError status
[out]errmsgError message

◆ iced_updatediscstate()

subroutine, public icedyn::iced_updatediscstate ( real(dbki), intent(in)  t,
integer(intki), intent(in)  n,
type(iced_inputtype), intent(in)  u,
type(iced_parametertype), intent(in)  p,
type(iced_continuousstatetype), intent(in)  x,
type(iced_discretestatetype), intent(inout)  xd,
type(iced_constraintstatetype), intent(in)  z,
type(iced_otherstatetype), intent(in)  OtherState,
type(iced_miscvartype), intent(inout)  m,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

Routine for updating discrete states.

Parameters
[in]tCurrent simulation time in seconds
[in]nCurrent step of the simulation: t = n*Interval
[in]uInputs at t
[in]pParameters
[in]xContinuous states at t
[in,out]xdInput: Discrete states at t; Output: Discrete states at t + Interval
[in]zConstraint states at t
[in]otherstateOther states at t
[in,out]mMisc/optimization variables
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ iced_updatestates()

subroutine, public icedyn::iced_updatestates ( real(dbki), intent(in)  t,
integer(intki), intent(in)  n,
type(iced_inputtype), dimension(:), intent(inout)  u,
real(dbki), dimension(:), intent(in)  utimes,
type(iced_parametertype), intent(in)  p,
type(iced_continuousstatetype), intent(inout)  x,
type(iced_discretestatetype), intent(inout)  xd,
type(iced_constraintstatetype), intent(inout)  z,
type(iced_otherstatetype), intent(inout)  OtherState,
type(iced_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
[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+dt
[in,out]otherstateInput: Other states at t; Output: Other states at t+dt
[in,out]mMisc/optimization variables
[out]errstatError status of the operation
[out]errmsgError message if ErrStat /= ErrID_None

◆ iced_validateinput()

subroutine icedyn::iced_validateinput ( type(iced_inputfile), intent(in)  InputFileData,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)
private

This routine performs validity checks on data from the input file.

Parameters
[in]inputfiledataData stored in the module's input file
[out]errstatError status
[out]errmsgError message