ComPhy-TaylorGreenVortex

Model and experiment

This package reproduces the Taylor-Green vortex, physics-constrained learning experiment from the paper. ComPhyTaylorGreenVortex uses two separate two-layer tanh networks with width 64. It maps (t, x, y) to (u, v, p) and trains with PDE, initial, and boundary constraints.

The package includes model code, config/config.yaml, training, inference and visualization scripts, the recorded results/, and the selected weight/best_model.pth checkpoint.

Data

Training points are generated online. The analytic reference is included at data/tgv_reference.npz. No external dataset download is needed.

The analytic reference is generated by the included code. Download the dataset before running inference where an external dataset is required. The release configuration uses relative paths, not SCNet personal-directory paths.

Installation and usage

hf download OneScience-Group/ComPhy-TaylorGreenVortex --local-dir ./ComPhy-TaylorGreenVortex
cd ComPhy-TaylorGreenVortex
pip install torch numpy scipy h5py pyyaml matplotlib
python scripts/inference.py
python scripts/result.py

For a fresh training run, use an allocated GPU/DCU compute node with a compatible PyTorch build, keep a separate copy of the supplied checkpoint, then run python scripts/train.py from the package root. The full budget is specified in config/config.yaml. Cluster-specific Slurm scripts, if present, need adaptation outside the original cluster.

Training and reported result

The completed run used 100,000 steps, resampling 1,000 interior points each step. The analytic solution was used for validation and checkpoint selection, not as interior supervision. The best checkpoint came from step 97,000.

Measured squared L2 error was 9.13473e-7 and maximum absolute error was 0.011698. Paper Table 2 reports 3.619e-5 and 0.006378, respectively. Grid, random seed, and some implementation details are not proven identical, so this is not a strict same-protocol accuracy comparison. See results/ for the recorded metrics and visualizations. The supplied checkpoint comes from a completed run; another run may differ.

Source and license

Downloads last month
102
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support