In recent years, a free, open source CFD software package called OpenFOAM has been attracting increasing amounts of attention as a promising, inexpensive, and efficient CFD tool for the numerical simulation of processes such as fuel injection and evaporation, turbulent mixing and burning. Here, we describe the further development of OpenFOAM to enable its use in simulating stratified turbulent combustion in DI SI engines. Advanced models of various phenomena relevant to partially premixed turbulent flames were implemented into the code, and the effects of these implementations were investigated by performing unsteady 3D RANS simulations of stratified turbulent burning in a DI SI engine. First, the Flame Speed Closure (FSC) model of premixed turbulent combustion was implemented. Second, a method for evaluating the mean density in premixed turbulent flames that is available in the standard OpenFOAM library was improved. Third, a semi-detailed chemical mechanism was introduced to describe the influence of the equivalence ratio, pressure, and temperature of the unburned gas on the burning rate and flame temperature. The flame temperature and laminar flame speed are computed, approximated and further implemented into the OpenFOAM library. Fourth, to address the influence of turbulent fluctuations in mixture composition on mean variables, a presumed Favre beta-PDF for the mixture fraction was implemented. Fifth, the implementation of the balance equation for mixture fraction variance was improved with the consideration for the evaporation source term. Finally, the mean burning rates computed with and without the aforementioned models were compared to assess the importance of the studied effects.