This Python script converts a TOUGH2 result file to VTK format for visualization with Paraview
Installing required Python packages
$ pip3 install pyyaml
$ pip3 install pyevtk
Config file
The input file config.yaml contains some metadata of the results file.
filename_in: "/path/to/resultfile/openBC_prod_10yr.csv"
filename_out: "/path/to/output/directory/no/extension/openBC_prod_10yr"
# dimension
npoint_d1: 80
npoint_d2: 40
npoint_d3: 15
# layer thickness only in z direction
layer_top: 5
layer_middle: 5
layer_bottom: 5
Run the script
$ python3 results_to_vtk.py
The script will create a binary VTK file with the name: /path/to/output/directory/no/extension/openBC_prod_10yr.vts