Paper

Explicit integration of extremely stiff reaction networks: asymptotic methods

, , , , , , , and

Published 9 January 2013 © 2013 IOP Publishing Ltd
, , Citation M W Guidry et al 2013 Comput. Sci. Discov. 6 015001 DOI 10.1088/1749-4699/6/1/015001

1749-4699/6/1/015001

Abstract

We show that, even for extremely stiff systems, explicit integration may compete in both accuracy and speed with implicit methods if algebraic methods are used to stabilize the numerical integration. The required stabilizing algebra depends on whether the system is well removed from equilibrium or is near equilibrium. This paper introduces a quantitative distinction between these two regimes and addresses the former case in depth, presenting explicit asymptotic methods appropriate when the system is extremely stiff but only weakly equilibrated. A second paper (Guidry and Harris 2013 Comput. Sci. Disc. 6 015002) examines quasi-steady-state methods as an alternative to asymptotic methods in systems well away from equilibrium and a third paper (Guidry et al 2013 Comput. Sci. Disc. 6 015003) extends these methods to equilibrium conditions in extremely stiff systems using partial equilibrium methods. All three papers present systematic evidence for timesteps competitive with implicit methods. Because an explicit method can execute a timestep faster than an implicit method, algebraically stabilized explicit algorithms might permit integration of larger networks than have been feasible before in various disciplines.

Export citation and abstract BibTeX RIS

1. Introduction

In many scientific and technical contexts, one encounters phenomena that may be modeled by fluxes transferring population between sources and sinks for various species. Examples include kinetic processes that modify abundances and transfer energy in atomic, molecular and nuclear systems; geochemical, climate and other environmental systems; electrical circuits; economic models; and population dynamics. Terminology varies, but let us refer generically to these sources and sinks as boxes, and call the resulting systems of boxes connected by fluxes reaction networks. Such systems are commonly modeled by a coupled set of differential equations that describe a continuous flow of population through the boxes.

The reaction network is often classified as a stiff system, which we shall define to be a system of equations containing multiple timescales ranging over many orders of magnitude [36]. Most physical systems involve important processes operating on very different timescales, so realistic problems tend to be at least moderately stiff. Some, such as those encountered in many astrophysical thermonuclear burning applications, are extremely stiff, with fastest and slowest timescales in the problem differing by as much as 10–20 orders of magnitude. In stiff systems the timestep constraints are set by numerical stability requirements rather than accuracy considerations. Hence, explicit numerical integration of stiff systems is usually impractical because the maximum stable timestep is far too small for efficient solutions (see, e.g., [5, 6]). This is commonly addressed by employing implicit or semi-implicit stiff solvers that are stable, but that require time-consuming matrix solutions.

A given box in a reaction network very often is connected strongly only to a few other boxes. For example, the explosive burning conditions encountered in astrophysical novae, x-ray bursts or supernovae may require reaction networks with hundreds to thousands of nuclear isotopes. However, because Coulomb repulsion strongly favors the capture of light nuclei over heavy-ion captures, individual isotopes are typically connected directly to other isotopes through (at most) ∼ 10 reactions of consequence, and under many conditions no more than 2–3 reactions are important for a given isotope. Such restrictions on the direct box reaction coupling imply that the matrices appearing in the iterative implicit solution are sparse. Although various methods are available to deal with sparse matrices, in practice codes for solving large reaction networks have not always exploited sparseness in particularly effective ways.

For example, in astrophysical calculations with implicit solvers in large networks (hundreds of species), one often finds that 80–90% of the processor time is consumed in matrix operations [7, 8]. Efficient algorithms exist for the required matrix algebra (with incremental improvements in them over time), but the matrix nature of the core problem implies that the time required for an implicit solution grows nonlinearly with the size of the network. In typical working codes for large-scale applications, increasing the size of the network increases the time for solution, often quadratically, sometimes as much as cubically, until there are enough boxes in the network to justify the overhead of sparse-matrix methods with more favorable scaling. In thermonuclear networks, for example, it is often found that the overhead required to implement sparse-matrix iterative solutions is not justified until there are a couple of hundred boxes in the network. Thus, many of the present implicit stiff-network algorithms do not scale very gracefully to larger networks.

We are primarily interested in the most ambitious applications of large networks, where the reaction network is only a portion of a larger problem. Let us take as representative the astrophysical thermonuclear reaction networks, where a proper description of the overall problem typically requires multi-dimensional hydrodynamics or radiation hydrodynamics coupled tightly to a large thermonuclear reaction network. The hydrodynamical evolution controls the conditions in the network such as temperature and density, and the network influences the hydrodynamic evolution strongly through energy production and modification of composition variables. As a consequence of the limitations discussed in the preceding paragraphs, the solution of large networks by the usual approaches is time-consuming and a few multi-dimensional calculations have attempted to couple the element and energy production strongly to the hydrodynamics with a network of realistic complexity9. The most ambitious approaches use very small networks, perhaps tuned empirically to get critical quantities like energy production correct on average, coupled to the hydrodynamical simulation. In many calculations even this is not done and the network is replaced entirely by parameterization. Then a more complete network is run in a separate 'post-processing' step, where fixed thermodynamical profiles computed in the hydrodynamical simulation with the small network are used to specify the variation of variables such as temperature and density with time.

Astrophysical thermonuclear networks have been used here for illustration, but many problems of scientific and technical interest exhibit a similar complexity. Examples include astrochemical kinetics, where one must model large chemical evolution networks in contracting molecular clouds, or combustion chemistry, where chemical burning networks are strongly coupled to simulations of the dynamics of the air and fuel mixture. Physically realistic networks in such contexts would often be quite large. In the combustion of larger hydrocarbon molecules or studies of soot formation, hundreds to thousands of reacting species undergoing as many as 10 000 reactions may be encountered [6], and in supernova explosions hundreds to thousands of nuclear isotopes with tens of thousands of reaction couplings make non-zero contributions [8]. For such cases, one finds that current techniques do not allow for a coupling of realistic reaction networks to the full dynamics of the problem and often severely truncated or highly schematic reaction networks have been used in even the most realistic simulations.

2. Reaction networks in the context of larger problems

To be definite, we shall assume that the coupling of reaction networks is done using operator splitting, where the hydrodynamical solver is evolved for a numerical timestep holding network parameters constant, and then the network is evolved over the time corresponding to the hydrodynamical timestep holding the new hydrodynamical variables constant. This places two basic constraints on methods:

  • (i)  
    At the end of each hydrodynamical timestep the network must be advanced with new initial conditions. Thus, algorithms must be capable of rapid initialization and must not depend in a complex way on the conditions from previous time intervals.
  • (ii)  
    With modern processors, existing algorithms are reasonably adequate for many post-processing calculations. In contrast, for the operator-split, parallel processing environment, which is of our interest here, it is highly desirable that solution of the network over a hydrodynamic timestep be fast enough that it does not require time substantially larger than that for the hydrodynamical solution alone.

Let us elaborate further on this second point. If a single processor were used to calculate both the hydrodynamical evolution and the network evolution in one hydrodynamical zone, the network evolution over a hydrodynamical timestep interval must be fast enough to not slow the calculation too much relative to the hydrodynamical evolution alone. If we take the point of view that we are willing to tolerate longer compute times in the interest of a much more realistic calculation, but not longer by multiple orders of magnitude, we estimate that the network must be capable of evolving over the time interval corresponding to the hydrodynamical timestep in roughly a second or less wall clock time.

We take as representative the multidimensional, adaptive-mesh, explicit hydrodynamical FLASH code [9] applied to Type Ia supernova simulations on large parallel systems. The explicit hydrodynamical timestep will be limited overall by the Courant time (roughly, because stability requires a hydrodynamical timestep not larger than the sound-crossing time for the zone), and more stringently in zones of rapid burning where temperature and density may be changing rapidly. In current Type Ia supernova sub-grid model simulations, the Courant time would typically be 10−4 s or smaller over most of the grid for the timescale relevant for the main part of the explosion, with rapid nuclear burning and associated temperature changes limiting the hydrodynamical timestep to 10−8–10−10 s for some ranges of times. For qualitative estimates, let us take as representative that a typical network integration for a single hydrodynamical timestep will be over an interval ∼ 10−8 s during the time of strong burning and ∼ 10−6 s over much of the approach to equilibration after strong burning.

In FLASH, many spatial zones will be assigned to a single Message Passing Interface rank on a parallel system. Therefore, in the absence of node-level parallelism (for example, with OpenMP), the network must be capable of calculating a number of hydrodynamic time intervals in a second or less if we wish to calculate an independent network integration for each zone. Let us take for estimation purposes that we wish to be able to reliably integrate the network in 1000 independent zones over a time interval of say 10−6 s on a single processor in 1 s wall clock time, with each network containing several hundreds of isotopes. This places extremely strong startup and speed constraints on the required network. The explicit algorithms discussed here are capable of perhaps 104 network timesteps per second on a single processor with the present technology for a network with ∼ 150 isotopes, so our goals require a network algorithm that can integrate a time interval of the order of 10−6 s in not more than ∼ 10–100 timesteps, implying average stable and accurate timesteps at least as large as 10−2–10−3 times the elapsed integration time for the corresponding hydrodynamical evolution. See figure 1.

Figure 1.

Figure 1. Hydrodynamical timesteps in a simulation under typical Type Ia supernova conditions (solid upper curve). The calculation corresponds to a single zone integrated with the FLASH hydrodynamical code [9], operator-split coupled to a 150-isotope network using the explicit asymptotic method described below. Initial conditions were equal mass fractions of 12C and 16O, with an initial temperature of 3 × 109 K and initial mass density of 107 g cm−3. The shaded region between the two curves represents the range of timesteps an explicit network calculation must take to be able to integrate 100–1000 zones on a single processor over one operator-split hydrodynamical timestep in less than about 1 s elapsed time on modern processors. The hydrodynamical timestep lies roughly in the range 0.1–0.001t, where t is the elapsed time, over most of the range of integration. To maintain network timesteps within the band for each operator-split hydrodynamical timestep, we see that the algorithm must be capable of taking stable and accurate network timesteps approximately in the range 0.01–0.0001t over the entire range of hydrodynamical integration.

Standard image

Such large timesteps are often possible with implicit and semi-implicit algorithms, but those methods are inefficient at computing each timestep; explicit methods can compute a timestep efficiently, but timesteps this large are unthinkable with a normal explicit algorithm because they would be unstable in most realistic situations. In this and the other two papers [1, 2] of this series we shall demonstrate stabilization methods for explicit integration that realize such competitive integration timesteps in a variety of examples. Thus we shall reopen the discussion of whether explicit methods, with their faster computation of timesteps and more favorable scaling with network size, are practical for large, stiff networks.

3. Stiffness in reaction networks

The general task is to solve efficiently N coupled ordinary differential equations

Equation (1)

subject to appropriate boundary conditions. In this expression, the yi(i = 1···N) describe the dependent variables (typically measures proportional to number densities for species), t is the independent variable (the time in our examples), the fluxes between species i and j are denoted by Fij, and ki(t) is the effective rate for all processes depleting the species i. The sum for each variable i is over all species j coupled to i by a non-zero flux Fij, and for later convenience we have decomposed the flux into a component F+i that increases the abundance of yi and a component Fi = kiyi that depletes it. For an N-species network there will be N such equations in the population variables yi, generally coupled to each other because of the dependence of the fluxes on the different yj. (For notational simplicity, we will not always display the i index explicitly on the right side in our equations.) To keep the discussion general, the variable yi(t) will be used in most of our equations, but for the specific astrophysical examples that follow we shall replace the generic population variables yi with the mass fraction Xi, which satisfies

Equation (2)

where $N{_{\mbox {\scriptsize A}}}$ is Avogadro's number, ρ is the total mass density, Ai is the atomic mass number and ni is the number density for the species i.

3.1. Example: stiffness and stability in the carbon–nitrogen–oxygen cycle

The carbon–nitrogen–oxygen (CNO) cycle that powers main-sequence stars more massive than the Sun provides a graphic illustration of stiffness in a relatively simple system of large physical significance. The CNO cycle, displayed in figure 2, uses isotopes of carbon, nitrogen and oxygen as catalysts to convert hydrogen into helium. We shall illustrate by considering the primary part of the CNO cycle illustrated on the right side of the figure. If the thermonuclear network corresponding to the main part of the CNO cycle is integrated under typical CNO cycle temperature and density conditions by explicit forward Euler methods using standard rates [10] for the reactions and constant timesteps, the integration is stable for timesteps less than or equal to 285.7 s, but becomes catastrophically unstable for a timestep of 285.8 s or more. This instability threshold is precisely two over the fastest rate for the transitions in the network, which corresponds to the β-decay of 15O to produce 15N.

Figure 2.

Figure 2. The CNO cycle. On the left side the main branch of the cycle is illustrated with solid arrows and a side branch is illustrated with dashed arrows. On the right side, the main branch of the CNO cycle is illustrated in more detail.

Standard image

We now show that this instability for forward differencing of the CNO cycles arises because rapidly decreasing small populations can become negative in an explicit integration if the timestep is too large. These negative populations export unphysical negative population that can destabilize the system because they can lead to exponentially growing solutions in small components that ultimately couple to the larger components. Let us elaborate through the use of a simple model illustrated in figures 35, which will generalize a discussion that may be found in [6].

Figure 3.

Figure 3. One common origin of stiffness instability. For simplicity of the discussion the timescale h is presumed to be sufficiently short that the large, slow components remain essentially unchanged over a time equal to many times h. The explicit integration for the small, fast component diverges if yn+1 ⩽ − yn, such that yn+1 lies in the shaded region. This divergence is exponential for longer times and quickly propagates to the larger slow components, destabilizing the entire network. The illustration of the slow components is schematic; in typical stiff systems their timescales may be many orders of magnitude longer than those for fast components and often they are larger in value by many orders of magnitude.

Standard image
Figure 4.

Figure 4. Behavior of $\exp (-kt)$ with k = 100 for increasing explicit timesteps h. Generally, for h < 2/k the solution converges to the correct value of zero but for h > 2/k the solution diverges to ± under successive iterations. Note that the vertical scale has been increased by a factor of 10 in the rightmost figure.

Standard image
Figure 5.

Figure 5. Origin of the stiffness instability for explicit Euler-method integration of the CNO cycle main branch (shown as an inset). If the timestep is too large the mass fraction of 15O, which normally is of the order of 10−10 or smaller under the conditions assumed here, can become negative. This unphysical condition is unstable and triggers an exponential runaway that quickly crashes the entire network. On the left side, the absolute value of the envelope of the oscillating solution is plotted on a log scale, with the sign indicated adjacent to different parts of the curves. The right side shows a blowup of the region where the mass fraction begins to oscillate into negative values, now plotted on a linear scale to show clearly the envelope of the diverging oscillating solution. This figure is a generalization of figure 3 to a more complex network.

Standard image

3.2. A simple model for one form of stiffness

In figure 3, we assume a coupled system in which there are many components varying on a relatively long timescale (illustrated schematically by the curves at the top) and a single component that is small and exponentially decreasing on a much faster timescale, with a typical behavior $y(t) = \exp (-kt)$ so that dy(t)/dt = −ky(t). Let us consider timesteps that remain small compared with the larger timescales in the system (so that for a single step, we are in an approximately adiabatic situation and the populations varying on long timescales may be considered frozen), but comparable with or larger than the timescale set by 1/k.

To advance the solution for the fast component from tn to tn+1 by the explicit Euler method, we take a timestep h and extrapolate the solution using the derivative dy/d t = −ky evaluated at (tn,yn). The triangle of height Δy in figure 3 summarizes, where (tn+1,yn+1) represents the numerical solution and $(t_{n+1},y_{n+1} )_{\mbox {\scriptsize exact}}$ is the exact solution. From this construction, we observe that [6]:

  • (i)  
    For h < 1/k, the forward Euler approximant for step n + 1 will yield a value of yn+1 that lies between 0 and yn, so that |yn+1| < |yn|.
  • (ii)  
    For 1/k < h < 2/k, the sign of yn+1 will be negative, but again |yn+1| < |yn|.
  • (iii)  
    For h ⩾ 2/k the sign of yn+1 will be negative and |yn+1| ⩾ |yn|.

For the forward Euler approximation to $y(t) = \exp (-kt)$ we have yn+1 = (1 − hk)yn, so that by iterating for m successive steps of fixed size h (with mh still considerably less than the longer timescales in the system, so that the adiabatic approximation remains valid), we obtain

Equation (3)

This converges toward the correct value of zero at larger times only if the product hk lies between 0 and 2, implying that the maximum value of h that yields a convergent solution is bounded by h < 2/k. Thus, in figure 3 the maximum stable value of h is less than 2/k and any point (tn+1,yn+1) extrapolated by forward Euler integration that lies in the shaded zone (that is, yn+1 ⩽ − yn) will be unstable under the iteration (3), diverging to infinity rather than converging to the correct value of zero. Because the small, fast components are coupled to the other components of the network, this divergence will quickly destabilize the entire network. Let us illustrate with a concrete example. Figure 4 corresponds to the forward Euler solution of yn+1 = (1 − hk)yn with k = 100 and timesteps ranging between h = 0.008 and 0.03. In this example, we observe that

  • (i)  
    For h < 2/k, the solution converges to zero.
  • (ii)  
    For h = 2/k, the solution oscillates between positive and negative values of the same absolute value and neither converges nor diverges.
  • (iii)  
    For h > 2/k, the solution diverges to ± under successive iterations, with the divergence exhibiting exponential behavior for larger times.

Figure 5 applies the preceding model of the origin of the stiffness instability to the CNO cycle. As noted earlier, (for the parameters assumed) ordinary explicit Euler integration is highly unstable for a timestep larger than 285.7 s. This critical timestep is exactly two divided by the fastest rate parameter in the system, which is that for the β-decay of 15O to 15N. Expressing the network in matrix form and diagonalizing indicates that the origin of this instability lies in eigenvalues that exceed unity in absolute value if $h>2/k_{\mbox {\scriptsize max}}$ . Generalizing the discussion associated with equation (3), for a coupled set of equations a finite-difference iteration for m steps entails a matrix raised to the power m applied to the original y vector. This is guaranteed to converge only if no eigenvalue of the matrix exceeds unity in magnitude.

Less abstractly, figure 5 indicates that the origin of this instability for standard explicit integration is the tendency of the 15O population to become negative for large explicit timesteps. This is a more complex system than the previous simple decaying-exponential example because the 15O population is depleted by the β-decay but also replenished by the (p,γ) proton capture reaction on 14N (see figure 2 and the inset diagram on the left side of figure 5). Nevertheless, we see that the origin of the stiffness instability is very similar to that illustrated in the preceding simple example: a small box population becomes unphysically negative because of taking too large a timestep, so in the next timestep the offending box exports an unphysical flux of negative population, triggering a divergence that rapidly compromises the entire network.

4. Flux-limited forward difference algorithm

Motivated by the properties of stiffness illustrated in the previous examples, we first introduce a rather crude approximation for stabilizing explicit integration in stiff networks. The results of the previous section indicate that one form of stiffness instability is generated by box populations that become very slightly negative and destabilize the network when they are exported as fluxes to other boxes. Thus, we invoke a simple flux-limiting prescription that if the population of a box becomes negative we do not change the population itself (which would quickly violate conservation of probability) but we suppress all export of that negative population to other boxes. Formally, we require for all computed outgoing fluxes that $F_{ij} \rightarrow \max (F_{ij},0) \equiv \tilde F_{ij}$ . In shorthand, we refer to this as suppression of negative flux and refer to the resulting algorithm as the flux-limited forward difference (FLFD) algorithm. We shall illustrate using the (explicit) forward Euler method supplemented by the flux-limiting prescription. Because we do not alter populations but only restrict their flow by this algorithm, it conserves probability. We may expect that some populations in the network will now be in error because of the flux-suppression criterion. However, such effects tend to involve the smallest populations (because they are the ones most easily made negative by the numerical error), so we may expect that this approximation could be a good one for the larger populations, with the error concentrated in the smallest populations. In the next section, we test this idea on a realistic thermonuclear network.

5. Flux-limited network solutions under nova conditions

We illustrate the FLFD algorithm by application to astrophysical thermonuclear networks under nova conditions.

5.1. Hot carbon–nitrogen–oxygen burning

Hydrogen burning in novae occurs through the hot CNO cycle where, unlike for the normal CNO cycle depicted in figure 2, the rates for proton capture exceed those for β-decay and the reactions in figure 2 break out into a much broader range of reactions. Some representative isotopic abundances under nova conditions calculated using the FLFD algorithm are displayed in figure 6(a), with the results of a standard implicit calculation shown as dashed lines and FLFD calculations shown as symbols. An adaptive timestep was used in the FLFD integration, with the timestep adjusted to keep the populations transferred between boxes in a timestep for some key populations within a prescribed range. Note the very good agreement between implicit and explicit flux-limited methods over six orders of magnitude in the mass fractions in figure 6(a).

Figure 6.

Figure 6. (a) Some representative isotopic abundances under nova (hot CNO) conditions calculated using the explicit FLFD algorithm and compared with a calculation using the standard implicit solver XNet [11]. An initial isotopic abundance distribution enriched in heavy elements has been assumed [12], and reaction rates from the REACLIB library [10] have been used. A constant temperature of T = 0.25 × 109 K and constant density ρ =  500 g cm−3 were assumed. The explicit network contained 145 isotopes, with 924 non-zero couplings. (b) Rates and timescales characteristic of an FLFD nova calculation. Conditions are the same as for part (a) but with a larger reaction library: 896 isotopes with 8260 couplings were included (although only several hundreds of isotopes were populated significantly). Extremal rates plotted are restricted to those involving non-zero fluxes. (c) Comparison of the maximum stable timestep (${\simeq } 1 /{\mathrm{rate}}{_{\mbox{\scriptsize max}}}$ from part (b)) possible for a standard explicit integration with much larger stable timesteps d t and d t' for some representative explicit FLFD integrations.

Standard image

5.2. Stiffness and stability

Figure 6(b) displays the fastest and slowest rates entering a representative FLFD nova simulation as a function of time. The difference of some 18 orders of magnitude between the fastest and slowest rates at any timestep is an indication that this is an extremely stiff system. For standard explicit algorithms, the largest timestep permitted by stiffness stability criteria generally is of the order of the inverse of the fastest rate in the network (see the discussion in section 3.2 and in chapter 16 of [5]). For the calculations illustrated in figure 6(b), the inverse of the fastest rate gives the lower curve in figure 6(c). Thus a normal explicit algorithm would be restricted by stability requirements to timesteps lying approximately in the shaded region below this curve (d t ≃ 10−7 s or less).

In contrast, figure 6(c) displays two curves for stable FLFD integration timesteps lying far above this region. The curve marked dt is for a timestep small enough to give accuracy comparable to figure 6(a). This timestep is seen to be about 105 times larger than would be stable for a normal explicit integration. The curve marked dt' is for a much larger FLFD algorithm timestep that compromises accuracy for the weaker transitions but remains stable and calculates the stronger transitions correctly. The timestep dt' ∼ 100 s is about 109 times larger than would be stable for a standard explicit algorithm.

The picture that emerges from the present results is that the FLFD method is susceptible to stiffness instability, just as for any other explicit method. However, the effect of the instability can be confined to controlled errors in small populations for a range of timesteps far beyond the normal onset of stiffness instability simply by imposing a flux limiter. This flux limiter does not prohibit negative populations but prevents their export between boxes in the network and thus prevents them from growing in an uncontrolled fashion.

6. Stiffness under equilibrium and non-equilibrium conditions

The results of the preceding section indicate that even a relatively crude limit on propagation of negative population can remove large amounts of stiffness instability and leads to an algorithm useful for realistic applications, even for the extremely stiff networks common in astrophysics. But we will now demonstrate that one can do much better than that by exploiting the algebraic structure of the differential equations to make a better approximation than just constraining the sign of propagating populations.

The first step is that we must look more deeply at the stiffness instability. As we now discuss, for the sort of large and very stiff networks that we are addressing here, there are several fundamentally different sources of stiffness instability that are often not clearly distinguished in the literature. The examples discussed to this point (and in many textbooks) emphasize the type of instability associated with small quantities that should strictly be non-negative becoming negative because of an overly ambitious numerical integration step. The discussion of the FLFD algorithm in section 4 illustrates that this type of instability can be removed by approximations as simple as not permitting unphysical negative quantities to influence the rest of the network. However, there are other stiffness instabilities that may be initiated even when no population variables become negative in an integration step. In this kind of instability, we end up having to take the difference of large numbers to obtain a result very near zero. The numerical errors that ensue in a standard explicit approach can then accumulate rapidly and destabilize the network, even before any abundances become negative. This may still be viewed as a stiffness instability because it results from a numerical integration trying to deal with very different timescales, but the origin of these timescales is different from that discussed above. In this case, the disparate timescales are the very rapid reactions driving the system to equilibrium contrasted with the very slow timescale associated with equilibrium itself (which tends to infinity).

As we now consider, this distinction is essential to what follows because these stiffness instabilities have essentially different solutions. Furthermore, we shall find that the second kind of instability can be divided into two subclasses requiring different stabilizing approximations, and that the approximations that we shall introduce in these cases will also naturally take care of the first class of stiffness instabilities because they will as a matter of course prevent the occurrence of negative probabilities in the network.

6.1. The approach to equilibrium

We shall use 'equilibrium' in a broad sense to mean a condition where the populations in a network are being strongly influenced by competition between terms of opposite sign on the right sides of the differential equations (1) governing their evolution. How do we measure the degree of equilibration in a large, stiff network? In terms of the coupled set of differential equations describing the network, we may distinguish two qualitatively different conditions:

  • (i)  
    a macroscopic equilibration that acts at the level of individual differential equations;
  • (ii)  
    a microscopic equilibration that acts at the level of individual terms within a given differential equation.

Let us consider each of these cases in turn. The differential equations that we must solve take the general form of equation (1), dyi/dt = F+i − Fi, where the total flux has been decomposed into a component F+i increasing the population yi and a component Fi depleting the population yi in a given timestep.

6.1.1. Macroscopic equilibration.

One class of approximations that we will investigate depends upon assuming that F+i − Fi → 0 (asymptotic approximations) or F+i − Fi →  constant (steady-state approximations). We shall refer to these conditions as a macroscopic equilibration, since they involve the entire right side of a differential equation in equation (1) tending to zero or a finite constant10. We shall introduce approximations exploiting this whereby whole differential equations are removed from the numerical integration for a network timestep in favor of algebraic approximate solutions for that timestep. Such approximations do not reduce the number of equations to integrate, but they reduce the number of equations integrated numerically by forward difference. They reduce stiffness for any remaining equations that are integrated numerically in the timestep because removing the equations satisfying these conditions tends to reduce the disparity in timescales for the remaining equations.

6.1.2. Microscopic equilibration.

In equation (1), F+i and Fi for a given species i generally each consist of a number of terms depending on the other populations in the network,

Equation (4)

At the more microscopic level, groups of individual terms on the right side of equation (4) may come approximately into equilibrium (the sum of their fluxes tends to zero), even if macroscopic equilibration conditions are not satisfied. The simplest possibility for this microscopic equilibration is that individual forward–reverse reaction pairs such as $A+B \rightleftharpoons C$ , which will contribute flux terms with opposing signs on the right sides of differential equations in which they participate, come approximately into equilibrium11. Then we may consider an algebraic approximation that removes groups of such terms from the numerical integration, replacing their sum of fluxes identically with zero. This will not generally reduce the number of equations to be integrated numerically in a network timestep, but it can reduce dramatically the stiffness of those equations by removing terms with fast rates from the equations, thereby reducing the disparity between the fastest and slowest timescales in the system.

Such considerations will be the basis of the partial equilibrium methods that will be discussed in depth in the third paper in this series [2]. There we shall also demonstrate two important general conclusions: (i) Approximations based on microscopic equilibration are much more efficient at removing stiffness than those based on macroscopic equilibration because they target more precisely the sources of stiffness in the network. (ii) The most powerful approach will be to use macroscopic and microscopic approximations simultaneously in the same set of equations, because they can complement each other in removing stiffness from the equations to be integrated numerically.

6.2. A quantitative measure of microscopic equilibration

The preceding section suggests that when microscopic equilibration becomes important in a network the methods for dealing explicitly with stiffness are different from those used to deal with macroscopic equilibration. Therefore, it is important to establish a quantitative measure of how much microscopic equilibration is present in the network. We shall introduce the simplest possibility: that the amount of microscopic equilibration in the network is measured by the fraction of forward/reverse reaction pairs such as $A+B \rightleftharpoons C+D$ that are judged to be in equilibrium (with each reaction pair considered in isolation from the rest of the network for purposes of this determination). The full machinery to carry this out will be described in the third paper of this series [2]. The remainder of this paper will concentrate on asymptotic approximations to stabilize explicit integration for networks that are assumed to be weakly microscopically equilibrated.

7. Algebraic stabilization of solutions using asymptotic approximations

The FLFD approximation described in section 5 illustrates the basic principle that explicit integration in non-equilibrium situations can be stabilized by forbidding the propagation of negative flux. However, the FLFD algorithm represents only a zero-order solution to this problem (a yes/no decision on whether flux components are allowed to propagate) that can be improved substantially by exploiting the structure of the coupled equations to replace the numerical solution with an algebraic approximation that is strictly non-negative. Although the approximations that we now discuss have been implemented in some form in the earlier literature [6, 1315], we shall demonstrate that our implementation appears to be much more successful than previous applications to large, extremely stiff networks, and we shall reach different conclusions about these methods than those reached in earlier publications.

7.1. Some explicit asymptotic approximations

The differential equations that we must solve take the form given by equation (1). Generally, F+i and Fi for a given species i each consist of a number of terms depending on the other populations in the network. The depletion flux for the population of species i will be proportional to yi,

Equation (5)

where the kij are rate parameters (in units of time−1) for each of the m processes that can deplete yi, which may depend on the populations yj and on local thermodynamic variables such as temperature and density. The characteristic timescales τij = 1/kij will differ by many orders of magnitude in the systems of interest, implying that the equations are stiff. From equation (5), we may define the effective total depletion rate ki for yi at a given time, and a corresponding timescale τi as

Equation (6)

permitting equation (1) to be written as

Equation (7)

Thus, in a finite-difference approximation at timestep tn we have

Equation (8)

We now define the asymptotic limit for the species i to be F+i ≃ Fi, implying from equation (1) that dyi/dt ≃ 0. In this limit, equation (8) gives a first approximation y(1)i(tn) and local error E(1)n, respectively, for yi(tn) as

Equation (9)

For small dyi/dt, we may then get a correction term by writing the derivative term in equation (8) as

Equation (10)

where O(x) denotes the order of x. If we retain only the first term and approximate y(t) by y(1)(t), we obtain that

Equation (11)

Therefore, the estimate for y is improved to

Equation (12)

where we now employ compact index notation yn ≡ yi(tn), and so on, and have dropped the species index i to avoid notational clutter. Because we are approximating the derivative term, we expect that equation (12) is valid only if the second term is small, implying that our approximation becomes more valid if kΔt is large.

The preceding discussion implements an asymptotic approximation in a very simple way. Other, more sophisticated, asymptotic approximations may be derived. For example, if we retain the full expression for the derivative in equation (10) and substitute in equation (8), we obtain

Setting y(tn) = y(2)n and solving for y(2)n gives

Equation (13)

where a term of the order of (Δt)2/(1 + k(tnt) has been discarded. Another approach is to use a predictor–corrector scheme [6, 13, 15]. We may solve equation (1) by finite difference, replacing quantities on the right side of equation (1) with averaged quantities:

Equation (14)

where for notational convenience we have traded the rate parameters ki for the corresponding timescales τi ≡ 1/ki. Solving this equation for yn gives

Equation (15)

which is not easy to use because the τn and F+n are implicit functions of the yn that we seek. We obtain a usable explicit algorithm by solving an approximate form of equation (15) to get a first guess $y{^{\mbox {\scriptsize p}}}$ for yn (the predictor step), using that approximate result to estimate values of τn and F+n, and then using these values obtained from the predictor step to solve equation (15) (the corrector step). Specifically,

  • The predictor estimate $y{^{\mbox {\scriptsize p}}}$ is obtained by setting τn = τn−1 ≡ τ0 and F+n = F+n−1 ≡  F+0 in equation (15).
  • The corrector value $y{^{\mbox {\scriptsize c}}}$ is obtained by substituting $F_{{\mbox{\scriptsize p}}}^{+}$ for F+n, and $\tau_{{\mbox{\scriptsize p}}}$ for τn in equation (15).

This yields a predictor and a corrector [6]

Equation (16)

where '0' denotes initial quantities and 'p' denotes quantities computed using the results of the predictor step. We shall test the asymptotic approximations (12), (13) and (16) in the examples below.

7.2. Mathematical properties of asymptotic approximations

The mathematical and numerical properties of asymptotic approximations have been explored in [6, 1315] and we only summarize them here.

  • (i)  
    The preceding asymptotic formulae are explicit, since only quantities already known are required to advance a timestep.
  • (ii)  
    Asymptotic methods do not need to compute Jacobians or invert matrices.
  • (iii)  
    Asymptotic methods are A-stable [6, 16] on linear problems.
  • (iv)  
    Explicit asymptotic methods should scale linearly with network size.
  • (v)  
    Asymptotic methods require initial values from only one timestep (self-starting).

A more extensive discussion may be found in [6, 13].

7.3. An asymptotic flux-limiting algorithm

We now use the preceding formalism to define an explicit asymptotic flux-limiting integration algorithm. Since the asymptotic approximation specified above is expected to be valid if kΔt is large, we define a critical value κ of kΔt and at each timestep cycle through all network populations and compute the product kiΔt for each species i using equation (6) and the proposed timestep Δt. Then, for each population species i:

  • (i)  
    If kiΔt < κ, we update the population numerically using the standard flux-limiting explicit algorithm discussed in section 4.
  • (ii)  
    Otherwise, for kΔt ⩾ κ, we update the population algebraically using one of the asymptotic approximations given in equations (12), (13) or (16).

From considerations such as those in section 3, we expect an explicit integration to be stable if kiΔt < 1 and to potentially be unstable if kiΔt ⩾ 1; thus a possible choice is κ = 1. For the networks discussed in this paper, we have found this value of κ to work well and have adopted it. For that specific choice of κ, explicit numerical integration should be stable for those cases where it is applied, so we expect that at each timestep all abundances will remain positive and the flux-limiting prescription for the explicit numerical integration may be dropped. Note that at each timestep some species may be updated by explicit forward difference and some by the asymptotic approximation, and that the division of species between these two categories could change at each timestep since the product kiΔt is time-dependent.

7.4. A simple adaptive timestepper

Implementing the preceding algorithm requires an adaptive timestepper. We take the point of view that the present task is to establish whether explicit methods can even compete with implicit methods for stiff networks. Since previous studies have generally found that explicit methods fail by many orders of magnitude to attain the speeds of implicit methods in highly stiff networks, our timestepper need not be optimal at this point to answer that question.

The first consideration is a standard one that limits the population change at each timestep. However, the preceding algorithm does not guarantee that total population is conserved, so in setting an adaptive timestep one should make a check that ensures conservation of population at the desired level. Generally, if population conservation does not satisfy the required tolerance at a given timestep, making the timestep small enough is guaranteed to improve conservation of population because it will reduce kiΔt and therefore will tend to decrease the number of isotopes being treated asymptotically. To ensure conservation of particle number at a desired level in the overall calculation, we may limit the deviation in any one timestep to a small amount. Thus, we adopt a simple timestepper with two stages:

  • (i)  
    After the rates and fluxes are computed at the beginning of a new timestep, compute a trial timestep based on limiting the change in populations that would result from that timestep to some specified tolerance. Use the minimum of this trial timestep and the timestep that was taken in the previous integration timestep to update the populations by the explicit asymptotic algorithm.
  • (ii)  
    Check for conservation of population. If the conservation law is satisfied within the desired tolerance for this timestep, proceed. If it is not (or is satisfied too well), decrease (increase) the timestep as appropriate by a small factor and repeat the calculation of populations with the new timestep but original fluxes.

We then accept this timestep without a further check. We tested whether an iteration to ensure that the conservation condition is satisfied at each step would improve results, but this did not lead to a significant improvement in our tests.

Far removed from equilibrium the limitation in population changes determines the timestep with this algorithm, but in the approach to equilibrium the timestep becomes dominated by the probability conservation criterion. Although it is probably not fully optimized, we have found this simple timestepper to be stable and accurate for the varied astrophysical thermonuclear networks that we have tested, and thus adequate for our task here. This should be contrasted with previous attempts to apply asymptotic methods to thermonuclear networks, which failed to produce accurate results and were abandoned as unsuitable for such stiff networks [613].

8. Comparisons of explicit and implicit integration speeds

We shall be comparing explicit and implicit methods using codes that are at very different stages of development and optimization. We assume that for codes at similar levels of optimization the primary difference between explicit and implicit methods would be in the extra time spent in implicit-method matrix operations. Hence, if the fraction of time spent on linear algebra is f for an implicit code, we assume that an explicit code at a similar level of optimization could compute a timestep a factor of F = 1/(1 − f) faster.

We have used the implicit backward Euler code XNet [11] to estimate the factors F for various networks [17, 18]. For small networks, where dense solvers are most appropriate, the matrix build and solve corresponds typically to 50–75% of the total computational cost, implying that F ∼ 2–4. For networks with hundreds of species, where sparse-matrix solvers are more appropriate, the matrix build and solve typically consumes 80–90% of the computational cost, implying that F ∼ 5–10. Based on these results, we adopt the factors F displayed in table 1 for the networks investigated here. Then we may compare roughly the speed of explicit versus implicit codes (possibly at different levels of optimization) by multiplying F by the ratio of implicit to explicit integration steps required for a given problem. This procedure has obvious uncertainties, and likely underestimates the speed of an optimized explicit versus optimized implicit code [2], but will give a useful lower limit on how fast the explicit calculation can be.

Table 1. Explicit speedup factors F.

Network Isotopes Speedup F
pp 6 ∼1.5
Alpha 16 3
Nova 134 ∼5–10
150-isotope 150 ∼5–10
365-isotope 365 ∼5–10

9. Network calculations in the simplest asymptotic approximation

First we shall establish that the asymptotic algorithm is capable of correct integration of coupled sets of extremely stiff equations. We have tested this for a variety of calculations in two ways:

  • (i)  
    comparisons with the results from standard implicit codes;
  • (ii)  
    for some smaller networks where the corresponding integration time is not too prohibitive, comparison with explicit forward-Euler calculations made with timesteps short enough to be stable.

Our general finding is that the asymptotic algorithm outlined above gives the same results as standard implicit and explicit codes, even for the stiffest networks found in astrophysics applications, provided that the numerical timesteps are limited sufficiently to ensure conservation of overall probability in the network at the desired level of precision.

9.1. Tests against fully explicit calculations

Figure 7 illustrates an asymptotic approximation calculation that gives results essentially identical to the results from exact numerical integration. In this example, the sum of the mass fractions was constrained to deviate from unity by not more than 1% over the entire range of the calculation by requiring that if it deviates by more than 10−8 from unity in any one timestep, the timestep is reduced in size. We shall generally use this global 1% criterion for the examples presented in this paper. Higher precision may be obtained by tightening this constraint, but this is typically already more conservative than justified since input parameter uncertainties in realistic large thermonuclear networks and uncertainties in the coupled hydrodynamics may each be considerably larger than 1%.

Figure 7.

Figure 7. Comparison of the asymptotic approximation (12) with a forward Euler integration that used timesteps short enough to be stable for an alpha network (a network of isotopes 4He, 12C, 16O, ..., 68Se differing from each other by multiples of 4He) at constant temperature T = 7 × 109 K and constant density of 108 g cm−3. Initial abundances corresponded to equal mass fractions of 12C and 16O, and rates from the REACLIB library [10] were used. The left figure compares mass fractions; the right figure compares differential and integrated energy production. Solid lines are explicit forward-Euler integration with a timestep constrained to be less than the inverse of the fastest rate in the system so that it is stable; dashed lines are the corresponding asymptotic approximation using equation (12). The value of dE/d t oscillates between positive and negative values, so the log of the absolute value of dE/d t is plotted, with the sign of dE/d t indicated in each region.

Standard image

Having established that explicit asymptotic approximations can give correct results even for extremely stiff networks, we now turn to the question of their efficiency (and further tests of accuracy) by examining calculations of various astrophysical thermonuclear networks using this approximation. In this section, we shall use the simplest asymptotic approximation corresponding to equation (12). In section 10, we shall test the alternative asymptotic approximations, of equations (13) and (16).

9.2. Explicit asymptotic integration of the pp-chains

The solar pp-chains, which convert hydrogen into helium, provide a striking example of stiffness in a simple network12. In figure 8, we illustrate integration of the pp-chains at a constant temperature and density characteristic of the core in the present-day Sun, using the asymptotic method and the implicit backward-Euler code XNet [11]. We see that the explicit asymptotic integration gives results for the mass fractions in rather good agreement with the implicit code over 20 orders of magnitude, and is generally taking timesteps dt ∼ 0.1t that are comparable with those for the implicit code over the entire range of integration. (The asymptotic method required 333 total integration steps versus 176 steps for the implicit code.)

Figure 8.

Figure 8. Integration of the pp-chains under constant temperature and density characteristic of the core of the present-day Sun: a temperature of 16 ×  106 K and a density of 160 g cm−3, assuming solar initial abundances. Reaction rates were taken from the REACLIB library [10]. (a) Mass fractions for the asymptotic method of equation (12) (dotted curves) and for the standard implicit code XNet [11] (solid curves). (b) Integration timesteps for the asymptotic method (dotted magenta) and the implicit method (solid green). The expected maximum stable fully explicit timestep is indicated by the dashed blue curve.

Standard image

As shown in section 3, the maximum stable timestep for a standard explicit integration method may be estimated as the inverse of the fastest rate contributing to the network. This is illustrated by the dashed blue curve in figure 8(b). At late times the explicit integration timesteps are ∼ 1021 times larger than the maximum stable timestep for a normal explicit integration. The calculation illustrated in figure 8 takes a fraction of a second on a 3 GHz processor with the explicit asymptotic method (as does the implicit solver). In contrast, from figure 8(b) we estimate that a standard explicit method taking the largest stable fully explicit timestep would require ∼ 1021 s of processor time to compute this simple seven-element network to hydrogen depletion.

9.3. Simulations under nova conditions

The preceding example entailed an exceedingly stiff but rather small network. Let us now turn to an example that is highly stiff and involves hundreds of isotopes. In figure 9(a), we illustrate a calculation using the explicit asymptotic algorithm and a hydrodynamical profile shown in figure 9(b) that is characteristic of hot-CNO burning in a nova outburst. The explicit asymptotic timesteps are displayed in figure 10(a).

Figure 9.

Figure 9. (a) Mass fractions for a network under nova conditions, corresponding to the hydrodynamical profile shown in (b). The calculation used the explicit asymptotic method corresponding to equation (12) and a network containing 134 isotopes coupled by 1531 reactions, with rates taken from the REACLIB library [10] and initial abundances enriched in heavy elements [12].

Standard image
Figure 10.

Figure 10. (a) Timesteps for integration of figure 9. The solid red curve is from the asymptotic calculation. The dotted green curve is from an implicit integration using the backward-Euler code XNet [11]. The blue dashed curve estimates the largest stable fully explicit timestep as the inverse of the fastest rate in the system. (b) Fraction of isotopes that become asymptotic and fraction of reactions that reach partial equilibrium in the asymptotic-method calculation, computed using methods described in [2].

Standard image

In these simulations, we see that the asymptotic network takes stable and accurate timesteps corresponding to dt ∼ 0.1t over most of the time integration, except in the region of sharp temperature rise and strong burning, where dt ∼ (0.01–0.001)t. Over most of the range of integration after burning commences, the asymptotic solver timesteps (solid red curve in figure 10(a)) are a million or more times larger than the maximum stable timestep for a purely explicit method (blue dashed curve in figure 10(a)); at late times this disparity increases and by the end of the calculation the asymptotic timesteps are approximately 1010 times larger than would be stable for a normal explicit integration.

The generally large explicit asymptotic timesteps over the entire integration range illustrated in figure 10(a) are greater than or equal to those for a typical implicit code, as may be seen by comparing with the implicit (backward Euler) calculation timestepping curve shown in dotted green. In this calculation the implicit method required 1335 integration steps while the explicit asymptotic calculation required only 935 steps, and furthermore we expect that the explicit timesteps can be computed more quickly than the implicit timesteps. For a network with 134 isotopes, an optimized explicit code should calculate a timestep at least five times faster than typical implicit codes (table 1). These large explicit timesteps are possible because during the simulation many isotopes become asymptotic but very few reactions reach partial equilibrium, as illustrated in figure 10(b). Similar results for nova simulations were obtained with the asymptotic method in [17, 18] using a different nova hydrodynamical profile and a different reaction library. Allowing for uncertainties in the present comparisons that use differently optimized codes and somewhat different timestepping criteria, we conclude that the explicit asymptotic method may be intrinsically at least several times faster than a state-of-the art implicit code for simulations under nova conditions.

9.4. Scaling with network size

For explicit methods the computing time should scale linearly with the size of the network if the network is relatively sparse. This paper and the authors of [1, 2] use explicit methods modified by additional bookkeeping to remove stiffness, raising the issue of whether additional overhead destroys the linear scaling. In figure 11, we illustrate scaling of integration time with network size for the nova simulation of figure 9. The behavior is seen to be approximately linear, as expected for an explicit algorithm since no matrix inversions are required. The quasi-steady-state (QSS) method discussed in [1] requires an amount of overhead comparable to the asymptotic method and so should also be linear. The partial equilibrium method discussed in [2] adds some additional computation and logic to the asymptotic or QSS methods, but again no matrix operations are used, so it should not alter appreciably the linear scaling. Our tests so far (on networks as large as 20 species) suggest that the partial equilibrium bookkeeping overhead indeed is incremental and does not alter the network-size scaling substantially.

Figure 11.

Figure 11. Linear scaling of wall clock time per integration step with the number of isotopes in the network for the explicit asymptotic approximation in the nova simulation of figure 9. The dashed line is drawn only to guide the eye.

Standard image

10. Tests of more sophisticated asymptotic algorithms

All the results presented to this point have used the simplest asymptotic formula defined in equation (12). This section compares the results from equation (12) to those obtained with the more sophisticated formulae (13) and (16), for the case of an alpha network with constant T9 = 5 and ρ = 1 × 108 g cm−3. In figure 12, we display a composite of the computed mass fractions and the timestepping for the asymptotic approximations corresponding to these three formulae. We find that the more sophisticated asymptotic approximations in equations (13) and (16) give results for abundances that are very similar to those from equation (12), but can in some cases give more favorable timestepping by factors of several. These results are representative of tests on a variety of networks and we conclude that for typical thermonuclear networks equations (12), (13) and (16) yield similar results, except for possible differences by factors of up to 2–3 in computational speed.

Figure 12.

Figure 12. Comparison of mass fractions (a) and timesteps (b) using different asymptotic approximations for an alpha network with constant T9 = 5 and ρ =  1 × 108 g cm−3. The network contained 16 isotopes coupled by 46 reactions, with rates taken from REACLIB [10]. Initial abundances corresponded to equal mass fractions of 12C and 16O. Simple refers to equation (12), He to equation (13) and O–B to equation (16).

Standard image

11. Non-competitive asymptotic timesteps in the approach to equilibrium

In previous sections evidence has been presented that, well-removed from equilibrium, asymptotic methods can provide stable and accurate integration of the stiffest large networks with timesteps that are comparable with those employed in standard implicit and semi-implicit stiff solvers. In practice, for astrophysical thermonuclear networks this means that timesteps are typically from 0.1 to 0.001 of the current time over most of the integration range, except for brief time periods where very strong fluxes are being produced and timesteps may need to be shorter to maintain accuracy. Since explicit methods can generally compute each timestep substantially faster than for implicit methods, this suggests that such methods offer a viable alternative to implicit solvers under those conditions.

However, the preceding statements are no longer true when substantial numbers of reaction pairs in the network begin to satisfy microscopic equilibrium conditions (according to the criteria given in section 6.2). Then the typical behavior for asymptotic approximations is for the timestep to become constant or only slowly increasing with integration time. (Indeed, we have already seen an indication of this behavior at late times in figure 12(b).) Figure 13 illustrates for two different networks coupled to a single-zone hydrodynamical simulation. We see that the 19-isotope network is only marginally able to keep up with the hydrodynamical timesteps, whereas the 150-isotope network lags orders of magnitude behind for hydrodynamical integration times later than about 10−4–10−5 s.

Figure 13.

Figure 13. Network timesteps (green solid curves) in asymptotic approximation for a single-zone two-dimensional hydrodynamics simulation using the FLASH [9] hydrodynamics code. Left: 150-isotope network. Right: 19-isotope network. Insets show the fraction of reactions that reach equilibration as a function of time, computed using the methods discussed in [2]. The shaded regions indicate the target network timestepping required for the network to keep up with the hydrodynamics, as discussed further in conjunction with figure 1.

Standard image

The reason for this loss of timestepping efficiency for the asymptotic method is the approach to equilibrium at late times; this is documented in the inset plots for figure 13, which show the fraction of reactions in the respective networks that satisfy equilibrium conditions. The reason why the 19-isotope network is able to keep up much better than the 150-isotope network is also clear from the inset plots: the 19-isotope network slowly approaches 30–40% equilibration in this region, but the 150-isotope network, with much faster reactions because it includes fast proton and neutron reactions not found in the 19-isotope network, quickly reaches 70% equilibration. Since in most applications for extremely stiff astrophysical networks the physical phenomena require integration over many decades of time, this lag of the asymptotic timestepping as equilibrium is approached is disastrous for such approximations and they quickly lose out to implicit methods, which can continue to take large integration steps even nearing equilibrium (although they are less efficient than explicit methods at computing each timestep).

Another example of the failure of the asymptotic approximation to generate competitive timesteps is illustrated in figure 14. The asymptotic mass fractions calculated in figure 14(a) are quite accurate in comparison with the results from standard implicit codes, but the timestepping illustrated in figure 14(b) is not competitive with implicit methods at late times. For logt ∼ − 2, the asymptotic integration timesteps are only of the order of 10−8 s, whereas the implicit code is taking timesteps larger than 10−3 s at this point.

Figure 14.

Figure 14. Asymptotic calculation with an alpha network for a hydrodynamic profile characteristic of a single isolated zone in a Type Ia supernova explosion. (a) Mass fractions in asymptotic approximation (solid) and with the implicit code XNet [11] (dotted). (b) Integration timesteps. The asymptotic timesteps are illustrated by the solid green curve and the XNet implicit timesteps by the dotted orange curve. The dashed blue curve labeled $1/R_{\mbox {\scriptsize max}}$ indicates approximately the maximum stable timestep for a purely explicit method (corresponding to the inverse of the fastest rate in the network). (c) The hydrodynamic profile. (d) Fraction of isotopes that become asymptotic and the fraction of network reactions that become equilibrated (see [2]) in the course of the explosion.

Standard image

The reason for this failure of the asymptotic approximation can be seen clearly in figures 14(b) and (d). In the region of rapid temperature rise illustrated in figure 14(c), the rates in the network—especially the photodisintegration reactions that are the inverses of the 4He capture reactions—increase dramatically. This causes the maximum stable explicit timestep to become much smaller, as illustrated in figure 14(b) by the dashed blue curve. The steadily increasing explicit timestep (solid green curve) intersects this maximum stable explicit timestep curve near logt = −8. But, from figure 14(d) we see that essentially no isotopes in the network satisfy the asymptotic condition at this point. Thus the integration is forced to use a standard explicit method and the timestep must (to maintain stability) follow the decreasing dashed blue curve until around logt = −4, when significant numbers of isotopes finally begin to satisfy the asymptotic condition and the explicit asymptotic algorithm is able begin to take timesteps larger than the explicit limit. However, at this point the asymptotic timesteps are already orders of magnitude smaller than those an implicit method would use, and the asymptotic method is able to increase the timestep by only about two orders of magnitude before the system reaches equilibrium. Thus, for the entire time range from logt ∼ − 8 until logt ∼ − 2 the explicit asymptotic method computes the network accurately but its timesteps lag many orders of magnitude behind those from standard implicit methods.

As we shall explain in considerable detail in the third paper of this series [2], the reason for the loss of efficiency for asymptotic methods as equilibrium is approached is that the asymptotic approximation removes a large amount of stiffness associated with macroscopic equilibration, but near (microscopic) equilibrium a fundamentally new source of stiffness becomes important and it is not generally removed by the asymptotic approximation. Indeed, we see clearly from figure 14(d) that the fraction of reactions in the network that satisfy equilibrium conditions increases rapidly beginning at logt ∼ − 7 and reaches unity by logt ∼ − 3. In this third paper, we shall describe a new implementation of partial equilibrium methods that can be used in conjunction with asymptotic methods to turn equilibrium from a liability into an asset and increase the explicit timestepping by orders of magnitude in the approach to equilibrium. In that paper, we will give examples suggesting that these methods are capable of giving timestepping competitive with that of implicit methods across the entire range of interesting physical integration times for a variety of extremely stiff reaction networks.

12. Summary and conclusions

Explicit numerical integration can compute a timestep faster than implicit methods, and the time to compute a network explicitly scales linearly and therefore more favorably with network size than for implicit codes. Nevertheless, previous discussions of numerical integration for very stiff systems have concluded rather uniformly that standard explicit methods are not competitive with implicit methods for stiff networks because they are unable to take large enough stable timesteps. Improvements in explicit methods based on using asymptotic and steady-state limiting solutions to remove stiffness from the network have had some success for systems of moderate stiffness such as various chemical kinetics problems. However, for extremely stiff networks such as those encountered commonly in astrophysical thermonuclear calculations, it has been concluded in the previous literature that such methods are not competitive, failing even to give correct results, with timesteps that are far too short to be useful even if they gave correct results [6, 13]. This paper has presented evidence strongly challenging all these conclusions.

We have clearly identified three fundamentally different sources of stiffness in large networks, only the first of which is commonly emphasized in the literature:

  • (i)  
    Situations where small populations can become negative if the explicit timestep is too large, with the propagation of this anomalous negative population leading to exponentially growing terms that destabilize the network.
  • (ii)  
    Situations where the right sides of the differential equations expressed as d Y =F = F+ − F approach a constant derived from the difference of two large numbers (the total flux in F+ and the total flux out F), and numerical errors in taking this (often small) difference destabilize the network if the timestep is too large.
  • (iii)  
    Situations where on the right sides of the differential equations expressed in the form of equation (4) the net flux in specific forward–reverse reaction pairs (f+i − fi) tends to zero as the system approaches equilibrium, leading to large errors if the timestep is too large because the net flux is derived from the difference of two large numbers and the timescale equilibrating the populations is short compared with the desired numerical timestep.

We have shown that these distinctions are important because different sources of stiffness require different approximations for their removal in an algebraically stabilized explicit integration.

Using the extremely stiff systems characteristic of astrophysical thermonuclear networks as a stringent test, we have shown that asymptotic methods are very successful at removing the first two types of stiffness, and give correct results, even for the stiffest of thermonuclear networks, provided that adequate attention is paid to conservation of probability (equivalently, nucleon number) in the network. Furthermore, we have shown various examples of stable and accurate timestepping with these methods in extremely stiff systems that are competitive with that of standard implicit codes, corresponding in some simple but physically important networks to integration timesteps that are as much as 20 orders of magnitude larger than the maximum timestep that would be stable in a standard explicit method. However, we have also shown that such methods give correct results but fail to exhibit competitive timestepping when the system approaches microscopic equilibrium and the third type of stiffness instability begins to dominate. In a following paper [2], we shall provide evidence for competitive timestepping, even in the approach to equilibrium, if the explicit asymptotic method is supplemented by partial equilibrium approximations designed specifically to deal with the third type of stiffness instability.

Taken together, this paper and the following ones on QSS methods [1] and partial equilibrium methods [2] present compelling evidence that algebraically stabilized explicit integration methods are capable of timesteps competitive with implicit integration methods for a variety of highly stiff reaction networks [19]. Since explicit methods can execute a timestep faster than an implicit method in a large network, our results suggest that algebraically stabilized explicit algorithms may be capable of performing as well as, or even substantially outperforming, implicit integration in a variety of moderate to extremely stiff applications. Because of the highly favorable linear scaling for explicit methods, this fundamentally new view of the efficacy of explicit integration for stiff equations may be particularly important for applications in any field where it is imperative that more realistic—and therefore much larger—networks be used in complex physical simulations.

Acknowledgments

We thank Tony Mezzacappa for useful discussions, Austin Harris for help with some of the calculations, Eric Lingerfelt for programming assistance and Christian Cardall for a careful reading of the manuscript. This research was sponsored by the Office of Nuclear Physics, US Department of Energy.

Footnotes

  • Memory footprint is also a significant issue and represents the absolute limit on the size of the problem that can be attempted. If the solution vector for the system of equations to be solved does not fit in the memory available, it is difficult to efficiently solve that system of equations on that hardware. However, in our experience the time required to execute the computation represents a more stringent limit in most cases, either from the perspective of exhausting the user's allocation of CPU-time, or of exhausting the user's patience through excessive wall clock time. This will be particularly true for simulations with larger networks since the execution time grows more quickly than the memory footprint. Hence, our emphasis in this discussion on optimizing the speed of network computations.

  • 10 

    Among various scientific communities concerned with the solution of reaction networks, these approximations have inconsistent names. For example, in nuclear astrophysics and parts of chemistry the condition F+i − Fi → 0 is termed steady state. Here we adopt the terminology of the combustion community where these approximations have been most fully developed. Note also that our definitions of microscopic and macroscopic equilibration are applied at the level of individual differential equations (not the entire system). Thus macroscopic equilibrium in our terminology should not be confused with global chemical equilibrium for the system.

  • 11 

    In the limit that all such reaction pairs in the network come into microscopic equilibrium, the system will be in global chemical equilibrium and the compositions will obey detailed balance. However, we are interested not only in that limiting case but also in the more general possibility where some but not necessarily all of the reaction pairs in the network are microscopically equilibrated. This is discussed in considerable depth in [2].

  • 12 

    The first reaction in the pp-chains, $^{1}{\mathrm { H}} +{}^{1}{\mathrm{H}} \rightarrow {}^{2}{\mathrm{H}} + \nu {_{\mbox {\scriptsize e}}} + {\mathrm{e}}^+$ , has a characteristic timescale of billions of years (∼1016 s) under the present conditions in the solar core, whereas the second reaction, 1H + 2H → 3He + γ, has a characteristic timescale of seconds. This enormous disparity in timescales implies an extremely stiff set of equations governing the pp-chains. It is also crucial physically to the Sun producing primarily visible light for a stable 10 billion year lifetime, thus giving favorable conditions for the emergence and evolution of life on the Earth.

Please wait… references are loading.
10.1088/1749-4699/6/1/015001