NonlinearSystem

System Constructors

ModelingToolkit.NonlinearSystemType
struct NonlinearSystem <: AbstractTimeIndependentSystem

A nonlinear system of equations.

Fields

  • eqs

    Vector of equations defining the system.

  • states

    Unknown variables.

  • ps

    Parameters.

  • var_to_name

    Array variables.

  • observed

  • jac

    Jacobian matrix. Note: this field will not be defined until calculate_jacobian is called on the system.

  • name

    Name: the name of the system. These are required to have unique names.

  • systems

    systems: The internal systems

  • defaults

    defaults: The default values to use when initial conditions and/or parameters are not supplied in ODEProblem.

  • connector_type

    type: type of the system

  • metadata

    metadata: metadata for the system, to be used by downstream packages.

  • tearing_state

    tearing_state: cache for intermediate tearing state

  • substitutions

    substitutions: substitutions generated by tearing.

Examples

@variables x y z
@parameters σ ρ β

eqs = [0 ~ σ*(y-x),
       0 ~ x*(ρ-z)-y,
       0 ~ x*y - β*z]
@named ns = NonlinearSystem(eqs, [x,y,z],[σ,ρ,β])
source

Composition and Accessor Functions

  • get_eqs(sys) or equations(sys): The equations that define the nonlinear system.
  • get_states(sys) or states(sys): The set of states in the nonlinear system.
  • get_ps(sys) or parameters(sys): The parameters of the nonlinear system.

Transformations

Missing docstring.

Missing docstring for structural_simplify. Check Documenter's build log for details.

Missing docstring.

Missing docstring for alias_elimination. Check Documenter's build log for details.

Analyses

Missing docstring.

Missing docstring for ModelingToolkit.isaffine. Check Documenter's build log for details.

Missing docstring.

Missing docstring for ModelingToolkit.islinear. Check Documenter's build log for details.

Applicable Calculation and Generation Functions

calculate_jacobian
generate_jacobian
jacobian_sparsity

Problem Constructors

SciMLBase.NonlinearFunctionMethod
function SciMLBase.NonlinearFunction{iip}(sys::NonlinearSystem, dvs = states(sys),
                                     ps = parameters(sys);
                                     version = nothing,
                                     jac = false,
                                     sparse = false,
                                     kwargs...) where {iip}

Create an NonlinearFunction from the NonlinearSystem. The arguments dvs and ps are used to set the order of the dependent variable and parameter vectors, respectively.

source
SciMLBase.NonlinearProblemMethod
function DiffEqBase.NonlinearProblem{iip}(sys::NonlinearSystem,u0map,
                                          parammap=DiffEqBase.NullParameters();
                                          jac = false, sparse=false,
                                          checkbounds = false,
                                          linenumbers = true, parallel=nothing,
                                          kwargs...) where iip

Generates an NonlinearProblem from a NonlinearSystem and allows for automatically symbolically calculating numerical enhancements.

source

Torn Problem Constructors

Missing docstring.

Missing docstring for BlockNonlinearProblem. Check Documenter's build log for details.

Expression Constructors

ModelingToolkit.NonlinearFunctionExprType
function SciMLBase.NonlinearFunctionExpr{iip}(sys::NonlinearSystem, dvs = states(sys),
                                     ps = parameters(sys);
                                     version = nothing,
                                     jac = false,
                                     sparse = false,
                                     kwargs...) where {iip}

Create a Julia expression for an ODEFunction from the ODESystem. The arguments dvs and ps are used to set the order of the dependent variable and parameter vectors, respectively.

source
ModelingToolkit.NonlinearProblemExprType
function DiffEqBase.NonlinearProblemExpr{iip}(sys::NonlinearSystem,u0map,
                                          parammap=DiffEqBase.NullParameters();
                                          jac = false, sparse=false,
                                          checkbounds = false,
                                          linenumbers = true, parallel=nothing,
                                          kwargs...) where iip

Generates a Julia expression for a NonlinearProblem from a NonlinearSystem and allows for automatically symbolically calculating numerical enhancements.

source