ChemZIP : Accelerated Modeling of Complex Aerothermochemical Interactions in Novel Turbomachines for Sustainable High-Temperature Chemical Processes Dylan Rubini, Budimir Rosic Abstract This paper introduces a new platform to accelerate the modeling of complex aerothermochemical interactions in new turbomachines, called turbo-reactors, to decarbonise chemical processes. While previous work has aerothermally demonstrated the potential to decarbonize the heat input to the reaction, optimizing the reaction efficiency has been a challenge. This is because measuring reaction performance with aerochemical simulations is computationally prohibitive due to the uniquely complex aerodynamics and chemistry within turbomachines. To address this, we introduce a new multifidelity machine-learning-assisted methodology, called ChemZIP , to mitigate this bottleneck. Although data-driven methodologies exist for combustion, modeling reactive flows along the bladed path of a turbomachine poses new challenges. This has led to a novel training data generation process, which allows rich dynamic responses of the chemical system to be embedded into the training dataset at a fraction of the cost of reacting flow simulations. The resulting high-dimensional composition vector is compressed into a low-dimensional basis using an autoencoder-like neural network, inspired by but more universal than traditional flamelet-generated manifolds. Verification against 10,000 unseen one-dimensional test conditions shows an R 2 R^{2} score exceeding 95% across all quantities of interest. Following this, ChemZIP is coupled into a fully-fledged viscous computational fluid dynamics solver. For a set of process-relevant three-dimensional configurations entirely different from the training data, the predictive accuracy of the thermochemical state remains within 10% of an industry-standard solver ( Fluent ) while convergence is achieved 50 times faster, even for a small mechanism. Therefore, numerical computations are sufficiently fast that aerothermochemical optimization is now feasible for the first time in the design cycle of the turbo-reactor. Keywords : Chemical processes, chemical kinetics, reacting flow, scientific machine learning, stiff problems, neural networks, autoencoders, turbomachinery, turbo-reactor, RotoDynamic Reactor. Highlights • Complex aerothermochemical interactions exist in a new class of turbomachines. • A machine-learning-assisted platform for accelerating reactive flows is introduced. • ChemZIP is 50 times faster than state-of-the-art acceleration methods in Fluent. • The accuracy is within 10% of Fluent for a long 3D heated duct domain. • ChemZIP will enable aerochemically-guided design optimization for the first time. Nomenclature Roman Symbols c_{p} Isobaric specific heat capacity \mathrm{J}\text{\,}{\mathrm{kg}}^{-1}\text{\,}{\mathrm{K}}^{-1} \bar{D}_{k} Molecular diffusivity of k^{\mathrm{th}} species {\mathrm{m}}^{2}\text{\,}{\mathrm{s}}^{-1} \bm{D}_{\mathrm{eff}} Total diffusivities matrix \in\mathbb{R}^{K\times K} {\mathrm{m}}^{2}\text{\,}{\mathrm{s}}^{-1} \bm{D}_{Z} Meta species diffusivities matrix \in\mathbb{R}^{M\times M} - \mathscr{F}_{\mathrm{NN,Z}} Latent dynamic response approximator - \mathscr{F}_{\mathrm{NN}} Neural network function approximator - \mathbf{J} Species Jacobian matrix \in\mathbb{R}^{K\times K} {\mathrm{s}}^{-1} \mathbf{J}_{\phi} Encoder Jacobian matrix \in\mathbb{R}^{M\times K} - \mathbf{J}_{\psi} Decoder Jacobian matrix \in\mathbb{R}^{K\times M} - K Number of species - M Number of latent meta species - N Number data points - p Static pressure \mathrm{Pa} \dot{Q} Imposed heat flux \mathrm{kW}\text{\,}{\mathrm{m}}^{-2} R Specific gas constant \mathrm{J}\text{\,}{\mathrm{kg}}^{-1}\text{\,}{\mathrm{K}}^{-1} R^{2} Coefficient of determination - T Static temperature \mathrm{K} t Time \mathrm{s} \vec{\mathbf{u}} Velocity vector \mathrm{m}\text{\,}{\mathrm{s}}^{-1} \mathbf{W} Output dynamic response training data matrix \in\mathbb{R}^{N\times K+4} - \mathbf{X} Input space training data matrix \in\mathbb{R}^{N\times K+2} - \bm{Y} Mass fraction vector \in\mathbb{R}^{K} % Y_{k} Mass fraction of the k^{\mathrm{th}} species % \bm{Z} Meta species mass fractions vector \in\mathbb{R}^{M} - Z_{k} Mass fraction for the m^{\text{th}} latent meta species - Greek Symbols \alpha_{T} Molecular thermal diffusivity {\mathrm{m}}^{2}\text{\,}{\mathrm{s}}^{-1} \mu Molecular/laminar viscosity \mathrm{Pa}\text{\,}\mathrm{s} \mu_{t} Turbulent viscosity \mathrm{Pa}\text{\,}\mathrm{s} \bm{\dot{\omega}} Species net production rate vector \in\mathbb{R}^{K} {\mathrm{s}}^{-1} \dot{\omega}_{k} Net production rate of k^{\mathrm{th}} species {\mathrm{s}}^{-1} \dot{\omega}_{T} Reaction heat release/absorption rate \mathrm{W}\text{\,}{\mathrm{m}}^{-3} \bm{\dot{\omega}}_{Z} Net production rate vector for the latent meta species \in\mathbb{R}^{K} - \dot{\omega}_{Z_{m}} Net production rate of the m^{\text{th}} meta species - \rho Density \mathrm{kg}\text{\,}{\mathrm{m}}^{-3} \tau_{c_{k}} Characteristic chemical time-scale \mathrm{s} \tau_{f} Characteristic fluid time-scale \mathrm{s} Non-Dimensional Groups Le_{k} Lewis number for k^{\mathrm{th}} species Sc_{t} Turbulent Schmidt number Superscripts \bar{\square} Mixture averaging \overline{\square} (Time/Reynolds) averaging \square^{\prime} Fluctuating component \widehat{\square} Reconstructed/predicted quantity Subscripts \square_{j} Reaction index \square_{k} Species index \square_{m} Latent meta species index Acronyms / Abbreviations AE Autoencoder ANN Artificial neural network CFD Computational fluid dynamics DACM Dynamic adaptive chemistry method DCZ Dynamic cell zoning DI Direct integration (of the chemical kinetics) FGM Flamelet generated manifold FOM Full-order model ISAT In situ adaptive tabulation LUT lookup table MAPE Mean absolute percentage error ML Machine learning MSE Mean square error NMdAE Normalised median absolute error NN Neural network NRMSE Normalised root mean square error PCA Principal component analysis PFR Plug-flow reactor RANS Reynolds-averaged Navier-Stokes TCI Turbulence-chemistry interactions TF TensorFlow 1.  Introduction 1.1 Motivation and Background Figure 1: Electrified turbo-reactor could decarbonise many hard-to-abate industrial processes. The turbomachinery-based turbo-reactor concept shown in Fig. 1 is capable of decarbonizing the fired process heat within 40 hard-to-abate, high-temperature ( $400\text{\,}\mathrm{\SIUnitSymbolCelsius}$\leq T\leq$1700\text{\,}\mathrm{\SIUnitSymbolCelsius}$ ) industrial processes ranging from steel and cement to chemicals and plastic recycling. This singular turbomachinery concept has the potential to eliminate a large fraction of greenhouse gas emissions due to industrial energy consumption, which was around 25% of global emissions in 2020 [ 1 ] . Previous work demonstrated the feasibility of transferring a process-specific amount of energy to a range of working fluids over a distance 10 to 20 times less than an axial compressor without system instability [ 2 , 3 , 4 , 5 , 6 ] . This was shown purely from an aerothermal perspective using nonreacting low/high fidelity numerical simulations. However, in many applications of the turbo-reactor, the working fluid undergoes a thermochemical decomposition reaction ( e.g., methane reforming, pyrolysis, ammonia cracking, etc.) to produce valuable products at the outlet while trying to minimize unwanted secondary products. Therefore, aerochemical interactions along the bladed path are fundamental to the process for the first time in turbomachinery. As explained in Rubini, Rosic & Xu [ 7 ] , there is now a new turbomachinery design landscape to go beyond traditional aerothermal design optimization and instead aerothermo chemically optimize the stage design to produce a reaction-efficient temperature distribution. However, although this is vital for the success of the turbo-reactor concept, aerothermochemical design optimization has been left virtually unexplored because of the prohibitive computational burden of reacting flow simulations using realistic, detailed, and comprehensive chemical kinetic models. Even for a simple kinetic model with 65 species simulated on a coarse 1-million-node mesh, a reacting flow solution can take \sim 3 days to converge on a typical workstation despite employing state-of-the-art acceleration strategies for reacting flows. Now imagine querying an objective function at least 100 to 1000 times in a multi-query optimization/exploration outer loop. This would take years, which is by definition intractable. Moreover, in practice, the goal is to accommodate more comprehensive and thus realistic kinetic models [ 8 ] to improve the accuracy of reaction modeling under a wide range of conditions. For propane pyrolysis for the production of olefins [ 9 , 10 ] , a detailed mechanism can contain more than 900 species and almost 10,000 reactions [ 11 ] (which is, in fact, 4 to 5 times larger than a typical detailed kinetic model of natural gas combustion [ 12 ] ). This issue of dimensionality is exacerbated by the use of high carbon number feedstocks in the chemical industry, such as naphtha (which contains molecules with up to 12 carbon atoms). Even with current state-of-the-art acceleration strategies available for reacting flows in chemical engineering, such as in situ adaptive tabulation (ISAT) [ 13 ] , incorporating more than 10 to 20 species is not feasible at the industrial design level [ 14 ] . On the other hand, in numerical combustion modeling, the flamelet-generated manifold (FGM) approach [ 15 ] has proven to be a highly efficient compression mechanism for flame calculations. However, in its current form, it is only applicable to combustion and is therefore not universal. Consequently, optimization of the reaction performance in the turbo-reactor has so far been restricted to simple, idealized, homogeneous 1-D chemical kinetic calculations. Although this can give realistic estimates for simple flows such as tubular chemical furnaces [ 14 ] , the same cannot be said for complex aerothermal phenomena observed in the turbo-reactor. As a result of the extreme power density, Fig. 2 shows strong temperature gradients in the flow much higher in intensity than traditional furnace-based chemical devices. These are due to flow features such as shock systems and flow separations. As a knock-on effect, the reaction operates in a highly nonequilibrium state (see Fig. 3 ), adding a further layer of complexity. Therefore, to date, more accurate predictions of basic performance metrics have only been available after costly and time-consuming physical experiments—and these are severely limited by low spatial resolution, so cannot guide design optimization. Figure 2: High-fidelity numerical simulation showing the instantaneous temperature gradients present in the flow. Figure 3: Schematic illustration of the reaction response to representative temperature gradients in the turbo-reactor compared to those in a tubular pipe of a conventional furnace. The aforementioned limitations of the current design system can lead to disastrously sub-optimal reaction efficiency measured for the manufactured machine (relative to the design intent) and result in expensive iterative re-design and re-manufacturing. Given the accelerating climate emergency and the urgency for the net-zero transition, this laborious process is not sustainable. 1.2 Contributions in this Paper To overcome the limitations of traditional physics-based computational acceleration strategies ( e.g., ISAT) for reactive flows, this paper introduces a new multifidelity efficiently-coupled machine-learning-enhanced (ML) aerochemical modeling methodology called ChemZIP . This approach is more scalable to detailed kinetics than ISAT and more universal than FGM (applicable to both processes in chemical engineering and combustion), and the computational time for convergence is orders of magnitude faster than that of traditional approaches. Despite some loss of absolute accuracy, this is acceptable for design optimization if trends are well predicted. Although ML approaches have been proposed for numerical combustion modeling [ 16 , 17 , 18 , 19 , 20 , 21 ] , ChemZIP introduces new contributions to the field due to the novelty of the application. To capture the unique level of complexity within the flow (see Figs. 2 & 3 ), this methodology offers a new strategy to embed the dynamic response of complex flow physics and detailed chemistry into the training database within only a few hours. The outline of the paper is as follows. Section 2 , presents the basic working principles of the turbo-reactor concept for decarbonizing chemical processes. Section 3 presents the challenges of modeling reactive flows in the turbo-reactor before highlighting the limitations of both traditional physics- and data-driven acceleration techniques. Section 4 explains the new ChemZIP methodology. Following this, Section 5 presents a detailed verification and performance benchmarking study comparing ChemZIP against an industry-standard computational fluid dynamics (CFD) solver, Fluent , within a multidimensional viscous flow environment. Finally, a first-of-its-kind proof-of-concept numerical simulation of aerochemistry along the bladed path of a turbomachine ( i.e., the turbo-reactor) is showcased. Although the ChemZIP platform is introduced in the context of conducting endothermic gas-phase chemistry within a turbomachine, it can also be applied to a wide variety of applications where high-dimensional chemistry is the computational bottleneck. This would require additional physics to be added such as photochemistry for atmospheric chemistry [ 22 ] , charge transfer reactions for electrochemical devices [ 23 ] , heterogeneous catalytic surface reactions for catalytic reactors [ 24 ] , and electronic impact energy transfer reactions for plasma applications [ 25 ] . 2.  The Ultra-High Power Density Turbo-Reactor Concept Direct electrification is likely to be the most cost-effective solution for decarbonizing hard-to-abate processes such as hydrocarbon & ammonia cracking and sustainable feed/fuel production. Burning hydrogen is too expensive [ 26 ] and high-temperature, high-capacity electric resistance furnaces have severe limitations such as oxidation and an irreducibly large footprint. Therefore, the turbo-reactor concept has been introduced to replace high-temperature industrial furnaces with an electric-motor-driven turbomachine powered by renewable electricity (see Figs. 1 & 2 ). Direct mechanical energy transfer in the turbo-reactor—equivalent to volumetric heating—enables a 500 times increase in power density relative to surface heat exchange in conventional furnaces. By converting almost all of the mechanical energy imparted into static temperature rather than pressure of the fluid, an enthalpy input rate 10 to 20 times higher than conventional energy-imparting turbomachines ( i.e., compressors) is possible. Volumetric heating combined with streamwise temperature profile controllability, extreme turbulent mixing, lateral temperature uniformity, and a short reaction time scale enables substantial improvements in reaction performance, contributing to a more cost-effective process. For more detailed on the working principles of the turbo-reactor concept, the reader is refereed to Refs. [ 7 , 2 , 3 , 4 ] 3.  Modeling Aerochemical Interactions 3.1 Challenges Modeling nonequilibrium finite rate chemistry [ 23 , 27 ] is one of the biggest challenges in computational science for two reasons. First, the problem is high-dimensional with an additional K nonlinearly coupled species conservation equations. In many chemical processes such as olefin production, K can reach 900 for accurate kinetics [ 11 ] . Second, chemical kinetics are highly nonlinear, multiscale, and numerically stiff with characteristic chemical timescales ranging from seconds to picoseconds [ 12 ] . Therefore, stiff implicit time integrators are necessary to correctly scale the effective time step for each species [ 23 ] . The implicit methods require inversion of the Jacobian matrix \mathbf{J}\in\mathbb{R}^{K\times K} . Since this operation scales cubically with the size of the matrix \mathcal{O}(K^{3}) , modeling detailed chemistry is intractable [ 8 ] . These challenges are exacerbated by modeling the complex flow physics in the turbo-reactor. This is because intense gradients in the flow mean (see Figs. 2 & 3 ) that more complex kinetic models and higher resolution computational grids are necessary. 3.2 Limitations of Existing Accelerations Approaches In most industrial applications, direct integration (DI) of the reaction network is replaced by physics-based computational acceleration strategies introduced below. However, these approaches are inadequate for many applications, either due to insufficient speedup or inadequate universality. 3.2.1 Physics-Driven For complex feedstocks used in the chemical industry, such as (bio/synthetic) naphtha or fuels for combustion, skeletal mechanisms produced by mechanism reduction [ 28 , 29 ] can have 50 to 200 species, which are still prohibitively costly for 3D viscous reacting flow simulations for an industrial setting. A somewhat greater level of computational acceleration can be achieved by building reduced kinetic models “on the fly” locally within each cell of the mesh using the dynamic adaptive chemistry method (DACM) from Liang, Stevens & Farrell [ 30 ] ; however the speedup is still not enough for many problems. To alleviate the overhead of evaluating the chemical source terms \dot{\omega}_{k} and inverting the Jacobian matrix, Pope [ 13 ] introduced the ISAT method to dynamically grow a look-up table (LUT) in real-time in each mesh cell with a specified error tolerance. ISAT only works well for small mechanisms of less than 50 species because storage and retrieval costs scale quadratically \mathcal{O}(K^{2}) with the number of species [ 31 ] and it does not alleviate the large number of transport equations. This challenge can be addressed using FGM, which projects the high-dimensional thermochemical state vector onto a two-dimensional basis formed by the mixture fraction and the reaction progress variables [ 15 , 32 ] . However, this method relies on the notion of a flamelet and requires process-specific expert knowledge to define the reduced-dimensionality state space. 3.3 Data-driven Acceleration Approaches 3.3.1 Why Machine Learning? By using a machine-learning-assisted methodology, it is possible to learn a low-dimensional thermochemical latent space (similar to FGM) automatically and for an arbitrary reaction process (not just combustion), while simultaneously learning an ultrafast approximation for the chemical source term mappings. The rich and flexible nonlinear representational capacity of neural networks can overcome the curse of dimensionality [ 33 ] of tabulation-based methods and the lack of functional expressiveness of reduced skeletal mechanisms, in addition to providing a level of universality that is not possible with FGM. Fundamentally, compression of high-dimensional chemical systems is justified by the fact that trajectories in phase space are naturally attracted to low-dimensional manifolds, as shown in Fig. 4 , suggesting reducible redundancy in the governing physics. Figure 4: Schematic illustration of a low-dimensional manifold in composition phase space. Figure 5: Schematic of the training data generation workflow for the ChemZIP methodology. 3.3.2 Existing Implementations Since the 1990s artificial neural networks (ANN) have been used to approximate the costly functional mapping between the net species production rate vector \bm{\dot{\omega}}=[\dot{\omega}_{1},\ldots,\dot{\omega}_{K}]^{\top} and the static temperature T , static pressure p , and mass fraction vector \bm{Y}=[Y_{1},\ldots,Y_{K}]^{\top} : \bm{\dot{\omega}}\approx\mathscr{F}_{\mathrm{NN}}(T,p,\bm{Y}), (1) where \mathscr{F}_{\mathrm{NN}} represents the neural network (NN) mapping operator. Today, neural networks are used extensively for chemical systems, as illustrated in Refs. [ 34 , 16 , 35 , 36 , 37 , 38 , 21 , 24 , 17 ] . However, in their most basic form, ANNs do not eliminate numerical stiffness or address the large number of transport equations for detailed kinetic models. Neural operators [ 18 ] have provided a solution for the first problem and principal component analysis (PCA) or autoencoder NNs to the latter [ 19 , 39 , 40 , 20 , 41 , 42 , 43 , 44 , 45 ] . Additionally, neural ordinary differential equation (ODE) solvers have also been widely used as an efficient way to combine the ODE integrator with the NN nonlinear regression approximation of the source term [ 46 ] . 4.  ChemZIP: An Aerochemical Modeling Methodology In this section, the implementation details of the new ChemZIP methodology will be described, including the generation of training data, the neural network architecture, and the treatment of kinetic-fluid coupling. The new ChemZIP methodology uses a NN architecture to compress the high-dimensional thermochemical space \mathcal{O}(200-1000) onto a substantially lower-dimensional manifold \mathcal{O}(3) , embedded in the original state space. Here, the dynamics of the system can be tracked efficiently. In latent space, the reduced set of metaspecies mass fractions are mapped to their corresponding source terms, which correspond to a projection of the physical dynamic response into latent space. The approximate chemical system is then coupled with an arbitrary-fidelity flow solver without sacrificing the accuracy of the preexisting aerothermal transport modeling. So far in this work, simpler implementation approaches have been adopted since the objective of this paper primarily is to prove the viability of the methodology. 4.1 Training Data Generation Figure 6: A selection of 10 (out of 10,000) example training data 1-D PFR reactor simulations showing ( a ) the heat flow ( b ) the reaction heat absorption rate on a log scale ( c ) the dry propane yield and ( d ) the propane net production rate on a log scale. The quality of any machine learning method usually boils down to the quality and size of the suite training data. In computational science, training data generation is often the bottleneck of an ML pipeline. The ChemZIP methodology addresses this challenge by simplifying the chemistry model down to a perfectly-mixed, constant-area 1-D plug-flow reactor (PFR) while maintaining an accurate and detailed kinetic model with \mathcal{O}(200-1000) species. By reducing the cost of a simulation, tens of thousands of different conditions for the detailed kinetic model can be predicted in just a few hours (on an 18-core CPU), thus eliminating the training data generation bottleneck. Neural networks are ultimately just universal input–output function approximators. Therefore, even in a simplified 1D environment, if we generate training data in such a way that all possible realizable combinations of the inputs Y_{k} , T & p are mapped to the dynamic response ( outputs ) of the reaction network in terms of the net species production rates \dot{\omega}_{k} , as well as \dot{\omega}_{T} , c_{p} , R , & the molecular viscosity \bar{\mu} , then in theory, with a sufficiently large NN function approximator, any thermochemical input state could be accurately mapped to the output reaction response. However, to make this problem tractable, the phase-space exploration is constrained to turbo-reactor-relevant conditions. In order to capture the wide range of complex dynamic response regimes (see Figs. 2 & 3 ) within the turbo-reactor, first, a nonreacting precursor CFD simulation is conducted to determine the envelope of realistic temperature gradients seen by a fluid parcel traveling along the bladed flow path ( e.g., across a shock). This forms the first component of the overall training data generation workflow shown in Fig. 5 . The next step is to randomly sample several thousand heat flux profiles within the envelope of temperature gradients set by the precursor nonreacting CFD (see Fig. 5 ). By perturbing the reaction through sharp gradients in heat input to the reaction, the dynamic response of the reaction system ( \dot{\omega}_{k} , \dot{\omega}_{T} , c_{p} , etc.) can be explored and recorded under a wide range of thermochemical conditions (see Fig. 5 ). By repeatedly perturbing the reaction at different rates and at different times, the sensitivities (transfer functions) of the reaction system are generated; this should allow the downstream learning algorithm to construct a manifold that approximates the high-dimensional trajectory through the composition space (see Fig. 4 ). A key enabling assumption of this approach is that the reaction is strongly temperature-driven rather than mixing-driven like in many combustion problems. The method described above is agnostic to the kinetic model and/or initial composition used. To the best of our knowledge, this perturbation-based training data generation strategy has not yet been leveraged in the literature. 4.1.1 Sample Space The shape of each heat flux profile is set by N_{\text{control}} control points (see Fig. 6 ( a )), where N_{\text{control}} is typically around 10 to 20. At each independent control point, the following control parameters can be varied to shape the heat flux profile: the residence time between control points ( \Delta t ), the heat input level ( \Delta h_{0} ), the heat input ramp rate, and the heat loss level (see Fig. 6 ). The heat input can be either positive or negative to simulate both heating and cooling. In addition, the pressure level can also float. If N_{\text{control}}=15 , this means that the total dimensionality of the sample space would be 15\times 5=75 -D. Figure 7: Schematic illustration showing the ChemZIP chemical autoencoder NN architecture for compressing the thermochemistry and coupling with a 3-D viscous CFD flow solver. Sobol sampling [ 47 ] is used to distribute the samples uniformly in this high-dimensional ( e.g., 75-D) space. On the order of 5,000 to 10,000 heat flux profiles are randomly generated. To diversify the sample space, 2,500 constant-heat-flux samples are added where only the magnitude is randomly varied on a log scale. For control parameters that are allowed to change over many orders of magnitude, such as the “residence time between control points”, sampling can be performed on a logarithmic (rather than linear) scale to better spread the samples [ 17 ] . 4.1.2 One-Dimensional Plug Flow Reactor Model For each heat flux profile realization, a constant-pressure 1-D PFR simulation is run (see Figs. 5 & 6 ) using Cantera [ 48 ] . For each realization, the simulation is shutdown early if the temperature exceeds a user-defined limit of T_{\mathrm{max.}}=$1150\text{\,}\mathrm{\SIUnitSymbolCelsius}$ , which is 15% higher than the maximum allowable operating temperature of the turbo-reactor. To allow a larger number of training data points to be clustered around regions of more complex reaction dynamics (which are thus challenging to capture), Cantera is set to take adaptive time steps. The underlying time integrator naturally distributes more time steps in regions of high gradients where the truncation error rises above a threshold. Rather than storing the data for each time step, the data is subsampled every two to four steps. 4.2 The Training Database For each heat flux profile, \mathcal{O}(1000) time steps are taken and the thermochemical state and rich dynamic response of a detailed mechanism are stored in a training database. The input state for the training database can be written as \mathbf{X}\in\mathbb{R}^{N}\times\mathbb{R}^{K+2} , where \mathbf{X}=\text{\tiny time}\left\downarrow\vphantom{\begin{bmatrix}Y_{1}(t_{1})&Y_{2}(t_{1})&\cdots&Y_{K}(t_{1})&T(t_{1})&p(t_{1})\\ Y_{1}(t_{2})&Y_{2}(t_{2})&\cdots&Y_{K}(t_{2})&T(t_{2})&p(t_{2})\\ \vdots&\vdots&\ddots&\vdots&\vdots&\vdots\\ Y_{1}(t_{N})&Y_{2}(t_{N})&\cdots&Y_{K}(t_{N})&T(t_{N})&p(t_{N})\end{bmatrix}}\right.\overset{\xrightarrow[\hphantom{\begin{bmatrix}Y_{1}(t_{1})&Y_{2}(t_{1})&\cdots&Y_{K}(t_{1})&T(t_{1})&p(t_{1})\\ Y_{1}(t_{2})&Y_{2}(t_{2})&\cdots&Y_{K}(t_{2})&T(t_{2})&p(t_{2})\\ \vdots&\vdots&\ddots&\vdots&\vdots&\vdots\\ Y_{1}(t_{N})&Y_{2}(t_{N})&\cdots&Y_{K}(t_{N})&T(t_{N})&p(t_{N})\end{bmatrix}}]{\text{state variables}}}{\begin{bmatrix}Y_{1}(t_{1})&Y_{2}(t_{1})&\cdots&Y_{K}(t_{1})&T(t_{1})&p(t_{1})\\ Y_{1}(t_{2})&Y_{2}(t_{2})&\cdots&Y_{K}(t_{2})&T(t_{2})&p(t_{2})\\ \vdots&\vdots&\ddots&\vdots&\vdots&\vdots\\ Y_{1}(t_{N})&Y_{2}(t_{N})&\cdots&Y_{K}(t_{N})&T(t_{N})&p(t_{N})\end{bmatrix}}, (2) and the output response \mathbf{W}\in\mathbb{R}^{N}\times\mathbb{R}^{K+4} as \mathbf{W}=\begin{bmatrix}\dot{\omega}_{1}(t_{1})&\cdots&\dot{\omega}_{K}(t_{1})&\dot{\omega}_{T}(t_{1})&c_{p}(t_{1})&c_{v}(t_{1})\\ \dot{\omega}_{1}(t_{2})&\cdots&\dot{\omega}_{K}(t_{2})&\dot{\omega}_{T}(t_{2})&c_{p}(t_{2})&c_{v}(t_{2})\\ \vdots&\ddots&\vdots&\vdots&\vdots&\vdots\\ \dot{\omega}_{1}(t_{N})&\cdots&\dot{\omega}_{K}(t_{N})&\dot{\omega}_{T}(t_{N})&c_{p}(t_{N})&c_{v}(t_{N}))\end{bmatrix}. (3) where \dot{\omega}_{T} is the reaction heat adsorption rate, c_{p} is the isobaric heat capacity, c_{v} is the isochoric heat capacity. If necessary, molecular viscosity can also be added to the output response matrix. By applying the frozen chemistry assumption, other thermodynamic properties can be calculated from c_{p} and c_{v} . The temporal snapshots stored for each heat flux profile realization are stacked vertically in Eqs. 2 & 3 . Therefore, the training library maps all composition-dependent variables from the thermochemical input state to their output response \{\mathbf{X}\mapsto\mathbf{W}\} (see Fig. 5 ). This forms a large corpus of training data, where N=\mathcal{O}(5\text{ million}) samples for each variable. 4.3 Data-Driven Kinetics Compression Once the training database has been compiled (see Eqs. 2 & 3 ), Fig. 7 shows how machine learning is exploited to compress the high-dimensional thermochemical space onto a low-dimensional manifold using an encoder— \phi:\mathbb{R}^{K}\mapsto\mathbb{R}^{M},\text{where}\\ M\ll K —while simultaneously learning a regression mapping for the dynamic response in latent space \bm{\dot{\omega}}_{Z}=\mathscr{F}_{NN,Z}(T,p,\bm{Z}) . Although not strictly correct, it is helpful to think of the latent space basis as a set of “meta” or artificial species. During training, a mapping \mathbf{J}_{\phi} between the metaspecies mass fractions \bm{Z}=[Z_{1},Z_{2},\ldots,Z_{M}]^{{}^{\top}} , physical temperature & pressure, and the reaction rates projected into the latent space \bm{\dot{\omega}}_{Z}=[\dot{\omega}_{Z_{1}},\dot{\omega}_{Z_{2}},\ldots,\dot{\omega}_{Z_{M}}]^{\top}=\mathbf{J}_{\phi}\bm{\dot{\omega}} is learned (see Fig. 7 ). The source terms \bm{\dot{\omega}}_{Z} —a lumped representation of the dynamic response in latent space—are coupled with a convection-diffusion transport equation in a standard CFD flow solver. Time integration can then be performed in reduced latent space, before the full multi-species spatiotemporal distribution of mass fractions in physical space \widehat{Y}_{k} is recovered/reconstructed during post-processing. The following subsections explain each of the components of the full ChemZIP workflow. More information can be found in Ref. [ 49 ] and finer details on the neural network architecture and training procedure can be found in Appendix 6 . 4.3.1 Linear Compression The encoder in Fig. 7 represents a coordinate system transformation. To understand this transformation, we start with the vector species conservation equations multiplied by the transformation/projection operator \mathbf{J}_{\phi}\in\mathbb{R}^{M\times K} on both sides: \mathbf{J}_{\phi}\left(\frac{\partial\rho\bm{Y}}{\partial t}+\nabla\cdot(\rho\vec{\mathbf{u}}\bm{Y})+\nabla\cdot(\bm{D}_{\mathrm{eff.}}\nabla\bm{Y})\right)=\rho\mathbf{J}_{\phi}\bm{\dot{\omega}} (4) where \rho is density, \vec{\mathbf{u}} is the velocity vector, and \bm{D}_{\mathrm{eff.}}=\rho\bar{\bm{D}}+\frac{\mu_{t}}{Sc_{t}}\in\mathbb{R}^{K\times K} is a square diagonal matrix of effective diffusion coefficients for all species, and \mathbf{J}_{\phi}=\frac{\partial\bm{Z}}{\partial\bm{Y}}\equiv\bigg[\frac{\partial\bm{Z}}{\partial Y_{1}},\ldots,\frac{\partial\bm{Z}}{\partial Y_{K}}\bigg]=f(\text{NN params., activations}), (5) represents the Jacobian of the transformation mapping \phi provided by the encoder (see Fig. 7 ). The encoder can either be linear or nonlinear. Within ChemZIP , a linear mapping is used to prevent additional nontrivial closure terms appearing in the latent space governing equations. This means that \mathbf{J}_{\phi} becomes a M\times K linear projection matrix composed of constant weightings that do not vary in space & time and are independent of thermochemical state. The projection matrix can therefore pass through the differential operators: \frac{\partial\rho\bm{Z}}{\partial t}+\nabla\cdot(\rho\vec{\mathbf{u}}\bm{Z})+\nabla\cdot(\bm{D}_{Z}\nabla\bm{Z})=\rho{\color[rgb]{1,0,0}\bm{\dot{\omega}}_{Z}}(T,p,\bm{Z}), (6) where {\color[rgb]{1,0,0}\bm{\dot{\omega}}_{Z}}(T,p,\bm{Z})=\mathbf{J}_{\phi}\bm{\dot{\omega}} , \bm{Z}=\mathbf{J}_{\phi}\bm{Y} and \bm{D}_{Z}\in\mathbb{R}^{M\times M} is the diffusivity matrix for the metaspecies. This is equivalent to \bm{D}_{Z}=\mathbf{J}_{\phi}\bm{D}_{\mathrm{eff.}}\mathbf{J}_{\phi}^{-1} , which simplifies to \bm{D}_{Z}\equiv\left(\rho\bar{D}+\frac{\mu_{t}}{Sc_{t}}\right)\bm{I} , where \bm{I}\in\mathbb{R}^{M\times M} is the identity matrix, assuming that the molecular diffusion coefficient for all species is equal to \bar{D} . Effectively, the latent space metaspecies become linear combinations of the high-dimensional physical species mass fractions, for example: Z_{1}=a_{1}Y_{1}+a_{2}Y_{2}+\ldots+a_{K}Y_{K}, (7) where a_{1} to a_{K} are the optimized NN weights (see Fig. 7 ). The projection matrix is formed from an autoencoder-like NN with only a single hidden layer and linear activation functions. Although this is approximately equivalent to PCA [ 33 ] , when it is formulated as a neural network, the latest specialized ML optimization algorithms can help training scale to very large datasets not possible with standard PCA. 4.3.2 Non-Linear Reconstruction In contrast with the encoder, the decoder is formed from a nonlinear multi-layer fully-connected autoencoder NN. The decoder is used to reconstruct the physical species mass fractions from low-dimensional space through the following transformation \bm{\widehat{Y}}=\mathbf{J}_{\psi}\bm{Z} , where the Jacobian of the decoder \psi:\mathbb{R}^{M}\mapsto\mathbb{R}^{K} is \mathbf{J}_{\psi}=\frac{\partial\bm{Y}}{\partial\bm{Z}} and \widehat{\square} signifies a reconstructed quantity (see Fig. 7 ). Despite using linear encoding for the reasons described above, applying non-linear decoding can condition the manifold while providing a smoother and higher-quality topology [ 41 ] . In contrast with encoding, nonlinear reconstruction does not introduce additional nontrivial closure terms because it is only the variables that are decompressed, not the governing equations. Although nonlinearity can benefit the representational capacity and manifold topology, it may also have adverse effects on generalization that should be further investigated. 4.3.3 Latent Space Dynamic Response Regression In parallel with learning the low-dimensional manifold, a nonlinear regression mapping [\bm{\dot{\omega}}_{Z},\dot{\omega}_{T},c_{p},c_{v},\bar{\mu}]^{\top}=\mathscr{F}_{\mathrm{NN},Z}(T,p,\bm{Z}) (see Fig. 7 ) is learned for the dynamic response of the reaction system projected into latent space (see Eq. 6 ) for a given the state T,p,\bm{Z} . A fully-connected feed-forward neural network—a highly rich and flexible function approximator—is chosen over other methods used in the literature, such as Gaussian processes, which were used by Malik et al. [ 20 ] . Neural networks are preferred because of their scalability to a much larger corpus of training data than other methods. Since Gaussian processes and other such nonparametric kernel methods effectively perform inference through a weighted average over all points in the training dataset, training and inference times scale poorly ( \mathcal{O}(N^{2}) ) to large datasets. It was decided to learn the source terms \bm{\dot{\omega}}_{Z} (from Eq. 4 ) rather than the solution propagator \bm{Z}(t)\to\bm{Z}(t+\Delta t) , as it is simpler to couple with the CFD solver (since operator splitting is not required) . Furthermore, notice that, in Fig. 7 , the NN for the reaction heat absorption rate and the thermophysical properties are also mapped by the function approximator and are now a function of metaspecies rather than physical species mass fractions. During the development of the ChemZIP workflow, three key design decisions were made to improve performance. First, it was decided to incorporate the temperature and pressure dependency of directly as inputs to \mathscr{F}_{\mathrm{NN},Z}(T,p,\bm{Z}) mapping (see Fig. 7 ), rather than passing T & p through the encoder layer. This simplifies and accelerates coupling with the flow solver because the thermochemical state does not need to be repeatedly encoded and decoded at every time integration step to follow changes in temperature. Encoding is done once at the start of a simulation and decoding is done once at the end of a simulation. Second, rather than independently training the NN parameters for the low-dimensional manifold mapping from the parameters for the latent-space dynamic response mapping, they are both trained concurrently. This coupled training procedure helps to avoid complications with a non-unique and non-smooth manifold topology discussed in Ref. [ 50 ] . The combined loss function naturally penalizes poor manifold quality as the fitting error for \mathscr{F}_{\mathrm{NN},Z}(T,p,\bm{Z}) implicitly increases. Finally, in contrast to other researchers who have used approaches physically constrained by Arrhenius’s rate law and the law of mass action in latent space [ 45 ] , we have adopted a purely data-driven approach to approximate \mathscr{F}_{\mathrm{NN},Z}(T,p,\bm{Z}) . This is because our early investigations indicated that the representational capacity and the number of trainable parameters of the physics-inspired approach were insufficient, resulting in an intolerably low level of accuracy. For example, with three metaspecies, a physics-inspired latent dynamics approach would only have around 21 parameters to fit, which is not the case for a purely data-driven approach. Figure 8: Latent space manifold for the training database constructed from Z_{1},Z_{2} & T and colored by the reaction heat absorption rate \dot{\omega}_{T} as the dependent variable (on a log-scale). 4.3.4 Loss Function The NN model was built and subsequently trained using the Keras [ 51 ] and TensorFlow v2.14.0 [ 52 ] APIs, in which the loss function to be minimized ( i.e., \underset{\bm{\theta}}{\text{arg\,min }\mathscr{L}} ) is defined as follows \mathscr{L}=w_{1}\mathscr{L}_{\mathrm{chemistry}}+w_{2}\mathscr{L}_{\mathrm{thermo}} , where \mathscr{L}_{\mathrm{chemistry}}=\underbrace{\lambda_{1}loss\big(\widehat{\bm{Y}}-\bm{Y}\big)}_{\text{reconstruction}}+\underbrace{\lambda_{2}loss\big(trans(\bm{\dot{\omega}}_{Z})-trans(\mathbf{J}_{\phi}\bm{\dot{\omega}})\big)}_{\phi:\text{ encoded dynamics}}\\ +\underbrace{\lambda_{3}loss\big(trans(\bm{\dot{\omega}})-trans(\mathbf{J}_{\psi}\bm{\dot{\omega}}_{Z})\big)}_{\psi:\text{ decoded dynamics}}\\ (8) in which loss(\bm{Y}) is defined as loss(\bm{Y})=\sum_{n=1}^{N}\sum_{k=1}^{K}\log{(\cosh{(Y_{k,n}}))}/(NK) and trans(x) as trans(x)=\text{sign}(x+0.0001)\sqrt{|x+0.0001|} [ 41 ] . The second component of \mathscr{L} is defined as \mathscr{L}_{\mathrm{thermo}}=\text{MSE}(\widehat{c}_{p}-c_{p})+\text{MSE}(\widehat{c}_{v}-c_{v})+\\ loss(trans(\widehat{\dot{\omega}}_{T})-trans(\dot{\omega}_{T})), (9) where MSE( \mathbf{X} ) = \sum_{n=1}^{N}(x_{n}-\widehat{x}_{n})^{2}/N is the mean square error. The structure of the loss function can be broken down as follows. • Reconstruction: the reconstruction loss is the information lost from encoding \to decoding. • Encoded dynamics : an error signal is generated between the actual net species production rates projected into latent space and those predicted by \mathscr{F}_{\mathrm{NN},Z}(T,p,\bm{Z}) . • Decoded dynamics : an error signal is generated between the predicted latent space dynamics projected into physical space and the actual net species production rates. • trans(\cdot) : training NNs is challenging when the outputs vary over many orders of magnitude. Since this is the case for \bm{\dot{\omega}} & \dot{\omega}_{T} (see Fig. 6 ), they are power-transformed to prevent training from skewing toward extreme values by stabilizing the statistical variance [ 24 ] . Errors at low orders are as important as those at high orders. This transformation tends to linearize the input-output relationship, making it easier to learn. Figure 9: Flow chart of the coupling process between the CFD flow solver and the trained ChemZIP model written using the TensorFlow API. • loss(\cdot) : the log-cosh loss function [ 53 ] is used for similar reasons as above. A MSE loss function would bias the model strongly towards high magnitude values for \bm{\dot{\omega}} & \dot{\omega}_{T} , whereas log-cosh provides a more balanced treatment across a range of orders of magnitude. The multiscale nature of some of the dependent variables is a critical challenge for the learning algorithm [ 24 ] . For more details on training the ML model and for values used for the hyperparameters, the reader is referred to Appendix 6 . In the current example, training takes approximately 12 to 24 hours. 4.3.5 Data Preprocessing Pipeline There are two main steps to preprocessing before training, culling unimportant species and scaling the inputs and outputs. The first step in the preprocessing pipeline is to eliminate minor species with low variance across the training dataset using VarianceThreshold() from Scikit-learn . These are typically fast-reacting highly nonlinear intermediate radical species whose concentration distributions we are not interested in predicting. This makes training easier, improves the topology of the manifold, and eliminates numerical stiffness without requiring sophisticated treatments. Following this, it is standard practice to normalize the different inputs ( e.g., temperature and mass fractions) and outputs on the same scale of [0, 1] to balance optimization over the wide range of scales present in the data. 4.3.6 Latent Phase Space Manifold Figure 8 shows a visualization of the high-dimensional training data projected into low-dimensional latent space via \bm{Z}=\mathbf{J}_{\phi}\bm{Y} . In this example, the bottleneck layer is limited to 2 latent metaspecies Z_{1} & Z_{2} to enable visualization. It can be seen that the manifold (consisting of 4 million training data points) is non-overlapping and that the reaction heat absorption rate varies smoothly across it without suffering from issues of non-uniqueness. This indicates robustness, underlining the benefits of simultaneously learning the manifold and the non-linear dynamics regression. Figure 10: A posteriori ( i.e., with time integration) parity plot (500,000 data points) comparing reconstructed ChemZIP predictions against the ground truth (FOM) data for ( a ) – ( b ) the propane/ethylene dry yields ( c ) the heat absorption rate (on a log scale) and ( f ) – ( e ) the propane/ethylene production rates. 4.4 Coupling ChemZIP with Flow Solver The trained ChemZIP model written using TensorFlow (TF) can be deployed into any CFD flow solver relatively easily by executing the steps summarized below and illustrated in Fig. 9 . 1. For each of the M metaspecies (where M\sim 2-4 ), add a convection-diffusion transport equation of the form shown in Eq. 6 using built-in discretization methods. 2. To update the source terms {\color[rgb]{1,0,0}\bm{\dot{\omega}}_{Z}} at each time iteration given new values for T,p,\bm{Z} , the TF model for \mathscr{F}_{\mathrm{NN},Z}(T,p,\bm{Z}) must be queried in each mesh cell. 3. Add metaspecies wall boundary condition, which is a zero diffusive flux condition projected onto the latent space, i.e., \left.\mathbf{J}_{\phi}\nabla\bm{Y}\right|_{\text{wall}}\equiv\left.\nabla\bm{Z}\right|_{\text{wall}}=0 [ 54 ] . 4. Add additional heat absorption sink term {\color[rgb]{1,0,0}\dot{\omega}_{T}} to the energy equation. This source term is the dominant mechanism driving interactions between the aerothermodynamics and the chemistry. 5. Clip the inputs to the NNs within known ranges set by the training space to prevent dangerous model extrapolation. 6. Properties {\color[rgb]{1,0,0}c_{p}} & {\color[rgb]{1,0,0}c_{v}} are now set as a function of T & \bm{Z} . Effectively, all complex reaction effects are lumped into a set of source terms and changes in fluid properties. Crucially, as will be demonstrated in Section 5 , the stiffness of the reaction system is alleviated because high-frequency species are filtered by the encoder. This means that the latent chemistry does not impose any time-step restrictions on the datum flow solver. Therefore, the basic explicit time integration scheme, multigrid acceleration, etc., can be used without modification, significantly accelerating convergence. Importantly, the coupling interface between the flow solver and TensorFlow imposes negligible overhead. This methodology is agnostic to the level of solver type ( e.g., Tblock or Fluent ) and its fidelity, which could be anything from RANS to LES. Currently, ChemZIP is coupled with the industry-standard turbomachinery flow solver Tblock [ 55 ] . 5.  Verification and Benchmarking This section presents a verification and performance benchmarking assessment of ChemZIP . To evaluate its accuracy, robustness, and generalizability, it is compared to the full-order model (FOM) for both a 1D fully-mixed PFR model as well as 3D viscous reacting flow simulations from a database of unseen test conditions. Throughout this chapter, the kinetic model used is a 65-species propane–steam pyrolysis mechanism typical of industrial steam cracking, which is generated automatically using Rmg-Py [ 56 ] . For now, the mechanism is small to accelerate the development time; however, an arbitrarily complex mechanism can be used as a drop-in replacement when ChemZIP is deployed in practice. Figure 11: 1D PFR time integrated solution history for ( a ) temperature ( b ) – ( c ) major/minor species dry yields ( d ) the reaction heat absorption rate and ( e ) – ( f ) the major/minor species net production rates. Note that the circular markers denoting the FOM are significantly downsampled for clarity. 5.1 Errors Metrics To assess the accuracy and generalisability of the trained ChemZIP model on N_{\mathrm{test}} unseen test data samples, the R^{2} score, the normalized median absolute error (NMdAE) and the normalized root mean square error (NRMSE) metrics are used to measure goodness of fit. Taking the reconstruction of the k th species mass fraction as an example, these three metrics are defined as R^{2}=\left(1-\frac{\sum_{n}^{N_{\mathrm{test}}}(Y_{k,n}-\widehat{Y}_{k,n})^{2}}{\sum_{n}^{N_{\mathrm{test}}}(Y_{k,n}-\overline{Y}_{k})^{2}}\right), (10) \mathrm{NMdAE}=\frac{\text{Median}\left(\left|Y_{k,1}-\widehat{Y}_{k,1}\right|,\ldots,\left|Y_{k,N_{\mathrm{test}}}-\widehat{Y}_{k,N_{\mathrm{test}}}\right|\right)}{\left|\overline{Y}_{k}\right|}, (11) and \mathrm{NRMSE}=\frac{\sqrt{\sum_{n}^{N_{\mathrm{test}}}(Y_{k,n}-\widehat{Y}_{k,n})^{2}}}{\left|\overline{Y}_{k}\right|\cdot N_{\mathrm{test}}} (12) where Y_{k,n} is the ground truth, \widehat{Y}_{k,n} is the prediction for the k th species & n th sample, and \overline{Y}_{k}=\frac{1}{N_{\mathrm{test}}}\sum_{n}^{N_{\mathrm{test}}}Y_{k,n} . Note that the R^{2} metric ranges between 0% and 100%, where 100% represents a perfect prediction. 5.2 Verification A Posteriori: Multistep Fully-Mixed 1D PFR The performance of ChemZIP is assessed in a time-integrated 1D PFR environment in order to assess not only (a priori) input–output performance, but also (a posteriori) sensitivity to error accumulation. The test dataset consists of 500,000 data points corresponding to approximately 1000 different complex heat flux profile realizations withheld from the training dataset. The trained model is integrated using an explicit 4 th /5 th -order adaptive Runge-Kutta method. The very fact that an explicit method works (rather than a stiff implicit method), implies that the numerical stiffness of the reaction system has been alleviated, dramatically accelerating convergence. This will be elaborated on in Sec. 5.3.2 . Figure 11 shows the solution history for a single heat flux profile realization while Fig. 10 condenses the time histories for all 1000 1D PFR simulations from the test dataset into a series of parity plots. Assessing the performance of ChemZIP when subjected to sharp gradients in temperature, as seen in Fig. 11 , ensures representative conditions for the turbo-reactor are covered. It is clear that even for a complex external heat load (see Fig. 11 ( a )), accurate production rates can be reconstructed from latent space (see Fig. 11 ( d ))–( f )). As a result, following a heat flux perturbation, the temporal gradient in the yield responds accurately throughout the entire evolution for both major and minor species. For the major species, the predictions are almost perfect. For lower concentration species, e.g., ethane, the accuracy is lower (see Fig. 11 ( c )), as expected. However, interestingly, it appears that the prediction errors are damped over the evolution and that the ethane yield at the outlet is, in fact, well predicted. To determine whether the conclusions drawn above generalize to all time histories, the complete integrated test database is plotted in Fig. 10 . Overall, the R^{2} score is above 95% for all quantities, suggesting good performance. The accuracy of the yields is higher than that of the production rates, which indicates that errors in the production rates are damped by the integration operator, which is favorable because the yields are the quantities of interest to the reaction system designer. Figure 12 shows the distribution of prediction errors over 500,000 test points for a priori (single-step predictions) and a posteriori (multistep time integrated) predictions. Both histograms are centered on a relative error of less than 10% . There is no significant difference between the a priori and a posterior error distributions, suggesting a minimal sensitivity of the model to time-integrated error accumulation. A possible explanation for this robustness is the inherent self-correcting nature of an endothermic dynamical system. If the temperature is too high due to modeling errors, the reaction heat absorption increases and brings down the temperature toward the ground truth; conversely, if the temperature is too low, the reaction heat absorption decreases and brings the temperature back up. This physical mechanism suppresses the growth of errors and encourages robustness. Figure 12: Histograms for the relative error ( x ) = \left|(x-\widehat{x})/x\right| between ChemZIP and the ground truth FOM for time-integrated (a posteriori) and non-time-integrated (a priori) test data for ( a ) the reaction heat absorption rate and ( b ) all the species mass fractions. The abscissa is on a log scale. However, in both cases, Fig. 12 shows a small fraction of relatively high percentage errors ( (x-\widehat{x})/x ). This is primarily due to poor numerical conditioning and bias of this metric as the values of the ground-truth in the denominator become small. This effect is most pronounced for the mass fractions, which are often precisely equal to zero. However, Fig. 10 and other investigations (not shown) indicate that a poor relative error close to zero does not affect the global solution. Furthermore, focusing on the reaction heat absorption rate as it represents an integrated effect of dynamics in all species, Fig. 13 suggests that generally larger relative errors occur in regions of low reaction activity. This is because of limited training data coverage in this low temperature regime. The impact on the yield should be small because the predicted values are still below or close to the activation threshold of the reaction, and the model can be manually turned off in this regime. Figure 13: 2D joint and marginal distributions for the relative prediction errors and absolute value for the reaction heat absorption rate (500,000 test data points). Both axes are on a log scale. Despite this, more generally, the analysis presented provides valuable information that can be fed back into the training data generation process. Given these insights, the modeler can cluster more training samples in underrepresented regions to counteract this bias if necessary. Ensuring consistent accuracy across several orders of magnitude for reaction responses and species yields underscores perhaps the principal challenge in optimizing a neural network for chemical kinetics: the inherent multiscale dynamics of the system. This leads to various optimization challenges summarized as follows: (1) the optimizer tends to focus on certain scales (2) large variability in scales within a minibatch can result in difficult learning dynamics and instability in the gradient descent optimization algorithm and (3) the predictions are highly sensitive to hyperparameter selection, which may be optimum for some scales but not for others. Some of these challenges are remedied by choosing an appropriate loss function, as described in Sec. 4.3.4 ; however, further refinement is still needed. 5.3 3D Heated Duct Flow To verify the robustness and generalizability of ChemZIP to a more complex “out-of-distribution” flow environment, the model is deployed into a full-fledged CFD solver for a 3-D heated duct test case. This multidimensional viscous domain is entirely different from the training dataset. ChemZIP is benchmarked and verified against an industry-standard commercial reacting flow solver Fluent with a detailed kinetic model ( i.e., the FOM). For performance benchmarking, ChemZIP is also compared against state-of-the-art acceleration strategies available in Fluent , that is, a combination of DACM (see Sec. 3.2.1 ) + dynamic cell zoning (DCZ) [ 57 ] , which will be denoted as “Fluent Accel.” in later figures. 5.3.1 Domain and Boundary Conditions Figure 14 shows the computational domain and the mesh. The dimensions of the duct and the boundary condition (see Table 1 ) are are representative of a section of a typical steam cracking coil. The heat input \dot{Q} is imposed as a Neumann boundary condition uniformly for the four walls. Employing a long domain ( i.e., 5\text{\,}\mathrm{m} ) is necessary to ensure the feed undergoes substantial transformation, which can be a slow process due to thermal diffusion limitations of heat transfer. To improve visualization, contour plots throughout this chapter will be presented using an axially-squashed domain, as shown in Fig. 14 . Figure 14: Heated duct test case domain and computational mesh (totaling 1.1 million nodes). The same mesh is used for the simulations in Fluent and in ChemZIP . The maximum non-dimensional wall distance in the domain is y^{+}=7 ; therefore, adaptive velocity wall functions are employed with the standard Spalart-Allmaras turbulence model in both solvers. Unless stated otherwise, simulations can be assumed to be performed in parallel on a high-performance Intel Cascade Lake 18-core CPU. Table 1: Boundary conditions for heated duct Boundary Conditions Inlet total pressure (bar) 2.1 Exit static pressure (bar) 2.0 Inlet total temperature ( \mathrm{\SIUnitSymbolCelsius} ) 650 Wall heat flux, \dot{Q} ( \mathrm{kW}\text{\,}{\mathrm{m}}^{-2} ) 100 & 150 Inlet turbulent to laminar viscosity ratio 10 5.3.2 Computational Performance Benchmarking Performance benchmarking is achieved by measuring the wall clock time required to march the solution to a steady state for (a) the FOM in Fluent (b) an accelerated scheme for the chemistry and (c) ChemZIP . Figure 15 demonstrates that significant computational acceleration can be achieved using ChemZIP . For a 65-species mechanism, a speedup of 580 \bm{\times} is measured compared to direct integration and 40 \bm{\times} compared to state-of-the-art acceleration strategies. Based on scaling rules, it is estimated that for a more detailed (and more accurate) mechanism, the rewards are even more substantial, with ChemZIP potentially capable of at least a 75 \bm{\times} speedup over “Fluent Accel.” (see Fig. 15 ). Furthermore, greater speedups are possible for larger mesh sizes. Figure 15: Computational acceleration achieved by ChemZIP compared with direct integration (DI) in Fluent and a state-of-the-art acceleration (Accel.) strategy that combines DACM + DCZ. Figures 16 & 17 illustrate several of the primary contributions to the computational acceleration achieved by ChemZIP . First, the number of transport equations is reduced, in this example, from 65 to 3. Second, the average numerical stiffness of the chemical system is decreased by a factor of approximately 10^{9} (see Fig. 16 ( a )). The stiffness is defined as the ratio of the maximum to minimum characteristic chemical time scales \frac{\text{max}(\bm{\tau}_{\mathrm{chem.}})}{\text{min}(\bm{\tau}_{\mathrm{chem.}})} , where \bm{\tau}_{\mathrm{chem.}} is calculated from the eigenvalues of the Jacobian matrix \mathbf{J} in physical space or the Jacobian matrix \mathbf{J}_{Z}=\frac{\partial\bm{\dot{\omega}}_{Z}}{\partial\bm{Z}} in latent space [ 58 ] . It is noted that very long time scales \tau_{\mathrm{chem.}}>$1000\text{\,}\mathrm{s}$ are filtered out, as they are associated with approximately nonreacting species. It is this intense stiffness of the system that necessitates the use of specialized implicit stiff ODE solvers. These require frequent evaluation and inversion of the Jacobian matrix in each mesh cell, effectively, to scale the solution update appropriately for each species. The Jacobian inversion is the reason why the cost of DI grows cubically with the number of species. Figure 16: For a 65-species propane mechanism: ( a ) a comparison of the average numerical stiffness for the chemistry (on a log scale). For the latent dynamical system, fast-reacting intermediate species are filtered out, and thus the stiffness is almost eliminated. Not only does this dramatically improve the rate of convergence to a steady-state solution, but it also enables the use of fast explicit time integrators instead. These do not require the Jacobian matrix and incur a much smaller overhead per step. For the same error tolerances, a factor of 2 performance benefit is possible by integrating the latent system with an explicit method over a stiff implicit one. Furthermore, Fig. 17 ( a ) shows that, unlike the FOM, the latent space system does not impose a restriction on the time-step set by the datum nonreacting flow system. This is because the characteristic chemical time-scale is similar to that of the fluid. Therefore, the baseline numerical methods of the nonreacting CFD solver can be used efficiently and without modification. Finally, Fig. 17 ( b ) illustrates that for more than 100 mesh cells, the cost of evaluating the chemical and energy source terms is 50 \bm{\times} faster using a NN in latent space compared to the FOM. For batches of less than 100 cells, the latency associated with the TensorFlow API overshadows the performance. However, for large batches of queries to the NN, this cost is amortized, and the scaling becomes linear (see Fig. 17 ( b )). The culmination of these factors results in the level of computational acceleration observed previously in Fig. 15 . Consequently, for the first time, we have demonstrated that the degree of computational acceleration necessary to bring detailed aerochemical modeling into the design optimization loop is now possible. The next question is whether the predictive accuracy is sufficient to perform realistic optimization. Figure 17: For a 65-species propane mechanism: ( a ) a comparison of the streamwise variation in minimum characteristic chemical time-scale between ChemZIP and the FOM (on a log scale) and ( b ) comparison of single-core CPU time to evaluate the chemical and energy source terms as a function of number of mesh cells in a computational batch (on a log-log scale). Figure 18: Verification of the reconstructed temperature and dry yields under two heat loads. Figure 19: Verification of the reconstructed the reaction source terms under two heat loads. 5.3.3 Predictive Accuracy The accuracy of ChemZIP is evaluated under two heat flux conditions \dot{Q}=$100\text{\,}\mathrm{kW}\text{\,}{\mathrm{m}}^{-2}$ and \dot{Q}=$150\text{\,}\mathrm{kW}\text{\,}{\mathrm{m}}^{-2}$ to exercise its performance in a wider region of the thermochemical space. Although this multidimensional viscous flow environment has not been observed during training, Figs. 18 & 19 shows that subject to standard modeling assumptions for reacting flow [ 59 ] , the yields and reaction rates are within several percent of Fluent . Performance is good for both major species, minor species and temperature in both the streamwise direction and the wall-normal direction, and the contours are surprisingly smooth and symmetric. The channel is long enough ( i.e., 5\text{\,}\mathrm{m} ) that if compounding of model errors was an issue, it would be observed in the results. This does not appear to be a serious problem, as evidenced by a similar streamwise distribution for the yield and reaction rate between the solvers (see Figs. 18 & 19 ). However, due to inconsistencies with the underlying numerics of the two solvers, the streamwise yield is slightly ahead of Fluent . This is because in Tblock , the axial velocity is higher and the reaction time-scale is lower. For the higher heat flux condition, the subtle stretching of the yield profile is captured by ChemZIP , albeit marginally overstretched. Inspecting the yields in Fig. 18 , there is a small discrepancy in the shape of the wall-normal profile. This difference could be attributed in part to the inconsistency between the underlying numerics of the two solvers. An additional explanation could also be that the reaction system does not respond accurately to turbulent diffusion of the species, which is an approximately temperature-independent process and is not incorporated during training. The diffusion term in the FOM produces a gentler wall-normal yield gradient (see Fig. 18 ) due to its smoothing effect. In fact, it is possible that the success of this methodology can perhaps be attributed to the temperature dominance of these types of chemical reaction processes. This is in contrast to other types of reaction processes, such as nonpremixed combustion, where diffusion and mixing can become the limiting physical process. On the other hand, while it is true that the reduced-order system may not react perfectly to species diffusion, it is reassuring that diffusion still has a notable effect of the system dynamics despite this mechanism not being included during training data generation. Despite some inaccuracies seen, the reader is reminded that the objective of the ChemZIP surrogate model is to accelerate thermochemical modeling sufficiently so that design optimization is possible. Loss of absolute accuracy can be tolerated if trends are well predicted. Figure 20: Net species production rate distributions on an z-y plane cross section ( \dot{Q}= 100\text{\,}\mathrm{kW}\text{\,}{\mathrm{m}}^{-2} ). For capturing two- and three-dimensional effects not seen before in this chapter, ChemZIP works notably well. Due to lateral temperature gradients, mass diffusion, and growth of the fluid boundary layer, a nonuniform reaction rate profile is produced from the core to the wall. In addition, secondary vortices lead to enhanced heat transfer and an accumulation of energy at the corners of the channel (see Fig. 20 ). These 2D/3D effects are mostly well captured by ChemZIP (see Figs. 19 & 20 ). Remarkably, the reconstructed production rate source terms respond accurately to wall-normal temperature gradients, which is a challenging task due to the high degree of nonlinearity and sensitivity of the dynamics. Figure 21 shows the CFD solution in latent space for all points in the mesh (shown as a red point cloud) superimposed onto the phase space containing the training data manifold. As eluded to previously, due to mass diffusion and two-/three-dimensional effects not captured during training, the regions of the phase space accessed during the CFD computation are slightly outside the training data manifold. This indicates extrapolation. Nevertheless, we have shown that the accuracy is acceptable and the solution is stable, providing confidence in the generalizability of the model. Figure 21: A projection of the latent phase space manifolds for all points in the training database and for all solution points from the heated duct ( \dot{Q}= 150\text{\,}\mathrm{kW}\text{\,}{\mathrm{m}}^{-2} ) CFD simulation (shown in red). This section has shown that, in addition to the successful performance benchmarking, the accuracy of ChemZIP is within reasonable tolerances. Despite the fact that the model was deployed in a very different environment from the 1D training simulator, the spatial profiles of the chemistry were well predicted. This was enabled by intelligent curation of the training database. Since chemical source terms are simply an input–output mapping \mathscr{F}_{\mathrm{NN},Z}:(T,p,\bm{Z})\mapsto\bm{\dot{\omega}}_{Z} , training has been performed in such a way as to sample regions of the thermochemical space accessed in more complex flows. In the following section, ChemZIP will be used to solve problems for which it was originally intended: modeling complex aerochemical interactions in the turbo-reactor. 5.4 Multi-Stage Turbo-Reactor Proof of Concept As a proof of concept, the new methodology for accelerated aerochemical coupling is now deployed into the turbo-reactor numerical modeling system. The domain is a multistage turbo-reactor architecture with an inlet temperature of 840\text{\,}\mathrm{\SIUnitSymbolCelsius} , and the CFD solver is run in transient mode. The loading coefficient of the rotor row is approximately \Psi=3.0 . This is a uniquely complex aerodynamic environment with rich aerochemical interactions that were not possible to model before without impractically large computational resources. This provides new insights into the aerochemical flow physics of the turbo-reactor that will inform design optimization for a more efficient chemical reaction in future iterations. Figure 22: Time-averaged ( a ) change in major and minor species yields relative to the inlet and ( b ) ethylene net production rates (on log scale) at midspan across a two-stage turbo-reactor. Figure 22 ( a ) shows the time-averaged yield distribution for both major and minor species yields across two stages. Within the second stage diffuser blade passage, the footprint of separated suction surface flow is clearly visible through a pitchwise gradient in the yields. Therefore, the reaction is responding reasonably to regions with different reaction time-scales and temperature histories. The net ethylene production rate shown in Fig. 22 ( b ) also appears to produce realistic responses to temperature gradients. For example, the footprints of several shockwaves (which result in a sharp rise in temperature and hence nonequilibrium response of the reaction) are clearly visible at the diffuser leading edge. At this point, due to prohibitive computational costs, it is beyond the scope of this work to verify the accuracy of ChemZIP for these types of highly complex flows. However, what these results show is that the model provides remarkably realistic and stable solutions despite being deployed in an entirely unfamiliar aerodynamic environment. 6.  Summary and Conclusions In this paper, we have comprehensively established the potential of using a machine-learning-enhanced surrogate model to accelerate aerothermochemical modeling within complex engineering systems without significantly sacrificing accuracy. Our approach simultaneously addresses three key challenges of modeling reactive flows by (1) reducing the number of transport equations (2) reducing the cost of evaluating the thermochemical source terms and (3) curtailing numerical stiffness. Not only is the cost per CFD time step reduced, but the steady-state convergence rate is also improved using fast explicit time integration. A key feature of our methodology is bypassing the well-known bottleneck of training data generation, with database development times as low as a few hours. The ChemZIP methodology is 50 times faster than traditional computational acceleration techniques ( e.g., DZM + DACM) while being substantially more universal than FGM used in combustion modeling. For more accurate mechanisms on large grids, it is likely that the measured speedups will be even higher, of the order of 100 \times to 1000 \times . A key motivation for adopting a neural-network-based data-driven approach is the ability to scale to massive datasets with a large number of species. In the future, this will allow the dynamic response of highly detailed (and thus accurate) kinetic models covering a very wide range of conditions to be embedded and compressed into a quickly accessible mapping. To accomplish this accurately, our approach is to intelligently exercise the complex chemical system by perturbing it within a known envelope of realistic temperature gradients. A sequence of verification investigations have been conducted to assess accuracy and the findings of these experiments can be summarized as follows: • The R^{2} metric was above 95% for all quantities of interest in the 500,000 time-integrated multistep test dataset. • The a priori and a posteriori error distributions were remarkably similar, indicating robustness to error accumulation. • In an entirely unfamiliar multidimensional viscous flow environment, ChemZIP performed surprisingly well and responded to 3D and diffusion effects despite not being introduced in the training data generation simulations. • The model was deployed in a complex turbomachinery environment for the first time and produced realistic yield and reaction rate distributions. So far, turbulence–chemistry interactions and the cross-species heat flux term [ 49 ] have been neglected. In future work, these effects will be incorporated into the training data generation process to improve the generalizability of ChemZIP to more complex flows. The ChemZIP methodology introduced in this paper is ideally suited for design optimization investigations for complex engineering systems, such as the turbo-reactor. In these cases some loss of absolute accuracy can be tolerated assuming trends are well predicted. This step change in aerothermochemical numerical modeling that enables fast iterative design exploration could be a game changer for optimizing the dynamics of reaction systems early in the design cycle. Given the novel problem of modeling highly complex aerothermochemical interactions within turbomachines, strong collaboration between fluid dynamicist and chemical engineers is becoming increasingly important in solving this complex challenge. Appendix 0.A Neural Network Architecture Tables 2 – 4 shows details of the neural network architecture for the encoder, decoder and latent dynamics shown previously in Fig. 7 . This setup was developed for a 65-species propane pyrolysis chemical kinetic model generated automatically using Rmg-Py . It is emphasized that the number of network parameters is relatively low because low-latency inference is the primary objective. Table 2: Detailed neural network architecture for the encoder No. of layers {\dagger} No. Neurons Activations 2 21\to 3 Linear {\dagger} this includes the input layer (=21 \times after cull) and bottleneck layer (=3 \times ) The total number of trainable network parameters is 66 for the encoder, 263 for the decoder and 4039 for the dynamics. Currently, the dimensionality of the latent space bottleneck layer is set to 3 as a trade-off between speed and accuracy; however, this can be set to any value. The non-linearities ( i.e., activation functions) are exponential linear units (ELU) and Gaussian linear error units (GELU), which have been shown to speed-up training and improve accuracy [ 60 ] . However, in the output ( i.e., last) layer for the NN shown in Table 4 , a linear activation function is used to avoid restricting the dynamic range of the output. For the output of the decoder, a sigmoid non-linearity is used to bound the mass fractions between 0 and 1 according to the definition of mass fractions. Table 3: Detailed neural network architecture for the decoder No. of layers {\dagger} No. Neurons Activations 6 3\to 4\to 7\to 10\to 20\to 21 ELU (4 \times ), linear (1 \times ) {\dagger} this includes the bottleneck layer (=3 \times ) and output layer (=21 \times after cull) The stochastic gradient descent method AdamW is used for optimization [ 61 ] , and regularization is universally added using weight decay to mitigate overfitting. The backpropagated gradients through the network are clipped to prevent instability. Typically, training takes 20.4 hours on an NVIDIA Quadro RTX 6000 GPU. The training dataset is split 80%:10%:10% between training, validation and test sets respectively, and the data is randomly shuffled at each training epoch. EarlyStopping() to used to automatically stop training once the R^{2} score for the validation set no longer improves over a window of 10 epochs. The weights associated with the lowest R^{2} score in the moving window are then restored. Table 4: Detailed neural network architecture for the dynamics mapping No. of layers No. Neurons Activations 7 3\to 48\to 32\to 28\to 24\to 20\to 21 GELU (5 \times ), sigmoid (1 \times ) Conflicts of Interest The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper. CRediT Author Contribution Statement Dylan Rubini : Writing – original draft, Visualization, Validation, Software, Methodology, Investigation, Conceptualization. Budimir Rosic : Writing – review & editing, Supervision, Funding acquisition, Conceptualization. Funding Dylan Rubini was supported by funding from the Engineering and Physical Sciences Research Council IAA (Grant number EP/X525777/1).