Table Of Contents

DAE Solver (G Dataflow)

Version:
    Last Modified: March 15, 2017

    Solves differential algebraic equations (DAEs) with initial conditions.

    connector_pane_image
    datatype_icon

    DAE

    Formula strings and variable strings that implement differential algebraic equations (DAEs).

    datatype_icon

    f(x,x',t)

    Formula strings that specify the DAEs. The formulas can contain any number of valid variables. For this node, f(x,x',t) = 0.

    datatype_icon

    x name

    Names of the variables.

    datatype_icon

    x' name

    Names of the derivatives of the variables. The length of x' name must be equal to the length of x name.

    datatype_icon

    time name

    Name of the time at which the DAE solver steps or evaluates the state.

    datatype_icon

    initial values

    Vector of the initial values of the variables.

    The components of initial values corresponds to the components of x.

    datatype_icon

    simulation parameters

    Set of parameters to configure the numerical solution of the differential equations.

    datatype_icon

    initial time

    Start time for solving the differential equations.

    datatype_icon

    final time

    End time for solving the differential equations. The final time must be greater than the initial time.

    datatype_icon

    continuous solver

    Type of solver this node uses to solve the differential equations.

    Name Description
    Runge-Kutta 1 (Euler) A fixed step-size, single-step solver of first order. This solver applies to ODEs only.
    Runge-Kutta 2 A fixed step-size, single-step solver of second order. This solver applies to ODEs only.
    Runge-Kutta 3 A fixed step-size, single-step solver of third order. This solver applies to ODEs only.
    Runge-Kutta 4 A fixed step-size, single-step solver of fourth order. This solver applies to ODEs only.
    Runge-Kutta 23 (Variable) A variable step-size solver that starts with a third order method and embeds a set of Bogacki-Shampine coefficients for a second order method. . This solver applies to ODEs only.
    Runge-Kutta 45 (Variable) A variable step-size solver that starts with a fifth order method and embeds a set of Dormand-Prince coefficients for a fourth order method. This solver applies to ODEs only.
    BDF (Variable) A variable step-size, variable order (orders 1 through 5) implementation of the multi-step backwards differentiation formula (BDF). This method is suitable for moderately stiff problems.
    Adams-Moulton (Variable) A variable step-size, multi-step variable order (orders 1 through 12) implementation of the Adams-Moulton predictor-corrector pair in predict-evaluate-correct-evaluate (PECE) mode. This solver provides efficient and accurate solutions for non-stiff ODEs.
    Rosenbrock (Variable) A variable step-size, single-step explicit solver that uses a second order method with third order error estimates. This solver applies to ODEs only.
    Discrete States Only Fixed step-size, single-step algorithm for simulations that contain no continuous functions and therefore no differential equations. This solver applies to ODEs only.
    SDIRK4 A variable step-size solver of the fourth order. This solver is a singly diagonal implicit Runge-Kutta method (SDIRK). This solver applies to ODEs only.
    Radau 5 (Variable) A variable step-size Radau solver of the fifth order.
    Radau 9 (Variable) A variable step-size Radau solver of the ninth order.
    Radau 13 (Variable) A variable step-size Radau solver of the thirteenth order.
    Radau [Variable Order] (Variable) A variable step-size Radau solver of variable order.
    Gear's Method (Variable) A variable step-size, variable order solver that implements a multi-step BDF. This solver is efficient for stiff problems and suitable for DAEs with implicit linear and nonlinear algebraic constraints.
    datatype_icon

    time step

    Interval, in seconds, between the times at which this node evaluates the model and updates the model output. The node uses this input only if you select a fixed step-size solver.

    datatype_icon

    initial time step

    Step size for the first time step that the solver uses to solve the differential equations. The node uses this input only if you select a variable step-size solver.

    datatype_icon

    minimum time step

    Smallest time step size that the solver can use to solve the differential equations. The node uses this input only if you select a variable step-size solver.

    datatype_icon

    maximum time step

    Largest time step size that the solver can use to solve the differential equations. The node uses this input only if you select a variable step-size solver.

    datatype_icon

    absolute tolerance

    Absolute tolerance the solver uses to control the local error for each variable.

    You must specify a scalar tolerance which applies to all variables. absolute tolerance cannot be negative. The corresponding absolute tolerance and relative tolerance cannot both be zeroes.

    datatype_icon

    relative tolerance

    Relative tolerance the solver uses to control the local error for each variable state.

    You must specify a scalar tolerance which applies to all variables. The relative tolerance cannot be negative. The absolute tolerance and relative tolerance cannot both be zeroes.

    datatype_icon

    discrete time step

    Base time step, in seconds, to use for discrete functions.

    This input is used only for the ODE solver.

    If you select a fixed step-size solver, the discrete time step must be an integer multiple of the time step. Otherwise, a run-time error occurs when you attempt to run the simulation.

    datatype_icon

    error in

    Error conditions that occur before this node runs.

    The node responds to this input according to standard error behavior.

    Standard Error Behavior

    Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

    error in does not contain an error error in contains an error
    If no error occurred before the node runs, the node begins execution normally.

    If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

    If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

    Default: No error

    datatype_icon

    initial derivatives

    Initial derivatives of the variables. The length of initial derivatives must be equal to the length of initial values.

    datatype_icon

    times

    Points of time at which the node solves the differential equations.

    datatype_icon

    x

    Values of the variables over time. Each row of x contains the values evaluated at a particular time and each column contains a history of a particular value over time.

    datatype_icon

    x derivatives

    Values of the derivatives of the state over time. For x and x derivatives, each row contains the values evaluated at a particular time and each column contains a history of a particular value over time.

    datatype_icon

    error out

    Error information.

    The node produces this output according to standard error behavior.

    Standard Error Behavior

    Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

    error in does not contain an error error in contains an error
    If no error occurred before the node runs, the node begins execution normally.

    If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

    If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

    Controlling the Local Error

    The solver calculates the local error by the following equation: |x| * relative tolerance + absolute tolerance.

    This node uses this error to adjust the step size. If the error is too large, the solver rejects the current step and reduces the step size for another try. If the error is too small, the solver accepts the current step and increases the step size for next try. The relative tolerance is most significant when x is large. The absolute tolerance is most significant when x is small.

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices


    Recently Viewed Topics