Fluid model
VariationalBarotropicFluid
Barotropic fluid equations discretized with a variational method.
Overview
This is the simplest variational compressible-fluid model in Struphy.
It keeps only density and velocity and uses a barotropic closure rather than a separate entropy or pressure evolution equation.
Use cases
This model is appropriate for:
- barotropic compressible-flow benchmarks
- testing variational density and momentum propagators
- reduced fluid studies without entropy evolution
Governing equations
PDEs solved by model:
Continuity:
Momentum:
where the internal energy per unit mass is .
Normalization
The reference flow speed is the Alfvén speed and the internal energy is
scaled with density:
Discretization
Time integration is performed by the following propagators (in sequence):
struphy.propagators.variational_density_evolve.VariationalDensityEvolvestruphy.propagators.variational_momentum_advection.VariationalMomentumAdvection
Diagnostics
The following scalars are tracked during simulation:
- Kinetic energy:
kinetic_energy - Thermodynamic energy:
thermo_energy - Total energy:
total_energy
Example
Create and initialize a variational barotropic-fluid model:
from struphy.models import VariationalBarotropicFluid
model = VariationalBarotropicFluid()
model.fluid.density model.fluid.velocity