A three-dimensional numerical model was developed to investigate the pilot injection process in homogeneous charge compression ignition engines using the Open-FOAM computational fluid dynamics package. In particular, the percentage of trapped fuel in the crevice before the main injection was studied. The model was validated by comparing the numerically determined in-cylinder pressures with experimental data available in the literature. The amount of trapped fuel in the crevice was determined for three pilot injections at crank angles of 180°, 120° and 80° before top dead centre and for various pilot injection percentages with different swirl ratios. The results showed that the percentage and the timing of a pilot injection directly and proportionally affect the contributions due to the fuel trapped in the crevice. It was also found that the swirl ratio is an important parameter in accumulation of the fuel in the crevice.