Skip to content

Commit da615c0

Browse files
Merge pull request #72 from softwareengineerprogrammer/missing-percent-unit-fixes
Missing percent unit fixes [v3.9.8]
2 parents 581e93b + d5a0f0c commit da615c0

40 files changed

+247
-246
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.9.7
2+
current_version = 3.9.8
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.9.7
57+
version: 3.9.8
5858
version_manager: "bump2version"
5959
website: "https://github.com/NREL"
6060
year_from: "2023"

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.9.7.svg
59+
.. |commits-since| image:: https://img.shields.io/github/commits-since/softwareengineerprogrammer/GEOPHIRES-X/v3.9.8.svg
6060
:alt: Commits since latest release
61-
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.9.7...main
61+
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.9.8...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 = '2025'
1919
author = 'NREL'
2020
copyright = f'{year}, {author}'
21-
version = release = '3.9.7'
21+
version = release = '3.9.8'
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.9.7',
16+
version='3.9.8',
1717
license='MIT',
1818
description='GEOPHIRES is a free and open-source geothermal techno-economic simulator.',
1919
long_description='{}\n{}'.format(

src/geophires_x/Economics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,7 @@ def __init__(self, model: Model):
969969
Min=0.0,
970970
Max=1.0,
971971
UnitType=Units.PERCENT,
972-
PreferredUnits=PercentUnit.TENTH,
972+
PreferredUnits=PercentUnit.PERCENT,
973973
CurrentUnits=PercentUnit.TENTH,
974974
ErrMessage="assume default inflation rate during construction (0)"
975975
)

src/geophires_x/Outputs.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,7 @@ def PrintOutputs(self, model: Model):
264264
label = Outputs._field_label(field.Name, 49)
265265
f.write(f' {label}{field.value:10.2f} {field.CurrentUnits.value}\n')
266266

267-
# FIXME TODO unit is missing https://github.com/NREL/GEOPHIRES-X/issues/382
268-
f.write(f' Accrued financing during construction: {model.economics.inflrateconstruction.value*100:10.2f} {model.economics.inflrateconstruction.CurrentUnits.value}\n')
267+
f.write(f' Accrued financing during construction: {econ.inflrateconstruction.value:10.2f} {econ.inflrateconstruction.CurrentUnits.value}\n')
269268

270269
f.write(f' Project lifetime: {model.surfaceplant.plant_lifetime.value:10.0f} {model.surfaceplant.plant_lifetime.CurrentUnits.value}\n')
271270
f.write(f' Capacity factor: {model.surfaceplant.utilization_factor.value * 100:10.1f} %\n')
@@ -307,7 +306,7 @@ def PrintOutputs(self, model: Model):
307306
f.write(f' Number of Production Wells: {model.wellbores.nprod.value:10.0f}' + NL)
308307
f.write(f' Number of Injection Wells: {model.wellbores.ninj.value:10.0f}' + NL)
309308
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)
310-
f.write(f' Water loss rate: {model.reserv.waterloss.value*100:10.1f} ' + model.reserv.waterloss.CurrentUnits.value + NL)
309+
f.write(f' Water loss rate: {model.reserv.waterloss.value:10.1f} {model.reserv.waterloss.CurrentUnits.value}\n')
311310
f.write(f' Pump efficiency: {model.surfaceplant.pump_efficiency.value:10.1f} ' + model.surfaceplant.pump_efficiency.CurrentUnits.value + NL)
312311
f.write(f' Injection temperature: {model.wellbores.Tinj.value:10.1f} ' + model.wellbores.Tinj.CurrentUnits.value + NL)
313312
if model.wellbores.rameyoptionprod.value:

src/geophires_x/Reservoir.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,16 +320,18 @@ def __init__(self, model: Model):
320320
ToolTipText="Geothermal reservoir volume"
321321
)
322322

323+
# noinspection SpellCheckingInspection
323324
self.waterloss = self.ParameterDict[self.waterloss.Name] = floatParameter(
324325
"Water Loss Fraction",
325326
DefaultValue=0.0,
326327
Min=0.0,
327328
Max=0.99,
328329
UnitType=Units.PERCENT,
329-
PreferredUnits=PercentUnit.TENTH,
330330
CurrentUnits=PercentUnit.TENTH,
331+
PreferredUnits=PercentUnit.PERCENT,
331332
ErrMessage="assume default water loss fraction (0)",
332-
ToolTipText="Fraction of water lost in the reservoir defined as (total geofluid lost)/(total geofluid produced)."
333+
ToolTipText="Fraction of water lost in the reservoir defined as "
334+
"(total geofluid lost)/(total geofluid produced)."
333335
)
334336

335337
self.cprock = self.ParameterDict[self.cprock.Name] = floatParameter(

src/geophires_x/__init__.py

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

tests/example1_addons.csv

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ SUMMARY OF RESULTS,Well depth,,3.0,kilometer
99
SUMMARY OF RESULTS,Geothermal gradient,,50,degC/km
1010
SUMMARY OF RESULTS,Total Avoided Carbon Emissions,,474.67,kilotonne
1111
ECONOMIC PARAMETERS,Economic Model,,Fixed Charge Rate (FCR),
12-
ECONOMIC PARAMETERS,Accrued financing during construction,,0.0,
12+
ECONOMIC PARAMETERS,Accrued financing during construction,,0.0,%
1313
ECONOMIC PARAMETERS,Project lifetime,,30,yr
1414
ECONOMIC PARAMETERS,Capacity factor,,90.0,%
1515
ECONOMIC PARAMETERS,Project NPV,,72.08,MUSD
@@ -36,7 +36,7 @@ EXTENDED ECONOMICS,AddOns Payback Period,,0.0,yr
3636
ENGINEERING PARAMETERS,Number of Production Wells,,2,count
3737
ENGINEERING PARAMETERS,Number of Injection Wells,,2,count
3838
ENGINEERING PARAMETERS,Well depth,,3.0,kilometer
39-
ENGINEERING PARAMETERS,Water loss rate,,2.0,
39+
ENGINEERING PARAMETERS,Water loss rate,,2.0,%
4040
ENGINEERING PARAMETERS,Pump efficiency,,80.0,%
4141
ENGINEERING PARAMETERS,Injection temperature,,50.0,degC
4242
ENGINEERING PARAMETERS,Average production well temperature drop,,3.0,degC
@@ -99,7 +99,7 @@ SURFACE EQUIPMENT SIMULATION RESULTS,Average Annual Net Electricity Generation,,
9999
SURFACE EQUIPMENT SIMULATION RESULTS,Average Pumping Power,,0.2,MW
100100
SURFACE EQUIPMENT SIMULATION RESULTS,Initial pumping power/net installed power,,3.82,%
101101
SURFACE EQUIPMENT SIMULATION RESULTS,Heat to Power Conversion Efficiency,,10.07,%
102-
Simulation Metadata,GEOPHIRES Version,,3.8.4,
102+
Simulation Metadata,GEOPHIRES Version,,3.9.7,
103103
POWER GENERATION PROFILE,THERMAL DRAWDOWN,1,1.0,
104104
POWER GENERATION PROFILE,THERMAL DRAWDOWN,2,1.0056,
105105
POWER GENERATION PROFILE,THERMAL DRAWDOWN,3,1.0073,

0 commit comments

Comments
 (0)