Skip to content

Alexander-wu/TurbL1_AI4Science

Repository files navigation

Achieving Long-term Turbulence Tracing By Tackling Spectral Bias

This repo is the official PyTorch implementation of Turb-L1.

📑 Datas

Dataset Geometry Link Original Data shape
Decaying Isotropic Turbulence Regular Grid [Hugging Face] (1280, 100, 128, 128)
Forced Isotropic Turbulence Regular Grid [Google Cloud] (1200, 64, 64, 20)

Here's a brief description of the datasets:

Dataset 1

  • Original dimensions: 1,280 samples × 100 timesteps
  • Spatial resolution: 128×128
  • Training strategy: 1-step prediction (1→1)
  • Inference strategy: Multi-step prediction (1→99)
  • Variable: Vorticity (single variable)

Dataset 2

  • Original dimensions: 1,200 samples × 20 timesteps
  • Spatial resolution: 64×64
  • Training strategy: 1-step prediction (1→1)
  • Inference strategy: Multi-step prediction (1→19)
  • Variable: Vorticity (single variable)

The expected output dimensions of the dataloader are as follows (Mode details can be found in dataloader_McWilliams.py):

# --- Testing DataLoader Output ---

# Train DataLoader
train_input_shape = (32, 1, 1, 64, 64)  # (B, T_input, C, H, W)
train_target_shape = (32, 1, 1, 64, 64)  # (B, T_target, C, H, W)
batch_size = 32                          # B
input_timesteps = 1                      # T_input
channels = 1                             # C
height = 64                              # H
width = 64                               # W

# Validation DataLoader
val_input_shape = (32, 1, 1, 64, 64)    # (B, T_input, C, H, W)

# Test DataLoader
test_input_shape = (32, 1, 1, 64, 64)   # (B, T_input, C, H, W)

🔥 Get Started

you can run train code using this command:

torchrun --nnodes=1 --nproc_per_node=8 train_McWilliams.py

you can run inference code using this command:

python inference_McWilliams.py

🏆 Results

Trub-L1 achieves consistent state-of-the-art perfermance.



Table 1. Performance comparison on isotropic turbulence datasets.

🏆 Showcase



Figure 1. Long-term prediction on 2D Decaying Isotropic Turbulence.

🏆 Training Dynamics



Figure 2. Evolution of spectral error and visual prediction improvement for Turb-L1 during training.

📂 Acknowledgement

We appreciate the following github repos a lot for their valuable code base or datasets:

https://github.com/scaomath/torch-cfd

https://github.com/raj-brown/fourier_neural_operator

About

Trub_L1

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors