NonlinearSystem
System Constructors
ModelingToolkit.NonlinearSystem
— Typestruct 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
connections
connections: connections in a system
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],[σ,ρ,β])
Composition and Accessor Functions
get_eqs(sys)
orequations(sys)
: The equations that define the nonlinear system.get_states(sys)
orstates(sys)
: The set of states in the nonlinear system.get_ps(sys)
orparameters(sys)
: The parameters of the nonlinear system.
Transformations
Missing docstring for structural_simplify
. Check Documenter's build log for details.
Missing docstring for alias_elimination
. Check Documenter's build log for details.
ModelingToolkit.StructuralTransformations.tearing
— Functiontearing(sys; simplify=false)
Tear the nonlinear equations in system. When simplify=true
, we simplify the new residual residual equations after tearing. End users are encouraged to call structural_simplify
instead, which calls this function internally.
Analyses
Missing docstring for ModelingToolkit.isaffine
. Check Documenter's build log for details.
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.NonlinearProblem
— Typefunction DiffEqBase.NonlinearProblem{iip}(sys::NonlinearSystem,u0map,
parammap=DiffEqBase.NullParameters();
jac = false, sparse=false,
checkbounds = false,
linenumbers = true, parallel=SerialForm(),
kwargs...) where iip
Generates an NonlinearProblem from a NonlinearSystem and allows for automatically symbolically calculating numerical enhancements.
Torn Problem Constructors
Missing docstring for BlockNonlinearProblem
. Check Documenter's build log for details.