Crude oil coagulation risk optimization method based on well-station-oil depot coupling simulation

By using well-station-oil depot coupled simulation technology, the pipeline network topology is designed, discrete computing units are used to calculate crude oil physical property parameters, and temperature and pressure parameters are iteratively updated. This solves the problem that traditional detection methods cannot monitor pipe condensation risks in a timely manner, and realizes low-cost and rapid pipe condensation risk monitoring and energy consumption optimization.

CN120995645APending Publication Date: 2025-11-21CHANGZHOU UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510869685.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-26
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

Traditional metering and detection methods cannot obtain timely and rapid information on pipe condensation risks in oilfield well-station-oil depot pipeline networks, leading to frequent production safety accidents and high costs, and failing to meet the needs of real-time monitoring and energy consumption optimization.

Method used

The well-station-oil depot coupled simulation technology is adopted. By designing the pipeline network topology, discretizing the computing units, calculating the crude oil physical property parameters, iteratively updating the temperature and pressure parameters, judging the risk of condensation, and optimizing the temperature and pressure distribution.

Benefits of technology

It enables low-cost and rapid monitoring of pipe condensation risks, improves production safety and efficiency, and meets the oilfield's real-time monitoring and energy consumption optimization needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120995645A_ABST
    Figure CN120995645A_ABST
Patent Text Reader

Abstract

The invention provides a well-station-oil depot coupling simulation-based crude oil coagulation risk optimization method, which comprises the following steps of: firstly, designing a well-station-oil depot pipe network system topological structure, analyzing a pipe network structure, and numbering wells, stations, oil depots and pipelines to obtain the numbers of an upstream pipeline and a downstream pipeline of each pipeline; then, a well-station-oil depot pipe network system is disassembled into a node + pipeline form, each pipeline is dispersed into a plurality of calculation units, and the pipe section length, diameter and dip angle of each calculation unit are obtained; according to the fluid temperature of each wellhead, the fluid entering pressure of each station and a PVT physical property table, assuming the temperature and pressure of all nodes to obtain the average temperature and pressure of each pipe section; and calculating crude oil physical property parameters, crude oil flow parameters, pressure drop and temperature drop parameters of each pipe section by adopting an iterative method to obtain pressure and temperature of all nodes, and finally judging the pipe condensation risk according to the physical property parameters and the pipeline pressure and temperature. The pipe condensation risk can be automatically judged, and the production efficiency and safety are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of well-station-oil depot pipeline network coupled simulation technology, specifically to a crude oil condensate pipeline risk optimization method based on well-station-oil depot coupled simulation. Background Technology

[0002] In oilfield development, a large number of pipelines in the well-station-oil depot network need to be insulated for crude oil. If the insulation measures are not in place, it is very likely to cause pipe condensation, leading to serious production safety accidents such as pipeline blockage and equipment damage, which will affect the production efficiency of the oilfield.

[0003] Traditional measurement and testing methods have revealed many drawbacks in addressing this issue. On the one hand, their costs remain high, and for a large and complex pipeline network system like an oilfield, long-term use of traditional testing methods would impose a huge economic burden. On the other hand, the testing cycle is long, making it impossible to obtain timely and rapid information on the flow status of crude oil in the pipeline and the risk of pipe clogging, which is insufficient to meet the production needs of real-time monitoring and timely handling in oilfields.

[0004] Therefore, there is an urgent need for a low-cost method to detect the risk of condensation. With the advancement of energy conservation, emission reduction and refined management, engineering projects urgently need to obtain integrated temperature and pressure distribution of well-station-oil depot to optimize comprehensive energy consumption. Summary of the Invention

[0005] In view of this, the present invention provides a crude oil condensation risk optimization method based on well-station-oil depot coupled simulation, which virtually monitors the flow state within the pipeline network, automatically judges condensation risk, optimizes temperature and pressure distribution, and reduces energy consumption.

[0006] This invention provides a method for optimizing crude oil pipeline risk based on well-station-oil depot coupled simulation, comprising: Step S1: Designing the topology of the well-station-oil depot pipeline network system, inputting pipeline network parameters, analyzing the structure of the pipeline network system, and numbering the pipelines, wells, and stations in the pipeline network system sequentially, with the numbering order forming 1 and 0, to obtain the upstream pipeline number and downstream pipeline number of each pipeline; Step S2: Reading the pipeline network parameter settings, and discretizing each pipeline into multiple nodes and pipelines by decomposing the pipeline network system into a node-plus-pipeline form. Step S3: Read the pipeline network parameter settings, and based on the known wellhead fluid temperature and fluid inlet pressure, assume the temperature and pressure of all nodes to obtain the average temperature and pressure of each pipe segment; Step S4: According to pipeline sequence 1, calculate the crude oil physical property parameters of each pipe segment based on the PVT property table and the average temperature and pressure of each pipe segment; Step S5: According to pipeline sequence 1, calculate the flow pattern of each pipe segment from the beginning to the end based on the crude oil physical property parameters and the PVT property table. Liquid holdup; Step S6: Based on the flow pattern and liquid holdup of each pipe segment, perform temperature drop calculation according to pipe sequence 1, and update the temperature parameters of all nodes sequentially from the beginning to the end according to the obtained temperature drop calculation results; Step S7: Perform pressure drop calculation according to pipe sequence 2, and update the pressure parameters of all nodes sequentially from the end to the beginning according to the obtained pressure drop calculation results; Step S8: Determine whether the pressure drop calculation results and the temperature drop calculation results meet the calculation accuracy requirements. If they do not meet the calculation accuracy requirements, return to step S3, and update the temperature parameters and pressure... The parameters are assumed temperature and pressure for all nodes. Steps S3-S8 are repeated until the pressure drop calculation result and the temperature drop calculation result meet the calculation accuracy requirements. Then the pipeline network calculation result is output. Step S9: According to pipeline sequence 1, the condensation temperature of each pipeline segment is calculated based on the crude oil physical property parameters, updated temperature parameters and updated pressure parameters to determine the condensation risk and output the pipeline segments with condensation risk. Step S10: Optimize the condensation risk by calculating the minimum wellhead temperature required for safe operation of the pipeline network through iterative loop.

[0007] Optionally, the specific process of step S1 is as follows: analyze the pipeline elevation, divide the pipeline into straight pipe sections, and accurately describe the geographical coordinates and elevation of the pipeline network; input parameters: wellhead flow rate, wellhead fluid temperature, and inlet fluid pressure; analyze the pipeline network topology, number the pipelines according to the calculation order to form sequence 1 (1, 2, 3, ..., n), and set numbers for wellheads and stations along the route to form sequence 0 (1, 2, 3, ..., m); if the pipeline connects to the inlet upstream or the pipeline connects to the station downstream, add a negative sign before the pipeline number, and use the absolute value of the number when judging the order.

[0008] Optionally, the specific process of step S2 is as follows: construct a pipeline network database, including pipeline number, pipeline start and end coordinates, elevation, upstream and downstream pipeline numbers, inner diameter and total heat transfer coefficient of the pipeline; design an Excel file, read the data, and use a structure to store oil depot process parameters and pipeline parameters; decompose the pipeline network system into the form of nodes plus pipelines, add virtual nodes to store pipeline attributes, discretize each pipeline into multiple calculation units and determine the pipe segment length, diameter and inclination angle of each calculation unit.

[0009] Optionally, the specific process of step S3 is as follows: design a wellhead Excel file and a site Excel file, wherein the wellhead Excel file includes the wellhead number, flow mass flow, water cut and wellhead temperature;

[0010] Following the pipeline coding order, pressure and temperature data of the upstream and downstream pipelines of each site are written into the site's Excel file. The wellhead Excel file and the site's Excel file are read to obtain wellhead flow parameters and pipeline outlet pressure parameters connecting to the site. Multiple empty arrays are created based on the pipeline parameters to store the inlet mass flow rate, fluid water content, fluid temperature, and terminal pressure of each pipeline. The inlet mass flow rate and fluid water content of each pipeline are assigned to each node in the pipeline. Based on the starting temperature and terminal pressure of each pipeline, the temperature and pressure of each node in each pipeline are assumed to be calculated, resulting in the average temperature and average pressure of each pipe segment.

[0011] Optionally, the specific process of step S4 is as follows: establish a PVT property table based on the changes in crude oil volume coefficient, viscosity, and compressibility coefficient with temperature and pressure, and the changes in water phase density, viscosity, and specific heat capacity with temperature and pressure; call the PVT property table, obtain PVT attributes based on the average temperature and pressure of each pipe section, wherein the PVT attributes include crude oil property parameters; and calculate the flow properties of each pipe section based on the PVT attributes.

[0012] Optionally, the specific process of step S5 is as follows: according to the pipeline sequence 1, calculate the flow pattern, liquid holdup, temperature drop and pressure drop between the two nodes based on the PVT property table, and store the flow pattern, liquid holdup, temperature drop and pressure drop data between the two nodes.

[0013] Optionally, the specific process of step S6 is as follows: according to the pipeline sequence 1, perform calculation operations on the pipeline to obtain temperature parameters; if the pipeline number is less than 0, the upstream inlet of the pipeline is directly assigned a variable value, and then the temperature of each node from the beginning to the end is updated according to the temperature drop data; if the pipeline number is greater than 0, there is an upstream pipeline, traverse each upstream pipeline of the pipeline to perform temporary data storage operations, calculate the temperature, flow rate, and pressure parameters of the upstream and downstream pipeline junctions, then assign a variable value, and update the temperature of each node from the beginning to the end according to the temperature drop data.

[0014] Optionally, the specific process of step S7 is as follows: according to pipeline sequence 2, perform calculation operations on the pipeline to obtain pressure parameters; if the pipeline number is less than 0, then the downstream connection station of the pipeline directly assigns the variable value, and then updates the pressure of each node from the end to the beginning according to the pressure drop data; if the pipeline number is greater than 0, then there is a downstream pipeline, and the pressure parameter of the beginning of the downstream pipeline is assigned to the pressure parameter of the end of the current pipeline according to the pipeline number, and the pressure of each node from the end to the beginning is updated according to the pressure drop data.

[0015] Optionally, the specific process of step S8 is as follows: calculate the difference between the updated temperature and pressure parameters of all nodes and the results of the previous iteration, and determine the maximum value as the maximum loss; compare the maximum loss with a preset loss threshold to determine whether the calculation accuracy requirement is met; if the maximum loss is greater than the preset loss threshold, it is considered that the calculation accuracy requirement is not met, and then return to step S3 to recalculate the updated temperature and pressure as assumed values; if the maximum loss is less than or equal to the preset loss threshold, it is considered that the calculation accuracy requirement is met, then the loop ends and the pipeline calculation result is output.

[0016] Optionally, the specific process of optimizing the condensation risk in step S10 is as follows: if condensation risk occurs, return to step S3, modify the initial pipeline parameters, recalculate by increasing the temperature parameter by a step size of 0.1, and repeat steps S3-S10 until all pipelines are free of condensation risk; if there is no condensation risk, return to step S3, modify the initial pipeline parameters, recalculate by decreasing the temperature parameter by a step size of 0.1, and repeat steps S3-S10 until the lowest wellhead temperature without condensation risk is calculated and output as the simulation result.

[0017] In summary, this invention first designs the topology of a well-station-oil depot pipeline network system, analyzes the network structure, and sequentially numbers the wells, stations, oil depots, and pipelines to obtain the upstream and downstream pipeline numbers for each pipeline. Then, using coupled simulation technology, the well-station-oil depot pipeline network system is decomposed into a "node + pipeline" form. Pipeline parameter settings are read, and each pipeline is discretized into multiple calculation units to obtain basic data such as pipe segment length, diameter, and inclination angle for each calculation unit. Next, based on the known fluid temperature at each wellhead, the fluid inlet pressure at each station, and the PVT property table, the average temperature and pressure of each pipe segment are calculated by assuming the temperatures and pressures of all nodes. An iterative method is used to calculate the crude oil properties, flow parameters, pressure drop gradient, and temperature drop parameters of each pipe segment, yielding the pressure and temperature of all nodes. Finally, the risk of pipe condensation is assessed based on the property parameters and the pipeline pressure and temperature. This invention effectively demonstrates the flow characteristics within the well-station-oil depot pipeline network, analyzes and assesses pipe condensation risks, and helps improve production efficiency and safety. Attached Figure Description

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

[0019] Figure 1 This is a flowchart of the steps of the present invention.

[0020] Figure 2 This is a schematic diagram illustrating the coupled simulation concept of the present invention.

[0021] Figure 3 This is a schematic diagram of the well-station-oil depot pipeline network system.

[0022] Figure 4 To and Figure 1 The corresponding overall flowchart of the present invention. Detailed Implementation

[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings, and implemented in MATLAB language. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0024] See Figures 1-4 The present invention provides a crude oil condensate pipe risk optimization method based on well-station-oil depot coupled simulation, which mainly includes the following steps:

[0025] Step S1: Design the topology of the well-station-oil depot pipeline network system, input the pipeline network parameters, analyze the structure of the pipeline network system, and number the pipelines, wells and stations in the pipeline network system in sequence, with the numbering order forming 1 and 0, to obtain the upstream pipeline number and downstream pipeline number of each pipeline.

[0026] Step S2: Read the pipeline network parameter settings. By disassembling the pipeline network system into nodes and pipes, each pipe is discretized into multiple calculation units, and the pipe segment length, diameter, and inclination angle of each calculation unit are determined.

[0027] Step S3: Read the pipeline network parameter settings. Based on the known wellhead fluid temperature and fluid inlet pressure, assume the temperature and pressure of all nodes, and obtain the average temperature and pressure of each pipe section.

[0028] Step S4: According to pipeline sequence 1, calculate the crude oil physical property parameters of each pipeline segment based on the PVT property table and the average temperature and pressure of each pipeline segment;

[0029] Step S5: According to pipeline sequence 1, based on the crude oil physical property parameters and the PVT property table, calculate the flow pattern and liquid holdup of each pipe section from the beginning to the end.

[0030] Step S6: Based on the flow pattern and liquid holdup of each pipe segment, perform temperature drop calculation according to pipe sequence 1, and update the temperature parameters of all nodes sequentially from the beginning to the end according to the obtained temperature drop calculation results.

[0031] Step S7: Perform pressure drop calculation according to pipeline sequence 2, and update the pressure parameters of all nodes sequentially from the end to the beginning based on the obtained pressure drop calculation results;

[0032] It should be understood that pipe sequence 2 is the reverse of pipe sequence 1.

[0033] Step S8: Determine whether the pressure drop calculation result and the temperature drop calculation result meet the calculation accuracy requirements. If they do not meet the calculation accuracy requirements, return to step S3, use the updated temperature parameters and pressure parameters as the assumed temperature and pressure for all nodes, and repeat steps S3-S8 until the pressure drop calculation result and the temperature drop calculation result meet the calculation accuracy requirements. Then output the pipeline network calculation result.

[0034] Step S9: According to pipeline sequence 1, calculate the condensation temperature of each pipeline segment based on the crude oil physical property parameters, updated temperature parameters and updated pressure parameters of each pipeline segment, in order to determine the condensation risk and output the pipeline segments with condensation risk.

[0035] Step S10: Optimize the risk of condensation in the pipeline by calculating the minimum wellhead temperature required for safe operation of the pipeline network through iterative loops.

[0036] The specific process of step S1 is as follows: Analyze the pipeline elevation, divide the pipeline into straight sections, and accurately describe the geographical coordinates and elevation of the pipeline network; input parameters: wellhead flow rate, wellhead fluid temperature, and inlet fluid pressure; analyze the pipeline network topology, number the pipelines according to the calculation order to form sequence 1 (1, 2, 3, ..., n), and set numbers for wellheads and stations along the way to form sequence 0 (1, 2, 3, ..., m); if the pipeline connects to the inlet upstream or the pipeline connects to the station downstream, add a negative sign before the pipeline number, and use the absolute value of the number when judging the order.

[0037] For example: if the pipeline upstream connection inlet or downstream connection station has a minus sign before the pipeline number followed by "-3", it means that the pipeline numbered -3 is connected to the inlet or station. The absolute value of the number is used when determining the order.

[0038] Optionally, the specific process of step S2 is as follows: construct a pipeline network database, including pipeline number, pipeline start and end coordinates, elevation, upstream and downstream pipeline numbers, inner diameter and total heat transfer coefficient of the pipeline; design an Excel file, read the data, and use a structure to store oil depot process parameters and pipeline parameters; decompose the pipeline network system into the form of nodes plus pipelines, add virtual nodes to store pipeline attributes, discretize each pipeline into multiple calculation units and determine the pipe segment length, diameter and inclination angle of each calculation unit.

[0039] Optionally, the specific process of step S3 is as follows: design a wellhead Excel file and a site Excel file, wherein the wellhead Excel file includes the wellhead number, flow mass flow, water cut and wellhead temperature;

[0040] Following the pipeline coding order, pressure and temperature data of the upstream and downstream pipelines of each site are written into the site's Excel file. The wellhead Excel file and the site's Excel file are read to obtain wellhead flow parameters and pipeline outlet pressure parameters connecting to the site. Multiple empty arrays are created based on the pipeline parameters to store the inlet mass flow rate, fluid water content, fluid temperature, and terminal pressure of each pipeline. The inlet mass flow rate and fluid water content of each pipeline are assigned to each node in the pipeline. Based on the starting temperature and terminal pressure of each pipeline, the temperature and pressure of each node in each pipeline are assumed to be calculated, resulting in the average temperature and average pressure of each pipe segment.

[0041] Optionally, the specific process of step S4 is as follows: establish a PVT property table based on the changes in crude oil volume coefficient, viscosity, and compressibility coefficient with temperature and pressure, and the changes in water phase density, viscosity, and specific heat capacity with temperature and pressure; call the PVT property table, obtain PVT attributes based on the average temperature and pressure of each pipe section, wherein the PVT attributes include crude oil property parameters; and calculate the flow properties of each pipe section based on the PVT attributes.

[0042] Optionally, the specific process of step S5 is as follows: according to the pipeline sequence 1, calculate the flow pattern, liquid holdup, temperature drop and pressure drop between the two nodes based on the PVT property table, and store the flow pattern, liquid holdup, temperature drop and pressure drop data between the two nodes.

[0043] Optionally, the specific process of step S6 is as follows: according to the pipeline sequence 1, perform calculation operations on the pipeline to obtain temperature parameters; if the pipeline number is less than 0, the upstream inlet of the pipeline is directly assigned a variable value, and then the temperature of each node from the beginning to the end is updated according to the temperature drop data; if the pipeline number is greater than 0, there is an upstream pipeline, traverse each upstream pipeline of the pipeline to perform temporary data storage operations, calculate the temperature, flow rate, and pressure parameters of the upstream and downstream pipeline junctions, then assign a variable value, and update the temperature of each node from the beginning to the end according to the temperature drop data.

[0044] Optionally, the specific process of step S7 is as follows: according to pipeline sequence 2, perform calculation operations on the pipeline to obtain pressure parameters; if the pipeline number is less than 0, then the downstream connection station of the pipeline directly assigns the variable value, and then updates the pressure of each node from the end to the beginning according to the pressure drop data; if the pipeline number is greater than 0, then there is a downstream pipeline, and the pressure parameter of the beginning of the downstream pipeline is assigned to the pressure parameter of the end of the current pipeline according to the pipeline number, and the pressure of each node from the end to the beginning is updated according to the pressure drop data.

[0045] Optionally, the specific process of step S8 is as follows: calculate the difference between the updated temperature and pressure parameters of all nodes and the results of the previous iteration, and determine the maximum value as the maximum loss; compare the maximum loss with a preset loss threshold to determine whether the calculation accuracy requirement is met; if the maximum loss is greater than the preset loss threshold, it is considered that the calculation accuracy requirement is not met, and then return to step S3 to recalculate the updated temperature and pressure as assumed values; if the maximum loss is less than or equal to the preset loss threshold, it is considered that the calculation accuracy requirement is met, then the loop ends and the pipeline calculation result is output.

[0046] Optionally, the specific process of optimizing the condensation risk in step S10 is as follows: if condensation risk occurs, return to step S3, modify the initial pipeline parameters, recalculate by increasing the temperature parameter by a step size of 0.1, and repeat steps S3-S10 until all pipelines are free of condensation risk; if there is no condensation risk, return to step S3, modify the initial pipeline parameters, recalculate by decreasing the temperature parameter by a step size of 0.1, and repeat steps S3-S10 until the lowest wellhead temperature without condensation risk is calculated and output as the simulation result.

[0047] In summary, this invention first designs the topology of a well-station-oil depot pipeline network system, analyzes the network structure, and sequentially numbers the wells, stations, oil depots, and pipelines to obtain the upstream and downstream pipeline numbers for each pipeline. Then, using coupled simulation technology, the well-station-oil depot pipeline network system is decomposed into a "node + pipeline" form. Pipeline parameter settings are read, and each pipeline is discretized into multiple calculation units to obtain basic data such as pipe segment length, diameter, and inclination angle for each calculation unit. Next, based on the known fluid temperature at each wellhead, the fluid inlet pressure at each station, and the PVT property table, the average temperature and pressure of each pipe segment are calculated by assuming the temperatures and pressures of all nodes. An iterative method is used to calculate the crude oil properties, flow parameters, pressure drop gradient, and temperature drop parameters of each pipe segment, yielding the pressure and temperature of all nodes. Finally, the risk of pipe condensation is assessed based on the property parameters and the pipeline pressure and temperature. This invention effectively demonstrates the flow characteristics within the well-station-oil depot pipeline network, analyzes and assesses pipe condensation risks, and helps improve production efficiency and safety.

[0048] It should be noted that the present invention can be a method, system, apparatus, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of the present invention.

[0049] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example, but not limited to, electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.

[0050] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0051] The computer program instructions used to perform the operations of this invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, Python, etc., and conventional procedural programming languages ​​such as "C" or similar languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing state information from the computer-readable program instructions. This electronic circuitry can execute the computer-readable program instructions to implement various aspects of the invention.

[0052] Various aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of apparatus (systems), methods, and computer program products according to embodiments of the invention. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0053] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0054] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0055] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions. It will be known to those skilled in the art that implementation in hardware, implementation in software, and implementation using a combination of software and hardware are equivalent.

[0056] The various embodiments of the present invention have been described above. These descriptions are exemplary and not exhaustive, and are not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein. The scope of the invention is defined by the appended claims.

Claims

1. A crude oil pipe freezing risk optimization method based on well-station-tank coupling simulation, characterized in that, The method comprises the following steps: Step S1: design the well-station-pipeline network system topology, input the pipeline network parameters, analyze the structure of the pipeline network system, number the pipelines, wells and stations in the pipeline network system in order, form 1 and 0 from the numbering order, obtain the upstream pipeline number and downstream pipeline number of each pipeline; Step S2: read the pipeline network parameter settings, disperse each pipeline into multiple calculation units by decomposing the pipeline network system into nodes and pipelines, and determine the pipe segment length, diameter and inclination angle of each calculation unit; Step S3: read the pipeline network parameter settings, and obtain the average temperature and pressure of each pipe segment according to the known wellhead fluid temperature and fluid inlet station pressure and the assumed temperature and pressure of all nodes; Step S4: according to the pipeline order 1, calculate the crude oil property parameters of each pipe segment according to the PVT property table, the average temperature and pressure of each pipe segment; Step S5: according to the pipeline order 1, calculate the flow pattern and liquid holdup of each pipe segment from the first end to the last end according to the crude oil property parameters and the PVT property table; Step S6: based on the flow pattern and liquid holdup of each pipe segment, perform temperature drop calculation according to the pipeline order 1, and update the temperature parameters of all nodes from the first end to the last end according to the obtained temperature drop calculation results; Step S7: perform pressure drop calculation according to the pipeline order 2, and update the pressure parameters of all nodes from the last end to the first end according to the obtained pressure drop calculation results; Step S8: determine whether the pressure drop calculation results and the temperature drop calculation results meet the calculation accuracy requirements, if not, return to step S3, and take the updated temperature parameters and pressure parameters as the assumed temperature and pressure of all nodes, repeat steps S3-S8 until the pressure drop calculation results and the temperature drop calculation results meet the calculation accuracy requirements, and then output the pipeline network calculation results; Step S9: according to the pipeline order 1, calculate the condensation pipe temperature of each pipe segment according to the crude oil property parameters, the updated temperature parameters and the updated pressure parameters of each pipe segment to determine the condensation pipe risk, and output the pipe segments with condensation pipe risk; Step S10: optimize the condensation pipe risk, and calculate the minimum wellhead temperature required for safe operation of the pipeline network through an iterative loop.

2. The method of claim 1, wherein, The specific process of step S1 is as follows: analyze the pipeline elevation, divide the pipeline into straight pipe segments, and accurately describe the geographic coordinate position and elevation of the pipeline network; input parameters: wellhead flow rate, wellhead fluid temperature and inlet station fluid pressure; analyze the pipeline network topology, number the pipelines according to the calculation order to form order 1 (1, 2, 3, …, n), and set numbers for the wellheads and stations along the way to form order 0 (1, 2, 3, …, m); if the upstream connection of the pipeline or the downstream connection of the pipeline is connected to the inlet or the station, a negative sign is added before the pipeline number, and the absolute value of the number is used when determining the order.

3. The method of claim 1, wherein, The specific process of step S2 is as follows: construct a pipeline network database including pipeline number, pipeline start and end point coordinates, elevation, upstream and downstream pipeline numbers, internal diameter and total heat transfer coefficient of the pipeline, design an excel file, read data, and use a structure to store oil depot process parameters and pipeline parameters; The pipe network system is disassembled into nodes and pipes, virtual nodes are added to store pipe properties, each pipe is discretized into multiple calculation units, and the length, diameter and inclination angle of each calculation unit are determined.

4. The method of claim 1, wherein, The specific process of the step S3 is as follows: An excel file of wellheads and an excel file of stations are designed, the excel file of wellheads includes wellhead number, flow mass flow, water cut and wellhead temperature; According to the pipe coding sequence, the pressure data and temperature data of the upstream pipe and the downstream pipe of the station are written into the excel file of the station, the excel file of the wellhead and the excel file of the station are read, and the wellhead flow parameters and the pipe outlet pressure parameters of the connected station are obtained; A plurality of empty arrays are created according to the pipe parameters, to store the inlet mass flow, fluid water cut, fluid temperature and end pressure of each pipe; The inlet mass flow and fluid water cut of each pipe are assigned to each node of the pipe, and the temperature and pressure of each node in each pipe are assumed according to the starting point temperature and end pressure of each pipe, to obtain the average temperature and average pressure of each pipe section.

5. The method of claim 1, wherein, The specific process of the step S4 is as follows: A PVT property table is established according to the changes of the volume coefficient, viscosity and compression coefficient of crude oil with temperature and pressure, and the changes of the density, viscosity and specific heat capacity of water phase with temperature and pressure; The PVT property table is called, and the PVT properties are obtained according to the average temperature and pressure of each pipe section, the PVT properties including the crude oil property parameters; The flow properties of each pipe section are calculated based on the PVT properties.

6. The method of claim 1, wherein, The specific process of the step S5 is as follows: According to the pipe sequence 1, the flow type, liquid holdup, temperature drop and pressure drop between two nodes are calculated according to the PVT property table, and the flow type, liquid holdup, temperature drop and pressure drop data between the two nodes are stored.

7. The method of claim 1, wherein, The specific process of the step S6 is as follows: According to the pipe sequence 1, the temperature parameters are obtained by performing calculation operation on the pipe; If the pipe number is less than 0, the upstream of the pipe is connected to the inlet, the variable is directly assigned, and the temperature of each node from the starting end to the ending end is updated according to the temperature drop data; If the pipe number is greater than 0, there is an upstream pipe, the data of each upstream pipe of the pipe is temporarily stored, the temperature, flow rate and pressure parameters of the upstream pipe and the downstream pipe junction are calculated, the variable is assigned, and the temperature of each node from the starting end to the ending end is updated according to the temperature drop data.

8. The method of claim 1, wherein, The specific process of the step S7 is as follows: According to the pipe sequence 2, the pressure parameters are obtained by performing calculation operation on the pipe; If the pipe number is less than 0, the downstream of the pipe is connected to the station, the variable is directly assigned, and the pressure of each node from the ending end to the starting end is updated according to the pressure drop data; If the pipe number is greater than 0, there is a downstream pipe, the starting end pressure parameter of the downstream pipe is assigned to the ending end pressure parameter of the current pipe according to the pipe number, and the pressure of each node from the ending end to the starting end is updated according to the pressure drop data.

9. The method of claim 1, wherein, The specific process of the step S8 is as follows: The difference values between the updated temperature parameters and pressure parameters of all nodes and the previous iteration results are calculated, and the maximum value among them is determined as the maximum loss. The maximum loss is compared with a preset loss threshold to determine whether the calculation accuracy requirement is met; If the maximum loss is greater than the preset loss threshold, it is considered that the calculation accuracy requirement is not met, and the temperature and pressure updated this time are returned to step S3 to be used as the assumed values for recalculation; If the maximum loss is less than or equal to the preset loss threshold, it is considered that the calculation accuracy requirement is met, and the loop ends, and the pipe network calculation result is output.

10. The method of claim 1, wherein, The specific process of the step S10 of optimizing the risk of pipe coagulation is as follows: If the risk of pipe coagulation occurs, return to step S3, modify the initial pipe network parameters, increase the temperature parameters according to a step size of 0.1 to recalculate, and repeat steps S3-S10 until all the pipes are free of the risk of pipe coagulation; If there is no risk of pipe coagulation, return to step S3, modify the initial pipe network parameters, decrease the temperature parameters according to a step size of 0.1 to recalculate, and repeat steps S3-S10 until the lowest wellhead temperature free of the risk of pipe coagulation is obtained as the simulation result.

Citation Information

Cited By

  • Biomass gas coupling multi-working-condition cooperative control method and system

    CN121806685A

  • Biomass gas coupling multi-working condition collaborative control method and system

    CN121806685B