Skip to content

Commit 4046445

Browse files
Implementing PTC and ITC more fully
Adding test modules for PTC and IC Fixing unit tests Fixing Bug in add_ons output but unit test still fail
1 parent 0800da3 commit 4046445

File tree

3 files changed

+66
-7
lines changed

3 files changed

+66
-7
lines changed

src/geophires_x/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,3 +132,4 @@ Examples\Test2.json
132132
/References/Muffler and Cataldi Methods for regional assessment of geothermal resources.pdf
133133
/Preliminary_Corpus Christi GRA_093019.xlsx
134134
/temperature.txt
135+
all_messages_conf.log

src/geophires_x/Outputs.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1496,10 +1496,6 @@ def PrintOutputs(self, model: Model):
14961496
sdac_df = pd.DataFrame()
14971497
addon_results: list[OutputTableItem] = []
14981498
sdac_results: list[OutputTableItem] = []
1499-
if model.economics.DoAddOnCalculations.value:
1500-
addon_df, addon_results = model.addoutputs.PrintOutputs(model)
1501-
if model.economics.DoSDACGTCalculations.value:
1502-
sdac_df, sdac_results = model.sdacgtoutputs.PrintOutputs(model)
15031499

15041500
# write results to output file and screen
15051501
try:
@@ -2018,6 +2014,11 @@ def o(output_param: OutputParameter):
20182014
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')
20192015
f.write(NL)
20202016

2017+
if model.economics.DoAddOnCalculations.value:
2018+
addon_df, addon_results = model.addoutputs.PrintOutputs(model)
2019+
if model.economics.DoSDACGTCalculations.value:
2020+
sdac_df, sdac_results = model.sdacgtoutputs.PrintOutputs(model)
2021+
20212022
except BaseException as ex:
20222023
tb = sys.exc_info()[2]
20232024
msg = 'Error: GEOPHIRES Failed to write the output file. Exiting....Line %i' % tb.tb_lineno

tests/examples/example1_addons.out

Lines changed: 60 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ Simulation Metadata
66
----------------------
77
GEOPHIRES Version: 3.4.22
88
GEOPHIRES Build Date: 2024-03-05
9-
Simulation Date: 2024-04-10
10-
Simulation Time: 14:37
11-
Calculation Time: 1.432 sec
9+
Simulation Date: 2024-04-11
10+
Simulation Time: 14:48
11+
Calculation Time: 1.448 sec
1212

1313
***SUMMARY OF RESULTS***
1414

@@ -241,3 +241,60 @@ ________________________________________________________________________________
241241
28 15.00 10.69 151.33 | 2.50 0.00 0.00 | 2.50 0.00 0.00 | 0.10 3.49 65.10 | -0.82 10.69 207.42
242242
29 15.00 10.69 157.71 | 2.50 0.00 0.00 | 2.50 0.00 0.00 | 0.10 3.49 68.59 | -0.82 10.69 218.11
243243
30 15.00 10.69 164.10 | 2.50 0.00 0.00 | 2.50 0.00 0.00 | 0.10 3.49 72.08 | -0.82 10.69 228.81
244+
245+
246+
247+
***EXTENDED ECONOMICS***
248+
249+
Adjusted Project LCOE (after incentives, grants, AddOns,etc): 1.75 cents/kWh
250+
Adjusted Project LCOH (after incentives, grants, AddOns,etc): 0.00 USD/MMBTU
251+
Adjusted Project CAPEX (after incentives, grants, AddOns, etc): 101.06 MUSD
252+
Adjusted Project OPEX (after incentives, grants, AddOns, etc): 0.88 MUSD
253+
Project NPV (including AddOns): -5.46 MUSD
254+
Project IRR (including AddOns): 0.06 %
255+
Project VIR=PI=PIR (including AddOns): 0.95
256+
Project MOIC (including AddOns): 1.00
257+
Total Add-on CAPEX: 70.00 MUSD
258+
Total Add-on OPEX: 1.70 MUSD/yr
259+
Total Add-on Net Elec: 25900.00 kW/yr
260+
Total Add-on Net Heat: 0.00 kW/yr
261+
Total Add-on Profit: 2.84 MUSD/yr
262+
AddOns Payback Period: 0.00 yr
263+
264+
265+
*******************************
266+
* EXTENDED ECONOMIC PROFILE *
267+
*******************************
268+
Year Electricity Heat Add-on Annual AddOn Cumm. AddOn Annual Project Cumm. Project
269+
Since Price Revenue Price Revenue Revenue Cash Flow Cash Flow Cash Flow Cash Flow
270+
Start (cents/kWh)(MUSD/yr) (cents/kWh)(MUSD/yr) (MUSD/yr) (MUSD/yr) (MUSD) (MUSD/yr) (MUSD)
271+
1 0.000 0.0023 0.000 0.0000 1.14 -70.00 -70.00 -101.06 -101.06
272+
2 0.090 0.0023 0.012 0.0000 1.14 1.14 -68.86 5.68 -95.38
273+
3 0.090 0.0023 0.012 0.0000 1.14 1.14 -67.72 5.72 -89.65
274+
4 0.090 0.0023 0.012 0.0000 1.14 1.14 -66.59 5.74 -83.91
275+
5 0.090 0.0023 0.012 0.0000 1.14 1.14 -65.45 5.75 -78.17
276+
6 0.090 0.0023 0.012 0.0000 1.14 1.14 -64.31 5.75 -72.42
277+
7 0.090 0.0026 0.012 0.0000 1.14 1.14 -63.17 5.76 -66.66
278+
8 0.102 0.0030 0.012 0.0000 1.14 1.14 -62.03 6.27 -60.39
279+
9 0.114 0.0033 0.012 0.0000 1.14 1.14 -60.89 6.78 -53.61
280+
10 0.126 0.0036 0.022 0.0000 1.14 1.14 -59.75 7.29 -46.32
281+
11 0.138 0.0039 0.032 0.0000 1.14 1.14 -58.61 7.80 -38.52
282+
12 0.150 0.0039 0.036 0.0000 1.14 1.14 -57.47 8.31 -30.21
283+
13 0.150 0.0039 0.036 0.0000 1.14 1.14 -56.33 8.32 -21.89
284+
14 0.150 0.0039 0.036 0.0000 1.14 1.14 -55.19 8.32 -13.57
285+
15 0.150 0.0039 0.036 0.0000 1.14 1.14 -54.05 8.32 -5.25
286+
16 0.150 0.0039 0.036 0.0000 1.14 1.14 -52.91 8.32 3.08
287+
17 0.150 0.0039 0.036 0.0000 1.14 1.14 -51.77 8.33 11.40
288+
18 0.150 0.0039 0.036 0.0000 1.14 1.14 -50.63 8.33 19.73
289+
19 0.150 0.0039 0.036 0.0000 1.14 1.14 -49.49 8.33 28.06
290+
20 0.150 0.0039 0.036 0.0000 1.14 1.14 -48.35 8.33 36.39
291+
21 0.150 0.0039 0.036 0.0000 1.14 1.14 -47.21 8.33 44.72
292+
22 0.150 0.0039 0.036 0.0000 1.14 1.14 -46.07 8.33 53.06
293+
23 0.150 0.0039 0.036 0.0000 1.14 1.14 -44.93 8.34 61.39
294+
24 0.150 0.0039 0.036 0.0000 1.14 1.14 -43.80 8.34 69.73
295+
25 0.150 0.0039 0.036 0.0000 1.14 1.14 -42.66 8.34 78.07
296+
26 0.150 0.0039 0.036 0.0000 1.14 1.14 -41.52 8.34 86.41
297+
27 0.150 0.0039 0.036 0.0000 1.14 1.14 -40.38 8.34 94.75
298+
28 0.150 0.0039 0.036 0.0000 1.14 1.14 -39.24 8.34 103.09
299+
29 0.150 0.0039 0.036 0.0000 1.14 1.14 -38.10 8.34 111.43
300+
30 0.150 0.0039 0.036 0.0000 1.14 1.14 -36.96 8.34 119.77

0 commit comments

Comments
 (0)