CN111125867B - Method for establishing and calculating real-time transient model of chemical production pipeline based on chaotic particle swarm - Google Patents

Method for establishing and calculating real-time transient model of chemical production pipeline based on chaotic particle swarm Download PDF

Info

Publication number
CN111125867B
CN111125867B CN201911065382.5A CN201911065382A CN111125867B CN 111125867 B CN111125867 B CN 111125867B CN 201911065382 A CN201911065382 A CN 201911065382A CN 111125867 B CN111125867 B CN 111125867B
Authority
CN
China
Prior art keywords
pipeline
chemical production
model
pressure
flow
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911065382.5A
Other languages
Chinese (zh)
Other versions
CN111125867A (en
Inventor
蔡亦军
刘蕴文
周猛飞
潘海天
林俊杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang University of Technology ZJUT
Original Assignee
Zhejiang University of Technology ZJUT
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang University of Technology ZJUT filed Critical Zhejiang University of Technology ZJUT
Priority to CN201911065382.5A priority Critical patent/CN111125867B/en
Publication of CN111125867A publication Critical patent/CN111125867A/en
Application granted granted Critical
Publication of CN111125867B publication Critical patent/CN111125867B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]

Abstract

The invention discloses a method for establishing and calculating a real-time transient model of a chemical production pipeline based on chaotic particle swarms, which comprises the following steps: establishing a pipeline mechanism model; introducing the Brunone model into a momentum balance equation, and obtaining a pipeline total length optimization equation through deduction optimization according to a Bernoulli equation; collecting flow and pressure values of the head end, the tail end and the middle position of the chemical production pipeline; firstly setting an initial value to obtain the calculated length L of the chemical production pipeline, inputting the flow and pressure values acquired by the head end of the chemical production pipeline into a pipeline mechanism model to obtain the pressure head H of the chemical production pipeline along the process and the flow velocity v of the chemical production pipeline, and calculating the sum of errors relative to the actual value, such as the sum of the errors relative to the actual value is smaller than a set threshold value; and calculating the pressure and flow of the chemical production pipeline in real time by adopting a pipeline mechanism model subjected to parameter optimization. The invention further improves the reliability of monitoring the chemical process pipeline based on the model method.

Description

Method for establishing and calculating real-time transient model of chemical production pipeline based on chaotic particle swarm
Technical Field
The invention relates to the technical field of monitoring of chemical safety production pipelines, in particular to a method for establishing and calculating a real-time transient model of a chemical production pipeline based on chaotic particle swarms.
Background
The pipeline is one of safe, efficient and energy-saving modes for conveying fluid, and plays an increasingly important role in national economy. In the chemical industry, the leakage problem is often caused by factors such as aging, corrosion, poor welding, third party damage and the like of a pipeline, and the conventional pipeline leakage detection method at present is mainly divided into two major categories, namely a model-based method and a data driving-based method. The data-driven method is mainly based on data collection to perform signal processing and statistical analysis for leak detection, but does not need any specific deep knowledge about the system, only needs to acquire pipeline leak characteristics and knowledge from collected historical data through a machine learning algorithm or an artificial intelligence algorithm, and the method is based on the collected signals to ignore mechanism information in the pipeline, and the adopted machine learning algorithm needs to train samples to limit some situations needing online monitoring; the development based on the model method effectively utilizes the physical information of the pipeline, and effectively analyzes the running condition of the pipeline in each state by establishing a mechanism model and utilizing the collected pressure and flow signals, but most of the existing pipeline mechanism models are applied to the petroleum transportation field and are less in the chemical industry field. Because the pipeline for petroleum transportation has the characteristics of long distance, large flow and the like, the hydrodynamic property of the pipeline is affected by a local resistance unit, and the influence on the pipeline is smaller than that on a chemical process pipeline with the characteristics of short length, more branches, more elbows and the like.
In order to improve the precision of the model, the traditional pipeline mechanism model adopts quasi-constant friction to improve the hydraulic model on the basis of a continuity equation and a motion equation, so that the influence of convection effect in the transient process is solved to a certain extent, but the quasi-constant friction term is subjected to various-order precision approximation treatment during solving, and the simulation effect is still unsatisfactory. And Brunone proposes a IAB (Instantaneous Accelerationbased) empirical friction model, and the influence of the instantaneous acceleration of the model in the transient process is considered, so that the accuracy of model establishment is effectively improved. However, in the existing research, many algorithms based on models cannot be designed by effectively combining the characteristics of chemical process pipelines, so that in practical application, due to lack of mechanism information of an established model, high false alarm rate and false alarm rate exist in pipeline leakage detection by using the method, even in positioning, the leakage position cannot be accurately obtained, and the detection effect is unsatisfactory.
Disclosure of Invention
Aiming at the problems existing in the application of the existing model-based method in the chemical process pipeline, the invention provides a method for establishing and calculating a real-time transient model of a chemical production pipeline based on a chaotic particle swarm, which can effectively solve the problem of accuracy of model establishment under the condition that more elbows and other local resistance accessories exist in the pipeline in the chemical field, and further improves the reliability of monitoring the chemical process pipeline based on the model method.
A method for establishing and calculating a real-time transient model of a chemical production pipeline based on chaotic particle swarm comprises the following steps:
step 1.1: establishing a pipeline mechanism model;
introducing the Brunone model into a momentum balance equation to obtain a combination of the momentum balance equation and the Brunone model, and obtaining a pipeline total length optimization equation through deduction and optimization according to a Bernoulli equation;
step 1.2: collecting flow and pressure values of the head end, the tail end and the middle position of a chemical production pipeline, wherein the flow and pressure values of the head end of the chemical production pipeline are used as data for optimizing a pipeline mechanism model, and the flow and pressure values of the tail end and the middle position of the chemical production pipeline are used for verifying optimized pipeline mechanism model parameters zeta B And alpha;
step 1.3: zeta in (3) is set first B And an initial value of alpha in the formula (1) to obtain a calculated length L of the chemical production pipeline, wherein the calculated length L is the maximum range of x in the formula (1), then the flow and pressure values acquired at the head end of the chemical production pipeline are input into the pipeline mechanism model to carry into the formulas (1) and (2) to obtain an along-line pressure head H of the chemical production pipeline and a flow velocity v of the chemical production pipeline, and the relative errors and f of the along-line pressure head H of the chemical production pipeline and the flow velocity v of the chemical production pipeline and the actual values are calculated through the formula (4) N I.e. the fitness. If the sum of the relative errors is smaller than a set threshold value, obtaining optimized model parameters zeta of the pipeline mechanism model B And alpha, if the sum of the relative errors is greater than or equal to a set threshold value, entering step 1.4;
wherein f N Representing the relative error sum, i=0 represents the pipe head end, i=k represents the pipe k-th, i=n+1 pipe end position,Representing the actual measurement of the pipe head at i, H i Model calculation representing the pipe head at i, < +.>Representing an actual measurement of the flow rate of the pipeline, v i A model calculation representing the pipeline flow rate at i;
step 1.4: zeta of pipeline mechanism models (1), (2) and (3) B And alpha, carrying out chaotic particle swarm optimization to obtain an optimized zeta B And alpha, zeta after optimization B Zeta and alpha as step 1.3 B And an initial value of alpha, repeating the step 1.3 until an optimized pipeline mechanism model parameter zeta is obtained B And alpha;
step 1.5: model parameters zeta of the optimized pipeline mechanism model obtained in the step 1.3 B And alpha, or the optimized pipeline mechanism model parameters zeta obtained in the step 1.4 B And alpha is brought into formulas (1), (2) and (3) to form a pipeline mechanism model subjected to parameter optimization, and the pressure and the flow of the chemical production pipeline are calculated in real time by adopting the pipeline mechanism model subjected to parameter optimization.
In step 1.1, the pipeline mechanism model includes: mass balance equation, momentum balance equation, brunone model, and bernoulli equation;
the mass balance equation is shown as a formula (1), wherein,representing the partial derivative of the pressure head H with respect to the sampling instant t, v representing the flow rate of the fluid in the tube,/>Represents the partial derivative of the flow velocity with respect to the length x of the pipeline, alpha represents the included angle between the pipeline and the horizontal plane, a represents the pressure wave velocity, g represents the gravitational acceleration, and 9.81m 3 /s;
The combination of the momentum balance equation and the Brunone model is shown as the formula (2)Shown, where k represents the Brunone drag coefficient, k can be taken as:re is the Reynolds number, D is the diameter of the pipeline, and lambda is the fluid resistance coefficient;
the Bernoulli equation is subjected to deduction optimization to obtain a pipeline total length optimization equation shown in a formula (3), wherein L is the calculated length of a pipeline, L is the length of a straight section of the pipeline, and n bend Zeta being the number of bends in the pipe B Is the local resistance coefficient of the elbow;
before optimization, a pipeline mechanism model is initially established, wherein the pipeline mechanism model comprises a pipeline basic model, fluid basic parameters and relevant parameter initial values of a local resistance unit.
In step 1.3, inputting flow and pressure values acquired by the head end of a chemical production pipeline into a pipeline mechanism model to carry into the formulas (1) and (2) to obtain an along-path pressure head H of the chemical production pipeline and a flow velocity v of the chemical production pipeline, wherein the method specifically comprises the following steps:
(A) Inputting pipeline and fluid basic parameters into a pipeline mechanism model: straight pipe section length l, pipe diameter D and number of elbows n bend The relative roughness delta, the liquid compressibility correlation coefficient, the pipe wall elasticity correlation coefficient, the fluid density rho, the hydrodynamic viscosity mu, the pressure wave velocity a=800-1200 m/s (most preferably a=1000 m/s);
(B) Collecting actual values of pressure and flow velocity of the head end of the chemical production pipeline in a steady stateCollecting actual values of pressure and flow rate of chemical production pipeline end in steady state>Collecting actual values of pressure and flow velocity at middle position i of chemical production pipeline in steady state +.>
(C) Calculating a Reynolds number dividing flow state according to the average value of flow velocity at the head end and the middle position of the pipeline, and determining a hydraulic friction coefficient lambda;
(D) According to the zeta value set B Alpha adopts formula (3) to calculate length L, differential grid division is carried out on the length L, the length L is divided into n sections with length deltax, and finally, a four-order Longguge tower method is adopted to carry out pressure P on each section i in the n sections of the pipeline along the path i And flow velocity v i Solving to obtain pressure P i And flow velocity v i Namely the pressure head H along the chemical production pipeline and the flow velocity v and the pressure P of the chemical production pipeline i Can be represented by the pressure head H along the chemical production pipeline, and the flow velocity v i I.e. the flow velocity v of the chemical production pipeline.
In step 1.4, pipeline mechanism model parameter ζ B And alpha, performing chaotic particle swarm optimization, and specifically comprising the following steps:
(a) Initializing algorithm parameters, and setting population scale M, maximum iteration number Itermax, inertia coefficient w and weight factor c 1 、c 2 Maximum velocity of the particles;
(b) Randomly initializing the position and speed of the particles, calculating the fitness of the particles, and determining the optimal position p of the individual particles best And a global optimum position g of the particles best
(c) Updating the velocity and position of each particle according to equations (5) and (6);
v i,j (t+1)=w·v i,j (t)+c 1 ·rand1·(p best -x i,j (t))+c 2 ·rand2·(g best,j -x i,j (t)) (5)
x i,j (t+1)=x i,j (t)+v i,j (t+1),j=1,2,...,d (6)
wherein v is i,j The speed, x, of the j variable representing the i-th particle i,j Representing the position of the j-th dimensional variable of the i-th particle, t representing the t-th iteration of particle swarm optimization,
(d) Optimal position for each particlePut p best =(p best1 ,p best2 ,…,p bestD ) Performing chaos optimization, firstly mapping each dimension of each particle into a space of 0-1, as shown in formula (4), to obtain a chaos variableWherein x is max,j And x min,j Searching maximum values and minimum values of the j-th dimensional variable respectively, wherein k is the iteration number of the chaotic variable;
(e) Mixing and iterating the chaotic variable by using a Logics equation (8) to obtain a new chaotic variable
(f) And then pass through (9)After mapping back to the original solution space, calculating the adaptability thereof, evaluating the modified value, and if the newly solved adaptability is better than the adaptability before chaos, taking the variable after chaos as an optimal result; if not, returning to the step (c) to continue chaotic optimization;
(g) Calculating the fitness of all particles optimized by a chaotic algorithm, and taking the position corresponding to the optimal fitness as a global optimal position g of the particles best And judging whether the convergence threshold or the maximum iteration number is met, if so, outputting a result, and if not, returning to the step (c) for searching again.
Compared with the prior art, the invention has the following advantages:
the method for establishing and calculating the real-time transient model of the chemical production pipeline based on the chaotic particle swarm is used for solving the problems of poor reliability, low detection precision and the like of a detection system caused by the imperfect establishment of a mechanism model by adopting a method based on model detection in a monitoring system because the chemical pipeline has the characteristics of short length, more branches, more elbows and the like in a chemical safety production pipeline monitoring system. The invention firstly introduces a Brunone model into a momentum equation, and then establishes a group of pipeline mechanism models with non-constant friction by combining mass conservation. In order to improve the accuracy of the model, the invention derives the equivalent length of a fluid resistance element (mainly an elbow) by using a Bernoulli equation to obtain an empirical formula of the resistance element, applies the empirical formula to a non-constant friction resistance mechanism model, establishes a non-constant friction resistance pipeline mechanism model combined with the empirical formula of the pipeline resistance element, finally optimizes parameters of the model by using a Chaotic Particle Swarm (CPSO) optimization algorithm, and obtains a building method for a chemical production pipeline model. Compared with the traditional model method, the method considers the influence of the resistance element in the chemical pipeline, reduces the detection leakage and positioning errors of the model method, improves the detection precision, ensures the flexibility and high efficiency of the modeling method, can be effectively used in a chemical safety production pipeline monitoring system, and provides a theoretical basis for safety prediction of the chemical industry.
Drawings
FIG. 1 is a flow diagram of a method for establishing and calculating a real-time transient model of a chemical production pipeline based on chaotic particle swarms;
FIG. 2a is a model simulation of the head profile at 0s and 10s, not according to the invention;
FIG. 2b model simulation of the present invention with head profiles at 0s and 10 s;
FIG. 2c model simulation of the present invention with flow along the course of 0s and 10 s;
FIG. 3a is a model simulation of the present invention for head end (point A) flow variation over 0-10 s;
FIG. 3B model simulation of the present invention with intermediate (B point) head variation in 0-10 s;
FIG. 3C is a model simulation of the change in tip (C point) head over 0-10 s;
FIG. 4 is a graph of the calculated average relative error distribution at three positions A, B, C for different pipeline flows;
FIG. 5a is a graph showing the comparison of head-end flow (point A) flow calculations and measurements;
FIG. 5b is a graph comparing head calculation and measurement for end flow (point C);
figure 6 shows the calculated average relative error distribution for two positions A, C at different pipeline flows.
Detailed Description
The model building method of the present invention will be described in detail with reference to the accompanying drawings. Embodiments of the invention are as follows:
as shown in fig. 1, the method for establishing and calculating the real-time transient model of the chemical production pipeline based on the chaotic particle swarm is characterized by comprising the following steps:
step 1.1: establishing a pipeline mechanism model;
the pipeline mechanism model comprises the following components: mass balance equation, momentum balance equation, brunone model, and bernoulli equation;
the mass balance equation is shown as a formula (1), wherein,representing the partial derivative of the pressure head H with respect to the sampling instant t, v representing the flow rate of the fluid in the tube,/>Represents the partial derivative of the flow velocity with respect to the length x of the pipeline, alpha represents the included angle between the pipeline and the horizontal plane, a represents the pressure wave velocity, g represents the gravitational acceleration, and 9.81m 3 /s;
The combination of the momentum balance equation and the Brunone model is shown as a formula (2), wherein k represents the Brunone resistance coefficient, and k can be taken as:re is the Reynolds number, D is the diameter of the pipeline, and lambda is the fluid resistance coefficient;
the Bernoulli equation is subjected to deduction optimization to obtain a pipeline total length optimization equation shown in a formula (3), wherein L is the calculated length of a pipeline, L is the length of a straight section of the pipeline, and n bend Zeta being the number of bends in the pipe B Is the local resistance coefficient of the elbow;
before optimization, a pipeline mechanism model is initially established, wherein the pipeline mechanism model comprises a pipeline basic model, fluid basic parameters and relevant parameter initial values of a local resistance unit;
introducing the Brunone model into a momentum balance equation to obtain a combination of the momentum balance equation and the Brunone model, and obtaining a pipeline total length optimization equation through deduction and optimization according to a Bernoulli equation;
step 1.2: collecting flow and pressure values of the head end, the tail end and the middle position of a chemical production pipeline, wherein the flow and pressure values of the head end of the chemical production pipeline are used as data for optimizing a pipeline mechanism model, and the flow and pressure values of the tail end and the middle position of the chemical production pipeline are used for verifying optimized pipeline mechanism model parameters zeta B And alpha;
step 1.3: zeta in (3) is set first B And an initial value of alpha in the formula (1) to obtain a calculated length L of the chemical production pipeline, wherein the calculated length L is the maximum range of x in the formula (1), then the flow and pressure values acquired at the head end of the chemical production pipeline are input into the pipeline mechanism model to carry into the formulas (1) and (2) to obtain an along-line pressure head H of the chemical production pipeline and a flow velocity v of the chemical production pipeline, and the relative errors and f of the along-line pressure head H of the chemical production pipeline and the flow velocity v of the chemical production pipeline and the actual values are calculated through the formula (4) N I.e. the fitness. If the sum of the relative errors is smaller than a set threshold value, obtaining optimized model parameters zeta of the pipeline mechanism model B And alpha, if the sum of the relative errors is greater than or equal to a set threshold value, entering step 1.4;
wherein f N Representing the relative error sum, i=0 represents the pipe head, i=k represents the pipe k-th, i=n+1 pipe end positions,representing the actual measurement of the pipe head at i, H i Model calculation representing the pipe head at i, < +.>Representing an actual measurement of the flow rate of the pipeline, v i A model calculation representing the pipeline flow rate at i;
in step 1.3, inputting flow and pressure values acquired by the head end of a chemical production pipeline into a pipeline mechanism model to carry into the formulas (1) and (2) to obtain an along-path pressure head H of the chemical production pipeline and a flow velocity v of the chemical production pipeline, wherein the method specifically comprises the following steps:
(A) Inputting pipeline and fluid basic parameters into a pipeline mechanism model: straight pipe section length l, pipe diameter D and number of elbows n bend The relative roughness delta, the liquid compressibility correlation coefficient, the pipe wall elasticity correlation coefficient, the fluid density rho, the hydrodynamic viscosity mu, the pressure wave speed a=1000 m/s;
(B) Collecting actual values of pressure and flow velocity of the head end of the chemical production pipeline in a steady stateCollecting actual values of pressure and flow rate of chemical production pipeline end in steady state>Collecting the metaplasia in steady stateActual values of pressure and flow rate at the production line intermediate position i +.>
(C) Calculating a Reynolds number dividing flow state according to the average value of flow velocity at the head end and the middle position of the pipeline, and determining a hydraulic friction coefficient lambda;
(D) According to the zeta value set B Alpha adopts formula (3) to calculate length L, differential grid division is carried out on the length L, the length L is divided into n sections with length deltax, and finally, a four-order Longguge tower method is adopted to carry out pressure P on each section i in the n sections of the pipeline along the path i And flow velocity v i Solving to obtain pressure P i And flow velocity v i Namely the pressure head H of the chemical production pipeline along the path and the flow velocity v of the chemical production pipeline.
Step 1.4: zeta of pipeline mechanism models (1), (2) and (3) B And alpha, carrying out chaotic particle swarm optimization to obtain an optimized zeta B And alpha, zeta after optimization B Zeta and alpha as step 1.3 B And an initial value of alpha, repeating the step 1.3 until an optimized pipeline mechanism model parameter zeta is obtained B And alpha;
in step 1.4, pipeline mechanism model parameter ζ B And alpha, performing chaotic particle swarm optimization, and specifically comprising the following steps:
(a) Initializing algorithm parameters, and setting population scale M, maximum iteration number Itermax, inertia coefficient w and weight factor c 1 、c 2 Maximum velocity of the particles;
(b) Randomly initializing the position and speed of the particles, calculating the fitness of the particles, and determining the optimal position p of the individual particles best And a global optimum position g of the particles best
(c) Updating the velocity and position of each particle according to equations (5) and (6);
v i,j (t+1)=w·v i,j (t)+c 1 ·rand1·(p best -x i,j (t))+c 2 ·rand2·(g best,j -x i,j (t)) (5)
x i,j (t+1)=x i,j (t)+v i,j (t+1),j=1,2,...,d (6)
wherein v is i,j The speed, x, of the j variable representing the i-th particle i,j Representing the position of the j-th dimensional variable of the i-th particle, t representing the t-th iteration of particle swarm optimization,
(d) Optimal position p for each particle best =(p best1 ,p best2 ,…,p bestD ) Performing chaos optimization, firstly mapping each dimension of each particle into a space of 0-1, as shown in formula (4), to obtain a chaos variableWherein x is max,j And x min,j Searching maximum values and minimum values of the j-th dimensional variable respectively, wherein k is the iteration number of the chaotic variable;
(e) Mixing and iterating the chaotic variable by using a Logics equation (8) to obtain a new chaotic variable
(f) And then pass through (9)After mapping back to the original solution space, calculating the adaptability thereof, evaluating the modified value, and if the newly solved adaptability is better than the adaptability before chaos, taking the variable after chaos as an optimal result; if not, returning to the step (c) to continue chaotic optimization;
(g) Calculating the fitness of all particles optimized by a chaotic algorithm, and taking the position corresponding to the optimal fitness as a global optimal position g of the particles best And judging whether the convergence threshold or the maximum iteration number is met, if so, outputting a result, and if not, returning to the step (c) for searching again.
Step 1.5: and calculating the pressure and flow of the chemical production pipeline in real time by using the pipeline mechanism model subjected to parameter optimization.
When the device specifically operates, an experiment platform is firstly built, and comprises a pipeline equipment platform, a supporting and fixing frame, a signal detection and acquisition module and a signal processing and processing module. The pipeline equipment platform mainly comprises a water tank, a multistage pump, a main pipeline, a plurality of ball valves and the like, wherein a pipeline main body is formed by crossing 32 standard 90-degree elbows and straight pipe sections with the total length of about 45m, the pipe is a stainless steel pipe with the pipe diameter of 0.025m and the thickness of 1.6mm, and a conveying medium in the pipe is tap water; the signal detection acquisition module mainly comprises a data acquisition card and a signal sensor, wherein the model of the data acquisition card is ATR, and the signal sensor refers to a turbine flowmeter (0.6-6 m3/h,0.5 level) and a pressure sensor (0-0.6 mpa,0.2 level) which are arranged at the head end and the tail end of a pipeline and a pressure sensor (0-0.6 mpa,0.2 level) which is arranged at the position 20m away from the head end in the pipeline.
The study uses an ATR data acquisition card to monitor the flow and the pressure of a pipeline in real time, the data acquisition time is 10s and 30s, fluid in the pipeline stably runs in the acquisition process, and then the sampled data is used as boundary conditions to carry out simulation calculation, and the specific implementation steps are as follows:
(1) Inputting basic parameters of a pipeline system: straight pipe length l, pipe diameter D, absolute roughness, fluid density dens, pressure wave speed a, head-end flow and pressure measurement data;
(2) Preliminary dividing a calculation grid, and dividing the time step length of the grid on a time axis delta t and the calculation step length of a space axis delta x into N sections;
(3) Performing noise reduction processing on the head and tail end measurement data by using Kalman filtering, and inputting the measurement data subjected to the noise reduction processing into a CPSO intelligent optimization algorithm for model parameter optimization;
(4) Obtaining the calculated length L of the pipeline after quantifying the elbow according to the optimized parameters, and dividing the calculation grids again to determine the calculated section number N of the pipeline;
(5) Calculating the distribution of pipeline along-path pressure and flow by using a 4-order Dragon-Gregory tower method, taking the distribution as an initial value of real-time transient model calculation, and calculating pipeline pressure and flow parameters in a scheme A and a scheme B according to upstream and downstream boundary conditions through a scheme (10) (11);
(6) And comparing the calculated value of the model with the actually measured data, and checking the accuracy of the model.
The method for establishing the real-time transient model of the chemical production pipeline based on the chaotic particle swarm, disclosed by the invention, has higher accuracy and reliability under the steady state and transient state conditions. The steady state condition (example 1) verifies whether the model building method of the invention is reliable or not when the working condition of chemical production is unchanged (such as the flow is unchanged); the transient condition (example 2) verifies whether the model building method of the invention is reliable or not when the working condition of chemical production changes (such as flow change).
Example 1
The flow rate of the pipeline taking system is 4.40m 3 In order to ensure convergence of the characteristic line differential format, the time step Δt and the space step Δx must satisfy the pluronic-Friedrichs-Lewy stability condition, thus prescribing a time step Δt=0.1 s.
The simulation results are shown in fig. 2, the group of graphs reflect the relation between the pressure head value of the pipeline along the length of the pipeline, the broken line segments represent the pressure head along the length distribution of the initial state (0 s), the solid line represents the pressure head along the length distribution relation obtained by calculation of the dynamic model when the system is 10s, fig. 2a is the relation between the pressure head of the pipeline along the length of the pipeline for 0s and 10s, which is obtained by simulation of the pipeline mechanism model not optimized by the CPSO algorithm, and the calculation errors are gradually accumulated along the length of the pipeline, so that the maximum relative error is 86.2%; FIG. 2b shows the relationship between the pipeline path pressure head and the pipeline length of 0s and 10s obtained by simulation of a pipeline mechanism model optimized by the CPSO algorithm, wherein the coincidence ratio of the two groups of data of 0s and 10s is very high, and the maximum relative error is only 4.9%. FIG. 2c reflects the relationship between the flow value of the pipeline along the pipeline and the length of the pipeline, the calculated flow of the pipeline along the pipeline is about 4.4m3/h, the calculated flow fluctuation before the length is 45m is basically smaller, the maximum relative error is 0.17%, when the length of the pipeline exceeds 45m, the calculated flow fluctuation begins to increase, the maximum relative error is 0.25%, and the flow distribution of the pipeline along the pipeline calculated by the optimized model basically meets the precision requirement because the flow adopted by measurement is 0.5 level.
In addition, the calculated values and measured values of the pressure head at the point a (i.e., the head end of the pipeline), the pressure head at the point B (i.e., the middle of the pipeline) and the pressure head at the point C (the tail end of the pipeline) of the pipeline fluid flowing stably within 10s are shown in fig. 3, the dashed curve represents measured data, the solid curve represents data simulated by the dynamic model of the chemical production pipeline of the invention, wherein the average deviation of the actual measured data of the flow at the head end a of fig. 3a is 0.0012, the average deviation of the simulated data of the flow at the upstream a is 0.0029, the average deviation of the actual measured data of the pressure head at the downstream C is 0.068, the average deviation of the pressure head at the point C is 0.196, which indicates that the data obtained by the dynamic model calculation after optimization has a larger deviation from the actual data when calculating the pressure distribution.
Finally, the scheme takes the flow rate (3.7 m 3 /h,3.8m 3 /h,3.9m 3 /h,4.0m 3 /h,4.1m 3 /h,4.2m 3 /h,4.3m 3 /h,4.4m 3 H), average relative error of flow and pressure at the head end, middle and tail end, as can be seen from FIG. 4, as flow increases in the system, the flow is increasedThe relative errors of flow and pressure at the head end, the middle and the tail end, which are obtained by calculation of the dynamic model after optimization, are within the precision range except that the errors at the tail end of the pipeline are larger, so that the real-time transient model of the chemical production pipeline has good simulation effect under steady-state flow.
Example 2
The flow rate of the pipeline taking system is 4.31m 3 After 15s of data collected by the flow and pressure sensors at the head and the tail, the regulating valve at the upstream inlet is changed to reduce the flow of the pipeline to 4.14m 3 And/h, finishing data acquisition after 30 s. The change trend of the head-end flow and the tail-end pressure is shown by blue solid lines in fig. 5a and b, the boundary condition is in the form of HV, the calculation grid is Δx=1m, Δt=0.001 s, the stability condition of the Courant-Friedrichs-Lewy is met, the pressure wave speed a=1000m/s, and finally the simulation calculation condition of the head-end flow and the tail-end pressure within 30s can be obtained, as shown by red solid lines in fig. 5a and b.
The scheme takes the flow rate (3.4 m) 3 /h,3.5m 3 /h,3.6m 3 /h,3.7m 3 /h,3.8m 3 /h,3.9m 3 /h,4.0m 3 /h,4.1m 3 /h,4.2m 3 /h,4.3m 3 /h,4.4m 3 /h,4.5m 3 And/h) based on the average relative error distribution diagram of the head-end flow and the pressure calculated under the HV as the boundary condition, as shown in fig. 6, a circular dotted line represents the relative error value of the end pressure, and a square dotted line represents the relative error value of the head-end flow.
From the calculation result, the flow rate of the real-time transient model of the chemical production pipeline based on the chaotic particle swarm provided by the invention is 3.4-4.4 m in simulation calculation 3 The relative errors of the head end flow obtained in/h are below 2%, the relative errors of the tail end pressure head are below 4%, and the errors are reduced along with the increase of the flow, so that when the flow speed of the fluid in the pipeline is increased, the flowing state is closer to turbulent flow, the calculation errors are smaller under the turbulent flow based on the Darcy friction empirical formula adopted by the invention, and Brunone non-patent is added in the pipeline modelThe constant flow friction term is more beneficial to obtaining better calculation accuracy of the model under the high Reynolds number state. Therefore, the chaos particle swarm-based real-time transient model for the chemical production pipeline has higher simulation precision in the transient process of flow regulation.

Claims (2)

1. The method for establishing and calculating the real-time transient model of the chemical production pipeline based on the chaotic particle swarm is characterized by comprising the following steps of:
step 1.1: establishing a pipeline mechanism model;
introducing the Brunone model into a momentum balance equation to obtain a combination of the momentum balance equation and the Brunone model, and obtaining a pipeline total length optimization equation through deduction and optimization according to a Bernoulli equation;
the pipeline mechanism model comprises the following components: mass balance equation, momentum balance equation, brunone model, and bernoulli equation;
the mass balance equation is shown as a formula (1), wherein,representing the partial derivative of the pressure head H with respect to the sampling instant t, v representing the flow rate of the fluid in the tube,/>Representing the partial derivative of the flow velocity with respect to the length x of the pipeline, alpha represents the included angle between the pipeline and the horizontal plane, a represents the wave velocity of the pressure wave, and g represents the gravitational acceleration;
the combination of the momentum balance equation and the Brunone model is shown as a formula (2), wherein k represents the Brunone resistance coefficient, and k is taken as:re is the Reynolds number, D is the diameter of the pipeline, and lambda is the fluid resistance coefficient;
the Bernoulli equation is subjected to deduction optimization to obtain a pipeline total length optimization equation shown in a formula (3), wherein L is the calculated length of a pipeline, L is the length of a straight section of the pipeline, and n bend Zeta being the number of bends in the pipe B Is the local resistance coefficient of the elbow;
step 1.2: collecting flow and pressure values of the head end, the tail end and the middle position of a chemical production pipeline, wherein the flow and pressure values of the head end of the chemical production pipeline are used as data for optimizing a pipeline mechanism model, and the flow and pressure values of the tail end and the middle position of the chemical production pipeline are used for verifying optimized pipeline mechanism model parameters zeta B And alpha;
step 1.3: zeta in (3) is set first B And an initial value of alpha in the formula (1) to obtain a calculated length L of the chemical production pipeline, wherein the calculated length L is the maximum range of x in the formula (1), then the flow and pressure values acquired at the head end of the chemical production pipeline are input into the pipeline mechanism model to carry into the formulas (1) and (2) to obtain an along-line pressure head H of the chemical production pipeline and a flow velocity v of the chemical production pipeline, and the relative errors and f of the along-line pressure head H of the chemical production pipeline and the flow velocity v of the chemical production pipeline and the actual values are calculated through the formula (4) N I.e. the fitness, if the sum of the relative errors is smaller than a set threshold value, the optimized model parameters zeta of the pipeline mechanism model are obtained B And alpha, if the sum of the relative errors is greater than or equal to a set threshold value, entering step 1.4;
wherein f N Representing the relative error sum, i=0 represents the pipe head, i=k represents the pipe k-th, i=n+1 pipe end positions,representing the actual measurement of the pipe head at i, H i Model calculation representing the pipe head at i, < +.>Representing an actual measurement of the flow rate of the pipeline, v i A model calculation representing the pipeline flow rate at i;
step 1.4: zeta of pipeline mechanism models (1), (2) and (3) B And alpha, carrying out chaotic particle swarm optimization to obtain an optimized zeta B And alpha, zeta after optimization B Zeta and alpha as step 1.3 B And an initial value of alpha, repeating the step 1.3 until an optimized pipeline mechanism model parameter zeta is obtained B And alpha;
step 1.5: model parameters zeta of the optimized pipeline mechanism model obtained in the step 1.3 B And alpha, or the optimized pipeline mechanism model parameters zeta obtained in the step 1.4 B And alpha is brought into formulas (1), (2) and (3) to form a pipeline mechanism model subjected to parameter optimization, and the pressure and the flow of the chemical production pipeline are calculated in real time by adopting the pipeline mechanism model subjected to parameter optimization.
2. The method for establishing and calculating the real-time transient model of the chemical production pipeline based on the chaotic particle swarm according to claim 1, wherein in the step 1.3, the flow and the pressure value acquired by the head end of the chemical production pipeline are input into the pipeline mechanism model to carry into the formulas (1) and (2), so as to obtain the along-the pressure head H of the chemical production pipeline and the flow velocity v of the chemical production pipeline, and the method specifically comprises the following steps:
(A) Inputting pipeline and fluid basic parameters into a pipeline mechanism model: straight pipe section length l, pipe diameter D and number of elbows n bend The relative roughness delta, the liquid compressibility correlation coefficient, the pipe wall elasticity correlation coefficient, the fluid density rho, the hydrodynamic viscosity mu and the pressure wave speed a=800-1200 m/s;
(B) Collecting actual values of pressure and flow velocity of the head end of the chemical production pipeline in a steady stateCollecting actual values of pressure and flow rate of chemical production pipeline end in steady state>Collecting actual values of pressure and flow velocity at middle position i of chemical production pipeline in steady state +.>
(C) Calculating a Reynolds number dividing flow state according to the average value of flow velocity at the head end and the middle position of the pipeline, and determining a hydraulic friction coefficient lambda;
(D) According to the zeta value set B Alpha adopts formula (3) to calculate length L, differential grid division is carried out on the length L, the length L is divided into n sections with length deltax, and finally, a four-order Longguge tower method is adopted to carry out pressure P on each section i in the n sections of the pipeline along the path i And flow velocity v i Solving to obtain pressure P i And flow velocity v i Pressure P i Represented by the pressure head H along the chemical production pipeline, the flow velocity v i I.e. the flow velocity v of the chemical production pipeline.
CN201911065382.5A 2019-11-04 2019-11-04 Method for establishing and calculating real-time transient model of chemical production pipeline based on chaotic particle swarm Active CN111125867B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911065382.5A CN111125867B (en) 2019-11-04 2019-11-04 Method for establishing and calculating real-time transient model of chemical production pipeline based on chaotic particle swarm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911065382.5A CN111125867B (en) 2019-11-04 2019-11-04 Method for establishing and calculating real-time transient model of chemical production pipeline based on chaotic particle swarm

Publications (2)

Publication Number Publication Date
CN111125867A CN111125867A (en) 2020-05-08
CN111125867B true CN111125867B (en) 2024-03-26

Family

ID=70496109

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911065382.5A Active CN111125867B (en) 2019-11-04 2019-11-04 Method for establishing and calculating real-time transient model of chemical production pipeline based on chaotic particle swarm

Country Status (1)

Country Link
CN (1) CN111125867B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113803647B (en) * 2021-08-25 2023-07-04 浙江工业大学 Pipeline leakage detection method based on fusion of knowledge features and hybrid model

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108493951A (en) * 2018-03-21 2018-09-04 中南大学 A kind of multi-objective reactive optimization method based on Chaos particle swarm optimization algorithm
CN109949577A (en) * 2019-04-25 2019-06-28 贵州大学 A kind of road traffic flow prediction technique

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
NO335021B1 (en) * 2012-11-27 2014-08-25 Sinvent As Method for simulating multiphase fluid flows in pipelines
CN103939749B (en) * 2014-04-28 2016-08-24 东北大学 Flow circuits based on big data leakage intelligent adaptive monitoring system and method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108493951A (en) * 2018-03-21 2018-09-04 中南大学 A kind of multi-objective reactive optimization method based on Chaos particle swarm optimization algorithm
CN109949577A (en) * 2019-04-25 2019-06-28 贵州大学 A kind of road traffic flow prediction technique

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于改进粒子群优化算法的闭环时滞系统辨识;王谦;孙京诰;;华东理工大学学报(自然科学版);20150430(02);全文 *
改进混沌粒子群优化的灰色系统模型在机床热误差建模中的应用;余文利;姚鑫骅;;现代制造工程;20180618(06);全文 *

Also Published As

Publication number Publication date
CN111125867A (en) 2020-05-08

Similar Documents

Publication Publication Date Title
CN109344436B (en) Online simulation method for large complex natural gas pipe network system
CN110500511B (en) Urban non-metal pipeline leakage positioning method
CN110197049B (en) Non-metal pipeline leakage positioning method based on transient inverse problem
CN113551744A (en) Ultrasonic flowmeter performance online monitoring method and system
CN104063588A (en) Multi-source data fusion-based system and method for predicting pipeline corrosion defect size
CN109340582A (en) A kind of submarine pipeline leakage monitoring method and system
CN110513603B (en) Non-metal pipeline leakage positioning method based on inverse transient analysis method
CN111339701B (en) Pipeline leakage characteristic Godunov simulation method based on Brunone dynamic friction resistance
US11906987B2 (en) Pressure control in a supply grid
Xu et al. Machine learning classification of flow regimes in a long pipeline-riser system with differential pressure signal
CN107014451A (en) The method of ultrasonic flow sensor coefficient is speculated based on generalized regression nerve networks
CN106918369B (en) A kind of device and measurement method for hydropower station pressure main conduit flow measurement
CN103940495A (en) Small-flow ultrasonic flowmeter error estimation method based on flow lines
CN111125867B (en) Method for establishing and calculating real-time transient model of chemical production pipeline based on chaotic particle swarm
CN107329167B (en) Detect method, system and the computer storage media of pipeline sediment distribution
Manshoor et al. Numerical investigation of the circle grids fractal flow conditioner for orifice plate flowmeters
Liu et al. Correlation analysis of pipeline corrosion and liquid accumulation in gas gathering station based on computational fluid dynamics
Wu et al. Study on the similarity of wet gas pressure drop in long-throat Venturi
Gan et al. k-factors for HVAC ducts: Numerical and experimental determination
CN111059477B (en) Double-layer framework based reverse source-seeking chemical pipeline leakage detection and positioning method
Zhang et al. A general numerical method for solid particle erosion in gas–liquid two-phase flow pipelines
CN111709198A (en) Method for determining pipeline convergence energy loss coefficient by utilizing flow distribution
CN116484291A (en) Submarine natural gas pipeline blockage judging method based on pressure gradient
Wang et al. Mass flow measurement of two-phase carbon dioxide using coriolis flowmeters
Suryana et al. Detection of Leak Position in Household LPG Distribution Pipes Using Gas Pressure Sensors and Continuity Equation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant