PsiNN-CylinderFlow-StructureTransfer
Model and experiment
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.
Data
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.
Installation and usage
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.
Training and reported result
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.
Source and license
- Paper: https://doi.org/10.1038/s41467-025-64624-3.
- Dataset source: https://github.com/ZitiLiu/Psi-NN/tree/main/Database/flow.
- This model package uses the license indicated in the card metadata. Dataset redistribution terms, where not separately stated, must not be inferred from the code license.
中文说明
PsiNN-CylinderFlow-StructureTransfer
模型与实验
本软件包复现了论文中的二维定常圆柱绕流结构迁移实验。PsiNNFlow 将平面坐标 (x, y) 映射为压力和速度 (p, u, v)。软件包还包含教师模型训练、学生模型蒸馏、结构提取和结构固定的重建。
本软件包包含模型代码、config/config.yaml、训练、推理(inference)和可视化脚本、已保存的 results/,以及选定的 weight/best_model.pth 模型权重(检查点)(checkpoint)。
数据
使用 modelscope download --dataset OneScience/PsiNN-CylinderFlow --local_dir ./data/flow 下载 OneScience/PsiNN-CylinderFlow。五个 CSV 文件均包含 x、y、p、u、v 列。内部场真值仅用于评估,训练使用边界样本。
原始数据集见 https://github.com/ZitiLiu/Psi-NN/tree/main/Database/flow 。如需外部数据集,请先下载再运行推理。发布配置使用相对路径,未使用 SCNet 的个人目录路径。
安装与使用
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
如需重新训练,请在分配到的 GPU/DCU 计算节点上使用兼容的 PyTorch 构建版本,单独保存一份随附的模型权重(检查点),然后在软件包根目录运行 python scripts/train.py。完整的训练预算见 config/config.yaml。若附有针对特定集群的 Slurm 脚本,在原集群以外使用时需要调整。
训练与报告结果
本次圆柱绕流运行使用全部 20,486 个配置点,完成计划中的 200,000 次 Adam 更新。选出的模型权重(检查点)使物理残差和边界损失最小。内部场真值未用于训练或选择模型权重(检查点)。
压力、水平速度和垂直速度的全场 MSE 分别为 7.348e-5、2.965e-5 和 1.998e-5。软件包引用的论文参考值分别为 7.838e-4、1.854e-4 和 1.765e-5,本次运行的最后一项更高。原方程采样和结构迁移的细节与论文中的设置不同,因此这些结果未声称是完全同等条件下的复现。已记录的指标和可视化结果见 results/。随附的模型权重(检查点)来自一次已完成的运行,另一次运行的结果可能不同。
来源与许可证
- 论文见 https://doi.org/10.1038/s41467-025-64624-3.
- 数据集来源见 https://github.com/ZitiLiu/Psi-NN/tree/main/Database/flow.
- 本模型包使用模型卡元数据所示的许可证。若数据集再分发条款没有单独说明,不得根据代码许可证推断。
- Downloads last month
- 276