autosim.experimental.simulations.compressible_fluid#
Simple 2D compressible-fluid simulator (PDEBench-style fields).
State channels are [rho, u, v, p], evolved with a compact finite-volume local Lax-Friedrichs (Rusanov) scheme for the 2D Euler equations on a periodic grid.
- class CompressibleFluid2D(parameters_range=None, output_names=None, return_timeseries=False, log_level='progress_bar', n=64, L=1.0, T=0.8, dt_save=0.01, cfl=0.35, scenario='shear_layers', flux_scheme='llf')[source]#
Bases:
SpatioTemporalSimulatorMinimal 2D compressible Euler simulator.
The solver evolves conservative variables \(U = [\rho, \rho u, \rho v, E]\) using:
\[\partial_t U + \partial_x F(U) + \partial_y G(U) = 0, \qquad E = \frac{p}{\gamma - 1} + \frac{1}{2}\rho(u^2 + v^2).\]The returned primitive-variable channels are \([\rho, u, v, p]\).
- Parameters:
parameters_range (dict[str, tuple[float, float]] | None) –
gamma(adiabatic index),amp(initial perturbation amplitude).return_timeseries (bool) – If True, return full trajectory, otherwise final snapshot.
n (int) – Grid size (n x n).
L (float) – Domain length per axis.
T (float) – Final time.
dt_save (float) – Save interval when return_timeseries=True.
cfl (float) – CFL number for adaptive stepping.
scenario (str) –
Initial-condition family. One of:
"shear_layers"(default): dual shear layers with multimode perturbations"vortex_sheet": single shear sheet with sinusoidal displacement"blast_wave": smooth radial over-pressure/density pulse
flux_scheme (str) –
Numerical interface flux. One of:
"llf": local Lax-Friedrichs (more diffusive, robust)"hll": HLL flux (less diffusive, sharper fronts)
log_level (str)