## 2 Methods and Tools
### Thermodynamic Model Description  
An in-house thermodynamics model was developed to predict the engine in-cylinder pressure under the various operating conditions examined. The engine scavenging process was modelled using a two-zone approach, which is considered necessary in order to capture the complexities during the fresh air and exhaust gas mixing [40]. The remaining part of the engine cycle from Exhaust Valve Close (EVC) to Scavenge Port Open (SPO) was modelled using a one-zone approach which is able to provide sufficient accuracy for the in-cylinder pressure diagram prediction [41]. The formulation of each approach is developed using the energy the working medium as homogeneous. In specific, it involves a system of non-linear differential equations that is solved for the pressure, temperature and burnt fuel fraction state variables for each zone. For the one-zone approach the following system of ordinary differential equations (ODE) is obtained:  
\[ \begin{bmatrix}\dot{p}\\ \dot{T}\\ \dot{\xi}\end{bmatrix} = \begin{bmatrix}m\frac{\partial u}{\partial p}&m\frac{ \partial u}{\partial T}&0\\ V-mT\frac{\partial R}{\partial p}&-m\left(R+T\frac{\partial R}{\partial T} \right)&0\\ 0&0&1\end{bmatrix} ^{-1} \begin{bmatrix}\dot{Q}_{\sum}-p\dot{V}+\dot{H}_{\sum}- u\dot{n}-\frac{\partial u}{\partial\phi}m\phi\\ T\left(\frac{\partial R}{\partial\phi}m\phi+R\dot{n}\right)-p\dot{V}\\ F_{\delta}\phi(1-\xi)^{2}\end{bmatrix}  \tag{1}\]  
where \(p\), \(T\) and \(\xi\) are the pressure, temperature and burnt fuel fraction respectively; \(u\), \(R\), \(F_{\mathrm{s}}\) and \(\phi\) denote the internal energy, gas constant, stoichiometric fuel-air ratio, and equivalence ratio respectively; and finally, \(V\), \(m\) and \(\dot{Q}_{\sum}\) are the volume, mass, sum of heat release and heat transfer rates respectively, whereas \(\dot{H}_{\sum}\) denotes the sum of enthalpy flow rates entering and exiting the cylinder. The internal energy \(u\) and gas constant \(R\), along with their corresponding partial derivatives with respect to \(p\), \(T\) and \(\phi\) are calculated through combustion gas properties [42]. The stoichiometric fuel-air ratio \(F_{\mathrm{s}}\) is set to 0.0694 for marine diesel fuel [43], whilst the equivalence ratio \(\phi\) is calculated considering the burnt fuel fraction \(\xi\) in accordance to the following equation [5]:  
\[\phi=\frac{\xi}{F_{s}(1-\xi)} \tag{2}\]  
Furthermore, the mass conservation applied for the one-zone approach provides the following equation:  
\[\dot{m}=\dot{m}_{i}-\dot{m}_{o}+\dot{m}_{fb} \tag{3}\]  
where the subscripts \(i\) and \(o\) denote inlet and outlet mass flowrates respectively, which are calculated by utilising the valve isentropic flow equations [5]. The burnt mass rate is denoted by \(\dot{m}_{fb}\) and is calculated using the single-Wiebe combustion model according to the following equation [7]:  
\[\dot{m}_{fb}=m_{f}\;\theta\;\frac{a\;(w+1)}{\Delta\theta}\left(\frac{\theta- \theta_{SOC}}{\Delta\theta}\right)^{w}\exp\left\{-a\left(\frac{\theta-\theta_ {SOC}}{\Delta\theta}\right)^{w+1}\right\} \tag{4}\]  
where \(m_{f}\) is the total fuel injected in the cylinder, \(\theta\) denotes the crank angle, \(\Delta\theta\) is the duration of combustion, \(w\) is the Wiebe shape parameter, whereas \(a\) is set to 6.9078 to maintain a combustion efficiency of 99.9% [44]. In addition, \(\theta_{SOC}\) denotes the start of combustion crank angle, which is calculated in accordance to the following equation:  
\[\theta_{SOC}=\theta_{SOI}+\Delta\theta_{IGD} \tag{5}\]  
where \(\theta_{SOI}\) is the start of injection crank angle which is provided as input, and \(\Delta\theta_{IGD}\) is the ignition delay calculated in accordance to the Sitkey equation [7].