Flame acceleration and transition to detonation in a pre-/main- chamber combustion system

Numerical simulations are performed to study the mechanism of deﬂagration to detonation transition (DDT) in a pre-/main- chamber combustion system with a stoichiometric ethylene-oxygen mixture. A Godunov algorithm, ﬁfth-order in space, and third-order in time, is used to solve the fully compressible Navier-Stokes equations on a dynamically adapting mesh. A single-step, calibrated chemical diffusive model (CDM) described by Arrhenius kinetics are used for energy release and conversation between the fuel and the product. The two-dimensional simulation shows that a laminar ﬂame grows in the pre-chamber and then develops into a jet ﬂame as it passes through the oriﬁce. A strong shock forms immediately ahead of the ﬂame, reﬂecting off the walls and interacting with the ﬂame front. The shock-ﬂame interactions are crucial for the development of ﬂame instabilities, which trigger the subsequent ﬂame development. The DDT arises due to a shock-focusing mechanism, where multiple shocks collide at the ﬂame front. A chemical explosive mode analysis (CEMA) criterion is developed to study the DDT ignition mode. Preliminary one-dimensional computations for a laminar propagating ﬂame, a fast ﬂame deﬂagration, and a Chapman-Jouguet detonation are conducted to demon-strate the validity of CEMA on the chemical-diffusive model, as well as to determine the proper conditioning value for CEMA diagnostic. The two-dimensional analysis with CEMA indicates that the DDT initiated by the shock-focusing mechanism can form a strong thermal expansion region at the ﬂame front that features large positive eigenvalues for the chemical explosive mode and dominance of the local autoignition mode. Thus, the CEMA criterion proposed in this study provides a robust diagnostic for identifying autoignition-supported DDT, of which the emergence of excessive local autoignition mode is found to be a precursor. The effect of grid size, initial temperature, and oriﬁce size are then evaluated, and results show that although the close-chamber DDT is highly stochastic, the detonation initial mechanism remains robust.


I. Introduction
The internal combustion engine (ICE) community faces ever-increasing pressure from governments and consumers alike to create engines that can achieve high thermal efficiencies while simultaneously reducing emissions to a minimum 1 . While highly boosted spark ignition (SI) and homogeneous charge compression ignition (HCCI) engines are found attractive for future developments, their operating conditions result in an increased tendency to knock or even super-knock when mixtures are subjected to a higher temperature and pressure 2 . Significant research has been dedicated to increasing knocking and super-knocking limits for future engine developments, where the former restricts raising the compression ratio to improve engine thermal efficiency due to end-gas auto-ignition while the latter limits the desired boost to improve the power density of engines due to detonation 2 . It is generally accepted that knock in SI engines, whether conventional knock or super-knock, is driven by end-gas autoignition 3 . When a premixed flame propagates through the combustion chamber, the unburned mixture is progressively compressed by the turbulent flame. The temperature of the unburned mixture is also gradually increased, ultimately in a knocking cycle reaching autoignition criteria. When an end-gas autoignition kernel is developed, different combustion modes may occur, including deflagration, sequential autoignition and, in the worse case, detonation. Various studies have investigated the behaviour of conventional knocking either through research engines or numerical simulations, where knocking is found to be associated with pressure oscillations coupled with chemical kinetics, which originate from auto-ignition 3 . A number of studies have also focused on the behaviour of super knock in research engines; however, no consensus has been reached on the exact mechanism of a super knock event. In fact, it is not clear whether there exists a single mechanism that can explain all super-knock events. Nevertheless, studies have suggested that super knocks in SI engines may be driven by end-gas autoignition, flame/shock interactions, and deflagration-to-detonation transition (DDT) process in an enclosed space [3][4][5] . Therefore, it is of great interest to numerically study the fundamentals of flame-shock interactions in pre-chamber/main-chamber systems with a particular focus on DDT.
The study of DDT covers various engineering and physics fields, including mining, astrophysics and engines [6][7][8][9][10] . The research studying flame acceleration and acoustic/shock wave interactions with flames has stretched for several decades 11 . Among all relevant physical properties, turbulence is known to play a key role in flame instability and the initiation of DDT. Experimental studies have suggested intense turbulence can result in unstable burning, which creates pressure build-up around the flame and, therefore, the formation of shocks 12 . The coupling of pressure gradients with density gradients across the flame can then lead to increased turbulence within the flame, flame acceleration, and, in some cases, detonations. Further studies from Teerling et al. 13 also suggested pressure waves can magnify wrinkling in the premixed flame surface through RT instability. While under supersonic conditions, shocks generated by either deflection of the flow or by flame expansion can also have a significant effect on flame evolution. The shock-flame interactions, primarily through the Richtmyer-Meshkov fluid instability, can generate a highly turbulent flame brush as funnels of un-burned gas propagated into the burned gas 14 . Continuous shock-flame interaction and coalescence of shocks in the unburned gas can therefore develop high-speed shocks that move in and out of the turbulent flame, increasing local gas pressure and temperature sufficiently, making it possible to transit from deflagration to detonation in the immediate vicinity of the reaction front 14 . Direct initiation of detonation can also be found when the flame is subjected to strong shocks 15 .
In order to detail the mechanism of DDT, notable efforts have been made both numerically and experimentally in studying the fundamental development of flame acceleration, acoustic/shock wave and detonation through smooth and obstructed channels 11,16 . Studies have highlighted that detonation initiation occurs through a variety of processes, such as shock focusing, instability near the flame front, flame interactions with pressure waves, or pressure and temperature fluctuations in the boundary layer 17 . While the study of the flame-acoustic or flame-shock interactions in channel flows has made substantial contributions to the understanding of flame propagation and detonation initiation 18 , little is done to reveal the flame propagation mechanism with high-pressure oscillation in a closed confined space, especially with a controlled jet flame.
Recently, experimental studies have revealed some aspects of DDT in an enclosed space where conditions are relevant to internal combustion engines 19 . Zhou et al. 20 conducted a series of studies via a constant volume combustion vessel incorporating a perforated plate where the effect of turbulent jet flame speed, mixture properties, ambient thermodynamics properties and inert gas dilution on end-gas detonation were detailed. The ratio of maximum pressure in the combustion chamber to the equilibrium pressure was found to be a good indicator of end-gas autoignition in the system. The thermochemical characteristics of the unburned mixture were found critical to the end-gas autoignition or combustion mode transition, while a higher oxygen concentration with more reactive fuels (such as hydrogen) was found to generate rapid heat release and subsequently promote the coupling of the pressure wave and autoignition flame resulting in end-gas DDT phenomenon 21 . The propensity of end-gas autoignition with developing detonation occurrence was also identified as positively related to the main flame propagation velocity. While high-speed Schlieren photography experiments were able to review end-gas autoignition and pressure oscillation for various fuels in an enclosed combustion vessel, the details of the combustion-wave interactions, especially near autoignition kernels, were not well described due to the challenging experimental conditions. Numerically, multi-dimensional simulations have been conducted to investigate the end-gas autoignition process; however, the couplings between pressure wave and chemical reactions are very complicated, especially when there is a transition from deflagration to detonation. Most multidimensional flow studies in the literature suggest DDT transitions occur with the help of the appearance of obstacles, boundary layers or turbulent mixing 11 . Yu and Chen 4 highlighted possible modes of end-gas combustion in a onedimensional (1D) closed chamber, where depending on the chamber length as well as the initial temperature and pressure, various modes of combustion can occur (namely: normal flame propagation without autoignition, autoignition without detonation development, and detonation development). The study demonstrated for the first time that even in 1D flows with an initial propagating flame, detonation could be developed when the reactivity of the end-gas is high enough. Using the same numerical methods, Dai et al. investigated the transient autoignition process in an iso-octane/air mixture inside a closed chamber under engine-relevant conditions where the effects of the pressure wave-wall reflection and the mechanism of extremely strong pressure oscillation typical for super-knock are assessed 5 . It is found that the hot spot induced autoignition in a closed chamber can be greatly affected by shock/pressure wave reflection from the end wall. More recently, Zhong et al. 22 investigated the effect of obstacle positions on the flame propagation and detonation modes through a two dimensional (2-D) DNS at elevated temperatures and pressures where confined space is considered involving end-wall reflected pressure waves and shockwaves that may impact flame propagation and detonation occurrence. Similar studies were carried out by Wei et al. to study the flame-pressure wave interactions with endgas autoignition and detonation development in a confined chamber by two-dimensional numerical simulations with a stoichiometric hydrogen/air mixture 23 . While these studies provide significant insights into the underlying mechanisms of the end-gas autoignition and detonation developments, the configurations tested were rather idealised. As Yu and Chen 4 pointed out that multi-dimensional simulations on detonation development with an initial propagating flame are still much needed, especially at conditions and geometries relevant to practical engines.
In this study, end-gas autoignition and detonation development in a pre-/main-chamber configuration are, for the first time, investigated using multi-dimensional simulation. The interactions between the pressure wave and flame are presented. While the fuel, initial temperature and pressure considered were not a representation of a typical engine, the inter-actions between pressure wave and flame and the mechanism of detonation development are believed to be closely related to engine knocking. In order to understand the mechanism of the autoignition-induced pressure wave and detonation development, detailed evolution of temperature and pressure distributions are discussed. Finally, chemical explosive mode analysis (CEMA) is adapted to the context of this study in order to identify the flame propagation regime locally and provide insights into the detonation initiation mechanism. Motivated by the prechamber ignition study by Benekos et al. 24 , the computational geometry and setup for this study is illustrated in Fig. 1. The two-dimensional domain consists of the pre-and main chamber with dimensions of 2.6 × 6 cm 2 , and 7 × 10 cm 2 , respectively. They are connected via an orifice with a length of 0.4 cm and a nominal diameter d of 0.15 cm. All chamber walls are no-slip, adiabatic boundaries. To ignite the mixture, a semi-circular region of hot, burned product with a radius of 1 cm at 3500 K and 1 atm is placed at the left wall. Both chambers contain a stoichiometric ethyleneoxygen mixture at atmospheric conditions, which are given in Table 1.

B. Governing equations
In this study, the numerical simulations solve the twodimensional (2D) Navier-Stokes equations for an unsteady, fully compressible, chemically reacting flow, and the governing equations for the conservation of mass, momentum, energy, and species read 11,25 : where ρ, U , p, and T represent the density, velocity, pressure, and temperature of the gas. E is the specific total energy,ω is the chemical reaction rate, q is the chemical energy release, Y is the mass fraction of the reactant, K is the thermal conductivity, and D is the mass diffusivity. The gas follows the ideal gas equation of state, where R is the universal gas constant, and M is the molecular weight.
The viscous stress tensor is defined aŝ where ν is the kinematic viscosity, I is the unit tensor, and the superscript T denotes the matrix transposition. The specific total energy E is calculated by where γ is the specific heat ratio.

C. The chemical diffusive model
The chemical-diffusive model (CDM) 26 is used to study the premixed stoichiometric ethylene-oxygen combustion. The consumption rate of the reactant follows the first-order Arrhenius kinetics and is defined aṡ where A and E a are the pre-exponential factors and activation energy. Within the CDM, the kinematic viscosity, diffusion, and heat conduction are assumed to have a similar temperature dependence, where ν 0 , D 0 , and κ 0 are transport constants, C p = γR/ M(γ − 1) is the specific heat at constant pressure, and n = 0.7 emulates a typical temperature dependence of these coefficients in reactive hydrocarbon systems. The nondimensional Lewis, Prandtl, and Schmidt numbers, independent of thermodynamic conditions, can be expressed as Given Eqs. (1)-(10), the input values for the chemical and thermophysical parameters for a particular energetic gas that is close to those experimentally defined and, when used in test computations, produce ignition, flame, and detonation properties that are reasonably in line with those measured or computed from more detailed models. Detailed input thermalchemical parameters of the CDM and the calculated properties for the stoichiometric ethylene-oxygen combustion waves are provided in Table I. These parameters were taken from Goodwin et al. 18,25 , who carefully calibrated the parameters using a genetic algorithm optimization procedure such that the one-dimensional laminar flame properties (laminar flame speed, flame thickness, adiabatic flame temperature) and the ZND detonation properties (CJ detonation speed, half reaction thickness, post-shock temperature) match with those found using detailed chemistry or experiment. The choice of chemical reaction models in simulating combustions has always been a controversial topic. For typical DDT problems, many current detailed chemistries can be inadequate and inaccurate due to the excited molecular states formed under the extremely high-temperature, high-pressure, shock-laden environment. In addition, using a detailed chemistry model for simulating large-scale multidimensional problems leads to impractical computational costs. The single-step CDM, on the other hand, can greatly reduce the computational cost and makes full-size simulations feasible. Note that there are also certain limitations of the CDM. First, the CDM does not reproduce all details of the combustion waves exactly, especially in cases where significant pressure build-up is present. In addition, there is a lack of direct experimental data on premixed stoichiometric ethylene-oxygen combustion in the system that we are interested in that could be used for model calibration. Nevertheless, this CDM and the calibrated parameters for stoichiometric ethylene-oxygen has been shown to quantitatively reproduce the DDT process in a semi-confined channel with obstacles, which covers a wide range of scenario from slow deflagration, fast deflagration, pre-detonation, overdriven detonation (high local pressure), and stable detonation 14,18,25 , and this type of model has been extensively applied in a number of other scenarios including DDT in obstructed channels 15 , supersonic combustors 14 , and Detonation cell size ∼ 0.02 cm layered detonations 27 . We believe the major characteristics of flame acceleration and DDT process in a confined system, especially the detonation initiation mechanism, can be captured using the present CDM.

D. Numerical algorithm
The governing equations are solved using a fifth-order WENO algorithm with HLLC fluxes for the spatial discretization and a 3rd-order Runge-Kutta scheme for time advancement. In addition, an adaptive mesh refinement technique is implemented through the Boxlib library 28 to improve local resolutions and increase computational efficiency. As detailed by Xiao et al. 15 , the AMR refinement criterion is based on the maximum error for each grid cell,e i j = max (ϕ x , ϕ y , ϕ xy , ϕ yx ) , in x, y, and both diagonals where Similar calculations are performed for ϕ y , ϕ xy , ϕ yx . In order to refine the regions with strong shear flows and boundary layers, an additional criterion using gradient of velocity is where ε re f = 0.3 and TVGGR = 1 × 10 6 is the threshold of velocity gradient for grid refinement. The current AMR approach has been proven to help resolve important flow features, e.g., flame, pressure waves, strong shear flow, DDT and boundary layers 11 . The simulation presented in the following sections uses a minimum cell size of ∆x min = 13.0 µm, which corresponds to a maximum of 4 levels of refinement. This grid size is tested and chosen such that the simulation captures the important flow features at a reasonable computational cost.

E. Computational flame diagnostic tool
To study the propagation mode of ethylene/oxygen flame, a computational flame diagnostic tool, chemical explosive mode analysis (CEMA), is adopted in this study. First developed by Lu et al. 29 , CEMA analyses the eigenvalues of the chemical Jacobian, highlighting the reactive mixtures relevant to critical combustion events such as autoignition and extinction. The evolution of the chemical source term in a reactive flow system can be expressed as: where y is the vector form of dependent variables (e.g. temperature and species concentrations). ω and s are the chemical source term and the non-chemical source term (e.g., diffusion) associated with the system. A chemical explosive mode (CEM) is identified when the chemical Jacobian (J ω ) has an unstable eigenvalue characterised by a positive real part λ e with the corresponding left eigenvector denoted by b e . In order to identify different local combustion modes in a detonation cycle, an extended criterion developed by Xu et al. 30 is adapted here, where Eq. 12 is projected to the direction of CEM giving: where, In Xu et al. 30 a local combustion mode indicator, α, is further defined as: The value of α highlights the relative importance of chemical and diffusive source terms in the ignition process. For a DDT process, α 1 would suggest diffusion in the preheat zone dominates chemistry and promotes ignition, while |α| 1 would indicate a detonation regime characterised by autoignition in which chemistry plays a dominant role. The local extinction mode can also be identified through α −1 where diffusion again dominates the chemistry but reverses the ignition process.   Fig. 3). Eventually, at around 0.92 ms, detonations occur near the chamber wall.
Here, two main detonations are observed: one on the top right corner, followed by another one on the bottom right corner (marked in Fig. 2). We further divide the flame evolution into three main stages: jet flame formation and propagation (I), flame distortion by shock waves (II), and detonation initiation (III), which will be discussed in detail in the following sections. Before getting into the details, here, we would like to justify the use of a two-dimensional (2D) simulation to study a three-dimensional (3D) problem involving intense turbulent fluid motions. The 3D simulation of a full-size combustion device where a detonation occurs, such as in an internal combustion engine or a detonation engine, is very computationally expensive. To avoid the unacceptable computational cost, 2D simulations are often performed to investigate the physics of these DDT problems. In previous investigations of a typical configuration, where flame undergoes a transition to detonation in obstructed channels, 2D simulations show surprisingly good results that not only qualitatively but also quantitatively agree well with the actual shock-tube experimental data 11 . More-over, limited 3D simulation results show that there is a general agreement between 2D and 3D simulations for a number of geometries 31 . This phenomenon is usually attributed to the unusual type of turbulence generated by Richtmyer-Meshkov (RM) instabilities. For typical DDT problems in the presence of obstacles or in a confined space, where shocks are generated ahead of the flame, turbulence is mainly generated by the RM instability, and Kelvin-Helmholtz instability plays a secondary role. Studies have shown that the growth rate of the RM instability in two and three dimensions are essentially the same in the linear regime 32 . This type of shock-flame dominated flow has been referred to in a number of works as "non-Kolmogorov" turbulence 11,33 where vorticity is generated on a range of scales simultaneously instead of driven on some large scale. The properties of such turbulence are still a topic that requires intensive study. However, based on the previous investigations, we take the following arguments: the general trends of 2D simulations agree well with the experiments, and at least the qualitative behaviour of a system is similar in 2D and 3D for cases where the RM instability is the major mechanism for generating turbulence. For the closed chamber configuration discussed in this paper, the turbulence induced by shock-flame interactions in the later stage (Stage II) is the main reason for the growth of turbulent flame and detonation initiation. Therefore, it is reasonable to use 2D simulations to study the general trends and mechanisms to avoid the unacceptable computational expenses of a 3D simulation. Fig. 4 (a) shows a series of Schlieren images of the premixed ethylene-oxygen flame propagation in the left chamber at early stages. Initially, the ignition of the flame promotes a series of pressure waves propagating towards the orifice. These pressure waves reflect from the chamber walls and interact with the subsequent pressure waves, as well as the propagating flame (108.1 µs in Fig. 4 (a)), forming complicated "criss-crossed lines" of local pressure (161.6 µs in Fig.  4 (a)). Note that the interactions between the reflected pressure waves and the flame induce small perturbations on the flame surface that grow into flame instabilities. These instabilities, however, remain relatively small, and the process is considered as laminar flame expansion.

B. Stage I: Jet flame formation and propagation
As the flame propagates through the orifice into the main chamber, a distorted jet flame structure is formed, where the flame surface area increases drastically ( Fig. 4 (b)). The flame accelerates and generates pressure waves to form a strong leading shock ahead of the flame front. The strong leading shock is closely coupled with the flame and creates a compressed region with increased flow pressure and temperature. The vorticity isolines in Fig. 4 (b) depict the structures of the incoming flows from the orifice. Strong vortical structures are formed near the nozzle throat with a symmetric behaviour and then dissipate into the main chamber. At an early time (344.4 µs in Fig. 4 (b)), the intense vorticity field leads the flame motion, enhancing the turbulent flame development. shock waves ahead of them. At later times, the vortices further dissipate and have a less significant effect on the flame structure. Fig. 5 shows the schlieren fields as the jet flame propagates in the main chamber and is distorted by shock waves. First, as the vortices dissipate, the flame reaches a relatively steady state (marked as "Steady Propagation" in Fig. 3). During this period (first three images in Fig. 5), the flame keeps outspreading while the flame surface becomes less rippled, and as a result, the overall surface length remains almost constant. As the flame accelerates through the orifice, a shock wave is generated ahead of the flame (marked in Fig. 5 at 455.9 µs). This primary shock bounces back from the right wall and interacts with the propagating flame. The interaction leads to another reflected shock bouncing back towards the chamber wall, as well as a transmitted shock propagating into the flame ( Fig. 5 at 546.5 µs). This first shock-flame interaction corresponds to the onset of the second flame surface length jump in Fig. 3, and is crucial for the subsequent turbulent flame development as well as the detonation initiation. Starting from 546.5 µs in Fig. 5, the flame becomes turbulent again. This is due to the small perturbations formed on the flame surface by the shock-flame interactions. These small perturbations are flame instabilities that soon develop into spike-like structures (Fig. 5 at 688.6 µs). Note that as the flame propagates, pressure waves keep coalescing into new shock waves (e.g. the secondary shock wave marked in Fig. 5 at 616.5 µs). The repeated shock-flame interaction processes drive the expansion wave into the burned area, further distorting the flame. Although intense turbulence is formed as the flame passes through the orifice, a detonation occurs only after the shock-flame interactions, which drastically increase the flame surface area. Therefore, it is the fluid instabilities induced by shock-flame interactions that contribute to the turbulence in the flame and eventually lead to the detonation initiation. Fig. 6 is an enlargement of the schlieren fields in the region labelled R2 in Fig. 2 at around 920 µs, a short time before the first detonation. Here, the shock-flame interaction, the generation and the growth of the flame instabilities can be clearly visualised. At 919.83 µs, a strong shock wave reflected from the top wall is propagating downwards into the flame surface. After the shock-flame interaction, a transmitted shock (marked in Fig. 6 at 920.85 µs) propagating into the flame is formed. In addition, the interactions produce a large number of small perturbations, which are primarily due to Richtmyer-Meshkov (RM) and Rayleigh-Taylor (RT) instabilities. These perturbationreds grow with time, creating spike-like structures and eventually leads to initiation of a detonation. The small ripples, the transmitted shock, and the flame surface are marked in Fig. 6. The flame undergoes this repeated distortion process, and eventually, two detonation spots are formed (marked as D1 and D2 in Fig. 5 at 925.6 µs). Note that in a confined geometry like this, multiple detonation spots are usually observed (D1 and D2 marked in Fig.  5). Here, both detonation ignitions are generated by the same mechanism, namely, shock focusing through direct initiation. A number of test trials with various grid sizes have also been performed. Although the exact location of the detonation spot is stochastic due to the highly-turbulent flow field, the detonation always occurs near the chamber wall through the same mechanism. In order to obtain an in-depth understanding of this DDT mechanism, a computational diagnostic tool based on CEMA is adopted.

E. CEMA-based Flame Diagnostics
As suggested by Jaravel et al. 34 , the application of the CEMA-based flame diagnostics in DDT might be erroneous without an a priori validation. Therefore, canonical onedimensional (1D) simulations are first conducted for laminar flame propagation, CJ fast flame deflagration, and CJ detonation, where CEMA analyses are performed for validation. The fast deflagration conditions are obtained from the shock detonation toolbox corresponding to the frozen state behind a shock, whose Mach number corresponds to 50% CJ following the work by Maxwell 35 . The fast deflagration state (with elevated temperature and pressure) is then adopted in a 1D domain with no shock and a hot spot located at one end of the domain. The hot spot is composed of an equilibrated mixture at constant enthalpy and pressure. The post-shock deflagration is referred to as post-shock laminar flame in the following. All 1D simulations are performed by the in-house unsteady detonation code.

μs
CEMA validations are performed first for a 1D freely propagating premixed flame ethylene/oxygen with the inlet condition identical to the 2D domain. Fig. 8 shows the temperature profile, projected normalised chemical (φ ω ) and normalised diffusion (φ s ) source terms in the laminar premixed flame propagating from left to right. The reaction front is identified as the zero-crossing of λ e . It is seen that φ s is much larger than φ ω , i.e., α 1, for temperature lower than T i , where T i is defined as the temperature at the crossover point of φ s and φ ω . When T > T i , chemistry becomes dominant in the CEM. These observations suggest that the fresh mixture in the preheat zone (defined as T ≤ T i ) is forced to ignite, indicating that the flame is a canonical deflagration wave.
In order to characterise the end-gas deflagration to detonation transition, combustion modes of one-dimensional cases corresponding to the relevant propagation regimes, fast deflagration (post-shock laminar flame) and detonation, are also investigated. Fig. 9 shows the diffusion and chemistry source terms over the progress variable (C) space for different combustion regimes in a DDT process. Only λ e > 0 region is shown. Sufficient resolution is provided to capture the strong discontinuities near zero-crossing of λ e . CEMA analysis on the ZND solutions of the CJ detonation shows that chemistry (φ ω ) is dominant as soon as the detonation is initiated, indicating autoignition is driving the flame propagation after shock wave compression. The crossing of φ s and φ ω happens immediately after the compression wave passes through the unburned mixture. While small fluctuations of the diffusion term (φ s ) are observed, the contribution of diffusion is significantly lower compared to the chemistry term across the combustion regime. CEMA analysis on the post-shock laminar flame revealed the typical behaviour of the premixed combustion regime similar to the 1D laminar propagating flame shown in Fig. 8. Diffusion contribution is seen to promote ignition in the preheat region of the flame when the progress variable is less than 0.2. The end of preheating zone is indicated by the crossing of φ s and φ ω where autoignition is once again driving the flame propagation. From Fig. 9, the detonation regime in a DDT process can be readily distinguished from the deflagration regime by the low progress variable at zerocrossing of λ e , or alternatively, by the low α value at a given progress variable. The progress variable C = 0.1 appears to be a suitable value for distinguishing combustion mode, and the conditional α| c=0.1 is served as the mode indicator for the following ignition mechanism analysis.
Following the analysis of 1D canonical flames, CEMA is further applied to the 2D data for the local window where successful detonation occurs. Figs. 10 and 11 depict the time evolution of the two detonation spots near the wall in the R1 and R3 (See Fig. 2), respectively. Here, isocontour of C = 0.1 is superimposed onto the λ e field and coloured by the local α value. Threshold values of α < 0.1 for the detonation regime and α > 1 for the fast deflagration regime are adapted in the colorbar to ease the interpretation. As seen, for both detonation instances, a highly reactive region denoted by large positive λ e is formed near the wall. For the first detonation spot, the ignition spot, highlighted by a small conditional α, is first formed near the flame front where two shock waves collide ( Fig. 10 Frame 1). As time progresses, a region of extreme reactivity is observed near the ignition spot, indicated by a pool of large λ e . The reaction front then couples with the leading shock as it propagates and finally leads to detona-tion. At the onset of detonation, the conditional α features extremely small values (i.e., α < 0.1), indicating the detonation is mainly driven by autoignition while diffusion plays a negligible role. Fig. 12 shows the trend of the computed pressure, density, and temperature values at the first detonation point before and after the detonation initiation. During this process, the continuous shock collisions and reflections compress the material, where both pressure and density increase drastically at about 921.9 µs, followed by an autoignition characterized by a sudden increase in temperature. This suggests that shock collisions in an enclosed space can deposit energy (e.g., through the dP/dt term) in a localized spot within a timescale smaller than the acoustic timescale of the gas, leading to direct initiation of detonation. The mechanism, i.e. direct detonation initiation triggered at the collision spot by focusing shocks at the flame front initiation, found in this study is consistent with that reported by Xiao et al. 15 . For the second detonation spot (Fig. 11), the ignition kernel is formed in close proximity to the wall, where strong shock reflection creates a region of high reactivity mixtures. The autoignition spot is again formed at the tip of the flame front, as indicated by the small α. The CEMA criterion set out in this study correctly captures the local propagation regime and thus pro-vides a robust diagnostic for identifying detonation onset. The effect of pressure contribution to the detonation ignition is a topic of future research.

A. Effect of grid size
The effect of grid size for the case discussed above is performed with 2, 3, and 4 levels of refinement, corresponding to the minimum cell sizes of 52.1, 26.0, and 13.0 µm. Time histories of computed flame surface length using three different grid resolutions are shown in Fig. 13 by blue, red, and blacks lines, respectively. In general, it takes longer for the flame to become fully developed to initiate a detonation using a finer grid size. The simulation results show reasonable convergence for most of the stages with increasing grid resolution. However, as the flame becomes further distorted by continuous shock-flame interaction, they show a divergent behaviour near the detonation initiation point (sudden drop in flame surface length in Fig. 13). With 2, 3, and 4 levels of refinement, the detonation occurs at around 0.8 ms, 0.85 ms, and 0.93 ms. This is primarily because the problem of DDT is a highly complex physical system that involves flow instabilities, turbulence, shock-flame interactions, and is stochastic by its nature. The stochasticity in this problem itself results in a dispersion of detonation initiation in the system. Due to the limitation of computing resources, simulations with a finer grid size are impractical. On the other hand, a finer grid would also be unnecessary for the current study since the physics of interest are insensitive to grid resolutions. In the results shown above, simulations are performed with the high resolution (4 level). For the parametric study presented in the following section, a medium resolution (3 level) is used as a tradeoff between accuracy and computational cost.

B. Effect of orifice size and stochasticity
The size of the orifice is an important parameter affecting the jet-flame propagation velocity, as well as the onset of the detonation. Here, cases with four different orifice sizes of d = 0.5, 1.5, 3, and 4.5 mm are tested and the time history of flame surface length and the flame speed are shown in Fig. 14. The general trend of the flame development is similar to that shown in Fig. 3 although the exact time and location of each stage is different. With a smaller orifice size, it takes a longer time for the laminar flame to propagate, and the surface area of the subsequent jet-flame is increased. This is likely attributed to the more restriction of the smaller orifice on jet flame, which promotes smaller eddy structures and a more turbulent jet-flame. In addition, a smaller orifice results in a greater flame speed at the beginning of the jet-flame stage compared to that with a larger orifice size (bottom figure in Fig. 14). Despite the large initial jet flame speed for the smaller orifice, the overall flame spreading is still slower. This is more clearly observed in Fig. 15 (a), where the schlieren fields for all four cases at the same time of 600 µs are shown. Here, the flame is still in the "steady propagation" stage, where no shock-flame interactions are involved for the case with the smallest orifice size d = 0.5 mm. For the cases with larger orifice sizes, the flame has entered the next stage where constant shock-flame interactions occur and the flame becomes more distorted. In short, the flame spreads more rapidly with an increased orifice size.
In addition, the onset of detonations, characterised by the sudden drop in flame surface length in Fig. 14 (a) is notably different when the size of the orifice changes. This is also shown in Fig. 15 (b) where the schlieren fields of each cases after the detonation is presented. The detonation occurs the latest for d = 0.5 mm at 965 µs compared to the cases with a larger orifice. This is mainly because a larger orifice enables a more rapid flame expansion and distortion. These trends are consistent with the experimental findings from Zhou et al. 20,36 . In addition, we observe that the location in the main chamber where the detonation occurs vary significantly, but all of which are near the chamber wall. As mentioned above, DDT is, by nature, a strongly stochastic process, and a small variations in the initial conditions (temperature, pressure, etc.) or numerical parameters can change the time and location where DDT occurs. Gamezo et al. 26 also pointed out that some systems are more susceptible to the stochastic behaviour than others, depending on the geometries and initial conditions involved. It is therefore interesting to evaluate the level of stochasticity of the problem with different orifice sizes to understand how small changes affect the large-scale behavior of the system. Here, we vary the initial background temperatures within a very small interval of 0.005 K or 0.1 K for the case of d = 3, 1.5, and 0.5 mm and the computed results are shown in Fig. 16. The variations in temperature is too small to have a systematic effect on the solution, and is used to study the stochastic dispersion for DDT. For the case of d = 3 mm (black lines), the results with varying initial temperatures show relatively little difference. For d = 1.5 mm (red lines), the computational results show a wider deviation and the detonation occurs in a range from 0.85 ∼ 0.9 ms. As the orifice size is further decreases to 0.5 mm (blue lines), the results deviate even further from each other. The trend suggests that the system with a smaller orifice are more susceptible to the stochastic behavior than that with a larger orifice. This large deviation could be a potential danger for cases where the occurrence of DDT is to be controlled in time and space.

V. Summary and Conclusions
Multidimensional, unsteady numerical simulations of an initially premixed stoichiometric ethylene-oxygen mixture in a closed chamber were performed to investigate the flame ac-celeration through a small orifice, flame distortion by shock waves, and the end-wall autoignition process.
The simulation revealed the overall process of flame formation, propagation, and transition to detonation. Initially, a laminar flame propagates in the left chamber, producing a series of crisscrossed lines of local pressure waves. As the flame propagates through the orifice, a turbulent jet flame is formed, where the flame surface length and flame speed increases drastically. As the pressure waves coalesce, a strong leading shock forms ahead of the flame. The reflection of the shock wave from the chamber wall, in turn, interacts with the propagating flame, producing small perturbations on the flame surface. This shock-flame interaction induces the subsequent turbulence and is crucial to the detonation ignition. Eventually, detonations occur due to shock-focusing through a direct initiation mechanism, where multiple shocks collide at the flame front. In addition, the effect of orifice size on flame propagation and ignition is investigated. With an increased orifice size, the flame spreads more rapidly, but the detonation ignition mechanism remains the same. Simulations at slightly different temperatures show that the close-chamber DDT is a highly stochastic process, and the system with a smaller orifice is more sensitive to the stochastic behaviour.
A chemical explosive mode analysis (CEMA) based diagnostic was then applied by projecting chemical and diffusive source terms to the direction of the CEM. The validity of the criterion in the one-step chemical model was first demonstrated in a premixed ethylene/oxygen 1D freely propagating laminar flame, a fast deflagration flame, and a CJ detonation. A flame propagation mode indicator was constructed at a representative progress variable in the preheat zone of the premixed flame, and shown to be robust in distinguishing between the deflagration and autoigniting waves. The CEMAbased criterion was further applied to the 2D simulation data of flame acceleration and DDT in a closed chamber. A strong thermal expansion region characterised by high CEM eigenvalue λ e was observed prior to detonation initiation. Moreover, before and during detonation initiation, the CEMA criterion showed that chemistry is significantly more important than diffusion in this region. The dominance of autoignition mode in the preheat zone thus can serve as a precursor of DDT. The CEMA-based tool employed in this study provides a robust diagnostic for identifying detonation onset. In the context of high-fidelity cycle based engine simulations, this criterion could be used to systematically identify deflagration and detonation regions based on local information only.