Skip to content

Commit d0040db

Browse files
committed
Add descriptions for problems
1 parent de2a554 commit d0040db

File tree

3 files changed

+54
-14
lines changed

3 files changed

+54
-14
lines changed

src/ode/brusselator_prob.jl

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,16 @@ function init_brusselator_2d(xyd)
8282
for I in CartesianRange((N, N))
8383
x = xyd[I[1]]
8484
y = xyd[I[2]]
85-
u[I,1] = 22*(y[I]*(1-y[I]))^(3/2)
86-
u[I,2] = 27*(x[I]*(1-x[I]))^(3/2)
85+
u[I,1] = 22*(y*(1-y))^(3/2)
86+
u[I,2] = 27*(x*(1-x))^(3/2)
8787
end
8888
u
8989
end
90-
xyd_brusselator = linspace(0,1,128)
90+
xyd_brusselator = linspace(0,1,32)
9191
prob_ode_brusselator_2d = ODEProblem(brusselator_2d_loop,
9292
init_brusselator_2d(xyd_brusselator),
9393
(0.,11.5),
94-
(3.4, 1., 0.1,
94+
(3.4, 1., 10.,
9595
xyd_brusselator, step(xyd_brusselator),
9696
length(xyd_brusselator)))
9797

@@ -160,13 +160,3 @@ prob_ode_brusselator_1d = ODEProblem(brusselator_1d,
160160
init_brusselator_1d(N_brusselator_1d),
161161
(0.,10.),
162162
(1., 3., 1/50, zeros(N_brusselator_1d)))
163-
164-
"""
165-
[Orego Problem](http://nbviewer.jupyter.org/github/JuliaDiffEq/DiffEqBenchmarks.jl/blob/master/StiffODE/Orego.ipynb)
166-
"""
167-
orego = @ode_def Orego begin
168-
dy1 = p1*(y2+y1*(1-p2*y1-y2))
169-
dy2 = (y3-(1+y1)*y2)/p1
170-
dy3 = p3*(y1-y3)
171-
end p1 p2 p3
172-
prob_ode_orego = ODEProblem(orego,[1.0,2.0,3.0],(0.0,30.0),[77.27,8.375e-6,0.161])

src/ode/filament_prob.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
"""
22
[Filament PDE Discretization](http://nbviewer.jupyter.org/github/JuliaDiffEq/DiffEqBenchmarks.jl/blob/master/StiffODE/Filament.ipynb)
3+
4+
In this problem is a real-world biological model from a paper entitled Magnetic dipole with a flexible tail as a self-propelling microdevice. It is a system of PDEs representing a Kirchhoff model of an elastic rod, where the equations of motion are given by the Rouse approximation with free boundary conditions.
5+
36
"""
47
const T = Float64
58
abstract type AbstractFilamentCache end

src/ode/ode_simple_nonlinear_prob.jl

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,26 @@ prob_ode_mm_linear = ODEProblem(mm_linear,rand(4),(0.0,1.0),mass_matrix=MM_linea
252252

253253
"""
254254
[Hires Problem](http://nbviewer.jupyter.org/github/JuliaDiffEq/DiffEqBenchmarks.jl/blob/master/StiffODE/Hires.ipynb)
255+
256+
It is in the form of ``\\frac{dy}{dt}=f(y), \\quad y(0)=y0,`` with
257+
258+
```math
259+
y \\in ℝ^8, \\quad 0 ≤ t ≤ 321.8122
260+
261+
where ``f`` is defined by
262+
263+
```math
264+
f(y) = \\begin{pmatrix}
265+
−1.71y_1 & +0.43y_2 & +8.32y_3 & +0.0007y_4 & \\\\
266+
1.71y_1 & −8.75y_2 & & & \\\\
267+
−10.03y_3 & +0.43y_4 & +0.035y_5 & & \\\\
268+
8.32y_2 & +1.71y_3 & −1.12y_4 & & \\\\
269+
−1.745y_5 & +0.43y_6 & +0.43y_7 & & \\\\
270+
−280y_6y_8 & +0.69y_4 & +1.71y_5 & −0.43y_6 & +0.69y_7 \\\\
271+
280y_6y_8 & −1.81y_7 & & & \\\\
272+
−280y_6y_8 & +1.81y_7 & & &
273+
\\end{pmatrix}
274+
```
255275
"""
256276
hires = @ode_def Hires begin
257277
dy1 = -p1*y1 + p2*y2 + p3*y3 + p4
@@ -270,3 +290,30 @@ u0[8] = 0.0057
270290
prob_ode_hires = ODEProblem(hires,u0,(0.0,321.8122), (1.71, 0.43, 8.32, 0.0007, 8.75,
271291
10.03, 0.035, 1.12, 1.745, 280.0,
272292
0.69, 1.81))
293+
294+
"""
295+
[Orego Problem](http://nbviewer.jupyter.org/github/JuliaDiffEq/DiffEqBenchmarks.jl/blob/master/StiffODE/Orego.ipynb)
296+
297+
It is in the form of ``\\frac{dy}{dt}=f(y), \\quad y(0)=y0,`` with
298+
299+
```math
300+
y \\in ℝ^3, \\quad 0 ≤ t ≤ 360
301+
302+
where ``f`` is defined by
303+
304+
```math
305+
f(y) = \\begin{pmatrix}
306+
s(y_2 - y_1(1-qy_1-y_2)) \\\\
307+
(y_3 - y_2(1+y_1))/s \\\\
308+
w(y_1-y_3)
309+
\\end{pmatrix}
310+
```
311+
312+
where ``s=77.27``, ``w=0.161`` and ``q=8.375⋅10^{-6}``.
313+
"""
314+
orego = @ode_def Orego begin
315+
dy1 = p1*(y2+y1*(1-p2*y1-y2))
316+
dy2 = (y3-(1+y1)*y2)/p1
317+
dy3 = p3*(y1-y3)
318+
end p1 p2 p3
319+
prob_ode_orego = ODEProblem(orego,[1.0,2.0,3.0],(0.0,30.0),[77.27,8.375e-6,0.161])

0 commit comments

Comments
 (0)