Petrol engine workflow model for researching unconventional engines

The work lies with the study of petrol engines of an unconventional design with improved fuel and economic characteristics developed at the Automobile and Road Institute of Donetsk National Technical University for several decades. It describes the obtained mathematical model of the working process of a petrol piston engine to study the operation of engines. The authors used analytical methods of differential calculus to obtain a mathematical model. They solved the obtained equations using numerical methods and Simulink algorithms. Implementation required the development of a model that has sufficient speed to complete the tasks. The paper presents some modelling results, which makes it possible to judge the correctness of the obtained model. The implemented approach makes it possible to use this model in multi-domain modelling of the engine as a whole. The use of such a model opens up broad prospects for optimizing engine parameters, both its mechanical elements and the parameters of the working process. In addition, it becomes possible to develop and debug a control system for a petrol internal combustion engine using simulation in a Simulink environment.


Introduction
The current state of the energy complex of the planet as a whole and of each country individually faced with the finiteness of energy resources. Of course, at present, oil prices have fallen significantly due to the global economic crisis associated with various reasons, including the presence and influence of the coronavirus COVID-19, but this is a temporary phenomenon. It was high fuel prices that led to the development of alternative fuel energy for wheeled vehicles. If megacities have the conditions for the presence of many electric vehicles, then in small towns and agricultural areas, the autonomy of vehicles will play a decisive role for a long time in choosing the type of engine for a car, tractor and other agricultural equipment. Moreover, oil reserves have such a structure that numerous light varieties, most suitable for the manufacture of petrol, predominate in the world. This suggests that petrol engines will play a significant role in the near future.
Given the above, we can argue that work on creating promising petrol engines with improved fuel efficiency and environmental performance will be relevant for various sectors of the state's economy in the unseeable future [1][2][3]. Over the past decades, the Department of Automobile Transport of the Automobile and Road Institute of Donetsk National Technical University has been working on the  It proposed promising designs of petrol engines with adjustable  compression ratio, cylinder shutdown, variable valve timing at partial load conditions and some others. In such a situation, classic approaches to calculating the engine's duty cycle cease to satisfy the needs of researchers. Therefore, the task of the study was to obtain such a mathematical and simulation model that would meet the challenges arising from research.

Problem statement
Calculation of the parameters of the working process in the study of non-traditional petrol engines provides, on the one hand, the final integrated indicator and effective performance indicators such as specific fuel consumption, power, filling, and on the other hand, the determination of the pressure in the engine cylinder to calculate the dynamics of individual mechanisms. That is, the purpose of the study is not to consider only individual thermodynamic processes. Although it is important to be able to model these processes and determine the influence of several factors on them, for example, the effect on the filling process of changing valve timing. That is, the model should be flexible enough and include the influence of various factors on the workflow.
In the study of new devices such as a mechanism for changing the compression ratio or a cylinder shutdown mechanism, it becomes necessary to evaluate their performance under the conditions of a working process in the engine cylinder [4]. This may also be needed when creating an engine management system.
Simulation modelling allows us to solve such problems in the best way [4][5][6]. In this case, the mathematical model of the workflow should be suitable for simulation. Currently, many developed models and software systems can solve various problems associated with the simulation of the working process of a petrol engine. As a rule, such software systems are difficult to access for our academic science. Firstly, they have a rather high cost, and secondly, they are not economical in terms of computing resources. Modelling the workflow of a petrol engine using computational fluid dynamics methods will take long enough to get several cycles. Checking the engine at different design modes and tracking the operation of certain mechanisms may not be possible due to the stretching of the process in time. That is, the models should be fairly general without too much detail to save time.
Very often, when calculating the duty cycle of an engine, there are the independent calculation of work processes as separate units, interconnected by initial conditions. Moreover, in the classic version of the calculation of the inlet parameters requires knowing the number of residual gases, their temperature, etc. That is, first, it should be set by certain values and control them in the calculation process. During the simulation modelling, it is not acceptable to perform a preliminary calculation and return to the initial conditions if the check is not completed. The equations of the working process should include a set of equations of the model that was universal for all working processes of the engine cycle and allowed performing sequential calculations based on the initial conditions.
In our opinion, mathematical models constructed based on the classical approach using the equations of thermodynamics and heat and mass transfer in the differential form [5-8] will satisfy the above conditions.

Materials and methods
We will consider the approaches used to obtain the mathematical model and the results obtained.

Thermodynamic processes in the engine cylinder
When calculating the processes in the engine cylinder, researchers usually assume that the state of the working fluid in the cylinder is completely balanced. The working fluid in all thermodynamic calculations of engine processes is the ideal gas. We made the same assumptions since they do not, as a rule, lead to significant deviations from the actual results in mathematical modelling of thermodynamic processes.
We describe the processes of compression, combustion (in an engine with external mixture formation) and expansion, neglecting gas leaks through the gaps between the piston and cylinder, by the where U is the specific internal energy; χ is a coefficient indicating the proportion of heat generation; Hu is the net calorific value of fuel; gF.cycle is the mass of fuel supplied to the cylinder per cycle; x is the fraction of burned fuel; Qw is the amount of heat involved in the heat exchange between the gas mixture and the cylinder walls; p is the pressure in the cylinder; V is the current volume of gas in the cylinder; G is the mass of gas in the cylinder; R is the characteristic gas constant of the gas mixture; T is the absolute temperature of the gas mixture.
In the expanded form, these equations for engines with external mixture formation can be written in the form: where G1 is the mass of fuel entering the cylinder; γ is the coefficient of residual gases; μ0 is the coefficient of molecular change in the fresh charge.
The relative heat release characteristic is often described by the semi-empirical equation of I. I. Vibe [9]: is the mass fraction of conventionally burnt fuel.

The equations of the mathematical model of gas exchange processes
where i * in is the enthalpy of the inhibited mixture entering the cylinder through the intake valve; i*ex is the enthalpy of the inhibited mixture flowing out of the cylinder through the exhaust valve; dGiv is the elementary amount of fresh charge entering the cylinder through the intake valve; dGev is the elementary amount of exhaust gas leaving the cylinder through the exhaust valve.
We determine the gas flow rate in the inlet and outlet channels (or windows) according to the gas parameters in the minimum passage section, taking the gas flow in the valves (windows) as onedimensional and quasistationary. We obtain the gas flow equation in one of the Saint-Venant equation.
It is important that in a four-stroke engine, in the process of exhausting and starting the intake, there is a phase of valve overlap similar to the purge process in two-stroke engines. The first stage of the purge process has a hypothesis of layer-by-layer mixing, which in general also corresponds to the four-stroke version due to the short gas exchange time in the process of shutting off the valves. Actually, the question is that when opening valves, part of the mixture enters the inlet and outlet channels. The mixture entering the inlet channel during the backflow at the early opening of the valve is then returned to the cylinder. As for the exhaust valve, we assume the outflow through the exhaust valve involves the mixture completely mixed in the cylinder. This gives some margin of error, but in our opinion it is insignificant.

Generalized engine duty cycle model
To generalize the various processes occurring in the cylinder, and to create universal equations that work at all stages, we used the equation of the first law of thermodynamics for an open system in differential form. In practice, the first equation in the system (4) should be replaced by Such a model requires further detailing, however, the limited volume of publication does not allow us to cite all the calculations and considerations. We pay attention only to some aspects and show the final result.

Detailing a generalized mathematical model
To refine the generalized model, we obtained the differential of internal energy, considered the amount of heat released as a result of fuel combustion by I. I. Vibe equations. This allowed us to determine the temperature of the gases in the cylinder.
We determined the heat flux through the cylinder walls based on the well-known Newton-Richman equation [7]. We determined the average value of the heat transfer coefficient using the Woschni formula [10,11], considering the pressure and temperature in the cylinder, as well as the cylinder diameter and piston speed. This may be one of the weak links in the mathematical model and will require adjustment, since practically experimental data, as a rule, are suitable only for the objects on which they are taken.
Nevertheless, this allows us to estimate the heat flux and, with appropriate adjustments, achieve great convergence with the experimental data.
In this work, one of the original approaches was the approach to determining the composition of gases in the engine cylinder at any time. From the consideration of the composition of the gases entering the cylinder and the composition of the gases contained in it, the appearance of a component as a result of the combustion process, we obtain universal differential equations describing the mass fraction of the ith component in the cylinder gi cycle at a given time where Mi cm μi cm is the mass of the formed components in the combustion process in one cycle.

General view of the mathematical model and initial conditions
Combining the previously obtained results into a single system of equations, we obtain a detailed mathematical model: ( ) The correct solution of the system of differential equations in many respects depends on the methods of solution and on the initial conditions. Initial conditions may vary within a wide range. However, the most accurate result requires conditions for their unambiguous certainty.
When starting the engine, the starter spins the crankshaft to the minimum speed. Fundamentally, this speed can be any within the operating range. Moreover, fuel may not be present in the cylinder in the first cycle and the ignition process will not occur. The situation will even out and the mixture ignites after a certain number of revolutions. The practically described mathematical model allows starting the engine from any speed. Therefore, we can take the minimum frequency of idling as the initial conditions. The throttle position can be any. We should determine the parameters of the gas mixture in the intake pipeline depending on the position of the throttle and the speed.
We will consider the starting position of the crankshaft to be the position where the piston is at the top dead centre at the beginning of the design cycle. In this case, when starting the engine in case of valve overlap, the pressure in the inlet and outlet channels, as well as in the cylinder itself, is equal to atmospheric. This statement is true since the inlet and outlet channels are connected to the atmosphere, and when the engine is idle, there is no gas movement.
Since the task of modelling is not to study the start-up process, for simplicity, at the initial time, we can accept the parameters of the gas mixture in the inlet and outlet pipelines close to the specified operating mode.

Discussion of results
We implemented the resulting mathematical model in the Matlab Simulink environment. This allowed us to debug the simulation process, select methods for solving differential equations and verify the adequacy of the obtained solutions.
Since the initial conditions, as mentioned above, do not correspond to the specified operating mode, the stabilization of the modelling process takes place over several cycles, usually around 5-6 cycles, after which we can introduce additional conditions for the model to work and analyse the results. As an example, we will cite the changes in temperature and pressure in the engine cylinder (Fig. 1) calculated during the simulation and the results of taking a series of indicator diagrams with a change in the ignition timing (Fig. 2).

Conclusion
The objectives of the study were achieved. We obtained mathematical and simulation models of a petrol engine workflow in a Simulink environment. This allows us to investigate the operation of engines of new unconventional structures using simulation. The implemented approach makes it possible to use this model in multi-domain modelling of the engine as a whole. The use of such a model opens up broad prospects for optimizing engine parameters, both its mechanical elements and the parameters of the working process. In addition, it becomes possible to develop and debug a control system for a petrol internal combustion engine using simulation in a Simulink environment.