A method for calculating nuclear magnetic porosity of oil-based mud invasion oil layer

By simulating the state of oil-based mud intrusion through laboratory measurements and calculation of correction factors, the porosity deviation problem under the influence of oil-based mud intrusion was solved, and accurate correction of oil reservoir porosity and reservoir evaluation were achieved.

CN117147609BActive Publication Date: 2026-07-03PETROCHINA CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
PETROCHINA CO LTD
Filing Date
2022-05-24
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

After oil-based mud invades the oil layer, the porosity of the nuclear magnetic resonance logging results deviates from the true formation value, leading to incorrect reservoir evaluation, especially underestimation of porosity in oil-bearing layers.

Method used

By simulating the intrusion state of oil-based mud in the laboratory, core samples and oil-based mud fluid samples were measured using nuclear magnetic resonance (NMR) instruments. The oil-based mud intrusion correction factor x was calculated, the total NMR amplitude (SAMP) was corrected, and then the NMR porosity after correction for oil-based mud intrusion was calculated.

Benefits of technology

It accurately obtains the true porosity of the formation with small error, the method is simple and easy to implement, the results are consistent with the true porosity of the formation, and the correction process requires little logging data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117147609B_ABST
    Figure CN117147609B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of reservoir logging evaluation in oil and gas exploration, and discloses a method for calculating nuclear magnetic porosity of oil-based mud invaded oil layer. First, a core is selected to simulate the state of oil-based mud invading oil layer. Second, nuclear magnetic resonance (NMR) instruments are used to respectively perform NMR experimental measurement and processing on the core in the state of oil-based mud invading oil layer and the oil-based mud fluid sample, so as to obtain the NMR T2 spectrum of the core in the state of oil-based mud invading oil layer, the total amplitude of the NMR T2 spectrum, and the NMR porosity of the core in the state of oil-based mud invasion. Then, the total amplitude of NMR of the oil-based mud fluid sample and the core in the state of oil-based mud invading oil layer is calculated to obtain the total amplitude of NMR corrected by oil-based mud invasion. The total amplitude of NMR corrected by oil-based mud invasion is combined with the oil layer NMR porosity affected by oil-based mud invasion to calculate the NMR porosity corrected by the influence of oil-based mud invasion, so as to obtain the real porosity of the formation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of reservoir logging evaluation technology in oil and gas exploration, specifically relating to a nuclear magnetic resonance porosity calculation technology, and more particularly to a method for calculating the nuclear magnetic resonance porosity of oil-based mud intruding into oil layers. Background Technology

[0002] Nuclear magnetic resonance (NMR) logging offers unparalleled advantages over conventional logging methods in characterizing reservoir pore structure and evaluating key parameters. For water-saturated rocks, NMR measurements can yield NMR T2 spectra reflecting the rock's pore structure, NMR porosity unaffected by lithology, and bound water saturation. However, in my country's offshore oilfields and western high-pressure formations, oil-based drilling mud is often used for reservoir protection. Due to drilling pressure exceeding formation pressure, the emulsifier carried by the oil-based mud can infiltrate the rock's pore space. Influenced by the NMR relaxation properties of the emulsifier, the measured NMR T2 spectrum morphology, amplitude, and NMR porosity parameters deviate from the true formation values. The impact of oil-based mud intrusion is even more pronounced in NMR logging data measured within oil-bearing formations. Therefore, directly using the measured NMR logging data for formation evaluation in such cases will inevitably lead to erroneous results.

[0003] Porosity is a key parameter for reservoir evaluation, reflecting the amount of space the reservoir can hold for oil and gas. It is also closely related to the rock's pore structure and permeability. For water-saturated or light oil-saturated rocks, nuclear magnetic resonance (NMR) logging data can directly obtain the total porosity, unaffected by formation lithology. However, in oil-bearing reservoirs affected by oil-based mud intrusion, the porosity measured by NMR is often smaller than the true formation porosity. In such cases, directly using the porosity provided by NMR logging for formation evaluation will inevitably underestimate the actual formation porosity.

[0004] In order to obtain the true porosity of formations in oil-bearing reservoirs affected by oil-based mud intrusion using nuclear magnetic resonance logging, this invention analyzes the influence of oil-based mud intrusion on the measured T2 NMR spectrum and NMR porosity based on NMR experiments using representative core samples to simulate the state of oil-based mud intrusion into the oil-bearing reservoir, and proposes a method for calculating the NMR porosity of oil-based mud intrusion into the oil-bearing reservoir. Summary of the Invention

[0005] In oil reservoirs affected by oil-based mud intrusion, in order to overcome the problem that the nuclear magnetic porosity obtained directly from nuclear magnetic resonance logging is lower than the actual formation porosity, this invention provides a method for calculating the nuclear magnetic porosity of oil-based mud intrusion into the oil reservoir. This method, based on fully considering the impact of oil-based mud intrusion into the oil reservoir on the nuclear magnetic resonance measurement results, corrects the intrusion effect of oil-based mud to obtain the true formation porosity.

[0006] To achieve the above technical objectives, the present invention adopts the following technical solution:

[0007] A method for calculating the nuclear magnetic resonance porosity of oil-based mud penetrating an oil reservoir, characterized in that the method includes the following steps:

[0008] Step S01: Select representative core samples and conduct laboratory displacement simulation experiments to simulate the state of core oil-based mud intruding into the oil layer;

[0009] Step S02: Nuclear magnetic resonance (NMR) experiments were performed on core samples and fluid samples of oil-based mud infiltrating the oil layer using a nuclear magnetic resonance (NMR) instrument. The measured data were then processed to obtain the NMR T2 spectrum, total NMR amplitude (SAMP1), and NMR porosity of the core samples in the oil-based mud infiltrating the oil layer. And the nuclear magnetic resonance T2 spectrum and total nuclear magnetic resonance amplitude SAMP2 of oil-based mud fluid samples;

[0010] Step S03: Based on the total NMR amplitude SAMP1 of the oil-based mud intrusion state from the core and the total NMR amplitude SAMP2 of the oil-based mud fluid sample, calculate the total NMR amplitude SAMP after correction for oil-based mud intrusion:

[0011] SAMP = SAMP1 + x * SAMP2

[0012] In the formula, SAMP is the total nuclear magnetic resonance amplitude of the core after correction for oil-based mud intrusion, v / v; SAMP1 is the total nuclear magnetic resonance amplitude measured under the condition of oil-based mud intrusion into the oil layer, v / v; SAMP2 is the total nuclear magnetic resonance amplitude of the measured oil-based mud fluid sample, v / v; x is the oil-based mud intrusion correction factor, the value of x is between 0 and 1, and is obtained by calibration through core experimental data;

[0013] Step S04: Calculate the NMR porosity of the core after oil-based mud intrusion correction using the total NMR amplitude (SAMP) after oil-based mud intrusion correction. The true porosity of the formation:

[0014]

[0015] In the formula, NMR porosity, %; The core porosity is corrected for oil-based mud intrusion, expressed as %.

[0016] Furthermore, in step S01, the following method is used to simulate the state of the core being infiltrated by oil-based mud into the oil layer:

[0017] Step S011: The drilled core is processed and ground to prepare a plunger sample, and then subjected to oil and salt washing treatment.

[0018] Step S012: Place the core that has been treated with oil and salt washing into distilled water and pressurize it for 24 hours to achieve 100% water saturation.

[0019] Step S013: Using an oil sample that simulates the original state of the formation, pressurize and displace the core to drive away the movable water in the large pore space of the core, so that the core reaches an oil-saturated state.

[0020] Step S014: Use the prepared oil-based mud fluid sample to pressurize and displace the core, drive away the movable oil in the large pore space, and make the core reach the state of oil-based mud invading the oil layer.

[0021] Furthermore, in step S02, the nuclear magnetic resonance measurements of the simulated oil-based mud intrusion core and oil-based mud fluid sample are performed in accordance with the provisions of the standard "Laboratory Measurement Specification for Nuclear Magnetic Resonance Parameters of Rock Samples SY / T6490-2014".

[0022] Furthermore, the method for calculating the total nuclear magnetic resonance amplitude (SAMP1) of the core oil-based mud intrusion into the oil layer in step S02 is as follows:

[0023]

[0024] In the formula, amp1(i) is the amplitude of the nuclear magnetic resonance T2 spectrum measured by the state of core oil-based mud intrusion into the oil layer, v / v; n is the number of points of the measured nuclear magnetic resonance T2 spectrum.

[0025] Furthermore, the method for calculating the total nuclear magnetic resonance amplitude (SAMP2) of the oil-based mud fluid sample in step S02 is as follows:

[0026]

[0027] In the formula, amp2(i) is the amplitude of the nuclear magnetic resonance T2 spectrum of the measured oil-based mud fluid sample, v / v; n is the number of points of the measured nuclear magnetic resonance T2 spectrum.

[0028] Furthermore, the number of spots n in the nuclear magnetic resonance T2 spectrum is 200.

[0029] Further, in step S03, the value of the oil-based mud intrusion correction factor x is between 0 and 1, and is obtained by calibration using core experimental data. Specifically, the total nuclear magnetic resonance amplitude measured under 100% water saturation, the total nuclear magnetic resonance amplitude SAMP2 measured under oil-based mud fluid sample, and the total nuclear magnetic resonance amplitude SAMP1 simulating oil-based mud intrusion into the oil layer are substituted into the formula SAMP = SAMP1 + x * SAMP2 to obtain the value of x.

[0030] Compared with the prior art, the beneficial effects of the present invention are:

[0031] This invention calibrates the correction factor x in the total nuclear magnetic resonance (NMR) amplitude correction formula using core experimental data, and then applies the total amplitude correction formula to actual production measurements. Using the measured total NMR amplitude SAMP1 of oil-based mud infiltrating the oil layer and the total NMR amplitude SAMP2 of the oil-based mud fluid sample, the total NMR amplitude SAMP after correction for oil-based mud infiltration is calculated using the total amplitude correction formula. Then, the NMR porosity affected by oil-based mud infiltration is considered. This yields NMR porosity, corrected for oil-based mud intrusion, which reflects the true porosity of the formation. The relative error between the NMR porosity of 12 core samples corrected for oil-based mud invasion using the method described in this invention and the average NMR porosity measured under 100% water saturation was 0.61%. The NMR porosity corrected for oil-based mud invasion obtained by the method of this invention is basically consistent with the actual formation porosity, proving the effectiveness of the method described in this invention. The method of this invention requires less logging data for the correction process, is easy to implement, simple, accurate and reliable. Attached Figure Description

[0032] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0033] Figure 1 This is a comparison of the nuclear magnetic resonance T2 spectrum morphology of a representative core sample with 100% water saturation, simulated oil-based mud intrusion into the oil layer, and an oil-based mud fluid sample provided in this embodiment of the invention.

[0034] Figure 2 This is a comparison chart of nuclear magnetic porosity measured in 12 core samples under 100% water saturation and simulated oil-based mud intrusion into the oil layer, provided in an embodiment of the present invention.

[0035] Figure 3This is a flowchart of a method for calculating the nuclear magnetic porosity of oil-based mud intruding into an oil layer, provided by the present invention.

[0036] Figure 4 This is a comparison chart of the nuclear magnetic porosity measured by 12 core samples in a 100% water-saturated state and the nuclear magnetic porosity obtained after correction by oil-based mud intrusion, provided in this embodiment of the invention.

[0037] Figure 5 This is an example of how the method proposed in this invention processes actual nuclear magnetic resonance logging data affected by oil-based mud intrusion to obtain the true formation porosity. Detailed Implementation

[0038] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0039] This invention addresses the problem that directly using nuclear magnetic resonance (NMR) logging to measure nuclear magnetic porosity in oil-bearing reservoirs affected by oil-based mud intrusion can underestimate the true formation porosity. It proposes a method based on a comparative analysis of the morphology of NMR T2 spectra, NMR porosity, and NMR T2 spectra of oil-bearing mud fluid samples measured under different saturation conditions from limited core samples. Then, based on the total amplitudes SAMP1 and SAMP2 of the NMR T2 spectra of the oil-bearing reservoirs and oil-bearing mud fluid samples affected by oil-bearing mud intrusion, the total NMR amplitude SAMP, corrected for the impact of oil-bearing mud intrusion, is calculated. This calculation is then combined with the measured NMR porosity of the oil-bearing reservoirs affected by oil-bearing mud intrusion. Calculate the NMR porosity after correction for the effects of oil-based mud intrusion. And regard it as the true porosity of the formation.

[0040] The following comparison of the nuclear magnetic resonance (NMR) T2 spectra, NMR porosity, and NMR T2 spectra of oil-based mud fluid samples from 12 representative core samples taken from a clastic reservoir in western my country under 100% water saturation and simulated oil-based mud intrusion into the reservoir is used to illustrate the influence of oil-based mud intrusion into the reservoir on the morphology of NMR T2 spectra and NMR porosity.

[0041] Figure 1 The image shows a comparison of the T2 NMR spectrum of a representative core sample measured under 100% water saturation and simulated oil-based mud intrusion into the oil reservoir, and the T2 NMR spectrum of an oil-based mud fluid sample. The following patterns can be observed from the comparison:

[0042] (1) When the nuclear magnetic resonance T2 relaxation time is less than 2.5 ms, the morphology of the nuclear magnetic resonance T2 spectra measured in the 100% water-saturated state and the simulated oil-based mud intrusion state is almost identical. This indicates that in the small pore part, due to the influence of higher capillary forces, the oil-based mud cannot penetrate into the smaller pore spaces in the rock, so that this part of the nuclear magnetic resonance T2 spectrum is not affected by the intrusion of oil-based mud, and only reflects the relaxation properties of water bound in small pores;

[0043] (2) When the nuclear magnetic resonance T2 relaxation time is greater than 2.5ms, the morphology of the nuclear magnetic resonance T2 spectrum is greatly affected by the intrusion of oil-based mud, resulting in a wider distribution of the nuclear magnetic resonance T2 spectrum, but the area enclosed by the T2 spectrum and the total amplitude of the T2 spectrum are smaller, reflecting a decrease in the measured nuclear magnetic porosity.

[0044] (3) The T2 distribution of the oil-based mud fluid sample is located at the junction of macropores and micropores, indicating that the amplitude of the oil-based mud fluid sample has a partial influence on the NMR porosity.

[0045] To investigate the impact of oil-based mud intrusion into the oil layer on the measured NMR porosity, this embodiment of the invention read the NMR porosity of 12 core samples under 100% water saturation and simulated oil-based mud intrusion into the oil layer, and plotted the cross-plots of the two data. The results are as follows: Figure 2 As shown in the figure, the dashed line represents the 45-degree diagonal, reflecting the deviation of NMR porosity measured under two conditions. The comparison in the figure shows that when core samples are affected by oil-based mud intrusion, the measured NMR porosity is generally lower than expected, and the greater the porosity of the rock, the greater the deviation of the measured NMR porosity from the true porosity. Statistical analysis of NMR porosity measurements from 12 core samples shows that the average NMR porosity measured under 100% water saturation is 9.70%, while the average NMR porosity measured under simulated oil-based mud intrusion is 8.17%, with a relative error of 15.75%, significantly higher than the porosity error range specified in the reserve specification. To obtain reliable formation porosity using NMR logging in oil-based mud intrusion formations, this invention proposes a method for calculating NMR porosity in oil-based mud intrusion formations.

[0046] Example 1

[0047] This invention uses 12 representative core samples taken from a clastic reservoir in western my country as examples to illustrate the specific implementation of this invention:

[0048] See Figure 3 A method for calculating the nuclear magnetic resonance porosity of oil-based mud intruding into an oil reservoir, comprising the following steps:

[0049] Step S01: Select representative core samples and conduct laboratory displacement simulation experiments to simulate the state of core oil-based mud intruding into the oil layer;

[0050] In step S01, the following method is used to simulate the state of the core being in the presence of oil-based mud intruding into the oil layer:

[0051] Step S011: The 12 drilled core samples are processed and ground to prepare plunger samples, and then subjected to oil and salt washing treatment.

[0052] Step S012: Place the core sample treated in Step 1 into distilled water and pressurize it for 24 hours to achieve 100% water saturation.

[0053] Step S013: Using an oil sample simulating the original state of the formation, pressurize and displace the core to drive away the movable water in the large pore space of the core, so that the core reaches an oil-saturated state.

[0054] Step S014: Use the prepared oil-based mud fluid sample to pressurize and displace the core, drive away the movable oil in the large pore space, and make the core reach the state of oil-based mud invading the oil layer.

[0055] Step S02: Nuclear magnetic resonance (NMR) experiments were performed on core samples and fluid samples of oil-based mud infiltrating the oil layer using a nuclear magnetic resonance (NMR) instrument. The measured data were then processed to obtain the NMR T2 spectrum, total NMR amplitude (SAMP1), and NMR porosity of the core samples in the oil-based mud infiltrating the oil layer. In addition, the nuclear magnetic resonance T2 spectrum and total nuclear magnetic resonance amplitude SAMP2 of oil-based mud fluid samples.

[0056] In step S02, the nuclear magnetic resonance measurements of the simulated oil-based mud intrusion core and oil-based mud fluid sample are performed in accordance with the provisions of the standard "Laboratory Measurement Specification for Nuclear Magnetic Resonance Parameters of Rock Samples SY / T6490-2014".

[0057] Specifically, in step S02, nuclear magnetic resonance (NMR) measurements are performed to obtain the NMR T2 spectrum, total NMR amplitude (SAMP1), and NMR porosity of the core sample simulating the state of oil-based mud intruding into the oil layer. The formula for calculating the total nuclear magnetic resonance amplitude (SAMP1) of oil-based mud infiltrating the oil reservoir is as follows:

[0058]

[0059] In the formula, amp1(i) is the amplitude of the nuclear magnetic resonance T2 spectrum measured by the state of core oil-based mud intrusion into the oil layer, v / v; n is the number of points of the measured nuclear magnetic resonance T2 spectrum, which is generally taken as 200.

[0060] In step S02, nuclear magnetic resonance (NMR) measurements are performed on the prepared oil-based mud fluid sample to obtain the NMR T2 spectrum and the total amplitude (SAMP2) of the NMR T2 spectrum of the oil-based mud fluid sample; the formula for calculating the total amplitude (SAMP2) of the NMR spectrum of the oil-based mud fluid sample is as follows:

[0061]

[0062] In the formula, amp2(i) is the amplitude of the nuclear magnetic resonance T2 spectrum of the measured oil-based mud fluid sample, v / v; n is the number of points of the measured nuclear magnetic resonance T2 spectrum, which is generally taken as 200.

[0063] Step S03: Analyze the differences in morphological characteristics of the nuclear magnetic resonance (NMR) T2 spectra of oil-based mud fluid samples, core samples in a 100% water-saturated state, and simulated oil-based mud intrusion into the oil layer. Calculate the total NMR amplitude (SAMP) after oil-based mud intrusion correction using the following formula:

[0064] SAMP = SAMP1 + x * SAMP2

[0065] In the formula, SAMP is the total nuclear magnetic resonance amplitude of the core after correction for oil-based mud intrusion, v / v; x is the oil-based mud intrusion correction factor, the value of which is between 0 and 1. Specifically, it is obtained by calibration based on core experimental data. That is, the total nuclear magnetic resonance amplitude measured in the experimental state of 100% water saturation is used as the total nuclear magnetic resonance amplitude SAMP after correction for oil-based mud intrusion, the total nuclear magnetic resonance amplitude SAMP2 measured by the oil-based mud fluid sample, and the total nuclear magnetic resonance amplitude SAMP1 simulating the state of oil-based mud intrusion into the oil layer. Substituting these values ​​into the formula SAMP = SAMP1 + x * SAMP2, the value of x can be obtained. In this embodiment, based on the nuclear magnetic resonance experimental results of 12 cores, the value of x was calibrated to be 0.75.

[0066] Step S04: Combine the total nuclear magnetic resonance amplitude (SAMP1) and nuclear magnetic porosity measured by the state of oil-based mud intrusion into the oil layer. The total nuclear magnetic resonance amplitude (SAMP) after oil-based mud intrusion correction was used to obtain the NMR porosity after oil-based mud intrusion correction using the following formula.

[0067]

[0068] In the formula, NMR porosity, %; NMR porosity (%) is the core sample obtained after correction by oil-based mud intrusion.

[0069] After correcting the porosity of oil-based mud intrusion into the oil layer using the above formula, the true porosity of the formation can be obtained.

[0070] Figure 4 This is a cross-plot comparing the NMR porosity of 12 core samples obtained using the method described in this invention (corrected by oil-based mud intrusion) with the NMR porosity measured under 100% water saturation. (The text then abruptly shifts to a different topic:) Figure 1 Comparison shows that the NMR porosity data points after oil-based mud intrusion correction are basically distributed around the 45-degree diagonal. Furthermore, the average NMR porosity of the 12 core samples after oil-based mud intrusion correction is 9.76%, with a relative error of 0.61% compared to the average NMR porosity measured under 100% water saturation. The NMR porosity corrected by oil-based mud intrusion obtained through the method described in this invention is in good agreement with the actual formation porosity, proving the effectiveness of the method described in this invention.

[0071] Example 2

[0072] Using the NMR porosity correction method established in this invention for oil-based mud intrusion into oil reservoirs, NMR logging data actually measured in a clastic reservoir drilled with oil-based mud in western my country were processed to obtain NMR porosity corrected for oil-based mud intrusion. The actual measured NMR porosity (affected by oil-based mud intrusion), the NMR porosity corrected for oil-based mud intrusion, and the porosity analyzed from the core were compared.

[0073] Figure 5 The image shows a comparison of three porosity values ​​obtained from an oil-bearing section in a well: From left to right, the first curve is the natural gamma ray curve (GR), used to indicate the effective reservoir; the second curve is the acoustic transit time curve (AC), used to determine the formation porosity; the third curve shows the deep, medium, and shallow resistivity (RT, RI, RXO); the fourth curve shows the gas logging curve. Combining the resistivity of the third curve and the gas logging curve of the fourth curve, the target reservoir section from 5831.5 to 5845.0 m is determined to be an oil-bearing layer; in the fifth curve, AMP_DIST is the T2 spectrum of nuclear magnetic resonance logging under the influence of oil-based mud; in the sixth curve, TCMR is the nuclear magnetic porosity obtained from the nuclear magnetic resonance logging data under the influence of oil-based mud, TCMR_CORR is the nuclear magnetic porosity calculated by the method proposed in this invention after correction for the influence of oil-based mud, and CPOR is the porosity from core analysis, representing the true porosity of the formation.

[0074] A comparison of the porosity obtained from core analysis, the NMR porosity obtained directly from actual NMR logging data, and the NMR porosity corrected using the method proposed in this invention shows that, due to the influence of oil-based mud intrusion, the porosity obtained directly from NMR logging data is significantly lower than that obtained from core analysis. However, after correcting the NMR porosity affected by oil-based mud intrusion using the method proposed in this invention, the obtained NMR porosity shows a significant good match with the core data, fully demonstrating the reliability of the method proposed in this invention.

[0075] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

[0076] The above description is merely an embodiment of this application and is not intended to limit the invention. Any modifications, equivalent substitutions, and improvements made within the scope of this application should be included within the protection scope of this invention.

Claims

1. A method for calculating nuclear magnetic porosity of an oil-based mud invaded oil reservoir, characterized by, The method includes the following steps: Step S01: Select representative core samples and conduct laboratory displacement simulation experiments to simulate the state of core oil-based mud intruding into the oil layer; Step S02: Nuclear magnetic resonance (NMR) experiments were performed on core samples and fluid samples of oil-based mud infiltrating the oil layer using a nuclear magnetic resonance (NMR) instrument. The measured data were then processed to obtain the NMR T2 spectrum, total NMR amplitude (SAMP1), and NMR porosity of the core samples in the oil-based mud infiltrating the oil layer. And the nuclear magnetic resonance T2 spectrum and total nuclear magnetic resonance amplitude SAMP2 of oil-based mud fluid samples; Step S03: Based on the total NMR amplitude SAMP1 of the oil-based mud intrusion state from the core and the total NMR amplitude SAMP2 of the oil-based mud fluid sample, calculate the total NMR amplitude SAMP after correction for oil-based mud intrusion: SAMP = SAMP1 + x * SAMP2 In the formula, SAMP is the total nuclear magnetic resonance amplitude of the core after correction for oil-based mud intrusion, v / v; SAMP1 is the total nuclear magnetic resonance amplitude measured under the condition of oil-based mud intrusion into the oil layer, v / v; SAMP2 is the total nuclear magnetic resonance amplitude of the measured oil-based mud fluid sample, v / v; x is the oil-based mud intrusion correction factor, the value of x is between 0 and 1, and is obtained by calibration through core experimental data; Step S04: Calculate the NMR porosity of the core after oil-based mud intrusion correction using the total NMR amplitude (SAMP) after oil-based mud intrusion correction. The true porosity of the formation: In the formula, NMR porosity, %; The core porosity is corrected for oil-based mud intrusion, expressed as %.

2. The method for calculating the nuclear magnetic resonance porosity of oil-based mud intruding into an oil layer according to claim 1, characterized in that, In step S01, the following method is used to simulate the state of the core being in the presence of oil-based mud invading the oil layer: Step S011: The drilled core is processed and ground to prepare a plunger sample, and then subjected to oil and salt washing treatment. Step S012: Place the core that has been treated with oil and salt washing into distilled water and pressurize it for 24 hours to achieve 100% water saturation. Step S013: Using an oil sample that simulates the original state of the formation, pressurize and displace the core to drive away the movable water in the large pore space of the core, so that the core reaches an oil-saturated state. Step S014: Use the prepared oil-based mud fluid sample to pressurize and displace the core, drive away the movable oil in the large pore space, and make the core reach the state of oil-based mud invading the oil layer.

3. The method for calculating the nuclear magnetic resonance porosity of oil-based mud intruding into an oil layer according to claim 1 or 2, characterized in that, In step S02, nuclear magnetic resonance measurements are performed on the simulated oil-based mud intrusion core and oil-based mud fluid sample in accordance with the provisions of the standard "Laboratory Measurement Specification for Nuclear Magnetic Resonance Parameters of Rock Samples SY / T6490-2014".

4. The method for calculating the nuclear magnetic resonance porosity of oil-based mud intruding into an oil layer according to claim 1 or 2, characterized in that, The method for calculating the total nuclear magnetic resonance amplitude (SAMP1) of the core oil-based mud intrusion state into the oil layer in step S02 is as follows: In the formula, amp1(i) is the amplitude of the nuclear magnetic resonance T2 spectrum measured by the state of core oil-based mud intrusion into the oil layer, v / v; n is the number of points of the measured nuclear magnetic resonance T2 spectrum.

5. The method for calculating the nuclear magnetic resonance porosity of oil-based mud intruding into an oil layer according to claim 4, characterized in that, The method for calculating the total nuclear magnetic resonance amplitude (SAMP2) of the oil-based mud fluid sample in step S02 is as follows: In the formula, amp2(i) is the amplitude of the nuclear magnetic resonance T2 spectrum of the measured oil-based mud fluid sample, v / v; n is the number of points of the measured nuclear magnetic resonance T2 spectrum.

6. The method for calculating the nuclear magnetic resonance porosity of oil-based mud intruding into an oil layer according to claim 5, characterized in that, The number of spots n in the nuclear magnetic resonance T2 spectrum is 200.

7. A method for calculating the nuclear magnetic resonance porosity of oil-based mud intrusion into an oil layer according to claim 1 or 2, wherein in step S03, the value of the oil-based mud intrusion correction factor x is between 0 and 1, and is obtained by calibration using core experimental data. That is, the total nuclear magnetic resonance amplitude measured under 100% water saturation is used as the total nuclear magnetic resonance amplitude SAMP after oil-based mud intrusion correction, the total nuclear magnetic resonance amplitude SAMP2 measured from the oil-based mud fluid sample, and the total nuclear magnetic resonance amplitude SAMP1 simulating the state of oil-based mud intrusion into the oil layer are substituted into the formula SAMP = SAMP1 + x * SAMP2 to obtain the value of x.