From 1e31a8f0224fe564d2a7c18f1ac69790f39bd3a2 Mon Sep 17 00:00:00 2001 From: Marshall Styczinski Date: Sat, 23 Mar 2024 02:39:28 -0700 Subject: [PATCH] Finished implementing radial current term for C2020 --- functions/MagFldParent.m | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/functions/MagFldParent.m b/functions/MagFldParent.m index 6d91786..32daf62 100644 --- a/functions/MagFldParent.m +++ b/functions/MagFldParent.m @@ -340,7 +340,7 @@ % Radial current term introduced by Connerney et al. (2020) % The below evaluation is as detailed from Eqs 23-25 of Wilson et al. (2023): % https://doi.org/10.1007/s11214-023-00961-3 - eBpsi0 = 2e8 * IR / rho / Rp_m; % Eq 23 of Wilson et al. (2023) + eBpsi0 = 2e8 * IR ./ rho / Rp_m; % Eq 23 of Wilson et al. (2023) % The following are Eq 25 of Wilson et al. (2023), with the 1/rho rolled in eBpsi0 eBpsi(abs(zed) < D) = -eBpsi0 * zed / D; eBpsi(abs(zed) >= D) = -eBpsi0 * sign(zed); @@ -348,11 +348,15 @@ % Different calculation of Cartesian mapping back to System III frame since we have % eBpsi term - eBx = eBrho .* (cTheta0*cPhi0*cpsi - sPhi0*spsi) ... - + eBzed * sTheta0*cPhi0; - eBy = eBrho .* (cpsi*cTheta0*sPhi0 + spsi*cPhi0) ... - + eBzed * sTheta0*sPhi0; - eBz = -eBrho .* cpsi*sTheta0 + eBzed * cTheta0; + eBx = eBrho .* ( cPhi0*cTheta0*cpsi - sPhi0*spsi) ... + - eBpsi .* ( cPhi0*cTheta0*spsi + sPhi0*cpsi) ... + + eBzed * sTheta0*cPhi0; + eBy = eBrho .* ( sPhi0*cTheta0*cpsi + cPhi0*spsi) ... + + eBpsi .* (-sPhi0*cTheta0*spsi + cPhi0*cpsi) ... + + eBzed * sTheta0*sPhi0; + eBz = -eBrho .* cpsi*sTheta0 ... + + eBpsi .* sTheta0*spsi ... + + eBzed * cTheta0; else