Simulation of diesel engine performance