Skip to main content

Module magnetohydrodynamics

Module magnetohydrodynamics 

Source

Functions§

advection_time
Advection time: τ_a = L / v.
alfven_speed
Alfvén speed: vₐ = B / √(μ₀ ρ).
bennett_pinch_condition
Bennett pinch condition: checks whether I² ≈ 8π N k_B T / μ₀. Returns true when the plasma is in pressure balance.
fast_magnetosonic_speed
Fast magnetosonic speed (perpendicular propagation): v_fast = √(vₐ² + cₛ²).
grad_shafranov_beta_limit
Rough Troyon-like beta limit: β_max ≈ 1 / aspect_ratio.
hartmann_number
Hartmann number: Ha = B L √(σ / μ_visc). Ratio of electromagnetic to viscous forces in a conducting fluid.
is_frozen_in
Returns true when Rm > 100, indicating the magnetic field is frozen into the plasma.
lundquist_number
Lundquist number: S = vₐ L / η. Ratio of resistive diffusion time to Alfvén transit time.
magnetic_diffusion_time
Magnetic diffusion time: τ_d = L² / η.
magnetic_diffusivity
Magnetic diffusivity: η = 1/(μ₀ σ).
magnetic_pressure
Magnetic pressure: P_B = B² / (2 μ₀).
magnetic_reynolds_number
Magnetic Reynolds number: Rm = μ₀ σ v L. Quantifies the ratio of magnetic advection to diffusion.
magnetosonic_mach
Magnetosonic Mach number: M_ms = v / v_fast.
pinch_pressure_balance
Z-pinch pressure balance. Computes the magnetic pressure from the azimuthal field B_θ = μ₀ I / (2π r).
plasma_beta
Plasma beta: β = 2 μ₀ P / B². Ratio of gas pressure to magnetic pressure.
reconnection_electric_field
Reconnection electric field: E = v_in × B (magnitude).
slow_magnetosonic_speed
Slow magnetosonic speed (perpendicular propagation): v_slow = min(vₐ, cₛ).
sweet_parker_rate
Sweet-Parker reconnection rate: v_in / vₐ = 1 / √S.
total_pressure
Total pressure (gas + magnetic): P_total = P + B² / (2 μ₀).