A method and apparatus for optimizing a crude oil gathering and transportation pipeline system model
By treating oil wells, pipelines, and nodes as modules and using a data-driven linear regression method to correct the hydraulic-thermal model, the problems of data gaps and complexity in crude oil gathering and transportation pipeline systems were solved, and the model was simplified and its accuracy improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANDONG UNIV
- Filing Date
- 2023-10-24
- Publication Date
- 2026-06-30
AI Technical Summary
Data gaps and low accuracy in crude oil gathering and transportation pipeline systems lead to inaccurate modeling results. The complex topology, operating conditions, and system mechanisms result in large calculation errors in existing modeling methods, making it difficult to meet engineering requirements.
Treating oil wells, pipelines, and nodes as multi-input single-output modules, a data-driven linear regression method is used to correct the hydraulic-thermodynamic model. The model is simplified using Dukler II and Sukhov temperature drop formulas, and parameters are corrected by combining industrial production data.
It reduced the cost of data monitoring and collection, improved the accuracy and versatility of the model, simplified the system model, and met engineering requirements.
Smart Images

Figure CN117592226B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of petroleum transportation technology, specifically relating to a method and apparatus for optimizing a crude oil gathering and transportation pipeline system model. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] The crude oil gathering and transportation pipeline system (hereinafter referred to as the gathering and transportation system) is an important component of the oil and gas field production system, and it is essential to conduct modeling research on it.
[0004] However, due to environmental influences and technological limitations, monitoring and collecting operational data for some wells, nodes, and pipelines in the gathering and transportation system is not only costly but also very difficult. Therefore, many gathering and transportation systems suffer from data gaps. Traditional link models need to accurately express the mathematical relationships between various elements of the system, requiring a large amount of system operational data to describe the pipeline topology, equipment parameters, and crude oil characteristics. This makes the accuracy and completeness of system data crucial in link modeling; inaccurate or incomplete data can lead to significant errors in the constructed model. The data monitoring and collection for traditional link models can be further subdivided into the following issues:
[0005] 1) Missing data: Due to the complexity of the system and the difficulty of data collection, some important node data cannot be fully obtained, which leads to the incompleteness of the model data and directly reduces the accuracy of the modeling results.
[0006] 2) Low data accuracy: In actual operation, some data collected by the monitoring points of the crude oil gathering and transportation system is inaccurate. This may be due to sensor measurement errors, data recording errors, performance degradation caused by equipment aging, etc. Inaccurate data will have an adverse impact on the modeling results, limiting the model's predictive ability and subsequent optimization effects.
[0007] Furthermore, gathering and transmission pipeline systems are typically large-scale and complex engineering systems, containing a large number of devices, pipes, and connection points. This directly leads to the complexity of the system component models and the difficulty of calculation, resulting in the following problems:
[0008] 1) Complex topology: The gathering and transmission network is usually composed of a large number of pipes, valves, pumping stations, heaters, etc., and its topology is intricate. The modeling process needs to accurately describe the connection relationship, branch structure and flow path of the network in order to analyze and optimize the system.
[0009] 2) Complex operating conditions: Crude oil gathering and transportation systems involve numerous variables and constraints, such as pipeline flow rate, pressure, temperature, equipment operating status, and energy consumption. These variables and constraints interact with each other and must simultaneously meet engineering safety, operational stability, and performance requirements.
[0010] 3) Complex system mechanism: Modeling of crude oil gathering and transportation system involves solving large-scale linear and nonlinear equations, including fluid dynamics equations, energy balance equations, mass conservation equations, etc., which directly leads to a high degree of complexity in the system mechanism. Moreover, solving these equations requires efficient computational methods to ensure the accuracy and computational efficiency of the modeling process.
[0011] In summary, gathering and transportation systems are characterized by difficulties in data collection, high system uncertainty, and large system scale. If existing hydraulic and thermodynamic models and traditional modeling methods are directly applied to actual gathering and transportation systems, the entire gathering and transportation system network model will become more complex, and the errors generated by the model calculations will exceed the allowable error range of the gathering and transportation system. Summary of the Invention
[0012] To address the aforementioned problems, this invention proposes a method and apparatus for optimizing a crude oil gathering and transportation pipeline system model. This invention can effectively simplify the system model, improve the accuracy of model calculations, and reduce the costs of data monitoring and collection.
[0013] In a first aspect, this invention provides a method for optimizing a crude oil gathering and transportation pipeline system model. This method treats multiple oil wells, pipelines, and nodes as a multi-input, single-output node module. The module model can arbitrarily define one or more nodes for a single module based on the actual scale and distribution of the gathering and transportation system. This effectively solves problems such as difficulty in data collection, low quality of collected data, and the complexity of traditional pipeline models in gathering and transportation systems.
[0014] In addition, this method can effectively modify the hydraulic-thermodynamic model of the gathering and transportation system by using a data-driven linear regression method. This method can clearly and intuitively obtain the mathematical relationship between the input and output of a module, providing a research basis for the subsequent optimization of system energy consumption costs.
[0015] According to some embodiments, the first aspect of the present invention adopts the following technical solution:
[0016] A method for optimizing a crude oil gathering and transportation pipeline system model includes the following steps:
[0017] Based on the topology and operational data of the crude oil gathering and transportation pipeline system, the hydraulic and thermal formulas are determined.
[0018] The system is divided into multiple modules by considering several oil wells, pipelines and nodes as a multi-input single-output module. Based on the distribution and structural characteristics of the system's pipeline network, the input, output and node elements contained in each module are selected.
[0019] Based on the modular structure and the determined hydraulic and thermodynamic formulas, and using the physical property relationships between elements as a basis, the hydraulic and thermodynamic models of each module are obtained.
[0020] Training data is constructed, and the model of each module is corrected based on data-driven methods to obtain an optimized crude oil gathering and transportation pipeline system model.
[0021] As an alternative implementation method, the specific process of determining the appropriate hydraulic and thermal formulas based on the topology and operational data of the crude oil gathering and transportation pipeline network includes:
[0022] Mechanism studies were conducted on multiple different crude oil gathering and transportation pipeline systems to obtain historical operating variables and parameter tables for each system. The variables include several of the following: node temperature, node pressure, and pipeline oil flow rate. The parameters include several of the following: pipeline heat transfer coefficient, pipeline resistance coefficient, pipeline length, pipeline inner diameter, and ambient temperature.
[0023] The hydraulic formula is selected from one of the Dukler I, Dukler II, Baker and Beggs-Brill model formulas, and the thermodynamic formula is selected from the general temperature drop formula based on the Joule-Thompson effect or the Sukhov temperature drop formula.
[0024] As an alternative implementation, the module includes a single-node module, a two-node module, and a multi-node module. A single-node module is a module that includes one node, and the node includes several inputs and one output. A two-node module is a module that includes two nodes, and each node includes several inputs and one output.
[0025] As an alternative implementation, the module is determined based on the structure of the system network and the distribution of detection points, and the node module must be followed by a detection point.
[0026] As an alternative implementation method, the specific process of constructing training data and modifying the model of each module based on data-driven methods includes: combining historical industrial production data with simulation data as the training dataset for the module model, and using linear regression to make corrections.
[0027] As a further defined implementation method, the specific process of using linear regression for correction includes:
[0028] The pressure and temperature errors between the actual industrial output and the theoretical model calculation output are used as the target vectors for the hydraulic and thermodynamic models, respectively.
[0029] In the hydraulic model, crude oil volumetric flow rate and initial pressure of the well pipeline are used as two important variables as eigenvectors, while in the thermal model, crude oil mass flow rate and initial temperature of the well pipeline are used as two important variables as eigenvectors.
[0030] Mean squared error is used as the loss function for model training to measure the average of the squared errors between the model's predictions and the actual values.
[0031] The model is trained using the training dataset. The training results are then cross-validated using different methods to confirm whether they meet the training requirements. If they do not meet the requirements, the model is corrected. If they do meet the requirements, the current model is considered to be satisfactory.
[0032] As a further clarification, when training the model using the training dataset, the reciprocal and exponential terms in the original expression of the thermodynamic module model are fixed as parameters through least squares regression. After fixing the parameters, the thermodynamic module model is then corrected.
[0033] A crude oil gathering and transportation pipeline system model optimization device includes:
[0034] The first module is configured to determine the hydraulic and thermal formulas based on the topology and operating data of the crude oil gathering and transportation pipeline network.
[0035] The second module is configured to treat several oil wells, pipelines and nodes in the system as a multi-input single-output module. Based on the distribution and structural characteristics of the system's pipeline network, the input, output and node elements contained in each module are selected, and the entire system is divided into multiple modules.
[0036] The third module is configured to combine the divided module structure and the determined hydraulic and thermodynamic formulas, based on the physical property relationships between elements, to obtain the hydraulic and thermodynamic models of each module.
[0037] The fourth module is configured to build training data and, based on data-driven approaches, revise the models of each module to obtain an optimized crude oil gathering and transportation pipeline system model.
[0038] A computer-readable storage medium for storing computer instructions, which, when executed by a processor, perform the steps in the above method.
[0039] An electronic device includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor, wherein the computer instructions, when executed by the processor, perform the steps in the method described above.
[0040] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0041] This invention proposes a novel modeling approach for gathering and transportation systems by dividing them into modules of varying sizes. This effectively reduces the scale of traditional gathering and transportation system models and lowers the computational complexity. The modeling characteristics of this method result in lower data requirements for some difficult-to-measure system parameters and variables, effectively reducing the workload of gathering and transportation system modeling and minimizing the consumption of human and material resources when monitoring and collecting partial system data. Simultaneously, this method considers the inaccuracies of existing hydraulic and thermal models and performs linear corrections to the modular models, improving the model's versatility and accuracy. This invention effectively overcomes the various shortcomings of existing system modeling methods and has high industrial application value.
[0042] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0043] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0044] Figure 1 This is an example analysis diagram of a portion of the oil well gathering and transportation pipeline network in this embodiment;
[0045] Figure 2 This is a schematic diagram of a single-node module in this embodiment;
[0046] Figure 3 This is a schematic diagram of the two-node module in this embodiment;
[0047] Figure 4 This is a comparison of the pressure output before and after correction;
[0048] Figure 5 This is a comparison of the temperature output before and after correction;
[0049] Figure 6 This is a comparison of the corrected pressure output;
[0050] Figure 7 This is a comparison of the corrected temperature output. Detailed Implementation
[0051] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0052] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0053] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0054] Example 1
[0055] This paper presents a modular modeling method that only considers inputs and outputs. This method simplifies the system model, improves the accuracy of model calculation, and reduces the cost of data monitoring and data collection.
[0056] This embodiment, based on the mechanistic characteristics of crude oil gathering and transportation systems, establishes a modular model that primarily describes the input-output relationships of the modules. Therefore, the requirement for the completeness of some data within the modules is not high. Furthermore, after the modular model is established, it requires data-driven regression correction of the hydraulic and thermal calculation formulas. During this correction process, many difficult-to-measure parameters and variables can be obtained from industrial production experience using least squares. Therefore, this modeling method does not have high requirements for the collection of some system data. With these characteristics, the entire process of establishing the modular model can reduce the consumption of significant human and material resources, while ensuring that this modeling method has high versatility, simplicity, and accuracy for most crude oil gathering and transportation systems.
[0057] The specific details of this embodiment are described below:
[0058] (1) Investigate the topology and mechanism of the gathering and transportation system and collect system operation data. Based on the complexity and error of the existing formulas, select the most suitable hydraulic and thermal formulas.
[0059] (2) Based on the distribution and structural characteristics of the crude oil gathering and transportation system pipeline network, select the input, output and node elements contained in each module, and divide the entire system into several multi-input single-output modules;
[0060] (3) Combining the module structure in step (2) with the hydraulic and thermodynamic formulas selected in step (1), and based on the physical property relationships between elements, we obtain the hydraulic and thermodynamic models (before correction) for each module.
[0061] (4) Combining the operational and simulation data of the example system, the parameters of the hydraulic and thermodynamic module models are fixed and corrected respectively using the least squares and data-driven methods.
[0062] (5) By combining examples, the pressure and temperature output values of the module model before and after the correction are compared with the actual output values of industrial production to obtain the comparison output curves of pressure and temperature.
[0063] Specifically, step (1) includes:
[0064] (1-1) By conducting mechanistic studies and data surveys on multiple different crude oil gathering and transportation systems, some historical operating variables and parameter tables of the systems were obtained. These tables include system variables such as node temperature, node pressure, and pipeline oil flow rate, as well as system parameters such as pipeline heat transfer coefficient, pipeline resistance coefficient, pipeline length, pipeline inner diameter, and ambient temperature.
[0065] (1-2) Selection of hydraulic model
[0066] There are already several existing methods and formulas for calculating pressure drop in gathering and transportation pipelines, including models such as Dukler I, Dukler II, Baker, and Beggs-Brill. The Dukler II method has advantages such as wide applicability, high accuracy, and low data requirements. It is suitable for calculating pressure drop of various two-phase fluids. The main input parameters generally include basic information such as fluid properties, pipeline geometry parameters, and flow rate, which are relatively simple and readily available. It has been widely used in industrial and academic fields.
[0067] In this embodiment, the Dukler II method is selected as the method for calculating the system voltage drop.
[0068] The Dukler II method calculation formula is as follows:
[0069]
[0070]
[0071] In the formula, Δp is the pressure drop in the pipeline; λ is the pipeline resistance coefficient; ρ is the average density of the medium in the pipeline; L is the pipeline length; D is the pipeline inner diameter; v is the average velocity of the medium in the pipeline; and qv is the volumetric flow rate of the medium in the pipeline.
[0072] (1-3) Selection of thermodynamic model
[0073] There are generally two existing methods for calculating the temperature drop of gathering and transportation pipelines: the general temperature drop formula based on the Joule-Thompson effect and the Sukhov temperature drop formula. Among the two existing models, the Sukhov temperature drop formula has the advantages of being simple to use, having a wide range of applications, and being relatively accurate. Compared with the general temperature drop formula, it is easier to obtain the required parameters, has a lower overall computational complexity, and is less difficult to modify. Therefore, this embodiment selects the Sukhov temperature drop formula as the calculation formula for the system temperature drop.
[0074] Of course, if the collection and transportation system is relatively simple and the available parameters are relatively complete, a general temperature drop formula based on the Joule-Thompson effect can be chosen.
[0075] The Sukhov model formula is as follows:
[0076] t out =T0+(t in -T0)e -aL (3)
[0077]
[0078] In the formula, t out T is the temperature at the pipe outlet; T0 is the ambient temperature; t in qm is the temperature at the pipe inlet; K is the overall heat transfer coefficient of the pipe; qm is the mass flow rate of the medium in the pipe; C is the specific heat capacity of crude oil.
[0079] Step (2) includes the following steps:
[0080] (2-1) with Figure 1 , Figure 2 , Figure 3 As shown, in this embodiment, single nodes are selected respectively ( Figure 2 ), two nodes ( Figure 3 And multi-node (modules are the basic modules of the system, and the output of each module is one of the inputs of the first node of the next module. Then, modeling and analysis are performed on these modules of different sizes.
[0081] It should be noted that during modeling, the module establishment is determined based on the location of the detection points (i.e., the nodes where data can be acquired). Figure 1 As shown in the figure, taking J002 as the detection point as an example, J002 and P6-P68, P6-P69 can form a single-node module. However, if J002 is not a detection point and J003 is a detection point, J002, J003 and the connected oil wells and pipelines form a double-node module, and so on.
[0082] Step (3) specifically includes:
[0083] (3-1) According to Figure 2 As shown in the single-node module, with L01, L02, and L03 as module inputs and L04 as module output, and combining the hydraulic and thermodynamic models and system operating mechanisms selected in step (1) respectively, the following mathematical relationships are obtained:
[0084] Pressure drop calculation relationship:
[0085]
[0086]
[0087]
[0088] Combining equations (5), (6), and (7), the mathematical relationship between the pressure input and output of this module is obtained as shown in equations (8) and (9):
[0089]
[0090] in:
[0091]
[0092] In the formula, i is the node number within the module; I n Let J be the number of nodes in module n; j is the input or output pipe number connected to the node; J i J represents the number of input pipes connected to node i. Since each node can be connected to at most one output pipe, j = J1 + 1 represents the node's output pipe number. and These are the inlet and outlet pressures of pipe j connected to node i, respectively. This represents the initial pressure of the output pipeline for a single-node module.
[0093] Temperature drop calculation relationship:
[0094]
[0095]
[0096]
[0097] Combining equations (10), (11), and (12), the mathematical relationship between the temperature input and output of this module is obtained as shown in equations (13) and (14):
[0098]
[0099] in:
[0100]
[0101] In the formula, and These are the temperatures at the inlet and outlet of pipe j in module i, respectively. The initial temperature of the output pipe of the two-input single-output module.
[0102] (3-2) According to Figure 3 As shown in the two-node module diagram, with L01, L02, ..., L05 as module inputs and L07 as module output, and combining the hydraulic and thermodynamic models and system operating mechanisms selected in (3-1) respectively, the following mathematical relationships are obtained:
[0103] Pressure drop calculation relationship:
[0104]
[0105]
[0106] Combining equations (8), (15), and (16), the mathematical relationship between the pressure input and output of this module is obtained as shown in equation (17):
[0107]
[0108] In the formula, The initial pressure of the output pipeline of the two-node module.
[0109] Temperature drop calculation relationship:
[0110]
[0111]
[0112] Combining equations (13), (18), and (19), the mathematical relationship between the temperature input and output of this module is obtained as shown in equation (20):
[0113]
[0114] In the formula, The initial temperature of the output pipe of the two-node module.
[0115] (3-3) Considering that different gathering and transportation systems have different requirements for module division, simple single-node and dual-node modules may not meet the module size requirements of most gathering and transportation systems. This paper combines the hydraulic and thermal expressions and mathematical laws in steps (3-1) and (3-2) to let:
[0116]
[0117] The hydraulic and thermal calculation models of the multi-node module are obtained, as shown in equations (22) and (23) below:
[0118]
[0119]
[0120] in:
[0121]
[0122] β i,j =g(b i,j (25)
[0123] In the formula, qm sum It is the sum of the crude oil mass flow rates produced by the oil wells within the entire module.
[0124] Step (4) specifically includes:
[0125] (4-1) In the above derivation formula, the overall heat transfer coefficient K of the pipeline is a key parameter used in the field of heat transfer. It represents the amount of heat transferred by the oil pipeline per unit time through a unit area per unit time, and also reflects the heat exchange efficiency between the fluid and the internal and external environments of the pipeline. The pipeline transport resistance coefficient λ is a key parameter describing the resistance encountered by the fluid when flowing in the pipeline. The larger the value of λ, the greater the frictional loss of the fluid when flowing in the pipeline, and the greater the resistance that the fluid needs to overcome when passing through the pipeline. The calculation and measurement of the above two physical quantities are quite difficult. In the actual modeling process, industrial production experience values are usually used for calculation.
[0126] Due to the limited total amount of historical industrial production data and the absence of some data, this embodiment combines historical industrial production data with simulation data as the training dataset for the module model, and employs a linear regression method:
[0127] ① The pressure and temperature error values between the actual industrial output and the theoretical model calculation output are used as the target vectors (y) of the hydraulic and thermodynamic models, respectively;
[0128] ② In the hydraulic model, the two important variables, crude oil volumetric flow rate and initial pressure of the well pipeline, are used as the eigenvectors (x1, x2); in the thermal model, the two important variables, crude oil mass flow rate and initial temperature of the well pipeline, are used as the eigenvectors (x1, x2).
[0129] ③ Use Mean Squared Error (MSE) as the loss function for model training. It measures the average of the squared errors between the model's predicted and actual values, and its form is as follows:
[0130]
[0131] In the formula, m is the number of data samples; k is the sample number; y k This represents the actual target value of sample k. The model prediction value represents the k-th sample;
[0132] ④ Train the model and cross-validate the training results using R-squared and explained variance methods respectively. Use the scores to determine whether the training has achieved the desired results.
[0133] The trained and corrected hydraulic and thermodynamic module models are obtained as follows: (27) and (28):
[0134]
[0135]
[0136] In the formula, For weights; G p G t The last three terms of the two equations are the error correction terms for model training (Δ=ax1+bx2+c), and the remaining terms are the original hydraulic-thermodynamic module model derived in (3-3).
[0137] (4-2) As shown in the model training results of (4-1), the calculation formula of the thermodynamic module model contains linear terms, interaction terms, reciprocal terms, and exponential terms simultaneously, and the model complexity remains high, with no reduction in the computational difficulty of subsequent optimization work. To address these issues, this invention uses least squares regression to fix the reciprocal and exponential terms in the original formula of the thermodynamic module model as parameters. This method not only has a minimal impact on the model calculation results but also eliminates the reciprocal and exponential terms in the thermodynamic module model.
[0138] make:
[0139]
[0140] Given the starting and ending temperatures of the pipeline, U can be determined using the least squares method. i,j Following this approach, taking the i-th module as an example, the following U is established. i,j Regression model:
[0141] Find U i,j (30)
[0142]
[0143] Combining equations (23) and (29), we get:
[0144]
[0145] In the formula, U i,j The parameter is fixed by the variable; f(U) i,j ) is a fixed U i,j The sum of squared fitting errors calculated at that time; The actual output temperature of the s-th data group corresponding to the module; The calculated output temperature is the temperature of the s-th data set corresponding to the module; S is the total number of samples in the industrial production dataset.
[0146] (4-3) After fixing the parameters in (4-2), the model is trained again using the same steps as in (4-1) to obtain the corrected thermodynamic module model as shown in equation (33):
[0147]
[0148]
[0149] Combining like terms in equations (27) and (33), we get:
[0150]
[0151]
[0152] After simplification, the final hydraulic and thermal module models are shown in the following equations:
[0153]
[0154]
[0155] in:
[0156]
[0157]
[0158]
[0159]
[0160] G T =G t +T0
[0161] Step (5) specifically includes:
[0162] (5-1) Based on the example and the structure and characteristics of the module model in (3-3), using a two-input single-output module as a reference, and combining industrial production data and simulation data, the pressure and temperature output results of the module model before and after correction are obtained. The theoretically calculated output values of pressure and temperature of the module model before correction are compared with the actual output values of industrial production. The comparison results are shown in the figure below. Figure 4 , Figure 5 As shown.
[0163] It can be seen that the output results of the model before the correction, whether for pressure or temperature, have large errors compared with the actual values of industrial production output, and exceed the permissible range of industrial error.
[0164] (5-2) Based on the revised module model and data (4-2), compare the theoretically calculated output values of pressure and temperature of the revised module model with the actual output values of industrial production. The comparison results are shown in the figure below. Figure 6 , Figure 7 As shown.
[0165] Simulation of a model for a data collection and transportation system implementation:
[0166] (1-1) Obtain the relevant parameter table and variable range table of the gathering and transportation system from the oil transportation company. The gathering and transportation system parameters used in this example are shown in Table 1, and the variable range is shown in Table 2. The data in Table 1 represent the empirical values of variables that are difficult to measure or calculate in the system; the data in Table 2 represent the variable value range obtained by combining the actual operating state of the system with factors such as energy consumption cost, equipment limitations, and operational safety.
[0167] Table 1. Relevant parameters of the gathering and transportation system
[0168]
[0169]
[0170] Table 2. Variables related to the gathering and transportation system
[0171]
[0172] (1-2) Based on the number of modules, select single-node, two-node, and multi-node modules as the analysis objects, as shown in the example diagram. Figure 1 , Figure 2 , Figure 3 .
[0173] (1-3) Determine the model parameters and variable ranges, establish modular models, calculate the pressure and temperature outputs of models of different scales, and obtain a comparison chart of the theoretically calculated output values of the model before model correction and the actual output values of industrial production, such as the pressure comparison chart. Figure 4 Temperature for example Figure 5 At this point, the average error in the pressure calculation of the module model was 25.901 bar, and the average error in the temperature calculation was 3.604℃. This error exceeds the maximum allowable error (5%) for the gathering and transportation system.
[0174] (1-4) Without considering flow loss during oil transportation in the gathering and transportation system and heat loss during crude oil pipeline merging, the module model is corrected by linear regression based on the collected dataset, and the error of the corrected model is verified. The cross-validation score of the corrected model is 0.94, and the cross-validation score of the temperature model is 0.99. A comparison of the theoretical calculated output value of the corrected pressure model with the actual output value from industrial production is shown in the figure below. Figure 6 The comparison chart between the theoretical output value of the temperature model and the actual output value in industrial production is shown below. Figure 7 At this point, the average error in the pressure calculation of the module model was 0.047 bar, and the average error in the temperature calculation was 2.189℃.
[0175] Compared with traditional process modeling methods, the method of this invention... Figure 1 , Figure 2 , Figure 3This demonstrates that the modeling requirements for operational data and the overall size of the model can be reliably reduced. Figure 4 , Figure 6 and Figure 5 , Figure 7 The comparison shows that the error of the completed module model meets the error requirements of the gathering and transportation system, and a more reasonable calculation model of the crude oil gathering and transportation system is obtained.
[0176] In summary, the method of this embodiment treats multiple oil wells, pipelines, and nodes as a module (with at least two inputs). First, it uses existing hydraulic (Dukler II method) and thermodynamic (Sukhov temperature drop formula) formulas based on system mechanisms to intuitively express the mathematical relationship of the module's multiple inputs and single output. Then, it replaces some parameters and variables within the module with empirical values from industrial production. Finally, based on data-driven approaches, it corrects the mathematical relationship between the inputs and outputs of each module through linear or nonlinear regression, establishing a small-scale, computationally simple crude oil gathering and transportation system module model. This model accurately expresses the input-output relationship of the entire system while also reducing future data collection costs to some extent, laying an important model foundation for subsequent optimization work.
[0177] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0178] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will 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 program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0179] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0180] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0181] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made by those skilled in the art without creative effort within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for optimizing a crude oil gathering and transportation pipeline system model, characterized in that, Includes the following steps: Based on the topology and operational data of the crude oil gathering and transportation pipeline system, the hydraulic and thermal formulas are determined. The system is divided into multiple modules by considering several oil wells, pipelines and nodes as a multi-input single-output module. Based on the distribution and structural characteristics of the system's pipeline network, the input, output and node elements contained in each module are selected. Based on the modular structure and the determined hydraulic and thermodynamic formulas, and using the physical property relationships between elements as a basis, the hydraulic and thermodynamic models of each module are obtained. Training data is constructed, and the model of each module is corrected based on data-driven methods to obtain an optimized crude oil gathering and transportation pipeline system model. The specific process of constructing training data and refining the model of each module based on data-driven methods includes: combining historical industrial production data with simulation data as the training dataset for the module model, and using linear regression to refine it.
2. The crude oil gathering and transportation pipeline system model optimization method as described in claim 1, characterized in that, The specific process of determining the appropriate hydraulic and thermal formulas based on the topology and operational data of the crude oil gathering and transportation pipeline network includes: Mechanism studies were conducted on multiple different crude oil gathering and transportation pipeline systems to obtain historical operating variables and parameter tables for each system. The variables include several of the following: node temperature, node pressure, and pipeline oil flow rate. The parameters include several of the following: pipeline heat transfer coefficient, pipeline resistance coefficient, pipeline length, pipeline inner diameter, and ambient temperature. The hydraulic formula selection , , and One of the model formulas is the thermodynamic formula, which is either the general temperature drop formula based on the Joule-Thompson effect or the Sukhov temperature drop formula.
3. The method for optimizing a crude oil gathering and transportation pipeline system model as described in claim 1, characterized in that, The module includes a single-node module, a two-node module, and a multi-node module. A single-node module contains one node, which includes several inputs and one output. A two-node module contains two nodes, each of which includes several inputs and one output.
4. The crude oil gathering and transportation pipeline system model optimization method as described in claim 3, characterized in that, The module is determined based on the structure of the system network and the distribution of detection points; every node in a node module must be a detection point.
5. The method for optimizing a crude oil gathering and transportation pipeline system model as described in claim 1, characterized in that, When training the model using the training dataset, the reciprocal and exponential terms in the original expression of the thermodynamic module model are fixed as parameters by least squares regression. After fixing the parameters, the thermodynamic module model is then corrected.
6. The method for optimizing a crude oil gathering and transportation pipeline system model as described in claim 1, characterized in that, The specific process of correcting using linear regression includes: The pressure and temperature errors between the actual industrial output and the theoretical model calculation output are used as the target vectors for the hydraulic and thermodynamic models, respectively. In the hydraulic model, crude oil volumetric flow rate and initial pressure of the well pipeline are used as two important variables as eigenvectors, while in the thermal model, crude oil mass flow rate and initial temperature of the well pipeline are used as two important variables as eigenvectors. Mean squared error is used as the loss function for model training to measure the average of the squared errors between the model's predictions and the actual values. The model is trained using the training dataset. The training results are then cross-validated using different methods to confirm whether they meet the training requirements. If they do not meet the requirements, the model is corrected. If they do meet the requirements, the current model is considered to be satisfactory.
7. A crude oil gathering and transportation pipeline system model optimization device, employing the method described in claim 1, characterized in that... include: The first module is configured to determine the hydraulic and thermal formulas based on the topology and operating data of the crude oil gathering and transportation pipeline network. The second module is configured to treat several oil wells, pipelines and nodes in the system as a multi-input single-output module. Based on the distribution and structural characteristics of the system's pipeline network, the input, output and node elements contained in each module are selected, and the entire system is divided into multiple modules. The third module is configured to combine the divided module structure and the determined hydraulic and thermodynamic formulas, based on the physical property relationships between elements, to obtain the hydraulic and thermodynamic models of each module. The fourth module is configured to build training data and, based on data-driven methods, revise the models of each module to obtain an optimized crude oil gathering and transportation pipeline system model.
8. A computer-readable storage medium, characterized in that, Used to store computer instructions, which, when executed by a processor, complete the steps of the method according to any one of claims 1-6.
9. An electronic device, characterized in that, It includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor, which, when executed by the processor, perform the steps of the method according to any one of claims 1-6.