## 5 Calibration of Engine Model
### Engine Model Calibration  
The CI engine combustion process is modeled with this approach: the cylinder volume is considered as a 0D system, in which the different chemical species are accounted for by a mixture of ideal gases. The process takes place with closed valves and is governed by the following energy equation (1 st law of thermodynamics) [22]:  
\[\frac{\mathrm{V}}{\mathrm{\overline{\gamma}-1}}\cdot\frac{\mathrm{d}\mathrm{P}} {\mathrm{d}\mathrm{\Theta}}+\frac{\mathrm{\overline{\gamma}}}{\mathrm{\overline {\gamma}-1}}\cdot\mathrm{P}\cdot\frac{\mathrm{d}\mathrm{V}}{\mathrm{d}\mathrm{ \Theta}}\ =\ \mathrm{m}_{\mathrm{F}}\cdot\mathrm{LHV}\cdot\frac{\mathrm{d}\mathrm{x}_{\mathrm{ b}}}{\mathrm{d}\mathrm{\Theta}}\cdot\mathrm{\eta}_{\mathrm{c}}-\frac{\mathrm{ \dot{Q}}_{\mathrm{w}}}{\mathrm{\omega}} \tag{4}\]  
where V is the instantaneous in-cylinder volume, P the in-cylinder pressure (known from the experimental pressure traces), \(\mathrm{\gamma}\) the average adiabatic constant of the equivalent gas mixture, \(\mathrm{\Theta}\) the crank angle, \(\mathrm{m}_{\mathrm{F}}\) the injected fuel mass (per cylinder per cycle), LHV the lower heating value of the fuel, \(\mathrm{x}_{\mathrm{b}}\) the \"fuel burnt mass fraction\" (i.e., the mass fraction of fuel that has already taken part to the combustion, at a specific crank angle position), \(\mathrm{\eta}_{\mathrm{c}}\) the efficiency of the combustion process, \(\mathrm{\dot{Q}}_{\mathrm{w}}\) the heat loss through the cylinder walls and \(\mathrm{\omega}\) the crankshaft angular speed. In the energy balance, the unknown to be computed is \(\mathrm{x}_{\mathrm{b}}\). In Equation (4), the left side member is the so-called \"actual heat release rate\" (AHRR), an energy contribution due to pressure and volume variation representing the energy effectively used to produce work. This term equals the difference between the \"heat release rate\" (HRR) by fuel combustion and the heat losses through the cylinder walls. While the quantities AHRR and HRR have a known expression, the heat losses typically do not. The simple application of predictive formulas such as the Woschni model [23; 24] ([6; 7]) does not guarantee a reliable calculation of this term, since those models need to be recalibrated for each test case (as documented in [25; 26]). Hence, by integrating Equation (4) during the combustion phase, it is possible to write that:  
\[\mathrm{Q}_{\mathrm{w,tot}}\ =\ \int_{\mathrm{\Theta_{i}}}^{\mathrm{\Theta_{f}}} \frac{\mathrm{\dot{Q}}_{\mathrm{w}}}{\mathrm{\omega}}\mathrm{d}\mathrm{\Theta} \ =\ \mathrm{m}_{\mathrm{F}}\cdot\mathrm{LHV}\ -\ \int_{\mathrm{\Theta_{i}}}^{\mathrm{\Theta_{f}}} \left(\frac{\mathrm{V}}{\mathrm{\overline{\gamma}-1}}\cdot\frac{\mathrm{d} \mathrm{P}}{\mathrm{d}\mathrm{\Theta}}+\frac{\mathrm{\overline{\gamma}}}{ \mathrm{\overline{\gamma}-1}}\cdot\mathrm{P}\cdot\frac{\mathrm{d}\mathrm{V}}{ \mathrm{d}\mathrm{\theta}}\right)\mathrm{d}\mathrm{\Theta} \tag{5}\]  
where \(\mathrm{Q}_{\mathrm{w,tot}}\) is the total heat exchanged during combustion, by assuming the combustion efficiency \(\mathrm{\eta}_{\mathrm{c}}\) equal to 1. This quantity can be computed for all the engine map operating points, once the in-cylinder pressure is known by measurements and used to calibrate the  
Figure 6: Six-cylinder turbocharged Diesel engine, 0D/1D schematic. Woschni model point by point. In this work the tuning has been carried out by means of the two coefficients and (for more details please refer to [23; 24]) and by minimizing the following error function for each operating point:  
\[z(C_{1},C_{2})\ =\ \left|\frac{Q_{w,tot}-Q_{w}(C_{1},C_{2})}{\text{CHR}}\right| \tag{6}\]  
where CHR is the cumulative heat release, and \(Q_{w}\) (\(C_{1}\), \(C_{2}\)) is the computed wall heat exchanged for a given set of values (\(C_{1}\), \(C_{2}\)).