(351b) Accelerating Reactive CFD Simulations with Detailed Pyrolysis Chemistry Using Artificial Neural Networks | AIChE

(351b) Accelerating Reactive CFD Simulations with Detailed Pyrolysis Chemistry Using Artificial Neural Networks

Authors 

Plehiers, P. P. - Presenter, Massachusetts Institute of Technology
Vandewalle, L., Ghent University, Laboratory For Chemical Technolo
Marin, G. B., Ghent University
Stevens, C. V., Ghent University

Accelerating Reactive CFD Simulations
with Detailed Pyrolysis Chemistry Using Artificial Neural Networks

Pieter P. Plehiers1,
Laurien A. Vandewalle1,

Guy B. Marin1, Christian
V. Stevens2 and Kevin M. Van Geem1,*

1Laboratory
for Chemical Technology, Department of Materials, Textiles and Chemical
Engineering, Ghent University, Technologiepark 914 9052 Gent, Belgium

2SynBioC
Research Group, Department of Sustainable Organic Chemistry, Ghent University,
Coupure Links 653, 9000 Gent, Belgium

Keywords: Reactive
Computational Fluid Dynamics, Detailed Chemistry, Artificial Neural Networks

Computational fluid dynamics simulations have
been successfully used in the development and improvement of several aspects of
processes involving radical kinetics, with the design of new three-dimensional
reactor geometries being one specific area of interest [1-4]. To fully understand the impact of the reactor geometry on
the final composition of the process streams, reactive simulations using
detailed chemistry are paramount. One of the major drawbacks of these
high-detailed, reactive CFD simulations is the high increase in computational
cost for each additional species accounted for. Furthermore, due to the
significant difference in timescales at which individual reactions take place, the
resulting set of differential equations for systems with radicals, is highly
stiff. Both factors contribute to making reactive CFD simulations slow, implying
that the development of new reactor technologies is a lengthy process.
Accelerating these reactive CFD simulations can therefore benefit the
development of new technologies.

Several methods have already been devised to
reduce the stiffness of the set of ordinary differential equations (ODEs)
and/or to accelerate solving them. A first is the use of stiff ODE solvers [5, 6], which are available in CFD software
packages such as Ansys Fluent and OpenFoam. These stiff solvers approach the
problem by replacing the analytical expression for the instantaneous rates of
production by a time-averaged net production rate Ri* as
shown in the adapted species transport equation (1). Ri*
is obtained via integration of the instantaneous reaction rate over a relevant
time step as in equation (2).

(1)

(2)

Another common method is to apply the pseudo-steady-state
assumption to all radical species [7, 8].
While replacing the stiffest differential equations by algebraic ones, a
differential equation for each stable species must still be solved. To further
reduce the computational cost, chemistry tabulation methods have been
developed, the most important one being the In-Situ Adaptive Tabulation (ISAT)
method. [9, 10]. ISAT starts from the same
principle as the stiff solvers – replacing the analytical expression by a time-averaged
value. However, each time Ri* has been calculated via
integration, it is tabulated in the form of the right hand side of equation (2).
If a similar integration is required at a later stage, the result can be
obtained via interpolation of the tabulated results. A drawback of this
approach is that it only benefits the computational speed some time into the
simulation, as initially there is no data to look up and the reaction equations
must be integrated via equation (2) to fill out the tables. A second drawback
is the relatively high memory cost of the method, as all calculated chemistry
data is stored.

An alternative approach is proposed where
pre-simulated data is stored and interpolated in the form of an artificial
neural network (ANN). This provides a method that is very efficient, both
computationally and memory-wise. The ANN is developed with the implementation
of the ISAT method in OpenFOAM in mind. For each (previously calculated)
combination of temperature, pressure, time step (Δt) and
composition, the specific implementation of ISAT lists C(t+ Δt) instead
of Ri*. Analogously, the input of the neural network
will be the current state and a time step, while the output is the state one
time step later. For improved robustness against errors, the ANN predicts Ri*.
Based on the approximation in equation (2), the required C(t+
Δt) is easily calculated from the prediction and the input.

Figure 1: Rate of
production, defined as (C(t+Δt)-C(t) ) /
Δt for hydrogen (left) and the hydrogen
radical (right) - preliminary validation data. For clarity, only a random
selection of 0.1% of the validation set is displayed.

The training data is generated by
performing 1D-simulations in Cantera with varying inlet conditions to cover a
wide range of potential states. The used kinetic model accounts for 44 species
and 361 reactions. A total of 7.74 million data points is generated. Training
of the network is performed on 80% of all data. 10% is used for validation and
the final 10% for testing. Figure 1 illustrates some preliminary validation
data results for the rates of hydrogen and the hydrogen radical. While the
performance for the stable hydrogen is already excellent, that of the radical can
still be improved. The current model achieves a mean absolute error of 4.75 10-4
on the normalized hydrogen rate of production and of 1.75 10-3 on
the normalized hydrogen radical rate of production. The normalization of the
data ensures that comparable relative accuracies are obtained on the actual
reaction rates, despite a difference of six orders of magnitude between the
maximal rates of production. The overall mean absolute error on the normalized
validation data is 7.57 10-4, with stable species generally having
an accuracy in the order 10-4, while radical species are an order of
magnitude less accurate. The computational cost of the ANN method is very low.
The entire validation set of 773991 data points is predicted in 20.686s – or 27μs
per data point. In comparison, the time required to integrate equation (2) for
25000 data points is 136.12s – 5444μs per data point. The relative
speed-up by using the ANN will increase with increasing kinetic model size. The
cost of executing the ANN only increases slightly when using a more complex
kinetic model, as the size of the input and output layers will increase. The
cost of integrating the reaction equations however, will increase significantly.
For a mechanism with 107 species and 2642 reactions, the ANN requires 33μs
per data point, while integration requires 32652μs per data point.

By taking into account the reasoning behind
ISAT in developing the ANN, it can be readily linked to a custom chemistry
library in OpenFOAM. Three different test-cases are run and both results and
computational costs are compared. The first uses a stiff chemistry solver
without tabulation. The second applies ISAT, while the final one uses the
presented ANN.

Acknowledgements

P.P.P.
and L.A.V. acknowledge financial support from a doctoral fellowship of the Research
Foundation – Flanders (FWO). The authors acknowledge the Long Term Structural
Methusalem Funding by the Flemish Government. Computational support was
provided by the STEVIN HPC infrastructure at Ghent University

References

1.         Reyniers, P. A., et al. ISCRE,
Minneapolis, MN, USA, 2016.

2.         Reyniers, P. A., et al., Industrial & Engineering Chemistry
Research
2017, 56, (51),
14959-14971.

3.         Van Cauwenberge, D. J., et al., AIChE Journal 2018, 64, (5), 1702-1713.

4.         Vandewalle, L. A., et al. AIChE,
Houston, TX, USA, 2016.

5.         Gear, C., Proc. 68 1969, 187-193.

6.         Stone, C. P., et al. 52nd Aerospace
Sciences Meeting, 2014; American Institute of Aeronautics and Astronautics.

7.         Zhang, S., et al., Chemical Engineering Science 2013,
93, 150-162.

8.         Dijkmans, T., et al., Computers & Chemical Engineering 2014, 71, 521-531.

9.         Kim, J., et al., Combustion Theory and Modelling 2014, 18, (3), 388-413.

10.       Pope, S. B., Combustion Theory and Modelling 1997, 1, (1), 41-63.