Fluid model

ViscoResistiveDeltafMHD_with_q

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

Overview

This model is the delta f dissipative MHD formulation in the

q-variable representation. It is aimed at perturbative nonlinear MHD studies where the q-formulation is preferred numerically.

Use cases

This model is appropriate for:
  • dissipative delta f MHD with q-thermodynamics
  • comparison against the p-based delta f model
  • nonlinear perturbative benchmarks with viscosity and resistivity

Governing equations

PDEs solved by model:

Continuity:

Momentum:

Energy-like variable:

Induction:

Here and are artificial viscosity and resistivity coefficients.

Normalization

The model uses Alfvén-speed normalization:

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
  • Magnetic energies: en_mag_1, en_mag_2
  • Thermodynamic q-energies: en_thermo_1, en_thermo_2
  • Total energy: en_tot

Example

Create and initialize the visco-resistive delta f q-MHD model:

from struphy.models import ViscoResistiveDeltafMHD_with_q

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