Several improvements to the mathematical model of the indicator process taking place at a diesel engine cylinder are proposed. The thermodynamic behavior of working medium is described by the equation of state, valid for real gases. Mathematical dependencies between thermal parameters (P, T, v) and caloric parameters (u, h, cv, cp) have been obtained. An improved mathematical model, based on the first law of thermodynamics, has been developed, taking into account working medium imperfections. The numerical solution of the simultaneous differential equations is made by a method of Runge-Kutta type. The computing procedure is iterative. Calculations in respect to the caloric parameters (u, h, cv and cp) for various gases under pressure up to 25 MPa and temperature up to 3000°C have been carried out. The results show, that there are significant differences between the values, calculated by equations for ideal gases, and the proposed equations for real gases under high pressure and temperature. Actual applied problems for two-stroke turbocharged engines Sulzer-RLB66 and 8DKRN 74/160 have been solved. The comparison between the experimental data and numerical results show very good agreement. The numerical experiments show that if the pressure is above 8–9 MPa, the working medium imperfections must be taken into consideration.