Skip to content

Commit efc5aa9

Browse files
Merge pull request NREL#412 from softwareengineerprogrammer/main
Well diameter outputs, surface plant cost, non-SAM-EM Inflation costs during construction [v3.9.48]
2 parents 3d1fa97 + 8e729d9 commit efc5aa9

27 files changed

+266
-119
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.47
2+
current_version = 3.9.48
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.47
57+
version: 3.9.48
5858
version_manager: "bump2version"
5959
website: "https://github.com/NREL"
6060
year_from: "2023"

CHANGELOG.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ GEOPHIRES v3 (2023-2025)
88
3.9
99
^^^
1010

11+
3.9.48: `Well diameter outputs, surface plant cost, non-SAM-EM Inflation costs during construction <https://github.com/NREL/GEOPHIRES-X/pull/412>`__ | `release <https://github.com/NREL/GEOPHIRES-X/releases/tag/v3.9.48>`__
12+
1113
3.9.47: `Add-Ons support for SAM Economic Models <https://nrel.github.io/GEOPHIRES-X/SAM-Economic-Models.html#add-ons>`__ | `release <https://github.com/NREL/GEOPHIRES-X/releases/tag/v3.9.47>`__
1214

1315
3.9.43: `Inflation costs <https://github.com/NREL/GEOPHIRES-X/pull/409>`__ | `release <https://github.com/NREL/GEOPHIRES-X/releases/tag/v3.9.43>`__

README.rst

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

61-
.. |commits-since| image:: https://img.shields.io/github/commits-since/softwareengineerprogrammer/GEOPHIRES-X/v3.9.47.svg
61+
.. |commits-since| image:: https://img.shields.io/github/commits-since/softwareengineerprogrammer/GEOPHIRES-X/v3.9.48.svg
6262
:alt: Commits since latest release
63-
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.9.47...main
63+
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.9.48...main
6464

6565
.. |docs| image:: https://readthedocs.org/projects/GEOPHIRES-X/badge/?style=flat
6666
: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.47'
21+
version = release = '3.9.48'
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.47',
16+
version='3.9.48',
1717
license='MIT',
1818
description='GEOPHIRES is a free and open-source geothermal techno-economic simulator.',
1919
long_description='{}\n{}'.format(

src/geophires_x/AGSWellBores.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,6 +1028,8 @@ def Calculate(self, model: Model) -> None:
10281028
# (b/c we are not generating electricity) = thermosiphon is happening!
10291029
self.PumpingPower.value = [max(x, 0.) for x in self.PumpingPower.value]
10301030

1031+
self._sync_output_params_from_input_params()
1032+
10311033
model.logger.info(f'complete {str(__class__)}: {sys._getframe().f_code.co_name}')
10321034

10331035
def __str__(self):

src/geophires_x/Economics.py

Lines changed: 71 additions & 33 deletions
Large diffs are not rendered by default.

src/geophires_x/EconomicsUtils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ def total_capex_parameter_output_parameter() -> OutputParameter:
139139
UnitType=Units.CURRENCY,
140140
CurrentUnits=CurrencyUnit.MDOLLARS,
141141
PreferredUnits=CurrencyUnit.MDOLLARS,
142-
ToolTipText="The total capital expenditure (CAPEX) required to construct the plant. "
143-
"This value includes all direct and indirect costs, contingency, and any cost escalation from "
144-
"inflation during construction. It is used as the total installed cost input for "
145-
"SAM Economic Models."
142+
ToolTipText='The total capital expenditure (CAPEX) required to construct the plant. '
143+
'This value includes all direct and indirect costs, and contingency. '
144+
'For SAM Economic models, it also includes any cost escalation from inflation during construction. '
145+
'It is used as the total installed cost input for SAM Economic Models.'
146146
)

src/geophires_x/Outputs.py

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,20 @@ def PrintOutputs(self, model: Model):
274274
acf_label = Outputs._field_label(acf.display_name, 49)
275275
f.write(f' {acf_label}{acf.value:10.2f} {acf.CurrentUnits.value}\n')
276276

277+
display_inflation_costs_in_economic_parameters: bool = (
278+
econ.econmodel.value in [EconomicModel.BICYCLE,
279+
EconomicModel.FCR,
280+
EconomicModel.STANDARDIZED_LEVELIZED_COST]
281+
and
282+
econ.inflation_cost_during_construction.value != 0.
283+
)
284+
if display_inflation_costs_in_economic_parameters:
285+
# Inflation cost is displayed here for economic models that don't treat inflation cost as a
286+
# capital cost
287+
icc: OutputParameter = econ.inflation_cost_during_construction
288+
icc_label = Outputs._field_label(icc.display_name, 49)
289+
f.write(f' {icc_label}{icc.value:10.2f} {icc.CurrentUnits.value}\n')
290+
277291
f.write(f' Project lifetime: {model.surfaceplant.plant_lifetime.value:10.0f} {model.surfaceplant.plant_lifetime.CurrentUnits.value}\n')
278292
f.write(f' Capacity factor: {model.surfaceplant.utilization_factor.value * 100:10.1f} %\n')
279293

@@ -327,8 +341,8 @@ def PrintOutputs(self, model: Model):
327341
f.write(' User-provided production well temperature drop\n')
328342
f.write(f' Constant production well temperature drop: {model.wellbores.tempdropprod.value:10.1f} ' + model.wellbores.tempdropprod.PreferredUnits.value + NL)
329343
f.write(f' Flowrate per production well: {model.wellbores.prodwellflowrate.value:10.1f} ' + model.wellbores.prodwellflowrate.CurrentUnits.value + NL)
330-
f.write(f' Injection well casing ID: {model.wellbores.injwelldiam.value:10.3f} ' + model.wellbores.injwelldiam.CurrentUnits.value + NL)
331-
f.write(f' Production well casing ID: {model.wellbores.prodwelldiam.value:10.3f} ' + model.wellbores.prodwelldiam.CurrentUnits.value + NL)
344+
f.write(f' {model.wellbores.injection_well_casing_inner_diameter.display_name}: {model.wellbores.injection_well_casing_inner_diameter.value:10.3f} {model.wellbores.injection_well_casing_inner_diameter.CurrentUnits.value}\n')
345+
f.write(f' {model.wellbores.production_well_casing_inner_diameter.display_name}: {model.wellbores.production_well_casing_inner_diameter.value:10.3f} {model.wellbores.production_well_casing_inner_diameter.CurrentUnits.value}\n')
332346
f.write(f' {model.wellbores.redrill.display_name}: {model.wellbores.redrill.value:10.0f}\n')
333347
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]:
334348
f.write(' Power plant type: ' + str(model.surfaceplant.plant_type.value.value) + NL)
@@ -497,8 +511,8 @@ def PrintOutputs(self, model: Model):
497511
# expenditure.
498512
pass
499513

500-
if is_sam_econ_model:
501-
# TODO calculate & display for other economic models
514+
display_inflation_during_construction_in_capital_costs = is_sam_econ_model
515+
if display_inflation_during_construction_in_capital_costs:
502516
icc_label = Outputs._field_label(econ.inflation_cost_during_construction.display_name, 47)
503517
f.write(f' {icc_label}{econ.inflation_cost_during_construction.value:10.2f} {econ.inflation_cost_during_construction.CurrentUnits.value}\n')
504518

0 commit comments

Comments
 (0)