Method and device for reconstructing underground hydrogen storage reservoir from natural gas reservoir, electronic equipment and storage medium

By constructing a discrete pressure-saturation equation set in a natural gas reservoir and adjusting the gas injection and extraction rates, the problem of constructing a large-scale underground hydrogen storage facility was solved, enabling the safe conversion of a natural gas reservoir into an underground hydrogen storage facility and improving hydrogen storage efficiency.

CN122254231APending Publication Date: 2026-06-23CHINA PETROLEUM & CHEMICAL CORP +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

There is a lack of quick and effective construction solutions for large-scale underground hydrogen storage facilities in the current technology, and hydrogen storage in conventional ground storage facilities is difficult.

Method used

The method of converting natural gas reservoirs into underground hydrogen storage facilities is adopted. By calculating the current saturation field and pressure field of the discrete spatial grid of porous media, a discretized pressure-saturation equation system is constructed. By adjusting the gas injection and gas production rates, the natural gas reservoir is gradually converted into an underground hydrogen storage facility.

Benefits of technology

This has enabled the safe and reliable conversion of natural gas reservoirs into underground hydrogen storage facilities, solving the problem of large-scale hydrogen storage and improving hydrogen storage efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122254231A_ABST
    Figure CN122254231A_ABST
Patent Text Reader

Abstract

The application provides a method and device for reconstructing a natural gas reservoir into an underground hydrogen storage, electronic equipment and a storage medium, and relates to the technical field of underground energy storage. The method selects a natural gas reservoir as the underground hydrogen storage, and injects a mixed gas of natural gas and hydrogen while exploiting the natural gas. The proportion of hydrogen in the mixed gas is continuously increased with the exploitation time, so that the natural gas reservoir is gradually converted into the underground hydrogen storage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of underground energy storage technology, and in particular to a method, apparatus, electronic equipment and storage medium for converting a natural gas reservoir into an underground hydrogen storage facility. Background Technology

[0002] Compared to fossil fuels, hydrogen, as a fuel or energy carrier, can significantly reduce pollutant emissions, making it a necessary choice for achieving a low-carbon or zero-carbon economy. At the same time, increasing the scale of intermittent green energy supply to electrolyzers and promoting the development of related hydrogen production technologies, such as biotechnology, waste gasification, and photoelectrocatalysis, are crucial.

[0003] The increase in hydrogen production capacity will inevitably drive the development of large-scale hydrogen storage facilities. However, due to the low density and poor solubility of hydrogen in water, storing hydrogen in conventional ground storage facilities such as tanks and pipelines is particularly difficult, making underground hydrogen storage facilities the preferred option for large-scale hydrogen storage.

[0004] However, the construction of existing large-scale underground hydrogen storage facilities is still in the technological exploration stage and cannot provide a quick and effective construction solution. Summary of the Invention

[0005] This invention provides a method, apparatus, electronic equipment, and storage medium for converting natural gas reservoirs into underground hydrogen storage facilities, thereby addressing the deficiencies in related technologies.

[0006] This invention provides a method for converting a natural gas reservoir into an underground hydrogen storage facility, comprising: The current hydrogen content in the injected gas of the porous medium of the natural gas reservoir is obtained, and the current saturation field and current pressure field of the discrete spatial grid of the porous medium are determined; the injected gas includes hydrogen and natural gas. Based on the current pressure field, calculate the current mixed gas density of each grid cell in the discrete spatial grid, and calculate the current mixed gas viscosity of each grid cell based on the mole fraction of each gas component in the porous medium. Based on the current mixed gas viscosity, the current saturation field, and the current pressure field, calculate the current Darcy velocity of each grid cell; Based on the current mixed gas density, the current mixed gas viscosity, the current saturation field, and the current Darcy velocity, a discretized pressure-saturation equation set is constructed to calculate the saturation field and the pressure field at the next time step. The discretized pressure-saturation equation set is then solved to obtain the saturation field and the pressure field at the next time step. Increase the current hydrogen ratio, and use the next time-instance saturation field and the next time-instance pressure field as the current saturation field and the current pressure field. Repeat the above process until the pressure field of the discrete spatial grid converges.

[0007] According to a method for converting a natural gas reservoir into an underground hydrogen storage facility provided by the present invention, the step of solving the discretized pressure-saturation equations to obtain the saturation field and the pressure field at the next time step includes: Based on the pressure field at the next moment, the gas injection rate and the gas collection rate are adjusted when the gas injection mechanism and the gas collection mechanism are executed in the porous medium.

[0008] According to a method for converting a natural gas reservoir into an underground hydrogen storage facility provided by the present invention, the step of adjusting the gas injection rate and the gas extraction rate in the porous medium during the gas injection mechanism and the gas extraction mechanism, based on the pressure field at the next moment, includes: Determine the position information of the pressure value of each grid cell in the pressure field at the next moment within the pressure operating range of the porous medium; Based on the location information, the gas injection rate and the gas extraction rate are adjusted.

[0009] According to a method for converting a natural gas reservoir into an underground hydrogen storage facility provided by the present invention, the step of calculating the current mixed gas density of each grid cell in the discrete spatial grid based on the current pressure field includes: Based on the current pressure field, the current mixed gas density of each grid cell is calculated using the SRK-EOS equation of state.

[0010] According to a method for converting a natural gas reservoir into an underground hydrogen storage facility provided by the present invention, the step of calculating the current mixed gas viscosity of each grid cell based on the mole fraction of each gas component within the porous medium includes: Based on the mole fraction of each gas component, the viscosity of the current mixed gas in each grid cell is calculated using a viscosity model.

[0011] According to a method for converting a natural gas reservoir into an underground hydrogen storage facility provided by the present invention, the step of calculating the current Darcy velocity of each grid cell based on the current mixed gas density, the current mixed gas viscosity, the current saturation field, and the current pressure field includes: Based on the current mixed gas density, the current mixed gas viscosity, the current saturation field, and the current pressure field, Darcy's law is applied to calculate the current Darcy velocity of each grid cell.

[0012] The present invention also provides a device for converting a natural gas reservoir into an underground hydrogen storage facility, comprising: The acquisition module is used to acquire the current hydrogen ratio in the mixed components of the injected gas within the porous medium of the natural gas reservoir, and to determine the current saturation field and current pressure field of the discrete spatial grid of the porous medium; the mixed components include hydrogen and natural gas; The parameter calculation module is used to calculate the current mixed gas density of each grid cell in the discrete spatial grid based on the current pressure field, and to calculate the current mixed gas viscosity of each grid cell based on the mole fraction of each gas component in the porous medium. The velocity calculation module is used to calculate the current Darcy velocity of each grid cell based on the current viscosity of the mixed gas, the current saturation field, and the current pressure field. The pressure field update module is used to construct a discretized pressure-saturation equation set for calculating the saturation field and pressure field at the next time step based on the current mixed gas density, the current mixed gas viscosity, the current saturation field, and the current Darcy velocity, and to solve the discretized pressure-saturation equation set to obtain the saturation field and pressure field at the next time step. The iterative execution module is used to increase the current hydrogen ratio and use the next moment's saturation field and the next moment's pressure field as the current saturation field and the current pressure field, and repeat the above process until the pressure field of the discrete spatial grid converges.

[0013] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method for converting a natural gas reservoir into an underground hydrogen storage facility as described above.

[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for converting a natural gas reservoir into an underground hydrogen storage facility as described above.

[0015] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the method for converting a natural gas reservoir into an underground hydrogen storage facility as described above.

[0016] The present invention provides a method, apparatus, electronic equipment and storage medium for converting natural gas reservoirs into underground hydrogen storage facilities. The method uses natural gas reservoirs as underground hydrogen storage facilities. While extracting natural gas, a mixture of natural gas and hydrogen is injected. The proportion of hydrogen in the mixture increases with the extraction time, gradually converting the natural gas reservoir into an underground hydrogen storage facility. Attached Figure Description

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

[0018] Figure 1 This is a flowchart illustrating the method for converting a natural gas reservoir into an underground hydrogen storage facility provided by the present invention.

[0019] Figure 2 This is a schematic diagram of the structure of the natural gas reservoir conversion underground hydrogen storage device provided by the present invention.

[0020] Figure 3 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

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

[0022] Figure 1 This is a flowchart illustrating a method for converting a natural gas reservoir into an underground hydrogen storage facility, as provided in an embodiment of the present invention. Figure 1 As shown, the method includes: S1, obtain the current hydrogen ratio in the injected gas of the porous medium of the natural gas reservoir, and determine the current saturation field and current pressure field of the discrete spatial grid of the porous medium; the injected gas includes hydrogen and natural gas; S2, based on the current pressure field, calculate the current mixed gas density of each grid cell in the discrete spatial grid, and based on the mole fraction of each gas component in the porous medium, calculate the current mixed gas viscosity of each grid cell; S3, Calculate the current Darcy velocity of each grid cell based on the current mixed gas density, the current mixed gas viscosity, the current saturation field, and the current pressure field; S4. Based on the current mixed gas density, the current mixed gas viscosity, the current saturation field, and the current Darcy velocity, a discretized pressure-saturation equation set is constructed to calculate the saturation field and the pressure field at the next time step, and the discretized pressure-saturation equation set is solved to obtain the pressure field and the saturation field at the next time step. S5, increase the current hydrogen ratio, and use the next moment's saturation field and the next moment's pressure field as the current saturation field and the current pressure field, repeat the above process until the pressure field of the discrete space grid converges.

[0023] Specifically, the method for converting a natural gas reservoir into an underground hydrogen storage facility provided in this embodiment of the invention is executed by a device for converting a natural gas reservoir into an underground hydrogen storage facility. This device can be configured in a computer, which can be a local computer or a cloud computer. The local computer can be a computer, tablet, etc., and no specific limitation is made here.

[0024] First, step S1 is executed to obtain the current hydrogen ratio in the injected gas of the porous medium of the natural gas reservoir, and to determine the current saturation field and current pressure field of the discrete spatial grid of the porous medium. Here, the injected gas is the gas to be stored in the porous medium of the natural gas reservoir, which can be a mixture of hydrogen and natural gas. The current hydrogen ratio is the hydrogen content in the mixture.

[0025] The current saturation field of a discrete spatial grid for porous media can include the saturation values ​​of each grid cell within the discrete spatial grid at the current moment, which can be obtained through fluid analysis. The current pressure field of a discrete spatial grid for porous media can include the pressure values ​​of each grid cell within the discrete spatial grid at the current moment, which can be measured by downhole pressure sensors.

[0026] Then, step S2 is executed. Using the current pressure field, the current gas mixture density of each grid cell in the discrete spatial grid is calculated, and using the mole fraction of each gas component in the gas mixture, the current gas mixture viscosity of each grid cell is calculated. Here, the calculation order of the current gas mixture density and viscosity can be set as needed. The current gas mixture density can be calculated first, followed by the viscosity; or vice versa; or both can be calculated simultaneously.

[0027] When calculating the current gas mixture density in each grid cell of a discrete spatial grid, the SRK-EOS equation of state can be applied based on the current pressure field to calculate the current gas mixture density in each grid cell. The expression for the SRK-EOS equation of state is: Where p is pressure, in MPa; T is temperature, in K; V m Molar volume, unit is m 3 / mol; R is the gas constant; M is the molar mass in kg / mol; a and b are substance-related constants, α is a correction factor related to temperature, and ρ is the density in kg / m³.3 .

[0028] When calculating the current mixed gas density in each grid cell of a discrete spatial grid, p in the SRK-EOS equation of state can be set equal to the pressure value of each grid cell at the current moment. Then, M and V in the SRK-EOS equation of state can be calculated using the mixed air in the porous medium at the current moment. m The temperature of the porous medium at the current moment is taken as T, and ρ is calculated as the current mixed gas density of each grid cell using the expression of the SRK-EOS equation of state. Here, each grid cell corresponds to a p and a ρ at the current moment.

[0029] When calculating the current viscosity of the mixed gas in each grid cell of a discrete spatial grid, the viscosity of each grid cell can be calculated by applying a viscosity model based on the mole fraction of each gas component in the mixed gas. The LBC viscosity model is selected.

[0030] The expression for the LBC viscosity model can be: Among them, y c T represents the mole fraction of gaseous component c in the gas mixture; r,c n is the critical temperature of gas component c in the gas mixture, in K; c M represents the number of gaseous components in the gas mixture. c μ is the molar mass of gas component c in the gas mixture, expressed in kg / mol; μ is the viscosity of the gas mixture. c Let c be the viscosity of the gas component in the gas mixture, expressed in mPa·s.

[0031] When T r,c When ≤1.5, When T r,c When >1.5, T r The critical temperature of the gas mixture, expressed in Kelvin (K). r This represents the critical pressure of the gas mixture, expressed in MPa.

[0032] When calculating the current mixed gas viscosity of each grid cell in a discrete spatial grid, the y in the expression of the LBC viscosity model can be set as follows: c The μ value, equal to the mole fraction of each gas component at the current moment, is used in the expression for calculating the LBC viscosity model as the current mixed gas viscosity for each grid cell. Here, each grid cell corresponds to a μ value at the current moment.

[0033] Next, step S3 is executed, using the current gas mixture density, current gas mixture viscosity, current saturation field, and current pressure field of each grid cell to calculate the current Darcy velocity of each grid cell. This process can be implemented using Darcy's law. The expression for Darcy's law can be expressed as: Among them, U i The Darcy velocity of phase i is given in meters per second (m). 3 / s;K i Permeability of phase i, in mD; μ i Here is the viscosity of phase i, in mPa·s. Let ρ be the pressure gradient of phase i. i The density of phase i is expressed in kg / m³. 3 g is the acceleration due to gravity, in m / s². 2 z represents depth in meters (m), and i represents phase, which includes the non-wetting phase n and the wetting phase b.

[0034] i-phase penetration rate K i It is a function of the wetting phase saturation, expressed as: K i =Kk ri (S b ); Where K is the absolute permeability, in mD; k ri (S b S represents the relative permeability of phase i. b The saturation of the wetting phase.

[0035] The capillary force in porous media is a function of the saturation of the wetting phase, expressed as follows: p c (S b ) = p n -p b ;

[0036] Where, p n The pressure of the non-wetting phase is expressed in MPa, p. b The pressure of the wetting phase is expressed in MPa. For capillary force gradient, p represents the saturation gradient. c (S b ) represents the capillary force in porous media.

[0037] Then, step S4 is executed, using the current mixed gas density, current mixed gas viscosity, current saturation field, and current Darcy velocity of each grid cell to construct a discretized pressure-saturation equation set for calculating the saturation and pressure field at the next time step. The discretized pressure-saturation equation set includes the mass conservation equation and the pressure-saturation equation.

[0038] The mass conservation equation is as follows: in, Porosity, S b Q represents the wetting phase saturation. i The injection-production rate for phase i is given in meters per second (m). 3 / s. S i Let i be the saturation of phase i.

[0039] Wetting phase saturation at time t+1 with time step Δt Calculated using the discretized mass conservation equation: in, Let be the wetting phase saturation at time t. Let Q be the Darcy velocity of the wetting phase at time t. b The injection-production rate is the rate of the wetting phase.

[0040] The pressure field p at time t+1 with a time step Δt. t+1 Calculated using the discretized pressure-saturation equation: Where, k rn (S b ) represents the relative permeability of the non-wetting phase, μ. n The viscosity of the non-wetting phase, μ b Q is the viscosity of the wetting phase. n The injection-production rate is for the non-wetting phase.

[0041] Subsequently, the discretized pressure-saturation equations can be solved using the IMPES algorithm to obtain the saturation field and pressure field at the next time step. The saturation field at the next time step can include the saturation values ​​of each grid cell within the discrete spatial grid at the next time step, i.e. The pressure field at the next time step can include the pressure values ​​of each grid cell within the discrete spatial grid at the next time step, i.e., p t+1 .

[0042] Finally, step S5 is executed to increase the current hydrogen ratio, and the saturation field and pressure field at the next moment are used as the current saturation field and pressure field. The above process is repeated until the pressure field of the discrete space grid converges.

[0043] Initially, the hydrogen ratio is 0. As the injection time of the injected gas increases, the hydrogen ratio increases. Finally, when the pressure field of the discrete spatial grid converges, the hydrogen ratio is 1, which can realize the conversion of the natural gas reservoir into an underground hydrogen storage facility.

[0044] The method for converting a natural gas reservoir into an underground hydrogen storage facility provided in this embodiment of the invention first obtains the current hydrogen ratio in the injected gas of the porous medium of the natural gas reservoir and determines the current saturation field and current pressure field of the discrete spatial grid of the porous medium. Then, based on the current pressure field, the current mixed gas density of each grid cell in the discrete spatial grid is calculated, and based on the mole fraction of each gas component in the porous medium, the current mixed gas viscosity of each grid cell is calculated. Subsequently, based on the current mixed gas density, current mixed gas viscosity, current saturation field, and current pressure field, the current Darcy velocity of each grid cell is calculated. Subsequently, based on the current mixed gas density, mixed gas viscosity, current saturation field, and current Darcy velocity, a discretized pressure-saturation equation system is constructed to calculate the saturation field and pressure field at the next time step, and the discretized pressure-saturation equation system is solved to obtain the saturation field and pressure field at the next time step. Finally, the current hydrogen ratio is added, and the saturation field and pressure field at the next time step are used as the current saturation field and current pressure field, and the above process is repeated until the pressure field of the discrete spatial grid converges. This method uses natural gas reservoirs as underground hydrogen storage tanks. While extracting natural gas, a mixture of natural gas and hydrogen is injected. The proportion of hydrogen in the mixture increases with the extraction time, gradually transforming the natural gas reservoir into an underground hydrogen storage tank.

[0045] Based on the above embodiments, the step of solving the discretized pressure-saturation equations to obtain the saturation field and the pressure field at the next time step includes: Based on the pressure field at the next moment, the gas injection rate and the gas collection rate are adjusted when the gas injection mechanism and the gas collection mechanism are executed in the porous medium.

[0046] Specifically, after solving the discretized pressure-saturation equations to obtain the pressure field at the next moment, the gas injection rate and the gas extraction rate when the gas injection mechanism is executed in the porous medium can be adjusted according to the pressure field at the next moment. In this way, the pressure field of the discrete spatial grid can be adjusted and updated through the gas injection rate and the gas extraction rate.

[0047] Therefore, it can be seen that the injection-production rate used in the embodiments of the present invention is a non-constant injection-production rate, which can be expressed as: Among them, Fi The gas injection rate during the execution of the gas injection mechanism, expressed in meters per second (m). 3 / s;F p The gas extraction rate during the execution of the gas extraction mechanism, expressed in meters per second (m). 3 / s; b is the frequency, which can take values ​​of t represents time.

[0048] Based on the above embodiments, the adjustment of the gas injection rate and the gas extraction rate in the porous medium during the gas injection mechanism and the gas extraction mechanism, based on the pressure field at the next moment, includes: Determine the position information of the pressure value of each grid cell in the pressure field at the next moment within the pressure operating range of the porous medium; Based on the location information, the gas injection rate and the gas extraction rate are adjusted.

[0049] Specifically, when adjusting the gas injection rate and the gas extraction rate during the gas extraction mechanism in a porous medium, the position information of the pressure values ​​of each grid cell in the pressure field at the next moment within the porous medium pressure operating range can be determined first. Here, the porous medium pressure operating range refers to the expected circulating pressure range, which can be determined according to the actual situation of the porous medium and is not specifically limited here.

[0050] Subsequently, this location information can be used to adjust the injection and production rates. It is understood that the porous medium pressure operating range defines the upper and lower limits of the mixed gas pressure within the porous medium. The upper limit ensures the reservoir remains undamaged, while the lower limit ensures the gas supply capacity of the hydrogen storage facility. Therefore, while ensuring the mixed gas pressure within the porous medium fluctuates within the porous medium pressure operating range, the injection and production rates can be adjusted. By considering the synergy between the pressure operating range of the reservoir pore space and peak shaving during injection and production, the natural gas reservoir can be gradually converted into a safe and reliable underground hydrogen storage facility while simultaneously increasing its production capacity.

[0051] like Figure 2 As shown, based on the above embodiments, this embodiment of the invention provides a device for converting a natural gas reservoir into an underground hydrogen storage facility, comprising: The acquisition module 21 is used to acquire the current hydrogen ratio in the mixed components of the injected gas in the porous medium of the natural gas reservoir, and to determine the current saturation field and current pressure field of the discrete spatial grid of the porous medium; the mixed components include hydrogen and natural gas; The parameter calculation module 22 is used to calculate the current mixed gas density of each grid cell in the discrete spatial grid based on the current pressure field, and to calculate the current mixed gas viscosity of each grid cell based on the mole fraction of each gas component in the porous medium. The velocity calculation module 23 is used to calculate the current Darcy velocity of each grid cell based on the current mixed gas density, the mixed gas viscosity, the current saturation field, and the current pressure field. The pressure field update module 24 is used to construct a discretized pressure-saturation equation set for calculating the saturation field and pressure field at the next time step based on the mixed gas density, the mixed gas viscosity, the current saturation field, and the current Darcy flow velocity, and to solve the discretized pressure-saturation equation set to obtain the saturation field and pressure field at the next time step. The iterative execution module 25 is used to increase the current hydrogen ratio and use the next moment saturation field and the next moment pressure field as the current saturation field and the current pressure field, and repeat the above process until the pressure field of the discrete space grid converges.

[0052] Based on the above embodiments, the natural gas reservoir conversion underground hydrogen storage device provided in this embodiment of the invention further includes a rate regulation module for: Based on the pressure field at the next moment, the gas injection rate and the gas collection rate are adjusted when the gas injection mechanism and the gas collection mechanism are executed in the porous medium.

[0053] Based on the above embodiments, the natural gas reservoir conversion underground hydrogen storage device provided in this embodiment of the invention, wherein the rate regulation module is specifically used for: Determine the position information of the pressure value of each grid cell in the pressure field at the next moment within the pressure operating range of the porous medium; Based on the location information, the gas injection rate and the gas extraction rate are adjusted.

[0054] Based on the above embodiments, the parameter calculation module of the natural gas reservoir conversion underground hydrogen storage device provided in this embodiment of the invention is specifically used for: Based on the current pressure field, the current mixed gas density of each grid cell is calculated using the SRK-EOS equation of state.

[0055] Based on the above embodiments, the parameter calculation module of the natural gas reservoir conversion underground hydrogen storage device provided in this embodiment of the invention is specifically used for: Based on the mole fraction of each gas component, the viscosity of the current mixed gas in each grid cell is calculated using a viscosity model.

[0056] Based on the above embodiments, the flow rate calculation module of the natural gas reservoir conversion underground hydrogen storage device provided in this embodiment of the invention is specifically used for: Based on the current mixed gas density, the current mixed gas viscosity, the current saturation field, and the current pressure field, Darcy's law is applied to calculate the current Darcy velocity of each grid cell.

[0057] Specifically, the functions of each module in the natural gas reservoir conversion underground hydrogen storage device provided in this embodiment of the invention correspond one-to-one with the operation flow of each step in the above-mentioned method-like embodiments, and the achieved effects are also the same. For details, please refer to the above embodiments, and this will not be repeated in this embodiment of the invention.

[0058] Figure 3 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 3 As shown, the electronic device may include a processor 310, a communications interface 320, a memory 330, and a communication bus 340. The processor 310, communications interface 320, and memory 330 communicate with each other via the communication bus 340. The processor 310 can call logical instructions stored in the memory 330 to execute the natural gas reservoir conversion into an underground hydrogen storage facility provided in the above embodiments.

[0059] Furthermore, the logical instructions in the aforementioned memory 330 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to related technologies, or a portion 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 described in the various embodiments of the present 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.

[0060] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the method for converting a natural gas reservoir into an underground hydrogen storage facility provided in the above embodiments.

[0061] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the method for converting a natural gas reservoir into an underground hydrogen storage facility provided in the above embodiments.

[0062] The device embodiments described above are merely illustrative. 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 modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0063] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of software products. These computer software products can be stored in computer-readable storage media, such as ROM / RAM, magnetic disks, optical disks, etc., and include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or certain parts of the embodiments.

[0064] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for converting a natural gas reservoir into an underground hydrogen storage facility, characterized in that, include: The current hydrogen content in the injected gas of the porous medium of the natural gas reservoir is obtained, and the current saturation field and current pressure field of the discrete spatial grid of the porous medium are determined; the injected gas includes hydrogen and natural gas. Based on the current pressure field, calculate the current mixed gas density of each grid cell in the discrete spatial grid, and calculate the current mixed gas viscosity of each grid cell based on the mole fraction of each gas component in the porous medium. Based on the current mixed gas density, the current mixed gas viscosity, the current saturation field, and the current pressure field, calculate the current Darcy velocity of each grid cell; Based on the current mixed gas density, the current mixed gas viscosity, the current saturation field, and the current Darcy velocity, a discretized pressure-saturation equation set is constructed to calculate the saturation field and the pressure field at the next time step. The discretized pressure-saturation equation set is then solved to obtain the saturation field and the pressure field at the next time step. Increase the current hydrogen ratio, and use the next time-instance saturation field and the next time-instance pressure field as the current saturation field and the current pressure field. Repeat the above process until the pressure field of the discrete spatial grid converges.

2. The method for converting a natural gas reservoir into an underground hydrogen storage facility according to claim 1, characterized in that, The process of solving the discretized pressure-saturation equations to obtain the saturation field and pressure field at the next time step includes: Based on the pressure field at the next moment, the gas injection rate and the gas collection rate are adjusted when the gas injection mechanism and the gas collection mechanism are executed in the porous medium.

3. The method for converting a natural gas reservoir into an underground hydrogen storage facility according to claim 2, characterized in that, The adjustment of the gas injection rate and the gas extraction rate in the porous medium based on the pressure field at the next moment includes: Determine the position information of the pressure value of each grid cell in the pressure field at the next moment within the pressure operating range of the porous medium; Based on the location information, the gas injection rate and the gas extraction rate are adjusted.

4. The method for converting a natural gas reservoir into an underground hydrogen storage facility according to any one of claims 1-3, characterized in that, The calculation of the current mixed gas density of each grid cell in the discrete spatial grid based on the current pressure field includes: Based on the current pressure field, the current mixed gas density of each grid cell is calculated using the SRK-EOS equation of state.

5. The method for converting a natural gas reservoir into an underground hydrogen storage facility according to any one of claims 1-3, characterized in that, The step of calculating the current mixed gas viscosity of each grid cell based on the mole fraction of each gas component in the porous medium includes: applying a viscosity model to calculate the current mixed gas viscosity of each grid cell based on the mole fraction of each gas component.

6. The method for converting a natural gas reservoir into an underground hydrogen storage facility according to any one of claims 1-3, characterized in that, The calculation of the current Darcy velocity of each grid cell based on the current mixed gas density, the current mixed gas viscosity, the current saturation field, and the current pressure field includes: Based on the current mixed gas density, the current mixed gas viscosity, the current saturation field, and the current pressure field, Darcy's law is applied to calculate the current Darcy velocity of each grid cell.

7. A device for converting a natural gas reservoir into an underground hydrogen storage facility, characterized in that, include: The acquisition module is used to acquire the current hydrogen ratio in the mixed components of the injected gas in the porous medium of the natural gas reservoir, and to determine the current saturation field and current pressure field of the discrete spatial grid of the porous medium. The mixture includes hydrogen and natural gas; The parameter calculation module is used to calculate the current mixed gas density of each grid cell in the discrete spatial grid based on the current pressure field, and to calculate the current mixed gas viscosity of each grid cell based on the mole fraction of each gas component in the porous medium. The velocity calculation module is used to calculate the current Darcy velocity of each grid cell based on the current mixed gas density, the current mixed gas viscosity, the current saturation field, and the current pressure field. The pressure field update module is used to construct a discretized pressure-saturation equation set for calculating the saturation field and pressure field at the next time step based on the current mixed gas density, the current mixed gas viscosity, the current saturation field, and the current Darcy velocity, and to solve the discretized pressure-saturation equation set to obtain the saturation field and pressure field at the next time step. The iterative execution module is used to increase the current hydrogen ratio and use the next moment's saturation field and the next moment's pressure field as the current saturation field and the current pressure field, and repeat the above process until the pressure field of the discrete spatial grid converges.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method for converting a natural gas reservoir into an underground hydrogen storage facility as described in any one of claims 1-6.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method for converting a natural gas reservoir into an underground hydrogen storage facility as described in any one of claims 1-6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the method for converting a natural gas reservoir into an underground hydrogen storage facility as described in any one of claims 1-6.