Skip to content

Commit 6bc992d

Browse files
Merge pull request #43 from softwareengineerprogrammer/well-depth-fixes
"Well depth" instead of "Well depth (or total length, if not vertical)"
2 parents 9bb1310 + 08d0a35 commit 6bc992d

Some content is hidden

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

41 files changed

+207
-192
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.9
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.9
57+
version: 3.7.0
5858
version_manager: "bump2version"
5959
website: "https://github.com/NREL"
6060
year_from: "2023"

CHANGELOG.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ Changelog
55
GEOPHIRES-X (2023-2024)
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.9.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.9...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.9'
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.9',
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: 10 additions & 4 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)
@@ -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/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

src/geophires_x/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '3.6.9'
1+
__version__ = '3.7.0'

0 commit comments

Comments
 (0)