Method and equipment for tracking inhibitors in multiphase mixed pipelines

Through segmented simulation and calculation, real-time monitoring of the distribution of inhibitors in multi-phase mixed pipelines solves the problem of the inability to accurately simulate the distribution patterns of inhibitors in multi-phase mixed pipelines in the existing technology, ensuring the safety and stability of deep sea gas field development. run.

CN114818217BActive Publication Date: 2024-09-13CHINA UNIV OF PETROLEUM (BEIJING)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210481069.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-05
Publication Date
2024-09-13
Estimated Expiration
2042-05-05

AI Technical Summary

Technical Problem

Existing technology cannot accurately simulate the distribution pattern of inhibitors in multiphase mixed pipelines, resulting in safety hazards caused by hydrate formation and unstable production operations in deep sea gas field development.

Method used

By obtaining the initial and changing composition of the fluid in the pipeline section, using the three-phase flash evaporation calculation method and the gas-liquid two-phase flow calculation method, the concentration distribution of the inhibitor in the pipeline is simulated in sections, and the distribution of the inhibitor is monitored in real time to ensure the hydrate Prevention and control effect.

Benefits of technology

It achieves accurate monitoring of inhibitor concentration distribution in multi-phase mixed pipelines, ensures the safe operation of pipelines, reduces the number of monitoring equipment, and saves manpower and material resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114818217B
    Figure CN114818217B
Patent Text Reader

Abstract

The present application provides a method and device for tracking inhibitors in a multiphase mixed pipeline, which relates to the field of oil and natural gas development. The method includes obtaining the total composition of the fluid in the pipe section at the first moment; judging whether the fluid composition at the inlet of the pipe section at the second moment has changed according to the time of adding the inhibitor; if so, obtaining the fluid composition at the inlet of the pipe section at the second moment, and obtaining the total composition of the fluid in the pipe section at the second moment according to the fluid composition at the inlet of the pipe section at the second moment; if not, obtaining the total composition of the fluid in the pipe section at the second moment according to the total composition at the first moment; obtaining the inhibitor concentration distribution in the pipeline according to the total composition of the fluid in all pipe sections at the second moment. The method of the present application can achieve the monitoring effect of the concentration distribution of the inhibitor in the pipeline. The whole process is carried out in sections, and the simulation calculation process can be combined with the on-site situation in real time, so as to timely track the distribution of the inhibitor in the pipeline. The simulation results are more accurate and reliable, saving a lot of manpower and material resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to oil and gas development, and in particular to a method and device for tracking inhibitors in a multiphase mixed pipeline. Background Art

[0002] In the development of deep-sea gas fields, the commonly used oil and gas gathering and transportation mode is submarine mixed pipeline transportation. However, the complex environment of high pressure and low temperature on the deep seabed will inevitably cause safety flow obstacles in the pipeline system. The main challenge of offshore development is to ensure the unimpeded flow of hydrocarbons, and the treatment of solids such as hydrates is the key to the feasibility of deep-sea development. Therefore, in the process of gathering and transportation, it is very common to add inhibitors, especially in the development of deep-sea gas fields. Under certain conditions, liquid water in the pipeline will form gas hydrates with natural gas, and hydrate inhibitors need to be added to prevent ice blockage.

[0003] Hydrates are sediments that must be controlled in seabed flow assurance. The control methods mainly include traditional inhibition and risk control. Traditional thermodynamic inhibitors have been used for many years. Common thermodynamic inhibitors include ethylene glycol and methanol. After adding such inhibitors to natural gas, the chemical potential of the aqueous solution or hydrate phase can be changed, so that the formation conditions of hydrates move to a lower temperature or higher pressure range. At present, the most commonly used thermodynamic organic hydrate inhibitors in engineering design project applications and literature records are methanol and ethylene glycol.

[0004] The type, dosage, injection time, and injection method of inhibitors are closely related to the hydrate prevention and control effect. Therefore, it is crucial to formulate an appropriate hydrate inhibitor injection system for different working conditions. In actual projects, there are several problems after adding inhibitors to pipelines: First, in order to ensure the safety of production and operation, a more conservative dosage is usually used in the project, with a large safety margin, which needs to be optimized; second, inhibitors are usually injected upstream. After adding inhibitors, the agent flows with the fluid, and the operating state in the pipeline is changing. For example, the water volume changes caused by gas condensation in the pipeline and the effluent accumulation caused by the undulating terrain will affect the concentration distribution of the inhibitor in the pipeline, thereby affecting the effect of the inhibitor. Gas hydrates may still form along the pipeline, posing a safety hazard. Tracking the distribution of inhibitors in the pipeline through algorithm simulation is a solution to the above problems, but there is currently no simulation method that can accurately simulate the distribution law of inhibitors in multiphase mixed pipelines. Summary of the invention

[0005] The present application provides a method and device for tracking inhibitors in a multiphase mixed pipeline, which are used to solve the problem that there is no simulation method that can accurately simulate the distribution law of inhibitors in a multiphase mixed pipeline.

[0006] In a first aspect, the present application provides a method for tracking inhibitors in a multiphase mixed pipeline, comprising:

[0007] Obtain the total composition of the fluid in the pipe section at the first moment;

[0008] According to the inhibitor addition time, determine whether the fluid composition at the inlet of the pipe segment at the second moment changes; if so, obtain the fluid composition at the inlet of the pipe segment at the second moment, and obtain the total composition of the fluid in the pipe segment at the second moment according to the fluid composition at the inlet of the pipe segment at the second moment; if not, obtain the total composition of the fluid in the pipe segment at the second moment according to the total composition at the first moment, wherein the second moment is the moment after the inhibitor is added, and the pipeline is divided into a plurality of pipe segments of equal length;

[0009] According to the total composition of the fluid in all pipe sections at the second moment, the inhibitor concentration distribution in the pipeline is obtained.

[0010] In a possible design, judging whether the fluid composition at the inlet of the pipe section at the second moment has changed according to the duration of adding the inhibitor includes:

[0011] According to the three-phase flash evaporation calculation method, the phase flow rate at the inlet of the pipe section is obtained;

[0012] According to the inhibitor addition time, the distance that each phase fluid flows in the pipeline is obtained;

[0013] Determine whether the flow distance is greater than the length of the pipe section. If so, the total composition of the pipe section outlet changes.

[0014] In a possible design, the step of obtaining the total composition of the fluid in the pipe section at the first moment includes:

[0015] According to the three-phase flash calculation method and the gas-liquid two-phase flow calculation method, the total composition of any pipe section at the first moment is obtained:

[0016]

[0017] In the formula, is the total amount of component i in the nth pipe section at t = 0; C i,gas is the mole fraction of component i in the gas phase; C gas is the gas phase mole fraction; C i,liq is the mole fraction of component i in the liquid phase; C liq is the liquid phase mole fraction; v g is the gas phase velocity; v l is the liquid phase velocity.

[0018] In a possible design, obtaining the fluid composition at the inlet of the pipe section at the second moment includes:

[0019] According to the change of the amount of material in the pipe section at the second moment, a component update calculation model is constructed:

[0020]

[0021] According to the component update calculation model, the total composition of the pipe section at the second time t is obtained:

[0022]

[0023] In the formula, is the amount of substance of component i in phase x of the nth pipe segment at time t; is the amount of substance of component i in phase x of the nth pipe segment at the previous time t-Δt; is the amount change of component i in phase x within the time step Δt; is the total amount of substance of component i in the nth pipe section at time t; x represents any one of the three phases: oil phase, gas phase or water phase.

[0024] In a possible design, the change in the amount of the substance in the pipe section at the second moment is calculated according to the three-phase flash evaporation calculation method and the gas-liquid two-phase flow calculation method, including:

[0025]

[0026]

[0027] In the formula, Q mx is the mass flow rate of phase x; M x is the molar specific gravity of phase x; is the mole fraction of component i in phase x of the nth pipe segment at the previous time t-Δt; is the molar flow rate of component i in phase x of the nth pipe segment at the previous time t-Δt; Δt is the time step; is the molar flow rate of component i in the phase x of the n-1th pipe segment at the previous time t-Δt.

[0028] In a possible design, obtaining the inhibitor concentration distribution in the pipeline according to the total composition of the fluid in all the pipe sections at the second moment includes:

[0029] According to the total composition of the fluid in each pipe section, the molar fraction of the inhibitor in the gas phase, oil phase and water phase in each pipe section is obtained by the three-phase flash calculation method;

[0030] According to the mole fractions of the inhibitor in the gas phase, oil phase and water phase in all pipe sections, the inhibitor concentration distribution in the pipeline is obtained.

[0031] In a possible design, before obtaining the total composition at the first moment of the pipe section inlet and the inhibitor addition duration, the method further includes:

[0032] According to the preset pressure drop and the preset temperature drop, the phase distribution and fluid properties of the pipe section are obtained by the three-phase flash calculation method;

[0033] According to the phase distribution of the pipe section and the physical properties of the fluid, the first temperature drop and the first pressure drop are obtained by using the gas-liquid two-phase flow calculation method;

[0034] Determine whether the difference between the first temperature drop and the preset temperature drop is less than the first error. If so, determine whether the difference between the first pressure drop and the preset pressure drop is less than the second error. If so, determine that the components of each phase of the pipe section are actual components. Otherwise, return the first temperature drop and the first pressure drop as the preset temperature drop and the preset pressure drop respectively.

[0035] In a second aspect, the present application provides a multiphase mixed pipeline inhibitor distribution simulation device, comprising:

[0036] An acquisition module, used for acquiring the total composition of the fluid in the pipe section at the first moment;

[0037] A judgment module, judging whether the fluid composition at the inlet of the pipe segment at a second moment has changed according to the time of adding the inhibitor, if so, obtaining the fluid composition at the inlet of the pipe segment at the second moment, and obtaining the total composition of the fluid in the pipe segment at the second moment according to the fluid composition at the inlet of the pipe segment at the second moment, if not, obtaining the total composition of the fluid in the pipe segment at the second moment according to the total composition at the first moment, wherein the second moment is the moment after the inhibitor is added, and the pipeline is divided into a plurality of pipe segments of equal length;

[0038] The processing module is used to obtain the inhibitor concentration distribution in the pipeline according to the total composition of the fluid in all the pipe sections at the second moment.

[0039] In one possible design, it also includes:

[0040] The iterative module is used to obtain the phase distribution and fluid properties of the pipe section through a three-phase flash evaporation calculation method according to the preset pressure drop and the preset temperature drop; obtain the first temperature drop and the first pressure drop through a gas-liquid two-phase flow calculation method according to the phase distribution and the fluid properties of the pipe section; judge whether the difference between the first temperature drop and the preset temperature drop is less than the first error, if so, judge whether the difference between the first pressure drop and the preset pressure drop is less than the second error, if so, determine that the components of each phase of the pipe section are actual components, otherwise, return the first temperature drop and the first pressure drop to the preset pressure drop and the preset temperature drop respectively.

[0041] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;

[0042] The memory stores computer-executable instructions;

[0043] The processor executes the computer-executable instructions stored in the memory to implement a multi-phase mixed pipeline inhibitor tracking method.

[0044] The multiphase mixed pipeline inhibitor tracking method and device provided by the present application obtains the total composition of the first moment of the inlet of the pipe segment and the inhibitor addition time for two adjacent pipe segments in the pipeline; judges whether the fluid composition at the inlet of the pipe segment at the second moment changes according to the inhibitor addition time; if so, obtains the fluid composition at the inlet of the pipe segment at the second moment, and obtains the total composition of the fluid in the pipe segment at the second moment according to the fluid composition at the inlet of the pipe segment at the second moment; if not, obtains the total composition of the fluid in the pipe segment at the second moment according to the total composition at the first moment; obtains the inhibitor concentration distribution in the pipeline according to the total composition of the fluid in all pipe segments at the second moment, realizes the monitoring effect of the inhibitor concentration distribution in the pipeline, facilitates the prevention and control of hydrate formation, and ensures the safe operation of the pipeline; the whole process is carried out in sections, and the simulation calculation process can be combined with the on-site situation in real time, so as to timely track the distribution of the inhibitor in the pipeline; because the segmented simulation recursion is consistent with the actual fluid flow law, the simulation result is more accurate and reliable, avoiding the arrangement of too many monitoring equipment in the pipeline, saving a lot of manpower and material resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0046] Figure 1 A multiphase fluid pipeline model provided for this application;

[0047] Figure 2 A flow chart of the multiphase mixed pipeline inhibitor tracking method provided in this application;

[0048] Figure 3 A flow chart of the component update determination method provided in this application;

[0049] Figure 4 A flow chart of a mathematical model for the application of the inhibitor tracking method for a multiphase mixed pipeline provided in this application;

[0050] Figure 5a Schematic diagram of temperature and pressure distribution along the pipeline provided for this application;

[0051] Figure 5b Schematic diagram of liquid holdup and water content distribution along the pipeline provided for this application;

[0052] Figure 5cA schematic diagram of the inhibitor concentration distribution curve in the gas phase provided in this application;

[0053] Figure 5d A schematic diagram of the inhibitor concentration distribution curve in the oil phase provided in this application;

[0054] Figure 5e A schematic diagram of the inhibitor concentration distribution curve in the aqueous phase provided in this application;

[0055] Figure 6 A schematic diagram of the structure of a multiphase mixed pipeline inhibitor distribution simulation device provided in this application;

[0056] Figure 7 A schematic diagram of the structure of the electronic device provided in this application. DETAILED DESCRIPTION

[0057] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation methods described in the following exemplary embodiments do not represent all implementation methods consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims, rather than all embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0058] First, the terms involved in this application are explained:

[0059] Multiphase fluid pipeline model: refers to a physical model that simplifies the flow process of multiphase fluid in a pipeline into an orderly flow of each phase partition in the pipeline.

[0060] Three-phase flash calculation model: refers to solving the ratio of the composition and quantity of each phase that reaches equilibrium under a certain temperature and pressure when the total composition of the system is known. Using the gas, oil, and water three-phase flash calculation model, the composition of each phase of oil, gas, and water when reaching equilibrium under certain temperature and pressure conditions can be calculated based on the total amount of substance in the given fluid, as well as the mass fraction, volume fraction, mole fraction and other parameters of each phase; and then the physical properties of each phase can be obtained, including: density, viscosity, surface tension, molar mass, etc., as well as basic data such as mass flow rate, volume flow rate, flow velocity, and molar flow rate of each phase. Specifically including:

[0061] When different phases come into contact with each other, they will exchange substances until the properties of each phase (such as temperature, pressure, composition, etc.) no longer change, which is considered to be in phase equilibrium. Therefore, the criterion for phase equilibrium is: the pressure, temperature and chemical potential of each phase are the same, which means that there is no transfer of heat, momentum and mass between the phases. The isothermal flash calculation is used to obtain the composition, quantity and properties of each phase after the mixture is separated at a certain temperature and pressure.

[0062] First calculate the corresponding initial value of the equilibrium constant:

[0063]

[0064] in, is the initial equilibrium constant between the gas phase and the hydrocarbon-rich phase, is the initial equilibrium constant between the gas phase and the water-rich phase; P ci is the critical pressure of component i, kPa; T ci is the critical temperature of component i, K; P is the system pressure, kPa; T is the system temperature, K; ω i is the eccentricity factor of component i.

[0065] Based on this, the material conservation equation is calculated and solved to obtain the phase fraction under this condition:

[0066]

[0067]

[0068] In the formula, the gas phase fraction is α; the hydrocarbon-rich liquid phase fraction is β; z i is the molar composition of component i in the mixed system; K i,1 is the equilibrium constant between the gas phase and the hydrocarbon-rich liquid phase, K i,2 is the equilibrium constant between the gas phase and the water-rich phase.

[0069] According to the equilibrium constant and the obtained phase fraction, the components of each phase are updated and normalized, and an appropriate thermodynamic model is selected to solve the fugacity of each component in each phase and determine whether the fugacity equality principle is met. The thermodynamic model adopts the PengRobinson equation:

[0070]

[0071] In the formula, a and b are two characteristic parameters, and various components have different parameter values.

[0072] If it is not in equilibrium, the calculation will be repeated according to the updated equilibrium constant until the equilibrium state is reached by satisfying the fugacity equality principle.

[0073] Flow characteristics calculation model: refers to the gas-liquid two-phase flow calculation method, including the Beggs-Brill method to calculate the pressure drop and the Joule-Thomson effect formula to calculate the temperature drop. Specifically include:

[0074] Beggs-Brill method to calculate pressure drop:

[0075]

[0076] Where p is pressure, MPa; Z is flow direction, m; ρ l is the liquid density, kg / m 3 ρ g is the gas phase density, kg / m 3 ; g is the acceleration due to gravity, m / s 2 ;H l is the liquid holdup, dimensionless; v is the average velocity of the mixture, m / s; θ is the angle between the pipeline and the horizontal direction, °; ​​λ is the flow resistance coefficient; D is the inner diameter of the pipeline, m; A is the cross-sectional area of ​​the pipeline, m 2 ;v sg is the superficial velocity of the gas phase, m / s.

[0077] Calculate the temperature drop using the Joule-Thomson effect:

[0078]

[0079]

[0080] Where, T Q 、T z is the starting and ending temperature of the calculated pipeline unit, K; P Q , P Z is the starting and ending pressure of the calculated pipeline unit, Pa; T0 is the ambient temperature, K; L is the length of the calculated pipeline unit, m; x wg is the gas phase mass fraction; K is the total heat transfer coefficient, W / (m 2 ·K); D i is the Joule-Thomson coefficient; c pg is the constant pressure specific heat capacity of the gas, kJ / (kg·℃); c p is the specific heat of the mixture at constant pressure, kJ / (kg·℃); i is the hydraulic gradient of the liquid, m / m.

[0081] Figure 1 The multiphase fluid pipeline model provided for this application. Figure 1As shown, the pipeline includes gas phase fluid and liquid phase fluid, and the liquid phase fluid can be divided into oil phase fluid and water phase fluid. Therefore, the fluid in the pipeline is a multiphase fluid composed of gas phase, oil phase and water phase. Since the flow condition of the multiphase mixed pipeline is relatively complex and the fluid may be in a changing state at any time, it is difficult to measure or predict the distribution of the inhibitor in the pipeline with the prior art. The multiphase mixed pipeline inhibitor tracking method provided by the present application divides the pipeline into multiple segments with a length of ΔL. Any segment is represented by n. Then, along the fluid flow direction, the upstream node of the nth segment is the n-1th segment. The current moment is represented by t. The time step of the fluid flowing through the segment is Δt. The moment when the fluid does not flow through the segment is t-Δt. The multiphase fluid pipeline model is used to determine the change of fluid components in segments, thereby realizing real-time tracking of inhibitor components. The method can be used in the flow safety guarantee of submarine gathering and transportation pipelines or the intelligent software of oil and gas fields, aiming to solve the above technical problems of the prior art.

[0082] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0083] Figure 2 This is a flow chart of the multiphase mixed pipeline inhibitor tracking method provided in this application. Figure 2 As shown, a multiphase mixed pipeline inhibitor tracking method includes:

[0084] S201, obtaining the total composition of the fluid in the pipe section at the first moment.

[0085] The multiphase mixed pipeline is divided into multiple pipe sections according to the multiphase fluid pipeline model. Each pipe section can be considered as an idealized control unit with uniform data such as temperature and pressure. By calculating the total composition changes between two adjacent pipe sections over time and combining them according to the pipe section distribution, the distribution of each component in the entire pipeline can be determined. First, it is necessary to obtain the total composition at the first moment at the entrance of the pipe section in the initial state, and determine the pipe section through which the inhibitor flows in the pipeline by the inhibitor addition time. If no inhibitor is added or the inhibitor is in a stable addition state, the fluid components in the pipeline are in a stable flow state, and the total composition at the first moment at the entrance of the pipe section is the same as the total composition of all subsequent pipe sections. At this time, the three-phase flash evaporation calculation model and the flow characteristic calculation model can be used to calculate the mole fraction, composition, and flow rate of each phase under the conditions of average temperature and average pressure in the pipe, and then the total composition of each pipe section can be obtained according to the mole fraction and flow rate of each phase.

[0086] S202. Determine whether the fluid composition at the inlet of the pipe segment at a second moment has changed based on the duration of adding the inhibitor. If so, obtain the fluid composition at the inlet of the pipe segment at the second moment, and obtain the total composition of the fluid in the pipe segment at a second moment based on the fluid composition at the inlet of the pipe segment at the second moment. If not, obtain the total composition of the fluid in the pipe segment at a second moment based on the total composition at the first moment, wherein the second moment is the moment after the inhibitor is added, and the pipeline is divided into a plurality of pipe segments of equal length.

[0087] Since the flow rate of each phase is known, the length of the inhibitor flowing in the pipeline can be obtained according to the time of adding the inhibitor. By comparing the length of the inhibitor flowing with the length of the pipe section, the pipe section through which the inhibitor flows can be determined. When the length of the inhibitor flowing is less than a certain pipe section length, it means that the inhibitor has not flowed out of the pipe section. At this time, all pipe sections after the pipe section still maintain the component content of the total composition at the first moment. When the length of the inhibitor flowing is greater than a certain pipe section length, it means that the inhibitor has flowed out of the pipe section and entered the next pipe section. At this time, the total composition of the pipe section needs to be updated. The total composition of the pipe section at the second moment is the sum of the total amount of substance at the previous time step and the total amount of substance in the changing time step. The total amount of substance at the previous time step can be recursively calculated to the initial total composition at the first moment, and the total amount of substance in the changing time step can be obtained by calculating the difference in the total amount of substance between the inlet and outlet of the pipe section. The total amount of substance at the inlet and outlet can be obtained by the difference in the inlet and outlet molar flow rates and the changing time step, respectively.

[0088] S203. Obtain inhibitor concentration distribution in the pipeline according to the total composition of the fluid in all pipe sections at the second moment.

[0089] According to the total composition of the fluid in the pipe section, the mole fraction of each component in the gas phase, oil phase and water phase in the pipe section can be obtained by using the three-phase flash evaporation calculation method, and then the mole fraction of the inhibitor component in each composition in the three phases can be screened out to obtain the concentration distribution of the inhibitor in the pipeline.

[0090] The method provided in this embodiment obtains the total composition of the fluid in the pipe segment at the first moment; determines whether the fluid composition at the inlet of the pipe segment at the second moment changes according to the inhibitor addition time; if so, obtains the fluid composition at the inlet of the pipe segment at the second moment, and obtains the total composition of the fluid in the pipe segment at the second moment according to the fluid composition at the inlet of the pipe segment at the second moment; if not, obtains the total composition of the fluid in the pipe segment at the second moment according to the total composition at the first moment; obtains the inhibitor concentration distribution in the pipeline according to the total composition of the fluid in all pipe segments at the second moment, and calculates in sections, thereby realizing the monitoring of the inhibitor concentration distribution in the pipeline, facilitating the prevention and control of hydrate formation, and ensuring the safe operation of the pipeline.

[0091] The multiphase mixed pipeline inhibitor tracking method of the present application is described in detail below with reference to a specific embodiment.

[0092] According to the preset pressure drop and the preset temperature drop, the phase distribution and fluid properties of the pipe section are obtained by the three-phase flash evaporation calculation method; according to the phase distribution and fluid properties of the pipe section, the first temperature drop and the first pressure drop are obtained by the gas-liquid two-phase flow calculation method; it is determined whether the difference between the first temperature drop and the preset temperature drop is less than the first error, if so, it is determined whether the difference between the first pressure drop and the preset pressure drop is less than the second error, if so, it is determined that the components of each phase of the pipe section are actual components, otherwise, the first temperature drop and the first pressure drop are returned as the preset temperature drop and the preset pressure drop respectively.

[0093] The three-phase flash evaporation calculation model can be used to obtain basic data such as density, viscosity, surface tension, mass flow rate, JT effect coefficient, and specific heat capacity at constant pressure of each phase. Therefore, after obtaining the temperature drop and pressure drop of the pipeline, the temperature and pressure data of the end point of the pipeline section and the average temperature and average pressure of the pipeline section can be calculated. First, it is assumed that the components along the pipeline are all inlet fluid components. According to the three-phase flash evaporation calculation model and the flow characteristic calculation model, the molar fraction and composition of each phase and the flow rate of each phase under the average temperature and pressure of the pipeline section can be calculated. At subsequent moments, if the amount of inhibitor added changes, that is, the inlet fluid component changes, according to the change of the new fluid component, the flow rate of each phase is obtained through the three-phase flash evaporation calculation model and the flow parameter calculation model to determine the component change moment of each pipeline section, and then the updated component is calculated according to the component update model.

[0094] Get the total composition of the fluid in the pipe segment at the first moment, including:

[0095] According to the three-phase flash calculation method and the gas-liquid two-phase flow calculation method, the total composition of any pipe section at the first moment is obtained:

[0096]

[0097] In the formula, is the total amount of component i in the nth pipe section at t = 0, mol; C i,gas is the mole fraction of component i in the gas phase; C gas is the gas phase mole fraction; C i,liq is the mole fraction of component i in the liquid phase; C liq is the liquid phase mole fraction; v g is the gas phase velocity, m / s; v l is the liquid phase velocity, m / s.

[0098] Figure 3 This is a flow chart of the component update judgment method provided in this application. Figure 3As shown, judging whether the fluid composition at the inlet of the pipe section at the second moment changes according to the inhibitor addition time includes:

[0099] S301, according to the three-phase flash evaporation calculation method, obtain the phase flow rate at the inlet of the pipe section; the phase flow rate includes the gas phase flow rate and the water-oil phase flow rate;

[0100] S302, according to the inhibitor addition time, obtain the distance that each phase fluid flows in the pipeline; by multiplying the phase flow rate by the inhibitor addition time, the flow distance of each phase in the pipeline can be obtained;

[0101] S303, determine whether the flow distance is greater than the length of the pipe segment, if so, the total composition of the pipe segment outlet changes, if not, the total composition of the pipe segment outlet does not change and is consistent with the total composition of the pipe segment inlet.

[0102] If the total composition at the outlet of the pipe segment changes, the fluid composition at the inlet of the pipe segment at a second moment is obtained, and the total composition of the fluid in the pipe segment at a second moment is obtained according to the fluid composition at the inlet of the pipe segment at the second moment.

[0103] According to the change of the amount of material in the pipe section at the second moment, a component update calculation model is constructed:

[0104]

[0105] According to the component update calculation model, the total composition of the pipe section at the second time t is obtained:

[0106]

[0107] In the formula, is the amount of substance of component i in phase x of the nth pipe segment at time t, mol; is the amount of substance of component i in phase x of the nth pipe segment at the previous time t-Δt, mol; is the amount of substance change of component i in phase x within the time step Δt, mol; is the total amount of substance of component i in the nth pipe section at time t, mol; x represents any one of the three phases: oil phase, gas phase or water phase.

[0108] According to the three-phase flash evaporation calculation method and the gas-liquid two-phase flow calculation method, the change in the amount of the substance in the pipe section at the second moment is calculated, including:

[0109]

[0110]

[0111] In the formula, Q mx is the mass flow rate of phase x, kg / s; M xis the molar specific gravity of phase x, kg / mol; is the mole fraction of component i in phase x of the nth pipe segment at the previous time t-Δt; is the molar flow rate of component i in phase x of the nth pipe segment at the previous time t-Δt, mol / s; Δt is the time step; is the molar flow rate of component i in phase x of the n-1th pipe segment at the previous time t-Δt, mol / s.

[0112] Finally, according to the total composition of the fluid in all pipe sections at the second moment, the inhibitor concentration distribution in the pipeline is obtained, including:

[0113] According to the total composition of the fluid in each pipe section, the mole fraction of the inhibitor in the gas phase, oil phase and water phase in each pipe section is obtained by the three-phase flash evaporation calculation method; according to the mole fraction of the inhibitor in the gas phase, oil phase and water phase in all pipe sections, the inhibitor concentration distribution in the pipeline is obtained.

[0114] Figure 4 This is a flow chart of the mathematical model for the application of the multiphase mixed pipeline inhibitor tracking method provided in this application. Figure 4 As shown, the multiphase mixed pipeline inhibitor tracking simulation calculation method includes:

[0115] S401. Obtain basic data, including: pipeline inlet fluid pressure, temperature, composition, mass flow, pipeline diameter, wall thickness, pipeline mileage elevation, ambient temperature, total heat transfer coefficient and other parameters, as well as the number of pipe sections N, pipe section length △L, time step △t, simulation time T′, and the starting pressure P of the pipe section at the inlet. Q , Pipe inlet temperature T Q .

[0116] S402, for each time t, start calculating from the pipe section at the starting point, preliminarily calculate the pressure drop △P0 and temperature drop △T0 of the pipe section, and obtain the terminal pressure P Z , terminal temperature T Z According to the flash evaporation calculation model, the mole fraction, mass fraction, density, viscosity, surface tension and other parameters of the oil, gas and water phases in the pipeline are obtained based on the average pressure P and average temperature T of the pipeline section.

[0117] S403. Calculate the pressure drop △P and temperature drop △T by the water thermodynamic model according to the parameters obtained in S402, and determine whether |△P-△P0|<ε1, |△T-△T0|<ε2 holds, that is, whether the error values ​​between the calculated pressure drop and temperature drop and the designed pressure drop and temperature drop meet the preset requirements; if not, set △P0=△P, △T0=△T, and return to S402.

[0118] S404, if yes, calculate the components of each pipe segment, initialize the components of the pipe segment fluid at time t=0; at subsequent times, calculate the components of the three phases of oil, gas and water in each pipe segment in turn according to the component update model.

[0119] S405, determine whether n>N is true, if so, proceed to the next step; if not, set n=n+1, use the temperature and pressure conditions of the end point of the previous pipe section as the temperature and pressure conditions of the starting point of the next section, and return to S402.

[0120] S406. Determine whether t>T′. If so, the calculation ends and the results are output, including data such as temperature and pressure along the pipeline, water content, and inhibitor concentration in each phase. If not, set t=t+△t and return to S402 until the simulation time T′ is reached.

[0121] In a specific implementation, basic data is obtained as shown in Table 1-3 below:

[0122] Table 1 Inlet fluid composition

[0123]

[0124]

[0125] Table 2 Elevation mileage along the pipeline

[0126] Mileage (km) 0 4 8 12 16 Elevation(m) 0 350 210 490 280

[0127] Table 3 Pipeline parameters

[0128]

[0129] According to Table 1-3 above, basic data are obtained. The number of pipe sections N is 80, the length of the pipe section △L=200m, the time step △t=50s, the simulation time T′=3h, and the starting pressure of the pipe section at the inlet P Q =9962kPa, temperature T Q =306.15K.

[0130] Starting from the pipe section at the starting point, the unit pressure drop of the pipe section is calculated initially, △P0 / △L=50Pa / m, and the temperature drop is △T0=0.5K, and the terminal pressure P is obtained. Z =9952kPa, terminal temperature T Z =305.65K, the average pressure of the pipe section is 9957kPa, and the average temperature is 305.9K; according to the flash calculation model, the mole fraction, mass fraction, density, viscosity, surface tension and other parameters of the oil, gas and water phases under the average temperature and pressure of the pipe section are calculated; for example, the mole fraction of the gas phase is 93.37%, the mass fraction is 86.18%, and the density is 96.17kg / m 3, viscosity is 1.45×10 -5 Pa. S. et al.

[0131] According to the parameters such as gas-liquid phase density, viscosity, surface tension, and JT effect coefficient obtained in the previous step, the pressure drop per unit section is calculated by the hydrothermal model, △P0 / △L=252.17Pa / m, |△P-△P0| / △P<ε1, where ε1=10 -3 , and the temperature drop △T is obtained in the same way, and it is determined that |△T-△T0| / △T<ε2, where ε2=10 -3 Is it true? After judgment, the temperature and pressure calculations did not meet the conditions after the first calculation. Let △P0=△P, △T0=△T, return to the previous step, and iterate until the convergence conditions of ε1 and ε2 are met.

[0132] Calculate the components of each pipe section. At t=0, initialize the total composition of each pipe section along the pipeline. First, assume that the components along the pipeline are all the components of the inlet fluid. According to the three-phase flash calculation model, calculate the molar fraction, composition, and flow rate of each phase under the temperature and pressure conditions obtained by the flow characteristic calculation model. Initialize the initial total components of each pipe section according to the initialization component method in the component update model. Taking the first pipe section as an example, the flash calculation results in a gas phase flow rate of 3.30m / s and a liquid phase flow rate of 0.99m / s. The total composition of the pipe section after initialization is shown in Table 4 below:

[0133] Table 4 Initialization of fluid composition in the inlet pipe section

[0134] Components H2O MeOH N2 CO2 C1 C2 C3 iC4 mol% 6.011 2.745 0.985 0.142 76.129 5.356 2.520 0.630 Components nC4 iC5 nC5 C6 C7 C8 C9 C10+ mol% 0.880 0.438 0.291 0.409 0.780 2.044 0.472 0.167

[0135] At the subsequent moment, the composition of each phase and the total composition of the three phases of oil, gas and water in the pipe section are calculated according to the component update model. For example, at the next moment, at the inlet pipe section of the pipeline, according to the initialized components and average temperature and pressure, the molar flow rate of each component in each phase is calculated by flash evaporation. After the △t time, the amount of each component in each phase in the pipe section changes to in is the molar flow rate of each component calculated by flash evaporation of the inlet component, The molar flow rate of each component calculated by flash evaporation of the components in the pipe section after initialization. After calculating the composition of each phase of oil, gas and water in each pipe section, the concentration of the inhibitor in each phase can be known. For example, the total composition in the first pipe section at the inlet after initialization flashes under the corresponding temperature and pressure conditions to obtain the three-phase components of oil, gas and water, among which the molar fraction of MeOH in the gas phase is 0.224%, the molar fraction of MeOH in the oil phase is 0.478%, and the molar fraction of MeOH in the water phase is 29.65%.

[0136] Continue to determine whether all pipe segments have been calculated. If yes, calculate the next moment. If not, set n = n + 1, and use the end condition of the previous pipe segment, such as PZ and T Z etc., as the starting condition for the next section, and continue to calculate the next pipe section; determine whether the simulation time has been reached. If so, the calculation ends and the results are output, including data such as temperature and pressure along the pipeline, water content, and inhibitor concentration in each phase; if not, set t=t+△t, use the data of each pipe section at the previous moment to calculate the current moment, and continue calculating until the calculation is completed.

[0137] Figure 5a Schematic diagram of temperature and pressure distribution along the pipeline provided for this application; Figure 5b Schematic diagram of liquid holdup and water content distribution along the pipeline provided for this application; Figure 5c A schematic diagram of the inhibitor concentration distribution curve in the gas phase provided in this application; Figure 5d Schematic diagram of inhibitor concentration distribution curve in the oil phase provided in the present application; Figure 5e This is a schematic diagram of the inhibitor concentration distribution curve in the water phase provided in this application. After the calculation is completed, the data is processed to obtain the temperature and pressure distribution, liquid holdup and water content distribution along the pipeline after the calculation is completed. Figure 5a and 5b As shown in Figure 2, the inhibitor concentration distribution curve in the gas phase along the pipeline is as follows: Figure 5c As shown in Figure 2, the inhibitor concentration distribution curve in the oil phase along the pipeline is as follows: Figure 5d As shown in Figure 2, the inhibitor concentration distribution curve in the water phase along the pipeline is as follows: Figure 5e As shown in the above curve diagram, it can be seen that the method can be used to continuously simulate the distribution of the inhibitor in the three phases in the pipeline, which is convenient for real-time monitoring.

[0138] The embodiment of the present invention specifically applies the inhibitor tracking method for a multiphase mixed pipeline to a mathematical model of inhibitor tracking simulation calculation, solves the average temperature and average pressure by designing the pressure drop and temperature drop, and then obtains the concentration and property parameters of each component under the conditions of the average temperature and average pressure, and then uses the obtained concentration and property parameters of each component to inversely solve the pressure drop and temperature drop, and compares whether the difference between the inversely solved pressure drop and temperature drop and the designed pressure drop and temperature drop is less than the allowable error. If not, it means that the designed pressure drop and temperature drop are inappropriate, and the inversely solved pressure drop and temperature drop are used as the designed pressure drop and temperature drop values, and the concentration and property parameters of each component are recalculated. The quality parameters are iterated and solved until the difference between the inverse pressure drop and temperature drop and the designed pressure drop and temperature drop meets the allowable error range. If so, it means that the content of each component in the pipeline is credible at this time, and the content of each component in each pipe section can be further solved until the content of each component in all pipe sections is solved. After the simulation time is reached, the temperature, pressure, water content, inhibitor concentration in each phase and other data along the pipeline are output. The whole process is carried out in sections, and the simulation calculation process can be combined with the on-site situation in real time, so as to timely track the distribution of inhibitors in the pipeline. The simulation results are more accurate and reliable, which can ensure the safe operation of the pipeline and save a lot of manpower, material and resources.

[0139] The embodiment of the present invention can divide the electronic device or the main control device into functional modules according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present invention is schematic and is only a logical function division. There may be other division methods in the second implementation.

[0140] Figure 6 This is a schematic diagram of the structure of the multiphase mixed pipeline inhibitor distribution simulation device 60 provided in this application. Figure 6 As shown, the device 60 comprises:

[0141] The acquisition module 601 is used to acquire the total composition of the fluid in the pipe section at the first moment.

[0142] Specifically, the acquisition module is used to obtain the total composition of the fluid in the pipe section at the first moment, and obtain the total composition of any pipe section at the first moment according to the three-phase flash evaporation calculation method and the gas-liquid two-phase flow calculation method:

[0143]

[0144] In the formula, is the total amount of component i in the nth pipe section at t = 0, mol; C i,gasis the mole fraction of component i in the gas phase; C gas is the gas phase mole fraction; C i,liq is the mole fraction of component i in the liquid phase; C liq is the liquid phase mole fraction; v g is the gas phase velocity, m / s; v l is the liquid phase velocity, m / s.

[0145] The obtaining of the fluid composition at the inlet of the pipe section at the second moment includes:

[0146] According to the change of the amount of material in the pipe section at the second moment, a component update calculation model is constructed:

[0147]

[0148] According to the component update calculation model, the total composition of the pipe section at the second time t is obtained:

[0149]

[0150] In the formula, is the amount of substance of component i in phase x of the nth pipe segment at time t, mol; is the amount of substance of component i in phase x of the nth tube segment at time t-Δt, mol; is the amount of substance change of component i in phase x within the time step Δt, mol; is the total amount of substance of component i in the nth pipe section at time t, mol; x represents any one of the three phases: oil phase, gas phase or water phase.

[0151] According to the three-phase flash evaporation calculation method and the gas-liquid two-phase flow calculation method, the change in the amount of the substance in the pipe section at the second moment is calculated, including:

[0152]

[0153]

[0154] In the formula, Q mx is the mass flow rate of phase x, kg / s; M x is the molar specific gravity of phase x, kg / mol; is the mole fraction of component i in phase x of the nth tube segment at time t-Δt; is the molar flow rate of component i in phase x of the nth pipe segment at time t-Δt, mol / s; Δt is the time step; is the molar flow rate of component i in phase x of the n-1th pipe segment at time t-Δt, mol / s.

[0155] The judgment module 602 judges whether the fluid composition at the inlet of the pipe segment at the second moment has changed according to the time of adding the inhibitor. If so, the fluid composition at the inlet of the pipe segment at the second moment is obtained, and the total composition of the fluid in the pipe segment at the second moment is obtained according to the fluid composition at the inlet of the pipe segment at the second moment. If not, the total composition of the fluid in the pipe segment at the second moment is obtained according to the total composition at the first moment, wherein the second moment is the moment after the inhibitor is added, and the pipeline is divided into a plurality of pipe segments of equal length.

[0156] Specifically, the judgment module is used to: obtain the phase flow rate at the inlet of the pipe section according to the three-phase flash evaporation calculation method; obtain the flow distance of each phase fluid in the pipeline according to the inhibitor addition time; and determine whether the flow distance is greater than the length of the pipe section. If so, the total composition of the outlet of the pipe section changes.

[0157] The processing module 603 is used to obtain the inhibitor concentration distribution in the pipeline according to the total composition of the fluid in all the pipe sections at the second moment.

[0158] Specifically, the processing module is used to: obtain the molar fraction of the inhibitor in the gas phase, oil phase and water phase in each pipe section according to the total composition of the fluid in each pipe section through a three-phase flash evaporation calculation method; and obtain the inhibitor concentration distribution in the pipeline according to the molar fraction of the inhibitor in the gas phase, oil phase and water phase in all pipe sections.

[0159] In another feasible embodiment, the device 60 also includes an iteration module, which is used to obtain the phase distribution and fluid properties of the pipe section through a three-phase flash evaporation calculation method according to the preset pressure drop and the preset temperature drop; obtain the first temperature drop and the first pressure drop through a gas-liquid two-phase flow calculation method according to the phase distribution and the fluid properties of the pipe section; judge whether the difference between the first temperature drop and the preset temperature drop is less than the first error, if so, judge whether the difference between the first pressure drop and the preset pressure drop is less than the second error, if so, determine that the phase components of the pipe section are actual components, otherwise, return the first temperature drop and the first pressure drop to the preset pressure drop and the preset temperature drop respectively.

[0160] The multiphase mixed pipeline inhibitor distribution simulation device provided in this embodiment can execute the multiphase mixed pipeline inhibitor tracking method of the above embodiment, and its implementation principle and technical effect are similar, which will not be repeated in this embodiment.

[0161] In the specific implementation of the aforementioned multiphase mixed pipeline inhibitor distribution simulation device, each module can be implemented as a processor, and the processor can execute computer execution instructions stored in the memory, so that the processor executes the aforementioned multiphase mixed pipeline inhibitor tracking method.

[0162] Figure 7 This is a schematic diagram of the structure of the electronic device provided in this application. Figure 7As shown, the electronic device 70 includes: at least one processor 701 and a memory 702. The electronic device 70 also includes a communication component 703. The processor 701, the memory 702 and the communication component 703 are connected via a bus 704.

[0163] In a specific implementation process, at least one processor 701 executes the computer-executable instructions stored in the memory 702, so that at least one processor 701 executes the multi-phase mixed pipeline inhibitor tracking method executed by the electronic device side as above.

[0164] The specific implementation process of the processor 701 is as follows, including:

[0165] Obtain the total composition of the fluid in the pipe section at the first moment;

[0166] According to the inhibitor addition time, determine whether the fluid composition at the inlet of the pipe segment at the second moment changes; if so, obtain the fluid composition at the inlet of the pipe segment at the second moment, and obtain the total composition of the fluid in the pipe segment at the second moment according to the fluid composition at the inlet of the pipe segment at the second moment; if not, obtain the total composition of the fluid in the pipe segment at the second moment according to the total composition at the first moment, wherein the second moment is the moment after the inhibitor is added, and the pipeline is divided into a plurality of pipe segments of equal length;

[0167] According to the total composition of the fluid in all pipe sections at the second moment, the inhibitor concentration distribution in the pipeline is obtained.

[0168] In a possible design, judging whether the fluid composition at the inlet of the pipe section at the second moment has changed according to the duration of adding the inhibitor includes:

[0169] According to the three-phase flash evaporation calculation method, the phase flow rate at the inlet of the pipe section is obtained; according to the inhibitor addition time, the flow distance of each phase fluid in the pipeline is obtained; it is determined whether the flow distance is greater than the length of the pipe section. If so, the total composition of the outlet of the pipe section changes.

[0170] In a possible design, the obtaining of the total composition of the fluid in the pipe section at the first moment includes: obtaining the total composition of the pipe section at the first moment according to a three-phase flash evaporation calculation method and a gas-liquid two-phase flow calculation method:

[0171]

[0172] In the formula, is the total amount of component i in the nth pipe section at t = 0; C i,gas is the mole fraction of component i in the gas phase; C gas is the gas phase mole fraction; C i,liq is the mole fraction of component i in the liquid phase; C liq is the liquid phase mole fraction; v gis the gas phase velocity; v l is the liquid phase velocity.

[0173] In a possible design, obtaining the fluid composition at the inlet of the pipe section at the second moment includes:

[0174] According to the change of the amount of material in the pipe section at the second moment, a component update calculation model is constructed:

[0175]

[0176] According to the component update calculation model, the total composition of the pipe section at the second time t is obtained:

[0177]

[0178] In the formula, is the amount of substance of component i in phase x of the nth pipe segment at time t; is the amount of substance of component i in phase x of the nth pipe segment at time t-Δt; is the amount change of component i in phase x within the time step Δt; is the total amount of substance of component i in the nth pipe section at time t; x represents any one of the three phases: oil phase, gas phase or water phase.

[0179] In a possible design, the change in the amount of the substance in the pipe section at the second moment is calculated according to the three-phase flash evaporation calculation method and the gas-liquid two-phase flow calculation method, including:

[0180]

[0181]

[0182] In the formula, Q mx is the mass flow rate of phase x; M x is the molar specific gravity of phase x; is the mole fraction of component i in phase x of the nth tube segment at time t-Δt; is the molar flow rate of component i in phase x of the nth pipe segment at time t-Δt; Δt is the time step; is the molar flow rate of component i in phase x of the n-1th pipe segment at time t-Δt.

[0183] In a possible design, the inhibitor concentration distribution in the pipeline is obtained according to the total composition of the fluid in all pipe sections at the second moment, including: according to the total composition of the fluid in each pipe section, by a three-phase flash evaporation calculation method, obtaining the mole fraction of the inhibitor in the gas phase, oil phase and water phase in each pipe section; according to the mole fraction of the inhibitor in the gas phase, oil phase and water phase in all pipe sections, obtaining the inhibitor concentration distribution in the pipeline.

[0184] In a possible design, before obtaining the total composition at the first moment of the pipe section inlet and the inhibitor addition duration, the method further includes: obtaining the phase distribution and fluid properties of the pipe section by a three-phase flash evaporation calculation method according to a preset pressure drop and a preset temperature drop; obtaining the first temperature drop and the first pressure drop by a gas-liquid two-phase flow calculation method according to the phase distribution and fluid properties of the pipe section; judging whether the difference between the first temperature drop and the preset temperature drop is less than a first error, and if so, judging whether the difference between the first pressure drop and the preset pressure drop is less than a second error, and if so, determining that the components of each phase of the pipe section are actual components, and otherwise, returning the first temperature drop and the first pressure drop as the preset temperature drop and the preset pressure drop, respectively.

[0185] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0186] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk storage.

[0187] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.

[0188] The above-mentioned functions implemented by the electronic device and the main control device introduce the scheme provided by the embodiment of the present invention. It can be understood that in order to implement the above-mentioned functions, the electronic device or the main control device includes a hardware structure and / or software module corresponding to the execution of each function. In combination with the units and algorithm steps of each example described in the embodiment disclosed in the embodiment of the present invention, the embodiment of the present invention can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present invention.

[0189] The present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the above multiphase mixed pipeline inhibitor tracking method is implemented.

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

[0191] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist as discrete components in an electronic device or a main control device.

[0192] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0193] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for tracking inhibitors in a multiphase mixed pipeline, characterized in that: include: Obtain the total composition of the fluid in the pipe section at the first moment; According to the total composition of the fluid in the pipe section at the first moment and the three-phase flash calculation method, the phase flow rate at the inlet of the pipe section is obtained; according to the inhibitor addition time, the flow distance of each phase fluid in the pipeline is obtained; it is judged whether the flow distance is greater than the length of the pipe section, if so, it is determined that the total composition of the pipe section outlet has changed, and the fluid composition at the inlet of the pipe section at the second moment is obtained, and the total composition of the fluid in the pipe section at the second moment is obtained according to the fluid composition at the inlet of the pipe section at the second moment, if not, the total composition of the fluid in the pipe section at the second moment is obtained according to the total composition at the first moment, wherein the second moment is the moment after the inhibitor is added, and the pipeline is divided into a plurality of pipe sections of equal length; According to the total composition of the fluid in each pipe section at the second moment, the mole fraction of the inhibitor in the gas phase, oil phase and water phase in each pipe section is obtained by the three-phase flash evaporation calculation method; according to the mole fraction of the inhibitor in the gas phase, oil phase and water phase in all pipe sections, the inhibitor concentration distribution in the pipeline is obtained.

2. The method according to claim 1, characterized in that The obtaining of the total composition of the fluid in the pipe section at the first moment comprises: According to the three-phase flash calculation method and the gas-liquid two-phase flow calculation method, the total composition of any pipe section at the first moment is obtained: In the formula, is the total amount of component i in the nth pipe section at t = 0; C i,gas is the mole fraction of component i in the gas phase; C gas is the gas phase mole fraction; C i,liq is the mole fraction of component i in the liquid phase; C liq is the liquid phase mole fraction; v g is the gas phase velocity; v l is the liquid phase velocity.

3. The method according to claim 1, characterized in that The obtaining of the fluid composition at the inlet of the pipe section at the second moment includes: According to the change of the amount of material in the pipe section at the second moment, a component update calculation model is constructed: According to the component update calculation model, the total composition of the pipe section at the second time t is obtained: In the formula, is the amount of substance of component i in phase x of the nth pipe segment at time t; is the amount of substance of component i in phase x of the nth pipe segment at the previous time t-Δt; is the amount change of component i in phase x within the time step Δt; is the total amount of substance of component i in the nth pipe section at time t; x represents any one of the three phases: oil phase, gas phase or water phase.

4. The method according to claim 3, characterized in that According to the three-phase flash evaporation calculation method and the gas-liquid two-phase flow calculation method, the change in the amount of the substance in the pipe section at the second moment is calculated, including: In the formula, Q mx is the mass flow rate of phase x; M x is the molar specific gravity of phase x; is the mole fraction of component i in phase x of the nth pipe segment at the previous time t-Δt; is the molar flow rate of component i in phase x of the nth pipe segment at the previous time t-Δt; Δt is the time step; is the molar flow rate of component i in the phase x of the n-1th pipe segment at the previous time t-Δt.

5. The method according to claim 1, characterized in that Before obtaining the total composition at the first moment of the pipe section entrance and the inhibitor addition duration, the method further includes: According to the preset pressure drop and the preset temperature drop, the phase distribution and fluid properties of the pipe section are obtained by the three-phase flash calculation method; According to the phase distribution of the pipe section and the physical properties of the fluid, the first temperature drop and the first pressure drop are obtained by using the gas-liquid two-phase flow calculation method; Determine whether the difference between the first temperature drop and the preset temperature drop is less than the first error. If so, determine whether the difference between the first pressure drop and the preset pressure drop is less than the second error. If so, determine that the components of each phase of the pipe section are actual components. Otherwise, return the first temperature drop and the first pressure drop as the preset temperature drop and the preset pressure drop respectively.

6. A multiphase mixed pipeline inhibitor distribution simulation device, characterized in that: include: An acquisition module, used for acquiring the total composition of the fluid in the pipe section at the first moment; A judgment module is used to obtain the phase flow rate at the inlet of the pipe segment according to the total composition of the fluid in the pipe segment at the first moment and the three-phase flash calculation method; obtain the distance of each phase fluid flowing in the pipeline according to the inhibitor addition time; judge whether the flow distance is greater than the length of the pipe segment, if so, determine that the total composition of the outlet of the pipe segment has changed, and obtain the fluid composition at the inlet of the pipe segment at the second moment, and obtain the total composition of the fluid in the pipe segment at the second moment according to the fluid composition at the inlet of the pipe segment at the second moment; if not, obtain the total composition of the fluid in the pipe segment at the second moment according to the total composition at the first moment, wherein the second moment is the moment after the inhibitor is added, and the pipeline is divided into a plurality of pipe segments of equal length; The processing module is used to obtain the mole fraction of the inhibitor in the gas phase, oil phase and water phase in each pipe section according to the total composition of the fluid in each pipe section at the second moment through the three-phase flash evaporation calculation method; and obtain the inhibitor concentration distribution in the pipeline according to the mole fraction of the inhibitor in the gas phase, oil phase and water phase in all pipe sections.

7. The device according to claim 6, characterized in that Also includes: An iteration module is used to obtain the phase distribution and fluid properties of the pipe section through a three-phase flash calculation method according to a preset pressure drop and a preset temperature drop; According to the phase distribution and fluid properties of the pipe section, the first temperature drop and the first pressure drop are obtained by the gas-liquid two-phase flow calculation method; it is judged whether the difference between the first temperature drop and the preset temperature drop is less than the first error, if so, it is judged whether the difference between the first pressure drop and the preset pressure drop is less than the second error, if so, it is determined that the components of each phase of the pipe section are actual components, otherwise, the first temperature drop and the first pressure drop are returned to the preset pressure drop and the preset temperature drop respectively.

8. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 5.