![]() |
OpenFAST
Wind turbine multiphysics simulator
|
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' ) |
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.
|
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.
[in] | t | Current simulation time in seconds |
[in] | n | time step number |
[in,out] | u | Inputs at t |
[in] | utimes | times of input |
[in] | p | Parameters |
[in,out] | x | Continuous states at t on input at t + dt on output |
[in] | xd | Discrete states at t |
[in] | z | Constraint states at t |
[in,out] | otherstate | Other states at t |
[in,out] | m | Misc/optimization variables |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
|
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.
[in] | t | Current simulation time in seconds |
[in] | n | time step number |
[in,out] | u | Inputs at t |
[in] | utimes | times of input |
[in] | p | Parameters |
[in,out] | x | Continuous states at t on input at t + dt on output |
[in] | xd | Discrete states at t |
[in] | z | Constraint states at t |
[in,out] | otherstate | Other states at t |
[in,out] | m | Misc/optimization variables |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
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.
[in] | t | Current simulation time in seconds |
[in] | u | Inputs at t |
[in] | p | Parameters |
[in] | x | Continuous states at t |
[in] | xd | Discrete states at t |
[in] | z | Constraint states at t |
[in] | otherstate | Other states at t |
[out] | z_residual | Residual of the constraint state functions using the input values described above |
[in,out] | m | Misc/optimization variables |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
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.
[in] | t | Current simulation time in seconds |
[in] | u | Inputs at t |
[in] | p | Parameters |
[in] | x | Continuous states at t |
[in] | xd | Discrete states at t |
[in] | z | Constraint states at t |
[in] | otherstate | Other states at t |
[in,out] | m | Misc/optimization variables |
[out] | xdot | Continuous state derivatives at t |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
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.
[in] | t | Current simulation time in seconds |
[in] | u | Inputs at t |
[in] | p | Parameters |
[in] | x | Continuous states at t |
[in] | xd | Discrete states at t |
[in] | z | Constraint states at t |
[in] | otherstate | Other states at t |
[in,out] | y | Outputs computed at t (Input only so that mesh connectivity information does not have to be recalculated) |
[in,out] | m | Misc/optimization variables |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
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.
[in,out] | u | System inputs |
[in,out] | p | Parameters |
[in,out] | x | Continuous states |
[in,out] | xd | Discrete states |
[in,out] | z | Constraint states |
[in,out] | otherstate | Other states |
[in,out] | y | System outputs |
[in,out] | m | Misc/optimization variables |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
|
private |
This routine generate random numbers for the module.
It assumes the parameters are set and that InputFileData contains input for generating random numbers.
[out] | h | Random ice thickness (m) |
[out] | v | Random ice velocity (m/s) |
[out] | t | Random ice loading event time (s) |
[out] | s | Random ice strength (Pa) |
[out] | dm | Random ice tooth maximum displacement (m) |
[out] | pch | Random ice tooth spacing (m) |
[in] | p | Parameters of the IceDyn module |
[in] | inputfiledata | Data stored in the module's input file |
[out] | errstat | Error status |
[out] | errmsg | Error message |
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.
[in] | initinp | Input data for initialization routine |
[out] | u | An initial guess for the input; input mesh must be defined |
[out] | p | Parameters |
[out] | x | Initial continuous states |
[out] | xd | Initial discrete states |
[out] | z | Initial guess of the constraint states |
[out] | otherstate | Initial other states |
[out] | y | Initial system outputs (outputs are not calculated; only the output mesh is initialized) |
[out] | m | Initial misc/optimization variables |
[out] | initout | Output for initialization routine |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
|
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.
[out] | otherstate | Initial other states |
[in] | p | Parameters of the IceDyn module |
[in] | x | Initial continuous states |
[in] | inputfiledata | Data stored in the module's input file |
[out] | errstat | Error status |
[out] | errmsg | Error message |
|
private |
This public subroutine reads the input required for IceDyn from the file whose name is an input parameter.
[in] | initinp | the IceDyn initial input data |
[out] | inputfiledata | Data stored in the IceDyn's input file |
[out] | errstat | returns a non-zero value when an error occurs |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
|
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.
[in] | t | Current simulation time in seconds |
[in] | n | time step number |
[in,out] | u | Inputs at t |
[in] | utimes | times of input |
[in] | p | Parameters |
[in,out] | x | Continuous states at t on input at t + dt on output |
[in] | xd | Discrete states at t |
[in] | z | Constraint states at t |
[in,out] | otherstate | Other states at t |
[in,out] | m | Misc/optimization variables |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
|
private |
This takes the primary input file data and sets the corresponding parameters.
[in,out] | p | Parameters of the IceDyn module |
[in] | inputfiledata | Data stored in the module's input file |
[in] | interval | Coupling interval in seconds |
[in] | tmax | Total simulation time |
[in] | legnum | Leg number of this IceDyn instance |
[out] | errstat | Error status |
[out] | errmsg | Error message |
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.
[in] | t | Current simulation time in seconds |
[in] | n | Current step of the simulation: t = n*Interval |
[in] | u | Inputs at t |
[in] | p | Parameters |
[in] | x | Continuous states at t |
[in,out] | xd | Input: Discrete states at t; Output: Discrete states at t + Interval |
[in] | z | Constraint states at t |
[in] | otherstate | Other states at t |
[in,out] | m | Misc/optimization variables |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
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.
[in] | t | Current simulation time in seconds |
[in] | n | Current simulation time step n = 0,1,... |
[in,out] | u | Inputs at utimes |
[in] | utimes | Times associated with u(:), in seconds |
[in] | p | Parameters |
[in,out] | x | Input: Continuous states at t; Output: Continuous states at t + Interval |
[in,out] | xd | Input: Discrete states at t; Output: Discrete states at t + Interval |
[in,out] | z | Input: Constraint states at t; Output: Constraint states at t+dt |
[in,out] | otherstate | Input: Other states at t; Output: Other states at t+dt |
[in,out] | m | Misc/optimization variables |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
|
private |
This routine performs validity checks on data from the input file.
[in] | inputfiledata | Data stored in the module's input file |
[out] | errstat | Error status |
[out] | errmsg | Error message |