Skip to content

Commit efe0034

Browse files
Deprecate 'Total Nonvertical Length', rename as 'Nonvertical Length per Multilateral Section' https://github.com/NREL/GEOPHIRES-X/issues/278\?title\=Total+Nonvertical+Length+is+actually+per+section
1 parent fce6e58 commit efe0034

File tree

4 files changed

+103
-4
lines changed

4 files changed

+103
-4
lines changed

src/geophires_x/WellBores.py

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,15 +1004,15 @@ def __init__(self, model: Model):
10041004

10051005
# Input data for subsurface condition
10061006
self.Nonvertical_length = self.ParameterDict[self.Nonvertical_length.Name] = floatParameter(
1007-
"Total Nonvertical Length",
1007+
"Nonvertical Length per Multilateral Section",
10081008
DefaultValue=1000.0,
10091009
Min=50.0,
10101010
Max=20000.0,
10111011
UnitType=Units.LENGTH,
10121012
PreferredUnits=LengthUnit.METERS,
10131013
CurrentUnits=LengthUnit.METERS,
10141014
Required=True,
1015-
ErrMessage="assume default Total nonvertical length (1000 m)"
1015+
ErrMessage="assume default Nonvertical Length per Multilateral Section (1000 m)"
10161016
)
10171017

10181018
self.nonverticalwellborediameter = self.ParameterDict[self.nonverticalwellborediameter.Name] = floatParameter(
@@ -1228,7 +1228,26 @@ def read_parameters(self, model: Model) -> None:
12281228
# and if you do, do it before or after you call you own version of this method. If you do, you can also choose
12291229
# to call this method from you class, which can modify all these superclass parameters in your class.
12301230

1231+
12311232
if len(model.InputParameters) > 0:
1233+
1234+
# See https://github.com/NREL/GEOPHIRES-X/issues/278?title=Total+Nonvertical+Length+is+actually+per+section
1235+
deprecated_nonvertical_length_param_name = 'Total Nonvertical Length'
1236+
if deprecated_nonvertical_length_param_name in model.InputParameters:
1237+
model.logger.warning(
1238+
f'"{deprecated_nonvertical_length_param_name}" parameter name is deprecated, '
1239+
f'use "{self.Nonvertical_length.Name}" instead')
1240+
1241+
if self.Nonvertical_length.Name not in model.InputParameters:
1242+
model.InputParameters[self.Nonvertical_length.Name] = model.InputParameters[
1243+
deprecated_nonvertical_length_param_name]
1244+
else:
1245+
model.logger.warning(
1246+
f'Ignoring value of "{deprecated_nonvertical_length_param_name}" '
1247+
f'because it is set by "{self.Nonvertical_length.Name}" instead')
1248+
1249+
del model.InputParameters[deprecated_nonvertical_length_param_name]
1250+
12321251
# loop through all the parameters that the user wishes to set, looking for parameters that match this object
12331252
for item in self.ParameterDict.items():
12341253
ParameterToModify = item[1]

src/geophires_x_schema_generator/geophires-request.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"Closed-loop Configuration",
3131
"Well Geometry Configuration",
3232
"Heat Transfer Fluid",
33-
"Total Nonvertical Length",
33+
"Nonvertical Length per Multilateral Section",
3434
"Circulation Pump Efficiency",
3535
"Utilization Factor",
3636
"Plant Lifetime",
@@ -893,7 +893,7 @@
893893
}
894894
]
895895
},
896-
"Total Nonvertical Length": {
896+
"Nonvertical Length per Multilateral Section": {
897897
"description": "",
898898
"type": "number",
899899
"units": "meter",
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
Is AGS, True
2+
Has Nonvertical Section, True
3+
Multilaterals Cased, True
4+
Well Geometry Configuration, 1, -- --U-loop (could be Eavor style)
5+
Plant Lifetime, 40, -- -Years
6+
Water Thermal Conductivity, 0.65
7+
Nonvertical Wellbore Diameter, 0.23495, -- ---m
8+
Cylindrical Reservoir Radius of Effect Factor, 5.0
9+
Closed Loop Calculation Start Year, 0.1
10+
Number of Multilateral Sections, 6
11+
Well Drilling Cost Correlation, 3, -- - [-] Use built-in well drilling cost correlation #3 = vertical open-hole, large diameter
12+
Horizontal Well Drilling Cost Correlation, 1, -- - [-] Use built-in well drilling cost correlation #3 = vertical open-hole, large diameter
13+
Reservoir Impedance, 1E-4, -- --assume a very low reservoir impedance since the working fluid is never in contact with the reservoir
14+
Production Flow Rate per Well, 110, -- - [kg/s]
15+
Injection Temperature, 60, -- ---C
16+
Gradient 1, 26.25, -- -[deg.C/km]
17+
Reservoir Depth, 10.0, -- --km
18+
Cylindrical Reservoir Input Depth, 10, -- ---km
19+
Cylindrical Reservoir Output Depth, 10, -- ----km
20+
Cylindrical Reservoir Length, 10, -- --km
21+
Reservoir Model, 0, -- -simple cylinder reservoir model
22+
Number of Production Wells, 1, -- -[-]
23+
Number of Injection Wells, 1, -- -[-]
24+
Ramey Production Wellbore Model, 0, -- - Should be 0 (disable) or 1 (enable)
25+
Production Wellbore Temperature Drop, 0, -- - [deg.C]
26+
Maximum Temperature, 375, -- - [deg.C]
27+
Reservoir Volume Option, 4, -- - Should be 1 2 3 or 4. See manual for details.
28+
Reservoir Volume, 1e9, -- - [m3] (required for reservoir volume option 3 and 4
29+
Reservoir Heat Capacity, 1050, -- - [J/kg/K]
30+
End-Use Option, 1, -- - [-] Electricity
31+
Power Plant Type, 1, -- - [1] Subcritical ORC
32+
Circulation Pump Efficiency, 0.8, -- - [-]
33+
Plant Outlet Pressure, 68.95
34+
Economic Model, 3, -- - Should be 1 (FCR model) 2 (Standard LCOE/LCOH model) or 3 (Bicycle model).
35+
Fraction of Investment in Bonds, 0.65, -- - [-] Required if Bicycle model is selected. See manual for details.
36+
Inflated Bond Interest Rate, 0.07, -- - [-] Required if Bicycle model is selected. See manual for details.
37+
Inflated Equity Interest Rate, 0.12, -- - [-] Required if Bicycle model is selected. See manual for details.
38+
Inflation Rate, 0.025, -- - [-] Required if Bicycle model is selected. See manual for details.
39+
Combined Income Tax Rate, 0.392, -- - [-] Required if Bicycle model is selected. See manual for details.
40+
Gross Revenue Tax Rate, 0, -- - [-] Required if Bicycle model is selected. See manual for details.
41+
Reservoir Stimulation Capital Cost, 0, -- - [M$/injection well] Reservoir stimulation capital cost per injection well
42+
Print Output to Console, 1, -- - [-] Should be 0 (don't print results to console) or 1 (print results to console)

tests/test_geophires_x.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,3 +485,41 @@ def test_convert_output_psi_to_kpa(self):
485485
)
486486

487487
# TODO validate output values (for now we are just testing an exception isn't thrown)
488+
489+
def test_multilateral_section_nonvertical_length(self):
490+
def s(r):
491+
del r.result['metadata']
492+
del r.result['Simulation Metadata']
493+
return r
494+
495+
deprecated_param = s(
496+
GeophiresXClient().get_geophires_result(
497+
GeophiresInputParameters(
498+
from_file_path=self._get_test_file_path(Path('multilateral-section-nonvertical-length.txt')),
499+
params={'Total Nonvertical Length': 6000.0},
500+
)
501+
)
502+
)
503+
504+
non_deprecated_param = s(
505+
GeophiresXClient().get_geophires_result(
506+
GeophiresInputParameters(
507+
from_file_path=self._get_test_file_path(Path('multilateral-section-nonvertical-length.txt')),
508+
params={'Nonvertical Length per Multilateral Section': 6000.0},
509+
)
510+
)
511+
)
512+
513+
self.assertDictEqual(deprecated_param.result, non_deprecated_param.result)
514+
515+
both_params = s(
516+
GeophiresXClient().get_geophires_result(
517+
GeophiresInputParameters(
518+
from_file_path=self._get_test_file_path(Path('multilateral-section-nonvertical-length.txt')),
519+
params={'Nonvertical Length per Multilateral Section': 6000.0, 'Total Nonvertical Length': 4000.0},
520+
)
521+
)
522+
)
523+
524+
# deprecated is ignored if both are present.
525+
self.assertDictEqual(both_params.result, non_deprecated_param.result)

0 commit comments

Comments
 (0)