Authors: Giacomo Baldan, Qiang Liu, Alberto Guardone, Nils Thuerey
Install the required Python packages using pip:
pip install torch h5py torchfsm conflictfree einops timm findiff rotary_embedding_torch
Training requires at least one GPU and uses PyTorch's Distributed Data Parallel (DDP). To train the model on a single GPU, run:
torchrun --nnodes=1 --nproc_per_node=1 train_ddp.py
Pretrained model checkpoints for each test case are available in the logs/PBFM folder. To generate samples using the pretrained PBFM model, run:
python sample.py --version PBFM
See the reference paper for more details:
- Darcy flow
- Kolmogorov flow
- Dynamic stall
Kolmogorov flow and dynamic stall datasets are available from Hugging Face. For the Darcy flow dataset, see PIDM.
PBFM
├── darcy_flow
│ ├── train
│ │ ├── K_data.csv
│ │ └── p_data.csv
│ └── valid
│ ├── K_data.csv
│ └── p_data.csv
├── dynamic_stall
│ ├── dynamic_stall_test.h5
│ └── dynamic_stall_train.h5
└── kolmogorov_flow
├── kolmogorov_test.h5
└── kolmogorov_train.h5
