Combustion control and optimization is of great importance to meet future emission standards in diesel engines: increase in break mean effective pressure at high loads and extension of the operating range of advanced combustion modes seem to be the most promising solutions to reduce fuel consumption and pollutant emissions at the same time. Within this context, detailed computational fluid dynamics tools are required to predict the different involved phenomena such as fuel–air mixing, unsteady diffusion combustion and formation of noxious species. Detailed kinetics, consistent spray models and high quality grids are necessary to perform predictive simulations which can be used either for design or diagnostic purposes. In this work, the authors present a comprehensive approach which was developed using an open-source computational fluid dynamics code. To minimize the pre-processing time and preserve results’ accuracy, algorithms for automatic mesh generation of spray-oriented grids were developed and successfully applied to different combustion chamber geometries. The Lagrangian approach was used to describe the spray evolution while the combustion process is modeled employing detailed chemistry and, eventually, considering turbulence–chemistry interaction. The proposed computational fluid dynamics methodology was first assessed considering inert and reacting experiments in a constant-volume vessel, where operating conditions typical of heavy-duty diesel engines were reproduced. Afterward, engine simulations were performed considering two different load points and two piston bowl geometries, respectively. Experimental validation was carried out by comparing computed and experimental data of in-cylinder pressure, heat release rate and pollutant emissions (NOx, CO and soot).