Skip to content

Commit 1204cda

Browse files
Parse Surface Application field in client (follow-up from NREL#183)
1 parent d1bf1f2 commit 1204cda

File tree

5 files changed

+16
-3
lines changed

5 files changed

+16
-3
lines changed

src/geophires_x_client/geophires_x_result.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class GeophiresXResult:
2727
'SUMMARY OF RESULTS': [
2828
_StringValueField('End-Use Option'),
2929
_StringValueField('End-Use'),
30+
_StringValueField('Surface Application'),
3031
'Average Net Electricity Production',
3132
'Electricity breakeven price',
3233
'Average Direct-Use Heat Production',

tests/examples/example10_HP.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Simulation Metadata
1313
***SUMMARY OF RESULTS***
1414

1515
End-Use Option: Direct-Use Heat
16-
Surface Application: Heat Pump
16+
Surface Application: Heat Pump
1717
Average Direct-Use Heat Production: 16.64 MW
1818
Direct-Use heat breakeven price (LCOH): 14.49 USD/MMBTU
1919
Number of production wells: 2

tests/examples/example11_AC.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Simulation Metadata
1313
***SUMMARY OF RESULTS***
1414

1515
End-Use Option: Direct-Use Heat
16-
Surface Application: Absorption Chiller
16+
Surface Application: Absorption Chiller
1717
Average Direct-Use Heat Production: 8.49 MW
1818
Average Cooling Production: 5.50 MW
1919
Direct-Use Cooling Breakeven Price (LCOC): 17.52 USD/MMBTU

tests/examples/example12_DH.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Simulation Metadata
1313
***SUMMARY OF RESULTS***
1414

1515
End-Use Option: Direct-Use Heat
16-
Surface Application: District Heating
16+
Surface Application: District Heating
1717
Average Direct-Use Heat Production: 19.15 MW
1818
Annual District Heating Demand: 242.90 GWh/year
1919
Average Annual Geothermal Heat Production: 144.70 GWh/year

tests/test_geophires_x_client.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,18 @@ def test_direct_use_heat_property(self):
8585
# Don't care about the value in this test - just that it's being read with the (LCOH)-suffixed name
8686
self.assertIsNotNone(result.direct_use_heat_breakeven_price_USD_per_MMBTU)
8787

88+
def test_surface_application_field(self):
89+
for example_file, surface_application in [
90+
('examples/example10_HP.out', 'Heat Pump'),
91+
('examples/example11_AC.out', 'Absorption Chiller'),
92+
('examples/example12_DH.out', 'District Heating'),
93+
]:
94+
with self.subTest(msg=example_file):
95+
test_result_path = self._get_test_file_path(example_file)
96+
result = GeophiresXResult(test_result_path)
97+
98+
assert result.result['SUMMARY OF RESULTS']['Surface Application']['value'] == surface_application
99+
88100
def test_example_multiple_gradients_result(self):
89101
test_result_path = self._get_test_file_path('examples/example_multiple_gradients.out')
90102
result = GeophiresXResult(test_result_path)

0 commit comments

Comments
 (0)