Skip to content

Commit b7205d5

Browse files
Fix case study documentation unit test, re-add CAPEX/kW as key result since it's now stated in common convention of per net kW (instead of total kW)
1 parent aebeaa4 commit b7205d5

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

docs/Fervo_Project_Cape-4.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Financial results are calculated
88
using
99
the [SAM Single Owner PPA Economic Model](https://softwareengineerprogrammer.github.io/GEOPHIRES/SAM-Economic-Models.html#sam-single-owner-ppa).
1010

11-
Key case study results include LCOE = $75.5/MWh.
11+
Key case study results include LCOE = $75.5/MWh and CAPEX = $4900/kW.
1212

1313
[Click here](https://gtp.scientificwebservices.com/geophires/?geophires-example-id=Fervo_Project_Cape-4) to
1414
interactively explore the case study in the GEOPHIRES web interface.

tests/geophires_x_tests/test_fervo_project_cape_4.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ def __init__(self, vu: dict[str, Any]):
8787
capex_q = _Q(results_in_markdown['Project capital costs: Total CAPEX']).quantity()
8888
markdown_capex_USD_per_kW = (
8989
capex_q.to('USD').magnitude
90-
/ _Q(results_in_markdown['Maximum Total Electricity Generation']).quantity().to('kW').magnitude
90+
/ _Q(results_in_markdown['Maximum Net Electricity Generation']).quantity().to('kW').magnitude
9191
)
9292
self.assertAlmostEqual(
93-
sig_figs(markdown_capex_USD_per_kW, 3), results_in_markdown['Project capital costs: $/kW']['value']
93+
sig_figs(markdown_capex_USD_per_kW, 2), results_in_markdown['Project capital costs: $/kW']['value']
9494
)
9595

9696
field_mapping = {
@@ -123,9 +123,9 @@ def __init__(self, vu: dict[str, Any]):
123123

124124
result_capex_USD_per_kW = (
125125
_Q(example_result._get_result_field('Total CAPEX')).quantity().to('USD').magnitude
126-
/ _Q(example_result._get_result_field('Maximum Total Electricity Generation')).quantity().to('kW').magnitude
126+
/ _Q(example_result._get_result_field('Maximum Net Electricity Generation')).quantity().to('kW').magnitude
127127
)
128-
self.assertAlmostEqual(sig_figs(result_capex_USD_per_kW, 3), sig_figs(markdown_capex_USD_per_kW, 3))
128+
self.assertAlmostEqual(sig_figs(result_capex_USD_per_kW, 2), sig_figs(markdown_capex_USD_per_kW, 2))
129129

130130
num_doublets = inputs_in_markdown['Number of Doublets']['value']
131131
self.assertEqual(
@@ -187,6 +187,7 @@ def parse_markdown_results_structured(self, markdown_text: str) -> dict:
187187
'LCOE',
188188
'Maximum Total Electricity Generation',
189189
'Minimum Net Electricity Generation',
190+
'Maximum Net Electricity Generation',
190191
'Number of times redrilling',
191192
'Project capital costs: Total CAPEX',
192193
'Project capital costs: $/kW',

0 commit comments

Comments
 (0)