Fluid model

ViscoResistiveMHD_with_p

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

Overview

This is the pressure-based full nonlinear dissipative MHD model. It is

the natural counterpart to the entropy- and q-based full MHD variants when pressure is preferred as primitive thermodynamic variable.

Use cases

This model is appropriate for:
  • full nonlinear dissipative MHD in p-formulation
  • comparison against entropy- and q-based full MHD models
  • variational resistive/viscous MHD benchmarks

Governing equations

PDEs solved by model:

Continuity:

Momentum:

Pressure:

Induction:

Here and are artificial viscosity and resistivity coefficients.

Normalization

The characteristic flow speed is the Alfvén speed,

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_pb_evolve.VariationalPBEvolve
  4. struphy.propagators.variational_viscosity.VariationalViscosity (if with_viscosity is True)
  5. 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: dens_tot
  • Divergence diagnostic: tot_div_B

Example

Create and initialize the pressure-based visco-resistive MHD model:

from struphy.models import ViscoResistiveMHD_with_p

model = ViscoResistiveMHD_with_p()
model.mhd.pressure
model.em_fields.b_field