Skip to content

Commit 6281f28

Browse files
committed
Add descriptions for the pollution problem
1 parent d0040db commit 6281f28

File tree

2 files changed

+55
-10
lines changed

2 files changed

+55
-10
lines changed

src/ode/ode_simple_nonlinear_prob.jl

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ lotka = @ode_def_nohes LotkaVolterra begin
66
end a b c d
77

88
"""
9-
Lotka-Voltera Equations
9+
Lotka-Voltera Equations (Non-stiff)
1010
1111
```math
1212
\\frac{dx}{dt} = ax - bxy
@@ -24,7 +24,7 @@ fitz = @ode_def_nohes FitzhughNagumo begin
2424
dw = τinv*(v + a - b*w)
2525
end a b τinv l
2626
"""
27-
Fitzhugh-Nagumo
27+
Fitzhugh-Nagumo (Non-stiff)
2828
2929
```math
3030
\\frac{dv}{dt} = v - \\frac{v^3}{3} - w + I_{est}
@@ -81,7 +81,7 @@ rober = @ode_def_noinvjac Rober begin
8181
end k₁ k₂ k₃
8282

8383
"""
84-
The Robertson biochemical reactions:
84+
The Robertson biochemical reactions: (Stiff)
8585
8686
```math
8787
\\begin{align}
@@ -115,7 +115,7 @@ threebody = (du,u,p,t) -> begin
115115
du[4] = u[2] - 2u[3] - threebody_μ′*u[2]/D₁ - threebody_μ*u[2]/D₂
116116
end
117117
"""
118-
The ThreeBody problem as written by Hairer:
118+
The ThreeBody problem as written by Hairer: (Non-stiff)
119119
120120
```math
121121
\\begin{align}
@@ -144,7 +144,7 @@ rigid = @ode_def_noinvjac RigidBody begin
144144
end I₁ I₂ I₃
145145

146146
"""
147-
Rigid Body Equations
147+
Rigid Body Equations (Non-stiff)
148148
149149
```math
150150
\\begin{align}
@@ -176,7 +176,7 @@ pleiades = (du,u,p,t) -> begin
176176
du[1:7] .= v
177177
du[8:14].= w
178178
for i in 14:21
179-
du[i] = zero(u)
179+
du[i] = zero(eltype(u))
180180
end
181181
for i=1:7,j=1:7
182182
if i != j
@@ -187,7 +187,7 @@ pleiades = (du,u,p,t) -> begin
187187
end
188188
end
189189
"""
190-
Pleiades Problem
190+
Pleiades Problem (Non-stiff)
191191
192192
```math
193193
\\begin{align}
@@ -251,7 +251,7 @@ const MM_linear =full(Diagonal(0.5ones(4)))
251251
prob_ode_mm_linear = ODEProblem(mm_linear,rand(4),(0.0,1.0),mass_matrix=MM_linear)
252252

253253
"""
254-
[Hires Problem](http://nbviewer.jupyter.org/github/JuliaDiffEq/DiffEqBenchmarks.jl/blob/master/StiffODE/Hires.ipynb)
254+
[Hires Problem](http://nbviewer.jupyter.org/github/JuliaDiffEq/DiffEqBenchmarks.jl/blob/master/StiffODE/Hires.ipynb) (Stiff)
255255
256256
It is in the form of ``\\frac{dy}{dt}=f(y), \\quad y(0)=y0,`` with
257257
@@ -272,6 +272,8 @@ f(y) = \\begin{pmatrix}
272272
−280y_6y_8 & +1.81y_7 & & &
273273
\\end{pmatrix}
274274
```
275+
276+
http://www.radford.edu/~thompson/vodef90web/problems/demosnodislin/Demos_Pitagora/DemoHires/demohires.pdf
275277
"""
276278
hires = @ode_def Hires begin
277279
dy1 = -p1*y1 + p2*y2 + p3*y3 + p4
@@ -292,7 +294,7 @@ prob_ode_hires = ODEProblem(hires,u0,(0.0,321.8122), (1.71, 0.43, 8.32, 0.0007,
292294
0.69, 1.81))
293295

294296
"""
295-
[Orego Problem](http://nbviewer.jupyter.org/github/JuliaDiffEq/DiffEqBenchmarks.jl/blob/master/StiffODE/Orego.ipynb)
297+
[Orego Problem](http://nbviewer.jupyter.org/github/JuliaDiffEq/DiffEqBenchmarks.jl/blob/master/StiffODE/Orego.ipynb) (Stiff)
296298
297299
It is in the form of ``\\frac{dy}{dt}=f(y), \\quad y(0)=y0,`` with
298300
@@ -310,6 +312,8 @@ w(y_1-y_3)
310312
```
311313
312314
where ``s=77.27``, ``w=0.161`` and ``q=8.375⋅10^{-6}``.
315+
316+
http://www.radford.edu/~thompson/vodef90web/problems/demosnodislin/Demos_Pitagora/DemoOrego/demoorego.pdf
313317
"""
314318
orego = @ode_def Orego begin
315319
dy1 = p1*(y2+y1*(1-p2*y1-y2))

src/ode/pollution_prob.jl

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,46 @@
11
"""
2-
[Pollution Problem](http://nbviewer.jupyter.org/github/JuliaDiffEq/DiffEqBenchmarks.jl/blob/master/StiffODE/Pollution.ipynb)
2+
[Pollution Problem](http://nbviewer.jupyter.org/github/JuliaDiffEq/DiffEqBenchmarks.jl/blob/master/StiffODE/Pollution.ipynb) (Stiff)
3+
4+
This IVP is a stiff system of 20 non-linear Ordinary Differential Equations. It is in the form of ``\\frac{dy}{dt}=f(y), \\quad y(0)=y0,`` with
5+
6+
```math
7+
y \\in ℝ^20, \\quad 0 ≤ t ≤ 60
8+
```
9+
10+
where ``f`` is defined by
11+
12+
```math
13+
f(y) = \\begin{pmatrix}
14+
-\\sum_{j∈\{1,10,14,23,24\}} r_j + \\sum_{j∈\{2,3,9,11,12,22,25\}} r_j \\\\
15+
-r_2 - r_3 - r_9 - r_12 + r_1 + r_{21} \\\\
16+
-r_{15} + r_1 + r_{17} + r_{19} + r_{22} \\\\
17+
-r_2 - r_{16} - r_{17} - r_{23} + r_{15} \\\\
18+
-r_3 + 2r_4 + r_6 + r_7 + r_{13} + r_{20} \\\\
19+
-r_6 - r_8 - r_{14} - r_{20} + r_3 + 2r_{18} \\\\
20+
-r_4 - r_5 - r_6 + r_{13} \\\\
21+
r_4 + r_5 + r_6 + r_7 \\\\
22+
-r_7 - r_8 \\\\
23+
-r_{12} + r_7 + r_9 \\\\
24+
-r_9 - r_{10} + r_8 + r_{11} \\\\
25+
r_9 \\\\
26+
-r_{11} + r_{10} \\\\
27+
-r_{13} + r_{12} \\\\
28+
r_{14} \\\\
29+
-r_{18} - r_{19} + r_{16} \\\\
30+
-r_{20} \\\\
31+
r_{20} \\\\
32+
-r{21} - r_{22} - r_{24} + r_{23} + r_{25} \\\\
33+
-r_{25} + r_{24}
34+
\\end{pmatrix}
35+
```
36+
37+
with the initial condition of
38+
39+
```math
40+
y0 = (0, 0.2, 0, 0.04, 0, 0, 0.1, 0.3, 0.01, 0, 0, 0, 0 ,0, 0, 0, 0.007, 0, 0, 0)^T
41+
```
42+
43+
https://archimede.dm.uniba.it/~testset/report/pollu.pdf
344
"""
445
const k1=.35e0
546
const k2=.266e2

0 commit comments

Comments
 (0)