@@ -51,10 +51,10 @@ prob_ode_fitzhughnagumo = ODEProblem(fitz,[1.0;1.0],(0.0,1.0),(0.7,0.8,1/12.5,0.
51
51
# Van der Pol Equations
52
52
@parameters t μ
53
53
@variables x (t) y (t)
54
- @derivatives D ' ~ t
54
+ D = Differential (t)
55
55
eqs = [D (y) ~ μ* ((1 - x^ 2 )* y - x),
56
56
D (x) ~ y]
57
- de = ODESystem (eqs)
57
+ de = ODESystem (eqs; name = :van_der_pol )
58
58
van = ODEFunction (de, [y,x], [μ], jac= true )
59
59
60
60
"""
@@ -92,11 +92,11 @@ prob_ode_vanstiff = ODEProblem(van,[0;sqrt(3)],(0.0,1.0),1e6)
92
92
# ROBER
93
93
@parameters t k₁ k₂ k₃
94
94
@variables y₁ (t) y₂ (t) y₃ (t)
95
- @derivatives D ' ~ t
95
+ D = Differential (t)
96
96
eqs = [D (y₁) ~ - k₁* y₁+ k₃* y₂* y₃,
97
97
D (y₂) ~ k₁* y₁- k₂* y₂^ 2 - k₃* y₂* y₃,
98
98
D (y₃) ~ k₂* y₂^ 2 ]
99
- de = ODESystem (eqs)
99
+ de = ODESystem (eqs; name = :rober )
100
100
rober = ODEFunction (de, [y₁,y₂,y₃], [k₁,k₂,k₃], jac= true )
101
101
102
102
"""
@@ -169,11 +169,11 @@ prob_ode_threebody = ODEProblem(threebody,[0.994, 0.0, 0.0, big(-2.0015851063790
169
169
170
170
@parameters t I₁ I₂ I₃
171
171
@variables y₁ (t) y₂ (t) y₃ (t)
172
- @derivatives D ' ~ t
172
+ D = Differential (t)
173
173
eqs = [D (y₁) ~ I₁* y₂* y₃,
174
174
D (y₂) ~ I₂* y₁* y₃,
175
175
D (y₃) ~ I₃* y₁* y₂]
176
- de = ODESystem (eqs)
176
+ de = ODESystem (eqs; name = :rigid_body )
177
177
rigid = ODEFunction (de, [y₁,y₂,y₃], [I₁,I₂,I₃], jac= true )
178
178
179
179
"""
@@ -321,7 +321,7 @@ prob_ode_mm_linear = ODEProblem(mm_f,rand(4),(0.0,1.0))
321
321
322
322
@parameters t p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12
323
323
@variables y1 (t) y2 (t) y3 (t) y4 (t) y5 (t) y6 (t) y7 (t) y8 (t)
324
- @derivatives D ' ~ t
324
+ D = Differential (t)
325
325
eqs = [D (y1) ~ - p1* y1 + p2* y2 + p3* y3 + p4,
326
326
D (y2) ~ p1* y1 - p5* y2,
327
327
D (y3) ~ - p6* y3 + p2* y4 + p7* y5,
@@ -331,7 +331,7 @@ eqs = [D(y1) ~ -p1*y1 + p2*y2 + p3*y3 + p4,
331
331
p2* y6 + p11* y7,
332
332
D (y7) ~ p10* y6* y8 - p12* y7,
333
333
D (y8) ~ - p10* y6* y8 + p12* y7]
334
- de = ODESystem (eqs)
334
+ de = ODESystem (eqs; name = :hires )
335
335
hires = ODEFunction (de, [y1,y2,y3,y4,y5,y6,y7,y8],
336
336
[p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12],
337
337
jac= true )
@@ -368,11 +368,11 @@ prob_ode_hires = ODEProblem(hires,u0,(0.0,321.8122), (1.71, 0.43, 8.32, 0.0007,
368
368
369
369
@parameters t p1 p2 p3
370
370
@variables y1 (t) y2 (t) y3 (t)
371
- @derivatives D ' ~ t
371
+ D = Differential (t)
372
372
eqs = [D (y1) ~ p1* (y2+ y1* (1 - p2* y1- y2)),
373
373
D (y2) ~ (y3- (1 + y1)* y2)/ p1,
374
374
D (y3) ~ p3* (y1- y3)]
375
- de = ODESystem (eqs)
375
+ de = ODESystem (eqs; name = :orego )
376
376
jac = calculate_jacobian (de)
377
377
orego = ODEFunction (de, [y1,y2,y3], [p1,p2,p3], jac= true )
378
378
0 commit comments