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.
.
|-- 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
This code was prepared for Python 3 and PyTorch. Install the Python dependencies with:
pip install -r requirements.txtThe 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_EXEenvironment variable to the executable path; - place
mf2005ormf2005.exein the project root; - add
mf2005ormf2005.exeto your systemPATH.
Run the partially labeled experiment:
python code/1_TgNN_2D_hete_1model_part_label.pyRun the collocation-only experiment:
python code/1_TgNN_2D_hete_1model_no_label.pyModel checkpoints and generated outputs are written to results/.
- 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.
@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}
}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.