PyTOUGH (Python TOUGH) is a Python library for simplifying, extending and automating the use of the TOUGH2 subsurface fluid and heat flow simulator. Using PyTOUGH, it is possible to automate the creation and editing of TOUGH2 model grids and data files, and the analysis and display of model simulation results, using Python scripts.
First, make sure you have Python and the Numerical Python library installed on your machine. (For some features you will need other libraries such as Scientific Python or Matplotlib- consult the user guide for details.)
Click the Clone or download button at the right of the PyTOUGH web page and then click Download ZIP , and save the .zip file to your computer. Unzip this to any directory on your computer. This will create a directory containing a file called setup.py
. At the command line type python setup.py install
.
(Alternatively, if you are confident using the Git version control system, you can clone the PyTOUGH repository instead of downloading a .zip file.)
For more detailed information on PyTOUGH, consult the user guide (PDF format, in the 'doc' directory of your PyTOUGH install) and the PyTOUGH wiki, which has links to published articles on PyTOUGH.
The latest stable version is 1.5.1, which has:
- ability to import mulgrid from AMESH Voronoi grids
- new t2grid / t2data rename_blocks() methods
- support for MOMOP section in TOUGH2 data files
- ability to disallow spaces in block names when generating grids
- fixes to enable running PyTOUGH with later versions of Numpy and VTK
as well as various bug fixes and other minor enhancements.
Since PyTOUGH version 1.3.6, the PyTOUGH user guide (PyTOUGH-guide.pdf) is now included in the 'doc' directory of your PyTOUGH install. Previously this was available separately from the 'Downloads' section on the website, but GitHub decided to phase out this 'Downloads' section.
TO190618 itough will change the output format of the ".out" file, making t2listing not able to read the result. the way to solve this in so far is to put i file just as a plain title.
TO190618 the current pytough has been modified in a way to allow running without install, this makes development easier. to the examples, it is important to creat a enviroment variables by
export pytough=/home/${USER}/Projects/PyTOUGH/
known issues:
- can not parse t2listing (flow.out) when kddata is more than 2.
- does not include parsing nesq nad1 and nad2, which may resulted in error in parsing error.