Skip to content

Commit 7a44315

Browse files
Merge pull request NREL#359 from softwareengineerprogrammer/main
Revenue Profile Period & Final Year Correction [v3.8.0]
2 parents a8a0c40 + 4577bcf commit 7a44315

Some content is hidden

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

43 files changed

+1250
-1135
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.7.23
2+
current_version = 3.8.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.7.23
57+
version: 3.8.0
5858
version_manager: "bump2version"
5959
website: "https://github.com/NREL"
6060
year_from: "2023"

CHANGELOG.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ Changelog
55
GEOPHIRES-X (2023-2025)
66
------------------------
77

8+
3.8
9+
^^^
10+
11+
`release <https://github.com/NREL/GEOPHIRES-X/releases/tag/v3.8.0>`__ | `diff <https://github.com/NREL/GEOPHIRES-X/compare/v3.7.0...v3.8.0>`__
12+
13+
Revenue & Cashflow Profile period output aligned with NREL convention used to calculate NPV.
14+
See https://github.com/NREL/GEOPHIRES-X/discussions/344
15+
816
3.7
917
^^^
1018

@@ -24,6 +32,8 @@ GEOPHIRES-X (2023-2025)
2432

2533
2. Electricity annual revenue profile data `issue <https://github.com/NREL/GEOPHIRES-X/issues/342>`__ resolved.
2634

35+
3.7.23: Surface Plant time series integration `fix <https://github.com/NREL/GEOPHIRES-X/pull/353>`__: production and revenue in the final year of project lifetime are now fully accounted for in results.
36+
2737
3.6
2838
^^^
2939

@@ -104,3 +114,19 @@ Internal changes to support unit testing
104114
------------
105115

106116
* `GEOPHIRES v1 </References/Beckers%202013%20GEOPHIRES%20v1.pdf>`__
117+
118+
119+
Versioning Notes
120+
----------------
121+
122+
GEOPHIRES 3.0 (GEOPHIRES-X) and subsequent releases use `semantic versioning <https://en.wikipedia.org/wiki/Software_versioning#Semantic_versioning>`__.
123+
Major, minor, and notable patch versions are documented above.
124+
You may also be interested in viewing the list of all PRs merged into the repository `here <https://github.com/NREL/GEOPHIRES-X/pulls?q=is%3Apr+is%3Amerged+>`__.
125+
126+
Each semantic version has a corresponding tag, the full list of which can be viewed `here <https://github.com/NREL/GEOPHIRES-X/tags>`__.
127+
The latest patch version in this repository and patch versions explicitly mentioned in this changelog are always suitable for public consumption;
128+
but note that not all patch version tags in the list are meant for public consumption
129+
as intermediate internal-only patch versions are sometimes introduced during the development process.
130+
(Improved designation and distribution of releases for public consumption may eventually be addressed by
131+
`publishing to PyPI <https://github.com/NREL/GEOPHIRES-X/issues/117>`__ and/or use of
132+
`GitHub releases <https://docs.github.com/en/repositories/releasing-projects-on-github/about-releases>`__.)

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.7.23.svg
59+
.. |commits-since| image:: https://img.shields.io/github/commits-since/softwareengineerprogrammer/GEOPHIRES-X/v3.8.0.svg
6060
:alt: Commits since latest release
61-
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.7.23...main
61+
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.8.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 = '2025'
1919
author = 'NREL'
2020
copyright = f'{year}, {author}'
21-
version = release = '3.7.23'
21+
version = release = '3.8.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.7.23',
16+
version='3.8.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/Economics.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1755,7 +1755,12 @@ def __init__(self, model: Model):
17551755
"Project Net Present Value",
17561756
UnitType=Units.CURRENCY,
17571757
PreferredUnits=CurrencyUnit.MDOLLARS,
1758-
CurrentUnits=CurrencyUnit.MDOLLARS
1758+
CurrentUnits=CurrencyUnit.MDOLLARS,
1759+
ToolTipText='NPV is calculated with cashflows lumped at the end of periods. '
1760+
'See: Short W et al, 1995. '
1761+
'"A Manual for the Economic Evaluation of Energy Efficiency and Renewable Energy '
1762+
'Technologies.", p. 41. '
1763+
'https://www.nrel.gov/docs/legosti/old/5173.pdf'
17591764
)
17601765
self.ProjectIRR = self.OutputParameterDict[self.ProjectIRR.Name] = OutputParameter(
17611766
"Project Internal Rate of Return",

src/geophires_x/Outputs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2100,13 +2100,13 @@ def o(output_param: OutputParameter):
21002100
'________________________________________________________________________________________________________________________________________________________________________________________' + NL)
21012101
# running years...
21022102
for ii in range(0, (
2103-
model.surfaceplant.construction_years.value + model.surfaceplant.plant_lifetime.value - 1), 1):
2103+
model.surfaceplant.construction_years.value + model.surfaceplant.plant_lifetime.value), 1):
21042104
if ii < model.surfaceplant.construction_years.value:
21052105
opex = 0.0 # zero out the OPEX during construction years
21062106
else:
21072107
opex = o(econ.Coam).value
21082108
f.write(
2109-
f'{ii + 1:3.0f} {o(econ.ElecPrice).value[ii]:5.2f} {o(econ.ElecRevenue).value[ii]:5.2f} {o(econ.ElecCummRevenue).value[ii]:5.2f} | {o(econ.HeatPrice).value[ii]:5.2f} {o(econ.HeatRevenue).value[ii]:5.2f} {o(econ.HeatCummRevenue).value[ii]:5.2f} | {o(econ.CoolingPrice).value[ii]:5.2f} {o(econ.CoolingRevenue).value[ii]:5.2f} {o(econ.CoolingCummRevenue).value[ii]:5.2f} | {o(econ.CarbonPrice).value[ii]:5.2f} {o(econ.CarbonRevenue).value[ii]:5.2f} {o(econ.CarbonCummCashFlow).value[ii]:5.2f} | {opex:5.2f} {o(econ.TotalRevenue).value[ii]:5.2f} {o(econ.TotalCummRevenue).value[ii]:5.2f}\n')
2109+
f'{ii:3.0f} {o(econ.ElecPrice).value[ii]:5.2f} {o(econ.ElecRevenue).value[ii]:5.2f} {o(econ.ElecCummRevenue).value[ii]:5.2f} | {o(econ.HeatPrice).value[ii]:5.2f} {o(econ.HeatRevenue).value[ii]:5.2f} {o(econ.HeatCummRevenue).value[ii]:5.2f} | {o(econ.CoolingPrice).value[ii]:5.2f} {o(econ.CoolingRevenue).value[ii]:5.2f} {o(econ.CoolingCummRevenue).value[ii]:5.2f} | {o(econ.CarbonPrice).value[ii]:5.2f} {o(econ.CarbonRevenue).value[ii]:5.2f} {o(econ.CarbonCummCashFlow).value[ii]:5.2f} | {opex:5.2f} {o(econ.TotalRevenue).value[ii]:5.2f} {o(econ.TotalCummRevenue).value[ii]:5.2f}\n')
21102110
f.write(NL)
21112111

21122112
# if we are dealing with overpressure and two different reservoirs, show a table reporting the values

src/geophires_x/SurfacePlant.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,10 @@ def __init__(self, model: Model):
410410
AllowableRange=list(range(1, 15, 1)),
411411
UnitType=Units.NONE,
412412
ErrMessage="assume default number of years in construction (1)",
413-
ToolTipText="Number of years spent in construction (assumes whole years, no fractions)"
413+
ToolTipText='Number of years spent in construction (assumes whole years, no fractions). '
414+
'Capital costs are spread evenly over constructions years e.g. if total capital costs are '
415+
'$500M and there are 2 construction years, '
416+
'then $250M will be spent in both the first and second construction years.'
414417
)
415418
self.cp_fluid = self.ParameterDict[self.cp_fluid.Name] = floatParameter(
416419
"Working Fluid Heat Capacity",

src/geophires_x/__init__.py

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

0 commit comments

Comments
 (0)