@@ -187,12 +187,13 @@ def PrintOutputs(self, model: Model):
187
187
f .write (NL )
188
188
f .write (' ***SUMMARY OF RESULTS***\n ' )
189
189
f .write (NL )
190
- f .write (' End-Use Option: ' + str (model .surfaceplant .enduse_option .value .value ) + NL )
190
+ f .write (f ' End-Use Option: { str (model .surfaceplant .enduse_option .value .value )} \n ' )
191
191
if model .surfaceplant .plant_type .value in [PlantType .ABSORPTION_CHILLER , PlantType .HEAT_PUMP , PlantType .DISTRICT_HEATING ]:
192
192
f .write (' Surface Application: ' + str (model .surfaceplant .plant_type .value .value ) + NL )
193
193
if model .surfaceplant .enduse_option .value in [EndUseOptions .ELECTRICITY , EndUseOptions .COGENERATION_TOPPING_EXTRA_HEAT , EndUseOptions .COGENERATION_TOPPING_EXTRA_ELECTRICITY , EndUseOptions .COGENERATION_BOTTOMING_EXTRA_ELECTRICITY , EndUseOptions .COGENERATION_BOTTOMING_EXTRA_HEAT , EndUseOptions .COGENERATION_PARALLEL_EXTRA_HEAT , EndUseOptions .COGENERATION_PARALLEL_EXTRA_ELECTRICITY ]: # there is an electricity component
194
194
f .write (f' Average Net Electricity Production: { np .average (model .surfaceplant .NetElectricityProduced .value ):10.2f} ' + model .surfaceplant .NetElectricityProduced .CurrentUnits .value + NL )
195
- if model .surfaceplant .enduse_option .value is not EndUseOptions .ELECTRICITY : # there is a direct-use component
195
+ if model .surfaceplant .enduse_option .value is not EndUseOptions .ELECTRICITY :
196
+ # there is a direct-use component
196
197
f .write (f' Average Direct-Use Heat Production: { np .average (model .surfaceplant .HeatProduced .value ):10.2f} ' + model .surfaceplant .HeatProduced .CurrentUnits .value + NL )
197
198
if model .surfaceplant .plant_type .value == PlantType .DISTRICT_HEATING :
198
199
f .write (f' Annual District Heating Demand: { np .average (model .surfaceplant .annual_heating_demand .value ):10.2f} ' + model .surfaceplant .annual_heating_demand .CurrentUnits .value + NL )
@@ -204,18 +205,18 @@ def PrintOutputs(self, model: Model):
204
205
if model .surfaceplant .enduse_option .value in [EndUseOptions .ELECTRICITY ]:
205
206
f .write (f' { model .economics .LCOE .display_name } : { model .economics .LCOE .value :10.2f} { model .economics .LCOE .CurrentUnits .value } \n ' )
206
207
elif model .surfaceplant .enduse_option .value in [EndUseOptions .HEAT ] and \
207
- model .surfaceplant .plant_type .value not in [PlantType .ABSORPTION_CHILLER ]:
208
- f .write (f' Direct-Use heat breakeven price ( LCOH) : { model .economics .LCOH .value :10.2f} ' + model .economics .LCOH .CurrentUnits .value + NL )
208
+ model .surfaceplant .plant_type .value not in [PlantType .ABSORPTION_CHILLER ]:
209
+ f .write (f' { model . economics . LCOH . display_name } : { model .economics .LCOH .value :10.2f} { model .economics .LCOH .CurrentUnits .value } \n ' )
209
210
elif model .surfaceplant .enduse_option .value in [EndUseOptions .HEAT ] and model .surfaceplant .plant_type .value == PlantType .ABSORPTION_CHILLER :
210
- f .write (f' Direct-Use Cooling Breakeven Price ( LCOC) : { model .economics .LCOC .value :10.2f} ' + model .economics .LCOC .CurrentUnits .value + NL )
211
+ f .write (f' { model . economics . LCOC . display_name } : { model .economics .LCOC .value :10.2f} { model .economics .LCOC .CurrentUnits .value } \n ' )
211
212
elif model .surfaceplant .enduse_option .value in [EndUseOptions .COGENERATION_TOPPING_EXTRA_HEAT ,
212
213
EndUseOptions .COGENERATION_BOTTOMING_EXTRA_HEAT ,
213
214
EndUseOptions .COGENERATION_PARALLEL_EXTRA_HEAT ,
214
215
EndUseOptions .COGENERATION_TOPPING_EXTRA_ELECTRICITY ,
215
216
EndUseOptions .COGENERATION_BOTTOMING_EXTRA_ELECTRICITY ,
216
217
EndUseOptions .COGENERATION_PARALLEL_EXTRA_ELECTRICITY ]:
217
218
f .write (f' { model .economics .LCOE .display_name } : { model .economics .LCOE .value :10.2f} { model .economics .LCOE .CurrentUnits .value } \n ' )
218
- f .write (f' Direct-Use heat breakeven price ( LCOH) : { model .economics .LCOH .value :10.2f} ' + model .economics .LCOH .CurrentUnits .value + NL )
219
+ f .write (f' { model . economics . LCOH . display_name } : { model .economics .LCOH .value :10.2f} { model .economics .LCOH .CurrentUnits .value } \n ' )
219
220
220
221
f .write (f' Number of production wells: { model .wellbores .nprod .value :10.0f} ' + NL )
221
222
f .write (f' Number of injection wells: { model .wellbores .ninj .value :10.0f} ' + NL )
@@ -230,8 +231,9 @@ def PrintOutputs(self, model: Model):
230
231
f .write (f' Segment { str (i ):s} Thickness: { round (model .reserv .layerthickness .value [i - 1 ], 10 )} { model .reserv .layerthickness .CurrentUnits .value } \n ' )
231
232
f .write (f' Segment { str (i + 1 ):s} Geothermal gradient: { model .reserv .gradient .value [i ]:10.4g} ' + model .reserv .gradient .CurrentUnits .value + NL )
232
233
if model .economics .DoCarbonCalculations .value :
233
- f .write (f' Total Avoided Carbon Emissions: { model .economics .CarbonThatWouldHaveBeenProducedTotal .value :10.2f} '
234
- f'{ model .economics .CarbonThatWouldHaveBeenProducedTotal .CurrentUnits .value } \n ' )
234
+ f .write (f' { model .economics .CarbonThatWouldHaveBeenProducedTotal .display_name } :'
235
+ f' { model .economics .CarbonThatWouldHaveBeenProducedTotal .value :10.2f} '
236
+ f' { model .economics .CarbonThatWouldHaveBeenProducedTotal .CurrentUnits .value } \n ' )
235
237
236
238
f .write (NL )
237
239
f .write (NL )
@@ -316,21 +318,21 @@ def PrintOutputs(self, model: Model):
316
318
f .write (' ***RESERVOIR PARAMETERS***\n ' )
317
319
f .write (NL )
318
320
if model .wellbores .IsAGS .value :
319
- f .write ('The AGS models contain an intrinsic reservoir model that doesn\' t expose values that can be used in extensive reporting.' + NL )
321
+ f .write ('The AGS models contain an intrinsic reservoir model that doesn\' t expose values that can be used in extensive reporting.\n ' )
320
322
else :
321
- f .write (' Reservoir Model = ' + str (model .reserv .resoption .value .value ) + ' Model\n ' )
323
+ f .write (f ' Reservoir Model = { str (model .reserv .resoption .value .value )} Model\n ' )
322
324
if model .reserv .resoption .value is ReservoirModel .SINGLE_FRACTURE :
323
325
f .write (f' m/A Drawdown Parameter: { model .reserv .drawdp .value :.5f} ' + model .reserv .drawdp .CurrentUnits .value + NL )
324
326
elif model .reserv .resoption .value is ReservoirModel .ANNUAL_PERCENTAGE :
325
327
f .write (f' Annual Thermal Drawdown: { model .reserv .drawdp .value * 100 :.3f} ' + model .reserv .drawdp .CurrentUnits .value + NL )
326
- f .write (f' Bottom-hole temperature: { model .reserv .Trock .value :10.2f} ' + model .reserv .Trock .CurrentUnits .value + NL )
328
+ f .write (f' Bottom-hole temperature: { model .reserv .Trock .value :10.2f} { model .reserv .Trock .CurrentUnits .value } \n ' )
327
329
if model .reserv .resoption .value in [ReservoirModel .ANNUAL_PERCENTAGE , ReservoirModel .USER_PROVIDED_PROFILE , ReservoirModel .TOUGH2_SIMULATOR ]:
328
330
f .write (' Warning: the reservoir dimensions and thermo-physical properties \n ' )
329
331
f .write (' listed below are default values if not provided by the user. \n ' )
330
332
f .write (' They are only used for calculating remaining heat content. \n ' )
331
333
332
334
if model .reserv .resoption .value in [ReservoirModel .MULTIPLE_PARALLEL_FRACTURES , ReservoirModel .LINEAR_HEAT_SWEEP ]:
333
- f .write (' Fracture model = ' + model .reserv .fracshape .value .value + NL )
335
+ f .write (f ' Fracture model = { model .reserv .fracshape .value .value } \n ' )
334
336
if model .reserv .fracshape .value == FractureShape .CIRCULAR_AREA :
335
337
f .write (f' Well separation: fracture diameter: { model .reserv .fracheightcalc .value :10.2f} ' + model .reserv .fracheight .CurrentUnits .value + NL )
336
338
elif model .reserv .fracshape .value == FractureShape .CIRCULAR_DIAMETER :
@@ -339,8 +341,8 @@ def PrintOutputs(self, model: Model):
339
341
f .write (f' Well separation: fracture height: { model .reserv .fracheightcalc .value :10.2f} ' + model .reserv .fracheight .CurrentUnits .value + NL )
340
342
elif model .reserv .fracshape .value == FractureShape .RECTANGULAR :
341
343
f .write (f' Well separation: fracture height: { model .reserv .fracheightcalc .value :10.2f} ' + model .reserv .fracheight .CurrentUnits .value + NL )
342
- f .write (f' Fracture width : { model .reserv .fracwidthcalc .value :10.2f} ' + model .reserv .fracwidth .CurrentUnits .value + NL )
343
- f .write (f' Fracture area : { model .reserv .fracareacalc .value :10.2f} ' + model .reserv .fracarea .CurrentUnits .value + NL )
344
+ f .write (f' { model . reserv . fracwidthcalc . display_name } : { model .reserv .fracwidthcalc .value :10.2f} { model .reserv .fracwidth .CurrentUnits .value } \n ' )
345
+ f .write (f' { model . reserv . fracareacalc . display_name } : { model .reserv .fracareacalc .value :10.2f} { model .reserv .fracarea .CurrentUnits .value } \n ' )
344
346
if model .reserv .resvoloption .value == ReservoirVolume .FRAC_NUM_SEP :
345
347
f .write (' Reservoir volume calculated with fracture separation and number of fractures as input\n ' )
346
348
elif model .reserv .resvoloption .value == ReservoirVolume .RES_VOL_FRAC_SEP :
@@ -350,8 +352,8 @@ def PrintOutputs(self, model: Model):
350
352
elif model .reserv .resvoloption .value == ReservoirVolume .RES_VOL_ONLY :
351
353
f .write (' Reservoir volume provided as input\n ' )
352
354
if model .reserv .resvoloption .value in [ReservoirVolume .FRAC_NUM_SEP , ReservoirVolume .RES_VOL_FRAC_SEP , ReservoirVolume .FRAC_NUM_SEP ]:
353
- f .write (f' Number of fractures : { model .reserv .fracnumbcalc .value :10.2f} ' + NL )
354
- f .write (f' Fracture separation : { model .reserv .fracsepcalc .value :10.2f} ' + model .reserv .fracsep .CurrentUnits .value + NL )
355
+ f .write (f' { model . reserv . fracnumbcalc . display_name } : { model .reserv .fracnumbcalc .value :10.2f} \n ' )
356
+ f .write (f' { model . reserv . fracsepcalc . display_name } : { model .reserv .fracsepcalc .value :10.2f} { model .reserv .fracsep .CurrentUnits .value } \n ' )
355
357
f .write (f' Reservoir volume: { model .reserv .resvolcalc .value :10.0f} { model .reserv .resvol .CurrentUnits .value } \n ' )
356
358
357
359
if model .wellbores .impedancemodelused .value :
@@ -385,7 +387,7 @@ def PrintOutputs(self, model: Model):
385
387
386
388
f .write (NL )
387
389
f .write (NL )
388
- f .write (' ***RESERVOIR SIMULATION RESULTS***' + NL )
390
+ f .write (' ***RESERVOIR SIMULATION RESULTS***\n ' )
389
391
f .write (NL )
390
392
f .write (f' Maximum Production Temperature: { np .max (model .wellbores .ProducedTemperature .value ):10.1f} ' + model .wellbores .ProducedTemperature .PreferredUnits .value + NL )
391
393
f .write (f' Average Production Temperature: { np .average (model .wellbores .ProducedTemperature .value ):10.1f} ' + model .wellbores .ProducedTemperature .PreferredUnits .value + NL )
@@ -751,7 +753,7 @@ def o(output_param: OutputParameter):
751
753
752
754
753
755
@staticmethod
754
- def _field_label (field_name :str , print_width_before_value : int ) -> str :
756
+ def _field_label (field_name : str , print_width_before_value : int ) -> str :
755
757
return f'{ field_name } :{ " " * (print_width_before_value - len (field_name ) - 1 )} '
756
758
757
759
0 commit comments