A two-dimensional transient Heat Conduction in Components code (HCC) was successfully set up and extensively used to calculate the temperature field existing in real engine combustion chambers. The Saul'yev method, an explicit, unconditionally stable finite difference method, was used in the code. Consideration of the gasket between the cylinder wall and head, and the air gap between the piston and liner were included in the code. The realistic piston bowl shape was modeled with a grid transformation and piston movement was considered. The HCC code was used to calculate the wall temperature of an Isuzu ceramic engine and a Caterpillar heavy-duty diesel engine. The code was combined with the KIVA-II code in an iterative loop, in which the KIVA-II code provided the instantaneous local heat flux on the combustion chamber surfaces, and the HCC code computed the time-averaged wall temperature distribution on the surfaces. After iterations, more accurate combustion chamber surface temperatures were obtained. For the Isuzu engine, the predicted temperature swing at a point on the cylinder head was found to be consistent with the available measured temperature data for both the motored and fired cases. For the Caterpillar engine, the spatially varying combustion chamber wall temperatures were found to influence both engine total heat transfer and engine-out NOx prediction significantly.