Fluid model

LinearMHD

Linear ideal MHD with zero-flow equilibrium for magnetohydrodynamic wave propagation.

Overview

This model simulates small-amplitude perturbations in a magnetized plasma with a static

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

This model is appropriate for studying linear wave propagation in a static magnetized plasma,

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

All velocities are normalized by the Alfvén velocity:

The model therefore uses the Alfvén velocity as its characteristic speed scale.

Discretization

Time integration is performed by the following propagators (in sequence):
  1. struphy.propagators.shear_alfven_propagator.ShearAlfvenPropagator
  2. struphy.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

Create and initialize a linear MHD model:

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"]