Skip to content

Commit a8ca2ad

Browse files
committed
raise ValueError if reservoir temperature exceeds maximum temperature (issue 280)
1 parent 4eb9734 commit a8ca2ad

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/geophires_x/AGSWellBores.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -816,6 +816,12 @@ def Calculate(self, model: Model) -> None:
816816
"""
817817
model.logger.info(f'Init {__class__!s}: {sys._getframe().f_code.co_name}')
818818

819+
if model.reserv.Trock.value > model.reserv.Tmax.value:
820+
s = f'{model.reserv.Trock.Name} ({model.reserv.Trock.value}) exceeds ' \
821+
f'{model.reserv.Tmax.Name} ({model.reserv.Tmax.value})'
822+
model.logger.critical(s)
823+
raise ValueError(s)
824+
819825
self.Tini = model.reserv.Trock.value # initialize the temperature to be the initial temperature of the reservoir
820826
if self.Tini > 375.0 or self.numnonverticalsections.value > 1:
821827
# must be a multilateral setup or too hot for CLGS, so must try to use wanju code.

0 commit comments

Comments
 (0)