Skip to content

Commit fd7f189

Browse files
more 1:1 output display names including LCO*
1 parent 7e7517c commit fd7f189

File tree

6 files changed

+68
-29
lines changed

6 files changed

+68
-29
lines changed

src/geophires_x/Economics.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1575,6 +1575,7 @@ def __init__(self, model: Model):
15751575

15761576
self.LCOC = self.OutputParameterDict[self.LCOC.Name] = OutputParameter(
15771577
Name="LCOC",
1578+
display_name='Direct-Use Cooling Breakeven Price (LCOC)',
15781579
UnitType=Units.ENERGYCOST,
15791580
PreferredUnits=EnergyCostUnit.DOLLARSPERMMBTU,
15801581
CurrentUnits=EnergyCostUnit.DOLLARSPERMMBTU
@@ -1589,12 +1590,13 @@ def __init__(self, model: Model):
15891590
)
15901591
self.LCOH = self.OutputParameterDict[self.LCOH.Name] = OutputParameter(
15911592
Name="LCOH",
1593+
display_name='Direct-Use heat breakeven price (LCOH)',
15921594
UnitType=Units.ENERGYCOST,
1593-
PreferredUnits=EnergyCostUnit.DOLLARSPERMMBTU,
1595+
PreferredUnits=EnergyCostUnit.DOLLARSPERMMBTU, # $/MMBTU
15941596
CurrentUnits=EnergyCostUnit.DOLLARSPERMMBTU
1595-
) # $/MMBTU
1597+
)
15961598
self.Cstim = self.OutputParameterDict[self.Cstim.Name] = OutputParameter(
1597-
Name="O&M Surface Plant costs", # FIXME wrong name - should be Stimulation Costs
1599+
Name="O&M Surface Plant costs", # FIXME wrong name - should be Stimulation Costs
15981600
UnitType=Units.CURRENCY,
15991601
PreferredUnits=CurrencyUnit.MDOLLARS,
16001602
CurrentUnits=CurrencyUnit.MDOLLARS
@@ -1780,6 +1782,7 @@ def __init__(self, model: Model):
17801782
self.CarbonThatWouldHaveBeenProducedTotal = self.OutputParameterDict[
17811783
self.CarbonThatWouldHaveBeenProducedTotal.Name] = OutputParameter(
17821784
"Total Saved Carbon Production",
1785+
display_name='Total Avoided Carbon Emissions',
17831786
UnitType=Units.MASS,
17841787
PreferredUnits=MassUnit.LB,
17851788
CurrentUnits=MassUnit.LB

src/geophires_x/EconomicsS_DAC_GT.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ def __init__(self, model: Model):
267267
)
268268
self.LCOH = self.OutputParameterDict[self.LCOH.Name] = OutputParameter(
269269
Name="LCOH",
270+
display_name='Direct-Use heat breakeven price (LCOH)',
270271
UnitType=Units.ENERGYCOST,
271272
PreferredUnits=EnergyCostUnit.DOLLARSPERKWH,
272273
CurrentUnits=EnergyCostUnit.DOLLARSPERKWH

src/geophires_x/Outputs.py

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,13 @@ def PrintOutputs(self, model: Model):
187187
f.write(NL)
188188
f.write(' ***SUMMARY OF RESULTS***\n')
189189
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')
191191
if model.surfaceplant.plant_type.value in [PlantType.ABSORPTION_CHILLER, PlantType.HEAT_PUMP, PlantType.DISTRICT_HEATING]:
192192
f.write(' Surface Application: ' + str(model.surfaceplant.plant_type.value.value) + NL)
193193
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
194194
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
196197
f.write(f' Average Direct-Use Heat Production: {np.average(model.surfaceplant.HeatProduced.value):10.2f} '+ model.surfaceplant.HeatProduced.CurrentUnits.value + NL)
197198
if model.surfaceplant.plant_type.value == PlantType.DISTRICT_HEATING:
198199
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):
204205
if model.surfaceplant.enduse_option.value in [EndUseOptions.ELECTRICITY]:
205206
f.write(f' {model.economics.LCOE.display_name}: {model.economics.LCOE.value:10.2f} {model.economics.LCOE.CurrentUnits.value}\n')
206207
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')
209210
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')
211212
elif model.surfaceplant.enduse_option.value in [EndUseOptions.COGENERATION_TOPPING_EXTRA_HEAT,
212213
EndUseOptions.COGENERATION_BOTTOMING_EXTRA_HEAT,
213214
EndUseOptions.COGENERATION_PARALLEL_EXTRA_HEAT,
214215
EndUseOptions.COGENERATION_TOPPING_EXTRA_ELECTRICITY,
215216
EndUseOptions.COGENERATION_BOTTOMING_EXTRA_ELECTRICITY,
216217
EndUseOptions.COGENERATION_PARALLEL_EXTRA_ELECTRICITY]:
217218
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')
219220

220221
f.write(f' Number of production wells: {model.wellbores.nprod.value:10.0f}'+NL)
221222
f.write(f' Number of injection wells: {model.wellbores.ninj.value:10.0f}'+NL)
@@ -230,8 +231,9 @@ def PrintOutputs(self, model: Model):
230231
f.write(f' Segment {str(i):s} Thickness: {round(model.reserv.layerthickness.value[i-1], 10)} {model.reserv.layerthickness.CurrentUnits.value}\n')
231232
f.write(f' Segment {str(i+1):s} Geothermal gradient: {model.reserv.gradient.value[i]:10.4g} ' + model.reserv.gradient.CurrentUnits.value + NL)
232233
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')
235237

236238
f.write(NL)
237239
f.write(NL)
@@ -316,21 +318,21 @@ def PrintOutputs(self, model: Model):
316318
f.write(' ***RESERVOIR PARAMETERS***\n')
317319
f.write(NL)
318320
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')
320322
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')
322324
if model.reserv.resoption.value is ReservoirModel.SINGLE_FRACTURE:
323325
f.write(f' m/A Drawdown Parameter: {model.reserv.drawdp.value:.5f} ' + model.reserv.drawdp.CurrentUnits.value + NL)
324326
elif model.reserv.resoption.value is ReservoirModel.ANNUAL_PERCENTAGE:
325327
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')
327329
if model.reserv.resoption.value in [ReservoirModel.ANNUAL_PERCENTAGE, ReservoirModel.USER_PROVIDED_PROFILE, ReservoirModel.TOUGH2_SIMULATOR]:
328330
f.write(' Warning: the reservoir dimensions and thermo-physical properties \n')
329331
f.write(' listed below are default values if not provided by the user. \n')
330332
f.write(' They are only used for calculating remaining heat content. \n')
331333

332334
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')
334336
if model.reserv.fracshape.value == FractureShape.CIRCULAR_AREA:
335337
f.write(f' Well separation: fracture diameter: {model.reserv.fracheightcalc.value:10.2f} ' + model.reserv.fracheight.CurrentUnits.value + NL)
336338
elif model.reserv.fracshape.value == FractureShape.CIRCULAR_DIAMETER:
@@ -339,8 +341,8 @@ def PrintOutputs(self, model: Model):
339341
f.write(f' Well separation: fracture height: {model.reserv.fracheightcalc.value:10.2f} ' + model.reserv.fracheight.CurrentUnits.value + NL)
340342
elif model.reserv.fracshape.value == FractureShape.RECTANGULAR:
341343
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')
344346
if model.reserv.resvoloption.value == ReservoirVolume.FRAC_NUM_SEP:
345347
f.write(' Reservoir volume calculated with fracture separation and number of fractures as input\n')
346348
elif model.reserv.resvoloption.value == ReservoirVolume.RES_VOL_FRAC_SEP:
@@ -350,8 +352,8 @@ def PrintOutputs(self, model: Model):
350352
elif model.reserv.resvoloption.value == ReservoirVolume.RES_VOL_ONLY:
351353
f.write(' Reservoir volume provided as input\n')
352354
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')
355357
f.write(f' Reservoir volume: {model.reserv.resvolcalc.value:10.0f} {model.reserv.resvol.CurrentUnits.value}\n')
356358

357359
if model.wellbores.impedancemodelused.value:
@@ -385,7 +387,7 @@ def PrintOutputs(self, model: Model):
385387

386388
f.write(NL)
387389
f.write(NL)
388-
f.write(' ***RESERVOIR SIMULATION RESULTS***' + NL)
390+
f.write(' ***RESERVOIR SIMULATION RESULTS***\n')
389391
f.write(NL)
390392
f.write(f' Maximum Production Temperature: {np.max(model.wellbores.ProducedTemperature.value):10.1f} ' + model.wellbores.ProducedTemperature.PreferredUnits.value + NL)
391393
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):
751753

752754

753755
@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:
755757
return f'{field_name}:{" " * (print_width_before_value - len(field_name) - 1)}'
756758

757759

src/geophires_x/Reservoir.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,7 @@ def __init__(self, model: Model):
420420
# starts as a copy of the input value and only changes if needed.
421421
self.fracsepcalc = self.OutputParameterDict[self.fracsepcalc.Name] = OutputParameter(
422422
"Calculated Fracture Separation",
423+
display_name='Fracture separation',
423424
value=self.fracsep.value,
424425
UnitType=Units.LENGTH,
425426
PreferredUnits=LengthUnit.METERS,
@@ -428,12 +429,14 @@ def __init__(self, model: Model):
428429

429430
self.fracnumbcalc = self.OutputParameterDict[self.fracnumbcalc.Name] = OutputParameter(
430431
"Calculated Number of Fractures",
432+
display_name='Number of fractures',
431433
value=self.fracnumb.value,
432434
UnitType=Units.NONE
433435
)
434436

435437
self.fracwidthcalc = self.OutputParameterDict[self.fracwidthcalc.Name] = OutputParameter(
436438
"Calculated Fracture Width",
439+
display_name='Fracture width',
437440
value=self.fracwidth.value,
438441
UnitType=Units.LENGTH,
439442
PreferredUnits=LengthUnit.METERS,
@@ -450,6 +453,7 @@ def __init__(self, model: Model):
450453

451454
self.fracareacalc = self.OutputParameterDict[self.fracareacalc.Name] = OutputParameter(
452455
"Calculated Fracture Area",
456+
display_name='Fracture area',
453457
value=self.fracarea.value,
454458
UnitType=Units.AREA,
455459
PreferredUnits=AreaUnit.METERS2,

src/geophires_x/SUTRAEconomics.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ def __init__(self, model: Model):
204204

205205
self.LCOH = self.OutputParameterDict[self.LCOH.Name] = OutputParameter(
206206
"Heat Sale Price Model",
207+
display_name='Direct-Use heat breakeven price (LCOH)',
207208
value=[0.025],
208209
UnitType=Units.ENERGYCOST,
209210
PreferredUnits=EnergyCostUnit.CENTSSPERKWH,

src/geophires_x_schema_generator/geophires-result.json

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,16 @@
1919
},
2020
"Average Direct-Use Heat Production": {},
2121
"Direct-Use heat breakeven price": {},
22-
"Direct-Use heat breakeven price (LCOH)": {},
23-
"Direct-Use Cooling Breakeven Price (LCOC)": {},
22+
"Direct-Use heat breakeven price (LCOH)": {
23+
"type": "number",
24+
"description": "LCOH",
25+
"units": "USD/MMBTU"
26+
},
27+
"Direct-Use Cooling Breakeven Price (LCOC)": {
28+
"type": "number",
29+
"description": "LCOC",
30+
"units": "USD/MMBTU"
31+
},
2432
"Annual District Heating Demand": {},
2533
"Average Cooling Production": {},
2634
"Average Annual Geothermal Heat Production": {},
@@ -46,11 +54,15 @@
4654
},
4755
"LCOH": {
4856
"type": "number",
49-
"description": "",
57+
"description": "LCOH",
5058
"units": "USD/MMBTU"
5159
},
5260
"Lifetime Average Well Flow Rate": {},
53-
"Total Avoided Carbon Emissions": {}
61+
"Total Avoided Carbon Emissions": {
62+
"type": "number",
63+
"description": "Total Saved Carbon Production",
64+
"units": "pound"
65+
}
5466
}
5567
},
5668
"ECONOMIC PARAMETERS": {
@@ -202,10 +214,26 @@
202214
},
203215
"Well separation: fracture diameter": {},
204216
"Well separation: fracture height": {},
205-
"Fracture width": {},
206-
"Fracture area": {},
207-
"Number of fractures": {},
208-
"Fracture separation": {},
217+
"Fracture width": {
218+
"type": "number",
219+
"description": "Calculated Fracture Width",
220+
"units": "meter"
221+
},
222+
"Fracture area": {
223+
"type": "number",
224+
"description": "Calculated Fracture Area",
225+
"units": "m**2"
226+
},
227+
"Number of fractures": {
228+
"type": "number",
229+
"description": "Calculated Number of Fractures",
230+
"units": null
231+
},
232+
"Fracture separation": {
233+
"type": "number",
234+
"description": "Calculated Fracture Separation",
235+
"units": "meter"
236+
},
209237
"Reservoir volume": {},
210238
"Reservoir impedance": {},
211239
"Reservoir hydrostatic pressure": {},

0 commit comments

Comments
 (0)