Well neighbor magnetic field response prediction method, device, equipment, medium and program product

By establishing an excitation model for a finite-length electrode with end insulation and a four-layer hierarchical response model, and combining axial mode expansion and modified Bessel functions, the problem of insufficient accuracy in predicting the magnetic field response of adjacent wells was solved. This enabled high-precision magnetic field response analysis under complex well configurations, supporting engineering applications such as wellbore trajectory control and adjacent well collision prevention.

CN122452111APending Publication Date: 2026-07-24CHINA UNIV OF PETROLEUM (BEIJING)
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA UNIV OF PETROLEUM (BEIJING)
Filing Date
2026-04-13
Publication Date
2026-07-24

Smart Images

  • Figure CN122452111A_ABST
    Figure CN122452111A_ABST
Patent Text Reader

Abstract

The application provides a method, device, equipment, medium and program product for predicting the magnetic field response of a neighboring well. The method comprises: obtaining well site working condition data; determining the shape factor of an end-insulated finite-length electrode according to the well site working condition data; establishing an excitation model of the end-insulated finite-length electrode according to the well site working condition data; modulating the excitation model according to the shape factor to obtain a drilling fluid modal source coefficient of a drilling well; establishing a four-layer layered response model of a target well according to the well site working condition data; calculating the background potential and the background electric field of the drilling well according to the drilling fluid modal source coefficient; and predicting the magnetic field response of the four-layer layered response model of the target well according to the background potential and the background electric field to obtain the active magnetic field intensity and the radial electric field profile of the target well. The accuracy of predicting the magnetic field response of a neighboring well is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of oil and gas engineering technology, and in particular to a method, apparatus, equipment, medium and program product for predicting the magnetic field response of adjacent wells. Background Technology

[0002] As oil and gas exploration and development advances into deeper, ultra-deep, and unconventional areas, the proportion of complex well types, such as rescue wells, horizontal wells, cluster wells, extended reach wells, and re-entry wells from old wells, has increased significantly. In these scenarios, the complex well structure, small well-to-well distances, and significant multi-layered heterogeneity of the formation media lead to particularly prominent cumulative errors in traditional wellbore trajectory measurement methods, making it difficult to meet high-precision positioning requirements. Furthermore, in operations such as rescue well docking, cluster well collision prevention, and the construction of underground gas / hydrogen storage facilities, it is necessary to monitor the relative positions of adjacent wells and the target well in real time.

[0003] In existing technologies, the downhole electrode is typically simplified to a point electrode based on Maxwell's equations, the target well casing is assumed to be an ideal conductor with a uniform and infinitely long structure, and the surrounding formation is considered a homogeneous and isotropic medium; this is used to predict the magnetic field response of adjacent wells. However, the analytical model is overly idealized, resulting in a large deviation between the predicted results and actual operating conditions.

[0004] Therefore, existing technologies suffer from insufficient accuracy in predicting the magnetic field response of adjacent wells. Summary of the Invention

[0005] This application provides a method, apparatus, equipment, medium, and program product for predicting the magnetic field response of adjacent wells, in order to improve the accuracy of predicting the magnetic field response of adjacent wells.

[0006] In a first aspect, embodiments of this application provide a method for predicting the magnetic field response of adjacent wells, including:

[0007] Acquire well site operating data;

[0008] Based on the well site operating data, determine the shape factor of the end-insulated finite-length electrode;

[0009] Based on well site operating data, an excitation model for an end-insulated finite-length electrode is established.

[0010] Based on the shape factor, modal source terms are modulated on the excitation model to obtain the drilling fluid modal source coefficients for positive drilling.

[0011] Based on the well site operating data, a four-layer hierarchical response model for the target well was established;

[0012] Calculate the background electric potential and background electric field during drilling based on the drilling fluid modal source coefficients;

[0013] Based on the background electric potential and background electric field, the magnetic field response of the target well is predicted using a four-layer stratified response model, resulting in the active magnetic field strength and radial electric field profile of the target well.

[0014] In one possible implementation, based on well site operating data, an excitation model for an end-insulated finite-length electrode is established, including:

[0015] Obtain the axial cosine mode basis; where the axial cosine mode basis refers to the orthogonal cosine function system of the end-insulated finite-length electrode;

[0016] An end-insulated finite-length electrode is used as a finite-length uniform line source and projected onto an axial cosine mode substrate to establish an excitation model for the end-insulated finite-length electrode.

[0017] In one possible implementation, a four-layer stratified response model of the target well is established based on well site operating data, including:

[0018] Obtain the coordinate system data of the target well;

[0019] Based on the coordinate system data and well site operating data of the target well, a four-layer stratified response model of the target well is established; the four-layer stratified response model includes the in-casing fluid layer, the casing layer, the cement sheath layer, and the formation.

[0020] In one possible implementation, the background potential and background electric field of the drilling process are calculated based on the drilling fluid modal source coefficients, including:

[0021] Obtain coordinate system data for ongoing drilling;

[0022] Based on well site operating data, a two-layer conductive medium model for ongoing drilling is established; the two-layer conductive medium model includes the drilling fluid layer and the formation.

[0023] Based on well site operating data and drilling fluid modal source coefficients, the expansion coefficients of the first-type modified Bessel function term of the drilling fluid layer and the expansion coefficients of the background potential of the formation are determined respectively.

[0024] The background potential of the drilling fluid layer is calculated based on the coordinate system data of the drilling process, the modal source coefficients of the drilling fluid, and the expansion coefficients of the first-type modified Bessel function term of the drilling fluid layer.

[0025] The background potential of the formation is calculated based on the coordinate system data and the expansion coefficient of the background potential of the formation.

[0026] The background electric field during drilling is calculated based on the background electric potential of the drilling fluid layer and the background electric potential of the formation.

[0027] In one possible implementation, based on the background potential and background electric field, the magnetic field response of the four-layer stratified response model of the target well is predicted to obtain the active magnetic field strength and radial electric field profile of the target well, including:

[0028] Based on the background electric potential and background electric field, the target well is re-expanded along its axis to obtain the axisymmetric incident field of the target well.

[0029] Based on the axisymmetric incident field, the potential continuity condition and the normal current density continuity condition are applied to the interlayer interfaces of each layer in the four-layer layered response model to establish a linear equation set of potential expansion coefficients of the four-layer layered response model; among them, the interlayer interfaces of each layer include the interface between the casing fluid layer and the casing layer, the interface between the casing layer and the cement sheath layer, and the interface between the cement sheath layer and the formation.

[0030] Based on the linear equations, the potential expansion coefficients of the fluid layer inside the casing, the casing layer, the cement sheath layer, and the formation are obtained.

[0031] The axial current of the bushing is obtained by calculating the potential expansion coefficient of the bushing layer.

[0032] Based on the casing axial current, the magnetic field strength of the target well is calculated according to Ampere's law.

[0033] Based on the potential expansion coefficients of the fluid layer, casing layer, cement sheath layer, and formation, calculate the potentials of the fluid layer, casing layer, cement sheath layer, and formation, respectively.

[0034] Based on the potentials of the fluid layer inside the casing, the casing layer, the cement sheath layer, and the formation, the segmented potentials are obtained by radial segmentation.

[0035] Based on the segmented potential, the radial coordinates are differentiated to obtain the radial electric field profile of the target well.

[0036] In one possible implementation, after predicting the magnetic field response of the four-layered response model of the target well based on the background potential and background electric field to obtain the active magnetic field strength and radial electric field profile of the target well, the method further includes:

[0037] Based on the active magnetic field strength of the target well, the magnetic field at the observation point is extracted;

[0038] Based on the magnetic field of the observation point, the well spacing is inverted and calculated to update the well spacing between the drilling well and the target well.

[0039] Secondly, embodiments of this application provide a device for predicting the magnetic field response of adjacent wells, comprising:

[0040] The acquisition module is used to acquire well site operating data;

[0041] The determination module is used to determine the shape factor of the end-insulated finite-length electrode based on the well site operating data;

[0042] The first module is used to establish an excitation model for an end-insulated finite-length electrode based on well site operating data.

[0043] The modulation module is used to modulate the excitation model according to the shape factor to obtain the drilling fluid modal source coefficients for drilling.

[0044] The second module is used to establish a four-layer hierarchical response model for the target well based on the well site operating data.

[0045] The calculation module is used to calculate the background electric potential and background electric field during drilling based on the drilling fluid modal source coefficients.

[0046] The module is used to predict the magnetic field response of the four-layer hierarchical response model of the target well based on the background electric potential and background electric field, and to obtain the active magnetic field strength and radial electric field profile of the target well.

[0047] In one possible embodiment, the first establishment module can also be used for:

[0048] Obtain the axial cosine mode basis; where the axial cosine mode basis refers to the orthogonal cosine function system of the end-insulated finite-length electrode;

[0049] An end-insulated finite-length electrode is used as a finite-length uniform line source and projected onto an axial cosine mode substrate to establish an excitation model for the end-insulated finite-length electrode.

[0050] In one possible embodiment, the second establishment module can also be used for:

[0051] Obtain the coordinate system data of the target well;

[0052] Based on the coordinate system data and well site operating data of the target well, a four-layer stratified response model of the target well is established; the four-layer stratified response model includes the in-casing fluid layer, the casing layer, the cement sheath layer, and the formation.

[0053] In one possible embodiment, the computing module can also be used for:

[0054] Obtain coordinate system data for ongoing drilling;

[0055] Based on well site operating data, a two-layer conductive medium model for ongoing drilling is established; the two-layer conductive medium model includes the drilling fluid layer and the formation.

[0056] Based on well site operating data and drilling fluid modal source coefficients, the expansion coefficients of the first-type modified Bessel function term of the drilling fluid layer and the expansion coefficients of the background potential of the formation are determined respectively.

[0057] The background potential of the drilling fluid layer is calculated based on the coordinate system data of the drilling process, the modal source coefficients of the drilling fluid, and the expansion coefficients of the first-type modified Bessel function term of the drilling fluid layer.

[0058] The background potential of the formation is calculated based on the coordinate system data and the expansion coefficient of the background potential of the formation.

[0059] The background electric field during drilling is calculated based on the background electric potential of the drilling fluid layer and the background electric potential of the formation.

[0060] In one possible embodiment, the module can also be used for:

[0061] Based on the background electric potential and background electric field, the target well is re-expanded along its axis to obtain the axisymmetric incident field of the target well.

[0062] Based on the axisymmetric incident field, the potential continuity condition and the normal current density continuity condition are applied to the interlayer interfaces of each layer in the four-layer layered response model to establish a linear equation set of potential expansion coefficients of the four-layer layered response model; among them, the interlayer interfaces of each layer include the interface between the casing fluid layer and the casing layer, the interface between the casing layer and the cement sheath layer, and the interface between the cement sheath layer and the formation.

[0063] Based on the linear equations, the potential expansion coefficients of the fluid layer inside the casing, the casing layer, the cement sheath layer, and the formation are obtained.

[0064] The axial current of the bushing is obtained by calculating the potential expansion coefficient of the bushing layer.

[0065] Based on the casing axial current, the magnetic field strength of the target well is calculated according to Ampere's law.

[0066] Based on the potential expansion coefficients of the fluid layer, casing layer, cement sheath layer, and formation, calculate the potentials of the fluid layer, casing layer, cement sheath layer, and formation, respectively.

[0067] Based on the potentials of the fluid layer inside the casing, the casing layer, the cement sheath layer, and the formation, the segmented potentials are obtained by radial segmentation.

[0068] Based on the segmented potential, the radial coordinates are differentiated to obtain the radial electric field profile of the target well.

[0069] After predicting the magnetic field response of the target well based on the background electric potential and background electric field, and obtaining the active magnetic field strength and radial electric field profile of the target well, the adjacent well magnetic field response prediction device also includes an inversion module. Specifically, the inversion module can be used for:

[0070] Based on the active magnetic field strength of the target well, the magnetic field at the observation point is extracted;

[0071] Based on the magnetic field of the observation point, the well spacing is inverted and calculated to update the well spacing between the drilling well and the target well.

[0072] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;

[0073] The memory stores the instructions that the computer executes;

[0074] The processor executes computer execution instructions stored in memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.

[0075] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.

[0076] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.

[0077] The adjacent well magnetic field response prediction method, apparatus, equipment, medium, and program products provided in this application acquire well site operating data; determine the shape factor of the end-insulated finite-length electrode based on the well site operating data; establish an excitation model of the end-insulated finite-length electrode based on the well site operating data; modally modulate the excitation model according to the shape factor to obtain the drilling fluid modal source coefficients for the drilling operation; establish a four-layer layered response model for the target well based on the well site operating data; calculate the background potential and background electric field of the drilling operation based on the drilling fluid modal source coefficients; and predict the magnetic field response of the four-layer layered response model of the target well based on the background potential and background electric field to obtain the active magnetic field strength and radial electric field profile of the target well. Compared with the prior art, the method of this application improves the calculation accuracy by establishing an excitation model of the end-insulated finite-length electrode and characterizing the modulation effect of the electrode length and end insulation boundary on the modal source terms based on the shape factor, replacing the traditional point electrode, thereby meeting the high-precision requirements for predicting the magnetic field response of adjacent wells under complex well conditions. Attached Figure Description

[0078] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0079] Figure 1 A schematic diagram of a scenario for predicting the magnetic field response of an adjacent well, provided in this application;

[0080] Figure 2 A flowchart illustrating a method for predicting the magnetic field response of adjacent wells provided in this application. Figure 1 ;

[0081] Figure 3 Comparison chart of analytical model results, experimental measurement results and numerical simulation results provided for this application;

[0082] Figure 4 Flowchart of the adjacent well magnetic field response prediction method provided in this application Figure 2 ;

[0083] Figure 5 A comparison chart of the adjacent well magnetic field response prediction method curves and numerical simulation results provided in this application;

[0084] Figure 6 A schematic diagram of the adjacent well magnetic field response prediction device provided in this application;

[0085] Figure 7 The present application provides a schematic diagram of the structure of the electronic device.

[0086] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0087] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0088] It should be noted that all data involved in this application are information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant laws, regulations and standards, and corresponding operation portals are provided for users to choose to authorize or refuse.

[0089] Complex-structure wells are key well types for developing difficult-to-access oil and gas resources. As oil and gas exploration and development advances into deeper, offshore, and unconventional areas, well structures become more complex and well-to-well distances become smaller, thus increasing the requirements for the precision of wellbore trajectory control. Therefore, accurately obtaining the relative distance and orientation between the drilling well and the target well has become a core engineering aspect, including directional drilling, wellbore collision prevention, rescue well docking, and re-entry of old wells.

[0090] For example, rescue well operations require precise proximity to and connection to the accident well; cluster wells and horizontal wells require efficient collision prevention; and the sealing of old wells and the construction of underground gas and hydrogen storage facilities also place stringent requirements on the distance measurement and positioning of adjacent wells.

[0091] In existing technologies, conventional wellbore location measurement involves segment-by-segment integration of well depth, inclination angle, and azimuth angle at multiple measuring points at different well depths to calculate the trajectory. However, errors typically accumulate with well depth, especially in deep wells, highly deviated wells, and wells with complex structures, where deviations are significantly amplified, making it difficult to meet the requirements for precise positioning. Existing technologies can also use an excitation source to generate an induced magnetic field in the casing of adjacent wells, directly measuring the relative position between wells to avoid accumulated errors.

[0092] However, the analytical models in the existing technology are usually derived based on Maxwell's equations under highly idealized conditions. To facilitate the solution, the downhole electrode is often approximated as a point electrode, or the target well casing is regarded as an ideal conductor with a uniform infinite length structure, and the surrounding formation is assumed to be a homogeneous and isotropic medium.

[0093] While the aforementioned ideal assumptions simplify the model derivation process, they differ significantly from actual downhole conditions. In practical engineering, downhole electrodes are finite in length, and insulating boundaries typically exist at both ends. The target well is generally surrounded by a multi-layered media structure consisting of casing fluid, casing, cement sheath, and formation, with significant differences in conductivity between each layer. Furthermore, the distance between wells is relatively small under actual conditions, making the effects of finite-length electrodes and the layered structure of the target well non-negligible. Therefore, existing analytical models often struggle to balance physical realism and computational accuracy under complex well conditions, easily leading to discrepancies between predicted results and actual responses.

[0094] In addition, although existing numerical simulation methods can handle complex geometric boundaries and non-uniform medium properties through the finite element method, finite difference method or other numerical discretization methods, they still face problems such as low computational efficiency, high modeling cost and difficulty in real-time application in engineering applications.

[0095] Specifically, before conducting high-precision electromagnetic field numerical simulations, it is necessary to establish a relatively detailed three-dimensional geometric model of the wellbore, casing, cement sheath, and formation, and perform high-quality mesh generation. This process not only involves a large amount of preprocessing work but also requires extensive modeling experience. At the same time, solving large-scale discrete equation systems requires significant storage resources and computing power, and complete high-precision simulations often require a long computation time, making it difficult to achieve rapid response and real-time decision-making in field operations.

[0096] Therefore, although numerical simulation methods have certain advantages in modeling complex working conditions, their applicability in field magnetically guided drilling operations is still greatly limited.

[0097] Therefore, existing technologies cannot balance computational efficiency and prediction accuracy.

[0098] To address the aforementioned issues, the core concept of this application lies in establishing an excitation model for a finite-length electrode with end insulation and a four-layer response model for the target well. This, combined with axial modal expansion and a modified Bessel function analytical method, enables high-precision and high-efficiency prediction of the magnetic field response of adjacent wells under complex well conditions. By breaking through the traditional point electrode assumption and homogeneous medium simplification, and introducing finite-length electrode geometric effects, end-insulated boundary conditions, and multi-layer medium coupling mechanisms, the prediction accuracy is significantly improved while retaining the high efficiency of the analytical model, thus resolving the contradiction between accuracy and efficiency in existing technologies.

[0099] Optionally, Figure 1 This is a schematic diagram illustrating a scenario for predicting the magnetic field response of an adjacent well, as provided in this application. Figure 1 As shown, in the adjacent well magnetic field response prediction scenario, both the drilling well and the target well are located in the formation medium. The drilling well on the left serves as the active excitation source well, and an end-insulated finite-length electrode (such as...) is suspended inside the wellbore. Figure 1 The downhole electrode in the well (with an axial length of Z) we In forward drilling, a coordinate system is established with the Z-axis (depth direction) and the ρ-axis (horizontal radial direction of forward drilling) as references to describe the electrode positions and magnetic field radiation range; forward drilling, from the inside out, consists of the drilling fluid (including the radial radius of the drilling fluid). and the electrical conductivity of drilling fluid ) and strata (including the radial radius R of the strata) e and the electrical conductivity of the formation The target well on the right, acting as a passive response well, was used to establish a coordinate system based on the Z-axis and r-axis (the horizontal radial direction of the target well); from the inside out, the coordinates represent the fluid inside the casing (including the radial radius r of the fluid inside the casing). tf and the conductivity of the fluid inside the casing ), casing (including the radial radius r of the casing) c and the conductivity of the bushing ), cement ring (including the radial radius r of the cement ring) tc and the conductivity of cement rings (and formation.) The well spacing between the drilling well and the target well is d, and the angle is... This represents the azimuth coordinates of the drilling operation, in degrees. The azimuth coordinates of the target well are indicated, and the arrow points to the direction of electromagnetic field propagation. In other words, during drilling, current is injected through downhole electrodes to generate an excitation magnetic field. This magnetic field penetrates the formation medium, inducing current in the multi-layered medium structure of the target well, thus producing the target well's active magnetic field response.

[0100] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the above architecture. In other feasible embodiments of this application, the above architecture may include more or fewer components than illustrated, or combine some components, or split some components, or arrange different components, which can be determined according to the actual application scenario and is not limited here.

[0101] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0102] Figure 2 A flowchart illustrating a method for predicting the magnetic field response of adjacent wells provided in this application. Figure 1 ,like Figure 2 As shown, the method includes:

[0103] S201. Obtain well site operating data.

[0104] In this embodiment, the well site operating data includes conductivity, boundary radius, well spacing, electrode injection current, voltage and frequency, axial length of the end-insulated finite-length electrode, and observation point location parameters; conductivity includes drilling fluid conductivity, formation conductivity, casing layer conductivity, casing fluid layer conductivity, and cement sheath conductivity; boundary radius includes the radial radius of the drilling fluid, the radial radius of the casing fluid, the radial radius of the casing, the radial radius of the cement sheath, and the radial radius of the formation.

[0105] For example, the end-insulated finite-length electrode is a flexible cable electrode used to excite the ground power supply device in the drilling background field to inject an alternating current ranging from 0 to 20A, provide an alternating voltage ranging from 0 to 1000V, and a frequency range of 0.5 to 5Hz into the end-insulated finite-length electrode.

[0106] Furthermore, the flexible cable electrode is easy to lower and deploy in deep wells, extended reach wells, horizontal wells, and complex well trajectories. It can better adapt to the bending path of the wellbore and help maintain the boundary stability between the effective electrode working section and the insulation section. This ensures the structural stability and controllability of the current injection boundary during the downhole process, thereby improving the consistency between the analytical model and the actual working conditions. The ground power supply device outputs a stable low-frequency AC signal with high power and low current frequency, forming a stable downhole active current excitation source. This improves the measurability of the weak magnetic field response and the stability of the numerical analysis, ensuring the reliability of the prediction of the magnetic field response of adjacent wells under complex well conditions.

[0107] S202. Based on the well site operating data, determine the shape factor of the end-insulated finite-length electrode.

[0108] In this embodiment, the shape factor of the end-insulated finite-length electrode is shown in the following formula:

[0109]

[0110] In the formula, y n S is a dimensionless independent variable representing the shape factor. ins (y n ) is the shape factor of an end-insulated finite-length electrode.

[0111] If end insulation boundary conditions exist, the shape factor of the end-insulated finite-length electrode is as follows:

[0112]

[0113] If the axial length l of the end-insulated finite-length electrode we When the value → 0, the end-insulated finite-length electrode model degenerates into a point electrode model. At this time, the shape factor of the end-insulated finite-length electrode is shown in the following formula:

[0114]

[0115] S203. Based on the well site operating data, establish an excitation model for an end-insulated finite-length electrode.

[0116] In one possible embodiment, based on well site operating data, an excitation model for an end-insulated finite-length electrode is established, including:

[0117] Obtain the axial cosine mode basis; where the axial cosine mode basis refers to the orthogonal cosine function system of the end-insulated finite-length electrode.

[0118] An end-insulated finite-length electrode is used as a finite-length uniform line source and projected onto an axial cosine mode substrate to establish an excitation model for the end-insulated finite-length electrode.

[0119] In this embodiment, the axial length l of the end-insulated finite-length electrode in the downhole operating data is obtained. we The axial position Z of the center of the end-insulated finite-length electrode in active drilling. we and electrode injection current I we .

[0120] Based on the axial length l of the end-insulated finite-length electrode we Construction with axial length l we A matching orthogonal cosine function system is used to obtain the corresponding axial cosine mode basis.

[0121] The terminally insulated finite-length electrode is equivalent to a finite-length uniform line source, combined with the electrode injection current I. we and axial position Z we The current distribution of the finite-length uniform line source is obtained; the current distribution of the finite-length uniform line source is projected onto the corresponding axial cosine mode substrate to establish the excitation model of the end-insulated finite-length electrode.

[0122] S204. Based on the shape factor, modal source terms are modulated on the excitation model to obtain the drilling fluid modal source coefficients for normal drilling.

[0123] In this embodiment, the drilling fluid conductivity is obtained from the downhole operating condition data. .

[0124] A form factor is introduced into the excitation model of the finite-length electrode with end insulation for modal source term modulation, in order to characterize the true excitation effect of the axial length and end insulation boundary of the finite-length electrode with end insulation.

[0125] Combining drilling fluid conductivity The modal source terms are normalized and their dimensions are calculated to obtain the nth-order modal source coefficients in the drilling fluid region during drilling. The calculation formulas for the modal source coefficients are as follows:

[0126]

[0127] In the formula, I is the nth-order modal source coefficient of the drilling fluid region during drilling. we Inject current into the electrode, l we Z is the axial length of the finite-length electrode with end insulation. e For axial length calculation, Z represents the conductivity of the drilling fluid during drilling. we This refers to the axial position of the center of the end-insulated finite-length electrode during drilling. Let n be the characteristic parameter of the nth axial mode, where n is the order of the axial mode.

[0128] By explicitly retaining the geometric length effect and end-insulated boundary conditions of the finite-length electrode with end insulation in the modal source term, the error caused by the oversimplification of the downhole electrode geometry by the traditional point electrode approximation is reduced, and the accuracy of the active magnetic response analysis of adjacent wells under small well spacing conditions is improved.

[0129] In one possible embodiment, in the excitation model of an end-insulated finite-length electrode, the axial mode expansion order is dynamically and adaptively adjusted by using an error threshold determination mechanism, combined with the convergence characteristics of the modified Bessel function and geometric constraints. The optimal order is selected based on the changes in well spacing, electrode length and formation parameters, thereby achieving a balance between computational accuracy and efficiency.

[0130] S205. Based on the well site operating data, establish a four-layer stratified response model for the target well.

[0131] In one possible embodiment, a four-layer stratified response model of the target well is established based on well site operating data, including:

[0132] Obtain the coordinate system data of the target well.

[0133] Based on the coordinate system data and well site operating data of the target well, a four-layer stratified response model of the target well is established; the four-layer stratified response model includes the in-casing fluid layer, the casing layer, the cement sheath layer, and the formation.

[0134] In this embodiment, "formation" refers to the formation region outside the target well and the drilling area, such as... Figure 1 As shown, in the coordinate system of the target well (r, Under the condition of (r, ϕ), with the target well axis as the origin, and based on the well site operating data, a four-layer coaxial medium model is established, consisting of the casing fluid layer, the casing layer, the cement sheath layer, and the formation, from the inside out; where r is the radial coordinate, ϕ is the azimuth coordinate, and z is the axial coordinate; the boundary radius between the casing fluid layer and the casing layer is r tf The boundary radius between the casing layer and the cement sheath layer is r. c The boundary radius between the cement annulus and the formation is r. tc The conductivity of the fluid layer inside the casing is The electrical conductivity of the casing layer is The electrical conductivity of the cement ring layer is The electrical conductivity of the formation is .

[0135] S206. Calculate the background electric potential and background electric field of the drilling process based on the drilling fluid modal source coefficients.

[0136] In this embodiment, based on the drilling fluid modal source coefficients, a potential function is constructed using the modified Bessel function, and the expansion coefficients of each modal potential are solved by the interface continuity condition between the drilling fluid and the formation, thereby calculating the positive drilling global background potential. Then, the corresponding background electric field is obtained from the negative potential gradient.

[0137] S207. Based on the background electric potential and background electric field, the magnetic field response of the four-layer layered response model of the target well is predicted to obtain the active magnetic field strength and radial electric field profile of the target well.

[0138] In this embodiment, background electric potential and background electric field are used to predict the magnetic field response of the four-layer hierarchical response model of the target well, and a quantitative relationship between electric potential, current and magnetic field is established, thereby improving the interpretability and engineering usability of the target well's active magnetic field response prediction; and further improving the accuracy of the magnetic field response prediction of adjacent wells.

[0139] Furthermore, after the alternating current is injected into the drilling fluid and surrounding formation through the end-insulated finite-length electrode, it diffuses and propagates within the formation, forming a converging and guiding channel at the target well casing. The current in the target well casing splits upwards and downwards at the current boundary point, generating a corresponding axial magnetic field response at the drilling observation location. This allows the downhole electrode excitation process, formation conduction process, casing flow process, and magnetic field response extraction process to be described within the same analytical framework. This provides a physical explanation for the influence of the target well casing flow effect, layered medium interface effect, and well spacing variation on the magnetic field response, offering a theoretical basis for model result interpretation, parameter sensitivity analysis, and engineering applications.

[0140] The adjacent well magnetic field response prediction method provided in this application is applicable to adjacent well magnetic ranging, target well positioning, and wellbore collision prevention analysis in complex well conditions such as rescue wells, cluster wells, horizontal wells, extended reach wells, and re-entry wells of old wells. It has a wide range of engineering applications and can perform active magnetic response analysis on adjacent wells under different well structures, formation medium parameters, and well spacing conditions, and has good engineering application value.

[0141] In one embodiment, after predicting the magnetic field response of the four-layered response model of the target well based on the background potential and background electric field to obtain the active magnetic field strength and radial electric field profile of the target well, the method further includes:

[0142] The magnetic field at the observation point is extracted based on the active magnetic field strength of the target well.

[0143] Based on the magnetic field of the observation point, the well spacing is inverted and calculated to update the well spacing between the drilling well and the target well.

[0144] In this embodiment, Figure 3 Comparison charts of analytical model results, experimental measurement results, and numerical simulation results provided for this application, such as... Figure 3 As shown, the analytical model results obtained by the method of this application have small errors with the experimental measurement results and numerical simulation results, effectively characterizing the influence of actual well spacing changes on active magnetic response. Therefore, the method of this application has good inversion reliability.

[0145] By updating the well spacing between the drilling well and the target well through inversion calculation, the predicted value of the relative distance between wells can be continuously corrected, making the well spacing result closer to the actual downhole working conditions. This provides dynamic and reliable distance data for real-time control of drilling trajectory, early warning of collision between adjacent wells, and precise docking of rescue wells, effectively improving trajectory control accuracy and operational safety, and avoiding collision risks or docking failures caused by well spacing deviations.

[0146] In one possible embodiment, a real-time feedback mechanism is introduced in the adjacent well magnetic field response prediction process. The axial magnetic field components of the drilling observation points are continuously collected and compared with the model prediction results. The input parameters such as the well spacing and formation conductivity of the four-layer model of the target well are dynamically corrected through the backpropagation algorithm to improve the real-time performance and accuracy of the prediction.

[0147] The adjacent well magnetic field response prediction method provided in this application decomposes the excitation effect of a finite-length electrode into multi-order modal source terms by introducing axial modal expansion, and explicitly preserves the influence of electrode geometric length and end insulation boundary by incorporating a shape factor. The shape factor, a dimensionless independent variable, describes the correlation between electrode length and modal order. When the electrode length approaches zero, it automatically degenerates into a point electrode model, ensuring the model's universality under different operating conditions. Based on the analytical solution of Maxwell's equations, the potential distribution is described by modifying the Bessel function, significantly improving the ability to characterize the excitation effect of a finite-length electrode under complex well conditions. Compared with traditional point electrode models, this method can accurately capture the modulation effect of electrode length and end insulation boundary on electric and magnetic field responses, thus avoiding prediction bias caused by oversimplification of the model. In scenarios with small well spacing or where electrode length cannot be ignored, explicit modeling of geometric effects significantly improves the physical realism and engineering applicability of adjacent well magnetic field response prediction.

[0148] Figure 4 Flowchart of the adjacent well magnetic field response prediction method provided in this application Figure 2 ,like Figure 4 As shown, in this embodiment... Figure 2 Based on the examples, the method for predicting the magnetic field response of adjacent wells is described in detail. This method includes:

[0149] S401. Obtain coordinate system data for ongoing drilling.

[0150] In this embodiment, in the coordinate system of active drilling ( , In z), Radial coordinates, θ is the azimuth coordinate, and z is the axial coordinate.

[0151] S402. Based on the well site operating data, establish a two-layer conductive medium model for the ongoing drilling; the two-layer conductive medium model includes the drilling fluid layer and the formation.

[0152] In this embodiment, the following is established: Figure 1 The model shown is a two-layer conductive medium model of a drilling operation, including the drilling fluid layer and the formation.

[0153] S404. Based on the well site operating data and drilling fluid modal source coefficients, determine the expansion coefficients of the first-type modified Bessel function term of the drilling fluid layer and the expansion coefficients of the background potential of the formation.

[0154] In this embodiment, the radial radius is set as follows: Equal to the radial radius of the drilling fluid layer At the contact surface between the drilling fluid layer and the formation, if the conditions for continuity of electric potential and continuity of normal current density are satisfied, the expansion coefficients of the first-kind modified Bessel function term of the drilling fluid layer are as follows:

[0155]

[0156] In the formula, k represents the expansion coefficient of the first-order modified Bessel function term in the drilling fluid region. n Let I0(⋅) and I1(⋅) be the nth order radial characteristic parameters, respectively, and let K0(⋅) and K1(⋅) be the first-order and zeroth-order and first-order modified Bessel functions of the first kind, respectively; other parameters are as shown above.

[0157] The expansion coefficient of the background electric potential of the strata is shown in the following formula:

[0158]

[0159] In the formula, is the nth order expansion coefficient of the background potential of the stratigraphic region, and other parameters are as shown above.

[0160] S404. Calculate the background potential of the drilling fluid layer based on the coordinate system data of the drilling operation, the modal source coefficients of the drilling fluid, and the expansion coefficients of the first-type modified Bessel function term of the drilling fluid layer.

[0161] In this embodiment, since the electrodes are arranged along the well axis and the medium is distributed in a coaxial cylindrical shape, the excitation and field distribution are symmetrical about the well axis, and the field quantity does not change along the azimuth angle. Therefore, only the circumferential m=0 mode is retained, and the potential function does not explicitly contain the azimuth angle φ.

[0162] The formula for calculating the background potential of the drilling fluid layer is as follows:

[0163]

[0164] In the formula, is the background potential of the drilling fluid layer, and m is the circumferential mode order; other parameters are the same as above.

[0165] S405. Calculate the background potential of the formation based on the coordinate system data and the expansion coefficient of the background potential of the formation.

[0166] In this embodiment, the formula for calculating the background potential of the formation is as follows:

[0167]

[0168] In the formula, This represents the background potential of the formation; other parameters are as shown above.

[0169] S406. Calculate the background electric field during drilling based on the background electric potential of the drilling fluid layer and the background electric potential of the formation.

[0170] In this embodiment, based on the background potential of the drilling fluid layer and the background potential of the formation, under axisymmetric conditions, the radial and axial derivatives of the background potentials of the drilling fluid layer and the formation are respectively taken as negative to obtain the radial and axial components of the background electric field of each layer. Then, the background electric field of positive drilling is obtained by segmenting and splicing the radial regions.

[0171] By accurately describing the spatial distribution of background potential and electric field around the wellbore under downhole electrode excitation, a stable boundary input is provided for the extraction of the incident field of the target well and the analysis of the layered scattering response.

[0172] Furthermore, by using the analytical model of the background field in active drilling, the background potential and background electric field distribution under different drilling fluid medium parameters and different formation electrical parameters can be calculated. This allows for the analysis of the electric field variation characteristics at the interface between the drilling fluid and the formation, as well as the incident intensity of the background field at the target well location. This enhances the model's adaptability to complex lithology and diverse drilling fluid conditions, broadens the applicable scenarios for predicting the active magnetic response of adjacent wells, and strengthens the practicality and flexibility of the technology.

[0173] S407. Based on the background potential and background electric field, perform re-expansion processing at the axis of the target well to obtain the axisymmetric incident field of the target well.

[0174] In this embodiment, the formula for calculating the axisymmetric incident field of the target well is as follows:

[0175]

[0176]

[0177] In the formula, For the axisymmetric incident field in the target well coordinate system, represents the nth-order mode expansion coefficient of the incident field of the strata in the four-layered response model; other parameters are as shown above.

[0178] S408. Based on the axisymmetric incident field, apply the potential continuity condition and the normal current density continuity condition to the interlayer interfaces of each layer in the four-layer layered response model to establish a linear equation set of potential expansion coefficients of the four-layer layered response model; wherein, the interlayer interfaces of each layer include the interface connecting the fluid layer inside the casing and the casing layer, the interface connecting the casing layer and the cement sheath layer, and the interface connecting the cement sheath layer and the formation.

[0179] Furthermore, the potential functions of each layer in the four-layer coaxial dielectric model are as follows:

[0180]

[0181] In the formula, the superscripts tf, c, tc, and e represent the fluid layer inside the casing, the casing layer, the cement sheath layer, and the formation, respectively. Let be the potential function of the fluid layer inside the casing. Let be the potential function of the casing layer. Let be the potential function of the cement ring layer. The potential function of the formation, The undetermined expansion coefficients of the first-type modified Bessel function term within the fluid layer inside the casing. The undetermined expansion coefficients of the first-type modified Bessel function term within the casing layer. , where are the undetermined expansion coefficients of the first-type modified Bessel function terms within the cement sheath, and represent the internal solution coefficients in the fluid layer, casing layer, and cement sheath, respectively; The undetermined expansion coefficients of the second-type modified Bessel function term within the casing layer. The undetermined expansion coefficients of the modified Bessel function term of the second kind within the cement annulus are given. The undetermined expansion coefficients of the second-type modified Bessel function term within the formation are denoted as the external solution or scattering solution coefficients in the casing layer, cement sheath layer, and external formation, respectively. Other parameters are as shown above.

[0182] By analyzing the scattering effect of the layered medium around the target well and the flow channel effect of the casing, the problem of insufficient consideration of the layered structure of the target well in the existing model is made up for, and the accuracy of predicting the potential, electric field and casing current response around the target well under complex well conditions is improved.

[0183] In this embodiment, at the interfaces connecting the fluid layer inside the casing and the casing layer, the interface connecting the casing layer and the cement sheath layer, and the interface connecting the cement sheath layer and the formation, potential continuity conditions and normal current density continuity conditions are applied to establish a set of linear equations satisfied by the potential expansion coefficients of the four-layer coaxial dielectric model. The set of linear equations is as follows:

[0184]

[0185]

[0186]

[0187]

[0188] In the formula, M n Let x be the coefficient matrix corresponding to the nth mode. n Let b be the coefficient vector of the nth mode potential expansion. n Let T be the right-hand vector of the nth mode, and let T denote the transpose; other parameters are as shown above.

[0189] S409. Solve the linear equations to obtain the potential expansion coefficients of the fluid layer inside the casing, the casing layer, the cement sheath layer, and the formation.

[0190] In this embodiment, the potential expansion coefficients include the undetermined expansion coefficients of the first-type modified Bessel function terms within the casing fluid layer, the undetermined expansion coefficients of the first-type modified Bessel function terms within the casing layer, the undetermined expansion coefficients of the first-type modified Bessel function terms within the cement sheath layer, the undetermined expansion coefficients of the second-type modified Bessel function terms within the casing layer, the undetermined expansion coefficients of the second-type modified Bessel function terms within the cement sheath layer, and the undetermined expansion coefficients of the second-type modified Bessel function terms within the formation.

[0191] The potential expansion coefficients can be calculated using the following formula:

[0192]

[0193] The method in this application improves the systematicity and computational stability of the model solution process by transforming the target well's layered scattering response into a standard matrix problem, thus facilitating rapid analysis and widespread application under multi-parameter conditions.

[0194] In one possible embodiment, when solving a system of linear equations, a parallel computing framework that accelerates and distributes computation using GPU (Graphics Processing Unit) can be introduced to decompose the submatrices corresponding to each mode into independent tasks for parallel solution, thereby shortening the overall computation time.

[0195] S410. Based on the potential expansion coefficient of the bushing layer, the axial current is calculated to obtain the bushing axial current.

[0196] In this embodiment, the axial current density of the casing layer is calculated based on the potential function of the casing layer in the target well, and the casing axial current is further obtained.

[0197] S411. Based on the casing axial current, the magnetic field is calculated according to Ampere's law to obtain the active magnetic field strength of the target well.

[0198] In this embodiment, the active magnetic field strength of the target well at the active drilling observation location is calculated according to Ampere's law; wherein, the active magnetic field strength of the target well is given by the following formula:

[0199] In the formula, H R,z (z) represents the active magnetic field strength of the target well at the location of the drilling observation, R z This represents the radial distance from the observation point to the axial current channel of the target well casing; other parameters are as shown above.

[0200] S412. Calculate the potentials of the fluid layer, casing layer, cement sheath layer, and formation respectively, based on the potential expansion coefficients of the fluid layer, casing layer, cement sheath layer, and formation.

[0201] In this embodiment, the potential expansion coefficients of the fluid layer inside the casing, the casing layer, the cement sheath layer, and the formation are substituted into the potential functions of each layer in the four-layer coaxial medium model to calculate the potentials corresponding to the fluid layer inside the casing, the casing layer, the cement sheath layer, and the formation.

[0202] S414. Based on the potentials of the fluid layer, casing layer, cement sheath layer, and formation within the casing, the segmented potentials are obtained by radial segmentation.

[0203] S414. Based on the segmented potential, perform radial coordinate differentiation to obtain the radial electric field profile of the target well.

[0204] In this embodiment, the radial electric field profile of the target well is used to characterize the effects of layered medium interface effects, casing conductivity effects, and well spacing variations on response characteristics.

[0205] The method in this application enhances the characterization capabilities of magnetic ranging response of adjacent wells, target well location, and wellbore collision prevention analysis by calculating the active magnetic field strength of the target well at the drilling observation location and the radial electric field distribution around the target well.

[0206] The adjacent well magnetic field response prediction method provided in this application accurately characterizes the coupling mechanism of the scattering effect of the layered medium around the target well and the casing conductivity effect through a four-layer coaxial medium model including the fluid inside the casing, the casing, the cement sheath, and the formation. Compared with homogeneous medium models, the four-layer coaxial medium model of this application can accurately reflect the abrupt change in electric field at the layered interface, the scattering effect, and the modulation effect of current by casing conductivity, significantly improving the prediction accuracy of magnetic field and electric field responses under complex conditions such as small well spacing and multi-layered media, providing reliable support for adjacent well location, collision prevention, and rapid on-site decision-making. By expanding the potential function with a modified Bessel function and combining the conditions of potential continuity and normal current density continuity, a linear equation system is constructed to ensure that the potential and current distribution of each layer of medium meets strict physical constraints. Based on the analytical solution of Maxwell's equations, the modified Bessel function and axial modal expansion are introduced to transform the complex multi-layered medium problem into a linear combination of basis functions, eliminating the dependence on high-precision grids, reducing computational complexity, and significantly improving computational efficiency. Compared with traditional numerical methods, the method of this application balances accuracy and efficiency, and can efficiently complete real-time calculations.

[0207] Furthermore, Figure 5 A comparison chart of the adjacent well magnetic field response prediction method curve and numerical simulation results provided in this application is shown below. Figure 5 As shown, the error between the magnetic field response curve or electric field profile curve and the numerical simulation results is small, indicating that the end-insulated finite-length electrode excitation model and the target well four-layer layered response model established in this application have good accuracy.

[0208] Figure 6 This is a schematic diagram of the adjacent well magnetic field response prediction device provided in this application, as shown below. Figure 6 As shown, the adjacent well magnetic field response prediction device provided in this embodiment includes:

[0209] The acquisition module 601 is used to acquire well site operating condition data.

[0210] The determination module 602 is used to determine the shape factor of the end-insulated finite-length electrode based on the well site operating data.

[0211] The first module 603 is used to establish an excitation model for an end-insulated finite-length electrode based on well site operating data.

[0212] The modulation module 604 is used to modulate the excitation model according to the shape factor to obtain the drilling fluid modal source coefficients for drilling.

[0213] The second module 605 is used to establish a four-layer hierarchical response model of the target well based on the well site operating data.

[0214] The calculation module 606 is used to calculate the background electric potential and background electric field of the drilling process based on the drilling fluid modal source coefficients.

[0215] Module 607 is obtained, which is used to predict the magnetic field response of the four-layer hierarchical response model of the target well based on the background electric potential and background electric field, and obtain the active magnetic field strength and radial electric field profile of the target well.

[0216] In one possible embodiment, the first establishment module 603 can also be used for:

[0217] Obtain the axial cosine mode basis; where the axial cosine mode basis refers to the orthogonal cosine function system of the end-insulated finite-length electrode;

[0218] An end-insulated finite-length electrode is used as a finite-length uniform line source and projected onto an axial cosine mode substrate to establish an excitation model for the end-insulated finite-length electrode.

[0219] In one possible embodiment, the second establishment module 605 can also be used for:

[0220] Obtain the coordinate system data of the target well;

[0221] Based on the coordinate system data and well site operating data of the target well, a four-layer stratified response model of the target well is established; the four-layer stratified response model includes the in-casing fluid layer, the casing layer, the cement sheath layer, and the formation.

[0222] In one possible embodiment, the computing module 606 can also be used for:

[0223] Obtain coordinate system data for ongoing drilling;

[0224] Based on well site operating data, a two-layer conductive medium model for ongoing drilling is established; the two-layer conductive medium model includes the drilling fluid layer and the formation.

[0225] Based on well site operating data and drilling fluid modal source coefficients, the expansion coefficients of the first-type modified Bessel function term of the drilling fluid layer and the expansion coefficients of the background potential of the formation are determined respectively.

[0226] The background potential of the drilling fluid layer is calculated based on the coordinate system data of the drilling process, the modal source coefficients of the drilling fluid, and the expansion coefficients of the first-type modified Bessel function term of the drilling fluid layer.

[0227] The background potential of the formation is calculated based on the coordinate system data and the expansion coefficient of the background potential of the formation.

[0228] The background electric field during drilling is calculated based on the background electric potential of the drilling fluid layer and the background electric potential of the formation.

[0229] In one possible embodiment, module 607 can also be used for:

[0230] Based on the background electric potential and background electric field, the target well is re-expanded along its axis to obtain the axisymmetric incident field of the target well.

[0231] Based on the axisymmetric incident field, the potential continuity condition and the normal current density continuity condition are applied to the interlayer interfaces of each layer in the four-layer layered response model to establish a linear equation set of potential expansion coefficients of the four-layer layered response model; among them, the interlayer interfaces of each layer include the interface between the casing fluid layer and the casing layer, the interface between the casing layer and the cement sheath layer, and the interface between the cement sheath layer and the formation.

[0232] Based on the linear equations, the potential expansion coefficients of the fluid layer inside the casing, the casing layer, the cement sheath layer, and the formation are obtained.

[0233] The axial current of the bushing is obtained by calculating the potential expansion coefficient of the bushing layer.

[0234] Based on the casing axial current, the magnetic field strength of the target well is calculated according to Ampere's law.

[0235] Based on the potential expansion coefficients of the fluid layer, casing layer, cement sheath layer, and formation, calculate the potentials of the fluid layer, casing layer, cement sheath layer, and formation, respectively.

[0236] Based on the potentials of the fluid layer inside the casing, the casing layer, the cement sheath layer, and the formation, the segmented potentials are obtained by radial segmentation.

[0237] Based on the segmented potential, the radial coordinates are differentiated to obtain the radial electric field profile of the target well.

[0238] After predicting the magnetic field response of the target well based on the background electric potential and background electric field, and obtaining the active magnetic field strength and radial electric field profile of the target well, the adjacent well magnetic field response prediction device also includes an inversion module. Specifically, the inversion module can be used for:

[0239] Based on the active magnetic field strength of the target well, the magnetic field at the observation point is extracted;

[0240] Based on the magnetic field of the observation point, the well spacing is inverted and calculated to update the well spacing between the drilling well and the target well.

[0241] The adjacent well magnetic field response prediction device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0242] Figure 7 A schematic diagram of the structure of the electronic device provided in this application. Figure 7As shown, the electronic device provided in this embodiment includes at least one processor 701 and a memory 702. Optionally, the electronic device further includes a communication component 703. The processor 701, memory 702, and communication component 703 are connected via a bus 704.

[0243] In a specific implementation, at least one processor 701 executes computer execution instructions stored in memory 702, causing at least one processor 701 to perform the above-described method.

[0244] The specific implementation process of processor 701 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0245] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0246] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0247] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0248] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0249] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0250] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0251] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0252] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0253] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0254] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0255] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0256] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0257] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A method for predicting the magnetic field response of adjacent wells, characterized in that, include: Acquire well site operating data; Based on the well site operating data, determine the shape factor of the end-insulated finite-length electrode; Based on the well site operating data, an excitation model for the end-insulated finite-length electrode is established. Based on the shape factor, modal source terms are modulated on the excitation model to obtain the drilling fluid modal source coefficients for active drilling; Based on the well site operating data, a four-layer stratified response model for the target well is established; Based on the drilling fluid modal source coefficients, calculate the background electric potential and background electric field of the positive drilling. Based on the background potential and the background electric field, the magnetic field response of the four-layer stratified response model of the target well is predicted to obtain the active magnetic field strength and radial electric field profile of the target well.

2. The method according to claim 1, characterized in that, The step of establishing the excitation model of the end-insulated finite-length electrode based on the well site operating data includes: Obtain the axial cosine mode basis; wherein, the axial cosine mode basis refers to the orthogonal cosine function system of the end-insulated finite-length electrode; The end-insulated finite-length electrode is used as a finite-length uniform line source and projected onto the axial cosine mode substrate to establish the excitation model of the end-insulated finite-length electrode.

3. The method according to claim 1, characterized in that, The step of establishing a four-layer stratified response model for the target well based on the well site operating data includes: Obtain the coordinate system data of the target well; Based on the coordinate system data of the target well and the well site operating data, a four-layer stratified response model of the target well is established; wherein, the four-layer stratified response model includes the casing fluid layer, the casing layer, the cement sheath layer, and the formation.

4. The method according to claim 1, characterized in that, The step of calculating the background electric potential and background electric field of the active drilling based on the drilling fluid modal source coefficients includes: Obtain the coordinate system data of the drilling operation; Based on the well site operating data, a two-layer conductive medium model for the active drilling is established; wherein, the two-layer conductive medium model includes the drilling fluid layer and the formation; Based on the well site operating data and the drilling fluid modal source coefficients, the expansion coefficients of the first type of modified Bessel function term of the drilling fluid layer and the expansion coefficients of the background potential of the formation are determined respectively. The background potential of the drilling fluid layer is calculated based on the coordinate system data of the drilling operation, the modal source coefficients of the drilling fluid, and the expansion coefficients of the first-type modified Bessel function terms of the drilling fluid layer. The background potential of the formation is calculated based on the coordinate system data and the expansion coefficient of the background potential of the formation. The background electric field of the drilling operation is calculated based on the background electric potential of the drilling fluid layer and the background electric potential of the formation.

5. The method according to claim 3, characterized in that, The step of predicting the magnetic field response of the four-layer stratified response model of the target well based on the background potential and the background electric field to obtain the active magnetic field strength and radial electric field profile of the target well includes: Based on the background potential and the background electric field, a re-expansion process is performed at the axis of the target well to obtain the axisymmetric incident field of the target well; Based on the axisymmetric incident field, potential continuity conditions and normal current density continuity conditions are applied to the interlayer interfaces of each layer in the four-layer layered response model to establish a linear equation set of potential expansion coefficients of the four-layer layered response model; wherein, the interlayer interfaces of each layer include the interface connecting the inner fluid layer and the casing layer, the interface connecting the casing layer and the cement sheath layer, and the interface connecting the cement sheath layer and the formation; The linear equations are solved to obtain the potential expansion coefficients of the fluid layer inside the casing, the casing layer, the cement sheath layer, and the formation. Based on the potential expansion coefficient of the sleeve layer, the axial current is calculated to obtain the sleeve axial current; Based on the casing axial current, the magnetic field strength of the target well is calculated according to Ampere's law. Based on the potential expansion coefficients of the fluid layer inside the casing, the casing layer, the cement sheath layer, and the formation, the potentials of the fluid layer inside the casing, the casing layer, the cement sheath layer, and the formation are calculated respectively. Based on the potentials of the fluid layer inside the casing, the casing layer, the cement sheath layer, and the formation, segmented potentials are obtained by radial segmentation; Based on the segmented potential, the radial coordinates are differentiated to obtain the radial electric field profile of the target well.

6. The method according to claim 1, characterized in that, After predicting the magnetic field response of the four-layer stratified response model of the target well based on the background potential and the background electric field to obtain the active magnetic field strength and radial electric field profile of the target well, the method further includes: Based on the active magnetic field strength of the target well, the magnetic field of the observation point is extracted; Based on the magnetic field of the observation point, the well spacing is inverted and calculated to update the well spacing between the drilling well and the target well.

7. A device for predicting the magnetic field response of adjacent wells, characterized in that, include: The acquisition module is used to acquire well site operating condition data; The determination module is used to determine the shape factor of the end-insulated finite-length electrode based on the well site operating data; The first module is used to establish the excitation model of the end-insulated finite-length electrode based on the well site operating data. The modulation module is used to modulate the excitation model according to the shape factor to obtain the drilling fluid modal source coefficients for drilling. The second module is used to establish a four-layer hierarchical response model of the target well based on the well site operating data. The calculation module is used to calculate the background electric potential and background electric field of the positive drilling based on the drilling fluid modal source coefficients. The module is used to predict the magnetic field response of the four-layer hierarchical response model of the target well based on the background potential and the background electric field, and to obtain the active magnetic field strength and radial electric field profile of the target well.

8. An electronic device, characterized in that, include: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 6.

10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 6.