Fluid model
ViscoResistiveLinearMHD_with_q
Linear visco-resistive MHD equations, with the q variable (square root of the pressure), discretized with a variational method.
Overview
This variant of the linear dissipative MHD model uses the square root
of the pressure as primary thermodynamic variable, which is convenient for the corresponding variational discretization.
Use cases
This model is appropriate for:
- linear dissipative MHD in the q-formulation
- comparing p- and q-based variational discretizations
- verification of linear q/B propagators
Governing equations
PDEs solved by model:
Continuity:
Momentum:
Energy-like variable:
Induction:
Here and are artificial viscosity and resistivity coefficients.
Normalization
The flow normalization is Alfvénic:
Discretization
Time integration is performed by the following propagators (in sequence):
struphy.propagators.variational_density_evolve.VariationalDensityEvolvestruphy.propagators.variational_qb_evolve.VariationalQBEvolvestruphy.propagators.variational_viscosity.VariationalViscosity(ifwith_viscosityis True)struphy.propagators.variational_resistivity.VariationalResistivity(ifwith_resistivityis 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 linear visco-resistive q-MHD model:
from struphy.models import ViscoResistiveLinearMHD_with_q
model = ViscoResistiveLinearMHD_with_q()
model.mhd.sqrt_p model.em_fields.b_field