## 5 Calibration of Engine Model
### Engine Model Calibration
The distribution of \(C_{1}\) and \(C_{2}\) values on the engine map is shown in Figure 7. To retain a simpler set of \(C_{1}\) and \(C_{2}\) coefficients to be inserted in the 1D simulation model, their distribution on the engine map has been averaged along the BMEP axis, achieving a dependence only on engine speed. A little distortion in the distribution can be seen in some full load points: hence, these values have been reconstructed based on the adjacent points. The total heat losses during the combustion process can be computed by applying the Woschni model, as reported in Figure 8, where the heat loss is expressed as a percentage of the total heat released by fuel combustion (i.e., simply, assuming \(\eta_{\text{c}}=1\)). As shown by the contour plots of Figure 8, the recalibration of [PERSON]'s formula is fundamental to correctly evaluate the heat loss term, especially for medium-large displacements such as the one considered: without this tuning process, the heat losses would have been underestimated almost by a factor of two. Figure 7: (**a**) \(C_{1}\) distribution across the engine map; (**b**) \(C_{2}\) distribution across the engine map. \(C_{1}\) and \(C_{2}\) are the coefficients of the classical Woschni heat transfer model. The fuel burnt mass fraction \(x_{b}\) can be computed once the energy balance has been verified. The calculation is performed by integrating Equation (5), which is implicit and non-linear, since \(\gamma\) depends on the chemical composition, which varies during the combustion. Once the \(x_{b}\) profiles are computed for each sampled operating point, they must be extended across the entire engine map, since the engine could run in whichever working condition. Instead of interpolating among the calculated profiles, which are functions defined over different domains, it is advisable to approximate them by an analytical function (in this case the \"double Wiebe's\" one) and then interpolate the fitting coefficients of these functions. The double Wiebe's function can be written as follows (Equation (7)) [27]:  
\[x_{b}(\theta)=\beta\cdot\left(1-e^{-a_{1}(\frac{\theta-\theta_{1,1}}{\theta_{ t,1}-\theta_{t,1}^{2}})^{m_{1}+1}}\right)+(1-\beta)\cdot\left(1-e^{-a_{2}\cdot( \frac{\theta-\theta_{1,2}}{\theta_{t,2}-\theta_{t,2}})^{m_{2}+1}}\right) \tag{7}\]  
where \(\beta\) is the \"weight factor\", \(a_{1}\) and \(a_{2}\) are the \"efficiency parameters\", \(m_{1}\) and \(m_{2}\) the \"shape factors\", \(\theta_{i,1}\) and \(\theta_{i,2}\) the \"starts of combustion\", \(\theta_{t,1}\) and \(\theta_{t,2}\) the \"ends of combustion\". The fitting is performed by means of MATLAB(r) built-in algorithms and the only parameters used are \(\beta\), \(\theta_{t,1}\), \(m_{1}\) and \(m_{2}\); moreover, the following hypotheses are done:  
* \(a_{1}=a_{2}=6.9078\) (complete combustion);
* \(\theta_{i,1}=\theta_{i,2}=\text{SOC}_{\text{main}}\) (the start of combustion is set with respect to the ignition of the main injection, since very little fuel is injected in the operating points with a pilot injection);
* \(\theta_{i,1}=\theta_{i,2}\leq\theta_{t,1}\leq\theta_{t,2}=\text{EVO}\) (exhaust valve opening);
* \(0\leq\beta\leq 1\);
* \(0\leq m_{1}\), \(m_{2}\leq 1\). Once the fitting coefficients are defined for all the sampled points, their distribution across the engine map is further approximated with polynomial surfaces as function of engine speed and BMEP, to remove local distortions and have an easy computation of the coefficients for any combination of engine speeds and loads. A comparison for the computed trends of the fuel burnt mass fraction \(x_{b}\) is represented in Figure 9, for two operating points as examples. Figure 8: (**a**) Percentage heat losses with recalibrated Woschni model; (**b**) Percentage heat losses with original Woschni model (i.e., using the default coefficients of the model). The profiles calculated by polynomial approximation are then considered for the remaining part of this study, given the satisfactory approximation they can provide.