This package reproduces the steady two-dimensional cylinder flow, structure transfer experiment from the paper. PsiNNFlow maps planar coordinates (x, y) to pressure and velocity (p, u, v). The package also includes teacher training, student distillation, structure extraction, and fixed-structure reconstruction.
The package includes model code, config/config.yaml, training, inference and visualization scripts, the recorded results/, and the selected weight/best_model.pth checkpoint.
Download OneScience/PsiNN-CylinderFlow with modelscope download --dataset OneScience/PsiNN-CylinderFlow --local_dir ./data/flow. Five CSV files with columns x, y, p, u, v. Interior field truth is for evaluation only; boundary samples are used in training.
Original dataset: https://github.com/ZitiLiu/Psi-NN/tree/main/Database/flow Download the dataset before running inference where an external dataset is required. The release configuration uses relative paths, not SCNet personal-directory paths.
hf download OneScience-Group/PsiNN-CylinderFlow-StructureTransfer --local-dir ./PsiNN-CylinderFlow-StructureTransfer
cd PsiNN-CylinderFlow-StructureTransfer
pip install -r requirements.txt
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.
The cylinder-flow run used all 20,486 collocation points and the planned 200,000 Adam steps. The selected checkpoint minimizes the physics-residual and boundary losses. Interior field truth was not used for training or checkpoint selection.
Full-field MSE for pressure, horizontal velocity, and vertical velocity was 7.348e-5, 2.965e-5, and 1.998e-5. The paper reference values cited in the package are 7.838e-4, 1.854e-4, and 1.765e-5; the last component is higher here. Source-equation sampling and structure-transfer details differ from the paper protocol, so these are not exact like-for-like reproduction claims. See results/ for the recorded metrics and visualizations. The supplied checkpoint comes from a completed run; another run may differ.
results/teacher_flow/predictions.npz 946.3 KiBresults/psi_flow/predictions.npz 943.7 KiBresults/burgers_discovery/source_predictions.npz 183.9 KiBresults/laplace_discovery/source_predictions.npz 136.5 KiBweight/teacher_flow_last.pth 112.4 KiBweight/teacher_flow_best.pth 112.2 KiBweight/psi_flow_last.pth 78.3 KiBweight/best_model.pth 77 KiBweight/burgers_reconstructed_best.pth 32 KiBweight/burgers_reconstructed_last.pth 32 KiBweight/laplace_reconstructed_best.pth 31.5 KiBweight/laplace_reconstructed_last.pth 31.5 KiBweight/burgers_teacher_best.pth 29.9 KiBweight/burgers_teacher_last.pth 29.9 KiBweight/laplace_teacher_best.pth 29.1 KiBweight/laplace_teacher_last.pth 29.1 KiBweight/burgers_student_best.pth 23.6 KiBweight/burgers_student_last.pth 23.6 KiBweight/laplace_student_best.pth 23.6 KiBweight/laplace_student_last.pth 23.6 KiBresults/burgers_discovery/R_layer1_weight.npz 0.7 KiBresults/laplace_discovery/R_layer1_weight.npz 0.7 KiBresults/burgers_discovery/R_layer2_weight.npz 0.7 KiBresults/laplace_discovery/R_layer2_weight.npz 0.7 KiBresults/burgers_discovery/R_layer0_weight.npz 0.6 KiBresults/laplace_discovery/R_layer0_weight.npz 0.6 KiBresults/burgers_discovery/R_layer0_bias.npz 0.6 KiBresults/burgers_discovery/R_layer3_weight.npz 0.6 KiBresults/burgers_discovery/R_layer2_bias.npz 0.6 KiBresults/laplace_discovery/R_layer0_bias.npz 0.6 KiBresults/laplace_discovery/R_layer3_weight.npz 0.6 KiBresults/burgers_discovery/R_layer1_bias.npz 0.6 KiBresults/laplace_discovery/R_layer2_bias.npz 0.6 KiBresults/laplace_discovery/R_layer1_bias.npz 0.6 KiBresults/burgers_discovery/R_layer3_bias.npz 0.6 KiBresults/laplace_discovery/R_layer3_bias.npz 0.6 KiB