Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 3.7.20
current_version = 3.7.21
commit = True
tag = True

Expand Down
2 changes: 1 addition & 1 deletion .cookiecutterrc
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ default_context:
sphinx_doctest: "no"
sphinx_theme: "sphinx-py3doc-enhanced-theme"
test_matrix_separate_coverage: "no"
version: 3.7.20
version: 3.7.21
version_manager: "bump2version"
website: "https://github.com/NREL"
year_from: "2023"
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ Free software: `MIT license <LICENSE>`__
:alt: Supported implementations
:target: https://pypi.org/project/geophires-x

.. |commits-since| image:: https://img.shields.io/github/commits-since/softwareengineerprogrammer/GEOPHIRES-X/v3.7.20.svg
.. |commits-since| image:: https://img.shields.io/github/commits-since/softwareengineerprogrammer/GEOPHIRES-X/v3.7.21.svg
:alt: Commits since latest release
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.7.20...main
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.7.21...main

.. |docs| image:: https://readthedocs.org/projects/GEOPHIRES-X/badge/?style=flat
:target: https://nrel.github.io/GEOPHIRES-X
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
year = '2025'
author = 'NREL'
copyright = f'{year}, {author}'
version = release = '3.7.20'
version = release = '3.7.21'

pygments_style = 'trac'
templates_path = ['./templates']
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def read(*names, **kwargs):

setup(
name='geophires-x',
version='3.7.20',
version='3.7.21',
license='MIT',
description='GEOPHIRES is a free and open-source geothermal techno-economic simulator.',
long_description='{}\n{}'.format(
Expand Down
6 changes: 3 additions & 3 deletions src/geophires_x/Economics.py
Original file line number Diff line number Diff line change
Expand Up @@ -2804,19 +2804,19 @@ def Calculate(self, model: Model) -> None:
self.ElecRevenue.value, self.ElecCummRevenue.value = CalculateRevenue(
model.surfaceplant.plant_lifetime.value, model.surfaceplant.construction_years.value,
model.surfaceplant.NetkWhProduced.value, self.ElecPrice.value)
self.TotalRevenue.value = self.ElecRevenue.value
self.TotalRevenue.value = self.ElecRevenue.value.copy()
#self.TotalCummRevenue.value = self.ElecCummRevenue.value
elif model.surfaceplant.enduse_option.value == EndUseOptions.HEAT and model.surfaceplant.plant_type.value not in [PlantType.ABSORPTION_CHILLER]:
self.HeatRevenue.value, self.HeatCummRevenue.value = CalculateRevenue(
model.surfaceplant.plant_lifetime.value, model.surfaceplant.construction_years.value,
model.surfaceplant.HeatkWhProduced.value, self.HeatPrice.value)
self.TotalRevenue.value = self.HeatRevenue.value
self.TotalRevenue.value = self.HeatRevenue.value.copy()
#self.TotalCummRevenue.value = self.HeatCummRevenue.value
elif model.surfaceplant.enduse_option.value == EndUseOptions.HEAT and model.surfaceplant.plant_type.value in [PlantType.ABSORPTION_CHILLER]:
self.CoolingRevenue.value, self.CoolingCummRevenue.value = CalculateRevenue(
model.surfaceplant.plant_lifetime.value, model.surfaceplant.construction_years.value,
model.surfaceplant.cooling_kWh_Produced.value, self.CoolingPrice.value)
self.TotalRevenue.value = self.CoolingRevenue.value
self.TotalRevenue.value = self.CoolingRevenue.value.copy()
Comment on lines +2807 to +2819
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding .copy() here prevents subsequent changes to self.TotalRevenue from affecting self.{Elec|Heat|Cooling}Revenue because self.TotalRevenue is now a copy of the values instead of a reference to the same object.

#self.TotalCummRevenue.value = self.CoolingCummRevenue.value
elif model.surfaceplant.enduse_option.value in [EndUseOptions.COGENERATION_TOPPING_EXTRA_HEAT,
EndUseOptions.COGENERATION_TOPPING_EXTRA_ELECTRICITY,
Expand Down
6 changes: 3 additions & 3 deletions src/geophires_x/SBTEconomics.py
Original file line number Diff line number Diff line change
Expand Up @@ -755,19 +755,19 @@ def Calculate(self, model: Model) -> None:
self.ElecRevenue.value, self.ElecCummRevenue.value = CalculateRevenue(
model.surfaceplant.plant_lifetime.value, model.surfaceplant.construction_years.value,
model.surfaceplant.NetkWhProduced.value, self.ElecPrice.value)
self.TotalRevenue.value = self.ElecRevenue.value
self.TotalRevenue.value = self.ElecRevenue.value.copy()
#self.TotalCummRevenue.value = self.ElecCummRevenue.value
elif model.surfaceplant.enduse_option.value == EndUseOptions.HEAT and model.surfaceplant.plant_type.value not in [PlantType.ABSORPTION_CHILLER]:
self.HeatRevenue.value, self.HeatCummRevenue.value = CalculateRevenue(
model.surfaceplant.plant_lifetime.value, model.surfaceplant.construction_years.value,
model.surfaceplant.HeatkWhProduced.value, self.HeatPrice.value)
self.TotalRevenue.value = self.HeatRevenue.value
self.TotalRevenue.value = self.HeatRevenue.value.copy()
#self.TotalCummRevenue.value = self.HeatCummRevenue.value
elif model.surfaceplant.enduse_option.value == EndUseOptions.HEAT and model.surfaceplant.plant_type.value in [PlantType.ABSORPTION_CHILLER]:
self.CoolingRevenue.value, self.CoolingCummRevenue.value = CalculateRevenue(
model.surfaceplant.plant_lifetime.value, model.surfaceplant.construction_years.value,
model.surfaceplant.cooling_kWh_Produced.value, self.CoolingPrice.value)
self.TotalRevenue.value = self.CoolingRevenue.value
self.TotalRevenue.value = self.CoolingRevenue.value.copy()
#self.TotalCummRevenue.value = self.CoolingCummRevenue.value
elif model.surfaceplant.enduse_option.value in [EndUseOptions.COGENERATION_TOPPING_EXTRA_HEAT,
EndUseOptions.COGENERATION_TOPPING_EXTRA_ELECTRICITY,
Expand Down
2 changes: 1 addition & 1 deletion src/geophires_x/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '3.7.20'
__version__ = '3.7.21'
62 changes: 31 additions & 31 deletions tests/example1_addons.csv
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ SURFACE EQUIPMENT SIMULATION RESULTS,Average Annual Net Electricity Generation,,
SURFACE EQUIPMENT SIMULATION RESULTS,Average Pumping Power,,0.2,MW
SURFACE EQUIPMENT SIMULATION RESULTS,Initial pumping power/net installed power,,3.82,%
SURFACE EQUIPMENT SIMULATION RESULTS,Heat to Power Conversion Efficiency,,10.07,%
Simulation Metadata,GEOPHIRES Version,,3.7.19,
Simulation Metadata,GEOPHIRES Version,,3.7.20,
POWER GENERATION PROFILE,THERMAL DRAWDOWN,1,1.0,
POWER GENERATION PROFILE,THERMAL DRAWDOWN,2,1.0056,
POWER GENERATION PROFILE,THERMAL DRAWDOWN,3,1.0073,
Expand Down Expand Up @@ -670,36 +670,36 @@ REVENUE & CASHFLOW PROFILE,Electricity Price,27,15.0,cents/kWh
REVENUE & CASHFLOW PROFILE,Electricity Price,28,15.0,cents/kWh
REVENUE & CASHFLOW PROFILE,Electricity Price,29,15.0,cents/kWh
REVENUE & CASHFLOW PROFILE,Electricity Price,30,15.0,cents/kWh
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,1,-31.07,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,2,5.07,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,3,5.12,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,4,5.13,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,5,5.14,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,6,5.15,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,7,5.15,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,8,6.02,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,9,6.88,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,10,7.74,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,11,8.6,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,12,9.47,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,13,9.82,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,14,10.17,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,15,10.52,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,16,10.7,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,17,10.71,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,18,10.71,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,19,10.71,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,20,10.71,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,21,10.72,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,22,10.72,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,23,10.72,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,24,10.72,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,25,10.72,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,26,10.73,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,27,10.73,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,28,10.73,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,29,10.73,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,30,10.73,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,1,0.0,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,2,3.74,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,3,3.78,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,4,3.8,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,5,3.81,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,6,3.81,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,7,3.82,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,8,4.33,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,9,4.84,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,10,5.36,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,11,5.87,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,12,6.38,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,13,6.39,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,14,6.39,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,15,6.39,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,16,6.39,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,17,6.39,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,18,6.4,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,19,6.4,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,20,6.4,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,21,6.4,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,22,6.4,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,23,6.4,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,24,6.4,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,25,6.41,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,26,6.41,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,27,6.41,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,28,6.41,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,29,6.41,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Ann. Rev.,30,6.41,MUSD/yr
REVENUE & CASHFLOW PROFILE,Electricity Cumm. Rev.,1,0.0,MUSD
REVENUE & CASHFLOW PROFILE,Electricity Cumm. Rev.,2,3.74,MUSD
REVENUE & CASHFLOW PROFILE,Electricity Cumm. Rev.,3,7.53,MUSD
Expand Down
28 changes: 14 additions & 14 deletions tests/examples/Fervo_Norbeck_Latimer_2023.out
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

Simulation Metadata
----------------------
GEOPHIRES Version: 3.7.19
Simulation Date: 2025-02-28
Simulation Time: 11:34
Calculation Time: 0.459 sec
GEOPHIRES Version: 3.7.20
Simulation Date: 2025-03-04
Simulation Time: 08:31
Calculation Time: 0.447 sec

***SUMMARY OF RESULTS***

Expand Down Expand Up @@ -174,13 +174,13 @@ Year Electricity | Heat |
Since Price Ann. Rev. Cumm. Rev. | Price Ann. Rev. Cumm. Rev. | Price Ann. Rev. Cumm. Rev. | Price Ann. Rev. Cumm. Rev. | OPEX Net Rev. Net Cashflow
Start (cents/kWh)(MUSD/yr) (MUSD) |(cents/kWh) (MUSD/yr) (MUSD) |(cents/kWh) (MUSD/yr) (MUSD) |(USD/lb) (MUSD/yr) (MUSD) |(MUSD/yr) (MUSD/yr) (MUSD)
________________________________________________________________________________________________________________________________________________________________________________________
1 0.00 -28.12 0.00 | 0.00 0.00 0.00 | 0.00 0.00 0.00 | 0.00 0.00 0.00 | 0.00 -28.12 -28.12
2 15.00 1.94 2.70 | 2.50 0.00 0.00 | 2.50 0.00 0.00 | 0.00 0.00 0.00 | 0.76 1.94 -26.18
3 15.00 1.97 5.44 | 2.50 0.00 0.00 | 2.50 0.00 0.00 | 0.00 0.00 0.00 | 0.76 1.97 -24.21
4 15.41 2.06 8.26 | 2.50 0.00 0.00 | 2.50 0.00 0.00 | 0.00 0.00 0.00 | 0.76 2.06 -22.15
5 15.81 2.14 11.17 | 2.50 0.00 0.00 | 2.50 0.00 0.00 | 0.00 0.00 0.00 | 0.76 2.14 -20.00
6 16.22 2.22 14.16 | 2.50 0.00 0.00 | 2.50 0.00 0.00 | 0.00 0.00 0.00 | 0.76 2.22 -17.78
7 16.62 2.30 17.22 | 2.50 0.00 0.00 | 2.50 0.00 0.00 | 0.00 0.00 0.00 | 0.76 2.30 -15.48
8 17.03 2.37 20.35 | 2.50 0.00 0.00 | 2.50 0.00 0.00 | 0.00 0.00 0.00 | 0.76 2.37 -13.12
9 17.43 2.39 23.51 | 2.50 0.00 0.00 | 2.50 0.00 0.00 | 0.00 0.00 0.00 | 0.76 2.39 -10.73
10 17.84 2.29 26.56 | 2.50 0.00 0.00 | 2.50 0.00 0.00 | 0.00 0.00 0.00 | 0.76 2.29 -8.44
1 0.00 0.00 0.00 | 0.00 0.00 0.00 | 0.00 0.00 0.00 | 0.00 0.00 0.00 | 0.00 -28.12 -28.12
2 15.00 2.70 2.70 | 2.50 0.00 0.00 | 2.50 0.00 0.00 | 0.00 0.00 0.00 | 0.76 1.94 -26.18
Comment on lines +177 to +178
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example file diffs should only change electricity annual revenue column, which I manually verified in full for Fervo Cape Station 3 example and sanity-eyeball-checked for other results.

3 15.00 2.74 5.44 | 2.50 0.00 0.00 | 2.50 0.00 0.00 | 0.00 0.00 0.00 | 0.76 1.97 -24.21
4 15.41 2.83 8.26 | 2.50 0.00 0.00 | 2.50 0.00 0.00 | 0.00 0.00 0.00 | 0.76 2.06 -22.15
5 15.81 2.91 11.17 | 2.50 0.00 0.00 | 2.50 0.00 0.00 | 0.00 0.00 0.00 | 0.76 2.14 -20.00
6 16.22 2.99 14.16 | 2.50 0.00 0.00 | 2.50 0.00 0.00 | 0.00 0.00 0.00 | 0.76 2.22 -17.78
7 16.62 3.06 17.22 | 2.50 0.00 0.00 | 2.50 0.00 0.00 | 0.00 0.00 0.00 | 0.76 2.30 -15.48
8 17.03 3.13 20.35 | 2.50 0.00 0.00 | 2.50 0.00 0.00 | 0.00 0.00 0.00 | 0.76 2.37 -13.12
9 17.43 3.15 23.51 | 2.50 0.00 0.00 | 2.50 0.00 0.00 | 0.00 0.00 0.00 | 0.76 2.39 -10.73
10 17.84 3.05 26.56 | 2.50 0.00 0.00 | 2.50 0.00 0.00 | 0.00 0.00 0.00 | 0.76 2.29 -8.44
Loading