In this paper, a thermodynamic simulation model for a four-stroke medium speed, diesel engine is described. The model deals with the fuel injection system, combustion and gas exchange processes. Special emphasis is laid on the latter two processes. In the first phase, a single zone combustion model is discussed. Subsequently, an improved two zone combustion model, which needs lesser computational time is presented. Both these models have satisfactorily predicted the performance of a single cylinder and locomotive engines and a comparison has been made between the results obtained from them. The Leap-Frog scheme has been applied to solve the unsteady equations during the gas exchange process and the computed data from this scheme are found to agree well with the measured data.