The energy and entropy balance equations in an open control volume are treated analytically by a method that can be applied to any level of modeling (zero-dimensional, quasi-dimensional, and multi-dimensional) of any internal combustion engine (homogeneous-charge, stratified-charge, direct-injection, Diesel, adiabatic, …). The method involves no major assumptions and is, therefore, compatible with any detailed model for physical effects such as liquid fuel atomization and vaporization, heat transfer within the combustion chamber and through its walls, mass transfer (convective and diffusive) within the combustion chamber, with crevice regions, with prechambers, and through the inlet and exhaust ports, temperature, composition, and pressure nonuniformities, and so on. The result is in the form of differential equations for the instantaneous mass fraction of burnt gas mixture and for the entropy generated by irreversibility within the chosen control volume, in terms of the pressure and volume histories and appropriately defined mean variables. The choice of control volume may range from the entire combustion chamber (zero-dimensional approach) to a single mesh point in a numerical solution scheme of the differential local balance equations of mass, chemical species, energy and entropy, coupled with some closure scheme to model diffusion, viscosity, heat conduction and chemical kinetics (multi-dimensional approach). Irrespective of the level of detail of the chosen modeling approach, the entropy balance equation provides an interesting and useful, though very seldom exploited, independent relation to check the consistency of any set of additional modeling assumptions or closure scheme with the second law requirement of nonnegativity of the local and global rate of entropy production by irreversibility.