Fluid model

VariationalCompressibleFluid

Fully compressible fluid equations discretized with a variational method.

Overview

VariationalCompressibleFluid is the entropy-based compressible fluid

model in the variational family. It is the natural non-magnetic counterpart to the full variational MHD models.

Use cases

This model is appropriate for:
  • compressible fluid benchmarks with entropy transport
  • testing the variational fluid propagator stack
  • non-magnetic hydrodynamics with conservative thermodynamics

Governing equations

PDEs solved by model:

Continuity:

Momentum:

Entropy:

where the internal energy per unit mass is .

Normalization

The model uses Alfvén-speed scaling for the flow variables together

with separate units for internal energy and entropy:

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_entropy_evolve.VariationalEntropyEvolve

Diagnostics

The following scalars are tracked during simulation:

  • Kinetic energy: en_U
  • Thermodynamic energy: en_thermo
  • Total energy: en_tot

Example

Create and initialize a variational compressible-fluid model:

from struphy.models import VariationalCompressibleFluid

model = VariationalCompressibleFluid()
model.fluid.density
model.fluid.velocity
model.fluid.entropy