Skip to content

Commit c72a37f

Browse files
fix issue with fixed field gathering cost being ignored
1 parent 1fcde6c commit c72a37f

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

src/geophires_x/Economics.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2417,9 +2417,9 @@ def Calculate(self, model: Model) -> None:
24172417
1750 * injpumphpcorrected ** 0.7) * 3 * injpumphpcorrected ** (-0.11)
24182418
self.Cpumps = Cpumpsinj + Cpumpsprod
24192419

2420-
# Based on GETEM 2016 #1.15 for 15% contingency and 1.12 for 12% indirect costs
2421-
self.Cgath.value = 1.15 * self.ccgathadjfactor.value * 1.12 * (
2422-
(model.wellbores.nprod.value + model.wellbores.ninj.value) * 750 * 500. + self.Cpumps) / 1E6
2420+
# Based on GETEM 2016: 1.15 for 15% contingency and 1.12 for 12% indirect costs
2421+
self.Cgath.value = 1.15 * self.ccgathadjfactor.value * 1.12 * (
2422+
(model.wellbores.nprod.value + model.wellbores.ninj.value) * 750 * 500. + self.Cpumps) / 1E6
24232423

24242424
# plant costs
24252425
if (model.surfaceplant.enduse_option.value == EndUseOptions.HEAT

tests/test_geophires_x.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ def test_geophires_examples(self):
158158
def get_output_file_for_example(example_file: str):
159159
return self._get_test_file_path(Path('examples', f'{example_file.split(".txt")[0]}.out'))
160160

161+
# @formatter:off
161162
example_files = list(
162163
filter(
163164
lambda example_file_path: example_file_path.startswith(
@@ -169,6 +170,7 @@ def get_output_file_for_example(example_file: str):
169170
self._list_test_files_dir(test_files_dir='examples'),
170171
)
171172
)
173+
# @formatter:on
172174

173175
# Run SBT examples last because they take an inordinately long time (tens of seconds even on a fast machine).
174176
# This reduces time spent waiting for tests to run if you are iterating on changes that affect non-SBT examples.
@@ -841,3 +843,16 @@ def test_segment_thickness_output(self):
841843
self.assertAlmostEqual(
842844
thickness_2, result.result['SUMMARY OF RESULTS']['Segment 2 Thickness']['value'], places=3
843845
)
846+
847+
def test_field_gathering_cost(self):
848+
fg_cost = 2.99
849+
result = GeophiresXClient().get_geophires_result(
850+
GeophiresInputParameters(
851+
from_file_path=self._get_test_file_path('geophires_x_tests/generic-egs-case.txt'),
852+
params={
853+
'Field Gathering System Capital Cost': fg_cost,
854+
},
855+
)
856+
)
857+
858+
self.assertEqual(fg_cost, result.result['CAPITAL COSTS (M$)']['Field gathering system costs']['value'])

0 commit comments

Comments
 (0)