From 4b73dfab7ac76ea24b1088cc5ae3c0545ce56b61 Mon Sep 17 00:00:00 2001 From: Michael Kraus Date: Thu, 25 Feb 2021 10:45:00 +0100 Subject: [PATCH] Fixes in charged particle dynamics. --- src/charged_particle_3d/charged_particle_3d.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/charged_particle_3d/charged_particle_3d.jl b/src/charged_particle_3d/charged_particle_3d.jl index 426204f..afb67c3 100644 --- a/src/charged_particle_3d/charged_particle_3d.jl +++ b/src/charged_particle_3d/charged_particle_3d.jl @@ -70,11 +70,15 @@ function charged_particle_3d_iode_v(t, q, v) v[2] = q[5] v[3] = q[6] v[4] = E₁(t,q) + q[5] * B₃(t,q) - q[6] * B₂(t,q) - v[5] = E₂(t,q) + q[6] * B₁(t,q) - q[4] * B₂(t,q) + v[5] = E₂(t,q) + q[6] * B₁(t,q) - q[4] * B₃(t,q) v[6] = E₃(t,q) + q[4] * B₂(t,q) - q[5] * B₁(t,q) nothing end +function charged_particle_3d_ode(q₀=q₀) + ODE(charged_particle_3d_iode_v, q₀) +end + function charged_particle_3d_iode(q₀=q₀) IODE(charged_particle_3d_iode_ϑ, charged_particle_3d_iode_f, charged_particle_3d_iode_g, q₀, charged_particle_3d_pᵢ(q₀);