Skip to content

tum-pbs/PBFM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Official implementation of PBFM — Physics-Based Flow Matching

arXiv Datasets on HF

Authors: Giacomo Baldan, Qiang Liu, Alberto Guardone, Nils Thuerey


PBFM architecture

Installation

Install the required Python packages using pip:

pip install torch h5py torchfsm conflictfree einops timm findiff rotary_embedding_torch

Training

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

Reproducing sampling results

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

Test cases

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

About

PBFM code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages