A method, device, equipment and medium for simulating initial setting of oil pipeline
By constructing a physical model of initial condensation of oil pipelines with crude oil rheology and temperature field change characteristics, combining real-time data and physical information neural network, the problem of difficulty in accurately predicting initial condensation risks in traditional methods is solved, and the transportation safety of oil pipelines is improved and efficiency reduce the probability of accidents.
Patent Information
- Application Number
- CN202410437155.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-11
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-04-11
AI Technical Summary
The traditional initial condensation simulation method of crude oil pipelines is difficult to accurately capture the liquidity changes of crude oil under different temperatures and pressures and predict the initial condensation risks in real time, resulting in low safety and efficiency of oil pipeline transportation, and the inability to detect and solve the initial condensation problem in a timely manner, increasing Probability of an accident.
Build an initial condensation simulation physical model of oil pipelines including crude oil rheology characteristics, basic water-thermal characteristics and temperature field change characteristics of pipeline shutdown and re-start process. Combining real-time data and physical information neural network, the total loss function is calculated and trained to achieve High-precision simulation of actual oil pipeline data.
It improves the safety and efficiency of oil pipeline transportation, can promptly discover and solve initial condensation problems, reduce the probability of accidents, ensure the physical rationality and accuracy of simulation results, and adapt to changes in different crude oil properties and pipeline structures.
Smart Images

Figure CN118211487B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of deep learning technology, and in particular to a method, device, equipment and medium for simulating initial setting of an oil pipeline. Background Art
[0002] In the global energy supply chain, oil pipeline transportation plays a vital role. However, crude oil transportation in pipelines, especially in long distances and complex environments, faces severe challenges of initial coagulation. Initial coagulation means that crude oil gradually loses its fluidity in the pipeline due to the decrease in temperature, forming a solid or semi-solid state. This will not only block the pipeline and affect the normal transportation of crude oil, but also may cause safety accidents and cause huge economic losses. Traditional crude oil pipeline initial coagulation simulation methods mainly rely on physical models and numerical calculations, such as finite element methods and computational fluid dynamics. Although these methods can simulate the flow and initial coagulation process of crude oil in pipelines to a certain extent, due to the complexity of crude oil properties, the diversity of pipeline operating conditions and the dynamic changes of environmental factors, the accuracy and real-time performance of their simulation results are often difficult to meet actual needs. For example, traditional methods may not be able to accurately capture the fluidity changes of crude oil at different temperatures and pressures, or cannot predict the initial coagulation risk of crude oil in pipelines in real time, thereby reducing the transportation safety of oil pipelines, and may not be able to timely discover and solve the initial coagulation problem in crude oil pipeline transportation, reducing crude oil transportation efficiency.
[0003] As can be seen from the above, how to improve the transportation safety and efficiency of oil pipelines, adapt to the changes in different crude oil properties, pipeline structures and operating environments, promptly discover and solve the initial setting problem in crude oil pipeline transportation, and reduce the probability of initial setting accidents are problems to be solved in this field. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a method, device, equipment and medium for simulating the initial setting of an oil pipeline, which can improve the transportation safety and efficiency of the oil pipeline, adapt to the changes in different crude oil properties, pipeline structures and operating environments, timely discover and solve the initial setting problem in crude oil pipeline transportation, and reduce the probability of initial setting accidents. The specific scheme is as follows:
[0005] In a first aspect, the present application discloses a method for simulating initial setting of an oil pipeline, comprising:
[0006] Construct a physical model for initial solidification simulation of oil pipelines, including crude oil rheological properties, basic water-thermal properties, and temperature field change characteristics during pipeline shutdown and restart;
[0007] Acquire real-time data, pre-process the real-time data, and simulate the oil pipeline using preset simulation software to obtain operation status data of the oil pipeline under different working conditions, and compare and analyze the pre-processed real-time data and the operation status data to obtain initial setting data of the oil pipeline;
[0008] The initial setting data of the oil pipeline are coupled with the initial setting simulation physical model of the oil pipeline to calculate a total loss function corresponding to the initial setting data of the oil pipeline and the initial setting simulation physical model of the oil pipeline;
[0009] Determine whether the total loss function is less than a preset threshold value. If the total loss function is less than the preset threshold value, train the initial setting simulation physical model of the oil pipeline using a preset physical information neural network and the total loss function to obtain the initial setting simulation physical model of the oil pipeline based on the physical information neural network;
[0010] The actual oil pipeline data is simulated using the oil pipeline initial setting simulation physical model based on the physical information neural network to obtain simulation results.
[0011] Optionally, the construction of a physical model for initial setting simulation of an oil pipeline including rheological properties of crude oil, basic water-thermal properties, and temperature field change characteristics during the pipeline shutdown and restart process includes:
[0012] A mixed crude oil circular pipe flow model is introduced to describe the flow of crude oil, a Bingham model is introduced to characterize the rheological properties of the crude oil, and a physical model of an oil pipeline is constructed based on the mixed crude oil circular pipe flow model and the Bingham model;
[0013] Based on the physical model of the oil pipeline and in combination with the actual operation characteristics of the oil pipeline, an initial setting physical model of the oil pipeline is constructed;
[0014] The first temperature distribution of the soil at different depths and directions and the second temperature distribution of the oil pipeline and the crude oil at different positions and times are calculated, and based on the first temperature distribution, the second temperature distribution and the initial setting physical model of the oil pipeline, an initial setting simulation physical model of the oil pipeline is constructed, including the rheological properties of crude oil, basic water-thermal properties and temperature field change characteristics during the pipeline shutdown and restart process.
[0015] Optionally, the physical model of the initial setting of the oil pipeline is constructed based on the physical model of the oil pipeline and in combination with the actual operation characteristics of the oil pipeline, including:
[0016] Based on the thermodynamic model, the fluid dynamics model and the physical model of the oil pipeline and combined with the actual operating characteristics of the oil pipeline, an initial setting physical model of the oil pipeline is constructed; wherein the thermodynamic model and the fluid dynamics model include a continuity equation, a momentum equation and an energy equation.
[0017] Optionally, the calculating of the first temperature distribution of the soil at different depths and directions and the second temperature distribution of the oil pipeline and the crude oil at different positions and times includes:
[0018] Calculate the first temperature distribution of the soil at different depths and directions using a preset soil heat conduction model;
[0019] A heat exchange model between the oil pipeline and the soil is established, and the heat exchange model is used to calculate the second temperature distribution of the oil pipeline and the crude oil at different positions and times using a numerical solution method.
[0020] Optionally, the acquiring of real-time data and preprocessing of the real-time data include:
[0021] Use sensors on the oil pipeline to collect data in real time to obtain real-time data;
[0022] The real-time data is subjected to denoising, filtering and normalization processing to obtain the pre-processed real-time data.
[0023] Optionally, the calculating of the total loss function corresponding to the initial setting data of the oil pipeline and the initial setting simulation physical model of the oil pipeline includes:
[0024] Calculating a data loss function corresponding to the initial setting data of the oil pipeline;
[0025] Calculating a physical loss function corresponding to the physical model of the initial setting simulation of the oil pipeline;
[0026] The data loss function and the physical loss function are added together to obtain the total loss function.
[0027] Optionally, after determining whether the total loss function is less than a preset threshold, the method further includes:
[0028] If the total loss function is not less than a preset threshold, adjusting the parameters in the fully connected neural network based on the optimization algorithm of the adaptive learning rate and the back propagation algorithm so as to calculate a new overall loss function using the automatic differentiation algorithm and the adjusted parameters;
[0029] It is determined whether the new overall loss function is less than the preset threshold value. If the new overall loss function is less than the preset threshold value, the preset physical information neural network and the new overall loss function are used to train the physical model of the initial setting simulation of the oil pipeline.
[0030] In a second aspect, the present application discloses an initial setting simulation device for an oil pipeline, comprising:
[0031] Model building module, used to build a physical model for initial setting simulation of oil pipelines, including crude oil rheological properties, basic water-thermal properties, and temperature field change characteristics during pipeline shutdown and restart;
[0032] A data comparison and analysis module is used to obtain real-time data, pre-process the real-time data, and simulate the oil pipeline using preset simulation software to obtain the operating status data of the oil pipeline under different working conditions, and compare and analyze the pre-processed real-time data with the operating status data to obtain the initial setting data of the oil pipeline;
[0033] A loss function calculation module, used for coupling the initial setting data of the oil pipeline with the initial setting simulation physical model of the oil pipeline to calculate a total loss function corresponding to the initial setting data of the oil pipeline and the initial setting simulation physical model of the oil pipeline;
[0034] A training module, used to determine whether the total loss function is less than a preset threshold value, and if the total loss function is less than the preset threshold value, train the initial setting simulation physical model of the oil pipeline using a preset physical information neural network and the total loss function to obtain the initial setting simulation physical model of the oil pipeline based on the physical information neural network;
[0035] The simulation module is used to simulate the actual oil pipeline data using the oil pipeline initial setting simulation physical model based on the physical information neural network to obtain simulation results.
[0036] In a third aspect, the present application discloses an electronic device, including:
[0037] Memory, used to store computer programs;
[0038] The processor is used to execute the computer program to implement the aforementioned oil pipeline initial setting simulation method.
[0039] In a fourth aspect, the present application discloses a computer storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the aforementioned disclosed method for simulating initial setting of an oil pipeline are implemented.
[0040] It can be seen that the present application provides a method for simulating the initial setting of an oil pipeline, including constructing a physical model for simulating the initial setting of an oil pipeline including the rheological properties of crude oil, basic water-thermal properties, and temperature field change characteristics of the pipeline during shutdown and restart; acquiring real-time data, preprocessing the real-time data, and simulating the oil pipeline using preset simulation software to obtain operating status data of the oil pipeline under different working conditions, and comparing and analyzing the preprocessed real-time data with the operating status data to obtain the initial setting data of the oil pipeline; comparing the initial setting data of the oil pipeline with the initial setting simulation physical model of the oil pipeline; and comparing the initial setting data of the oil pipeline with the initial setting simulation physical model of the oil pipeline. The model is coupled to calculate the total loss function corresponding to the initial setting data of the oil pipeline and the initial setting simulation physical model of the oil pipeline; whether the total loss function is less than a preset threshold is determined, and if the total loss function is less than the preset threshold, the initial setting simulation physical model of the oil pipeline is trained using a preset physical information neural network and the total loss function to obtain the initial setting simulation physical model of the oil pipeline based on the physical information neural network; the actual oil pipeline data is simulated using the initial setting simulation physical model of the oil pipeline based on the physical information neural network to obtain a simulation result. The present application constructs a physical model for simulating the initial setting of an oil pipeline, including the rheological properties of crude oil, basic water-thermal properties, and temperature field change characteristics during the pipeline shutdown and restart process. It comprehensively considers the influence of multiple factors such as the flow and heat transfer of crude oil as well as external factors such as ambient temperature and wind speed, so it can adapt to changes in different crude oil properties, pipeline structures, and operating environments. The oil pipeline is simulated by simulation software to obtain the operating status data of the oil pipeline under different working conditions and the pre-processed real-time data to generate the initial setting data of the oil pipeline. The initial setting data of the oil pipeline can provide researchers with more dimensional information, which is helpful for a comprehensive understanding of the initial setting characteristics of the crude oil pipeline. The physical information neural network and the initial setting data of the oil pipeline and the transmission The overall loss function calculated by coupling the physical model of the initial setting simulation of the oil pipeline is used to train the physical model of the initial setting simulation of the oil pipeline, so as to realize the subsequent simulation of the actual oil pipeline data. The physical information neural network is applied to the initial setting simulation of the crude oil pipeline, which can not only fully consider the constraints of physical laws and ensure the physical rationality and accuracy of the simulation results, but also can handle crude oil of different types and properties, as well as pipelines with different structures and operating conditions, to realize multi-scale and multi-physical field coupling simulation, thereby improving the transportation safety and efficiency of the oil pipeline. Therefore, the initial setting problem in the transportation of crude oil pipelines can be discovered and solved in time, the probability of initial setting accidents can be reduced, and a strong guarantee for the safe transportation and optimized operation of crude oil pipelines is provided. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0042] Figure 1 This is a flow chart of a simulation method for initial setting of an oil pipeline disclosed in this application;
[0043] Figure 2 A shear rate distribution diagram of a hydraulic smooth zone of a crude oil pipeline flow disclosed in the present application;
[0044] Figure 3 A cross-sectional solution diagram of a heat exchange physical field between a pipeline and soil disclosed in the present application;
[0045] Figure 4 This is a flow chart of a simulation method for initial setting of an oil pipeline disclosed in this application;
[0046] Figure 5 This is an overall flow chart of the simulation calculation of initial setting of an oil pipeline disclosed in this application;
[0047] Figure 6 This is a schematic diagram of calculating the temperature drop after a pipeline is shut down, as disclosed in the present application;
[0048] Figure 7 This is a schematic diagram of the outlet pressure after the pipeline is shut down, as disclosed in the present application;
[0049] Figure 8 This is a schematic diagram of the outbound flow rate after the pipeline is shut down, as disclosed in this application;
[0050] Fig. 9 This is a schematic diagram of the flow rate entering the station after the pipeline is shut down, as disclosed in this application;
[0051] Fig.10 A schematic diagram of temperature calculation for restarting a pipeline after stopping transmission disclosed in the present application;
[0052] Fig.11 This is a structural schematic diagram of an oil pipeline initial setting simulation device disclosed in this application;
[0053] Fig.12 A structural diagram of an electronic device provided for this application. DETAILED DESCRIPTION
[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0055] In the global energy supply chain, oil pipeline transportation plays a vital role. However, crude oil transportation in pipelines, especially in long distances and complex environments, faces severe challenges of initial coagulation. Initial coagulation means that crude oil gradually loses its fluidity in the pipeline due to the decrease in temperature, forming a solid or semi-solid state. This will not only block the pipeline and affect the normal transportation of crude oil, but also may cause safety accidents and cause huge economic losses. Traditional crude oil pipeline initial coagulation simulation methods mainly rely on physical models and numerical calculations, such as finite element methods and computational fluid dynamics. Although these methods can simulate the flow and initial coagulation process of crude oil in pipelines to a certain extent, due to the complexity of crude oil properties, the diversity of pipeline operating conditions and the dynamic changes of environmental factors, the accuracy and real-time performance of their simulation results are often difficult to meet actual needs. For example, traditional methods may not be able to accurately capture the fluidity changes of crude oil at different temperatures and pressures, or cannot predict the initial coagulation risk of crude oil in pipelines in real time, thereby reducing the transportation safety of oil pipelines, and may not be able to timely discover and solve the initial coagulation problem in crude oil pipeline transportation, reducing crude oil transportation efficiency. As can be seen from the above, how to improve the transportation safety and efficiency of oil pipelines, adapt to the changes in different crude oil properties, pipeline structures and operating environments, promptly discover and solve the initial setting problem in crude oil pipeline transportation, and reduce the probability of initial setting accidents are problems to be solved in this field.
[0056] Complex components lead to complex constitutive characteristics of crude oil. The rheological properties of crude oil, including viscosity, yield stress, etc., have a significant impact on the transportation, processing and storage of crude oil. In particular, for easy-to-gel high-viscosity crude oil, it has significant non-Newtonian fluid properties. Under low temperature conditions, mixed crude oils often have yield characteristics and pseudoplasticity. Therefore, initial solidification often occurs during the shutdown and restart process of long-distance crude oil pipeline transportation. The heat exchange between the soil and the pipe flow brings temperature changes and thermal history to the crude oil, which in turn affects the fluidity parameters such as crude oil viscosity, freezing point, and viscosity-temperature curve. Furthermore, the coupling of the rheological properties of easy-to-gel high-viscosity crude oil and the complex temperature field is the direct cause of the initial solidification of crude oil pipelines.
[0057] See also Figure 1 As shown, the embodiment of the present invention discloses a method for simulating initial setting of an oil pipeline, which may specifically include:
[0058] Step S11: constructing a physical model for initial setting simulation of the oil pipeline including rheological properties of crude oil, basic water-thermal properties, and temperature field change characteristics during the pipeline shutdown and restart process.
[0059] The physical model of initial coagulation simulation of the oil pipeline constructed in this application is mainly divided into three steps: first, constructing the physical model of the oil pipeline, secondly, constructing the physical model of initial coagulation simulation of the oil pipeline, and finally constructing the physical model of initial coagulation simulation of the oil pipeline:
[0060] Firstly, a physical model of an oil pipeline is constructed, including: introducing a mixed crude oil circular pipe flow model to describe the flow of crude oil, introducing a Bingham model to characterize the rheological properties of the crude oil, and constructing a physical model of an oil pipeline according to the mixed crude oil circular pipe flow model and the Bingham model.
[0061] This application considers the rheological properties of mixed crude oil, introduces a mixed crude oil circular pipe flow model to describe the flow of crude oil, introduces a Bingham model to characterize the rheological properties of crude oil, and constructs a physical model of the oil pipeline, including:
[0062] The calculation formula of the average shear rate of mixed crude oil is:
[0063] Model describing the shear cylinder flow distribution:
[0064] The corresponding relationship between shear rate and flow velocity:
[0065] Among them, τ rz is the average shear rate of crude oil flowing in the pipe, in mPa·s, τ w is the wall shear rate, in mPa·s, τ0 is the yield stress, in mPa·s, w is the flow rate, in m 3 / s, r is the flow radius, unit is m, R is the pipe radius, unit is m, is the shear rate, unit is s -1 , K is the consistency coefficient, unit is mPa·s, and n is the flow behavior index, dimensionless.
[0066] The average shear rate is a key parameter in the calculation of pipe flow friction considering non-Newtonian characteristics. In the circular pipe flow model of mixed crude oil, the shear rate distribution at the oil flow interface can be abstracted as a truncated parabolic curve. The shear rate distribution in the hydraulic smooth zone of crude oil pipe flow is as follows: Figure 2 As shown, the combination of the above three formulas can provide the necessary parameter τ for the subsequent pipeline flow friction calculation w .
[0067] Secondly, constructing an initial solidification physical model of the oil pipeline includes: constructing an initial solidification physical model of the oil pipeline based on the physical model of the oil pipeline and in combination with the actual operation characteristics of the oil pipeline. Specifically, constructing an initial solidification physical model of the oil pipeline based on the thermodynamic model, the fluid mechanics model and the physical model of the oil pipeline and in combination with the actual operation characteristics of the oil pipeline; wherein the thermodynamics model and the fluid mechanics model include continuity equations, momentum equations and energy equations.
[0068] In the initial setting simulation of oil pipelines, basic water and thermal models are indispensable components. Thermodynamic models and fluid dynamics models, including continuity equations, momentum equations, and energy equations, provide the necessary theoretical basis and mathematical framework for the simulation process: (1) The continuity equation describes the principle of mass conservation when the fluid flows in the pipeline. It ensures the continuity and consistency of the mass of the fluid during the flow process and is the key to analyzing flow changes and flow distribution in the pipeline; (2) The momentum equation reveals the mechanical properties of the fluid when it flows in the pipeline. It considers the relationship between the force exerted on the fluid and its velocity change, including influencing factors such as pressure gradient and friction. Through the momentum equation, we can gain an in-depth understanding of important parameters such as the flow state, velocity distribution, and pressure loss of the fluid in the pipeline; (3) The energy equation focuses on the conservation and conversion of energy during the flow of the fluid. It comprehensively considers factors such as the internal energy, kinetic energy of the fluid, and heat exchange with the surrounding environment. The energy equation can provide support for the analysis of temperature distribution, heat loss, and heat exchange during the transportation process of the fluid, and provides an important basis for predicting and controlling the initial setting process of the oil pipeline. Based on the basic principles of thermodynamics, fluid mechanics, etc., combined with the actual operating characteristics of the oil pipeline, a mechanism model describing the initial setting phenomenon (i.e., the initial setting physical model of the oil pipeline) is established. The model should be able to reflect the influence of factors such as temperature, pressure, and flow rate on the initial setting process.
[0069] Assuming that the flow is three-dimensional and slightly compressible in a pressurized pipe with linear elastic walls, the partial differential form of the transient flow governing equations can be written as continuity, momentum, and energy equations, with the variables being the flow rate w(x, t) and the pressure (i.e., head) p(x, t), both as functions of distance x and time t:
[0070]
[0071]
[0072]
[0073] Where ρ is the density of the fluid in the tube, in kg / m 3, p is pressure, unit Pa, T is temperature, unit ℃, x is the mileage along the flow direction of the pipeline, unit m, t is the physical field evolution time, unit s, g is the gravitational acceleration, take 9.8, unit m / s 2 , D is the inner diameter of the tube, unit is m, a is the speed of sound, unit is m 2 , C p is the specific heat of crude oil at constant pressure, in J / (kg·℃), q w is the heat flux, in J / m 3 ·s, φ is the friction heat, unit is W / m 3 , is the average flow velocity of crude oil in the pipeline cross section, m / s.
[0074] Finally, the first temperature distribution and the second temperature distribution are calculated to construct a physical model for the initial setting simulation of the oil pipeline, including: calculating the first temperature distribution of the soil at different depths and directions and the second temperature distribution of the oil pipeline and the crude oil at different positions and times, and constructing the physical model for the initial setting simulation of the oil pipeline including the rheological properties of crude oil, basic water-thermal properties, and temperature field change characteristics of the pipeline during the shutdown and restart process based on the first temperature distribution, the second temperature distribution, and the physical model for the initial setting of the oil pipeline. Specifically, the first temperature distribution of the soil at different depths and directions is calculated using a preset soil heat conduction model; a heat exchange model between the oil pipeline and the soil is established, and the second temperature distribution of the oil pipeline and the crude oil at different positions and times is calculated using the heat exchange model and a numerical solution method, and the physical model for the initial setting simulation of the oil pipeline including the rheological properties of crude oil, basic water-thermal properties, and temperature field change characteristics of the pipeline during the shutdown and restart process is constructed based on the first temperature distribution, the second temperature distribution, and the physical model for the initial setting of the oil pipeline.
[0075] The initial coagulation of crude oil often occurs during the process of restarting the crude oil pipeline after stopping. The main purpose of the initial coagulation simulation is to determine the maximum time that the pipeline can be safely stopped before the initial coagulation of crude oil occurs. The determination of this time is of great significance for optimizing pipeline operation strategies, reducing unnecessary shutdown and startup operations, and preventing potential safety risks. In order to accurately determine this maximum time, the heat exchange process between the pipeline and the surrounding soil must be accurately calculated and analyzed. This is because the soil is the direct heat exchange medium of the pipeline, and its temperature distribution and changes will directly affect the temperature state of the crude oil in the pipeline. The temperature state of crude oil is a key factor in determining its flow properties and whether it enters the unstable working area. In order to more accurately simulate and analyze the heat exchange process between crude oil, pipelines and soil, the present invention divides this complex calculation task into two core links. The first link is to calculate the temperature field distribution of the soil under a single section (i.e., the first temperature distribution). This step establishes a heat conduction model of the soil and uses numerical calculation methods to solve the temperature distribution of the soil at different depths and directions, providing basic data for subsequent heat exchange calculations. The calculation formula is as follows. The physical fields solved by the following three formulas are schematically drawn. The section solution of the heat exchange physical field between the pipeline and the soil is as follows: Figure 3 As shown:
[0076]
[0077]
[0078]
[0079] Among them, λ earth is the soil thermal conductivity, unit W / (m·℃), K1 is the total heat transfer coefficient of the pipeline, unit W / (m 2 ℃),h surface is the convective heat transfer coefficient between soil and air, in W / (m 2 ·℃), T is soil temperature, unit is ℃, T air is the air temperature, in °C, T oil is the pipe flow crude oil temperature, unit is ℃.
[0080] The process of stopping and restarting the pipeline is a non-steady-state process. The second step is to calculate the temperature field distribution of the soil and crude oil in the pipeline along the axial direction of the pipeline as a function of time t (i.e., the second temperature distribution). This step will take into account factors such as the length, diameter, thermal conductivity of the material, flow rate and physical properties of the pipeline. By establishing a heat exchange model between the pipeline and the soil and using a numerical solution method, the temperature distribution of the pipeline and crude oil at different positions and times is obtained. In the present invention, based on the differential concept, the pipe section is divided into finite sections. The heat transfer equation for the i-th pipe section is as follows:
[0081]
[0082] Through the calculation methods of these two core links, the temperature field changes of crude oil during the pipeline shutdown and restart process can be simulated and analyzed more comprehensively and accurately, providing more reliable technical support and theoretical basis for the safe operation of the pipeline. At the same time, this method can also provide useful reference and reference for the heat exchange calculation and simulation research of other similar fluid pipelines.
[0083] Step S12: acquiring real-time data, preprocessing the real-time data, and simulating the oil pipeline using preset simulation software to obtain the operating status data of the oil pipeline under different working conditions, and comparing and analyzing the preprocessed real-time data and the operating status data to obtain the initial setting data of the oil pipeline.
[0084] Step S13: coupling the initial setting data of the oil pipeline with the initial setting simulation physical model of the oil pipeline to calculate a total loss function corresponding to the initial setting data of the oil pipeline and the initial setting simulation physical model of the oil pipeline.
[0085] Step S14: Determine whether the total loss function is less than a preset threshold value. If the total loss function is less than the preset threshold value, use the preset physical information neural network and the total loss function to train the initial setting simulation physical model of the oil pipeline to obtain the initial setting simulation physical model of the oil pipeline based on the physical information neural network.
[0086] Step S15: simulating actual oil pipeline data using the oil pipeline initial setting simulation physical model based on the physical information neural network to obtain simulation results.
[0087] This application combines PINN (Physics-Informed Neural Networks) with the powerful expressive power of deep learning and the constraints of physical models to obtain a physical model for initial coagulation simulation of oil pipelines based on physical information neural networks, which can more accurately describe and predict complex processes such as the flow and heat transfer of crude oil in pipelines. Specifically, PINN can use neural networks to learn information such as the physical properties of crude oil, the geometric structure of pipelines, and operating conditions, and predict the flow state and initial coagulation risk of crude oil in pipelines based on this information. Compared with traditional deep learning models, PINN has significant advantages in the simulation of initial coagulation of crude oil pipelines. First, PINN can fully consider the constraints of physical laws to ensure the physical rationality and accuracy of simulation results. Secondly, PINN has a strong generalization ability and can handle crude oil of different types and properties and pipelines of different structures and operating conditions. In addition, PINN can also realize multi-scale and multi-physical field coupling simulation, comprehensively considering the flow, heat transfer and other factors of crude oil as well as the influence of external factors such as ambient temperature and wind speed. Therefore, applying PINN to the initial coagulation simulation of crude oil pipelines can improve simulation performance and provide strong support for the safe transportation of crude oil pipelines. By developing a PINN model suitable for crude oil pipeline initial coagulation simulation and combining it with actual crude oil pipeline data and operating conditions for training and verification, accurate prediction and simulation of the initial coagulation phenomenon in crude oil pipelines can be achieved. This will help to timely discover and solve the initial coagulation problem in crude oil pipeline transportation, optimize operation strategies, improve economic benefits, and make positive contributions to ensuring energy security and promoting economic development.
[0088] In this embodiment, a physical model of initial coagulation simulation of an oil pipeline is constructed, which includes rheological properties of crude oil, basic water-thermal properties, and temperature field change characteristics during the pipeline shutdown and restart process; real-time data is acquired, the real-time data is preprocessed, and the oil pipeline is simulated using preset simulation software to obtain operating status data of the oil pipeline under different working conditions, and the preprocessed real-time data and the operating status data are compared and analyzed to obtain initial coagulation data of the oil pipeline; the initial coagulation data of the oil pipeline are coupled with the physical model of initial coagulation simulation of the oil pipeline to calculate the total loss function corresponding to the initial coagulation data of the oil pipeline and the physical model of initial coagulation simulation of the oil pipeline; it is determined whether the total loss function is less than a preset threshold value, and if the total loss function is less than the preset threshold value, the physical model of initial coagulation simulation of the oil pipeline is trained using a preset physical information neural network and the total loss function to obtain the physical model of initial coagulation simulation of the oil pipeline based on the physical information neural network; the actual oil pipeline data is simulated using the physical model of initial coagulation simulation of the oil pipeline based on the physical information neural network to obtain simulation results. The present application constructs a physical model for simulating the initial setting of an oil pipeline, including the rheological properties of crude oil, basic water-thermal properties, and temperature field change characteristics during the pipeline shutdown and restart process. It comprehensively considers the influence of multiple factors such as the flow and heat transfer of crude oil as well as external factors such as ambient temperature and wind speed, so it can adapt to changes in different crude oil properties, pipeline structures, and operating environments. The oil pipeline is simulated by simulation software to obtain the operating status data of the oil pipeline under different working conditions and the pre-processed real-time data to generate the initial setting data of the oil pipeline. The initial setting data of the oil pipeline can provide researchers with more dimensional information, which is helpful for a comprehensive understanding of the initial setting characteristics of the crude oil pipeline. The physical information neural network and the initial setting data of the oil pipeline and the transmission The overall loss function calculated by coupling the physical model of the initial setting simulation of the oil pipeline is used to train the physical model of the initial setting simulation of the oil pipeline, so as to realize the subsequent simulation of the actual oil pipeline data. The physical information neural network is applied to the initial setting simulation of the crude oil pipeline, which can not only fully consider the constraints of physical laws and ensure the physical rationality and accuracy of the simulation results, but also can handle crude oil of different types and properties, as well as pipelines with different structures and operating conditions, to realize multi-scale and multi-physical field coupling simulation, thereby improving the transportation safety and efficiency of the oil pipeline. Therefore, the initial setting problem in the transportation of crude oil pipelines can be discovered and solved in time, the probability of initial setting accidents can be reduced, and a strong guarantee for the safe transportation and optimized operation of crude oil pipelines is provided.
[0089] See also Figure 4 As shown, the embodiment of the present invention discloses a method for simulating the initial setting of an oil pipeline, which may specifically include:
[0090] Step S21: constructing a physical model for initial setting simulation of the oil pipeline including rheological properties of crude oil, basic water-thermal properties, and temperature field change characteristics during the pipeline shutdown and restart process.
[0091] Step S22: Use sensors on the oil pipeline to collect data in real time to obtain real-time data, perform denoising, filtering and normalization on the real-time data to obtain the pre-processed real-time data, and use preset simulation software to simulate the oil pipeline to obtain the operating status data of the oil pipeline under different working conditions, and compare and analyze the pre-processed real-time data and the operating status data to obtain the initial setting data of the oil pipeline.
[0092] In practical applications, factors such as data collection errors and human errors often have a negative impact on the accuracy of physical models. To solve this problem, this application uses data generated by simulation to improve the scalability and practicality of physical models. To achieve this goal, the method for obtaining initial coagulation data of oil pipelines includes the following two steps: (1) First, real-time data collection is performed using sensors installed on the oil pipeline. These sensors can accurately capture changes in key parameters such as temperature, pressure, and flow rate. To ensure the accuracy and consistency of the data, the collected real-time data will undergo a series of preprocessing steps, such as denoising, filtering, and normalization. These processing processes help to eliminate interference factors in the data, further extract valuable information, and obtain preprocessed real-time data; (2) Secondly, with the help of commercial simulation software such as SPS (Stoner PipelineSimulator, oil and gas long-distance pipeline simulation calculation software), PipelineStudio (TGnet and TLnet, oil pipeline simulation and gas pipeline simulation), the shutdown and restart process of the crude oil pipeline can be simulated. Through these software, the pipeline operation status under different working conditions can be simulated, and important data such as temperature, pressure, and flow can be obtained. These simulation data provide researchers with more dimensional information, which helps to more comprehensively understand the initial setting characteristics of crude oil pipelines. Finally, the operating status data of the oil pipeline under different working conditions are compared and analyzed with the pre-processed real-time data to obtain the initial setting data of the oil pipeline, so that the deficiencies in the model can be discovered later, and strong support can be provided for the correction and optimization of the model.
[0093] Step S23: coupling the initial setting data of the oil pipeline with the physical model of the initial setting simulation of the oil pipeline to calculate a data loss function corresponding to the initial setting data of the oil pipeline, calculating a physical loss function corresponding to the physical model of the initial setting simulation of the oil pipeline, and adding the data loss function and the physical loss function to obtain the total loss function.
[0094] This application couples the initial coagulation data of the oil pipeline with the physical model of the initial coagulation simulation of the oil pipeline, which can significantly improve the accuracy of the initial coagulation simulation and make it closer to the actual operating conditions. The overall framework proposed in this scheme is constructed based on a fully connected neural network. From the perspective of mathematical function approximation theory, the neural network can be regarded as a universal nonlinear function approximation tool. At the same time, the modeling process of partial differential equations is essentially to explore nonlinear functions that meet specific constraints, and there is a profound fit between the two. Thanks to the automatic differentiation technology widely used in deep neural networks, the differential form constraints in partial differential equations can be cleverly integrated into the loss function design of the neural network. In this way, a neural network with physical model constraints can be constructed, thereby realizing the core concept of physical information neural network. The neural network trained in the above manner can not only accurately approximate the observed data, but also automatically meet the basic physical properties such as symmetry, invariance, and conservation contained in the partial differential equation. This also applies to the aforementioned control equations with differential terms (including the formulas for establishing the mechanism model describing the initial coagulation phenomenon and the formulas for calculating the first temperature distribution and the second temperature distribution). In view of the core characteristics of the neural network approximator, its training process must establish a clear optimization goal, namely the total loss function L. The training of traditional neural networks mainly relies on pure data, and the optimization goal is to minimize the statistical result of the mean square error between the predicted value and the true value. However, the physical information neural network adopts a more comprehensive loss function design, which consists of two parts: the data-driven part (i.e., the data loss function) L data and the physical driving part (i.e., physical loss function) L physics The optimization logic formula of this dual-drive is as follows, which aims to improve the approximation performance of neural networks more comprehensively.
[0095] L=L data +L physics ;
[0096] Among them, the loss function L of the data-driven part data It mainly measures the difference between the predicted value of the neural network and the actual observed data. During the training process, the neural network will try to minimize this part of the loss to ensure that its prediction results can fit the given data set as accurately as possible. This loss function is usually based on statistical indicators, such as MSE (Mean Squared Error), which is used to quantify the deviation between the predicted value and the actual value. data The expanded expression is as follows:
[0097]
[0098] y is the real data of the pipeline, is the prediction data, N is the total number of samples used for training;
[0099] The loss function L of the physical driving part physics The focus is on ensuring that the prediction results of the neural network meet specific physical laws or constraints. The design of this part of the loss function is usually based on physical equations or principles, such as partial differential equations, conservation laws, etc. By expressing these physical constraints in mathematical form and incorporating them into the loss function, the neural network not only focuses on the accuracy of data fitting during training, but also automatically learns and satisfies these physical laws. This can significantly improve the generalization ability and robustness of the neural network when dealing with complex physical problems. physics The expanded expression is as follows:
[0100]
[0101] Among them, F i Characterize the ith physical law expression (including the above-mentioned formula for establishing the mechanism model describing the initial setting phenomenon, and the formula for calculating the first temperature distribution and the second temperature distribution).
[0102] Step S24: Determine whether the total loss function is less than a preset threshold value. If the total loss function is less than the preset threshold value, use the preset physical information neural network and the total loss function to train the initial setting simulation physical model of the oil pipeline to obtain the initial setting simulation physical model of the oil pipeline based on the physical information neural network.
[0103] In this embodiment, after determining whether the total loss function is less than a preset threshold, it also includes: if the total loss function is not less than the preset threshold, adjusting the parameters in the fully connected neural network based on the optimization algorithm and the back propagation algorithm of the adaptive learning rate, so as to calculate a new overall loss function using the automatic differentiation algorithm and the adjusted parameters; determining whether the new overall loss function is less than the preset threshold, if the new overall loss function is less than the preset threshold, training the initial setting simulation physical model of the oil pipeline using the preset physical information neural network and the new overall loss function, and obtaining the initial setting simulation physical model of the oil pipeline based on the physical information neural network.
[0104] In summary, the loss functions of the data-driven part and the physical-driven part together constitute the optimization target of PINN. By minimizing these two parts of loss at the same time, PINN can more effectively combine the observed data and the physical model for training, so as to obtain prediction results that are consistent with both the data and the physical constraints. In previous calculation methods, the calculation of partial differential operators is usually a computationally intensive and time-consuming link. Especially in the classic ODE (Ordinary Differential Equation, ordinary differential equation) solution method, such as the finite element method, as the complexity of the problem and the increase in accuracy requirements, the calculation time often shows an explosive growth. This is because in order to ensure the calculation accuracy, it is usually necessary to divide more grids, and then perform more partial differential operator calculations. In this application, a new differential operator calculation method-automatic differentiation is adopted. Automatic differentiation shows significant advantages in the process of partial differential calculation of neural networks. The core idea of this method is to decompose a complex mathematical operation process into a series of simple basic operations. Since the differentials of these basic operations can be obtained in advance by looking up the table, automatic differentiation can quickly calculate the differential operator, greatly improving the calculation efficiency.
[0105] Compared with traditional symbolic differentiation and numerical differentiation, automatic differentiation achieves a good balance between accuracy and efficiency. It can avoid the expression expansion problem that may occur in symbolic differentiation, and overcome the loss of accuracy caused by rounding errors in numerical differentiation. Therefore, automatic differentiation has become a very effective tool when dealing with complex physical problems or building high-precision models. In this case, the application of automatic differentiation technology significantly shortens the calculation time of partial differential operators, thereby improving the efficiency of the overall calculation process. This optimization not only helps to speed up the training and simulation speed of the model, but also has a positive impact on the accuracy and reliability of the model. Combined with the back-propagation algorithm of the neural network, Adam (Adaptive Moment Estimation) is applied.
[0106] Step S25: simulating actual oil pipeline data using the oil pipeline initial setting simulation physical model based on the physical information neural network to obtain simulation results.
[0107] The overall calculation process and implementation flow of the present invention of this application are as follows: Figure 5As shown, first, a physical model for initial coagulation simulation of an oil pipeline is constructed, including rheological properties of crude oil, basic water-thermal properties, and temperature field change characteristics during the pipeline shutdown and restart process; then, real-time data (i.e., real data) is acquired, the real-time data is preprocessed, and the oil pipeline is simulated using a preset simulation software to obtain the operating status data (i.e., simulation data) of the oil pipeline under different working conditions, and the preprocessed real-time data and operating status data are compared and analyzed to obtain the initial coagulation data of the oil pipeline; then, the physical loss function and the data loss function are calculated, and the total loss function L is calculated; then, the Whether the total loss function L is less than a preset threshold; if so, the physical information neural network and the total loss function are used to train the physical model of the initial setting simulation of the oil pipeline to obtain the physical model of the initial setting simulation of the oil pipeline based on the physical information neural network, so as to facilitate the subsequent simulation of the actual oil pipeline data; if not, the parameters in the fully connected neural network are adjusted based on the ADAM algorithm and the back propagation algorithm, so as to calculate the new overall loss function corresponding to the physical model using the automatic differentiation algorithm and the adjusted parameters, and then continue to judge whether the new overall loss function is less than the preset threshold. If so, the process ends.
[0108] In order to verify the feasibility and effect of this method, the present invention uses an actual scenario of a domestic pipeline for testing. The oil is sent out from the first station and input into the terminal station through the intermediate pipeline section. The distance between stations is 100km. The oil outlet temperature in the pipeline of the first station is 40℃, the formation temperature is 15℃, the atmospheric temperature is 10℃, and the stable output is 1026m3 / h. The proposed simulation method has a single simulation calculation efficiency of 15.68s, and the calculation deviation from the real data is 2.8%. Based on the above method, the temperature drop calculation after the pipeline is stopped is as follows: Figure 6 As shown in the figure, the outlet pressure after the pipeline stops transporting is as follows: Figure 7 As shown in the figure, the outbound flow after the pipeline is shut down is as follows: Figure 8 As shown in the figure, the inflow flow after the pipeline stops is as follows: Fig. 9 The simulation results of stopping and restarting are shown in Fig.10 shown.
[0109] The present invention can effectively overcome the shortcomings of the prior art in terms of accuracy, real-time performance and multi-factor coupling simulation, and realizes high-precision and high-real-time simulation of the initial coagulation process of crude oil pipelines by deeply integrating multi-source information such as the physical properties of crude oil, the structural parameters of pipelines and the operating environment. By innovatively using the PINN framework and combining the actual crude oil pipeline operation data for model training and optimization, the method not only truly reflects the complex physical processes such as the flow and heat transfer of crude oil, but also ensures that the simulation results can achieve high-precision predictions under the premise of satisfying physical laws. In addition, the method has strong generalization ability and real-time response speed, can adapt to the changes in different crude oil properties, pipeline structures and operating environments, and provides scientific decision-making support for the safe and efficient transportation of crude oil pipelines. In summary, the present invention has achieved remarkable results in improving the simulation performance of crude oil pipeline initial coagulation, not only promoting the application width and extrapolation performance of the simulation method, but also providing a strong guarantee for the safe transportation and optimized operation of crude oil pipelines. At the same time, the method also has a high use value as a proxy model, and is expected to be widely used in related fields.
[0110] The innovations of this application are as follows: (1) Innovatively using the PINN framework, combining complex physical processes such as crude oil flow and heat transfer with deep learning algorithms to construct a simulation model that can truly reflect the initial setting process of crude oil pipelines; (2) By introducing physical constraints, it is ensured that the simulation results can achieve high-precision predictions while satisfying the physical laws, overcoming the limitations of traditional deep learning models in terms of physical rationality; (3) Using actual crude oil pipeline operation data to train and optimize the PINN model, it has strong generalization capabilities and real-time response speed, and can adapt to changes in different crude oil properties, pipeline structures and operating environments. In summary, this application can realize online monitoring and early warning of the initial setting risk of crude oil pipelines, provide pipeline operators with timely and accurate safety risk assessments and optimized operation suggestions, reduce the probability of initial setting accidents, and improve the efficiency and safety of crude oil transportation.
[0111] In this embodiment, a physical model of initial coagulation simulation of an oil pipeline is constructed, which includes rheological properties of crude oil, basic water-thermal properties, and temperature field change characteristics during the pipeline shutdown and restart process; real-time data is acquired, the real-time data is preprocessed, and the oil pipeline is simulated using preset simulation software to obtain operating status data of the oil pipeline under different working conditions, and the preprocessed real-time data and the operating status data are compared and analyzed to obtain initial coagulation data of the oil pipeline; the initial coagulation data of the oil pipeline are coupled with the physical model of initial coagulation simulation of the oil pipeline to calculate the total loss function corresponding to the initial coagulation data of the oil pipeline and the physical model of initial coagulation simulation of the oil pipeline; it is determined whether the total loss function is less than a preset threshold value, and if the total loss function is less than the preset threshold value, the physical model of initial coagulation simulation of the oil pipeline is trained using a preset physical information neural network and the total loss function to obtain the physical model of initial coagulation simulation of the oil pipeline based on the physical information neural network; the actual oil pipeline data is simulated using the physical model of initial coagulation simulation of the oil pipeline based on the physical information neural network to obtain simulation results. The present application constructs a physical model for simulating the initial setting of an oil pipeline, including the rheological properties of crude oil, basic water-thermal properties, and temperature field change characteristics during the pipeline shutdown and restart process. It comprehensively considers the influence of multiple factors such as the flow and heat transfer of crude oil as well as external factors such as ambient temperature and wind speed, so it can adapt to changes in different crude oil properties, pipeline structures, and operating environments. The oil pipeline is simulated by simulation software to obtain the operating status data of the oil pipeline under different working conditions and the pre-processed real-time data to generate the initial setting data of the oil pipeline. The initial setting data of the oil pipeline can provide researchers with more dimensional information, which is helpful for a comprehensive understanding of the initial setting characteristics of the crude oil pipeline. The physical information neural network and the initial setting data of the oil pipeline and the transmission The overall loss function calculated by coupling the physical model of the initial setting simulation of the oil pipeline is used to train the physical model of the initial setting simulation of the oil pipeline, so as to realize the subsequent simulation of the actual oil pipeline data. The physical information neural network is applied to the initial setting simulation of the crude oil pipeline, which can not only fully consider the constraints of physical laws and ensure the physical rationality and accuracy of the simulation results, but also can handle crude oil of different types and properties, as well as pipelines with different structures and operating conditions, to realize multi-scale and multi-physical field coupling simulation, thereby improving the transportation safety and efficiency of the oil pipeline. Therefore, the initial setting problem in the transportation of crude oil pipelines can be discovered and solved in time, the probability of initial setting accidents can be reduced, and a strong guarantee for the safe transportation and optimized operation of crude oil pipelines is provided.
[0112] See also Fig.11 As shown, the embodiment of the present invention discloses an initial setting simulation device for an oil pipeline, which may specifically include:
[0113] Model building module 11, used to build a physical model for initial setting simulation of the oil pipeline including rheological properties of crude oil, basic water-thermal properties and temperature field change characteristics during pipeline shutdown and restart;
[0114] The data comparison and analysis module 12 is used to obtain real-time data, pre-process the real-time data, and simulate the oil pipeline using preset simulation software to obtain the operating status data of the oil pipeline under different working conditions, and compare and analyze the pre-processed real-time data with the operating status data to obtain the initial setting data of the oil pipeline;
[0115] A loss function calculation module 13, used for coupling the initial setting data of the oil pipeline with the initial setting simulation physical model of the oil pipeline to calculate a total loss function corresponding to the initial setting data of the oil pipeline and the initial setting simulation physical model of the oil pipeline;
[0116] The training module 14 is used to determine whether the total loss function is less than a preset threshold value. If the total loss function is less than the preset threshold value, the physical model of the initial setting simulation of the oil pipeline is trained using a preset physical information neural network and the total loss function to obtain the physical model of the initial setting simulation of the oil pipeline based on the physical information neural network;
[0117] The simulation module 15 is used to simulate the actual oil pipeline data using the oil pipeline initial setting simulation physical model based on the physical information neural network to obtain simulation results.
[0118] In this embodiment, a physical model of initial coagulation simulation of an oil pipeline is constructed, which includes rheological properties of crude oil, basic water-thermal properties, and temperature field change characteristics during the pipeline shutdown and restart process; real-time data is acquired, the real-time data is preprocessed, and the oil pipeline is simulated using preset simulation software to obtain operating status data of the oil pipeline under different working conditions, and the preprocessed real-time data and the operating status data are compared and analyzed to obtain initial coagulation data of the oil pipeline; the initial coagulation data of the oil pipeline are coupled with the physical model of initial coagulation simulation of the oil pipeline to calculate the total loss function corresponding to the initial coagulation data of the oil pipeline and the physical model of initial coagulation simulation of the oil pipeline; it is determined whether the total loss function is less than a preset threshold value, and if the total loss function is less than the preset threshold value, the physical model of initial coagulation simulation of the oil pipeline is trained using a preset physical information neural network and the total loss function to obtain the physical model of initial coagulation simulation of the oil pipeline based on the physical information neural network; the actual oil pipeline data is simulated using the physical model of initial coagulation simulation of the oil pipeline based on the physical information neural network to obtain simulation results. The present application constructs a physical model for simulating the initial setting of an oil pipeline, including the rheological properties of crude oil, basic water-thermal properties, and temperature field change characteristics during the pipeline shutdown and restart process. It comprehensively considers the influence of multiple factors such as the flow and heat transfer of crude oil as well as external factors such as ambient temperature and wind speed, so it can adapt to changes in different crude oil properties, pipeline structures, and operating environments. The oil pipeline is simulated by simulation software to obtain the operating status data of the oil pipeline under different working conditions and the pre-processed real-time data to generate the initial setting data of the oil pipeline. The initial setting data of the oil pipeline can provide researchers with more dimensional information, which is helpful for a comprehensive understanding of the initial setting characteristics of the crude oil pipeline. The physical information neural network and the initial setting data of the oil pipeline and the transmission The overall loss function calculated by coupling the physical model of the initial setting simulation of the oil pipeline is used to train the physical model of the initial setting simulation of the oil pipeline, so as to realize the subsequent simulation of the actual oil pipeline data. The physical information neural network is applied to the initial setting simulation of the crude oil pipeline, which can not only fully consider the constraints of physical laws and ensure the physical rationality and accuracy of the simulation results, but also can handle crude oil of different types and properties, as well as pipelines with different structures and operating conditions, to realize multi-scale and multi-physical field coupling simulation, thereby improving the transportation safety and efficiency of the oil pipeline. Therefore, the initial setting problem in the transportation of crude oil pipelines can be discovered and solved in time, the probability of initial setting accidents can be reduced, and a strong guarantee for the safe transportation and optimized operation of crude oil pipelines is provided.
[0119] In some specific embodiments, the model building module 11 may specifically include:
[0120] An oil pipeline physical model construction module is used to introduce a mixed crude oil circular pipe flow model to describe the flow of crude oil, introduce a Bingham model to characterize the rheological properties of the crude oil, and construct an oil pipeline physical model based on the mixed crude oil circular pipe flow model and the Bingham model;
[0121] An oil pipeline initial setting physical model construction module is used to construct an oil pipeline initial setting physical model based on the oil pipeline physical model and in combination with the actual operation characteristics of the oil pipeline;
[0122] The temperature distribution calculation module is used to calculate the first temperature distribution of the soil at different depths and directions and the second temperature distribution of the oil pipeline and the crude oil at different positions and times, and to construct the initial setting simulation physical model of the oil pipeline including the rheological properties of crude oil, basic water-thermal properties and the temperature field change characteristics during the pipeline shutdown and restart process based on the first temperature distribution, the second temperature distribution and the initial setting physical model of the oil pipeline.
[0123] In some specific embodiments, the model building module 11 may specifically include:
[0124] The specific construction module of the initial setting physical model of the oil pipeline is used to construct the initial setting physical model of the oil pipeline based on the thermodynamic model, the fluid dynamics model and the physical model of the oil pipeline and in combination with the actual operating characteristics of the oil pipeline; wherein the thermodynamic model and the fluid dynamics model include the continuity equation, the momentum equation and the energy equation.
[0125] In some specific embodiments, the model building module 11 may specifically include:
[0126] A first temperature distribution calculation module, used to calculate a first temperature distribution of the soil at different depths and directions using a preset soil heat conduction model;
[0127] The second temperature distribution calculation module is used to establish a heat exchange model between the oil pipeline and the soil, and use the heat exchange model and a numerical solution method to calculate the second temperature distribution of the oil pipeline and the crude oil at different positions and times.
[0128] In some specific embodiments, the data comparison and analysis module 12 may specifically include:
[0129] A real-time data acquisition module is used to collect data in real time using sensors on the oil pipeline to obtain real-time data;
[0130] The real-time data processing module is used to perform denoising, filtering and normalization processing on the real-time data to obtain the pre-processed real-time data.
[0131] In some specific embodiments, the loss function calculation module 13 may specifically include:
[0132] A data loss function calculation module, used to calculate a data loss function corresponding to the initial setting data of the oil pipeline;
[0133] A physical loss function calculation module, used to calculate the physical loss function corresponding to the physical model of the initial setting simulation of the oil pipeline;
[0134] The total loss function calculation module is used to add the data loss function and the physical loss function to obtain the total loss function.
[0135] In some specific embodiments, the training module 14 may specifically include:
[0136] A new overall loss function calculation module, used for adjusting the parameters in the fully connected neural network based on the optimization algorithm of the adaptive learning rate and the back propagation algorithm if the total loss function is not less than a preset threshold, so as to calculate a new overall loss function using the automatic differentiation algorithm and the adjusted parameters;
[0137] The model training module is used to determine whether the new overall loss function is less than the preset threshold. If the new overall loss function is less than the preset threshold, the preset physical information neural network and the new overall loss function are used to train the initial setting simulation physical model of the oil pipeline.
[0138] Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the oil pipeline initial setting simulation method performed by the electronic device disclosed in any of the aforementioned embodiments.
[0139] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0140] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon include an operating system 221, a computer program 222 and data 223, etc. The storage method can be temporary storage or permanent storage.
[0141] Among them, the operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, so as to realize the operation and processing of the data 223 in the memory 22 by the processor 21, which can be Windows, Unix, Linux, etc. In addition to including a computer program that can be used to complete the oil pipeline initial setting simulation method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks. In addition to including data transmitted from an external device received by the oil pipeline initial setting simulation device, the data 223 can also include data collected by its own input and output interface 25, etc.
[0142] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0143] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium, in which a computer program is stored. When the computer program is loaded and executed by a processor, the steps of the oil pipeline initial setting simulation method disclosed in any of the aforementioned embodiments are implemented.
[0144] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0145] The above is a detailed introduction to the oil pipeline initial setting simulation method, device, equipment and storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for simulating initial setting of an oil pipeline, characterized in that: include: Construct a physical model for initial solidification simulation of oil pipelines, including crude oil rheological properties, basic water-thermal properties, and temperature field change characteristics during pipeline shutdown and restart; Acquire real-time data, pre-process the real-time data, and simulate the oil pipeline using preset simulation software to obtain operation status data of the oil pipeline under different working conditions, and compare and analyze the pre-processed real-time data and the operation status data to obtain initial setting data of the oil pipeline; The initial setting data of the oil pipeline are coupled with the initial setting simulation physical model of the oil pipeline to calculate a total loss function corresponding to the initial setting data of the oil pipeline and the initial setting simulation physical model of the oil pipeline; Determine whether the total loss function is less than a preset threshold value. If the total loss function is less than the preset threshold value, train the initial setting simulation physical model of the oil pipeline using a preset physical information neural network and the total loss function to obtain the initial setting simulation physical model of the oil pipeline based on the physical information neural network; Using the oil pipeline initial setting simulation physical model based on the physical information neural network to simulate actual oil pipeline data to obtain simulation results; Among them, the construction of an initial setting simulation physical model of an oil pipeline including rheological properties of crude oil, basic water-thermal properties and temperature field change characteristics during pipeline shutdown and restart includes: introducing a mixed crude oil circular tube flow model to describe the flow of crude oil, introducing a Bingham model to characterize the rheological properties of the crude oil, and constructing an oil pipeline physical model based on the mixed crude oil circular tube flow model and the Bingham model; constructing an initial setting physical model of the oil pipeline based on the oil pipeline physical model and in combination with the actual operating characteristics of the oil pipeline; calculating the first temperature distribution of soil at different depths and directions and the second temperature distribution of the oil pipeline and the crude oil at different positions and times, and constructing an initial setting simulation physical model of the oil pipeline including rheological properties of crude oil, basic water-thermal properties and temperature field change characteristics during pipeline shutdown and restart based on the first temperature distribution, the second temperature distribution and the initial setting physical model of the oil pipeline.
2. The oil pipeline initial setting simulation method according to claim 1 is characterized in that: The physical model of the initial setting of the oil pipeline is constructed based on the physical model of the oil pipeline and combined with the actual operation characteristics of the oil pipeline, including: An initial setting physical model of the oil pipeline is constructed based on the thermodynamic model, the fluid dynamics model and the physical model of the oil pipeline and combined with the actual operating characteristics of the oil pipeline; wherein the thermodynamic model and the fluid dynamics model include a continuity equation, a momentum equation and an energy equation.
3. The oil pipeline initial setting simulation method according to claim 1 is characterized in that: The calculating of the first temperature distribution of the soil at different depths and directions and the second temperature distribution of the oil pipeline and the crude oil at different positions and times includes: Calculate the first temperature distribution of the soil at different depths and directions using a preset soil heat conduction model; A heat exchange model between the oil pipeline and the soil is established, and the heat exchange model is used to calculate the second temperature distribution of the oil pipeline and the crude oil at different positions and times using a numerical solution method.
4. The method for simulating initial setting of an oil pipeline according to claim 1, characterized in that: The acquiring of real-time data and preprocessing of the real-time data include: Use sensors on the oil pipeline to collect data in real time to obtain real-time data; The real-time data is subjected to denoising, filtering and normalization processing to obtain the pre-processed real-time data.
5. The oil pipeline initial setting simulation method according to claim 1, characterized in that: The calculating of the total loss function corresponding to the initial setting data of the oil pipeline and the initial setting simulation physical model of the oil pipeline includes: Calculating a data loss function corresponding to the initial setting data of the oil pipeline; Calculating a physical loss function corresponding to the physical model of the initial setting simulation of the oil pipeline; The data loss function and the physical loss function are added together to obtain the total loss function.
6. The method for simulating initial setting of an oil pipeline according to any one of claims 1 to 5, characterized in that: After determining whether the total loss function is less than a preset threshold, the method further includes: If the total loss function is not less than a preset threshold, adjusting the parameters in the fully connected neural network based on the optimization algorithm of the adaptive learning rate and the back propagation algorithm so as to calculate a new overall loss function using the automatic differentiation algorithm and the adjusted parameters; It is determined whether the new overall loss function is less than the preset threshold value. If the new overall loss function is less than the preset threshold value, the preset physical information neural network and the new overall loss function are used to train the physical model of the initial setting simulation of the oil pipeline.
7. An oil pipeline initial setting simulation device, characterized in that: include: Model building module, used to build a physical model for initial setting simulation of oil pipelines, including crude oil rheological properties, basic water-thermal properties, and temperature field change characteristics during pipeline shutdown and restart; A data comparison and analysis module is used to obtain real-time data, pre-process the real-time data, and simulate the oil pipeline using preset simulation software to obtain the operating status data of the oil pipeline under different working conditions, and compare and analyze the pre-processed real-time data with the operating status data to obtain the initial setting data of the oil pipeline; A loss function calculation module, used for coupling the initial setting data of the oil pipeline with the initial setting simulation physical model of the oil pipeline to calculate a total loss function corresponding to the initial setting data of the oil pipeline and the initial setting simulation physical model of the oil pipeline; A training module, used to determine whether the total loss function is less than a preset threshold value, and if the total loss function is less than the preset threshold value, train the initial setting simulation physical model of the oil pipeline using a preset physical information neural network and the total loss function to obtain the initial setting simulation physical model of the oil pipeline based on the physical information neural network; A simulation module, used to simulate actual oil pipeline data using the oil pipeline initial setting simulation physical model based on the physical information neural network to obtain simulation results; Among them, the construction of an initial setting simulation physical model of an oil pipeline including rheological properties of crude oil, basic water-thermal properties and temperature field change characteristics during pipeline shutdown and restart includes: introducing a mixed crude oil circular tube flow model to describe the flow of crude oil, introducing a Bingham model to characterize the rheological properties of the crude oil, and constructing an oil pipeline physical model based on the mixed crude oil circular tube flow model and the Bingham model; constructing an initial setting physical model of the oil pipeline based on the oil pipeline physical model and in combination with the actual operating characteristics of the oil pipeline; calculating the first temperature distribution of soil at different depths and directions and the second temperature distribution of the oil pipeline and the crude oil at different positions and times, and constructing an initial setting simulation physical model of the oil pipeline including rheological properties of crude oil, basic water-thermal properties and temperature field change characteristics during pipeline shutdown and restart based on the first temperature distribution, the second temperature distribution and the initial setting physical model of the oil pipeline.
8. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor is used to execute the computer program to implement the oil pipeline initial setting simulation method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: Used to store a computer program; wherein, when the computer program is executed by a processor, the oil pipeline initial setting simulation method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Crude oil condensation identification method, device and equipment based on feature fusion
CN114861837A
Mixed crude oil condensation point prediction model training method and device and application method
CN114898818A
Evaluation method and device for ensuring crude oil to flow in conveying pipeline
CN116263841A
Method and device for optimizing mixed crude oil conveying system between combination stations based on viscosity prediction
CN116263845A
Pipeline simulation method, device and system and storage medium
CN117077340A
