Skip to content

Commit 9019cf6

Browse files
committed
check for negative electricity production (issue 281)
1 parent 550a2a2 commit 9019cf6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/geophires_x/SurfacePlant.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ def electricity_heat_production(self, enduse_option: EndUseOptions, availability
152152

153153
# next do the electricity produced - the same for all, except enduse=5, where it is recalculated
154154
ElectricityProduced = availability * etau * nprod * prodwellflowrate
155+
if ElectricityProduced.max() < 0:
156+
raise RuntimeError('Electricity production calculated as negative. '
157+
'Check maximum temperature for power plant type.')
155158

156159
if enduse_option == EndUseOptions.ELECTRICITY:
157160
# pure electricity

0 commit comments

Comments
 (0)