New chapter of hydraulic circuit theory - flow distribution of multicomponent fluids

. Natural gas is a mixture of gases: methane hydrocarbons, water vapor, etc. Gas is supplied to the UGSS RF from various sources with different component composition. The composition determines the calorific value of the gas. The ability to control gas flows (composition and calorific value) helps to substantiate the economic efficiency of urgent problems, for example, the choice of the location of gas processing complexes. The paper deals with two-component gas flows. A method for finding an estimate of the distribution of calorie content based on the use of the maximum likelihood method and optimization methods is proposed. The technique allows one to take into account the non-equilibrium and irreversibility of mixing processes.


Introduction. Brief review of the literature
Natural gas is a mixture of different gases.The main component is usually methane.Its share for the gas fields of the Russian Federation ranges from 90 to 98%.Besides methane, natural gas contains other hydrocarbons -methane homologues (ethane, propane, etc.), nitrogen, carbon dioxide, water vapor, helium, hydrogen sulphide, etc.
In addition to gas and gas condensate fields, the sources of gas supply to the unified gas supply system (UGSS) of Russian Federation are gas processing plants, underground storage facilities, and oil fields.The composition of the gas entering the UGSS can vary greatly depending on the sources.Gases with a high content of heavy hydrocarbons and, therefore, a high calorific value enter from gas processing plants and oil fields.
Hydrocarbons of the homologous methane series are a valuable raw material for gas chemical complexes (GCC).It is economically expedient to separate these components from natural gas and use them in gas chemistry.
The choice of the GCC location is a serious problem.There are two options: to locate the gas chemical complexes near gas fields or near industrial clusters.In the first case, it is supposed to transport natural gas, in which the methane content is close to 100%, in the second -a gas containing a large amount of high molecular homologues of methane.Choosing the location of the GCCs is the task of the future development of the UGSS.
In the operational control of gas transmission systems (GTSs), problems related to the component composition also arise.Mutual settlements between the gas supplier and consumers are made not by quantity, but by energy indicators, that is, taking into account the calorific value of the gas.The calorific value of a gas affects its price.Consumers have different requirements for the calorific value of gas.In this regard, during dispatch control of gas distribution systems, it is advisable to ensure gas supplies to consumers in accordance with their requests by manoeuvring of flows.
Another task of the operational control of the GTS is the need to comply with the conditions for the dew point temperature (DPT) for water and hydrocarbons.The Russian [1, 3] and international [2,4] standards regulate the dependence of the DPT on the concentration of water vapor in natural gas.For export deliveries, DPT tracking is mandatory.The determination of the DPT is reduced to the calculation of mixing processes in converging and diverging gas flows, where as one of the components of the transported fluid is water vapor.
Thus, when the problems of both operational and long-term management of GTS are being solved, it becomes necessary to calculate the distribution of the component composition (calorific value) in the directions of pumping GTS, that is, the need to build a model for estimating the component composition of multicomponent gas mixtures.This task is the subject of this paper.
The analysis of the gas composition is carried out periodically using sampling equipment or continuously if the measuring unit has the appropriate equipment.In order to increase the degree of reliability of information on the distribution of the calorific value and / or the component composition of the gas along the gas pipelines, the entire set of measurements performed on the gas-measuring stations should be taken into account.It is necessary to develop special methods, build adequate mathematical and computer models to take into account the interdependence of measurements.
A two-component or multicomponent fluid model can be used to solve various technological problems [5,6].The paper will present a model of a two-component gas flow.This model has an independent meaning, it can be applied, for example, in the case when methane and ethane predominate in the transported product, and the proportion of other components is small.For three or more component gases, the technique will not fundamentally change, but the number of unknowns increase, what can lead to a complication of the computational component of the model.
The issues of modelling procedures for measuring the parameters of technological processes are considered in the papers [7 -9].Mixing processes in gas supply systems are addressed in the paper [10].

Problem statement
Consider a GTS of an arbitrary configuration.We represent the structure of the GTS by a directed graph  = (, ), where  is a set of nodes and  is a set of arcs.We orient the arcs in the direction of pumping.We denote by  -the number of nodes, and by  − the number of arcs of the graph.The nodes are divided into 3 groups:  �� sources,  ��� sinks and  ����� joint points.We will assume that sources and sinks are connected to the graph by a single arc (outgoing -for sources and incoming -for sinks).On the graph , a fluid flow =� �� �, (, ) ∈  consisting of two mixing components, such as methane and ethane,  �� =  �� +  �� is specified.Here  �� is the fluid flow rate along the arc (, ).The quantities  �� satisfy the material balance equations at all joint points  � Here and below, Г( � ) is the set of nodes into which arcs outgoing from  � enter, and Г �� ( � ) is the set of nodes from which arcs go to  � (see Fig. 1).The flow  is a vector quantity -the totality of all flow rates  �� , (, ) ∈ .The aggregates of flow rates of methane ζ �� , (, ) ∈  and ethane η �� , (, ) ∈  are also vector variables , .They must satisfy the balance equations (1) with the replacement ⟶ and, ⟶ respectively.It is assumed that  �� ≥ 0, (, ) ∈ .Mixing processes of multicomponent gases in large-scale systems are irreversible and non-equilibrium [11].Both that properties of the processes are phenomenological facts.When flows with different concentrations merge, the resulting flow in the Y-tube will have a weighted average concentration.At different concentrations of the flows entering the node (Fig. 1b), the concentrations of the components on the output lines, generally speaking, are different, that is, complete mixing of gases does not actually occur.The mixing process is in a sense analogous to the heat transfer process, in which the temperature in communicating vessels evens out over time, tending to the weighted average value, and in the irreversible mixing process of multicomponent gases, the concentrations approach the average value.The mixing of the components is due to turbulent mixing and diffusion.The main influence is exerted by turbulent mixing, since diffusion is characterized by a low rate of the process.Mixing of multicomponent gases is an isothermal process.When determining completeness of flow mixing, the "degree of nonequilibrium" in the aggregated diagram of the pipeline system, it is impossible to take into account the technological details.
The non-equilibrium of the mixing process imposes certain restrictions on the ratio of the model variables  �� ,  �� .For example, the maximum concentration on the output lines cannot exceed the maximum concentration on the input lines.The analysis shows that the distribution of flow rates and concentrations along the outlet lines will be acceptable if determined by the concentrations on the input lines (Fig. 2).An indicator has been introduced for a quantitative estimation of the possibilities of metrological support of the GTS with points for measuring the component composition of gas.The criterion is  =  ����� − ( −  * ), where  ����� is the number of joint nodes,  * is the number of arcs on which the measuring points are installed.When  > 0, the effect of refinement of the sought estimates is ensured due to the consideration of the mutual influence of the entire set of measurements, that is, the regime and technological connections are taken into account.If  = 0, then the measurement results directly serve as estimates of the concentration values.If  < 0, then the constraint equations are insufficient to estimate all unmeasured concentrations.Fig. 2. Checking the fulfillment of the non-equilibrium conditions for the joint node.

Mathematical formulation of the problem. Two-component gas
The task is to estimate the ethane concentrations  �� = � �� � �� , (, ) ∈  from the measured concentrations  �� * ,(, ) ∈  * , where  * is the set of measuring points, each of which is expediently attributed to the graph arc.The measurement result is the sum of the true value and the measurement error  �� * =  �� +  �� , (, ) * .In the theory of errors, the measurement results are considered to be normally distributed quantities  �� ∈ (0,  �� ) (2) The measurement results are random variables, therefore, to solve the problem, a stochastic model should be built.For a point estimate of unknown concentrations, let us turn to mathematical statistics, within which the maximum likelihood method (MLM) has been developed for this purpose.The estimate is the value of the argument that maximizes the likelihood function, which is the probability density of the sample -the aggregate of all measured values.
(5) In the full record these conditions are determined by the relations omitted here (Fig. 2 serves as an illustration to them).Optimization problem (3) -( 5) can be efficiently solved using software packages.
The solution to the problem is to find estimates that are linear functions of measurements The estimates are characterized by variance, which is calculated by the formula , (, ) ∈  (7) In the model (2 -5), instead of the component concentrations  �� , (, ) ∈ , you can put the calorific values  �� , (, ) ∈ .The ratios obtained in this case will make it possible to directly calculate  �� , (, ) ∈  -the distribution of caloric content in the directions of pumping the GTS -through measurements  �� * , (, ) ∈  * .Notice, that the calorific value can be calculated through the concentrations by the formula  = ∑  � �  � , where  � is the mass fraction of the -th component.Let's give an illustrative example of calculating calorie content.The structural graph of the GTS contains  = 13 arcs,  = 11 nodes,  * = 9 measurement points,  ����� = 5 joint nodes.Criterion  =  ����� − ( −  * ) = 1.This means that the metrological support of the GTS is sufficient to take into account the mutual influence of measurements.Table 1 shows the calculation results.

Results of experimental studies
It is easy to verify from the data in Fig. 3 and Table 1 that non-equilibrium conditions are satisfied for all nodes of the considered GTS.
Let us introduce a criterion ( � ) that characterizes the degree of non-equilibrium of the processes of mixing gases during their transportation through the GTS.The criterion is determined on the cuts [12,13] of the extended graph  � , which is obtained by attaching to the original graph  a fictitious source  � and a fictitious sink  � , as well as fictitious arcs shown in Fig. 4  characterizes the degree of closeness of the mixture to the equilibrium state − the state of complete mixing.Here, I denotes the number of mixture components.Non-equilibrium processes are most likely the subject of the study of physical kinetics, which widely uses the concepts of thermodynamics, in particular the concept of entropy [14 -20].Entropy is also used in other very different applications up to computer science, as a measure of disorder.According to the established tradition, entropy as a characteristic of irreversible processes can change in only one direction -increase.In order † SCMstandard cubic meter not to violate the tradition, the entropy of the process of non-equilibrium mixing of multicomponent gas mixtures during their movement through industrial pipeline systems should be called the value ( . According to this definition entropy of a gas mixture is the sum of the entropies of its components.Entropy is a function defined on a discrete set -the set of cuts of the extended structural graph of a pipeline system.On the set of cuts, we can introduce the concept of partial ordering  .The cuts  � ,  � in Fig. 4 are related by the ratio  �   � .The sign  indicates an increase (more precisely, a non-decrease in entropy ( � ) ≥ � � �.

Conclusions
The paper presents a technique that allows you to calculate the distribution of the concentrations of components and / or the calorific value of a mixture of gases during their flows through systems of industrial pipelines of arbitrary configuration.The technique takes into account the random nature of the measurements, and, therefore, uses the methods of probability theory and mathematical statistics.The search for the desired concentration distribution or calorific value is reduced to a mathematical programming problem with constraints in the form of equalities or inequalities.The problem can be solved using commercial software packages.The proposed method can be used to manage gas supplies to consumers in each direction of GTS pumping, to justify an economically suitable location of gas chemical enterprises using natural gas as a raw material.More information is provided in [21,22].

Fig. 1 .
Fig. 1.Splitting a and merging b at the joint node x � .
dotted lines.The cuts of graph  � separating  � from  � are considered.The figure shows 2 cut  � ,  � of a graph.The distribution of fluid flow rates along the cut is determined by the totality  �� = � �� |�| , (, ) ∈  � .Here || = ∑  �� (�,�)∈� � is the total flow rate throughthe cut.It is obvious that the total flow rate || for each cut is the same.Since ∑  �� (�,�)∈� � = 1 we can put that for each component  of the population  �� ,  �� � , (, ) ∈  � discrete random variable specified on the  � cut is determined.The dispersion of this value  � ( � ) variation of the component  around the mean value ̅ � , that is, the degree of closeness of the flow to the state of complete mixing.It should now be clear that the cut function ( � ) = ∑  � ( � ) � ���
requirements for the concentrations on the outlet lines are satisfied.The distribution of concentrations on the output lines must satisfy certain conditions: points with coordinates  �� ,  ����� ;  � ∈ Г �� ( � ) should not lie above a curve (), some

Table 1 .
Initial data and calculation result * †)