Closed RohanRajagopal closed 1 year ago
Cast the system into an ODEProblem
and then pass that to CoupledODEs
.
Oh sorry for that, I tried that, but for some reason it didn't work.
Just figured that it was due to one of the parameters being a non-float. Is that expected?
ERROR: MethodError: no method matching nextfloat(::Int64)
Thank you very much.
unfortunately it's impossible to give you any sorts of advice when providing the error information like that. have a look here: https://discourse.julialang.org/t/please-read-make-it-easier-to-help-you/14757
Apologies. Here is a probable MWE
@parameters ω1, a1, b1, c1
@variables t, x1(t), y1(t), z1(t)
D = Differential(t)
eqs_rossler = [
D(x1) ~ (-ω1*y1- z1)
D(y1) ~ ω1*x1 + a1*y1
D(z1) ~ b1 + z1 * (x1 - c1)
]
@named sys_rossler = ODESystem(eqs_rossler)
sys_rossler = structural_simplify(sys_rossler)
u0_rossler = [x1 => 0.01,
y1 => 0.01,
z1 => 0.01]
p_rossler = [ω1 => 1,
a1 => 0.1,
b1 => 0.1,
c1 => 9]
tspan = (0, 300)
dt = 10^-2
prob_rossler = ODEProblem(sys_rossler, u0_rossler, tspan, dt=dt, p_rossler)
rossler_ds = ContinuousDynamicalSystem(prob_rossler)
but if tspan = (0,300.)
it works. Oh is it to differentiate between Discrete and a ContinuousDynamical Systems.
But, thank you.
yes you need a float time.
I was wondering if there was a way to pass a modelingtoolkit
ODESystem
toContinuousDynamicalSystem()
The system is rather big, I wanted to know if I can pass this ODESystem to get the Lyapunov Spectrum.
Thank you very much