Fluid model

ViscoResistiveMHD

Full (non-linear) visco-resistive MHD equations discretized with a variational method.

Overview

ViscoResistiveMHD is the full nonlinear dissipative MHD model in the

entropy formulation. It is the most complete variational MHD model in this family when both viscosity and resistivity are required.

Use cases

This model is appropriate for:
  • nonlinear dissipative MHD simulations
  • entropy-based variational MHD benchmarks
  • studies where both viscosity and resistivity matter

Governing equations

PDEs solved by model:

Continuity:

Momentum:

Entropy:

Induction:

where the internal energy per unit mass is , and and are artificial viscosity and resistivity coefficients.

Normalization

The model uses Alfvén-speed normalization together with entropy-based

thermodynamic units inherited from the chosen internal-energy functional.

Discretization

Time integration is performed by the following propagators (in sequence):
  1. struphy.propagators.variational_density_evolve.VariationalDensityEvolve
  2. struphy.propagators.variational_momentum_advection.VariationalMomentumAdvection
  3. struphy.propagators.variational_entropy_evolve.VariationalEntropyEvolve
  4. struphy.propagators.variational_mag_field_evolve.VariationalMagFieldEvolve
  5. struphy.propagators.variational_viscosity.VariationalViscosity (if with_viscosity is True)
  6. struphy.propagators.variational_resistivity.VariationalResistivity (if with_resistivity is True)

Diagnostics

The following scalars are tracked during simulation:

  • Kinetic energy: en_U
  • Thermodynamic energy: en_thermo
  • Magnetic energy: en_mag
  • Total energy: en_tot
  • Total density / entropy: dens_tot, entr_tot
  • Divergence diagnostic: tot_div_B

Example

Create and initialize the full visco-resistive MHD model:

from struphy.models import ViscoResistiveMHD

model = ViscoResistiveMHD()
model.mhd.density
model.mhd.velocity
model.mhd.entropy
model.em_fields.b_field