Low-temperature gathering and transportation watering temperature limit recommendation and process energy-saving optimization method
By analyzing the configuration and sensor data of the inter-well station pipeline network, a critical wall temperature and temperature pressure drop model was constructed, and the water doping temperature and flow rate were optimized, which solved the problems of energy waste and operation instability in the water doping process in the collection and transportation system. , realizes the optimal combination recommendation and cost optimization of the water-dripping system.
Patent Information
- Application Number
- CN202411206275.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-20
AI Technical Summary
The existing collection and transportation system has problems of energy waste and unstable operation during the water doping process. It is mainly because the crude oil freezing point is offset as a control indicator, and the dynamic changes in water doping temperature and flow rate are difficult to effectively optimize, resulting in poor heat and gas consumption. Reasonable.
By recording and analyzing the configuration information of the inter-well station pipeline network and sensor dynamic data, a critical wall temperature recommendation module, a temperature drop drop model and a pipeline physical parameter update module are built, and the water doping temperature is determined by combining the gradient descent method and the optimization objective function. The optimal combination of flow rate can realize intelligent recommendation under different working conditions.
It effectively avoids energy waste, ensures production stability, and reduces operating costs and improves system efficiency through automated recommendations of water-dip temperature and flow.
Smart Images

Figure CN119167819A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of gathering and transportation systems, and in particular to a method for recommending a temperature limit of low-temperature gathering and transportation water blending and optimizing process energy saving. Background Art
[0002] According to the layout of the oil gathering pipeline, the gathering and transportation system usually adopts two processes: double-pipe water injection and annular water injection, that is, the produced water is heated and pressurized at the transfer station and then transported to the metering station or valve group through the manifold. The water distribution volume is set according to the temperature of the oil well produced liquid, the amount of produced liquid, and the distance of the gathering and transportation to complete the wellhead water injection. The wellhead produced liquid is heated by water injection and returned to the metering station or valve group. After the metering is completed, it is transported to the transfer station for oil, gas and water three-phase separation. Taking a certain oil field in Daqing as an example, according to statistics, the electricity consumption of water injection accounts for 7.2% of the total electricity consumption, the gas consumption of water injection accounts for 58.2% of the total gas consumption, and the energy consumption of water injection accounts for 38.7% of the total energy consumption of the oil field. Therefore, the control of water injection energy consumption reflects the level of system operation and management, which is directly related to the overall benefits of the oil field and is the focus of energy conservation and consumption reduction in the oil field.
[0003] At present, the on-site operators of the station mainly use the return liquid temperature at the station to be 3-5℃ higher than the freezing point of crude oil as the production indicator to control the water addition amount and water addition temperature in each link. There are three problems in this process. First, the freezing point of crude oil is measured based on pure oil. When the oil contains a certain amount of emulsified water, the fluidity of the crude oil is changed, and the freezing temperature of the water-containing crude oil deviates from the actual freezing point. This deviation is greatly related to the crude oil composition and water content. Therefore, it is extremely unreasonable to simply use the freezing point of crude oil as a production control indicator, resulting in a large amount of heat energy waste. Secondly, even if a reasonable inlet return liquid temperature is determined, due to the influence of seasonal climate change, crude oil pipeline flow, pressure, pipeline inner diameter, crude oil viscosity and other factors, the heat dissipation loss and friction loss during transportation is a dynamic process, which means that for the same inlet return liquid temperature and inlet return liquid pressure requirements, the outlet water mixing temperature and water mixing flow are also different. If the outlet water mixing temperature is too high and the boost pressure is too large, there will be energy waste. If the outlet water mixing temperature is too low and the boost pressure is too low, the crude oil fluidity is poor and the power is insufficient, resulting in condensation. Thirdly, according to the law of heat conservation, when mixing water, high temperature and low water mixing amount and low temperature and high water mixing amount are selected. Although both can meet the normal operation requirements of the water mixing process, different combinations of outlet water mixing temperature and water mixing flow will consume different total gas and electricity costs during operation. Therefore, how to dynamically and intelligently recommend the inlet return liquid temperature requirements according to the actual operating conditions, and recommend the corresponding optimal combination of outlet water mixing temperature and water mixing flow, is very important and has great economic benefits. Summary of the invention
[0004] The purpose of the present invention is to address the deficiencies of the prior art and provide a method for recommending temperature limits for low-temperature gathering and transportation water injection and optimizing process energy saving, so as to achieve optimal recommendations for water injection temperature and water injection flow rate under different operating modes.
[0005] The present invention provides a method for recommending a temperature limit of low-temperature gathering and transportation water mixing and optimizing process energy saving, comprising:
[0006] The pipe network configuration information and operation record module records and stores the pipe network configuration information and sensor dynamic data of the well station;
[0007] The critical wall sticking temperature value recommendation module determines the critical wall sticking temperature recommendation value as a production guidance indicator based on the inter-well station network configuration information of each oil gathering pipeline and the dynamic historical operation data of the sensor;
[0008] The temperature drop and pressure drop model building module calculates the temperature change and the pressure change of the hydraulic loss from each link from the valve group room to the metering room, from the metering room to the wellhead, from the wellhead back to the metering room, and from each metering room back to the valve group room.
[0009] The pipeline physical property parameter update and correction module uses real historical operation data to build an optimization objective function and combine the gradient descent method to perform modeling and fitting to determine the total heat transfer coefficient of the pipeline;
[0010] The module for establishing and solving optimization targets with constraints establishes the optimization target expression. The minimized target value of the optimization target expression represents the best combination under all combinations of high water addition, low temperature and low water addition, high temperature, so that the total operating cost of the entire water addition system is the lowest; the nonlinear optimization problem under constraints is solved to obtain the final optimal combination of water addition temperature and water addition flow rate;
[0011] The optimal recommendation module for water addition temperature and water addition amount under different modes sets three optimization operation modes for free switching according to different on-site operation requirements: Mode 1, fixed water addition flow rate, optimal temperature recommendation; Mode 2, fixed water addition temperature, optimal flow rate recommendation; Mode 3, optimal water addition temperature and flow rate combination recommendation; Mode 1 means that the outlet valve is not adjusted to make the water addition flow rate fixed, and the optimization system recommends the optimal water addition outlet temperature; Mode 2 means setting the outlet temperature control target of the heating furnace unchanged and adjusting the outlet valve to change the water addition flow rate, and the optimization system recommends the optimal water addition flow rate; Mode 3 means adjusting the water addition outlet temperature target value and the water addition flow rate at the same time, and the optimization system recommends the optimal water addition temperature and water addition flow rate combination value.
[0012] Furthermore, the inter-well station pipeline configuration information includes: the actual layout route of the pipeline between the valve group and each metering room, each metering room and each wellhead, the static data of the inner and outer diameters of the pipeline, the pipeline length, and the insulation coefficient, the static configuration information of the water density, specific heat capacity and the wellhead produced fluid density, specific heat capacity, average daily production, and viscosity-temperature curve; the dynamic data of the sensor includes: the manifold temperature, manifold flow, and manifold pressure between the valve groups, the temperature, pressure, and flow of each metering room, the wellhead produced fluid temperature and pressure, and the station return fluid pressure, temperature, and flow.
[0013] Furthermore, the critical wall sticking temperature value recommendation module determines the critical wall sticking temperature recommended value as a production guidance indicator based on the inter-well station network configuration information of each oil gathering pipeline and the dynamic historical operation data of the sensor, including:
[0014] The critical wall sticking temperature value recommendation module obtains the historical operation data of each oil gathering pipeline, which includes medium temperature, medium flow, medium pressure, pipe diameter, length, and density, and selects the representative data of each point in a stable state. The point stability judgment criterion is: Among them, y ji are the i-th values of variable j, respectively. j represents the variables: medium temperature, medium flow rate, and medium pressure; n is the number of historical data to determine whether the process is stable; is the mean of the jth variable selected ε is the pre-specified steady-state determination threshold;
[0015] By Darcy's formula The hydraulic friction coefficient λ is inversely deduced, where H L is the friction loss along the pipeline, in m, reflecting the pressure difference between the upstream and downstream of the pipeline; V is the average flow velocity, in m / s; d is the inner diameter of the pipe, in m; g is the acceleration of gravity, in m / s 2 ; λ is the hydraulic friction coefficient, which reflects the resistance of the fluid flowing inside the pipe;
[0016] The medium is sorted by temperature and divided into temperature intervals. The corresponding hydraulic friction coefficient λ in each temperature interval is obtained to represent the hydraulic friction coefficient λ at the temperature. Thus, the temperature-hydraulic friction coefficient trend chart of the fluid inside the pipeline is obtained. According to the temperature value corresponding to the point with the largest slope change rate of the hydraulic friction coefficient λ, the representative value of the critical wall adhesion temperature of the pipeline is obtained.
[0017] By analogy, the representative values of critical wall sticking temperature of crude oil in multiple pipelines are statistically analyzed;
[0018] After the above steps, the probability density map distribution of the critical wall sticking temperature of crude oil is obtained, and finally the recommended value of the critical wall sticking temperature is determined based on its probability density map distribution as a production guidance indicator.
[0019] Furthermore, the temperature drop and pressure drop model building module calculates the temperature change and the pressure change of the thermal loss and hydraulic loss from each link from the valve group room to the metering room, from the metering room to the wellhead, from the wellhead back to the metering room, and from each metering room back to the valve group room, including:
[0020] During the pipeline gathering and transportation process, the thermal calculation formula for temperature change along the pipeline is:
[0021]
[0022] T 下游 =(T 上游 -T0)e -aL +T0 formula (3.1);
[0023] The friction loss along the hydraulic calculation is calculated using the Repinzon formula:
[0024]
[0025] The temperature, flow rate, density and specific heat capacity of the liquid flow confluence process are calculated as follows:
[0026] The mixed liquid temperature is calculated as:
[0027] The mixed liquid flow rate is calculated as:
[0028] The density of the mixed liquid is calculated as:
[0029] The specific heat capacity of the mixed liquid is calculated as:
[0030] in:
[0031] K is the total heat transfer coefficient of the pipeline, W / (m 2 ℃);
[0032] d and D are the inner and outer diameters of the pipe section, respectively, in m;
[0033] L is the length of the pipeline section, m;
[0034] T 上游 , T 下游 , T0 represent the upstream temperature, downstream temperature and surrounding soil temperature of the pipeline section, in °C;
[0035] The values of β and m vary according to different flow regimes;
[0036] υ is the kinematic viscosity of the fluid;
[0037] ρ, G, and C are the density, flow rate, and specific heat capacity of the fluid, respectively, where the subscript i represents the fluid under the i-th pipeline.
[0038] Furthermore, the thermal calculation of water mixing from the valve group to the metering room includes:
[0039] Assume there are M metering rooms, and the water distribution ratio of each metering room is {m1, m2...m i ...m M}∈(0,1), the distance from the valve group to the i-th metering room is The outer diameter of the tube is Inner diameter The amount of water flowing to each metering room is G M_i =G 出 ·m i , where i is the i-th metering room, and the temperature of the hot water mixed with water when it reaches the i-th metering room is:
[0040]
[0041] in
[0042] The heat loss from the valve group room to the i-th metering room is:
[0043]
[0044] There are M metering rooms in total. The total heat loss from the valve group room to all metering rooms is:
[0045] The hydraulic calculation of mixing water between valve groups and metering room includes:
[0046] Using the valve group temperature T 出 and the temperature T when it reaches the i-th metering room M_i , determine the average temperature of the fluid in this section of the pipeline as According to the viscosity-temperature curve relationship, the corresponding kinematic viscosity value is υ, using the formula Calculate the Reynolds number Re, determine the flow pattern and the corresponding β and m values, and use formula (3.2) to calculate the friction loss along the section
[0047] There are M pipelines from the valve group room to the metering room. The total friction loss along the way from the valve group room to the metering room is:
[0048] The total pressure energy loss is:
[0049] Furthermore, the calculation of the mixing of the hot water mixed with the wellhead produced fluid includes:
[0050] Assume that the oil production of the jth port is O j , the oil outlet temperature is T O_j , the specific heat capacity of the oil is C O_j , the density is ρ O_j , after the oil and water are mixed at the wellhead, the temperature of the mixed liquid is calculated by the mixed liquid temperature calculation formula (3.3): From formula (3.4), we know that the volume flow rate of the mixed liquid is G' W_ji =G W_ij +G O_j , from formula (3.5) we know that the density of the mixed liquid is From formula (3.6), we know that the specific heat capacity of the mixed liquid is:
[0051]
[0052] According to the above steps, the station return liquid temperature T' is finally obtained 入 =T(T 出 ,G 出 ,m i ,w ij ) and return liquid pressure P' 入 =P 入 (T 出 ,G 出 ,m i ,w ij ) expression; indicates the station return liquid temperature T' 入 and return pressure P' 入 It can be expressed as 出 , G 出 、m i 、w ij The unknown quantities represent the outlet temperature of the manifold between valve groups, T 出 , export flow G 出 , the ratio of the liquid flow of the i-th metering room to the total outlet flow of the manifold between the valve groups m i , the ratio of the flow rate from the i-th metering room to the j-th well to the total flow rate of the i-th metering room w ij .
[0053] Furthermore, the pipeline physical property parameter update correction module uses real historical operation data to build an optimization objective function combined with the gradient descent method to perform modeling and fitting to determine the total heat transfer coefficient of the pipeline, including:
[0054] The sensor data of the relevant points are obtained from the database. The sensor data of the relevant points include: manifold outlet pressure, manifold outlet flow, manifold outlet temperature, manifold inlet pressure, manifold inlet flow, manifold inlet temperature, and each wellhead pressure and wellhead temperature;
[0055] Obtain the stable operation data of the gathering and transportation pipeline under different working conditions. The specific extraction steps are as follows:
[0056] With time T as the window size, slide the data set, calculate the stability of a specific point within the time window, and judge the stability of the point in the process according to the following criteria: Among them, yji is the i-th value of the variable j at a specific point; n is the number of historical data in the time window T to determine whether the process is stable; is the mean of the jth variable selected ε is a pre-specified steady-state judgment threshold; when the threshold condition is met, the data in the time window is representative stable data, and the average value of each variable in the time window is calculated. is the representative value of the point, and a stable running sample is screened out. The window is continuously sliding, and the above process is repeated to obtain multiple stable samples;
[0057] The total heat transfer coefficient K of each pipeline i The value is an unknown parameter. Using the mechanism formula, calculate the final oil gathering pipeline manifold inlet temperature T' 入 =T(K i ), inbound pressure P' 入 =P(K i ), the optimization objective function is constructed as: It represents the sum of the relative deviation between the predicted manifold inlet temperature and the actual inlet temperature and the relative deviation between the predicted manifold inlet pressure and the actual inlet pressure;
[0058] With the goal of minimizing the above objective function, the small batch gradient descent method is used to iteratively update the parameter K, and finally the total heat transfer coefficient K of each pipeline is obtained. i .
[0059] Furthermore, the constrained optimization target establishment and solution module establishes an optimization target expression. The minimized target value of the optimization target expression represents the best combination under all combinations of high water addition, low temperature and low water addition, high temperature, so that the total operating cost of the entire water addition system is the lowest; the nonlinear optimization problem under the constraints is solved to obtain the final optimal combination of water addition temperature and water addition flow rate, including:
[0060] According to the outlet temperature T of the manifold between valve groups 出 With the outlet flow G 出 , it can be seen that the gas consumption required for the heating furnace is
[0061] The power consumption of the pump is calculated as follows: Among them, H 出 , G 出The relationship between can be described approximately by fitting the characteristic curve of the centrifugal pump. The empirical formula is in the form of a quadratic equation: H shut is the head when G=0, a1 and a2 are empirical coefficients, which are determined according to the specific conditions of the pump;
[0062] Assume that the unit price of gas is a yuan / m 3 , the unit price of electricity is b yuan / k·Wh, then the operating cost is:
[0063] This formula is the optimization objective expression to be solved;
[0064] in:
[0065] G 出 is the outlet flow rate of the manifold fluid between valve groups, m 3 / h, ρ is the fluid density, kg / m 3 ; C is the specific heat capacity of the fluid, J / kg·℃;
[0066] H 出 The displacement of the pump is G 出 Head at time, m;
[0067] η 泵 The pump displacement at the design temperature is G 出 Oil delivery efficiency at the time
[0068] η e is the motor efficiency;
[0069] T' 入 , T 出 They are the heating furnace inlet (inlet liquid temperature) and outlet temperature (valve group header outlet temperature), ℃;
[0070] B is the gas flow rate, unit is m 3 / h;
[0071] Q net,v,ar The received low calorific value of the gas, in kJ / m 3 ;
[0072] η 炉 It is the heating furnace effect;
[0073] Since the station has a minimum entry temperature requirement, assume that the minimum entry temperature is T 入 =30℃, then constraint 1 is T' 入 ≥T 入 ; At the same time, the station has a minimum inlet pressure requirement. Assume that the minimum station return pressure is P 入 =0.2MPa, the total loss of pipeline pressure head during the whole process is: h l =h V+h M +h' W +h' W +h M +, assuming that all the pressure head loss in the pipeline is provided by the pump, then the second constraint is
[0074] For each metering room, the flow is divided into i , and the diversion w to each wellhead Wi , first of all, the following constraints must be met: Constraint four is
[0075] The form of the optimization problem under constraints is:
[0076]
[0077] stT' 入 ≥T 入
[0078] ρg(H 出口 -h l )≥P 入
[0079]
[0080] ...
[0082] The model-related calculation process expressions are constructed using Python language, and the optimize.minimize optimization algorithm in the scipy library is called to solve the nonlinear optimization problem under constraints and obtain the final water mixing temperature T. 出 and water mixing flow G 出 The best combination.
[0083] The beneficial effects of the present invention are as follows: the method of recommending the temperature limit of low-temperature gathering and transportation water injection and optimizing process energy saving of the present invention mines potential valuable information from historical operation data, determines the critical wall adhesion temperature to guide on-site process control, and avoids energy waste while ensuring production; at the same time, it can automatically recommend the optimal water injection temperature and water injection flow distribution under different modes, so that the operating costs are at the optimal solution. BRIEF DESCRIPTION OF THE DRAWINGS
[0084] Figure 1 Determine the flow chart for critical wall sticking temperature;
[0085] Figure 2 It is a schematic diagram of double-tube water addition and single-tube annular water addition;
[0086] Figure 3 Calculation flow chart for the water mixing system. DETAILED DESCRIPTION
[0087] The following non-limiting embodiments can enable ordinary technicians in the field to understand the present invention more comprehensively, but do not limit the present invention in any way. It is necessary to point out that the following embodiments cannot be understood as limiting the scope of protection of the present invention. If technical personnel skilled in the art make some non-essential improvements and adjustments to the present invention based on the above-mentioned content of the present invention, they still fall within the scope of protection of the present invention.
[0088] Please combine Figure 1 , Figure 2 and Figure 3 The present invention provides a method for recommending temperature limits of low-temperature gathering and transportation water mixing and optimizing process energy saving. The whole scheme mainly includes six modules, namely, a pipeline network configuration information and operation record module, a critical wall adhesion temperature value recommendation module, a temperature drop and pressure drop model construction module, a pipeline physical property parameter update correction module, a constraint optimization target establishment and solution module, and an optimal recommendation module for water mixing temperature and water mixing amount under different modes.
[0089] 1. Pipeline network configuration information and operation record module
[0090] This module mainly records and stores the inter-well station pipeline network configuration information and sensor dynamic data.
[0091] Among them, the inter-well station pipe network configuration information includes: the actual layout route of the pipe network between the valve group and each metering room, each metering room and each wellhead, static data such as the inner and outer diameters of the pipeline, the length of the pipeline, and the insulation coefficient, and static configuration information such as the water density, specific heat capacity and the density of the wellhead produced fluid, specific heat capacity, average daily production, and viscosity-temperature curve. The dynamic data of the sensor mainly includes: the manifold temperature, manifold flow, and manifold pressure between the valve groups, the temperature, pressure, and flow of each metering room, the temperature and pressure of the wellhead produced fluid, and the station return fluid pressure, temperature, and flow.
[0092] 2. Critical wall temperature value recommendation module
[0093] This module is mainly used to determine the reference value of the station return liquid temperature to guide production control. Since the existing water injection energy-saving optimization schemes are all optimized under the condition of clarifying the lowest return liquid temperature, and the usually measured freezing point reference value refers to the value under the pure crude oil state, in actual applications, due to the different water content in the pipeline, the freezing point of the pipeline crude oil is offset. By establishing a pressure drop model, combining the basic static data of the pipeline with the historical operation data, the hydraulic friction coefficient trend chart corresponding to the fluid at different temperatures is fitted, and the temperature value corresponding to the fastest change in the viscosity coefficient is defined as the critical wall temperature. The return liquid temperature is 3-5°C higher than this critical wall temperature as a production guidance indicator to control the water injection process. The specific implementation steps are as follows:
[0094] 1) First, obtain the dynamic historical operation data of each oil gathering pipeline, such as medium temperature, medium flow, medium pressure, pipe diameter, length, density, etc., and select the representative data of each point in a stable state. The criteria for judging the stability of the point are: Among them, y ji are the i-th values of variable j, respectively. j represents the variables: medium temperature, medium flow rate, and medium pressure; n is the number of historical data to determine whether the process is stable; is the mean of the jth variable selected ε is a pre-specified steady-state judgment threshold. Each variable can customize the threshold standard separately, such as the value range is (0, 0.05);
[0095] 2) Through Darcy's formula The hydraulic friction coefficient λ is inversely deduced, where H L is the friction loss along the pipeline, in m, reflecting the pressure difference between the upstream and downstream of the pipeline; V is the average flow velocity, in m / s; d is the inner diameter of the pipe, in m; g is the acceleration of gravity, in m / s 2 ; λ is the hydraulic friction coefficient, which reflects the resistance of the fluid flowing inside the pipe. Compared with directly analyzing the pressure difference change to judge the flow of the fluid inside the pipe, this value is not affected by the pipe diameter and flow rate, and is more generalized in analysis;
[0096] 3) After sorting the medium temperature, divide the temperature intervals, for example, divide them with a step size of 0.5°C, and obtain the average value of the hydraulic friction coefficient λ corresponding to each temperature interval, which represents the hydraulic friction coefficient λ corresponding to the temperature. Thus, the temperature-hydraulic friction coefficient trend chart of the fluid inside the pipeline is obtained. The temperature value corresponding to the point with the largest slope change rate of the hydraulic friction coefficient λ is the representative value of the critical wall adhesion temperature of the pipeline;
[0097] 4) By analogy, according to the above steps 2) and 3), the representative values of the critical wall sticking temperature of crude oil in multiple pipelines are statistically analyzed;
[0098] 5) After the above steps, the probability density map distribution of the critical wall sticking temperature of crude oil is obtained, and finally the recommended value of the critical wall sticking temperature is determined based on the probability density map distribution as a production guidance indicator.
[0099] 3. Temperature drop and pressure drop model construction module
[0100] The whole water mixing process is as follows Figure 1As shown, from the valve group room to the metering room, from the metering room to the wellhead, from the wellhead back to the metering room, and from each metering room back to the valve group room, each link involves the temperature change for thermal loss calculation and the pressure change for hydraulic loss calculation. There is diversion in the process from the valve group room to the metering room and from the metering room to the wellhead, and there is a confluence process at the wellhead, when the wellhead returns to the metering room, and when the metering room returns to the valve group room. The confluence of the liquid flow involves changes in its physical properties, such as temperature, density, and specific heat capacity.
[0101] In this scheme, during the pipeline gathering and transportation process, the thermal calculation formula for temperature change along the pipeline is:
[0102] T 下游 =(T 上游 -T0)e -aL +T0 formula (3.1); hydraulic calculation of friction loss along the way adopts the Reepinson calculation formula: The values of β and m are shown in Table (2). The temperature, flow rate, density and specific heat capacity of the liquid flow confluence process are calculated as follows:
[0103] The mixed liquid temperature is calculated as:
[0104] The mixed liquid flow rate is calculated as:
[0105] The density of the mixed liquid is calculated as:
[0106] The specific heat capacity of the mixed liquid is calculated as:
[0107] in:
[0108] K is the total heat transfer coefficient of the pipeline, W / (m 2 ℃);
[0109] d and D are the inner and outer diameters of the pipe section, respectively, in m;
[0110] L is the length of the pipeline section, m;
[0111] T 上游 , T 下游 , T0 represent the upstream temperature, downstream temperature and surrounding soil temperature of the pipeline section, in °C;
[0112] β(unit:s 2 / m), the value of m varies according to different flow states such as laminar flow, hydraulic smooth zone, mixed friction zone and rough zone.
[0113] υ is the kinematic viscosity of the fluid, m 2 / s.
[0114] ρ, G, C are the density of the fluid kg / m 3 Flow rate m 3 / h, specific heat capacity J / kg·℃, where the subscript i represents the fluid under the i-th pipeline;
[0115] Since the thermal and hydraulic calculation processes of each section of the entire gathering and transportation pipeline are similar, this scheme only gives examples of the thermal and hydraulic calculation process from the diversion between valve groups to the metering room. The calculation process of the temperature, flow, density, and specific heat capacity changes after the confluence of each section of the pipeline is also similar. This scheme also only gives examples of the calculation of physical quantities related to the confluence of water and wellhead produced fluid. The details are as follows:
[0116] Mix water from valve group to metering room
[0117] (a) Thermal calculation
[0118] Assume there are M metering rooms, and the water distribution ratio of each metering room is {m1, m2...m i ...m M}∈(0,1), the distance from the valve group to the i-th metering room is The outer diameter of the tube is Inner diameter The amount of water flowing to each metering room is G M_i =G 出 ·m i , where i is the i-th metering room, and the temperature of the hot water mixed with water when it reaches the i-th metering room is:
[0119]
[0120] in The heat loss from the valve group room to the i-th metering room is:
[0121] There are M metering rooms in total. The total heat loss from the valve group room to all metering rooms is: Unit: kW;
[0122] (b) Hydraulic calculation
[0123] Using the valve group temperature T 出 and the temperature T when it reaches the i-th metering room M_i , determine the average temperature of the fluid in this section of the pipeline as According to the viscosity-temperature curve relationship, the corresponding kinematic viscosity value is υ, using the formula Calculate the Reynolds number Re, check table (1) to determine the flow pattern, obtain the corresponding β and m values according to table (2), and use formula (3.2) to calculate the friction loss along the section
[0124] Table 1 Division Range of Reynolds Number Re and Calculation of Hydraulic Friction Coefficient λ
[0125]
[0126] Note: 1. When 2000 < Re < 3000, it can be calculated according to the hydraulically smooth zone;
[0127] 2. Re1 - Critical Reynolds number for the transition from the hydraulically smooth zone to the mixed friction zone;
[0128] 3. Re2 - Critical Reynolds number for the transition from the mixed friction zone to the rough zone;
[0129] 4. e - Absolute (equivalent) roughness of the inner wall of the pipe. For straight-seam steel pipes, e is taken as 0.054 mm; for seamless steel pipes, e is taken as 0.06 mm; for spiral-seam steel pipes, DN250 - DN350, e is taken as 0.125 mm, and for DN400 and above, e is taken as 0.10 mm.
[0130]
[0131]
[0132] From the valve group room to the metering room, there are a total of M pipelines. During the process from the valve group room to the metering room, the total frictional head loss along the way is: The total pressure energy loss is: Unit: kW;
[0133] The hot water for wellhead water injection is mixed with the wellhead produced fluid
[0134] Assume the oil production of the jth well is O j , (unit: m 3 / h), the oil outlet temperature is T O_j , the specific heat capacity of the oil outlet is C O_j , the density is ρ O_j , then after the wellhead oil and water are mixed, according to the mixed liquid temperature calculation formula (3.3), the mixed liquid temperature is: According to formula (3.4), the mixed liquid volume flow rate is G' W_ji = G W_ij + G O_j , according to formula (3.5), the mixed liquid density is According to formula (3.6), the specific heat capacity of the mixed liquid is:
[0135]
[0136] According to the above steps, the return liquid temperature T' of the station can finally be obtained 入 = T(T 出 , G 出 , m i , wij ) and return liquid pressure P' 入 =P 入 (T 出 ,G 出 ,m i ,w ij ) expression. It indicates the station return liquid temperature T' 入 and return pressure P' 入 It can be expressed as 出 , G 出 、m i 、w ij The unknown quantities represent the outlet temperature of the manifold between valve groups, T 出 , export flow G 出 , the ratio of the liquid flow in the i-th metering room to the total outlet flow of the manifold between the valve groups m i , the ratio of the flow rate from the i-th metering room to the j-th well to the total flow rate of the i-th metering room w ij .
[0137] 4. Pipeline physical property parameter update and correction module
[0138] In the above thermal and hydraulic calculation processes, relevant physical quantities need to be entered based on prior knowledge, such as viscosity-temperature curve, total heat transfer coefficient K of pipeline, specific heat capacity of oil and water, density of oil and water, etc. Usually, viscosity-temperature curve, specific heat capacity of oil and water, density of oil and water, etc. can be determined through the test data of the general physical properties and rheological properties of crude oil in the "GB 50253-2014 Oil Pipeline Engineering Design Code"; the total heat transfer coefficient K of the pipeline can be determined based on the type of insulation material, pipe diameter and soil moisture according to the "GB50350-2015 Oilfield Oil and Gas Gathering and Transportation Design Code". In this way, the deviation of K value may become larger and larger over time; in order to avoid the error caused by empirical values, on the other hand, the real historical operation data can be used to build an optimization objective function combined with the gradient descent method to perform modeling and fitting to determine the K value. The specific steps are as follows:
[0139] Obtain sensor data of relevant points from the database, mainly including: manifold outlet pressure, manifold outlet flow, manifold outlet temperature, manifold inlet pressure, manifold inlet flow, manifold inlet temperature, wellhead pressure, wellhead temperature, etc.;
[0140] Obtain the stable operation data of the gathering and transportation pipeline under different working conditions. The specific extraction steps are as follows:
[0141] With time T as the window size, slide the data set and calculate the stability of a specific point in step (1) within the time window. The stability of the point in the process is determined according to the following criteria: Among them, yji is the i-th value of the variable j at a specific point; n is the number of historical data in the time window T to determine whether the process is stable; is the mean of the jth variable selected ε is a pre-specified steady-state judgment threshold, which can be customized for each variable, such as a value range of (0, 0.05). When the threshold condition is met, the data in the time window is representative steady data, and the average value of each variable in the time window is calculated. is the representative value of the point, and a stable running sample is screened out. The window is continuously sliding, and the above process is repeated to obtain multiple stable samples.
[0142] The total heat transfer coefficient K of each pipeline i The value is an unknown parameter. Using the mechanism formula, calculate the final oil gathering pipeline manifold inlet temperature T' 入 =T(K i ), inbound pressure P' 入 =P(K i ), the optimization objective function is constructed as: It represents the sum of the relative deviation between the predicted header inlet temperature and the actual inlet temperature and the relative deviation between the predicted header inlet pressure and the actual inlet pressure.
[0143] With the goal of minimizing the above objective function, the small batch gradient descent method is used to iteratively update the parameter K, and finally the total heat transfer coefficient K of each pipeline is obtained. i .
[0144] 5. Module for establishing and solving optimization targets with constraints
[0145] 1) Establish optimization target expression
[0146] According to the water injection route map, the actual configuration of each pipeline in the well, room and station is determined. According to the different process characteristics of annular water injection and double-pipe water injection, the mechanism model is used to calculate the changes in temperature and pressure along the pipeline section by section, and then the heat loss and pressure energy loss on each section of the pipeline are obtained. The loss of each section of the entire water injection pipeline is calculated in turn, and the energy loss of the entire pipeline is obtained by accumulating and summing. The total loss is what we hope to supplement through the heating furnace and pump system. According to the outlet temperature T of the manifold between the valve groups 出 With the outlet flow G 出 , it can be seen that the gas consumption required for the heating furnace is The power consumption of the pump is calculated as follows: Among them, H 出 , G 出 The relationship between can be described approximately by fitting the characteristic curve of the centrifugal pump. A common empirical formula is in the form of a quadratic equation: H shutIt is the head when G=0 (i.e. the maximum head of the pump), in m; a1 and a2 are empirical coefficients, determined according to the specific conditions of the pump.
[0147] Assume that the unit price of gas is a yuan / m 3 , the unit price of electricity is b yuan / k·Wh, then the operating cost is:
[0148]
[0149] This formula is the optimization target expression to be solved. Solving this formula to minimize the target value means that the best combination is selected among all combinations of high water addition, low temperature and low water addition, high temperature, so that the total operating cost of the entire water addition system is the lowest.
[0150] in:
[0151] G 出 is the outlet flow rate of the manifold fluid between valve groups, m 3 / h, ρ is the fluid density, kg / m 3 ; C is the specific heat capacity of the fluid,
[0152] H 出 The displacement of the pump is G 出 Head at time, m;
[0153] η 泵 The pump displacement at the design temperature is G 出 Oil delivery efficiency at the time
[0154] η e is the motor efficiency;
[0155] T' 入 , T 出 They are respectively the inlet temperature of the heating furnace, i.e. the temperature of the incoming liquid, and the outlet temperature, i.e. the outlet temperature of the manifold between the valve groups, ℃;
[0156] B is the gas flow rate, unit is m 3 / h;
[0157] Q netv,ar The received low calorific value of the gas, in kJ / m 3 ;
[0158] η 炉 It is the heating furnace effect;
[0159] (2) Constraints
[0160] Since the station has a minimum entry temperature requirement, assume that the minimum entry temperature is T 入 =30℃, then constraint 1 is T' 入 ≥T 入; At the same time, the station has a minimum inlet pressure requirement. Assume that the minimum station return pressure is P 入 =0.2MPa, the total loss of pipeline pressure head during the whole process is: h l =h V +h M +h' W +h' W +h M +, assuming that all the pressure head loss in the pipeline is provided by the pump, then the second constraint is
[0161] For each metering room, the flow is divided into i , and the diversion w to each wellhead Wi , first of all, the following constraints must be met: Constraint four is
[0162] In summary, the problem to be solved is based on the optimization problem with constraints, in the form of:
[0163]
[0164] stT' 入 ≥T 入
[0165] ρg(H 出口 -h l )≥P 入
[0166]
[0167] ...
[0169] The model-related calculation process expressions are constructed using Python language, and the optimize.minimize optimization algorithm in the scipy library is called to solve the nonlinear optimization problem under constraints and obtain the final water mixing temperature T. 出 and water mixing flow G 出 The best combination.
[0170] 6. Optimal recommendations for water mixing temperature and water mixing amount under different modes
[0171] According to different on-site operation requirements, 3 optimization operation modes can be set and switched freely, and each operation mode corresponds to: Mode 1, fixed water addition flow rate, optimal temperature recommendation; Mode 2, fixed water addition temperature, optimal flow rate recommendation; Mode 3, optimal water addition temperature and flow rate combination recommendation; Mode 1 means that the outlet valve is not adjusted to make the water addition flow rate fixed, and the optimization system recommends the optimal water addition outlet temperature; Mode 2 means setting the outlet temperature control target of the heating furnace unchanged and adjusting the outlet valve to change the water addition flow rate, and the optimization system recommends the optimal water addition flow rate; Mode 3 means adjusting the water addition outlet temperature target value and the water addition flow rate at the same time, and the optimization system recommends the optimal water addition temperature and water addition flow rate combination value.
[0172] The present invention uses big data analysis technology to determine the critical wall adhesion temperature to replace the traditional freezing point temperature standard, which greatly saves energy waste; constructs a temperature drop model and a pressure drop model in the water mixing process pipeline gathering and transportation process, and uses historical operation data to update the correlation coefficient in the model, thereby improving the adaptability and accuracy of the model; by quantifying the modeling of the water mixing process operation optimization process as an optimization problem with constraints to solve, it lays the foundation for realizing automatic control of the water mixing flow rate and water mixing temperature.
[0173] This scheme establishes the temperature drop model and pressure drop model of the pipeline gathering and transportation process based on the mechanism, combines the pipeline static data, oil physical property data, and sensor operation dynamic data, and uses big data analysis and modeling technology to fit the hydraulic friction coefficient change trend diagram of the fluid at different temperatures, analyzes and statistics the temperature value corresponding to the fastest change of the hydraulic friction coefficient, and defines it as the critical wall sticking temperature. The return liquid temperature at the station is 3-5℃ higher than this critical wall sticking temperature as a production guidance indicator to control water injection. On this basis, a calculation model for heat loss and pressure energy loss of each section of the pipeline under different water injection forms such as annular water injection and double-tube water injection is established, and the correlation coefficient of the process model is corrected using historical operation data. Finally, an optimization target model with constraints is constructed to solve the problem, and the best recommendation of water injection temperature and water injection flow rate under different operating modes is achieved.
[0174] The above-described embodiments of the present invention do not limit the protection scope of the present invention.
Claims
1. A method for recommending the temperature limit of low-temperature gathering and transportation water mixing and optimizing process energy saving. It is characterized in that include: The pipe network configuration information and operation record module records and stores the pipe network configuration information and sensor dynamic data of the well station; The critical wall sticking temperature value recommendation module determines the critical wall sticking temperature recommendation value as a production guidance indicator based on the inter-well station network configuration information of each oil gathering pipeline and the dynamic historical operation data of the sensor; The temperature drop and pressure drop model building module calculates the temperature change and the pressure change of the hydraulic loss from each link from the valve group room to the metering room, from the metering room to the wellhead, from the wellhead back to the metering room, and from each metering room back to the valve group room. The pipeline physical property parameter update and correction module uses real historical operation data to build an optimization objective function and combine the gradient descent method to perform modeling and fitting to determine the total heat transfer coefficient of the pipeline; The module for establishing and solving optimization targets with constraints establishes the optimization target expression. The minimized target value of the optimization target expression represents the best combination under all combinations of high water addition, low temperature and low water addition, high temperature, so that the total operating cost of the entire water addition system is the lowest; the nonlinear optimization problem under constraints is solved to obtain the final optimal combination of water addition temperature and water addition flow rate; The optimal recommendation module for water addition temperature and water addition amount under different modes sets three optimization operation modes for free switching according to different on-site operation requirements: Mode 1, fixed water addition flow rate, optimal temperature recommendation; Mode 2, fixed water addition temperature, optimal flow rate recommendation; Mode 3, optimal water addition temperature and flow rate combination recommendation; Mode 1 means that the outlet valve is not adjusted to make the water addition flow rate fixed, and the optimization system recommends the optimal water addition outlet temperature; Mode 2 means setting the outlet temperature control target of the heating furnace unchanged and adjusting the outlet valve to change the water addition flow rate, and the optimization system recommends the optimal water addition flow rate; Mode 3 means adjusting the water addition outlet temperature target value and the water addition flow rate at the same time, and the optimization system recommends the optimal water addition temperature and water addition flow rate combination value.
2. The method for recommending the temperature limit of low-temperature gathering and transportation water mixing and optimizing process energy saving as claimed in claim 1, It is characterized in that The inter-well station pipeline configuration information includes: the actual layout route of the pipeline between the valve group and each metering room, each metering room and each wellhead, the static data of the inner and outer diameters of the pipeline, the pipeline length, and the insulation coefficient, the static configuration information of the water density, specific heat capacity and the density, specific heat capacity, average daily production, and viscosity-temperature curve of the wellhead produced liquid; the dynamic data of the sensor includes: the manifold temperature, manifold flow, and manifold pressure between the valve groups, the temperature, pressure, and flow of each metering room, the wellhead produced liquid temperature and pressure, and the station return liquid pressure, temperature, and flow.
3. The method for recommending the temperature limit of low-temperature gathering and transportation water mixing and optimizing process energy saving as claimed in claim 1, It is characterized in that The critical wall sticking temperature value recommendation module determines the critical wall sticking temperature recommended value as a production guidance indicator based on the inter-well station network configuration information of each oil gathering pipeline and the dynamic historical operation data of the sensor, including: The critical wall sticking temperature value recommendation module obtains the historical operation data of each oil gathering pipeline, which includes medium temperature, medium flow, medium pressure, pipe diameter, length, and density, and selects the representative data of each point in a stable state. The point stability judgment criterion is: Among them, y ji are the i-th values of variable j, respectively. j represents the variables: medium temperature, medium flow rate, and medium pressure; n is the number of historical data to determine whether the process is stable; is the mean of the jth variable selected ε is the pre-specified steady-state determination threshold; By Darcy's formula The hydraulic friction coefficient λ is inversely deduced, where H L is the friction loss along the pipeline, in m, reflecting the pressure difference between the upstream and downstream of the pipeline; V is the average flow velocity, in m / s; d is the inner diameter of the pipe, in m; g is the acceleration of gravity, in m / s 2 ; λ is the hydraulic friction coefficient, which reflects the resistance of the fluid flowing inside the pipe; The medium is sorted by temperature and divided into temperature intervals. The corresponding hydraulic friction coefficient λ in each temperature interval is obtained to represent the hydraulic friction coefficient λ at the temperature. Thus, the temperature-hydraulic friction coefficient trend chart of the fluid inside the pipeline is obtained. According to the temperature value corresponding to the point with the largest slope change rate of the hydraulic friction coefficient λ, the representative value of the critical wall adhesion temperature of the pipeline is obtained. By analogy, the representative values of critical wall sticking temperature of crude oil in multiple pipelines are statistically analyzed; After the above steps, the probability density map distribution of the critical wall sticking temperature of crude oil is obtained, and finally the recommended value of the critical wall sticking temperature is determined based on its probability density map distribution as a production guidance indicator.
4. The method for recommending the temperature limit of low-temperature gathering and transportation water mixing and optimizing process energy saving as claimed in claim 1, It is characterized in that The temperature drop and pressure drop model building module calculates the temperature change and hydraulic loss pressure change of each link from the valve group room to the metering room, from the metering room to the wellhead, from the wellhead back to the metering room, and from each metering room back to the valve group room, including: During the pipeline gathering and transportation process, the thermal calculation formula for temperature change along the pipeline is: T 下游 =(T 上游 -T 0 ) -aL +T 0 Formula (3.1); The friction loss along the hydraulic calculation is calculated using the Repinzon formula: The temperature, flow rate, density and specific heat capacity of the liquid flow confluence process are calculated as follows: The mixed liquid temperature is calculated as: The mixed liquid flow rate is calculated as: The density of the mixed liquid is calculated as: The specific heat capacity of the mixed liquid is calculated as: in: K is the total heat transfer coefficient of the pipeline, W / (m 2 ℃); d and D are the inner and outer diameters of the pipe section, respectively, in m; L is the length of the pipeline section, m; T 上游 , T 下游 , T 0 Respectively represent the upstream temperature, downstream temperature and surrounding soil temperature of the pipeline section, in °C; The values of β and m vary according to different flow regimes; υ is the kinematic viscosity of the fluid; ρ, G, and C are the density, flow rate, and specific heat capacity of the fluid, respectively, where the subscript i represents the fluid under the i-th pipeline.
5. The method for recommending the temperature limit of low-temperature gathering and transportation water mixing and optimizing process energy saving as claimed in claim 4, It is characterized in that The thermal calculation of water mixing between valve groups and metering room includes: Assume there are M metering rooms, and the water distribution ratio of each metering room is {m 1 、m 2 ...m i ...m M }∈(0,1), the distance from the valve group to the i-th metering room is The outer diameter of the tube is Inner diameter The amount of water flowing to each metering room is G M_i =G 出 ·m i , where i is the i-th metering room, and the temperature of the hot water mixed with water when it reaches the i-th metering room is: in The heat loss from the valve group room to the i-th metering room is: There are M metering rooms in total. The total heat loss from the valve group room to all metering rooms is: The hydraulic calculation of mixing water between valve groups and metering room includes: Using the valve group temperature T 出 and the temperature T when it reaches the i-th metering room M_i , determine the average temperature of the fluid in this section of the pipeline as According to the viscosity-temperature curve relationship, the corresponding kinematic viscosity value is υ, using the formula Calculate the Reynolds number Re, determine the flow pattern and the corresponding β and m values, and use formula (3.2) to calculate the friction loss along the section There are M pipelines from the valve group room to the metering room. The total friction loss along the way from the valve group room to the metering room is: The total pressure energy loss is:
6. The method for recommending the temperature limit of low-temperature gathering and transportation water mixing and optimizing process energy saving as claimed in claim 4, It is characterized in that The calculation of the mixing of hot water at the wellhead with the produced fluid at the wellhead includes: Assume that the oil production of the jth port is O j , the oil outlet temperature is T O_j , the specific heat capacity of the oil is C O_j , the density is ρ O_j , after the oil and water are mixed at the wellhead, the temperature of the mixed liquid is calculated by the mixed liquid temperature calculation formula (3.3): From formula (3.4), we know that the volume flow rate of the mixed liquid is G' W_ji =G W_ij +G O_j , from formula (3.5) we know that the density of the mixed liquid is From formula (3.6), we know that the specific heat capacity of the mixed liquid is: According to the above steps, the station return liquid temperature T' is finally obtained 入 =T(T 出 ,G 出 ,m i ,w ij ) and return liquid pressure P' 入 =P 入 (T 出 ,G 出 ,m i ,w ij ) expression; indicates the station return liquid temperature T' 入 and return pressure P' 入 It can be expressed as 出 , G 出 、m i 、w ij The unknown quantities represent the outlet temperature of the manifold between valve groups, T 出 , export flow G 出 , the ratio of the liquid flow of the i-th metering room to the total outlet flow of the manifold between the valve groups m i , the ratio of the flow rate from the i-th metering room to the j-th well to the total flow rate of the i-th metering room w ij .
7. The method for recommending the temperature limit of low-temperature gathering and transportation water mixing and optimizing process energy saving as claimed in claim 1, It is characterized in that The pipeline physical property parameter update and correction module uses real historical operation data to build an optimization objective function and combine it with the gradient descent method to perform modeling and fitting to determine the total heat transfer coefficient of the pipeline, including: The sensor data of the relevant points are obtained from the database. The sensor data of the relevant points include: manifold outlet pressure, manifold outlet flow, manifold outlet temperature, manifold inlet pressure, manifold inlet flow, manifold inlet temperature, and wellhead pressure and wellhead temperature; Obtain the stable operation data of the gathering and transportation pipeline under different working conditions. The specific extraction steps are as follows: With time T as the window size, slide the data set, calculate the stability of a specific point within the time window, and judge the stability of the point in the process according to the following criteria: Among them, yji is the i-th value of the variable j at a specific point; n is the number of historical data in the time window T to determine whether the process is stable; is the mean of the jth variable selected ε is a pre-specified steady-state judgment threshold; when the threshold condition is met, the data in the time window is representative stable data, and the average value of each variable in the time window is calculated. is the representative value of the point, thereby selecting a stable running sample; continuously sliding the window and repeating the above process to obtain multiple stable samples; The total heat transfer coefficient K of each pipeline i The value is an unknown parameter. Using the mechanism formula, the final oil gathering pipeline manifold inlet temperature T' is calculated. 入 =T(K i ), inbound pressure P' 入 =P(K i ), the optimization objective function is constructed as: It represents the sum of the relative deviation between the predicted manifold inlet temperature and the actual inlet temperature and the relative deviation between the predicted manifold inlet pressure and the actual inlet pressure; With the goal of minimizing the above objective function, the small batch gradient descent method is used to iteratively update the parameter K, and finally the total heat transfer coefficient K of each pipeline is obtained. i .
8. The method for recommending the temperature limit of low-temperature gathering and transportation water mixing and optimizing process energy saving as claimed in claim 1, It is characterized in that The constrained optimization target establishment and solution module establishes the optimization target expression. The minimized target value of the optimization target expression represents the best combination under all combinations of high water addition, low temperature and low water addition, high temperature, so that the total operating cost of the entire water addition system is the lowest; Complete the solution of nonlinear optimization problem under constraints and obtain the optimal combination of water mixing temperature and water mixing flow rate, including: According to the outlet temperature T of the manifold between valve groups 出 With the outlet flow G 出 , it can be seen that the gas consumption required for the heating furnace is The power consumption of the pump is calculated as follows: Among them, H 出 , G 出 The relationship between can be described approximately by fitting the characteristic curve of the centrifugal pump. The empirical formula is in the form of a quadratic equation: H shut is the head when G = 0, a 1 and a 2 It is an empirical coefficient, determined according to the specific conditions of the pump; Assume that the unit price of gas is a yuan / m 3 , the unit price of electricity is b yuan / k·Wh, then the operating cost is: This formula is the optimization objective expression to be solved; in: G 出 is the outlet flow rate of the manifold fluid between valve groups, m 3 / h, ρ is the fluid density, kg / m 3 ; C is the specific heat capacity of the fluid, J / kg·℃; H 出 The displacement of the pump is G 出 Head at 10000 m; η 泵 The pump displacement at the design temperature is G 出 Oil delivery efficiency at the time η e is the motor efficiency; T' 入 , T 出 They are the heating furnace inlet (inlet liquid temperature) and outlet temperature (valve group header outlet temperature), ℃; B is the gas flow rate, unit is m 3 / h; Q netv,ar The received low calorific value of the gas, in kJ / m 3 ; η 炉 It is the heating furnace effect; Since the station has a minimum entry temperature requirement, assume that the minimum entry temperature is T 入 =30℃, then constraint 1 is T' 入 ≥T 入 ; At the same time, the station has a minimum inlet pressure requirement. Assume that the minimum station return pressure is P 入 =0.2MPa, the total loss of pipeline pressure head during the whole process is: h l =h V +h M +h W +'h W +'h M , assuming that all the pressure head losses in the pipeline are provided by the pump, then the second constraint is For each metering room, the flow is divided into i , and the diversion w to each wellhead Wi , first of all, the following constraints must be met: Constraint four is The form of the optimization problem under constraints is: s.t.T′ 入 ≥T 入 ρg(H 出口 -h l )≥P 入 ... The model-related calculation process expressions are constructed using Python language, and the optimize.minimize optimization algorithm in the scipy library is called to solve the nonlinear optimization problem under constraints and obtain the final water mixing temperature T. 出 and water mixing flow G 出 The best combination.
