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):
struphy.propagators.variational_density_evolve.VariationalDensityEvolvestruphy.propagators.variational_momentum_advection.VariationalMomentumAdvectionstruphy.propagators.variational_pb_evolve.VariationalPBEvolvestruphy.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 - 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