Skip to content

stadelmanma/netl-ap-map-flow

Repository files navigation

netl-ap-map-flow

image

image

image

image

image

Overview

netl-ap-map-flow is a modeling suite written in Fortran and Python3 to perform local cubic law (LCL) simulations of single phase flow through a discrete fracture and analyze the data. Several tools written in Python provide added functionality are packaged in the apmapflow module. Dependencies are managed using Anaconda through conda-forge. Paraview is the recommended program to visualize the output using the legacy vtk files. The CSV output files can be visualized in ImageJ, Excel, etc. However, depending on how your chosen program reads in the image matrix, the image may appear inverted. The first value in the CSV files corresponds to bottom left corner of the fracture. After installation several scripts are avilable under with the prefix apm_.

Full documentation is hosted on read the docs.

Summary of apmapflow submodules
data_processing Provides an easy to use and extendable platform for post-processing a set of simulation data.
openfoam Implements an interface to create simulation cases for OpenFoam.
run_model Run the LCL model and manipulate input files programmatically.
unit_conversion Provides a unit conversion API powered by pint

Installation

Quick Install Using Anaconda

First install the Python3 version of Anaconda or Miniconda for your given platform and allow it to modify your PATH variable. Then run the following set of commands in a terminal. You can use the module directly in scripts by running import apmapflow or simply work with the scripts provided. A full list of scripts and basic usage is shown in the documentation section below.

Install as a Developer

To develop the package you will need to download Anaconda or Miniconda as above. Additionally, you will need to ensure that git, a Fortran compiler (I use gfortran) and the make program are installed and available on your path. When using Windows it is recommended you make a copy of the mingw32-make.exe (or similarly named) executable and rename it make.exe.

The following set of commands can be used in a terminal window to download and setup the package once the aforementioned programs have been installed.

Basic Usage of LCL Model

Running the model in a terminal:

apm_run_lcl_model  model_initialization_file

Full usage instructions can be found in docs/examples/running-the-flow-model.rst.

Notes/ Tips/ Pitfalls:

  • If the model is compiled using 32-bit compiler, running too large of a map can cause a memory overflow error.
  • When using windows my chosen compiler is MinGW64.
    • Be sure to compile it with the x86_64 architecture to get 64 bit compilers otherwise the default build will fail.
  • This guide assumes you install Anaconda3 locally. If you choose to install it system wide you will need to run some commands with sudo in unix systems or in an elevated command prompt in Windows.
  • Running ./bin/build_model debug will recompile the model using additional flags, code coverage and profiling
  • Using Anaconda inside a Babun prompt is tricky and takes some effort to get fully functional.
    • Your $PATH variable will need to be manually adjusted so the conda version of Python will shadow the default version used in Babun.
    • Direct use of the conda Python interpreter doesn't work and it instead needs to be called with python -i.

About

A fracture flow modeling package utilizing a modified local cubic law approach with OpenFoam and ParaView compatibility.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages