11from __future__ import annotations
22
3+ from typing import Any
4+
5+ from pint .facets .plain import PlainQuantity
6+
37from base_test_case import BaseTestCase
48from geophires_x_client import GeophiresInputParameters
59from geophires_x_client import GeophiresXClient
@@ -12,9 +16,23 @@ def test_fervo_project_red_2026_results_against_reference_values(self):
1216 Asserts that results conform to some of the key reference values claimed in docs/Fervo_Project_Cape-4.md.
1317 """
1418
19+ def _q (v : float , u : str ) -> PlainQuantity :
20+ return PlainQuantity (v , u )
21+
22+ def _vuq (v_u : dict [str , Any ]) -> PlainQuantity :
23+ return self .value_unit_as_quantity (v_u )
24+
1525 r = GeophiresXClient ().get_geophires_result (
1626 GeophiresInputParameters (from_file_path = self ._get_test_file_path ('../examples/Fervo_Project_Red-2026.txt' ))
1727 )
1828
19- avg_pumping_power_mw = r .result ['SURFACE EQUIPMENT SIMULATION RESULTS' ]['Average Pumping Power' ]['value' ]
20- self .assertEqual (0.7 , avg_pumping_power_mw )
29+ self .assertEqual (_q (0.7 , 'MW' ), _vuq (r .result ['SURFACE EQUIPMENT SIMULATION RESULTS' ]['Average Pumping Power' ]))
30+
31+ self .assertLess (_vuq (r .result ['SUMMARY OF RESULTS' ]['Average Net Electricity Production' ]), _q (2.0 , 'MW' ))
32+
33+ self .assertGreater (
34+ _vuq (r .result ['RESERVOIR SIMULATION RESULTS' ]['Average Production Temperature' ]), _q (346 , 'degF' )
35+ )
36+ self .assertLess (
37+ _vuq (r .result ['RESERVOIR SIMULATION RESULTS' ]['Average Production Temperature' ]), _q (356 , 'degF' )
38+ )
0 commit comments