Skip to content

Formulation & Physics ​

Height-Integrated Ionospheric Ohm's Law ​

IonosphereElectrodynamics.jl solves the steady-state current continuity equation on the spherical ionospheric thin shell of radius in each hemisphere independently:

where is the electrostatic potential, is the radial outward field-aligned current density at  , and is the   height-integrated spherical conductance tensor in coordinates.

In expanded spherical coordinates, the elliptic operator acting on is

Conductance & Mobility Models ​

All conductance models subtype AbstractConductanceModel and are evaluated via evaluate_conductance:

  • UniformConductance: Spatially constant .

  • SolarEUVConductance: Dayside cosine zenith-angle model combining nightside floors in quadrature with  .

  • MoenBrekkeEUVConductance: Empirical Moen & Brekke (1993) parameterization driven by the radio flux index:

  • AuroralConductance: Wrapper around any base conductance model adding dynamic upward-FAC ( ) precipitation in quadrature using either :tanh_sqrt or :saturating profiles.

  • CustomConductance: User-supplied callback fn(theta, phi, t) -> (sigma_P, sigma_H).

For 3D anisotropic plasma closures, electron_mobility_tensor constructs the   SMatrix tensor     :

julia
using IonosphereElectrodynamics
using StaticArrays

unif = UniformConductance(5.0, 2.0)
mb = MoenBrekkeEUVConductance(; f107 = 150.0, sun_dir = (1.0, 0.0, 0.0))
aur = AuroralConductance(mb; sigma_P_max = 15.0, hall_ratio = 1.5, fac_scale = 1.0e-6)

r_day = SVector(1.0, 0.0, 0.0)
r_night = SVector(-1.0, 0.0, 0.0)
sp_u, sh_u = evaluate_conductance(unif, 0.5, 0.0, r_day, 0.0)
sp_day, sh_day = evaluate_conductance(mb, 0.5 * pi, 0.0, r_day, 0.0)
sp_night, sh_night = evaluate_conductance(aur, 0.5 * pi, pi, r_night, 0.0; jr_outward = 1.0e-6)

M = electron_mobility_tensor(2.0, 3.0, SVector(0.0, 0.0, 1.0); sigma_0 = 5.0)
s_pole = dipole_conductance_tensor(sp_day, sh_day, cos(0.2), sin(0.2), -1.0)
s_eq = dipole_conductance_tensor(sp_day, sh_day, cos(0.49 * pi), sin(0.49 * pi), -1.0)

println("Uniform:     (ΣP, ΣH) = ", (sp_u, sh_u))
println("Dayside EUV: (ΣP, ΣH) = ", round.((sp_day, sh_day); sigdigits = 4))
println("Night+FAC:   (ΣP, ΣH) = ", round.((sp_night, sh_night); sigdigits = 4))
println("Mobility M * z_hat    = ", M * SVector(0.0, 0.0, 1.0))
println("Dipole tensor (polar) = ", round.(s_pole; sigdigits = 4))
println("Dipole tensor (eq)    = ", round.(s_eq; sigdigits = 4))
Uniform:     (ΣP, ΣH) = (5.0, 2.0)
Dayside EUV: (ΣP, ΣH) = (14.83, 19.22)
Night+FAC:   (ΣP, ΣH) = (11.47, 17.14)
Mobility M * z_hat    = [0.0, 0.0, 5.0]
Dipole tensor (polar) = (14.98, 19.32, 14.83)
Dipole tensor (eq)    = (3007.0, 244.5, 19.86)

Dipole Spherical Conductance Tensor ​

Following Goodman (1995) and Ridley et al. (2004), dipole_conductance_tensor maps local Pedersen and Hall conductances onto the spherical ionospheric shell with finite parallel conductance :

This captures equatorial Cowling enhancement in near   and automatically flips the Hall cross-term sign when dipole polarity reverses (dipole_sign = +1 vs -1). Setting use_dip_angle = false simplifies to   .

Analytic Dipole Mapping, Exact Jacobian & Polar Regularity ​

Along an axisymmetric dipole field line   in SMG coordinates:

  • map_dipole_smg maps a 3D SMG point to radius , returning hemisphere index i_hem ∈ {+1, -1, 0} (0 when the field line closes below ), mapped Cartesian coordinates, and .

  • map_dipole_smg_with_jacobian additionally computes the exact closed-form   Jacobian  .

Evaluating the mapped 3D convection electric field via

guarantees    to machine precision because both and are constant along dipole field lines.

Near the magnetic poles (  ), where spherical coordinates have a coordinate singularity, the solver projects at the pole onto the   Fourier mode (pole_grad_N, pole_grad_S) and evaluates smoothly with dipole radial scaling .

When omega_corot is non-zero in IonosphereConfig, eval_ionosphere_E adds    and eval_ionosphere_u_exb adds   directly in 3D, avoiding spherical finite-difference spikes near the low-latitude boundary.

julia
using IonosphereElectrodynamics
using StaticArrays

frame = build_dipole_frame((0.0, 0.0, -3.0e-5); r_iono = 1.017)
x_sim = SVector(1.5, 0.5, 2.0)
b0 = dipole_B0(frame, x_sim)
x_smg = frame.rot * (x_sim - frame.center)
i_hem, x_map, th_map, ph_map, jac = map_dipole_smg_with_jacobian(x_smg, frame.r_iono)

println("i_hem      = ", i_hem, " (", i_hem == 1 ? "North" : i_hem == -1 ? "South" : "Closed", ")")
println("footpoint  = (θ = ", round(rad2deg(th_map); sigdigits = 4), "°, φ = ", round(rad2deg(ph_map); sigdigits = 4), "°)")
println("x_map      = ", round.(x_map; sigdigits = 4))
println("B0         = ", round.(b0; sigdigits = 4))
println("size(jac)  = ", size(jac), ", ∂θ/∂z = ", round(jac[1, 3]; sigdigits = 4))
i_hem      = 1 (North)
footpoint  = (θ = 23.06°, φ = 18.43°)
x_map      = [0.3779, 0.126, 0.9357]
B0         = [-2.507e-6, -8.355e-7, -1.532e-6]
size(jac)  = (2, 3), ∂θ/∂z = -0.1965

Numerical Method & Zero-Allocation Solver ​

Each hemisphere's active grid rows (lat_boundary_deg to the pole) are discretized with second-order central 5-point finite differences:

  • Polar boundary: Average of the adjacent colatitude ring (  for North,   for South).

  • Azimuthal boundary: Periodic in  .

  • Low-latitude boundary: Either homogeneous Dirichlet (low_lat_bc = :dirichlet,  ) or homogeneous Neumann (low_lat_bc = :neumann,   with a single pinned gauge node and active-row FAC neutralization).

The linear system is reordered along anti-diagonal wavefronts (i + j = d + 1) so both the incomplete LU factorization ILU(0) and forward/backward triangular sweeps vectorize with @simd ivdep inside preconditioned BiCGSTAB. All workspaces are pre-allocated inside IonosphereSolver, giving 0 B heap allocations during steady-state calls to solve_ionosphere!.