@@ -647,6 +647,10 @@ def __init__(self, model: Model):
647647 Valid = False ,
648648 ToolTipText = "Injection Well Drilling and Completion Capital Cost"
649649 )
650+
651+ # TODO parameterize/document default 5% indirect cost factor that is applied when neither of the well
652+ # drilling/completion capital cost adjustment factors are provided
653+ injection_well_cost_adjustment_factor_name = "Injection Well Drilling and Completion Capital Cost Adjustment Factor"
650654 self .production_well_cost_adjustment_factor = self .ParameterDict [self .production_well_cost_adjustment_factor .Name ] = floatParameter (
651655 "Well Drilling and Completion Capital Cost Adjustment Factor" ,
652656 DefaultValue = 1.0 ,
@@ -657,19 +661,23 @@ def __init__(self, model: Model):
657661 CurrentUnits = PercentUnit .TENTH ,
658662 Provided = False ,
659663 Valid = True ,
660- ToolTipText = "Well Drilling and Completion Capital Cost Adjustment Factor"
664+ ToolTipText = "Well Drilling and Completion Capital Cost Adjustment Factor. Applies to production wells; "
665+ f"also applies to injection wells unless a value is provided for "
666+ f"{ injection_well_cost_adjustment_factor_name } ."
661667 )
662668 self .injection_well_cost_adjustment_factor = self .ParameterDict [self .injection_well_cost_adjustment_factor .Name ] = floatParameter (
663- "Injection Well Drilling and Completion Capital Cost Adjustment Factor" ,
664- DefaultValue = self .production_well_cost_adjustment_factor .value ,
665- Min = 0 ,
666- Max = 10 ,
669+ injection_well_cost_adjustment_factor_name ,
670+ DefaultValue = self .production_well_cost_adjustment_factor .DefaultValue ,
671+ Min = self . production_well_cost_adjustment_factor . Min ,
672+ Max = self . production_well_cost_adjustment_factor . Max ,
667673 UnitType = Units .PERCENT ,
668674 PreferredUnits = PercentUnit .TENTH ,
669675 CurrentUnits = PercentUnit .TENTH ,
670676 Provided = False ,
671677 Valid = True ,
672- ToolTipText = "Injection Well Drilling and Completion Capital Cost Adjustment Factor"
678+ ToolTipText = "Injection Well Drilling and Completion Capital Cost Adjustment Factor. "
679+ f"If not provided, this value will be set automatically to the same value as "
680+ f"{ self .production_well_cost_adjustment_factor .Name } ."
673681 )
674682 self .oamwellfixed = self .ParameterDict [self .oamwellfixed .Name ] = floatParameter (
675683 "Wellfield O&M Cost" ,
@@ -1753,7 +1761,8 @@ def __init__(self, model: Model):
17531761 CurrentUnits = PercentUnit .TENTH
17541762 )
17551763 self .ProjectMOIC = self .OutputParameterDict [self .ProjectMOIC .Name ] = OutputParameter (
1756- "Project Multiple of Invested Capital" ,
1764+ "Project MOIC" ,
1765+ ToolTipText = "Project Multiple of Invested Capital" ,
17571766 UnitType = Units .PERCENT ,
17581767 PreferredUnits = PercentUnit .TENTH ,
17591768 CurrentUnits = PercentUnit .TENTH
@@ -1910,35 +1919,30 @@ def read_parameters(self, model: Model) -> None:
19101919 ParameterToModify .value = 1.0
19111920 elif ParameterToModify .Name == "Well Drilling and Completion Capital Cost Adjustment Factor" :
19121921 if self .per_production_well_cost .Valid and ParameterToModify .Valid :
1913- print ( "Warning: Provided well drilling and completion cost adjustment factor not" +
1914- " considered because valid total well drilling and completion cost provided." )
1915- model . logger . warning ( "Provided well drilling and completion cost adjustment factor not" +
1916- " considered because valid total well drilling and completion cost provided." )
1922+ msg = ( ' Provided well drilling and completion cost adjustment factor not considered '
1923+ ' because valid total well drilling and completion cost provided.' )
1924+ print ( f'Warning: { msg } ' )
1925+ model . logger . warning ( msg )
19171926 elif not self .per_production_well_cost .Provided and not self .production_well_cost_adjustment_factor .Provided :
19181927 ParameterToModify .value = 1.0
1919- print ("Warning: No valid well drilling and completion total cost or adjustment" +
1920- " factor provided. GEOPHIRES will assume default built-in well drilling and" +
1921- " completion cost correlation with adjustment factor = 1." )
1922- model .logger .warning (
1923- "No valid well drilling and completion total cost or adjustment factor" +
1924- " provided. GEOPHIRES will assume default built-in well drilling and completion cost" +
1925- " correlation with adjustment factor = 1." )
1928+ msg = ("No valid well drilling and completion total cost or adjustment factor provided. "
1929+ "GEOPHIRES will assume default built-in well drilling and completion cost "
1930+ "correlation with adjustment factor = 1." )
1931+ print (f'Warning: { msg } ' )
1932+ model .logger .warning (msg )
19261933 elif self .per_production_well_cost .Provided and not self .per_production_well_cost .Valid :
1927- print ("Warning: Provided well drilling and completion cost outside of range 0-1000." +
1928- " GEOPHIRES will assume default built-in well drilling and completion cost correlation" +
1929- " with adjustment factor = 1." )
1930- model .logger .warning ("Provided well drilling and completion cost outside of range 0-1000." +
1931- " GEOPHIRES will assume default built-in well drilling and completion cost correlation with" +
1932- " adjustment factor = 1." )
1934+ msg = ("Provided well drilling and completion cost outside of range 0-1000. GEOPHIRES "
1935+ "will assume default built-in well drilling and completion cost correlation "
1936+ "with adjustment factor = 1." )
1937+ print (f'Warning: { msg } ' )
1938+ model .logger .warning (msg )
19331939 self .production_well_cost_adjustment_factor .value = 1.0
19341940 elif not self .per_production_well_cost .Provided and self .production_well_cost_adjustment_factor .Provided and not self .production_well_cost_adjustment_factor .Valid :
1935- print ("Warning: Provided well drilling and completion cost adjustment factor outside" +
1936- " of range 0-10. GEOPHIRES will assume default built-in well drilling and completion" +
1937- " cost correlation with adjustment factor = 1." )
1938- model .logger .warning (
1939- "Provided well drilling and completion cost adjustment factor outside" +
1940- " of range 0-10. GEOPHIRES will assume default built-in well drilling and completion" +
1941- " cost correlation with adjustment factor = 1." )
1941+ msg = ("Provided well drilling and completion cost adjustment factor outside of range "
1942+ "0-10. GEOPHIRES will assume default built-in well drilling and completion cost "
1943+ "correlation with adjustment factor = 1." )
1944+ print (f'Warning: { msg } ' )
1945+ model .logger .warning (msg )
19421946 self .production_well_cost_adjustment_factor .value = 1.0
19431947 elif ParameterToModify .Name == "Wellfield O&M Cost Adjustment Factor" :
19441948 if self .oamtotalfixed .Valid :
@@ -2169,6 +2173,7 @@ def read_parameters(self, model: Model) -> None:
21692173
21702174 coerce_int_params_to_enum_values (self .ParameterDict )
21712175 self .sync_interest_rate (model )
2176+ self .sync_well_drilling_and_completion_capital_cost_adjustment_factor (model )
21722177
21732178 model .logger .info (f'complete { __class__ !s} : { sys ._getframe ().f_code .co_name } ' )
21742179
@@ -2198,6 +2203,16 @@ def discount_rate_display() -> str:
21982203
21992204 self .interest_rate .value = self .discountrate .quantity ().to (convertible_unit (self .interest_rate .CurrentUnits )).magnitude
22002205
2206+ def sync_well_drilling_and_completion_capital_cost_adjustment_factor (self , model ):
2207+ if (self .production_well_cost_adjustment_factor .Provided
2208+ and not self .injection_well_cost_adjustment_factor .Provided ):
2209+ factor = self .production_well_cost_adjustment_factor .value
2210+ self .injection_well_cost_adjustment_factor .value = factor
2211+ model .logger .info (
2212+ f'Set { self .injection_well_cost_adjustment_factor .Name } to { factor } because '
2213+ f'{ self .production_well_cost_adjustment_factor .Name } was provided.' )
2214+
2215+
22012216 def Calculate (self , model : Model ) -> None :
22022217 """
22032218 The Calculate function is where all the calculations are done.
@@ -2281,7 +2296,7 @@ def Calculate(self, model: Model) -> None:
22812296 else :
22822297 self .cost_lateral_section .value = 0.0
22832298 # cost of the well field
2284- # 1.05 for 5% indirect costs
2299+ # 1.05 for 5% indirect costs - see TODO re:parameterizing at src/geophires_x/Economics.py:652
22852300 self .Cwell .value = 1.05 * ((self .cost_one_production_well .value * model .wellbores .nprod .value ) +
22862301 (self .cost_one_injection_well .value * model .wellbores .ninj .value ) +
22872302 self .cost_lateral_section .value )
0 commit comments