Skip to content

Commit 81caf47

Browse files
Merge pull request NREL#329 from softwareengineerprogrammer/main
Output field updates: Well depth, non-vertical sections, transmission, annualized capex [3.7.0]
2 parents f4e34f5 + 5586099 commit 81caf47

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+245
-201
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 3.6.7
2+
current_version = 3.7.0
33
commit = True
44
tag = True
55

.cookiecutterrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ default_context:
5454
sphinx_doctest: "no"
5555
sphinx_theme: "sphinx-py3doc-enhanced-theme"
5656
test_matrix_separate_coverage: "no"
57-
version: 3.6.7
57+
version: 3.7.0
5858
version_manager: "bump2version"
5959
website: "https://github.com/NREL"
6060
year_from: "2023"

CHANGELOG.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,17 @@
22
Changelog
33
=========
44

5-
GEOPHIRES-X (2023-2024)
5+
GEOPHIRES-X (2023-2025)
66
------------------------
77

8+
3.7
9+
^^^
10+
11+
`release <https://github.com/NREL/GEOPHIRES-X/releases/tag/v3.7.0>`__ | `diff <https://github.com/NREL/GEOPHIRES-X/compare/v3.6.0...v3.7.0>`__
12+
13+
"Well depth (or total length, if not vertical)" output field renamed to "Well depth" per https://github.com/NREL/GEOPHIRES-X/issues/321
14+
15+
816
3.6
917
^^^
1018

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ Free software: `MIT license <LICENSE>`__
5656
:alt: Supported implementations
5757
:target: https://pypi.org/project/geophires-x
5858

59-
.. |commits-since| image:: https://img.shields.io/github/commits-since/softwareengineerprogrammer/GEOPHIRES-X/v3.6.7.svg
59+
.. |commits-since| image:: https://img.shields.io/github/commits-since/softwareengineerprogrammer/GEOPHIRES-X/v3.7.0.svg
6060
:alt: Commits since latest release
61-
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.6.7...main
61+
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.7.0...main
6262

6363
.. |docs| image:: https://readthedocs.org/projects/GEOPHIRES-X/badge/?style=flat
6464
:target: https://nrel.github.io/GEOPHIRES-X

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
year = '2024'
1919
author = 'NREL'
2020
copyright = f'{year}, {author}'
21-
version = release = '3.6.7'
21+
version = release = '3.7.0'
2222

2323
pygments_style = 'trac'
2424
templates_path = ['./templates']

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def read(*names, **kwargs):
1313

1414
setup(
1515
name='geophires-x',
16-
version='3.6.7',
16+
version='3.7.0',
1717
license='MIT',
1818
description='GEOPHIRES is a free and open-source geothermal techno-economic simulator.',
1919
long_description='{}\n{}'.format(

src/geophires_x/Outputs.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,8 @@ class Outputs:
638638
This class handles all the outputs for the GEOPHIRESv3 model.
639639
"""
640640

641+
VERTICAL_WELL_DEPTH_OUTPUT_NAME = 'Well depth'
642+
641643
def __init__(self, model:Model, output_file:str ='HDR.out'):
642644
model.logger.info(f'Init {__class__!s}: {__name__}')
643645
self.ParameterDict = {}
@@ -860,7 +862,7 @@ def PrintOutputs(self, model: Model):
860862
summary.append(OutputTableItem('Number of injection wells', '{0:10.0f}'.format(model.wellbores.ninj.value)))
861863
summary.append(OutputTableItem('Flowrate per production well', '{0:10.1f}'.format(model.wellbores.prodwellflowrate.value),
862864
model.wellbores.prodwellflowrate.CurrentUnits.value))
863-
summary.append(OutputTableItem('Well depth (or total length, if not vertical)',
865+
summary.append(OutputTableItem(Outputs.VERTICAL_WELL_DEPTH_OUTPUT_NAME,
864866
'{0:10.1f}'.format(model.reserv.depth.value),
865867
model.reserv.depth.CurrentUnits.value))
866868

@@ -926,7 +928,7 @@ def PrintOutputs(self, model: Model):
926928

927929
engineering_parameters.append(OutputTableItem('Number of Production Wells', '{0:10.0f}'.format(model.wellbores.nprod.value)))
928930
engineering_parameters.append(OutputTableItem('Number of Injection Wells', '{0:10.0f}'.format(model.wellbores.ninj.value)))
929-
engineering_parameters.append(OutputTableItem('Well depth (or total length, if not vertical)',
931+
engineering_parameters.append(OutputTableItem(Outputs.VERTICAL_WELL_DEPTH_OUTPUT_NAME,
930932
'{0:10.1f}'.format(model.reserv.depth.value),
931933
model.reserv.depth.CurrentUnits.value))
932934
engineering_parameters.append(OutputTableItem('Water loss rate', '{0:10.1f}'.format(model.reserv.waterloss.value * 100),
@@ -1613,7 +1615,7 @@ def PrintOutputs(self, model: Model):
16131615
f.write(f' Number of production wells: {model.wellbores.nprod.value:10.0f}'+NL)
16141616
f.write(f' Number of injection wells: {model.wellbores.ninj.value:10.0f}'+NL)
16151617
f.write(f' Flowrate per production well: {model.wellbores.prodwellflowrate.value:10.1f} ' + model.wellbores.prodwellflowrate.CurrentUnits.value + NL)
1616-
f.write(f' Well depth (or total length, if not vertical): {model.reserv.depth.value:10.1f} ' +model.reserv.depth.CurrentUnits.value + NL)
1618+
f.write(f' {Outputs._field_label(Outputs.VERTICAL_WELL_DEPTH_OUTPUT_NAME, 49)}{model.reserv.depth.value:10.1f} ' + model.reserv.depth.CurrentUnits.value + NL)
16171619

16181620
if model.reserv.numseg.value == 1:
16191621
f.write(f' Geothermal gradient: {model.reserv.gradient.value[0]:10.4g} ' + model.reserv.gradient.CurrentUnits.value + NL)
@@ -1669,7 +1671,7 @@ def PrintOutputs(self, model: Model):
16691671
f.write(NL)
16701672
f.write(f' Number of Production Wells: {model.wellbores.nprod.value:10.0f}' + NL)
16711673
f.write(f' Number of Injection Wells: {model.wellbores.ninj.value:10.0f}' + NL)
1672-
f.write(f' Well depth (or total length, if not vertical): {model.reserv.depth.value:10.1f} ' + model.reserv.depth.CurrentUnits.value + NL)
1674+
f.write(f' {Outputs._field_label(Outputs.VERTICAL_WELL_DEPTH_OUTPUT_NAME, 49)}{model.reserv.depth.value:10.1f} ' + model.reserv.depth.CurrentUnits.value + NL)
16731675
f.write(f' Water loss rate: {model.reserv.waterloss.value*100:10.1f} ' + model.reserv.waterloss.CurrentUnits.value + NL)
16741676
f.write(f' Pump efficiency: {model.surfaceplant.pump_efficiency.value:10.1f} ' + model.surfaceplant.pump_efficiency.CurrentUnits.value + NL)
16751677
f.write(f' Injection temperature: {model.wellbores.Tinj.value:10.1f} ' + model.wellbores.Tinj.CurrentUnits.value + NL)
@@ -1809,7 +1811,7 @@ def PrintOutputs(self, model: Model):
18091811
elif econ.cost_lateral_section.value > 0.0:
18101812
f.write(f' Drilling and completion costs per vertical production well: {econ.cost_one_production_well.value:10.2f} ' + econ.cost_one_production_well.CurrentUnits.value + NL)
18111813
f.write(f' Drilling and completion costs per vertical injection well: {econ.cost_one_injection_well.value:10.2f} ' + econ.cost_one_injection_well.CurrentUnits.value + NL)
1812-
f.write(f' Drilling and completion costs per non-vertical sections: {econ.cost_lateral_section.value:10.2f} ' + econ.cost_lateral_section.CurrentUnits.value + NL)
1814+
f.write(f' Drilling and completion costs per non-vertical section: {econ.cost_lateral_section.value:10.2f} ' + econ.cost_lateral_section.CurrentUnits.value + NL)
18131815
else:
18141816
f.write(f' Drilling and completion costs per well: {model.economics.Cwell.value/(model.wellbores.nprod.value+model.wellbores.ninj.value):10.2f} ' + model.economics.Cwell.CurrentUnits.value + NL)
18151817
f.write(f' Stimulation costs: {model.economics.Cstim.value:10.2f} ' + model.economics.Cstim.CurrentUnits.value + NL)
@@ -1822,7 +1824,7 @@ def PrintOutputs(self, model: Model):
18221824
f.write(f' of which Peaking Boiler Cost: {model.economics.peakingboilercost.value:10.2f} ' + model.economics.peakingboilercost.CurrentUnits.value + NL)
18231825
f.write(f' Field gathering system costs: {model.economics.Cgath.value:10.2f} ' + model.economics.Cgath.CurrentUnits.value + NL)
18241826
if model.surfaceplant.piping_length.value > 0:
1825-
f.write(f' Transmission pipeline cost {model.economics.Cpiping.value:10.2f} ' + model.economics.Cpiping.CurrentUnits.value + NL)
1827+
f.write(f' Transmission pipeline cost: {model.economics.Cpiping.value:10.2f} ' + model.economics.Cpiping.CurrentUnits.value + NL)
18261828
if model.surfaceplant.plant_type.value == PlantType.DISTRICT_HEATING:
18271829
f.write(f' District Heating System Cost: {model.economics.dhdistrictcost.value:10.2f} ' + model.economics.dhdistrictcost.CurrentUnits.value + NL)
18281830
f.write(f' Total surface equipment costs: {(model.economics.Cplant.value+model.economics.Cgath.value):10.2f} ' + model.economics.Cplant.CurrentUnits.value + NL)
@@ -2163,3 +2165,7 @@ def o(output_param: OutputParameter):
21632165

21642166

21652167
model.logger.info(f'Complete {__class__!s}: {sys._getframe().f_code.co_name}')
2168+
2169+
@staticmethod
2170+
def _field_label(field_name:str, print_width_before_value: int) -> str:
2171+
return f'{field_name}:{" " * (print_width_before_value - len(field_name) - 1)}'

src/geophires_x/SUTRAOutputs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def PrintOutputs(self, model: Model):
9797
f.write(NL)
9898
f.write(f" Number of Production Wells: {model.wellbores.nprod.value:10.0f}" + NL)
9999
f.write(f" Number of Injection Wells: {model.wellbores.ninj.value:10.0f}" + NL)
100-
f.write(f" Well Depth: {model.reserv.depth.value:10.1f} " + model.reserv.depth.CurrentUnits.value + NL)
100+
f.write(f" Well depth: {model.reserv.depth.value:10.1f} " + model.reserv.depth.CurrentUnits.value + NL)
101101

102102
pump_efficiency_display_unit = model.surfaceplant.pump_efficiency.CurrentUnits.value
103103
pump_efficiency_display = f'{model.surfaceplant.pump_efficiency.value:10.1f} {pump_efficiency_display_unit}'

src/geophires_x/SurfacePlant.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ def __init__(self, model: Model):
340340
UnitType=Units.LENGTH,
341341
PreferredUnits=LengthUnit.KILOMETERS,
342342
CurrentUnits=LengthUnit.KILOMETERS,
343-
ErrMessage="assume default piping length (5km)"
343+
ErrMessage="assume default piping length (0km)"
344344
)
345345
self.plant_outlet_pressure = self.ParameterDict[self.plant_outlet_pressure.Name] = floatParameter(
346346
"Plant Outlet Pressure",

src/geophires_x/SurfacePlantDoubleFlash.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def Calculate(self, model: Model) -> None:
118118
model.wellbores.Tinj.value, ReinjTemp, self.T_chp_bottom.value,
119119
self.enduse_efficiency_factor.value, self.chp_fraction.value)
120120

121-
# subtract pumping power for net electricity and calculate first law efficiency
121+
# subtract pumping power for net electricity and calculate first law efficiency
122122
self.NetElectricityProduced.value = self.ElectricityProduced.value - model.wellbores.PumpingPower.value
123123
self.FirstLawEfficiency.value = self.NetElectricityProduced.value/HeatExtractedTowardsElectricity
124124

0 commit comments

Comments
 (0)