The present work introduces an innovative mechanistically based 0D spray model which is coupled to a combustion model on the basis of an advanced mixture controlled combustion approach. The model calculates the rate of heat release based on the injection rate profile and the in-cylinder state. The air/fuel distribution in the spray is predicted based on momentum conservation by applying first principles. On the basis of the 2-zone cylinder framework, NOx emissions are calculated by the Zeldovich mechanism. The combustion and emission models are calibrated and validated with a series of dedicated test bed data specifically revealing its capability of describing the impact of variations of EGR, injection timing, and injection pressure. A model based optimization is carried out, aiming at an optimum trade-off between fuel consumption and engine-out emissions. The findings serve to estimate an economic optimum point in the NOx/BSFC trade-off. The real-time capability of the model is proven by running a vehicle drivecycle simulation coupled to an aftertreatment system on HiL hardware.