Learning the Optimal Linear Hydrodynamic Closure

Code for generating spectral and time-evolution comparisons used in the paper Learning the Optimal Linear Hydrodynamic Closure. The main entry point is Run.py.

Model Card

  • Model file: DSMC3ModelsExp/DSMC3LearnModelFull6.pt
  • Type: PyTorch checkpoint for a learned linear hydrodynamic closure.
  • Use case: Reproduce spectra and time-evolution figures in this project.
  • Input dependencies: spectraV1_225_50_50_250000_5e_06_0_005_1_0_1_0.npz and Boltzmann3_macro_values_Adapt_FullExp.pkl.
  • Limitations: Intended for research reproduction; validate before use outside the reported setup.

Setup

Create a fresh environment and install the dependencies:

conda create -n nc-code python=3.11
conda activate nc-code
pip install -r requirements.txt

If you prefer, you can use venv instead of Conda.

Required Files

Before running Run.py, make sure these files are present:

  • spectraV1_225_50_50_250000_5e_06_0_005_1_0_1_0.npz
  • Boltzmann3_macro_values_Adapt_FullExp.pkl
  • DSMC3ModelsExp/DSMC3LearnModelFull6.pt

Run

Run from the repository root:

python Run.py

The script loads the precomputed data and trained model, then writes:

  • spectra.png
  • dynamics.png

Notes

  • Run.py uses relative paths, so run it from the repository root.
  • JAX is set to CPU mode in the script.
  • jax and torch may need platform-specific installation steps on some systems.
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support