Skip to content

Latest commit

 

History

History
196 lines (159 loc) · 7.71 KB

README_en.md

File metadata and controls

196 lines (159 loc) · 7.71 KB

飞桨论文复现挑战赛(第七期)科学计算 (ID:50 inn-surrogate)

English | 简体中文

1.Introduction

This project reproduces based on the PaddlePaddle framework. The highlights are summarized as follows

  • Rather than developing a surrogate for a forward model, we are training directly an inverse surrogate mapping output information of a physical system to an unknown input distributed parameter.
  • A generative model based on conditional invertible neural networks (cINN) is developed.
  • The cINN is trained to serve as an inverse surrogate model of physical systems governed by PDEs.
  • The inverse surrogate model is used for the solution of inverse problems with unknown spatially-dependent parameters.
  • The developed method is applied for the estimation of a non-Gaussian permeability field in multiphase flows using limited pressure and saturation data.

Paper:

  • Anantha Padmanabha G, Zabaras N. Solving inverse problems using conditional invertible neural networks[J]. Journal of Computational Physics, 2021, 433: 110194.

Reference GitHub:

The link of aistudio:

2D model

3D model

2.Dataset

dataset download

The dataset includes 2D and 3D data for this project, which can be downloaded from this link.

The link of the dataset in aistudio:

meaning

Please refer to Section 4.1 Identification of the permeability field of an oil reservoir in the paper.

format

The dataset includes train, test, and sample data, in which the train data contains 10000 samples. In the filename, the 1pc, 3pc, and 5pc indicate observations with 1%, 3%, and 5% independent Gaussian noise, respectively.

3.Environment

Hardware

  • 2D model:gpu memory >= 16GB (v100 16g)
  • 3D model:gpu memory >= 32GB (v100 32g)

Framework

  • paddle >= 2.2.0
  • matplotlib
  • h5py
  • scipy
  • scikit-learn

Local Environment

conda create -n paddle_env python=3.8
conda install paddlepaddle-gpu==2.3.2 cudatoolkit=11.6 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ -c conda-forge
conda install scipy h5py matplotlib scikit-learn

4.Quick start

aistudio

The project has built a notebook version for a quick start (the code is from X4Science/INFINITY).

  • 2D model:main-2D.ipynb (recommend v100 32g)
  • 3D model:main-3d.ipynb (recommend A40 40g)

Local Running

cd 2D # or cd 3D
python train.py

5.Code structure

inn-surrogate-paddle
|-- 2D                                      # 2D model folder
|   |-- args.py                             # configuration
|   |-- models                              # model folder
|   |   |-- CouplingBlock.py                
|   |   |-- CouplingOneSide.py
|   |   |-- Divide_data_model.py
|   |   |-- Downsample_model.py
|   |   |-- Permute_data_model.py
|   |   |-- Unflat_data_model.py
|   |   |-- conditioning_network.py
|   |   |-- flat_data_model.py
|   |   `-- main_model.py
|   |-- train.py                            # training code
|   `-- utils                               # util tools code
|       |-- load_data.py
|       |-- plot.py
|       `-- plot_samples.py
|-- 3D                                      # 3D model folder
|   |-- args.py                             # configuration
|   |-- models                              # model folder
|   |   |-- CouplingBlock_model.py
|   |   |-- CouplingOneSide_model.py
|   |   |-- Divide_data_model.py
|   |   |-- Downsample_model.py
|   |   |-- Permute_data_model.py
|   |   |-- Unflat_data_model.py
|   |   |-- conditioning_network.py
|   |   |-- flat_data_model.py
|   |   `-- main_model.py
|   |-- train.py                            # training code     
|   `-- utils                               # util tools code 
|       |-- error_bars.py
|       |-- load_data.py
|       `-- plot.py
`-- data                                    # Dataset
    |-- 2D_problem_dataset                  # 2D model 
    |   |-- Config_2_sample_obs_1pc.hdf5
    |   |-- Config_2_sample_obs_3pc.hdf5
    |   |-- Config_2_sample_obs_5pc.hdf5
    |   |-- Config_2_test_obs_1pc.hdf5
    |   |-- Config_2_test_obs_3pc.hdf5
    |   |-- Config_2_test_obs_5pc.hdf5
    |   |-- Config_2_train_obs_1pc.hdf5
    |   |-- Config_2_train_obs_3pc.hdf5
    |   `-- Config_2_train_obs_5pc.hdf5
    `-- 3D_problem_dataset                  # 3D model
        |-- Config_2_sample_obs_1pc_3D.hdf5
        |-- Config_2_sample_obs_3pc_3D.hdf5
        |-- Config_2_sample_obs_5pc_3D.hdf5
        |-- Config_2_test_obs_1pc_3D.hdf5
        |-- Config_2_test_obs_3pc_3D.hdf5
        |-- Config_2_test_obs_5pc_3D.hdf5
        |-- Config_2_train_obs_1pc_3D.hdf5
        |-- Config_2_train_obs_3pc_3D.hdf5
        `-- Config_2_train_obs_5pc_3D.hdf5

6.Reproduced Results

The results of the 2D model (origin)

The results of the 2D model (reproduced)

The results of the 3D model (origin)

The results of the 3D model (reproduced)

7.Model information

information description
Author Weiguo Zhu (DrownFish19)
Date 2022.10
Framework version paddle 2.3.2
Support hardware GPU、CPU
Download link Pre-training models
Training Time-2D (A40) (6000,8000,10000 samples) 1.2h,1.6h,2h
Training Time-3D (A40) (6000,8000,10000 samples) 5.3h,7,0h,8.75h
aistudio notebook