Mathematical Modeling of Gas-Liquid Flow in Compressed Air Foam Generation Systems

The object of research is the compression foam supply system. One of the most problematic areas in the design of compression foam supply systems is the need to obtain a certain type of foam with the necessary properties, depending on the class of fire for which it will be used to extinguish. It is necessary to take into account the technological process of foam formation, namely, the regulation of the flow of the foaming agent solution and compressed air, which are fed into the mixing chamber, where the foam is generated directly. It is important to ensure optimal parameters depending on the purpose of the foam outlet flow installation: flow rate, foam ratio and foam stability. In order to design a compression foam supply system with certain technological parameters, it is necessary to obtain these parameters analytically in advance, for which it is necessary to construct an appropriate mathematical model.<br><br>In the course of the research, let’s use the Simulink graphical simulation environment (integrated into the MatLab software environment), which allows building dynamic models using separate blocks in the form of directed graphs. The structure of such a model is built on the basis of separate, independent blocks, which in themselves are separate mathematical models.<br><br>New is the development of a mathematical model of a two-phase flow: a liquid phase consisting of a mixture of water with a foaming agent and a gas phase – air in the foam generator path as part of a block diagram of an installation for the case of generation of compression foam. And also the development of a scheme and communication algorithm for serially connected blocks of a common block diagram. This ensures the receipt of the calculated output data of the stationary mode of operation of the installation.<br><br>The mathematical model developed in this work allows solving the following applied and scientific problems: <br><br>– to carry out calculations of the input parameters of the installation, which will provide the required output parameters: flow power, frequency ratio, continuous generation time, foam resistance, determined by the purpose and features of the installation in conditions of extinguishing various types of fires;<br><br>– to investigate the influence of the parameters of the foam generation insert of the installation on the expansion of the compression foam.


Introduction
When designing systems for supplying compression foam, the main problem is the need to obtain a certain type of foam that has the required properties, depending on the class of fire for which it will be used to extinguish. It is necessary to take into account the technological process of foam formation, namely, the regulation of the flow of the foaming agent solution and compressed air, which is fed into the mixing chamber, where the foam is directly generated. It is important to ensure the optimal parameters depending on the purpose of the foam outlet flow installation: flow rate, foam rate and its durability.
Based on [1,2], different manufacturers offer compression foam supply systems with different construction schemes, concentration and types of foaming agents, technological modes -pressure, component supply rate, operating time.
In order to design a compression foam supply system with certain technological parameters, it is necessary to obtain these parameters analytically in advance, for which it is necessary to construct an appropriate mathematical model. Today, the general trend in the design of various structures, especially complex ones, built on the internal interactions of individual structural units, is the development of a mathematical model that precedes a constructive solution and is often the design basis for them. Such a mathematical model will allow analytically to obtain the optimal geometric and technological parameters of the system for supplying compression foam for a specific case of its use in extinguishing a fire.
The use of compression foam is a new way of extinguishing fire. Therefore, the number of scientific works devoted to this topic is much less in comparison with other areas of firefighting. The largest number of known studies is devoted to the use of compression foam for extinguishing liquid combustible substances.

ISSN 2664-9969
Thus, in [3], the fire extinguishing efficiency of the compression foam supply system was evaluated at various ratios of the amount of compressed air and an aqueous solution of a foaming agent for extinguishing fires of liquid combustible substances using a film-forming foam agent AFFF 3 %. It has been experimentally established that the ratio 1:7 under the same conditions is the most effective. However, the work did not develop a mathematical model of the installation.
The study [4] compared the efficiency of extinguishing fires with liquid combustible substances using class A foaming agents (wetting agents) and AFFF (film-forming agents). Compression and air-mechanical foam systems were used. The concentration of class A foaming agent in solution with water was 0.6 %, and AFFF was 1.5 %, 2 %, 3 %. Studies have shown that when extinguishing a simulated fire using a CAFS (compressed air foam system), the time is 1.7-2.4 times less, in comparison with air-mechanical foam for various concentrations of the foaming agent.
In [5], the influence of the concentration of the foaming agent on the efficiency of extinguishing model foci of fires of solid and liquid combustible substances with compression foam was studied, where the concentrations varied from 1.2 % to 12 %. Tests have shown that reducing the concentration of the foaming agent from 12 % to 2.2 % reduced the extinguishing time by more than 2 times. With a further decrease in concentration, the foam lost its fire extinguishing properties, and the extinguishing time increased by 1.2 % and amounted to 39 s. However, in these studies, the optimal concentration of the foaming agent in the solution with water was not found, and the goal was not to develop a mathematical model for the compression foam supply unit.
In [6], the effect of the type of foam bubbles of the CAFS system on the time of extinguishing a fire was studied. Gasoline was used as a source of ignition. The concentration of the foaming agent varied from 0.4 % to 1 %, the feed rate of the foaming agent solution varied from 0.35 m 3 /h to 1.7 m 3 /h, and the compressed air supply rate varied from 2.2 g/s to 2.7 g/s. Three types of foam bubbles have been identified: wet, medium and dry. At the same time, the lowest extinguishing time was observed when using dry foam. The authors did not perform any mathematical modeling of the installation.
The study [7] compared the efficiency of extinguishing fires of solid combustible substances with compression and air-mechanical low expansion foam. The results showed that it takes half the water and half the time to extinguish a simulated fire with compression foam.
The author of work [8] carried out experimental studies, as a result of which data were obtained on the values of leakage currents in a stream of compression foam for various indicators from the barrel to the target, at various values of voltage and multiplicity indicators. The results were processed using the multiple regression method and dependencies were obtained, which were used to develop software to determine the possibility of safe use of compression foam for extinguishing live electrical equipment. However, the work did not consider the issue of modeling the operation of the installation for the supply of compression foam.
In [9], the researchers determined that the pressure loss in the hose line when feeding foam to the height depends on the foam rate and pressure in the hose line. This was confirmed by a study [10], which showed that with a foam rate of 8.5, the pressure loss is 0.05 MPa for every 10 m of height with foam lifting height of up to 250 m and a pump pressure of 1.23 MPa. Thus, in comparison with air-mechanical foam, the pressure loss in the sleeve is halved. The features of the operation and parameters of the installation for generating compression foam were not considered by the authors.
A number of studies have been aimed at finding the best ways to mix components in a compression foam supply system. So, in works [7,11] the existing methods of air injection into the CAFS mixing chamber are analyzed. Among the main design solutions, the two most common methods are identified: vertical and coaxial gas-liquid mixing. A more efficient method of introducing air into the chamber was determined experimentally. The results showed that foam formed by coaxial (coaxial) mixing has more effective fire extinguishing properties than foam formed by vertically introducing air into the mixing chamber. However, the authors have not carried out mathematical modeling of the operation of the mixing chamber in the installation for generating compression foam.
As can be seen from the above analyzed sources, most of the research devoted to the compression foam supply system is focused mainly on the experimental determination of the effectiveness of the use of compression foam for extinguishing fires of various substances, when using installations for generating compression foam with different parameters. Therefore, an important and unresolved part of the problem of improving installations for generating compression foam is the development of a mathematical apparatus describing their operation.
In work [12], the modeling of the operation of individual units of the installation for generating foam was carried out: a gas supply unit, a unit for supplying a mixture of water and a foaming agent, and a foam movement unit in the sleeve. In order to ensure the functioning of the general block diagram of the compression foam generation process for the further design of installations, it is necessary to add mathematical models of two blocks, which are considered in this work. Combining these blocks with the blocks from [12] will allow to perform the general task of mathematical modeling of the compression foam generation process.
Thus, the object of research is a system for supplying compression foam. The aim of research is to construct the following blocks of a mathematical model of the compression foam generation process: a foam generator block and a communication system between the blocks.

Methods of research
The input data of the foam generator block, where the mathematical model of the passage of the gas-liquid mixture through the foam generator is implemented, are: -p 2 -pressure at the inlet of the foam generation insert, Pa; -p 1 -pressure at the outlet of the foam generation insert, Pa; The output is: -Q w -flow of the liquid phase of the gas-liquid flow (volumetric flow rate) into the pre-chamber, m 3 /s; -Q a -flow of the gas phase of the gas-liquid flow Q a (volumetric flow rate) into the pre-chamber, m 3 /s. An assumption is made, based on the physics of processes, in which the foam generation insert is considered as an axisymmetric porous body with a one-dimensional flow of a gas-liquid flow. The simplest model of a gas-liquid flow is the quasi-gene model. Then the value of the pressure drop along the length of the channel of the foam generation insert for the gas-liquid mixture according to [13]: where ψ -reduced coefficient of resistance for the adopted modes of gas content, which is specified experimentally; l(р) -coefficient of hydrodynamic resistance of a singlephase flow, in this case, the liquid phase, moving with the superficial velocity of the liquid phase; ρ w -density of the liquid phase, kg/m 3 ; d equ -equivalent channel diameter of the foam generation insert, m; ρ air (p) -density of the gas phase under pressure p, kg/m 3 ; ω′ -superficial velocity of the liquid phase, m/s; ω -superficial velocity of the gas phase, m/s. Based on the definition of the foam ratio, let's determine the volumetric flow of the gas phase: where Q a_NC -volumetric flow of the gas phase (for normal conditions), m 3 /s; Q w -volumetric flow of the liquid phase (mixture of water with a foaming agent), m 3 /s. When determining Q a (p) -the volumetric flow rate of air, which is under pressure p, it is important to note that during the passage of the flow through this block, very active mixing and contacts of both phases take place, forming a gas-liquid mixture. Due to the more significant mass flow rate of water (at normal multiplicity values), heat exchange between the individual phases has time to take place, therefore this process is considered an isothermal thermodynamic process, for which, according to the Boyle-Mariotte law, the volume flow rate is calculated by the formula: phase under pressure p, m 3 /s; p NC -normal atmospheric pressure, Pa; p -pressure under which the foam is at the current time, Pa. The volumetric flow of a gas-liquid mixture under pressure p is determined by the formula: To calculate the mass flow rate of gas using formula (2), let's use the formula: Let's find the formula for the density of the gas phase, which is under pressure, using formulas (2) Since the foam generation insert has a porous structure, to describe the physical processes taking place in the porous structure, according to the method [14], it is necessary to find: -fictitious gas-liquid flow rate; -the actual speed of the gas-liquid flow; -porosity of the foam generation insert; -the total surface area of the elements of the foam generation insert; -the specific surface of the elements of the foam generation insert; Is the equivalent diameter of the channel of the foam generation insert.
The values of the fictitious superficial velocities of the liquid ω′ im and gas phases ω im , referred to the entire cross-sectional area of the foam generation one, are found by the formula [13]: where Q a (p) -volumetric flow rate of the gas phase of the gas-liquid flow, which is under pressure p and is determined by formula (3), m 3 /s; Q w -volumetric flow rate of the liquid phase of the gas-liquid flow, m 3 /s; D -inner diameter of the foam generator cavity, m.
Then, according to [13], let's obtain the actual velocities of the liquid ω′ and gas phase ω″ of the gas-liquid flow: The porosity ε is determined by the formula: where m -the mass of the elements that make up the porous body of the foam generation insert, kg; V G -internal volume of the foam generator cavity, m 3 ; ρ Fe = 7.8 -density of the material of the elements that make up the porous body of the foam generation insert, kg m 3 . The volume of these elements is calculated by the formula: Then let's obtain their total length by the formula: The volume of the foam generator cavity, in which the elements of the foam generation insert are placed, which in this case has the shape of a cylinder, is obtained by the formula: Then the total surface area of the elements of the foam generation insert with the substitution of values according to the formulas: V wire -(10), L s -(11), V G -(12) is determined by the formula: The specific surface area of the elements of the foam generation insert is determined by the formula: The equivalent channel diameter of the foam generation insert is determined by the formula [14]: To calculate the coefficient of hydraulic resistance l(p) included in formula (1) according to the method [13], it is necessary to find the flow rate of the two-phase flow: Then, the coefficient of hydraulic resistance l(p) is calculated as the coefficient of hydrodynamic resistance of a single-phase flow, in this case, a liquid phase. To do this, it is necessary to find the Reynolds number for the liquid phase as a function of pressure: where μ w -the dynamic viscosity of the foaming agent with water, Pa⋅s. Substituting the numerical values of the variables and the values of the function for typical modes of foam generation, let's obtain that the number Re<4000. This flow regime, according to [15], corresponds to the Hagen-Poiseuille law. Then the value of the hydrodynamic resistance l(p) is calculated by the formula: To calculate the volumetric gas content of a gas-liquid flow, considering it as a function of pressure, let's use the method [13] and, making substitutions Q a (p) -according to (4), Q f (p) -according to (3), Q a_NC -according to (2), making algebraic transformations, let's obtain: Substituting into formula (1) the results of calculating the quantities: l(p) -according to (18) and ω″ and ω′ -according to (8), d equ -according to (15). Making algebraic transformations, let's obtain a differential equation for the pressure gradient along the axis of the foam generator: Pa m (20) Solving this equation by the method of separation of variables, let's obtain the integral of the volumetric flow rate of the liquid phase depending on the input p 2 and output p 1 pressures: After calculating this integral, making algebraic simplifications and to reduce the bulkiness, introducing auxiliary variables a, b, let's obtain a set of formulas for calculating the volumetric flow rate of the liquid phase: Using equations (2), using the same auxiliary variables a, b, let's obtain the formula for the volumetric flow rate of the gas phase: An algorithm is obtained for calculating the volumetric flow rates of the gas and liquid phases of a gas-liquid mixture, based on the input values and the adopted parameters of the unit that simulates the operation of the foam generator: To carry out calculations using the developed mathematical model, taking into account transient processes and error control, it is necessary to set the input parameters. They are set arbitrarily and, to obtain the desired output parameters of the installation, are selected by iteration.

Research results and discussion
The main blocks of the block diagram of the mathematical model of the flows of the installation for the generation of compression foam (Fig. 1) are: -two blocks switching in parallel in the general scheme, these are the «Liquid» and «Air» blocks; -three blocks that commute in series in the general circuit, these are the «Generator» and «Pipe», «Pistol» blocks.
If there is no difficulty in simulating two blocks with parallel communication, then to ensure the simulation of blocks connected in series, it is necessary to develop a communication system between them. The task of this system is to ensure, during the simulation and as a result, the equalization of the values of the fluxes of both blocks, thereby ensuring the law of conservation of mass throughout the entire path of the installation. The principle of building such a system (Fig. 2) uses auxiliary elementary blocks from the «Simulink Library», namely: «Math Operations», «Gain», «Integrator», «Sum».
The final calculation of the foam ratio in the program is carried out according to formula (27), as the ratio of the flow of a mixture of water with a foaming agent G w to the flow of a gas-liquid mixture G jet .
The created mathematical model allows to calculate these values for a certain time, therefore this formula is obtained from the well-known equation for the foam ratio: due to equations (29) and (30): where V f -foam volume, l; V w -water volume, l; V Cfoaming agent volume, l; G jet -mixture consumption, l/s (air+foaming agent solution); G w -liquid flow rate, l/s, (water+foaming agent solution).
Functioning of the block diagram of the mathematical model of the compression foam generation process in the system. The block diagram of the mathematical model of the compression foam generation process is shown in Fig. 1.

Conclusions
The paper shows that the most important result of the development of a mathematical model for the generation of compression foam is the ability to perform a technical calculation of its parameters, taking into account the purpose of the installations.
New is the development of a mathematical model of a two-phase flow: a liquid phase consisting of a mixture of water with a foaming agent and a gas phase -air in the foam generator's path as part of a block diagram of an installation for the case of generation of compression foam. And also the development of a circuit and a communication algorithm for serially connected blocks of a common block diagram, which provides the calculated output stationary operating mode of the installation.
The mathematical model developed in this work allows solving the following applied and scientific problems: -to carry out calculations of the input parameters of the installation, which will provide the required output parameters: flow power, frequency ratio, continuous generation time, foam stability, determined by the purpose and features of the installation in conditions of extinguishing various types of fires; -to investigate the influence of the parameters of the foam generation insert of the installation on the expansion of the compression foam.