NeuralConvection-2D-CompactFNO

Model Introduction

NeuralConvection-2D-CompactFNO is a surrogate for two-dimensional natural convection. It maps velocity, temperature, and pressure fields from a Boussinesq simulation to the corresponding compressible-flow fields.

Paper: A Neural Surrogate Approach for Simulating Natural Convection Problems

Model Description

This package reproduces the compact FNO in Table 5: four Fourier blocks, width 64, and 16 retained spectral modes per direction. Inputs and outputs are four-channel 64x64 fields in [u_x, u_y, T, p] order. The model was trained for 200 epochs on the authors' stochastic-temperature-boundary dataset.

Use Cases

Scenario Description
Natural-convection correction Predict compressible fields from Boussinesq fields
Industrial thermal-flow simulation Accelerate field estimation in two-dimensional coupled flow and heat-transfer studies

Usage

1. OneCode

Open the OneCode AI4S environment

2. Manual Setup

Hardware requirements

  • GPU or DCU is recommended. CPU is suitable for small import and forward checks.
  • For DCU, load the matching DTK environment before running PyTorch.

Download the Model Package

hf download OneScience-Group/NeuralConvection-2D-CompactFNO --local-dir ./NeuralConvection-2D-CompactFNO
cd NeuralConvection-2D-CompactFNO

Install the Runtime

DCU

conda create -n onescience311 python=3.11 -y
conda activate onescience311
pip install onescience[cfd-dcu] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.ai
pip install scikit-image PyYAML

GPU

conda create -n onescience311 python=3.11 -y
conda activate onescience311
pip install onescience[cfd-gpu] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.ai
pip install scikit-image PyYAML

Training Data

The authors' NeuralConvection 2D dataset provides 4,000 training pairs and three 200-pair test splits. Download the fixed v1.0-legacy revision used for this reproduction:

hf download NurshatMenglik/NeuralConvection_2D_TrainTest --repo-type dataset --revision v1.0-legacy --local-dir ./data

The public package sets data.root_dir in config/config.yaml to ./data, so the commands below use the downloaded data when run from the project directory.

Training

python scripts/train.py

The best checkpoint is saved to weight/best_model.pth.

Model Weights

The package includes the best checkpoint from a complete 200-epoch DCU training run.

Inference

python scripts/inference.py

Evaluation and Visualization

python scripts/result.py

OneScience Repositories

Citation and License

Downloads last month
87
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train OneScience-Group/NeuralConvection-2D-CompactFNO

Paper for OneScience-Group/NeuralConvection-2D-CompactFNO