Fluid model

ViscoResistiveMHD_with_q

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

Overview

This model is the full nonlinear q-based dissipative MHD formulation.

It is useful when the square-root pressure variable is preferred in the variational discretization while still retaining full nonlinear magnetic dynamics.

Use cases

This model is appropriate for:
  • full nonlinear dissipative MHD in q-form
  • comparison against the p- and entropy-based full models
  • variational MHD studies where q is numerically advantageous

Governing equations

PDEs solved by model:

Continuity:

Momentum:

Energy-like variable:

Induction:

Here and are artificial viscosity and resistivity coefficients.

Normalization

The flow variables are normalized with 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_qb_evolve.VariationalQBEvolve
  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 q-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 q-based visco-resistive MHD model:

from struphy.models import ViscoResistiveMHD_with_q

model = ViscoResistiveMHD_with_q()
model.mhd.sqrt_p
model.em_fields.b_field