ABC Flow
The ABC flow (see [1]) is described by a divergence-free differential equation whose flow strongly depends on the initial condition.
using GeometricIntegrators: integrate, ImplicitMidpoint
using GeometricProblems.ABCFlow
-using GeometricEquations: EnsembleProblem
-using GeometricSolutions: GeometricSolution
using Plots
-ics1 = (q = [0., 0., 0.], )
-ics2 = (q = [0.5, 0., 0.], )
-ics3 = (q = [0.6, 0., 0.], )
-
-ensemble_problem = EnsembleProblem(odeproblem().equation, tspan, tstep, [ics1, ics2, ics3], default_parameters)
-ensemble_solution = integrate(ensemble_problem, ImplicitMidpoint())
-
-function plot_geometric_solution!(p::Plots.Plot, solution::GeometricSolution; kwargs...)
- plot!(p, solution.q[:, 1], solution.q[:, 2], solution.q[:, 3]; kwargs...)
-end
+ensemble_solution = integrate(odeensemble(), ImplicitMidpoint())
p = plot()
for solution in ensemble_solution
- plot_geometric_solution!(p, solution)
+ plot!(p, solution.q[:, 1], solution.q[:, 2], solution.q[:, 3])
end
-
-p
Library functions
GeometricProblems.ABCFlow
— ModuleABC Flow
\[\begin{aligned} +p
Library functions
GeometricProblems.ABCFlow
— ModuleABC Flow
\[\begin{aligned} \dot{x} = A\sin(z) + C\cos(y) \\ \dot{y} = B\sin(x) + A\cos(z) \\ \dot{z} = C\sin(y) + B\cos(x) -\end{aligned}\]
- [1]
- E. Hairer, C. Lubich and G. Wanner. Geometric Numerical integration: structure-preserving algorithms for ordinary differential equations (Springer, Berlin, 2006).
Settings
This document was generated with Documenter.jl version 1.3.0 on Thursday 21 March 2024. Using Julia version 1.10.2.