Study on mixing interface of continuous large drop and U-shaped product pipeline

. In the long-distance pipeline of product oil, gasoline and diesel oil are transported in batches. Due to the large difference of physical properties between the two kinds of oil products, there will be oil mixing at each interface. Because the index parameters of mixed oil do not meet the sales standard, it is necessary to track the interface accurately, so as to provide necessary reference for cutting mixed oil. The topography of southwest mountainous area is characterized by continuous large drop and U-shape, which brings difficulties to batch tracking of product oil pipeline. The previous method is not suitable for this type of pipeline. Therefore, it is necessary to re study the batch tracking method of this type of product pipeline, and use vs2019 to write batch tracking software for continuous large drop and U-shaped product pipeline based on this method. The batch tracking error of the software for this type of pipeline is within the acceptable range, which can provide more accurate reference for the operation control personnel


Research background and necessity
The construction, development and rise of domestic product oil pipeline are relatively late, and the research on batch tracking of product oil pipeline is also relatively late. Until 2005, domestic scholars began to pay attention to the tracking of batch interface of crude oil and product oil pipelines [1][2][3], and some scholars used Excel software to track the batch operation position of Sinopec South China pipeline network [4], and some scholars applied online batch interface calculation software to PetroChina Western product oil pipeline and Lanzhou Chengdu Chongqing product oil pipeline [5,6].
There are Hengduan Mountains in Southwest China, which are characterized by continuous large drop and U-shape, which brings difficulties to batch tracking of product oil pipelines. The previous method is not suitable for this type of pipeline, so it is necessary to re study the batch tracking method of this type of product pipeline, and write batch tracking software for continuous large drop and U-shaped product pipeline based on this method.

Mechanism of mixed oil
In the process of pipeline sequential transportation, in addition to the initial oil mixing, station crossing oil mixing, shutdown oil mixing and accidental oil mixing, under normal transportation conditions, oil mixing along the pipeline is the main source of oil mixing. The causes of mixed oil in sequential transportation mainly include convective diffusion (or convective transfer, velocity extension), molecular diffusion and turbulent diffusion in turbulent state.

Mechanism of oil mixing along the way
Convection transfer and diffusion transfer are the two basic mechanisms of oil mixing along the way. When two kinds of oil products alternate in the pipeline, the amount of mixed oil varies greatly under different flow regimes, because the mixing mechanism is also different under different flow regimes.
When the flow pattern is laminar flow or the turbulence intensity is not large, the velocity distribution of the fluid in the cross section of the pipeline is not uniform. The convection transfer caused by the velocity difference is the main reason for the oil mixing along the pipeline. At this time, the oil mixing along the pipeline mainly depends on the molecular diffusion. As shown in Figure 1.1, the flow state of oil in the pipeline is shown, and the later oil is wedge-shaped in the forward oil. As shown in the figure, oil a is the forward product and oil B is the backward product. Under the promotion of concentration difference, the molecules of oil B will pass through the interface of oil a, and the diffusion of the molecules near the interface will make the concentration of oil a and oil B tend to be uniform. It can be seen from Fig. 1.1 that under laminar flow regime, the uneven velocity distribution on the cross section of the pipeline is the main cause of oil mixing. Under this flow condition, the amount of mixed oil produced is astonishing, which may be several times of the total volume of the pipeline. Therefore, in general, it is not allowed to carry out sequential transportation in laminar flow state, and the oil is required to operate at a higher flow rate.

Formation mechanism of initial mixed oil
The complex process flow of the station is an important reason for the initial oil mixing. It is stipulated in the sequential transportation process that when the product oil is replaced at the first station of the product oil pipeline, the transportation cannot be stopped, so when the oil in the two kinds of oil tanks is switched into the pipeline in turn, the initial mixing of two different kinds of oil products is formed in the manifold system. In addition, there are various valves, manifolds, bypass pipes, receiving and launching cylinders in the oil pipeline station, which inevitably lead to flow dead angle. Once the oil is switched to pass through these parts, oil mixing will occur due to convection transfer, diffusion transfer, uneven flow velocity, turbulence pulsation and concentration difference. The amount of mixed oil produced in the station will increase as the pipeline moves forward.

Production mechanism of mixed oil during shutdown
There are two reasons for shutdown: one is due to the influence of equipment, human or the outside world; The other is the planned shutdown, which is to control the docking position of the oil mixing section artificially and purposefully. The variation law of mixed oil quantity during shutdown is more complicated than that during normal operation.
When the shutdown condition occurs, the original turbulent pulsation of the fluid in the pipeline disappears, so the main reason for oil mixing is no longer the mass transfer of the fluid. The factors that affect oil mixing are different under shutdown and operation conditions: in pipeline operation, the influence of viscosity difference of adjacent oil products on oil mixing is far greater than that of density difference of adjacent oil products, and even the influence of density can be ignored when calculating oil mixing; However, when shutdown occurs, the density difference between adjacent oil products transported in sequence can lead to the increase of oil mixing, especially when the line is undulating and the heavy oil is above the slope while the light oil is below the slope, which will aggravate the influence of this condition on oil mixing. At this time, the convection process of light oil products laminar flow to heavy oil products will occur. Because of the existence of gravity field, the liquid will be stratified, which will lead to a significant increase in the length of mixed oil.
When the shutdown time is very long, so that the diffusion process fully occurs, the amount of oil mixing caused by shutdown is often much larger than that under turbulent operation, so shutdown is an important factor leading to the increase of oil mixing, which will significantly increase the cost of pipeline operation.

Colour illustrations Algorithm of traditional product oil mixing interface tracking software
When the batch interface passes through station a in the middle, record the time t 0 and the cumulative flow value V 0 of the ultrasonic flowmeter configured in Station C corresponding to the time. If the dispatcher is required to calculate the position of the batch interface at time t, the corresponding cumulative flow value V of the ultrasonic flowmeter at station C at time t is also required, then the position of the batch interface at time t is as follows: Where: S is the position of batch interface at time t, km; S A is the mileage of station A, km; V M is the unit pipe capacity of the pipe section where the batch interface is located, m 3 /km.
In particular, if there is separate transportation or injection between the batch interface location and the station where the flowmeter is located, the separate transportation or injection volume shall be further considered, and the interface mileage shall be calculated according to equation (2).
Where: Vrefers to the off load or injection quantity to be considered. If the interface is located in the upstream of the station where the ultrasonic flow meter is located, the off load is negative and the injection is positive; If the interface is located in the downstream of the station where the ultrasonic flow meter is located, the separate transportation volume is positive and the injection volume is negative. In addition to the position of batch interface at time t, it is also an important daily work of dispatchers to predict the arrival time of batch interface at the next station. Dispatchers will determine the start or end time of off load according to the time and combined with the oil transportation plan.
Where: T B is the predicted value of the time when the batch interface passes through station B; S B is the mileage of station B, km; Q A-B is the volume flow between stations A and B, m 3 / h. It can be seen from equations (1) to (3) that the calculation of interface position and arrival time of a single batch is not complicated, and the original data of pipeline production and operation can be substituted into the formula.

Correction algorithm of mixed oil interface tracking software for continuous large drop and U-shaped pipeline in mountainous area
This algorithm is modified based on the traditional method, so the oil mixing length (interface position) calculated by the traditional method is retained.
At the low point of continuous large drop and U-shaped pipeline: when the mixing head reaches this position, it starts to climb upward. During the whole climbing process, because the mixing interface is subjected to the static pressure of the preceding oil, the mixing length remains basically unchanged.
At the high point of continuous large drop and U-shaped pipeline: after the mixing head reaches the high point, the mixing amount will increase in the process of mixing decline. The larger the ratio (elevation difference / mileage difference) is, the more the amount of mixed oil increases; The longer the downhill section is, the more the mixed oil increases.
Suppose the elevation difference is L gc , the mileage difference is L lc , and the ratio is e = L gc / L lc .
Then the increased oil mixing amount of the i-th downhill section: In the above formula, S i is the i-th down hill section to increase the amount of mixed oil; C D is the coefficient of increasing oil mixing; e is the ratio.
Multiple continuous large drop and U-shaped pipelines increase oil mixing: The modified formula of mixing length:

Example
A-M pipeline capacity is 22510 4 t / A, 257.9km in total length, 1157m in maximum height . The design pressure of the whole line is 8 MPa. There is a distribution point y in A-M pipeline. The length of a-y section is 100.4km, and the pipe diameter is 323.9mm; The length of y-m section is 157.7km, and the pipe diameter is 273.1mm. The pipeline is a typical continuous large drop and U-shaped oil pipeline.
Firstly, the C D value of the pipeline is determined after the actual mixing length value is corrected, and then the interface tracking software is written by using the modified algorithm. The oil head deviation is within 1km, and the error is acceptable.

Conclusion
1. The research shows that the batch tracking software of continuous large drop and Ushaped product pipeline has reference value for batch tracking of this type of pipeline, and can provide more accurate reference for operation control personnel; 2. When the mixing head of product oil pipeline reaches the high point, the mixing volume will increase in the process of mixing decline. The larger the ratio (elevation difference / mileage difference) is, the more the amount of mixed oil increases; The longer the downhill section is, the more the mixed oil increases. Therefore, it is necessary to consider the increased oil mixing volume of each downhill section for continuous large drop and U-shaped product pipeline; 3. In this paper, the coefficient C D of increasing oil mixing is a variable, which needs to be checked and determined by the actual value.