SteadyStateDiffEq.jl
SteadyStateDiffEq.jl is the native Julia package for solving steady state problems within the SciML ecosystem. It provides methods for finding equilibrium solutions of differential equations.
Installation
SteadyStateDiffEq.jl is included with DifferentialEquations.jl. To use it standalone:
using Pkg
Pkg.add("SteadyStateDiffEq")
import SteadyStateDiffEqSteady State Solver APIs
SteadyStateDiffEq.DynamicSS — Type
DynamicSS(alg = nothing; tspan = Inf) -> DynamicSSSolve a steady-state problem by evolving the corresponding ODE until the derivative is close to zero.
DynamicSS internally adds a TerminateSteadyState callback. The abstol and reltol keywords passed to solve control the steady-state termination condition. Use odesolve_kwargs to pass separate keyword arguments to the ODE solve.
Arguments
alg: the ODE solver algorithm passed tosolve. Whenalg === nothing, the default ODE solver is selected by the downstream solver package.
Keywords
tspan: the time span used for the ODE solve. Iftspanis a number, it is equivalent to(zero(tspan), tspan).
Fields
alg: ODE solver algorithm, ornothingto request downstream default selection.tspan: time span passed to the internal ODE solve.
Example
julia> using SciMLBase: SteadyStateProblem, solve
julia> using SteadyStateDiffEq
julia> using Sundials: CVODE_BDF
julia> prob = SteadyStateProblem((u, p, t) -> 1 .- u, [0.0]);
julia> sol = solve(prob, DynamicSS(CVODE_BDF()); dt = 1.0);SteadyStateDiffEq.SSRootfind — Type
SSRootfind(alg = nothing) -> SSRootfindSolve a steady-state problem by converting it to a NonlinearProblem and calling a nonlinear solver.
Arguments
alg: the nonlinear solver algorithm passed tosolve. Whenalg === nothing, the default nonlinear solver is selected by the downstream solver package.
Fields
alg: nonlinear solver algorithm, ornothingto request downstream default selection.
Example
julia> using SciMLBase: SteadyStateProblem, solve
julia> using SteadyStateDiffEq
julia> using NonlinearSolve
julia> prob = SteadyStateProblem((u, p, t) -> 1 .- u, [0.0]);
julia> sol = solve(prob, SSRootfind());