@@ -2356,80 +2356,7 @@ def Calculate(self, model: Model) -> None:
23562356 model .logger .info (f'Init { __class__ !s} : { sys ._getframe ().f_code .co_name } ' )
23572357
23582358 # capital costs
2359- # well costs (using GeoVision drilling correlations). These are calculated whether totalcapcostvalid = 1
2360- # start with the cost of one well
2361- # C1well is well drilling and completion cost in M$/well
2362- if self .per_production_well_cost .Valid :
2363- self .cost_one_production_well .value = self .per_production_well_cost .value
2364- if not self .per_injection_well_cost .Provided :
2365- self .cost_one_injection_well .value = self .per_production_well_cost .value
2366- else :
2367- self .cost_one_injection_well .value = self .per_injection_well_cost .value
2368- self .Cwell .value = ((self .cost_one_production_well .value * model .wellbores .nprod .value ) +
2369- (self .cost_one_injection_well .value * model .wellbores .ninj .value ))
2370- else :
2371- if hasattr (model .wellbores , 'numnonverticalsections' ) and model .wellbores .numnonverticalsections .Provided :
2372- self .cost_lateral_section .value = 0.0
2373- if not model .wellbores .IsAGS .value :
2374- input_vert_depth_km = model .reserv .depth .quantity ().to ('km' ).magnitude
2375- output_vert_depth_km = 0.0
2376- else :
2377- input_vert_depth_km = model .reserv .InputDepth .quantity ().to ('km' ).magnitude
2378- output_vert_depth_km = model .reserv .OutputDepth .quantity ().to ('km' ).magnitude
2379- model .wellbores .injection_reservoir_depth .value = input_vert_depth_km
2380-
2381- tot_m , tot_vert_m , tot_horiz_m , _ = calculate_total_drilling_lengths_m (model .wellbores .Configuration .value ,
2382- model .wellbores .numnonverticalsections .value ,
2383- model .wellbores .Nonvertical_length .value / 1000.0 ,
2384- input_vert_depth_km ,
2385- output_vert_depth_km ,
2386- model .wellbores .nprod .value ,
2387- model .wellbores .ninj .value )
2388-
2389- else :
2390- tot_m = tot_vert_m = model .reserv .depth .quantity ().to ('km' ).magnitude
2391- tot_horiz_m = 0.0
2392- if not model .wellbores .injection_reservoir_depth .Provided :
2393- model .wellbores .injection_reservoir_depth .value = model .reserv .depth .quantity ().to ('km' ).magnitude
2394- else :
2395- model .wellbores .injection_reservoir_depth .value = model .wellbores .injection_reservoir_depth .quantity ().to ('km' ).magnitude
2396-
2397- self .cost_one_production_well .value = calculate_cost_of_one_vertical_well (model , model .reserv .depth .quantity ().to ('m' ).magnitude ,
2398- self .wellcorrelation .value ,
2399- self .Vertical_drilling_cost_per_m .value ,
2400- self .per_production_well_cost .Name ,
2401- self .production_well_cost_adjustment_factor .value )
2402- if model .wellbores .ninj .value == 0 :
2403- self .cost_one_injection_well .value = - 1.0
2404- else :
2405- self .cost_one_injection_well .value = calculate_cost_of_one_vertical_well (model ,
2406- model .wellbores .injection_reservoir_depth .value * 1000.0 ,
2407- self .wellcorrelation .value ,
2408- self .Vertical_drilling_cost_per_m .value ,
2409- self .per_injection_well_cost .Name ,
2410- self .injection_well_cost_adjustment_factor .value )
2411-
2412- if hasattr (model .wellbores , 'numnonverticalsections' ) and model .wellbores .numnonverticalsections .Provided :
2413- self .cost_lateral_section .value = calculate_cost_of_non_vertical_section (
2414- model ,
2415- tot_horiz_m ,
2416- self .wellcorrelation .value ,
2417- self .Nonvertical_drilling_cost_per_m .value ,
2418- model .wellbores .numnonverticalsections .value ,
2419- self .Nonvertical_drilling_cost_per_m .Name ,
2420- model .wellbores .NonverticalsCased .value ,
2421- self .production_well_cost_adjustment_factor .value
2422- )
2423- else :
2424- self .cost_lateral_section .value = 0.0
2425-
2426- # cost of the well field
2427- self .Cwell .value = self ._wellfield_indirect_cost_factor * (
2428- self .cost_one_production_well .value * model .wellbores .nprod .value +
2429- self .cost_one_injection_well .value * model .wellbores .ninj .value +
2430- self .cost_lateral_section .value
2431- )
2432-
2359+ self .calculate_wellfield_costs (model )
24332360 self .Cstim .value = self .calculate_stimulation_costs (model ).to (self .Cstim .CurrentUnits ).magnitude
24342361
24352362 # field gathering system costs (M$)
@@ -2746,6 +2673,82 @@ def _wellfield_indirect_cost_factor(self) -> float:
27462673 def _stimulation_indirect_cost_factor (self ) -> float :
27472674 return 1 + self .stimulation_indirect_capital_cost_percentage .quantity ().to ('dimensionless' ).magnitude
27482675
2676+ def calculate_wellfield_costs (self , model : Model ) -> None :
2677+ if self .per_production_well_cost .Valid :
2678+ self .cost_one_production_well .value = self .per_production_well_cost .value
2679+ if not self .per_injection_well_cost .Provided :
2680+ self .cost_one_injection_well .value = self .per_production_well_cost .value
2681+ else :
2682+ self .cost_one_injection_well .value = self .per_injection_well_cost .value
2683+ self .Cwell .value = ((self .cost_one_production_well .value * model .wellbores .nprod .value ) +
2684+ (self .cost_one_injection_well .value * model .wellbores .ninj .value ))
2685+ else :
2686+ if hasattr (model .wellbores , 'numnonverticalsections' ) and model .wellbores .numnonverticalsections .Provided :
2687+ self .cost_lateral_section .value = 0.0
2688+ if not model .wellbores .IsAGS .value :
2689+ input_vert_depth_km = model .reserv .depth .quantity ().to ('km' ).magnitude
2690+ output_vert_depth_km = 0.0
2691+ else :
2692+ input_vert_depth_km = model .reserv .InputDepth .quantity ().to ('km' ).magnitude
2693+ output_vert_depth_km = model .reserv .OutputDepth .quantity ().to ('km' ).magnitude
2694+ model .wellbores .injection_reservoir_depth .value = input_vert_depth_km
2695+
2696+ tot_m , tot_vert_m , tot_horiz_m , _ = calculate_total_drilling_lengths_m (
2697+ model .wellbores .Configuration .value ,
2698+ model .wellbores .numnonverticalsections .value ,
2699+ model .wellbores .Nonvertical_length .value / 1000.0 ,
2700+ input_vert_depth_km ,
2701+ output_vert_depth_km ,
2702+ model .wellbores .nprod .value ,
2703+ model .wellbores .ninj .value )
2704+
2705+ else :
2706+ tot_m = tot_vert_m = model .reserv .depth .quantity ().to ('km' ).magnitude
2707+ tot_horiz_m = 0.0
2708+ if not model .wellbores .injection_reservoir_depth .Provided :
2709+ model .wellbores .injection_reservoir_depth .value = model .reserv .depth .quantity ().to ('km' ).magnitude
2710+ else :
2711+ model .wellbores .injection_reservoir_depth .value = model .wellbores .injection_reservoir_depth .quantity ().to (
2712+ 'km' ).magnitude
2713+
2714+ self .cost_one_production_well .value = calculate_cost_of_one_vertical_well (model ,
2715+ model .reserv .depth .quantity ().to (
2716+ 'm' ).magnitude ,
2717+ self .wellcorrelation .value ,
2718+ self .Vertical_drilling_cost_per_m .value ,
2719+ self .per_production_well_cost .Name ,
2720+ self .production_well_cost_adjustment_factor .value )
2721+ if model .wellbores .ninj .value == 0 :
2722+ self .cost_one_injection_well .value = - 1.0
2723+ else :
2724+ self .cost_one_injection_well .value = calculate_cost_of_one_vertical_well (model ,
2725+ model .wellbores .injection_reservoir_depth .value * 1000.0 ,
2726+ self .wellcorrelation .value ,
2727+ self .Vertical_drilling_cost_per_m .value ,
2728+ self .per_injection_well_cost .Name ,
2729+ self .injection_well_cost_adjustment_factor .value )
2730+
2731+ if hasattr (model .wellbores , 'numnonverticalsections' ) and model .wellbores .numnonverticalsections .Provided :
2732+ self .cost_lateral_section .value = calculate_cost_of_non_vertical_section (
2733+ model ,
2734+ tot_horiz_m ,
2735+ self .wellcorrelation .value ,
2736+ self .Nonvertical_drilling_cost_per_m .value ,
2737+ model .wellbores .numnonverticalsections .value ,
2738+ self .Nonvertical_drilling_cost_per_m .Name ,
2739+ model .wellbores .NonverticalsCased .value ,
2740+ self .production_well_cost_adjustment_factor .value
2741+ )
2742+ else :
2743+ self .cost_lateral_section .value = 0.0
2744+
2745+ # cost of the well field
2746+ self .Cwell .value = self ._wellfield_indirect_cost_factor * (
2747+ self .cost_one_production_well .value * model .wellbores .nprod .value +
2748+ self .cost_one_injection_well .value * model .wellbores .ninj .value +
2749+ self .cost_lateral_section .value
2750+ )
2751+
27492752 def calculate_stimulation_costs (self , model : Model ) -> PlainQuantity :
27502753 if self .ccstimfixed .Valid :
27512754 stimulation_costs = self .ccstimfixed .quantity ().to (self .Cstim .CurrentUnits ).magnitude
0 commit comments