This repository provides the source code and training scripts for "Geometric Deep Operator Networks for Time-Dependent Prediction of Flows Over Varying Geometries" The project evaluates the deep operator network DeepONet for predicting tranisent flow around complex geometries.
Our study introduces a benchmark for scientific machine learning (SciML) models in predicting tranisnet flow over intricate geometries using high-fidelity simulation data. The full paper can be accessed here:
"Geometric Deep Operator Networks for Time-Dependent Prediction of Flows Over Varying Geometries"
- Authors: Ali Rabeh, Adarsh Krishnamurthy, Baskar Ganapathysubramanian
This study utilizes the FlowBench Flow Past Object (FPO) dataset, which is publicly accessible on Hugging Face: FlowBench FPO Dataset
The dataset is licensed under CC-BY-NC-4.0 and serves as a benchmark for the development and evaluation of scientific machine learning (SciML) models.
- Geometry representation: SDF
- Resolution: 1024×256 (242 timesteps for each case)
- Fields: Velocity (u, v), Pressure (p)
- Stored as: Numpy tensors (
.npzformat)
This repository requires the following core libraries:
torch– PyTorch framework for deep learningpytorch-lightning– High-level PyTorch wrapper for trainingomegaconf– Configuration managementwandb– Experiment trackingnumpy– Numerical computationsscipy– Scientific computing
Note: We have included
venv_requirements.txt, which lists all the libraries used in our environment. To set up the environment and install dependencies usingvenv_requirements.txt:
python3 -m venv sciml
source sciml/bin/activate
pip install --upgrade pip setuptools wheel Cython
pip install -r venv_requirements.txtTo train the model, run the following command:
python3 main.py --config_path "path to conf.yaml"Before training, you need to specify the dataset paths in the configurations (YAML files):
data:
file_path_train_x: ./data/train_x.npz
file_path_train_y: ./data/train_y.npz
file_path_test_x: ./data/test_x.npz
file_path_test_y: ./data/test_y.npzAfter training, evaluate erros and visualize results (for single_step and rollout) with:
python3 postprocess.py --checkpoint_path path/to/checkpoints/ --config_path path/to/conf.yaml --sample_ids "0,2,5"We welcome contributions! Please fork the repository and submit a pull request.
We release pre-trained time-dependent DeepONet checkpoints for the FlowBench FPO dataset on the Hugging Face Hub: https://huggingface.co/arabeh/DeepONet-FlowBench-FPO
You can download a checkpoint and load it with the code in this repository.
from huggingface_hub import hf_hub_download
import torch
from models.geometric_deeponet.geometric_deeponet import GeometricDeepONetTime
REPO_ID = "arabeh/DeepONet-FlowBench-FPO"
filename = "checkpoints/time-dependent-deeponet_4in.ckpt" # choose 1in/4in/8in/16in
ckpt_path = hf_hub_download(REPO_ID, filename)
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model = GeometricDeepONetTime.load_from_checkpoint(ckpt_path, map_location=device)
model = model.eval().to(device)This repository is licensed under the MIT License.