def solve_cementing_load(self, casing_string_id): casing_string = self.project.casing_strings[casing_string_id] attributes = CementingAttributes( displacement_fluid=casing_string.displacement_fluid, surface_pressure_during_setting=casing_string. surface_pressure_during_setting) internal_pressure_load = Cementing(project=self.project, casing_string=casing_string, attributes=attributes) backup_attributes = CementingBackupAttributes( slurry_density=casing_string.slurry_density, mud_weight=casing_string.mud_weight, toc_md=casing_string.toc_md, second_slurry_density=casing_string.second_slurry_density, second_slurry_length=casing_string.second_slurry_length) backup = CementingBackup(project=self.project, casing_string=casing_string, attributes=backup_attributes) result = LoadScenario(internal_pressure_load=internal_pressure_load, external_pressure_load=backup).solve() return CasingDesign( string_sections=casing_string.string_sections, load_result=result, design_standard=N2752Y2014SimpleConnectionTriaxialDesignStandard)
def solve_WellFullOfGas(self, casing_string_id): casing_string = self.project.casing_strings[casing_string_id] calcular = WellFullOfGasCalculator(project=self.project, casing_string=casing_string, production=None, calculate_parameters=True) attributes = WellFullOfGasAttributes( influx_depth=calcular.influx_depth, influx_pore_gradient=calcular.influx_pore_gradient, next_mud_weight=calcular.next_mud_weight, fracture_margin=1., gas_gradient=None, gas_gravity=0.6, gas_percentage=1.) internal_pressure_load = WellFullOfGas(project=self.project, casing_string=casing_string, attributes=attributes) backup = FluidGradientBackup(project=self.project, casing_string=casing_string) result = LoadScenario(internal_pressure_load=internal_pressure_load, external_pressure_load=backup).solve() return CasingDesign( string_sections=casing_string.string_sections, load_result=result, design_standard=N2752Y2014SimpleConnectionTriaxialDesignStandard)
def solve_pressure_test(self, casing_string_id): casing_string = self.project.casing_strings[casing_string_id] calcular = PressureTestCalculator(project=self.project, casing_string=casing_string) attributes = PressureTestAttributes( fluid=calcular.fluid, test_pressure=calcular.get_fit_test_pressure()) internal_pressure_load = PressureTest(project=self.project, casing_string=casing_string, attributes=attributes) #backup = FluidGradientBackup(project=self.project, casing_string=casing_string) calcular_backup = FluidGradientPorePressureCalculator( project=self.project, casing_string=casing_string, calculate_parameters=True) attributes_backup = FluidGradientPorePressureAttributes( toc_md=calcular_backup.toc_md, previous_shoe_md=calcular_backup.previous_shoe_md, fluid_gradient_above_toc=calcular_backup.fluid_gradient_above_toc, fluid_gradient_below_toc=calcular_backup.fluid_gradient_below_toc, enable_pore_pressure=calcular_backup.enable_pore_pressure) backup = FluidGradientPorePressure(project=self.project, casing_string=casing_string, attributes=attributes_backup) result = LoadScenario(internal_pressure_load=internal_pressure_load, external_pressure_load=backup).solve() return CasingDesign( string_sections=casing_string.string_sections, load_result=result, design_standard=N2752Y2014SimpleConnectionTriaxialDesignStandard, tipo_carregamento=str('pressure_test'), tipo_carga='Serviço')
def solve_influx(self, casing_string_id): casing_string = self.project.casing_strings[casing_string_id] calcular = InfluxCalculator(project=self.project, casing_string=casing_string, production=None, calculate_parameters=True) attributes = InfluxAttributes(influx_depth=calcular.influx_depth, influx_pore_gradient=calcular.influx_pore_gradient, next_mud_weight=calcular.next_mud_weight, influx_is_hc=calcular.influx_is_hc, influx_gradient=calcular.influx_gradient, influx_gas_gravity=calcular.influx_gas_gravity, influx_api_density=calcular.influx_api_density, fracture_margin=calcular.fracture_margin, fluid_percentage=calcular.fluid_percentage) internal_pressure_load = Influx(project=self.project, casing_string=casing_string, attributes=attributes) #backup = FluidGradientBackup(project=self.project, casing_string=casing_string) calcular_backup = FluidGradientPorePressureCalculator(project=self.project, casing_string=casing_string, calculate_parameters=True) attributes_backup = FluidGradientPorePressureAttributes(toc_md=calcular_backup.toc_md, previous_shoe_md=calcular_backup.previous_shoe_md, fluid_gradient_above_toc=calcular_backup.fluid_gradient_above_toc, fluid_gradient_below_toc=calcular_backup.fluid_gradient_below_toc, enable_pore_pressure=calcular_backup.enable_pore_pressure) backup = FluidGradientPorePressure(project=self.project, casing_string=casing_string, attributes=attributes_backup) result = LoadScenario(internal_pressure_load=internal_pressure_load, external_pressure_load=backup).solve() return CasingDesign(string_sections=casing_string.string_sections, load_result=result, design_standard=N2752Y2014SimpleConnectionTriaxialDesignStandard, tipo_carregamento=str('influx'), tipo_carga='Sobrevivência')
def solve_injection(self, casing_string_id): casing_string = self.project.casing_strings[casing_string_id] attributes = InjectionAttributes(wellhead_pressure=2500, perforation_base_depth=4657, perforation_pressure=7118.97, fluid_gradient=1.46, packer_depth=3982, packer_fluid=9.9) internal_pressure_load = Injection(project=self.project, casing_string=casing_string, attributes=attributes) # backup = FluidGradientBackup(project=self.project, casing_string=casing_string) calcular_backup = FluidGradientPorePressureCalculator( project=self.project, casing_string=casing_string, calculate_parameters=True) attributes_backup = FluidGradientPorePressureAttributes( toc_md=calcular_backup.toc_md, previous_shoe_md=calcular_backup.previous_shoe_md, fluid_gradient_above_toc=calcular_backup.fluid_gradient_above_toc, fluid_gradient_below_toc=calcular_backup.fluid_gradient_below_toc, enable_pore_pressure=calcular_backup.enable_pore_pressure) backup = FluidGradientPorePressure(project=self.project, casing_string=casing_string, attributes=attributes_backup) result = LoadScenario(internal_pressure_load=internal_pressure_load, external_pressure_load=backup).solve() return CasingDesign( string_sections=casing_string.string_sections, load_result=result, design_standard=N2752Y2014SimpleConnectionTriaxialDesignStandard, tipo_carregamento=str('injection'), tipo_carga='Sobrevivência')
def solve_gas_kick(self, casing_string_id): casing_string = self.project.casing_strings[casing_string_id] calcular = GasKickCalculator(project=self.project, casing_string=casing_string, production=None, calculate_parameters=True) attributes = GasKickAttributes(kick_volume=calcular.kick_volume, kick_intensity=calcular.kick_intensity, gas_gravity=calcular.gas_gravity) internal_pressure_load = GasKick(project=self.project, casing_string=casing_string, attributes=attributes) backup = FluidGradientBackup(project=self.project, casing_string=casing_string) result = LoadScenario(internal_pressure_load=internal_pressure_load, external_pressure_load=backup).solve() return CasingDesign(string_sections=casing_string.string_sections, load_result=result, design_standard=N2752Y2014SimpleConnectionTriaxialDesignStandard, tipo_carregamento=str('gas_kick'), tipo_carga='Serviço')
def solve_full_evacuation(self, casing_string_id): casing_string = self.project.casing_strings[casing_string_id] # calcular = FullEvacuationCalculator(project=self.project, casing_string=casing_string, production=None, # calculate_parameters=True) attributes = FullEvacuationAttributes(perforation_base_depth=4657, packer_fluid=9.9) internal_pressure_load = FullEvacuation(project=self.project, casing_string=casing_string, attributes=attributes) backup = FluidGradientBackup(project=self.project, casing_string=casing_string) result = LoadScenario(internal_pressure_load=internal_pressure_load, external_pressure_load=backup).solve() return CasingDesign(string_sections=casing_string.string_sections, load_result=result, design_standard=N2752Y2014SimpleConnectionTriaxialDesignStandard, tipo_carregamento=str('full_evacuation'), tipo_carga='Sobrevivência')
def solve_lost_returns(self, casing_string_id): casing_string = self.project.casing_strings[casing_string_id] calcular = LostReturnsCalculator(project=self.project, casing_string=casing_string, calculate_parameters=True) attributes = LostReturnsAttributes(evacuation_tvd=calcular.evacuation_tvd, mud_weight=calcular.mud_weight, loss_tvd=calcular.loss_tvd, pore_gradient=calcular.pore_gradient) internal_pressure_load = LostReturns(project=self.project, casing_string=casing_string, attributes=attributes) backup = FluidGradientBackup(project=self.project, casing_string=casing_string) result = LoadScenario(internal_pressure_load=internal_pressure_load, external_pressure_load=backup).solve() return CasingDesign(string_sections=casing_string.string_sections, load_result=result, design_standard=N2752Y2014SimpleConnectionTriaxialDesignStandard, tipo_carregamento=str('lost_returns'), tipo_carga='Serviço')
def solve_wcd_collapse(self, casing_string_id): casing_string = self.project.casing_strings[casing_string_id] calcular = WCDCollapseCalculator(project=self.project, casing_string=casing_string, calculate_parameters=True) attributes = WCDCollapseAttributes(seawater_density=calcular.seawater_density, gas_gradient=None, gas_gravity=calcular.gas_gravity, api_density=calcular.api_density, influx_depth=calcular.influx_depth) internal_pressure_load = WCDCollapse(project=self.project, casing_string=casing_string, attributes=attributes) backup = FluidGradientBackup(project=self.project, casing_string=casing_string) result = LoadScenario(internal_pressure_load=internal_pressure_load, external_pressure_load=backup).solve() return CasingDesign(string_sections=casing_string.string_sections, load_result=result, design_standard=N2752Y2014SimpleConnectionTriaxialDesignStandard, tipo_carregamento='WCD_colapse')
def solve_pressure_test(self, casing_string_id): casing_string = self.project.casing_strings[casing_string_id] calcular = PressureTestCalculator(project=self.project, casing_string=casing_string) attributes = PressureTestAttributes( fluid=calcular.fluid, test_pressure=calcular.get_fit_test_pressure()) internal_pressure_load = PressureTest(project=self.project, casing_string=casing_string, attributes=attributes) backup = FluidGradientBackup(project=self.project, casing_string=casing_string) result = LoadScenario(internal_pressure_load=internal_pressure_load, external_pressure_load=backup).solve() return CasingDesign( string_sections=casing_string.string_sections, load_result=result, design_standard=N2752Y2014SimpleConnectionTriaxialDesignStandard)
def solve_partial_evacuation(self, casing_string_id): casing_string = self.project.casing_strings[casing_string_id] calcular = PartialEvacuationCalculator(project=self.project, casing_string=casing_string, production=None, calculate_parameters=True) attributes = PartialEvacuationAttributes( evacuation_md=calcular.evacuation_md, perforation_base_depth=calcular.perforation_base_depth, packer_fluid=calcular.packer_fluid, fluid_gradient=None) internal_pressure_load = PartialEvacuation(project=self.project, casing_string=casing_string, attributes=attributes) backup = FluidGradientBackup(project=self.project, casing_string=casing_string) result = LoadScenario(internal_pressure_load=internal_pressure_load, external_pressure_load=backup).solve() return CasingDesign( string_sections=casing_string.string_sections, load_result=result, design_standard=N2752Y2014SimpleConnectionTriaxialDesignStandard)
attributes = CementingAttributes(displacement_fluid=casing_string.displacement_fluid, surface_pressure_during_setting=casing_string.surface_pressure_during_setting) internal_pressure_load = Cementing(project=project, casing_string=casing_string, attributes=attributes) backup_attributes = CementingBackupAttributes(slurry_density=casing_string.slurry_density, mud_weight=casing_string.mud_weight, toc_md=casing_string.toc_md, second_slurry_density=casing_string.second_slurry_density, second_slurry_length=casing_string.second_slurry_length) backup = CementingBackup(project=project, casing_string=casing_string, attributes=backup_attributes) result = LoadScenario(internal_pressure_load=internal_pressure_load, external_pressure_load=backup ).solve() casing_design = CasingDesign(string_sections=casing_string.string_sections, load_result=result, design_standard=N2752Y2014SimpleConnectionTriaxialDesignStandard) print(casing_design.load_result.internal_profile) print(casing_design.api_collapse_strength) print(casing_design.load_result.external_profile) print(casing_design.load_result.axial_profile) print(casing_design.get_api_burst_safety_factor()) print(casing_design.get_api_collapse_safety_factor()) print(casing_design.get_api_axial_safety_factor()) print(casing_design.get_api_von_mises_safety_factor())