Fluid model
LinearMHD
Linear ideal MHD with zero-flow equilibrium for magnetohydrodynamic wave propagation.
Overview
equilibrium magnetic field and zero background flow. The model solves the linearized ideal magnetohydrodynamic equations, which couple fluid dynamics (density, velocity, pressure) with magnetic field evolution.
The linear MHD system supports three wave families:
- Alfvén waves: incompressible shear waves propagating along
- Fast magnetosonic waves: compressible waves with phase velocity above the Alfvén speed
- Slow magnetosonic waves: compressible waves with phase velocity below the Alfvén speed
All evolved quantities are perturbations around a stationary equilibrium:
- - density perturbation
- - velocity perturbation
- - pressure perturbation
- - magnetic field perturbation
The corresponding equilibrium quantities are:
- - background density
- - background pressure
- - background magnetic field
Use cases
including Alfvén and magnetosonic dynamics around a prescribed equilibrium.
Typical use cases include:
- verification of linear MHD wave dispersion and mode structure
- perturbative studies around static equilibria
- benchmark problems for ideal-MHD field-fluid coupling
Governing equations
PDEs solved by model:
Continuity (mass conservation):
Momentum (Lorentz force):
Energy (adiabatic process):
Induction (Faraday's law):
Normalization
The model therefore uses the Alfvén velocity as its characteristic speed scale.
Discretization
struphy.propagators.shear_alfven_propagator.ShearAlfvenPropagatorstruphy.propagators.magnetosonic.Magnetosonic
Diagnostics
The following scalars are tracked during simulation:
- Kinetic energy (perturbation):
- Magnetic energy (perturbation):
- Internal energy (perturbation): with
- Total perturbed energy:
- Equilibrium magnetic energy:
- Equilibrium internal energy:
- Total magnetic energy:
Example
from struphy.models import LinearMHD
model = LinearMHD()
# Access fields
model.em_fields.b_field
model.mhd.density
model.mhd.velocity
model.mhd.pressure
# Access tracked scalar quantities
model.scalars["en_U"]
model.scalars["en_B"] model.scalars["en_p"]