Skip to content

Commit

Permalink
Fixes in charged particle dynamics.
Browse files Browse the repository at this point in the history
  • Loading branch information
michakraus committed Dec 2, 2024
1 parent 5ec953f commit 4b73dfa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/charged_particle_3d/charged_particle_3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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₀);
Expand Down

0 comments on commit 4b73dfa

Please sign in to comment.