File size: 2,257 Bytes
8bf8ea0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
license: apache-2.0
language:
- en
tags:
- OneScience
- computational-fluid-dynamics
- navier-stokes
---

# CROP-NavierStokes-HighRe

## Model Introduction

This package reproduces the CROP single-step vorticity prediction experiment for two-dimensional Navier-Stokes flow at Re=10000. It maps the field at time index 0 to time index 5 on a 64 x 64 grid.

Paper: [Discretization-invariance? On the Discretization Mismatch Errors in Neural Operators](https://proceedings.iclr.cc/paper_files/paper/2025/file/313829757739365201b5adb3a1cbd9bd-Paper-Conference.pdf)

## Model Description

The model uses band-limited lifting and projection around a multiscale local convolutional operator. Input and output tensors have shape `[batch,1,64,64]`.

## Usage

### Download the Model Package

```bash
hf download OneScience-Group/CROP-NavierStokes-HighRe --local-dir ./CROP-NavierStokes-HighRe
cd CROP-NavierStokes-HighRe
```

### Install the Runtime

Use a Python 3.11 environment with the appropriate GPU/DCU PyTorch build, `numpy`, `h5py`, `PyYAML`, and `matplotlib`. For a OneScience DCU environment, install `onescience[cfd-dcu]`; for GPU, use `onescience[cfd-gpu]`.

### Training Data

The original HDF5 data comes from the [CROP research repository](https://github.com/wenhangao21/ICLR25-CROP). A provenance-preserving copy is available on [ModelScope](https://www.modelscope.cn/datasets/OneScience/CROP-NavierStokes-Re10000). Place `new_ns_train_1e-4_T30_N2048_s64.h5` in `./data` before running the scripts. The dataset is not mirrored to Hugging Face by this model repository.

### Training

```bash
python scripts/train.py
```

The best checkpoint is written to `weight/best_model.pth`.

### Inference

```bash
python scripts/inference.py
python scripts/result.py
```

The included checkpoint has SHA256 `962c9ed870d5c916614abf59471bb89633bde8b63891e9ff152848aca1624655`. Its test mean relative L2 is 4.3402%; the paper reports 4.06% for this experiment.

## Citation and License

Please cite the [CROP paper](https://proceedings.iclr.cc/paper_files/paper/2025/file/313829757739365201b5adb3a1cbd9bd-Paper-Conference.pdf). This reproduction package is released under Apache-2.0; the original dataset has no separately identified redistribution license.