Skip to content
Merged
187 changes: 62 additions & 125 deletions lib/BVProblemLibrary/src/BVProblemLibrary.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,49 +41,29 @@ This test problem is about the optimal-time launching of a satellite into orbit
Given by

```math
\frac{dz_1}{dt}=z_3t_f
```
```math
\frac{dz_2}{dt}=z_4t_f
```
```math
\frac{dz_3}{dt}=A\cos(z_5)t_f
```
```math
\frac{dz_4}{dt}=(A\sin(z_5)-g)t_f
```
```math
\frac{dz_5}{dt}=-z_6\cos(z_5)t_F
```
```math
\frac{dz_6}{dt}=z_6^2\sin(z_5)t_f
```
```math
\frac{dz_7}{dt}=0
\begin{align*}
\frac{dz_1}{dt} &= z_3 t_f, &
\frac{dz_2}{dt} &= z_4 t_f, \\
\frac{dz_3}{dt} &= A\cos(z_5) t_f, &
\frac{dz_4}{dt} &= (A\sin(z_5)-g) t_f, \\
\frac{dz_5}{dt} &= -z_6\cos(z_5) t_F, &
\frac{dz_6}{dt} &= z_6^2\sin(z_5) t_f, \\
\frac{dz_7}{dt} &= 0,
\end{align*}
```

with boundary condition

```math
z_1(0)=0
```
```math
z_2(0)=0
```
```math
z_3(0)=0
```
```math
z_4(0)=0
```
```math
z_5(1)=h
```
```math
z_6(1)=V_c
```
```math
z_7(1)=0
\begin{align*}
z_1(0) &= 0, &
z_2(0) &= 0, \\
z_3(0) &= 0, &
z_4(0) &= 0, \\
z_5(1) &= h, &
z_6(1) &= V_c, \\
z_7(1) &= 0.
\end{align*}
```

# Solution
Expand Down Expand Up @@ -134,49 +114,29 @@ Launch of a satellite into circular orbit from a flat Earth where we assume a un
Given by

```math
\frac{dz_1}{dt}=z_3\frac{V_c}{h}
```
```math
\frac{dz_2}{dt}=z_4\frac{V_c}{h}
```
```math
\frac{dz_3}{dt}=acc\frac{1}{|V_c|\sqrt{1+z_6^2}}
```
```math
\frac{dz_4}{dt}=acc\frac{1}{|V_c|\sqrt{1+z_6^2}}-\frac{g}{V_c}
```
```math
\frac{dz_5}{dt}=0
```
```math
\frac{dz_6}{dt}=-z_5\frac{V_c}{h}
```
```math
\frac{dz_7}{dt}=0
\begin{align*}
\frac{dz_1}{dt} &= z_3 \frac{V_c}{h}, \\[2pt]
\frac{dz_2}{dt} &= z_4 \frac{V_c}{h}, \\[2pt]
\frac{dz_3}{dt} &= acc \frac{1}{|V_c|\sqrt{1+z_6^2}}, \\[2pt]
\frac{dz_4}{dt} &= acc \frac{1}{|V_c|\sqrt{1+z_6^2}}-\frac{g}{V_c}, \\[2pt]
\frac{dz_5}{dt} &= 0, \\[2pt]
\frac{dz_6}{dt} &= -z_5 \frac{V_c}{h}, \\[2pt]
\frac{dz_7}{dt} &= 0,
\end{align*}
```

with boundary condition
with boundary conditions

```math
z_1(0)=0
```
```math
z_2(0)=0
```
```math
z_3(0)=0
```
```math
z_4(0)=0
```
```math
z_5(1)=h
```
```math
z_6(1)=V_c
```
```math
z_7(1)=0
\begin{align*}
z_1(0) &= 0, &
z_2(0) &= 0, \\
z_3(0) &= 0, &
z_4(0) &= 0, \\
z_5(1) &= h, &
z_6(1) &= V_c, \\
z_7(1) &= 0.
\end{align*}
```

# Solution
Expand Down Expand Up @@ -261,49 +221,29 @@ Launch into circular orbit from a flat Earth including athmosferic drag.
Given by

```math
\frac{dz_1}{dt}=z_3\frac{V_c}{h}
```
```math
\frac{dz_2}{dt}=z_4\frac{V_c}{h}
```
```math
\frac{dz_3}{dt}=\frac{f}{V_c}(-\frac{z_6}{z_6^2+z_7^2}-V_c\eta\exp(-z_2\beta)z_3\sqrt{z_3^3+z_4^2})/m
```
```math
\frac{dz_4}{dt}=\frac{f}{V_c}(-\frac{z_7}{z_6^2+z_7^2}-V_c\eta\exp(-z_2\beta)z_4\sqrt{z_3^3+z_4^2})/m - g_{accel}/V_c
```
```math
\frac{dz_5}{dt}=-\eta\beta\exp(-z_2\beta)(z_6z_3+z_7z_4)\sqrt{z_3^3+z_4^2}\frac{V_c}{m}
```
```math
\frac{dz_6}{dt}=\eta\exp(-z_2\beta)(z_6(2z_3^2+z_4^2)+z_7z_3z_4)V_c/\sqrt{z_3^2+z_4^2}/m
```
```math
\frac{dz_7}{dt}=\eta\exp(-z_2\beta)(z_7(z_3^2+2z_4^2)+z_6z_3z_4)V_c/\sqrt{z_3^2+z_4^2}/m
\begin{align*}
\frac{dz_1}{dt} &= z_3 \frac{V_c}{h} \\
\frac{dz_2}{dt} &= z_4 \frac{V_c}{h} \\
\frac{dz_3}{dt} &= \frac{f}{V_c} \left(-\frac{z_6}{z_6^2+z_7^2} - V_c η\exp(-z_2 β) z_3\sqrt{z_3^3+z_4^2}\right)/m \\
\frac{dz_4}{dt} &= \frac{f}{V_c} \left(-\frac{z_7}{z_6^2+z_7^2} - V_c η\exp(-z_2 β) z_4\sqrt{z_3^3+z_4^2}\right)/m - g_{accel}/V_c \\
\frac{dz_5}{dt} &= -ηβ \exp(-z_2 β) (z_6z_3+z_7z_4)\sqrt{z_3^3+z_4^2}\frac{V_c}{m} \\
\frac{dz_6}{dt} &= η \exp(-z_2 β) \left(z_6(2z_3^2+z_4^2)+z_7z_3z_4\right) V_c/\sqrt{z_3^2+z_4^2}/m \\
\frac{dz_7}{dt} &= η \exp(-z_2 β) \left(z_7(z_3^2+2z_4^2)+z_6z_3z_4\right) V_c/\sqrt{z_3^2+z_4^2}/m \\
\end{align*}
```

with boundary condition
with boundary conditions

```math
z_1(0)=0
```
```math
z_2(0)=0
```
```math
z_3(0)=0
```
```math
z_4(0)=0
```
```math
z_5(1)=h
```
```math
z_6(1)=V_c
```
```math
z_7(1)=0
\begin{align*}
z_1(0) &= 0, &
z_2(0) &= 0, \\
z_3(0) &= 0, &
z_4(0) &= 0, \\
z_5(1) &= h, &
z_6(1) &= V_c, \\
z_7(1) &= 0.
\end{align*}
```

# Solution
Expand Down Expand Up @@ -346,22 +286,19 @@ This is an epidemiology model, about the spread of diseases.
Given by

```math
\frac{dy_1}{dt}=\mu-\beta(t)y_1y_3
```
```math
\frac{dy_2}{dt}=\beta(t)y_1y_3-y_2/\lambda
```
```math
\frac{dy_3}{dt}=y_2/\lambda-y_3/\eta
\begin{align*}
\frac{dy_1}{dt} &= μ - β(t) y_1 y_3 \\
\frac{dy_2}{dt} &= β(t) y_1 y_3 - \frac{y_2}{λ} \\
\frac{dy_3}{dt} &= \frac{y_2}{λ} - \frac{y_3}{η}
\end{align*}
```

with boundary condition

```math
y(0)=y(1)
y(0) = y(1)
```


# Solution

No analytical solution
Expand Down
Loading
Loading