Disclosure of Invention
The invention provides a method, a device, equipment and a medium for calculating the magnetic field gradient tensor in a two-dimensional well, which can be suitable for fast and high-precision calculation of the magnetic field gradient tensor in the two-dimensional well with any section shape and any magnetic susceptibility distribution.
In order to achieve the technical purpose, the technical scheme provided by the invention is as follows:
in one aspect, the present invention provides a method for calculating a magnetic field gradient tensor in a two-dimensional well, comprising:
determining a target area, and constructing a rectangular model internally containing the target area; mesh subdivision is carried out on the rectangular model, the rectangular model is subdivided into a plurality of small rectangular units, and the magnetic susceptibility of each small rectangular unit is assigned;
given the coordinates of observation points in the well, the horizontal coordinate of each observation point is x0Vertical coordinate z of each observation pointnN is 1,2, and N is the number of observation points in the well;
calculating the in-well magnetic field gradient tensor generated by each line of small rectangular units at the in-well observation point by adopting a one-dimensional discrete convolution method;
and obtaining the magnetic field gradient tensor in the well generated by the whole rectangular model at the observation point in the well based on the magnetic field gradient tensor in the well generated by each line of small rectangular units at the observation point in the well.
Furthermore, the magnetic susceptibility of each small rectangular unit in the target area is a constant value, the magnetic susceptibility of different small rectangular units has different values, so that a second-degree body with any section shape and any magnetic susceptibility distribution is drawn at the moment, the magnetic susceptibility of the small rectangular units positioned in the air part is set to be zero, and the undulating terrain is drawn at the moment.
Further, the small rectangular units in the p-th column are observed at the well (x)
0,z
n) The resulting in-well magnetic field gradient tensor comprises 4 components, respectively
And
the calculation formulas are respectively as follows:
wherein p is 1,2, 1, M, M is the subdivision number of the rectangular model x direction small cuboid unit, r is 1,2, L, L is the subdivision number of the rectangular model z direction small cuboid unit, Mx(ξp,ζr) And mz(ξp,ζr) Respectively represents the coordinate position of the central point as (xi)p,ζr) The x-component and z-component of the magnetization of the small cuboid cell; h is1(x0-ξp,zn-ζr)、h2(x0-ξp,zn-ζr) Respectively, represent weighting coefficients.
Further, mx(ξp,ζr) And mz(ξp,ζr) Calculated by the following steps:
according to the IGRF model of the main earth magnetic field, the coordinate position of the center point is calculated to be (xi)p,ζr) Of a small cuboid unit of the earth's main magnetic fieldx(ξp,ζr) And z component Tz(ξp,ζr);
According to the coordinate position of the central point as (xi)p,ζr) Magnetic susceptibility k (xi) of small rectangular unitp,ζr) Calculating the coordinate position of the central point as (xi)p,ζr) X component m of the magnetization of the small cuboid cellx(ξp,ζr) And z component mz(ξp,ζr):
mx(ξp,ζr)=κ(ξp,ζr)·Tx(ξp,ζr)
mz(ξp,ζr)=κ(ξp,ζr)·Tz(ξp,ζr)
Further, a weighting factor h1(x0-ξp,zn-ζr)、h2(x0-ξp,zn-ζr) The calculation method comprises the following steps:
wherein mu0Represents the vacuum permeability; x1=ξp-0.5Δx-x0;X2=ξp+0.5Δx-x0;Z1=ζr-0.5Δz-zn;Z2=ζr+0.5Δz-zn(ii) a Δ x and Δ z represent the side lengths of the small rectangular solid cell in the x direction and the z direction, respectively.
Further, observing points (x) of each column of small rectangular units in the rectangular model in the well0,zn) Respectively accumulating the tensor components of the magnetic field gradient in the well to obtain the observation point (x) of the whole rectangular model in the well0,zn) The resulting magnetic field gradient tensor in the well, i.e.
In another aspect, the present invention provides an apparatus for calculating a magnetic field gradient tensor in a two-dimensional well, comprising:
the system comprises a first module, a second module and a third module, wherein the first module is used for determining a target area and constructing a rectangular model internally containing the target area; mesh subdivision is carried out on the rectangular model, the rectangular model is subdivided into a plurality of small rectangular units, and the magnetic susceptibility of each small rectangular unit is assigned;
a second module for giving coordinates of observation points in the well, each observation point having a horizontal coordinate of x0Vertical coordinate z of each observation pointnN is 1,2, and N is the number of observation points in the well;
the third module is used for calculating the in-well magnetic field gradient tensor generated by each line of small rectangular units at the in-well observation point by adopting a one-dimensional discrete convolution method;
and the fourth module is used for obtaining the magnetic field gradient tensor in the well, which is generated by the whole rectangular model at the observation point in the well, based on the magnetic field gradient tensor in the well, which is generated by each row of small rectangular units at the observation point in the well.
In another aspect, the present invention provides a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
determining a target area, and constructing a rectangular model internally containing the target area; mesh subdivision is carried out on the rectangular model, the rectangular model is subdivided into a plurality of small rectangular units, and the magnetic susceptibility of each small rectangular unit is assigned;
given the coordinates of observation points in the well, the horizontal coordinate of each observation point is x0Vertical coordinate z of each observation pointnN is 1,2, and N is the number of observation points in the well;
calculating the in-well magnetic field gradient tensor generated by each line of small rectangular units at the in-well observation point by adopting a one-dimensional discrete convolution method;
and obtaining the magnetic field gradient tensor in the well generated by the whole rectangular model at the observation point in the well based on the magnetic field gradient tensor in the well generated by each line of small rectangular units at the observation point in the well.
In yet another aspect, the present invention also provides a computer readable storage medium having a computer program stored thereon, the computer program when executed by a processor implementing the steps of:
determining a target area, and constructing a rectangular model internally containing the target area; mesh subdivision is carried out on the rectangular model, the rectangular model is subdivided into a plurality of small rectangular units, and the magnetic susceptibility of each small rectangular unit is assigned;
given the coordinates of observation points in the well, the horizontal coordinate of each observation point is x0Vertical coordinate z of each observation pointnN is 1,2, and N is the number of observation points in the well;
calculating the in-well magnetic field gradient tensor generated by each line of small rectangular units at the in-well observation point by adopting a one-dimensional discrete convolution method;
and obtaining the magnetic field gradient tensor in the well generated by the whole rectangular model at the observation point in the well based on the magnetic field gradient tensor in the well generated by each line of small rectangular units at the observation point in the well.
The invention is an organic whole, a rectangular model containing the target area inside is constructed, a one-dimensional discrete convolution method is adopted to calculate the magnetic field gradient tensor in the well generated by each line of small rectangular units at the well observation point, and the magnetic field gradient tensor components in the well generated by each line of small rectangular units at the well observation point in the rectangular model are respectively accumulated to obtain the magnetic field gradient tensor in the well generated by the whole rectangular model at the well observation point. A special magnetic field gradient tensor weighting coefficient calculation method is provided, and a one-dimensional discrete convolution fast calculation method is combined, so that the unification of the magnetic field gradient tensor in the two-dimensional well in the calculation precision and the calculation efficiency is realized.
Compared with the prior art, the invention has the advantages that:
(1) the proposed rectangular model representation method is simple and flexible, and can easily depict any section shape, any susceptibility distribution complex two-dimensional body and undulating terrain;
(2) the method can realize the rapid and high-precision calculation of the magnetic field gradient tensor in the complex two-dimensional well under the conditions of any section shape, any magnetic susceptibility distribution and any well logging point distribution, and can meet the requirements of large-scale ground-well magnetic field data joint inversion, man-machine interaction modeling and interpretation;
(3) when the method is used for large-scale calculation, the calculation efficiency and the calculation precision are high, and the required computer memory is small.
Detailed Description
For the purpose of promoting a clear understanding of the objects, aspects and advantages of the embodiments of the invention, reference will now be made to the drawings and detailed description, wherein there are shown in the drawings and described below specific embodiments of the invention, in which modifications and variations can be made by one skilled in the art without departing from the spirit and scope of the invention. The exemplary embodiments of the present invention and the description thereof are provided to explain the present invention and not to limit the present invention.
Referring to fig. 1, in an embodiment of the present invention, a method for calculating a magnetic field gradient tensor in a two-dimensional well is provided, including:
(S1) a complex two-dimensional model representation:
given borehole observation point coordinates (x)0,zn) Observation pointHas a horizontal coordinate of x0Vertical coordinate z of each observation pointnN is 1,2, and N is the number of observation points in the well.
Determining a target area, and constructing a rectangular model internally containing the target area. The starting position of the rectangular model in the x, z direction is determined such that the target area (containing the relief) is completely embedded in the rectangular model.
According to the actual problem requirement, grid division is carried out on the rectangular model, the rectangular model is uniformly divided into a plurality of regular small rectangular units (as shown in fig. 2), and the geometric sizes delta x and delta z of the small rectangular units are determined, wherein the delta x and delta z respectively represent the side lengths of the small rectangular units in the x direction and the z direction.
And (3) assigning the magnetic susceptibility of each small rectangular unit according to the magnetic susceptibility distribution of the target area, wherein the magnetic susceptibility of each small rectangular unit in the target area is a constant value, the magnetic susceptibility of different small rectangular units is different in value, so that a binary body with any section shape and any magnetic susceptibility distribution is drawn at the moment, the magnetic susceptibility of the small rectangular units positioned in the air part is set to be zero, and the undulating terrain is drawn at the moment.
At this point, the complex two-dimensional model representation is completed.
(S2) calculation of magnetization:
according to the IGRF model of the main earth magnetic field, the coordinate position of the center point is calculated to be (xi)p,ζr) Of a small cuboid unit of the earth's main magnetic fieldx(ξp,ζr) And z component Tz(ξp,ζr);
According to the coordinate position of the central point as (xi)p,ζr) Magnetic susceptibility k (xi) of small rectangular unitp,ζr) Calculating the coordinate position of the central point as (xi)p,ζr) X component m of the magnetization of the small cuboid cellx(ξp,ζr) And z component mz(ξp,ζr):
mx(ξp,ζr)=κ(ξp,ζr)·Tx(ξp,ζr)
mz(ξp,ζr)=κ(ξp,ζr)·Tz(ξp,ζr)
(S3) weighting coefficient calculation:
weighting factor h1(x0-ξp,zn-ζr)、h2(x0-ξp,zn-ζr) The calculation method comprises the following steps:
wherein mu0Represents the vacuum permeability; x1=ξp-0.5Δx-x0;X2=ξp+0.5Δx-x0;Z1=ζr-0.5Δz-zn;Z2=ζr+0.5Δz-zn(ii) a Δ x and Δ z represent the side lengths of the small rectangular solid cell in the x direction and the z direction, respectively.
(S4) one-dimensional discrete convolution calculation:
and calculating the in-well magnetic field gradient tensor generated by each row of small rectangular units at the in-well observation point by adopting a one-dimensional discrete convolution method.
Observation point (x) of the p-th column of small rectangular units in the well
0,z
n) The resulting in-well magnetic field gradient tensor comprises 4 components, respectively
And
based on the following calculation formula, respectively calculating each component of the magnetic field gradient tensor in the well generated by each row of small rectangular units at the observation point in the well by adopting a one-dimensional discrete convolution method:
wherein p is 1,2, 1, M, M is the subdivision number of the rectangular model x direction small cuboid unit, r is 1,2, L, L is the subdivision number of the rectangular model z direction small cuboid unit, Mx(ξp,ζr) And mz(ξp,ζr) Respectively represents the coordinate position of the central point as (xi)p,ζr) The x-component and z-component of the magnetization of the small cuboid cell; h is1(x0-ξp,zn-ζr)、h2(x0-ξp,zn-ζr) Respectively, represent weighting coefficients.
(S5) magnetic field gradient tensor value synthesis:
observing the small rectangular units in each column in the rectangular model at the well observation point (x)0,zn) Respectively accumulating the tensor components of the magnetic field gradient in the well to obtain the observation point (x) of the whole rectangular model in the well0,zn) The resulting magnetic field gradient tensor in the well, i.e.
In another embodiment of the present invention, the one-dimensional discrete convolution method in the step (S4) includes the steps of:
(1) weighting coefficient h (x)0-ξp,z1-ζr) (represents h)1(x0-ξp,z1-ζr) And h2(x0-ξp,z1-ζr) Either) is arranged into a vector t, noted as
t=[t1,t2,…,tN+L-1]T
In the formula, matrix element tiAnd a weighting coefficient h (x)0-ξp,zn-ζr) Existence relationship
ti=h(x0-ξp,Zi-ζr)
In the formula, Zi=z1-ζ1+(i-1)Δz,i=1,2,…,N+L-1。
(2) The magnetization m (xi) of the r columnp,ζr)(mx(ξp,ζr) And mz(ξp,ζr) Either) is arranged into a vector m of dimension L, the vector elements miIn relation to magnetization
mi=m(ξp,ζi)
Zero-filling and expanding the vector m into the vector mext
In the formula, 0(N-1)×1A zero vector with dimension (N-1) x 1;
In the formula, fft () represents one-dimensional fast fourier transform;
In the formula, ". indicates the multiplication operation of corresponding elements;
In the formula, ifft () represents one-dimensional inverse fast fourier transform;
(6) extracting the matrix fextThe first L rows of elements form a vector f with the dimension L, namely a one-dimensional discrete convolution calculation result.
The invention realizes the unification of the magnetic field gradient tensor calculation in any section shape and any susceptibility distribution well in the efficiency and the precision. The method solves the problems that the existing method for calculating the gradient tensor of the two-dimensional magnetic field in the well is low in calculation precision and low in calculation speed, and cannot meet the requirements of joint inversion imaging, man-machine interaction modeling and interpretation of the magnetic field data in the ground-well.
The accuracy and efficiency of the magnetic field gradient tensor calculation method in the two-dimensional well provided by the invention are examined.
In order to illustrate the efficiency and accuracy of the method proposed by the present invention for calculating the magnetic field gradient tensor in a complex two-dimensional well with arbitrary cross-sectional shape and arbitrary susceptibility distribution, a complex two-dimensional model as shown in fig. 3 was designed.
A small rectangle with uniform magnetic susceptibility is embedded in a rectangular area with constant magnetic susceptibility, and the centers of the two rectangles are superposed. The large rectangular range is: the x direction is from-1000 m to 1000m, and the z direction is from 0m to 1000m (the z axis is positive downward); the small rectangle ranges are: the x-direction is from-400 m to 400m and the z-direction is from 100m to 400 m. The magnetic susceptibility of the large rectangle is 0SI, and the density of the small rectangle is 0.1 SI. The large rectangle is divided into 10000 × 10000 units with the same size, the horizontal coordinate of the observation point in the well is 55.1m, the vertical coordinate of the observation point is sampled at equal intervals from 10m to 900m (shown by a dotted line A in FIG. 3), and the number of the observation points is 9401.
The underground gravity gradient tensor algorithm is realized by utilizing Matlab language programming, and the personal table type machine used for running the program is configured as follows: the CPU is i7-2620, the dominant frequency is 2.7GHz, 32GB of memory, four cores and eight threads. The time required to compute one of the magnetic field gradient tensor components is about 15 seconds, and thus the method of the present invention is very efficient. The calculated values of the magnetic field gradient tensor are shown in FIG. 4, the theoretical values of the magnetic field gradient tensor are shown in FIG. 5, and the calculated values of the magnetic field gradient tensor are consistent from the aspect of morphology, wherein (a) in FIG. 4 is the magnetic field gradient tensor and b thereofzzCalculated values of the components, (b) is the magnetic field gradient tensor bxzCalculated values of the components, in FIG. 5 (a) is the magnetic field gradient tensor bzzComponent theoretical values, (b) are the magnetic field gradient tensor bxzComponent theoretical value. The relative error is obtained by dividing the absolute value of the difference obtained by subtracting the calculated value from the theoretical value by the theoretical value (shown in FIG. 6, where (a) is the magnetic field gradient tensor, b thereofzzThe relative error of the calculated values of the components from the theoretical values, (b) the magnetic field gradient tensor bxzThe relative error of the component calculation value and the theoretical value) is calculated, the relative error is counted, the statistical result is given by table 1, and the algorithm precision is known to be very high.
TABLE 1 statistics of relative errors of theoretical and calculated values of magnetic field gradient tensor
|
Maximum value
|
Minimum value
|
Mean value
|
bzz |
8.2197×10-9 |
5.3661×10-16 |
7.0166×10-12 |
bxz |
1.1153×10-8 |
2.1029×10-16 |
9.9921×10-12 |
In another embodiment of the present invention, an apparatus for calculating a magnetic field gradient tensor in a two-dimensional well includes:
the system comprises a first module, a second module and a third module, wherein the first module is used for determining a target area and constructing a rectangular model internally containing the target area; mesh subdivision is carried out on the rectangular model, the rectangular model is subdivided into a plurality of small rectangular units, and the magnetic susceptibility of each small rectangular unit is assigned;
a second module for giving coordinates of observation points in the well, each observation point having a horizontal coordinate of x0Vertical coordinate z of each observation pointnN is 1,2, and N is the number of observation points in the well;
the third module is used for calculating the in-well magnetic field gradient tensor generated by each line of small rectangular units at the in-well observation point by adopting a one-dimensional discrete convolution method;
and the fourth module is used for obtaining the magnetic field gradient tensor in the well, which is generated by the whole rectangular model at the observation point in the well, based on the magnetic field gradient tensor in the well, which is generated by each row of small rectangular units at the observation point in the well.
The implementation method of the functions of the modules can be implemented by the same method in the foregoing embodiments, and details are not repeated here.
In this embodiment, a computer device is provided, and the computer device may be a server, and its internal structure diagram may be as shown in fig. 7. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used to store sample data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement the steps of the method for calculating the magnetic field gradient tensor in the two-dimensional well in the above embodiment.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In an embodiment, a computer device is provided, comprising a memory storing a computer program and a processor, the processor implementing the steps of the method for calculating a magnetic field gradient tensor in a two-dimensional well in the above embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for magnetic field gradient tensor calculation in a two-dimensional well according to the above-mentioned embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.