Skip to content

baskargroup/TimeDependent-DeepONet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Benchmarking Scientific ML Models for Flow Prediction

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.

Paper

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

Datasets

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.

Dataset Structure

  • Geometry representation: SDF
  • Resolution: 1024×256 (242 timesteps for each case)
  • Fields: Velocity (u, v), Pressure (p)
  • Stored as: Numpy tensors (.npz format)

Installation

Essential Dependencies

This repository requires the following core libraries:

  • torch – PyTorch framework for deep learning
  • pytorch-lightning – High-level PyTorch wrapper for training
  • omegaconf – Configuration management
  • wandb – Experiment tracking
  • numpy – Numerical computations
  • scipy – 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 using venv_requirements.txt:

python3 -m venv sciml
source sciml/bin/activate 
pip install --upgrade pip setuptools wheel Cython
pip install -r venv_requirements.txt

Model Training

To 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.npz

Postprocessing

After 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"

Contributing

We welcome contributions! Please fork the repository and submit a pull request.

Pretrained checkpoints

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)

License

This repository is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages