The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.
Rayleigh-Bénard Convection Dataset


This dataset contains data for Rayleigh-Bénard convection at different Rayleigh numbers. The data includes velocity fields and temperature distributions on a 128×128 grid.
Dataset Description
The dataset consists of .npz files containing:
vx
: x-component of velocity fieldvy
: y-component of velocity fieldtemp
: temperature fieldtime
: time points
Sample Data Stats

Installation and Download
pip install -r requirements.txt
Download the dataset
from huggingface_hub import hf_hub_download
import os
os.makedirs("./rb_data", exist_ok=True)
# Download Ra=12,000 dataset
hf_hub_download(
repo_id="your-username/rb-flow-visualization",
filename="data/data_12e3.npz",
local_dir="./rb_data",
repo_type="dataset"
)
Dataset Loader Details
The dataset loader (dataloader.py
) provides two main classes:
RBFlowDataset
: A PyTorch Dataset class that handles:- Loading and preprocessing of .npz files
- Single frame access
- Sequence extraction
- Statistical information
load_rb_flow_data
: A utility function that creates a DataLoader with:- Batch processing
- Data shuffling
- Multi-worker support
Accessing Data Statistics
dataset = RBFlowDataset('data/data_12e3.npz')
stats = dataset.stats # Dictionary containing field statistics
print(f"VX range: {stats['vx_min']} to {stats['vx_max']}")
print(f"Temperature mean: {stats['temp_mean']}")
Basic Usage
from dataloader import load_rb_flow_data
# Load the dataset
dataloader, dataset = load_rb_flow_data(
data_path='data/data_12e3.npz', # or data_20e3.npz
batch_size=32,
shuffle=True
)
# Iterate through batches
for batch in dataloader:
vx = batch['vx'] # Shape: [batch_size, nx, ny]
vy = batch['vy']
temp = batch['temp']
# Your processing here
Loading Sequences
from dataloader import RBFlowDataset
# Initialize dataset
dataset = RBFlowDataset('data/data_12e3.npz')
# Get a sequence of frames
sequence = dataset.get_sequence(start_idx=0, length=10)
vx_sequence = sequence['vx'] # Shape: [10, nx, ny]
Visualization Tools
The repository includes tools for creating various visualizations of the flow fields.
Creating Animations
from visualize import RBFlowVisualizer
# Initialize visualizer
viz = RBFlowVisualizer('data/data_12e3.npz')
# Create velocity field animation
viz.create_velocity_animation(
output_path='velocity_animation.gif',
fps=30,
skip=3 # Arrow density (smaller = denser)
)
# Create temperature field animation
viz.create_animation('temp', 'temperature_animation.gif', fps=30)
Testing
The repository includes a comprehensive test suite (test_functionality.py
) that verifies all functionality:
python test_functionality.py
The test suite checks:
Dataset loading and access
- Basic loading functionality
- Frame access
- Sequence extraction
- Data shapes and types
Data Processing
- Normalization
- Statistics computation
- Batch processing
- Sequence bounds checking
Visualization
- Temperature field animations
- Velocity field animations
- File generation and saving
Running Individual Tests
import unittest
from test_functionality import TestRBFlowTools
# Run specific test
suite = unittest.TestLoader().loadTestsFromName('test_dataset_loading_12k', TestRBFlowTools)
unittest.TextTestRunner(verbosity=2).run(suite)
Citation
If you use this dataset or code in your research, please cite:
@article{rahman2024pretraining,
title={Pretraining Codomain Attention Neural Operators for Solving Multiphysics PDEs},
author={Rahman, Md Ashiqur and George, Robert Joseph and Elleithy, Mogab and Leibovici, Daniel and Li, Zongyi and Bonev, Boris and White, Colin and Berner, Julius and Yeh, Raymond A and Kossaifi, Jean and Azizzadenesheli, Kamyar and Anandkumar, Anima},
journal={Advances in Neural Information Processing Systems},
volume={37}
year={2024}
}
- Downloads last month
- 160