DAEProblem(sys, op, tspan) builds a fully implicit differential
algebraic problem F(du, u, p, t) = 0 from a complete system, as
ModelingToolkit's DAEProblem: the residual of each equation is
rhs - lhs, op gives initial values of unknowns, parameters and
derivatives (D(x) ~ 0.5), and differential_vars marks the unknowns
whose derivatives appear. DAEFunction(sys) builds the residual and,
with jac = TRUE, the Jacobian dF/du + gamma * dF/d(du) as a function
of (du, u, p, gamma, t).
Usage
DAEFunction(sys, jac = FALSE, ...)
DAEProblem(
sys,
op = list(),
tspan = NULL,
...,
jac = FALSE,
du0 = NULL,
u0 = NULL,
p = NULL,
differential_vars = NULL
)
generate_dae_jacobian(sys, ...)Arguments
- sys
A complete
System, or an R functionf(du, u, p, t).- jac
Generate the symbolic Jacobian (for a system); for an R residual function, the Jacobian
jac(du, u, p, gamma, t)=dF/du + gamma * dF/d(du)(also accepted asjac_fn).- ...
Solver options stored with the problem.
- op
Operating point.
- tspan
Time span.
- du0, u0, p
Initial derivatives, initial values and parameters of raw problems.
- differential_vars
Logical vector marking differential variables.
Details
DAEProblem(f, du0, u0, tspan, p) with an R function f(du, u, p, t)
builds a problem without a system. Solve with DFBDF() (the default)
or DImplicitEuler(); the result is a DAESolution with the same
interface as an ODE solution.