@@ -129,7 +129,7 @@ prob_ode_2Dlinear_notinplace = ODEProblem(f_2dlinear_notinplace,rand(4,2),(0.0,1
129
129
lotka = @ode_def_nohes LotkaVolterra begin
130
130
dx = a* x - b* x* y
131
131
dy = - c* y + d* x* y
132
- end a=> 1.5 b => 1.0 c => 3.0 d = 1.0
132
+ end a b c d
133
133
134
134
"""
135
135
Lotka-Voltera Equations
@@ -141,14 +141,14 @@ Lotka-Voltera Equations
141
141
142
142
with initial condition ``x=y=1``
143
143
"""
144
- prob_ode_lotkavoltera = ODEProblem (lotka,[1 ; 1 ],(0.0 ,1.0 ))
144
+ prob_ode_lotkavoltera = ODEProblem (lotka,[1.0 , 1.0 ],(0.0 ,1.0 ),[ 1.5 , 1.0 , 3.0 , 1.0 ] )
145
145
146
146
# # Fitzhugh-Nagumo
147
147
148
148
fitz = @ode_def_nohes FitzhughNagumo begin
149
149
dv = v - v^ 3 / 3 - w + l
150
150
dw = τinv* (v + a - b* w)
151
- end a= 0.7 b = 0.8 τinv= ( 1 / 12.5 ) l = 0.5
151
+ end a b τinv l
152
152
"""
153
153
Fitzhugh-Nagumo
154
154
@@ -159,13 +159,13 @@ Fitzhugh-Nagumo
159
159
160
160
with initial condition ``v=w=1``
161
161
"""
162
- prob_ode_fitzhughnagumo = ODEProblem (fitz,[1.0 ;1.0 ],(0.0 ,1.0 ))
162
+ prob_ode_fitzhughnagumo = ODEProblem (fitz,[1.0 ;1.0 ],(0.0 ,1.0 ),( 0.7 , 0.8 , 1 / 12.5 , 0.5 ) )
163
163
164
164
# Van der Pol Equations
165
165
van = @ode_def_noinvhes VanDerPol begin
166
166
dy = μ* (1 - x^ 2 )* y - x
167
167
dx = 1 * y
168
- end μ=> 1.
168
+ end μ
169
169
170
170
"""
171
171
Van der Pol Equations
@@ -181,9 +181,8 @@ with ``μ=1.0`` and ``u0=[0,\\sqrt{3}]``
181
181
182
182
Non-stiff parameters.
183
183
"""
184
- prob_ode_vanderpol = ODEProblem (van,[0 ;sqrt (3 )],(0.0 ,1.0 ))
184
+ prob_ode_vanderpol = ODEProblem (van,[0 ;sqrt (3 )],(0.0 ,1.0 ), 1.0 )
185
185
186
- van_stiff = VanDerPol (μ= 1e6 )
187
186
""" Van der Pol Equations
188
187
189
188
```math
@@ -197,15 +196,15 @@ with ``μ=10^6`` and ``u0=[0,\\sqrt{3}]``
197
196
198
197
Stiff parameters.
199
198
"""
200
- prob_ode_vanderpol_stiff = ODEProblem (van_stiff ,[0 ;sqrt (3 )],(0.0 ,1.0 ))
199
+ prob_ode_vanstiff = ODEProblem (van ,[0 ;sqrt (3 )],(0.0 ,1.0 ), 1e6 )
201
200
202
201
# ROBER
203
202
204
203
rober = @ode_def_noinvjac Rober begin
205
204
dy₁ = - k₁* y₁+ k₃* y₂* y₃
206
205
dy₂ = k₁* y₁- k₂* y₂^ 2 - k₃* y₂* y₃
207
206
dy₃ = k₂* y₂^ 2
208
- end k₁=> 0.04 k₂=> 3e7 k₃=> 1e4
207
+ end k₁ k₂ k₃
209
208
210
209
"""
211
210
The Robertson biochemical reactions:
@@ -224,7 +223,7 @@ Hairer Norsett Wanner Solving Ordinary Differential Equations I - Nonstiff Probl
224
223
225
224
Usually solved on `[0,1e11]`
226
225
"""
227
- prob_ode_rober = ODEProblem (rober,[1.0 ;0.0 ;0.0 ],(0.0 ,1e11 ))
226
+ prob_ode_rober = ODEProblem (rober,[1.0 ;0.0 ;0.0 ],(0.0 ,1e11 ),( 0.04 , 3e7 , 1e4 ) )
228
227
229
228
# Three Body
230
229
const threebody_μ = parse (BigFloat," 0.012277471" ); const threebody_μ′ = 1 - threebody_μ
@@ -268,7 +267,7 @@ rigid = @ode_def_noinvjac RigidBody begin
268
267
dy₁ = I₁* y₂* y₃
269
268
dy₂ = I₂* y₁* y₃
270
269
dy₃ = I₃* y₁* y₂
271
- end I₁=> - 2 I₂=> 1.25 I₃=> - . 5
270
+ end I₁ I₂ I₃
272
271
273
272
"""
274
273
Rigid Body Equations
@@ -291,7 +290,7 @@ or Hairer Norsett Wanner Solving Ordinary Differential Equations I - Nonstiff Pr
291
290
292
291
Usually solved from 0 to 20.
293
292
"""
294
- prob_ode_rigidbody = ODEProblem (rigid,[1.0 ,0.0 ,0.9 ],(0.0 ,20.0 ))
293
+ prob_ode_rigidbody = ODEProblem (rigid,[1.0 ,0.0 ,0.9 ],(0.0 ,20.0 ),( - 2.0 , 1.25 , - 0.5 ) )
295
294
296
295
# Pleiades Problem
297
296
0 commit comments