@@ -120,10 +120,8 @@ def calculate_cost_of_non_vertical_section(model: Model, length_m: float, well_c
120
120
f'{ fixed_well_cost_name } (fixed cost per well) instead.'
121
121
)
122
122
123
- casing_factor = 1.0
124
- if not NonverticalsCased :
125
- # assume that casing & cementing costs 50% of drilling costs
126
- casing_factor = 0.5
123
+ # assume that casing & cementing costs 50% of drilling costs
124
+ casing_factor = 1.0 if NonverticalsCased else 0.5
127
125
128
126
if model .economics .Nonvertical_drilling_cost_per_m .Provided or well_correlation is WellDrillingCostCorrelation .SIMPLE :
129
127
cost_of_non_vertical_section = casing_factor * ((num_nonvertical_sections * nonvertical_drilling_cost_per_m * length_per_section_m )) * 1E-6
@@ -1003,8 +1001,8 @@ def __init__(self, model: Model):
1003
1001
PreferredUnits = CostPerDistanceUnit .DOLLARSPERM ,
1004
1002
CurrentUnits = CostPerDistanceUnit .DOLLARSPERM ,
1005
1003
ErrMessage = "assume default all-in cost for drill vertical well segment(s) (1000 $/m)" ,
1006
- ToolTipText = "Set user specified all-in cost per meter of vertical drilling," +
1007
- " including drilling, casing, cement, insulated insert"
1004
+ ToolTipText = "Set user specified all-in cost per meter of vertical drilling, including drilling, casing, "
1005
+ "cement, insulated insert"
1008
1006
)
1009
1007
self .Nonvertical_drilling_cost_per_m = self .ParameterDict [
1010
1008
self .Nonvertical_drilling_cost_per_m .Name ] = floatParameter (
@@ -1015,9 +1013,9 @@ def __init__(self, model: Model):
1015
1013
UnitType = Units .COSTPERDISTANCE ,
1016
1014
PreferredUnits = CostPerDistanceUnit .DOLLARSPERM ,
1017
1015
CurrentUnits = CostPerDistanceUnit .DOLLARSPERM ,
1018
- ErrMessage = "assume default all-in cost for drill non-vertical well segment(s) (1300 $ /m)" ,
1019
- ToolTipText = "Set user specified all-in cost per meter of non-vertical drilling, including" +
1020
- " drilling, casing, cement, insulated insert"
1016
+ ErrMessage = "assume default all-in cost for drill non-vertical well segment(s) ($1300 /m)" ,
1017
+ ToolTipText = "Set user specified all-in cost per meter of non-vertical drilling, including drilling, "
1018
+ "casing, cement, insulated insert"
1021
1019
)
1022
1020
1023
1021
# absorption chiller
@@ -1554,11 +1552,16 @@ def __init__(self, model: Model):
1554
1552
PreferredUnits = CurrencyUnit .MDOLLARS ,
1555
1553
CurrentUnits = CurrencyUnit .MDOLLARS
1556
1554
)
1555
+
1557
1556
self .Cwell = self .OutputParameterDict [self .Cwell .Name ] = OutputParameter (
1558
1557
Name = "Wellfield cost" ,
1559
1558
UnitType = Units .CURRENCY ,
1560
1559
PreferredUnits = CurrencyUnit .MDOLLARS ,
1561
- CurrentUnits = CurrencyUnit .MDOLLARS
1560
+ CurrentUnits = CurrencyUnit .MDOLLARS ,
1561
+
1562
+ # See TODO re:parameterizing indirect costs at src/geophires_x/Economics.py:652
1563
+ ToolTipText = "Includes total drilling and completion cost of all injection and production wells and "
1564
+ "laterals, plus 5% indirect costs."
1562
1565
)
1563
1566
self .Coamwell = self .OutputParameterDict [self .Coamwell .Name ] = OutputParameter (
1564
1567
Name = "O&M Wellfield cost" ,
@@ -1797,6 +1800,12 @@ def __init__(self, model: Model):
1797
1800
PreferredUnits = CurrencyUnit .MDOLLARS ,
1798
1801
CurrentUnits = CurrencyUnit .MDOLLARS
1799
1802
)
1803
+ self .cost_per_lateral_section = self .OutputParameterDict [self .cost_per_lateral_section .Name ] = OutputParameter (
1804
+ Name = 'Drilling and completion costs per non-vertical section' ,
1805
+ UnitType = Units .CURRENCY ,
1806
+ PreferredUnits = CurrencyUnit .MDOLLARS ,
1807
+ CurrentUnits = CurrencyUnit .MDOLLARS
1808
+ )
1800
1809
self .cost_to_junction_section = self .OutputParameterDict [self .cost_to_junction_section .Name ] = OutputParameter (
1801
1810
Name = "Cost of the entire section of a well from bottom of vertical to junction with laterals" ,
1802
1811
UnitType = Units .CURRENCY ,
@@ -2286,13 +2295,16 @@ def Calculate(self, model: Model) -> None:
2286
2295
self .injection_well_cost_adjustment_factor .value )
2287
2296
2288
2297
if hasattr (model .wellbores , 'numnonverticalsections' ) and model .wellbores .numnonverticalsections .Provided :
2289
- self .cost_lateral_section .value = calculate_cost_of_non_vertical_section (model , tot_horiz_m ,
2290
- self .wellcorrelation .value ,
2291
- self .Nonvertical_drilling_cost_per_m .value ,
2292
- model .wellbores .numnonverticalsections .value ,
2293
- self .per_injection_well_cost .Name ,
2294
- model .wellbores .NonverticalsCased .value ,
2295
- self .production_well_cost_adjustment_factor .value )
2298
+ self .cost_lateral_section .value = calculate_cost_of_non_vertical_section (
2299
+ model ,
2300
+ tot_horiz_m ,
2301
+ self .wellcorrelation .value ,
2302
+ self .Nonvertical_drilling_cost_per_m .value ,
2303
+ model .wellbores .numnonverticalsections .value ,
2304
+ self .Nonvertical_drilling_cost_per_m .Name ,
2305
+ model .wellbores .NonverticalsCased .value ,
2306
+ self .production_well_cost_adjustment_factor .value
2307
+ )
2296
2308
else :
2297
2309
self .cost_lateral_section .value = 0.0
2298
2310
# cost of the well field
@@ -2881,7 +2893,20 @@ def Calculate(self, model: Model) -> None:
2881
2893
np .average (model .surfaceplant .ElectricityProduced .quantity ().to (
2882
2894
'MW' ).magnitude * self .jobs_created_per_MW_electricity .value ))
2883
2895
2896
+ self ._calculate_derived_outputs (model )
2884
2897
model .logger .info (f'complete { __class__ !s} : { sys ._getframe ().f_code .co_name } ' )
2885
2898
2899
+ def _calculate_derived_outputs (self , model : Model ) -> None :
2900
+ """
2901
+ Subclasses should call _calculate_derived_outputs at the end of their Calculate methods to populate output
2902
+ values that are derived from subclass-calculated outputs.
2903
+ """
2904
+
2905
+ if hasattr (self , 'cost_lateral_section' ) and self .cost_lateral_section .value != 0 :
2906
+ self .cost_per_lateral_section .value = (
2907
+ self .cost_lateral_section .quantity ().to (self .cost_per_lateral_section .CurrentUnits ).magnitude
2908
+ / model .wellbores .numnonverticalsections .value
2909
+ )
2910
+
2886
2911
def __str__ (self ):
2887
2912
return "Economics"
0 commit comments