Differential equations for calculating gas exchange in an internal combustion engine

. Considering the unsteadiness of the flow in the valve channels and windows of the internal combustion engine in combination with limiting the maximum flow rate allows you to take into account the flow characteristics in the exhaust systems of forced engines. Thus, the calculation according to the above method allows us to obtain by calculation, observed in experiments, the reverse pressure drop in the short period of the end of the free release, the validity of using a modified 0-dimensional model of gas exchange, even for engines with long manifolds, where the Strophe number is less than 8.


Introduction
The mathematical model of gas exchange has high requirements for accuracy and speed since in the thermodynamic models of the internal combustion engine; it accounts for most of the computer's counting time. Calculation of the gas exchange process is extremely important for the correct calculation nutritional settings: it is necessary to correctly determine the mass of the working fluid, the pressure, composition and temperature at the moment of closing of the intake of organs for subsequent calculation of compression, combustion and expansion, and also to assess the performance of the pump stroke, the quality of the cleaning and filling of the cylinder. The simplest method of calculating gas exchange is quasi-static, considering the inlet and outlet pipelines as open thermodynamic systems. The calculation scheme of this approach is shown in figure 1. Within the framework of these models, the engine collectors are divided into onedimensional cells, for each of which a system of equations of conservation of mass, energy, momentum and the equation of state is solved. However, this approach requires a lot of time counting computers and individual calculation of the engine cylinders' processes. Given that the current relevance of research is mainly focused on the processes of combustion and the formation of harmful substances, the requirements for the computational model of gas exchange can be formulated as providing a fast and accurate calculation of the boundary conditions for the calculation of combustion, as well as an accurate calculation of pump losses.

Methods
Suppose we assume that all the engine cylinders work identically. In that case, we can abandon the one-dimensional calculation and use a quasi-static model of gas exchange, thereby radically (by two orders of magnitude) reducing the computer counting time. The programs are written in Fortran. General basic properties of programs: -WINDOWS applications; -advanced user interface; -a high degree of integration of the thermodynamic calculation of the internal combustion engine with other applications, such as the calculation of bearings, cooling systems, dynamics of the valve mechanism, etc.; -the ability to use user routines designed as a DLL for calculating various processes (including the heat release rate); -the ability to work together with programs for three-dimensional modeling of gas flow; -the ability to work together with SIMULINK and other packages for modeling (designing) control systems not only for the engine but also for the entire vehicle; -the ability to match the piston internal combustion engine with the characteristics of turbines and compressors imported from text files in the SAE standard; -the ability to calculate unsteady modes of operation of the internal combustion engine; -the ability to calculate the unevenness of filling on the cylinders of the internal combustion engine. Dependences of the average isochoric heat capacities [J/kg/K]: air C v_air , of the combustion products of gasoline C v_ogb , stoichiometric exhaust gases in diesel C v_ogd from the temperature t and the coefficient of excess air during combustion α [17] As a result of applying the assumption of partial use of the exhaust manifold volume, limiting the maximum value of the stationary flow rate and the Orlin method for calculating the non-stationary flow in the valve channels and windows of a two-stroke internal combustion engines, it is possible to achieve high accuracy in calculating air flow and pump losses for almost all types of engines. Below are examples of calculating gas exchange compared to experimental data for engines with a nominal speed from 120 min-1 to 4500 min-1; with a cylinder diameter from 82 mm to 760 mm.
where: Q w is heat transferred to the walls, I* and G are enthalpy and mass received from the compressor or left to the turbine are calculated by the methods described in [5].

Results and Discussion
When calculating the enthalpy of the gas flowing through the channel, the heat exchange with the channel walls is taken into account. In the exhaust manifold, the heat transfer coefficients for the pipe and pipes are determined by the formulas obtained at the Bauman Moscow State Technical University by L.V. Grekhov and V. I. Ivin: for the pipes -Nu = 0.2951 Re 0.67 ; for the collector -Nu = 0.188 Re 0.67 ; both formulas are obtained for the gas flow parameters averaged over the entire working cycle. The temperature of the exhaust manifold wall is determined by solving the problem of thermal conductivity of a multilayer wall, where the design features of the exhaust manifold are taken into account [5]. When calculating the parameters in the collectors, the assumption is used that all the cylinders work identically, so only one of them (the average) can be calculated, and the work of the others is taken into account by the phase shift of the mass and energy flows following the order of operation, which in this case must be assumed to be uniform. The concept of the average cylinder, smoothing out the nuances, allows you to determine the engine's total gas exchange rates characteristic as a whole, significantly reducing machine time. Factors that cause a decrease in the accuracy of the quasi-static method, their evaluation criteria, and methods for compensating for the negative effect.  The assumptions used to introduce errors in the calculation results and cause limitations on the scope of the quasi-static method. The factors that cause a decrease in the accuracy of the quasi-static method and the criteria for their evaluation and methods for compensating for their negative effect on the calculation results are presented in table 1. To determine the limits of applicability of the quasi-static calculation method, criterion dependencies are developed [4,18,19].
The data for table 1 is selected in such a way as to cover a wide range of engines of different designs, dimensions and purposes. The analysis of these data shows that the criterion of relative area: / > 0.9 for almost all manufactured engines is within acceptable limits and does not limit the possibility of using a quasi-static calculation method for them. The Strouhal test is another matter; for most engines, it is fulfilled, but for small two-stroke engines with a short exhaust process and large engines with very long pipelines Sh < 8. This indicates that the assumption that the parameters in the reservoir are independent of the coordinates introduces noticeable errors in the calculation. The calculated fluctuations of pressure and other parameters in the reservoir are obtained with an underestimated amplitude. The main ones are a restriction on the length of the exhaust manifold, which is controlled by the criterion of: ℎ = / is criterion for the speed of sound in the reservoir, m/s; is length release from one cylinder; is the length of the manifold. m; and the criterion of relative square: ≥ 0.9 (2) where: is the cross-sectional area of the exhaust manifold, is the maximum effective cross-sectional area of the exhaust bodies. The values of the Strouhal test and the relative area test calculated for different engines are shown in table 2.
The practice of modeling the gas exchange processes of high-forced four-stroke engines shows that the use of stationary flow equations does not allow us to describe the effect of reducing the pressure in the cylinder below the level of instantaneous pressure in the exhaust manifold during the end of the free release, which is observed in experiments [8].
In addition, an intense increase in flow exhaust parts (particularly relevant for two-stroke internal combustion engine) as well as the possible high pressure in the cylinder when the exhaust valves open or Windows (current at high boost), they require taking into account the non-stationary flow in the channels. A simple way to account for the effect of accelerated gas masses in the process of free intake is to use a non-stationary solution of the equation of motion proposed by A. S. Orlin [1], which allows us to describe this effect and get a much more plausible picture of the change in gas parameters in the cylinder and collectors of the internal combustion engine during gas exchange, The gas velocity in the channel W L at the end of the calculated time interval is calculated using the equations The reduced velocity at the end of the channel is defined as: = / , critical expiration rate acre = √2 ( + 1) . Because the exhaust channel is not specially profiled (like the Laval nozzle), there are sudden expansions, turns, and a sharp increase in losses in the exhaust channel due to the appearance of local zones of sound flow begins with the average values of : about = (0.75 . . . 0.85). Supersonic flows in the elements of the gas-air path of the internal combustion engine are generally impossible even with significant supercritical pressure differences. Therefore, when > pr, = is assumed. The average expiration rate at a small calculation step can be taken as: Considering the unsteadiness of the flow in the valve channels and windows of the internal combustion engine in combination with limiting the maximum flow rate allows you to take into account the flow characteristics in the exhaust systems of forced engines. Thus, the calculation according to the above method allows us to obtain by calculation, observed in experiments, the reverse pressure drop in the short period of the end of the free release. The adiabatic index k is determined by dividing the current derivatives of the enthalpy and the internal energy by temperature; the average isobaric heat capacity is used to calculate the enthalpy of the flowing gas masses: = ; then the calculated ratio for C p will take the following form: ( , ) = [ ( , ) + 0 ( )] / + ( ) nature. The derivatives are calculated numerically according to the table.2.
The conclusion about the validity of using the modified 0-dimensional gas exchange model even for engines with long manifolds, where the Strouhal number is less than 8. Using the difference form of the conservation laws instead of the differential one allows for a large computational step, and without using iterations, to obtain significantly higher accuracy of the results, or the accuracy of solving a system of differential equations, as opposed to integral ones, significantly decreases with increasing step. A comparison of the performance of various computational methods on the test problem of calculating the process of adiabatic gas compression in a reciprocating compressor showed that the method of difference equations exceeds the fastest of the traditional methods based on solving a system of differential equations by more than 5 times with the same accuracy ( Figure 2). 6, % -is the relative error in the numerical determination of the pressure at the end of the air compression process in a reciprocating compressor. The calculated step is given in the degrees of rotation of the compressor crankshaft. The use of this method of calculation of parameters of gas in an open thermodynamic system to determine the parameters of the gas in the cylinder two stroke piston internal combustion engine (ice), in the pre-chamber gas engine, intake and exhaust manifolds of the engine, as well as in the crank chamber twostroke internal combustion engine can significantly reduce the cost of the estimated time frame and make the solution of optimization problems faster.

Conclusion
Using the difference form of writing the conservation laws instead of the differential one allows for a large computational step, and without using iterations, to obtain significantly higher accuracy of the results, or the accuracy of solving a system of differential equations, as opposed to integral ones, significantly decreases with increasing step. The use of this method of calculation of parameters of gas in an open thermodynamic system to determine the parameters of the gas in the cylinder two stroke piston internal combustion engine, the pre-chamber gas engine, intake and exhaust manifolds of the engine, as well as in the crank chamber two-stroke internal combustion engine can significantly reduce the cost of the estimated time frame and make the solution of optimization problems faster.