The article reflects the issue of mathematical modeling of gas exchange processes. The features of modeling the processes of gas exchange based on the equations of gas dynamics are shown. The theoretical significance of the work lies in the methodology for constructing a computational model and individual results on modeling the process of gas exchange of an internal combustion engine. The mathematical model of the working process in the engine is created by the necessary conditions for calculating the entire gas exchange. The use of a computer allows a more accurate and complete description of all the main features. The filling of the dynamic phenomena in the intake system has the main purpose of optimizing the parameters of the engine design. The efficiency of work in the engine is determined by the perfection of the processes occurring during intake, mixture formation and combustion of a fresh charge, as well as by the perfection of the organization of exhaust gases. A sufficiently accurate assessment of the qualitative and quantitative relationships of design parameters with thermogasdynamic phenomena in the gas-air duct and gas exchange rates make it possible to fundamentally solve the problem of calculating the design parameters close to the optimal design parameters of the intake system and gas distribution of automotive engines, engines with injection and, to a certain extent, carburetor engines.