-
-
Notifications
You must be signed in to change notification settings - Fork 236
Closed
Description
For understanding a system, it is often helpful to fix some of the derivatives. Hence, I would like to be able to extend a system and override some previous equations, rather than just adding new equations.
using ModelingToolkit, OrdinaryDiffEq
@parameters t σ ρ β
@variables x(t) y(t) z(t)
D = Differential(t)
eqs = [D(D(x)) ~ σ*(y-x),
D(y) ~ x*(ρ-z)-y,
D(z) ~ x*y - β*z]
@named sys = ODESystem(eqs)
# create a new system where the derivative of z is fixed:
eqs_ext = [D(z) ~ 0]
@named sys_ext = extend(ODESystem(eqs_ext,t,[],[];name=:ext), sys)
equations(sys_ext)
Currently this gives 4 equations.
Instead of the repeated equation for D(z), I expect the previous equation to be replaced.
Metadata
Metadata
Assignees
Labels
No labels