## 2 Simulation Methods
### The Stochastic Reactor Model  
In the SRM computational domain, the in-cylinder trapped mass is discretized as an ensemble of notional particles that can mix with each other and exchange heat with the cylinder walls. A schematic visualization of the concept, along with an exemplary distribution of the particles' property (i.e., enthalpy or gas composition) is shown in Figure 1. Depending on the initial conditions assigned at Intake Valve Closure (IVC), a given chemical composition, temperature, and mass are assigned to each particle, while pressure is assumed to be the same across all particles. A probability density function is used to describe the in-cylinder content and each particle contributes to the realization of the given PDF at each time-step. Since all stochastic particles in the SRM represent a portion of the in-cylinder mass, a Mass Density Function (MDF) is used to solve the main transport equation of the 0-D SRM. The joint scalar vector of the MDF can be expressed as reported in Equation (1). \[\mathrm{F}_{\mathbf{\Phi}}(\mathbf{\psi},\mathrm{t})=\mathrm{F}_{\mathbf{\Theta}}\big{(} \psi_{1},\ \ldots,\ \psi_{\mathrm{N}_{\mathrm{Sc}}};\ \mathrm{t}\big{)} \tag{1}\]  
The vector \(\mathbf{\psi}\) is the realization of the vector of local scalar variables noted herein as \(\mathbf{\Phi}\), while \(\mathrm{N}_{\mathrm{Sc}}\) is the number of scalars transported in the computational domain. Depending on the chemistry solver used in the simulation framework, the number and type of transported scalars varies significantly. \[\mathrm{Online\ chemistry\ solver}\ \mathbf{\Phi}(\mathrm{t})=\big{(}\mathrm{Y}_{1}, \ \mathrm{Y}_{2},\ \ldots,\ \mathrm{Y}_{\mathrm{N}_{\mathrm{Sp}}},\mathrm{h};\ \mathrm{t}\big{)} \tag{2}\]  
\[\mathrm{Tabulated\ chemistry\ solver}\ (\mathrm{(CPV)}\ \mathbf{\Phi}(\mathrm{t})=\big{(}\phi, \ \mathrm{h},\ \mathrm{w}_{\mathrm{q}},\ \mathrm{T}_{\mathbf{p}},\ \mathrm{yEGR},\ \mathrm{h}_{298};\mathrm{t}\big{)} \tag{3}\]  
In the online chemistry solver formulation (see Equation (2)), the specific enthalpy (h) as well as the full vector of species mass fractions \(\mathbf{Y}\) must be transported in order to correctly compute the chemical reactions during run time. The size of the mass fraction vector is therefore dependent on the number of species (\(\mathrm{N}_{\mathrm{Sp}}\)) defined in the chemical mechanism adopted. With respect to the tabulated chemistry solver, only a reduced set of quantities need to be transported in the computational domain independently on the size of the mechanism used to generate the look-up table. These are the equivalence ratio (\(\phi\)), the specific enthalpy (h), the mean molecular weight (\(\mathrm{w}_{\mathrm{q}}\)), the vector (\(\mathrm{T}_{\mathbf{p}}\)) containing the thermodynamic polynomial coefficients, the EGR mass fraction (yEGR) and the latent enthalpy (\(\mathrm{h}_{298}\)) of the in-cylinder mixture. Once initial conditions are assigned, the transport equation of the joint scalar vector of the MDF is numerically solved using a Monte Carlo particle method (e.g., [PERSON] [34]) with the operator splitting technique as previously presented by [PERSON] et al. [35].