File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ def Calculate(self, model: Model):
67
67
:type model: :class:`~geophires_x.Model.Model`
68
68
:return: None
69
69
"""
70
- model .logger .info (" Init " + str (__class__ ) + ": " + sys ._getframe ().f_code .co_name )
70
+ model .logger .info (f' Init { str (__class__ )} : { sys ._getframe ().f_code .co_name } ' )
71
71
super ().Calculate (model ) # run calculate for the parent.
72
72
73
73
# convert flowrate to volumetric rate
@@ -90,14 +90,15 @@ def Calculate(self, model: Model):
90
90
for t in range (1 , len (model .reserv .timevector .value )):
91
91
Twnd = Twnd + [float (invertlaplace (fp , td [t ], method = 'stehfest' ))]
92
92
except :
93
- print (
94
- "Error: GEOPHIRES could not execute numerical inverse laplace calculation for reservoir model 1. Simulation will abort." )
95
- sys .exit ()
93
+ msg = ('Error: GEOPHIRES could not execute numerical inverse laplace calculation for reservoir model 1. '
94
+ 'Simulation will abort.' )
95
+ print (msg )
96
+ raise RuntimeError (msg )
96
97
97
98
Twnd = np .asarray (Twnd )
98
99
99
100
# calculate dimensional temperature, add initial rock temperature to beginning of array
100
101
model .reserv .Tresoutput .value = model .reserv .Trock .value - (Twnd * (model .reserv .Trock .value - model .wellbores .Tinj .value ))
101
102
model .reserv .Tresoutput .value = np .append ([model .reserv .Trock .value ], model .reserv .Tresoutput .value )
102
103
103
- model .logger .info (" Complete " + str (__class__ ) + ": " + sys ._getframe ().f_code .co_name )
104
+ model .logger .info (f' Complete { str (__class__ )} : { sys ._getframe ().f_code .co_name } ' )
You can’t perform that action at this time.
0 commit comments