Skip to content

Commit 4b5caa5

Browse files
Revert "Merge pull request #63 from softwareengineerprogrammer/itc-period-fix-3"
This reverts commit a9ab719, reversing changes made to 3385832.
1 parent eaaffb1 commit 4b5caa5

File tree

11 files changed

+43
-50
lines changed

11 files changed

+43
-50
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.8.12
2+
current_version = 3.8.10
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.8.12
57+
version: 3.8.10
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.8.12.svg
59+
.. |commits-since| image:: https://img.shields.io/github/commits-since/softwareengineerprogrammer/GEOPHIRES-X/v3.8.10.svg
6060
:alt: Commits since latest release
61-
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.8.12...main
61+
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.8.10...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.8.12'
21+
version = release = '3.8.10'
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.8.12',
16+
version='3.8.10',
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: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -479,10 +479,7 @@ def CalculateLCOELCOHLCOC(self, model: Model) -> tuple:
479479
NPVcap = np.sum((1 + self.inflrateconstruction.value) * self.CCap.value * CRF * discountvector)
480480
NPVfc = np.sum((1 + self.inflrateconstruction.value) * self.CCap.value * self.PTR.value * inflationvector * discountvector)
481481
NPVit = np.sum(self.CTR.value / (1 - self.CTR.value) * ((1 + self.inflrateconstruction.value) * self.CCap.value * CRF - self.CCap.value / model.surfaceplant.plant_lifetime.value) * discountvector)
482-
483-
npv_itc_discount_factor = discountvector[model.surfaceplant.construction_years.value]
484-
NPVitc = ((1 + self.inflrateconstruction.value) * self.CCap.value * self.RITC.value / (1 - self.CTR.value)
485-
* npv_itc_discount_factor)
482+
NPVitc = (1 + self.inflrateconstruction.value) * self.CCap.value * self.RITC.value / (1 - self.CTR.value)
486483

487484
if model.surfaceplant.enduse_option.value == EndUseOptions.ELECTRICITY:
488485
NPVoandm = np.sum(self.Coam.value * inflationvector * discountvector)
@@ -505,8 +502,7 @@ def CalculateLCOELCOHLCOC(self, model: Model) -> tuple:
505502
NPVcap_elec = np.sum((1 + self.inflrateconstruction.value) * CCap_elec * CRF * discountvector)
506503
NPVfc_elec = np.sum((1 + self.inflrateconstruction.value) * CCap_elec * self.PTR.value * inflationvector * discountvector)
507504
NPVit_elec = np.sum(self.CTR.value / (1 - self.CTR.value) * ((1 + self.inflrateconstruction.value) * CCap_elec * CRF - CCap_elec / model.surfaceplant.plant_lifetime.value) * discountvector)
508-
NPVitc_elec = ((1 + self.inflrateconstruction.value) * CCap_elec * self.RITC.value / (1 - self.CTR.value)
509-
* npv_itc_discount_factor)
505+
NPVitc_elec = (1 + self.inflrateconstruction.value) * CCap_elec * self.RITC.value / (1 - self.CTR.value)
510506
NPVoandm_elec = np.sum(Coam_elec * inflationvector * discountvector)
511507
NPVgrt_elec = self.GTR.value / (1 - self.GTR.value) * (NPVcap_elec + NPVoandm_elec + NPVfc_elec + NPVit_elec - NPVitc_elec)
512508

@@ -516,8 +512,7 @@ def CalculateLCOELCOHLCOC(self, model: Model) -> tuple:
516512
NPVcap_heat = np.sum((1 + self.inflrateconstruction.value) * CCap_heat * CRF * discountvector)
517513
NPVfc_heat = np.sum((1 + self.inflrateconstruction.value) * (self.CCap.value * (1.0 - self.CAPEX_heat_electricity_plant_ratio.value)) * self.PTR.value * inflationvector * discountvector)
518514
NPVit_heat = np.sum(self.CTR.value / (1 - self.CTR.value) * ((1 + self.inflrateconstruction.value) * CCap_heat * CRF - CCap_heat / model.surfaceplant.plant_lifetime.value) * discountvector)
519-
NPVitc_heat = ((1 + self.inflrateconstruction.value) * CCap_heat * self.RITC.value / (1 - self.CTR.value)
520-
* npv_itc_discount_factor)
515+
NPVitc_heat = (1 + self.inflrateconstruction.value) * CCap_heat * self.RITC.value / (1 - self.CTR.value)
521516
NPVoandm_heat = np.sum((self.Coam.value * (1.0 - self.CAPEX_heat_electricity_plant_ratio.value)) * inflationvector * discountvector)
522517
NPVgrt_heat = self.GTR.value / (1 - self.GTR.value) * (NPVcap_heat + NPVoandm_heat + NPVfc_heat + NPVit_heat - NPVitc_heat)
523518

@@ -979,8 +974,7 @@ def __init__(self, model: Model):
979974
PreferredUnits=PercentUnit.TENTH,
980975
CurrentUnits=PercentUnit.TENTH,
981976
ErrMessage="assume default investment tax credit rate (0)",
982-
ToolTipText="Investment tax credit rate "
983-
"(see https://programs.dsireusa.org/system/program/detail/658)"
977+
ToolTipText="Investment tax credit rate (see docs)"
984978
)
985979
self.PTR = self.ParameterDict[self.PTR.Name] = floatParameter(
986980
"Property Tax Rate",
@@ -2707,6 +2701,11 @@ def Calculate(self, model: Model) -> None:
27072701
else:
27082702
self.CCap.value = self.totalcapcost.value
27092703

2704+
# update the capital costs, assuming the entire ITC is used to reduce the capital costs
2705+
if self.RITC.Provided:
2706+
self.RITCValue.value = self.RITC.value * self.CCap.value
2707+
self.CCap.value = self.CCap.value - self.RITCValue.value
2708+
27102709
# Add in the FlatLicenseEtc, OtherIncentives, & TotalGrant
27112710
self.CCap.value = self.CCap.value + self.FlatLicenseEtc.value - self.OtherIncentives.value - self.TotalGrant.value
27122711

@@ -2943,12 +2942,6 @@ def Calculate(self, model: Model) -> None:
29432942
model.surfaceplant.plant_lifetime.value + model.surfaceplant.construction_years.value, 1):
29442943
self.TotalRevenue.value[i] = self.TotalRevenue.value[i] - self.Coam.value
29452944

2946-
2947-
if self.RITC.Provided:
2948-
self.RITCValue.value = self.RITC.value * self.CCap.value
2949-
# ITC is credited year after construction
2950-
self.TotalRevenue.value[model.surfaceplant.construction_years.value] += self.RITCValue.value
2951-
29522945
# Now do a one-time calculation that calculates the cumulative cash flow after everything else has been accounted for
29532946
for i in range(1, model.surfaceplant.plant_lifetime.value + model.surfaceplant.construction_years.value, 1):
29542947
self.TotalCummRevenue.value[i] = self.TotalCummRevenue.value[i-1] + self.TotalRevenue.value[i]

src/geophires_x/__init__.py

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

src/geophires_x_schema_generator/geophires-request.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1644,7 +1644,7 @@
16441644
"maximum": 1.0
16451645
},
16461646
"Investment Tax Credit Rate": {
1647-
"description": "Investment tax credit rate (see https://programs.dsireusa.org/system/program/detail/658)",
1647+
"description": "Investment tax credit rate (see docs)",
16481648
"type": "number",
16491649
"units": "",
16501650
"category": "Economics",

tests/examples/Fervo_Project_Cape-3.out

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44

55
Simulation Metadata
66
----------------------
7-
GEOPHIRES Version: 3.8.9
8-
Simulation Date: 2025-04-02
9-
Simulation Time: 12:41
10-
Calculation Time: 0.860 sec
7+
GEOPHIRES Version: 3.7.23
8+
Simulation Date: 2025-03-10
9+
Simulation Time: 10:42
10+
Calculation Time: 0.871 sec
1111

1212
***SUMMARY OF RESULTS***
1313

1414
End-Use Option: Electricity
1515
Average Net Electricity Production: 404.31 MW
16-
Electricity breakeven price: 3.76 cents/kWh
16+
Electricity breakeven price: 2.77 cents/kWh
1717
Number of production wells: 39
1818
Number of injection wells: 39
1919
Flowrate per production well: 120.0 kg/sec
@@ -27,10 +27,10 @@ Simulation Metadata
2727
Accrued financing during construction: 5.00
2828
Project lifetime: 20 yr
2929
Capacity factor: 90.0 %
30-
Project NPV: 4550.28 MUSD
31-
Project IRR: 39.26 %
32-
Project VIR=PI=PIR: 3.97
33-
Project MOIC: 4.91
30+
Project NPV: 4580.36 MUSD
31+
Project IRR: 43.75 %
32+
Project VIR=PI=PIR: 5.27
33+
Project MOIC: 6.30
3434
Project Payback Period: 3.38 yr
3535
Estimated Jobs Created: 976
3636

@@ -102,7 +102,7 @@ Simulation Metadata
102102
Total surface equipment costs: 969.26 MUSD
103103
Exploration costs: 30.00 MUSD
104104
Investment Tax Credit: -459.83 MUSD
105-
Total capital costs: 1532.78 MUSD
105+
Total capital costs: 1072.95 MUSD
106106

107107

108108
***OPERATING AND MAINTENANCE COSTS (M$/yr)***
@@ -193,8 +193,8 @@ Year Electricity | Heat |
193193
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
194194
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)
195195
________________________________________________________________________________________________________________________________________________________________________________________
196-
0 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 -1532.78 -1532.78
197-
1 15.00 474.16 474.16 | 2.50 0.00 0.00 | 2.50 0.00 0.00 | 0.00 0.00 0.00 | 26.96 907.04 -625.75
196+
0 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 -1072.95 -1072.95
197+
1 15.00 474.16 474.16 | 2.50 0.00 0.00 | 2.50 0.00 0.00 | 0.00 0.00 0.00 | 26.96 447.20 -625.75
198198
2 15.00 476.35 950.51 | 2.50 0.00 0.00 | 2.50 0.00 0.00 | 0.00 0.00 0.00 | 26.96 449.39 -176.36
199199
3 15.41 489.93 1440.44 | 2.50 0.00 0.00 | 2.50 0.00 0.00 | 0.00 0.00 0.00 | 26.96 462.97 286.61
200200
4 15.81 503.25 1943.69 | 2.50 0.00 0.00 | 2.50 0.00 0.00 | 0.00 0.00 0.00 | 26.96 476.29 762.90

tests/examples/example_ITC.out

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44

55
Simulation Metadata
66
----------------------
7-
GEOPHIRES Version: 3.8.9
8-
Simulation Date: 2025-04-02
9-
Simulation Time: 12:41
10-
Calculation Time: 0.777 sec
7+
GEOPHIRES Version: 3.8.4
8+
Simulation Date: 2025-03-19
9+
Simulation Time: 10:30
10+
Calculation Time: 0.808 sec
1111

1212
***SUMMARY OF RESULTS***
1313

1414
End-Use Option: Electricity
1515
Average Net Electricity Production: 18.84 MW
16-
Electricity breakeven price: 4.89 cents/kWh
16+
Electricity breakeven price: 3.21 cents/kWh
1717
Number of production wells: 2
1818
Number of injection wells: 2
1919
Flowrate per production well: 55.0 kg/sec
@@ -27,10 +27,10 @@ Simulation Metadata
2727
Accrued financing during construction: 0.00
2828
Project lifetime: 30 yr
2929
Capacity factor: 90.0 %
30-
Project NPV: 6.77 MUSD
31-
Project IRR: 8.05 %
32-
Project VIR=PI=PIR: 1.06
33-
Project MOIC: 0.52
30+
Project NPV: 10.31 MUSD
31+
Project IRR: 8.82 %
32+
Project VIR=PI=PIR: 1.19
33+
Project MOIC: 0.72
3434
Project Payback Period: 11.46 yr
3535
Estimated Jobs Created: 41
3636

@@ -99,7 +99,7 @@ Simulation Metadata
9999
Total surface equipment costs: 62.40 MUSD
100100
Exploration costs: 8.24 MUSD
101101
Investment Tax Credit: -54.20 MUSD
102-
Total capital costs: 108.39 MUSD
102+
Total capital costs: 54.20 MUSD
103103

104104

105105
***OPERATING AND MAINTENANCE COSTS (M$/yr)***
@@ -210,8 +210,8 @@ Year Electricity | Heat |
210210
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
211211
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)
212212
________________________________________________________________________________________________________________________________________________________________________________________
213-
0 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 -108.39 -108.39
214-
1 5.50 8.02 8.02 | 2.50 0.00 0.00 | 2.50 0.00 0.00 | 0.00 0.00 0.00 | 2.95 59.26 -49.13
213+
0 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 -54.20 -54.20
214+
1 5.50 8.02 8.02 | 2.50 0.00 0.00 | 2.50 0.00 0.00 | 0.00 0.00 0.00 | 2.95 5.07 -49.13
215215
2 5.50 8.09 16.11 | 2.50 0.00 0.00 | 2.50 0.00 0.00 | 0.00 0.00 0.00 | 2.95 5.14 -43.99
216216
3 5.50 8.12 24.23 | 2.50 0.00 0.00 | 2.50 0.00 0.00 | 0.00 0.00 0.00 | 2.95 5.17 -38.82
217217
4 5.50 8.13 32.36 | 2.50 0.00 0.00 | 2.50 0.00 0.00 | 0.00 0.00 0.00 | 2.95 5.18 -33.64

0 commit comments

Comments
 (0)