I think I'm pretty much at 2b now

This commit is contained in:
Connor
2021-09-12 19:25:40 -06:00
parent 9de9af2dde
commit e83a705e77
8 changed files with 81 additions and 60 deletions

View File

@@ -22,6 +22,7 @@ function laguerre_conway(state::Vector{T}, μ::Float64, time::Float64) where T
sign = dF >= 0 ? 1 : -1
ΔE_new = ΔE - n*F / ( dF + sign * (abs((n-1)^2*dF^2 - n*(n-1)*F*d2F )))
i += 1
if i > 100 throw(ErrorException("LaGuerre-Conway did not converge!")) end
end
F = 1 - a/r0_mag * (1-cos(ΔE))
G = a * σ0/ (μ) * (1-cos(ΔE)) + r0_mag * (a) / (μ) * sin(ΔE)
@@ -40,6 +41,7 @@ function laguerre_conway(state::Vector{T}, μ::Float64, time::Float64) where T
sign = dF >= 0 ? 1 : -1
ΔH_new = ΔH - n*F / ( dF + sign * (abs((n-1)^2*dF^2 - n*(n-1)*F*d2F )))
i += 1
if i > 100 throw(ErrorException("LaGuerre-Conway did not converge!")) end
end
F = 1 - a/r0_mag * (1-cos(ΔH))
G = a * σ0/ (μ) * (1-cos(ΔH)) + r0_mag * (-a) / (μ) * sin(ΔH)
@@ -48,9 +50,6 @@ function laguerre_conway(state::Vector{T}, μ::Float64, time::Float64) where T
Gt = 1 - a/r * (1-cos(ΔH))
end
if i > 100
throw(ErrorException("LaGuerre-Conway did not converge!"))
end
return [ F*state[1:3] + G*state[4:6]; Ft*state[1:3] + Gt*state[4:6]]