Skip to content

MiaoRong-Lab/TgNN_2D_singlephase

Repository files navigation

TgNN-LD 2D Single-Phase Flow

This repository contains research code for the 2-D heterogeneous single-phase subsurface flow experiments associated with:

M. Rong, D. Zhang, and N. Wang, "A Lagrangian dual-based theory-guided deep neural network," Complex & Intelligent Systems, 8, 4849-4862, 2022. DOI: https://doi.org/10.1007/s40747-022-00738-1

The project combines MODFLOW-2005 simulations with PyTorch implementations of the theory-guided neural network experiments.

Repository Structure

.
|-- code/
|   |-- 1_TgNN_2D_hete_1model_part_label.py  # Partially labeled setting
|   `-- 1_TgNN_2D_hete_1model_no_label.py    # Collocation-only setting
|-- Console10.f90                            # Fortran helper for MODFLOW data
|-- singlephase.*                            # MODFLOW input files
|-- boundary.dat
|-- initial_head.dat
|-- transmissivity.dat
`-- requirements.txt

Requirements

This code was prepared for Python 3 and PyTorch. Install the Python dependencies with:

pip install -r requirements.txt

The scripts also require a MODFLOW-2005 executable. The executable is not part of this repository. Make it available in one of the following ways:

  • set the MF2005_EXE environment variable to the executable path;
  • place mf2005 or mf2005.exe in the project root;
  • add mf2005 or mf2005.exe to your system PATH.

Usage

Run the partially labeled experiment:

python code/1_TgNN_2D_hete_1model_part_label.py

Run the collocation-only experiment:

python code/1_TgNN_2D_hete_1model_no_label.py

Model checkpoints and generated outputs are written to results/.

Notes

  • The scripts use CUDA when available and fall back to CPU otherwise.
  • Random seeds and the main experiment parameters are defined inside each script near the data-processing section.
  • MODFLOW-generated files such as final_head.dat, singlephase.out, and temporary observation/transmissivity files are ignored by .gitignore.

Citation

@article{Rong2022TgNNLD,
  title   = {A Lagrangian dual-based theory-guided deep neural network},
  author  = {Rong, Miao and Zhang, Dongxiao and Wang, Nanzhe},
  journal = {Complex & Intelligent Systems},
  volume  = {8},
  pages   = {4849--4862},
  year    = {2022},
  doi     = {10.1007/s40747-022-00738-1}
}

License

This source code is released under the MIT License. See LICENSE for details.

Third-party software, including the MODFLOW-2005 executable if distributed separately, is governed by its own license.

Releases

No releases published

Packages

 
 
 

Contributors