In this study, we developed a computational fluid dynamics (CFD) model of a turbocharged diesel engine (1CT107) powered by diesel fuel. The engine was part of the power generating set in the portable version. In the simulation tests, we analyzed the impact of the ignition timing on the thermodynamic parameters and emissions of toxic components. We verified the model of the test engine and it was then used to optimize the thermal cycle for the test engine. We found that the engine model had acceptable accuracy and it was suitable for emissions modeling. Under the full load, the NO emissions were 2.2 gikWh, which satisfied the EURO IV criteria. As the load increased, the soot emissions also increased. This model also confirmed that the dynamics of soot formation were the opposite of NO formation. In summary, CFD modeling provides a powerful tool for optimizing the internal combustion engine in terms of both the thermodynamic parameters and emissions. The model of the test engine was produced using AVL FIRE. (C) 2016 Elsevier Inc. All rights reserved.