1
1
import sys
2
- import os
3
2
import numpy as np
4
3
from .Parameter import floatParameter , strParameter
5
4
from .Units import *
6
5
import geophires_x .Model as Model
7
- from .Reservoir import Reservoir
6
+ from geophires_x .Reservoir import Reservoir
8
7
9
8
10
9
class TOUGH2Reservoir (Reservoir ):
11
10
"""
12
11
This class models the TOUGH2 Reservoir.
13
12
"""
14
- def __init__ (self , model :Model ):
13
+ def __init__ (self , model : Model ):
15
14
"""
16
15
The __init__ function is called automatically when a class is instantiated.
17
16
It initializes the attributes of an object, and sets default values for certain arguments that can be overridden
@@ -33,6 +32,11 @@ def __init__(self, model:Model):
33
32
# or used for Output
34
33
# This also includes all Parameters that are calculated and then published using the Printouts function.
35
34
# specific to this stype of reservoir
35
+ self .tough2_executable_path = self .ParameterDict [self .tough2_executable_path .Name ] = strParameter (
36
+ "TOUGH2 Executable Path" ,
37
+ DefaultValue = 'xt2_eos1.exe' ,
38
+ UnitType = Units .NONE ,
39
+ )
36
40
self .tough2modelfilename = self .ParameterDict [self .tough2modelfilename .Name ] = strParameter (
37
41
"TOUGH2 Model/File Name" ,
38
42
value = 'Doublet' ,
@@ -126,7 +130,7 @@ def Calculate(self, model:Model):
126
130
127
131
# GEOPHIRES assumes TOUGH2 executable and input file are in same directory as GEOPHIRESv3.py
128
132
# create tough2 input file
129
- path_to_exe = str ('xt2_eos1.exe' )
133
+ path_to_exe = str (self . tough2_executable_path . value )
130
134
if not os .path .exists (os .path .join (os .getcwd (), path_to_exe )):
131
135
model .logger .critical ('TOUGH2 executable file does not exist in current working directory. \
132
136
GEOPHIRES will abort simulation.' )
0 commit comments