@@ -120,10 +120,8 @@ def calculate_cost_of_non_vertical_section(model: Model, length_m: float, well_c
120120 f'{ fixed_well_cost_name } (fixed cost per well) instead.'
121121 )
122122
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
127125
128126 if model .economics .Nonvertical_drilling_cost_per_m .Provided or well_correlation is WellDrillingCostCorrelation .SIMPLE :
129127 cost_of_non_vertical_section = casing_factor * ((num_nonvertical_sections * nonvertical_drilling_cost_per_m * length_per_section_m )) * 1E-6
@@ -1554,11 +1552,16 @@ def __init__(self, model: Model):
15541552 PreferredUnits = CurrencyUnit .MDOLLARS ,
15551553 CurrentUnits = CurrencyUnit .MDOLLARS
15561554 )
1555+
15571556 self .Cwell = self .OutputParameterDict [self .Cwell .Name ] = OutputParameter (
15581557 Name = "Wellfield cost" ,
15591558 UnitType = Units .CURRENCY ,
15601559 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."
15621565 )
15631566 self .Coamwell = self .OutputParameterDict [self .Coamwell .Name ] = OutputParameter (
15641567 Name = "O&M Wellfield cost" ,
@@ -1797,6 +1800,12 @@ def __init__(self, model: Model):
17971800 PreferredUnits = CurrencyUnit .MDOLLARS ,
17981801 CurrentUnits = CurrencyUnit .MDOLLARS
17991802 )
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+ )
18001809 self .cost_to_junction_section = self .OutputParameterDict [self .cost_to_junction_section .Name ] = OutputParameter (
18011810 Name = "Cost of the entire section of a well from bottom of vertical to junction with laterals" ,
18021811 UnitType = Units .CURRENCY ,
@@ -2286,13 +2295,16 @@ def Calculate(self, model: Model) -> None:
22862295 self .injection_well_cost_adjustment_factor .value )
22872296
22882297 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+ )
22962308 else :
22972309 self .cost_lateral_section .value = 0.0
22982310 # cost of the well field
@@ -2881,7 +2893,20 @@ def Calculate(self, model: Model) -> None:
28812893 np .average (model .surfaceplant .ElectricityProduced .quantity ().to (
28822894 'MW' ).magnitude * self .jobs_created_per_MW_electricity .value ))
28832895
2896+ self ._calculate_derived_outputs (model )
28842897 model .logger .info (f'complete { __class__ !s} : { sys ._getframe ().f_code .co_name } ' )
28852898
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+
28862911 def __str__ (self ):
28872912 return "Economics"
0 commit comments