Fluid model
ViscousFluid
Full (non-linear) viscous Navier-Stokes equations discretized with a variational method.
Overview
ViscousFluid is the non-magnetic viscous member of the variational
fluid family. It is suited for compressible hydrodynamics with entropy transport and viscous heating but without magnetic effects.
Use cases
This model is appropriate for:
- nonlinear viscous compressible hydrodynamics
- entropy-based Navier-Stokes benchmarks
- testing variational viscous closures without magnetism
Governing equations
PDEs solved by model:
Continuity:
Momentum:
Entropy:
where the internal energy per unit mass is . and is an artificial viscosity coefficient.
Normalization
The model uses Alfvén-speed scaling for the velocity and entropy-based
thermodynamic units for the internal-energy closure.
Discretization
Time integration is performed by the following propagators (in sequence):
struphy.propagators.variational_density_evolve.VariationalDensityEvolvestruphy.propagators.variational_momentum_advection.VariationalMomentumAdvectionstruphy.propagators.variational_entropy_evolve.VariationalEntropyEvolvestruphy.propagators.variational_viscosity.VariationalViscosity(ifwith_viscosityis True)
Diagnostics
The following scalars are tracked during simulation:
- Kinetic energy:
en_U - Thermodynamic energy:
en_thermo - Total energy:
en_tot - Total density / entropy:
dens_tot,entr_tot
Example
Create and initialize a viscous-fluid model:
from struphy.models import ViscousFluid
model = ViscousFluid()
model.fluid.density
model.fluid.velocity model.fluid.entropy