• No results found

Efficient Chemistry Methods for PDF Calculations

CHAPTER 2 BACKGROUND

2.3   Numerical Modelling

2.3.4   Efficient Chemistry Methods for PDF Calculations

The most computationally intensive part of reactive TPDF is the calculation of the particle reaction rates. Obtaining the species reaction rates by direct integration is computationally very expensive and for large chemical mechanisms this computational cost becomes prohibitively large. To illustrate the computational cost of direct integration a highly conservative example is outlined. Typical 2D axisymmetric combustion simulations using the TPDF method have over one million stochastic particles for a 10000 grid cell problem, usually more than 5000 iterations are required to obtain convergence and obtain statistically averaged quantities. The chemistry is assumed to be a methane-air system represented by a skeletal methane mechanism such as DRM22. The average time for a direct integration of a single particle for such a system on a modern 3.4GHz computer is around 5ms. This means that using direct integration only, the solution a single processor would take 289 days, which is an unacceptably long period of time. Particle methods scale exceptionally well in parallel so this single core processing time could be reduced, however the example given is extremely conservative and is based on a 2D axisymmetric RANS solution. The computing resources required to reduce the problem solution time to a couple of days is well justified in terms of the other competing computational methods available such as LES.

As illustrated above direct integration is not a feasible approach for practical PDF calculations with an elliptic solver. Possible ways to avoid the large cost of direct integration is to not explicitly compute the reaction-rate but rather look the reaction rate up from a table that is pre-computed or computed on the fly. Advanced tabulation

strategies take advantage of the fact the entire composition space is not accessed in a reactive flow, but rather a subset of that. By reducing the composition space to that of a strained laminar flamelet Masri and Pope [128] show that fast and accurate computations using the JPDF method are possible for mildly strained turbulent flames, where significant turbulence chemistry interactions occur such as extinction and re-ignition. By increasing the tabulated compositional space to be parameterised by three scalars by means of a reduced chemical mechanism, Tiang et al. [95] show that finite-rate chemistry effects such as the prediction of blow-off can be predicted within an accuracy of 20%.

The successful tabulation of the compositional space relies on a dramatic reduction in the dimensionality of the governing chemical mechanism. Such reductions in dimensionality are possible using partial equilibrium and steady state assumptions as outlined by Smooke [129]. There are several other notable strategies to dramatically reduce the dimensionality of the chemistry to a level where tabulation becomes feasible. The rate-controlled partial equilibrium method developed by Keck and Gillespie [130] identifies the reduced chemistry dimension based on the number of selected rate-limiting reactions.

Computational singular perturbation (CSP) is a mathematical method by which numerous chemical reactions are grouped into characteristic time scales; the number of these time scale groupings is effectively the reduced chemistry dimensionality. It should be noted that the time scale grouping process for CSP is entirely mathematical and no prior knowledge of any optimal parameters or assumption for the particular mechanism is required. By making five such groupings (two fast, two moderate and one slow), Lam and Goussis [131] show that an accurate representation of the hydrogen-air reactive system for a wide range of conditions can be made.

Chemical mechanism reduction by intrinsic low-dimensional manifolds (ILDM) outlined by Maas and Pope [78, 132, 133], is a method that aims to reduce the chemical state space globally, by means of an eigenvector analysis to identify locally the fastest time scales of the chemical system. In many respects ILDM and CSP have many similarities, particularly the local determination of the fastest chemical time scales by means of basis vectors. The main distinguishing characteristics between the two are that CSP has the

ability to reduce the computational stiffness of a mechanism and can categorise a mechanism with a reduced number of variables or groupings (whilst the governing equation system remains large), the ILDM method can also reduce the mechanism stiffness and in addition to reducing the dimensionality of the system the governing equations of the system are also reduced.

After the composition space has been reduced by a reduction of the chemical mechanism, further optimisation can be made in the storage and tabulation phase by examining the sensitivity of the tabulation points so that rather being even distributed in composition space they are distributed such that the error is almost equal in composition space. These tabulation concepts are outlined by Tiang et al. [95] and Chen et al. [134]. More advanced precomputed tabulation methods such as artificial neural networks (ANN) have been implemented into PDF calculations by Christo et al. [135, 136]. ANN methods have been shown to be highly memory efficient and are more advantageous for large chemical systems. Generation of optimal training data sets and optimisation of the network geometry are still hurdles that remain to be solved for this method in order to assure erroneous results are not generated or numerical instabilities initiated. One of the powers of ANN is that the stored data is essentially information relating to an advanced mapping function in contrast to a brute force input output tabulation method. Other advanced mapping function storage methods have been proposed beyond ANN, one such an example is parameterisation by proper orthogonal polynomials outlined by Turanyi [137].

In this method the governing set of differential equations is reduced to a set of Gram-Schmidt ortho-polynomials and a solution generated by solving the multivariate Horner equations.

The schemes outlined above are essentially strategies aimed at solving the chemistry off-line and pre-computing a look-up table for the calculations to avoid direct integration. An alternative to these methods is to build the look-up table on-line or in situ, by doing so the table can be populated with the particular composition space unique to the particular flow being simulated; no prior assumptions of the dimensionality or type of manifold are required for this strategy. The storage method error control and retrieval process from

such an in situ generated table is examined. The in situ adaptive tabulation based on principle directions (ISATPD) method outlined by Yang and Pope [138, 139] is one such method that utilises the in situ generated table concept. The ISATPD assumes that the tabulation region in composition space is of fixed size once generated, making error control of the tabulated composition region not possible. An inherent feature in the ISATPD method is that the stored mapping function is a constant, if a composition falls in the tabulated cell the output is still the same no matter where in composition space of the cell the original point was. This means that in the ISATPD method, information on the local sensitivity is not stored or included in the calculated mapping; however information on the local principle directions is used to efficiently store cells in composition space. Whilst the ISATPD method was a powerful concept for chemistry tabulation with initial tests indicating a 1665 speed up factor for large mechanisms over direct integration [139], the ISATPD method was quickly superseded by another superior method termed in situ adaptive tabulation (ISAT) developed by Pope [140]. ISAT is the method that is used in this study to efficiently evaluate the chemical source term avoiding direct integration methods.

The mathematical details of the calculations of the ellipsoid of accuracy (EOA), the linearised mapping and the local error the reader is referred to Pope [140], a review involving the mathematical detail would simply involve repeating the equations already presented in Pope [140]. Instead of a mathematical description of the ISAT algorithm a conceptual description is given in the few paragraphs below.

ISAT is essentially a method that given the thermo-chemical state of a system φ( )t0 and a prescribed time step ∆t, the thermo-chemical composition at t0+ ∆ is calculated ( t

(t0 t)

φ + ∆ ). To determine φ(t0+ ∆ to with a specified error tolerancet) εtol, ISAT utilises a number of strategies that are denoted as: direct integration, primary retrieve, secondary retrieve, grow and add. When a calculation is started ISAT begins to populate a table that stores the solutions to the direct integration of the chemical source term. In addition to directly integrating the chemical source term and storing the solution ISAT also stores a mapping called the ellipsoid of accuracy (EOA), which governs how far in composition

space a query to ISAT can be approximated by the stored direct integration result. For a given direct integration mapping for a certain ( )φ ∆ the size of the resultant EOA for the t entry ( )φ ∆ is a function of the specified mapping or ISAT error tolerance t εtol.

When ISAT is queried, the binary tree is traversed by evaluating the cutting planes in composition space; this process is continued until a termination node is reached. At the termination node ( )φ ∆ is examined to see if it lies within the EOA of the termination t node. If ( )φ ∆ lies within the EOA of the termination node, a mapping for ( )t φ ∆ is t calculated, this process is computationally very fast and is termed a primary retrieve. If

( )t

φ ∆ does not lie within the EOA of the termination node, ISAT searches neighbouring nodes on the binary tree in composition space for a given time. This evaluation of the EOA neighbouring nodes is computationally very fast. If it is possible to use one of the EOA from a nearby node from the termination node this is done and is termed a secondary retrieve. If no neighbouring nodes can be found ISAT calculates ( )φ ∆ t directly from the termination node using direct integration. This is a computationally expensive operation. If the direct integration of ( )φ ∆ from the termination node results t in a solution that is within εtol from the termination node the EOA of the termination node is grown, this process is termed a growth and is computationally expensive. If the direct integration of ( )φ ∆ from the termination node results in a solution that is outside t the EOA of the termination node ISAT searches nearby nodes in composition space to see if the EOA of nearby nodes can be grown if it is possible to do this ISAT grows the EOA of the neighbouring node, this process is called a secondary growth. If the direct integration of ( )φ ∆ from the termination node results in a solution that is outside the t EOA of the termination node or neighbouring nodes ISAT creates a new leaf, cutting plane and EOA for a new node on the binary tree, this process is computationally intensive and is called an addition. As the calculation progresses the number of entries in the ISAT table increases and the EOA for the table entries become more refined allowing a greater number of queries to be evaluated with the computationally cheap action of a retrieve.

In practical calculations it is not possible to continue to register additions to the ISAT table indefinitely; this is due to the finite constraint of the available computational memory. Ideally once the ISAT table has filled the allocated amount of memory, direct integrations that replace additions only accounts for a very small fraction of the total number of queries, e.g. less than 0.1% are direct integrations. By decreasing εtol a more accurate table will be grown, however the growth phase of the table building will take longer and a greater number of entries (more machine memory) will be required to cover the same compositional space. Conversely by decreasing εtol a lower accuracy ISAT table will be built at a faster rate requiring less machine memory, also with large values of εtol it is possible the table might never fill the available machine memory allowing retrieves to almost be the exclusive result of a query resulting very large speed up times over direct integration.

There have been many investigations that examine the effectiveness of the original ISAT algorithm when applied to reacting flow calculations [141, 142, 143, 144], of particular interest is the use of ISAT in reacting PDF calculations [97, 145, 146]. Further refinements of the ISAT algorithm that indicate a further 2-5 times speed up over the original ISAT algorithm are outlined by Lu and Pope [147].