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):
  1. struphy.propagators.variational_density_evolve.VariationalDensityEvolve
  2. struphy.propagators.variational_momentum_advection.VariationalMomentumAdvection
  3. struphy.propagators.variational_entropy_evolve.VariationalEntropyEvolve
  4. struphy.propagators.variational_viscosity.VariationalViscosity (if with_viscosity is 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