@@ -156,6 +156,50 @@ def _get_result() -> GeophiresXResult:
156156
157157 self .assertAlmostEqual (4.83 , cap_costs ['Stimulation costs per well' ]['value' ], delta = 0 )
158158
159+ def test_stimulation_cost_per_fracture_surface_area_injection_only (self ):
160+ r : GeophiresXResult = GeophiresXClient ().get_geophires_result (
161+ ImmutableGeophiresInputParameters (
162+ from_file_path = self ._get_test_file_path ('generic-egs-case-5_no-stim-costs-specified.txt' ),
163+ params = {
164+ 'Reservoir Stimulation Capital Cost per Fracture Surface Area' : 0.87431693989 ,
165+ 'Print Output to Console' : True ,
166+ },
167+ )
168+ )
169+
170+ cap_costs = r .result ['CAPITAL COSTS (M$)' ]
171+
172+ # Total cost should remain identical, but injection wells absorb 100% of the cost.
173+ self .assertAlmostEqual (184 , cap_costs ['Stimulation costs' ]['value' ], places = 0 )
174+ self .assertIsNone (cap_costs ['Stimulation costs per well' ])
175+
176+ def test_stimulation_cost_mutually_exclusive_validation (self ):
177+ with self .assertRaises (RuntimeError ) as context :
178+ GeophiresXClient ().get_geophires_result (
179+ ImmutableGeophiresInputParameters (
180+ from_file_path = self ._get_test_file_path ('generic-egs-case-5_no-stim-costs-specified.txt' ),
181+ params = {
182+ 'Reservoir Stimulation Capital Cost per Fracture Surface Area' : 0.87431693989 ,
183+ 'Reservoir Stimulation Capital Cost per Injection Well' : 5 ,
184+ },
185+ )
186+ )
187+ self .assertIn ('Cannot provide both' , str (context .exception ))
188+
189+ def test_stimulation_cost_invalid_negative_production_cost (self ):
190+ with self .assertRaises (RuntimeError ) as context :
191+ GeophiresXClient ().get_geophires_result (
192+ ImmutableGeophiresInputParameters (
193+ from_file_path = self ._get_test_file_path ('generic-egs-case-5_no-stim-costs-specified.txt' ),
194+ params = {
195+ 'Reservoir Stimulation Capital Cost per Production Well' : - 5 ,
196+ },
197+ )
198+ )
199+ self .assertIn (
200+ ' Reservoir Stimulation Capital Cost per Production Well outside of valid range' , str (context .exception )
201+ )
202+
159203 # noinspection PyMethodMayBeStatic
160204 def _new_model (
161205 self , input_file : Path | None = None , additional_params : dict [str , Any ] | None = None , read_and_calculate = False
0 commit comments