Skip to content

Saeid-Sli/ANNbased_MultiscalePNM

Repository files navigation

ANN-based Multi-scale Pore Network Modeling

This repository implements a deep-learning-driven method for multi-scale pore network modeling (PNM) using image-derived microstructures. The method combines high-resolution imaging, pore network extraction, ANN-based fusion, and upscaling to efficiently model heterogeneous rock samples.


🧠 Overview of Workflow

This project operates in two main stages:


🔧 1. ANN Training (HR image → ANN model)

Train the ANN to learn the connection rules between micro-scale pore networks extracted from high-resolution (HR) images.

python ANN.py

Input: HR segmented image slices (.tif)
Output: ./ML_output/trained_ann_model.h5
This model will later be used in both regular and upscaled PNM reconstructions.


🧱 2. Pore Network Generation (using ANN)

After ANN training, there are two independent reconstruction paths, both using the trained model:

➤ A. Regular Multi-scale PNM

Creates a detailed multi-scale pore network by merging resolved and unresolved networks, using the trained ANN to predict micro-macro throat connections.

python PNM_Reconstruction.py

Output:

  • VTK file of the full network
  • Permeability, porosity, capillary pressure, Kr curves and pore/throat stats (FinalResult, output.xlsx)

➤ B. Upscaled Multi-scale PNM

Instead of inserting full micro-networks, this path replaces them with representative base pores, drastically reducing computational cost while maintaining accuracy.

python PNM_Upscaling.py

Output:

  • Simplified pore network with similar hydraulic behavior
  • VTK + output.xlsx for permeability, capillary pressure, Kr curves

📁 Repository Files

.
├── ANN.py                  # Trains ANN on HR extracted PNM data
├── PNM_Reconstruction.py   # Builds regular multi-scale PNM using ANN
├── PNM_Upscaling.py        # Builds upscaled multi-scale PNM using ANN
├── connectNetworks.py
├── connectNetworksUpscale.py
├── solver.py
└── Relperm.py              

All parameters (paths, voxel size, method, etc.) are defined inside each script and easily modifiable.


🔍 Visual Comparison

🧱 Regular Multi-scale PNM

Generated by connecting high-resolution and low-resolution networks using the trained ANN.

Regular PNM


🪶 Upscaled Multi-scale PNM

Efficient version using base pores instead of full micro-networks.

Upscaled PNM


📊 Model Summary

  • ANN predicts throat connection existence, length, and diameter between micro and macro pores.
  • The model is trained on pore pairs from snow2-extracted HR networks.
  • Upscaling uses hydraulic conductance-based path reduction to base pores.

📄 Reference

This repository is based on the method published in:

A. Moslemipour et al.,
Multi-scale pore network fusion and upscaling of microporosity using artificial neural network,
Marine and Petroleum Geology, 2025, 177:107349.
https://doi.org/10.1016/j.marpetgeo.2025.107349


👤 Authors

  • Abolfazl Moslemipour
    (Johannes Gutenberg University Mainz, Germany)
  • Saeid Sadeghnejad, F. Enzmann, T. Schäfer, S. Hupfer, M. Kersten

📬 Contact


📜 License

This project is licensed under the MIT License.
You are free to use, modify, and distribute this code under the terms of this license.

See the LICENSE file for full details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages