Stochastic Reservoir Modeling Using Simulated Annealing and Genetic Algorithms Mrinal K. Sen, U. of Texas, Akhil Datta-Gupta, SPE, Texas A&M U., P.L. Stoffa, L.W. Lake, SPE, and G.A. Pope, SPE, U. of Texas Summary This paper discusses and compares three different algorithms based on combinatorial optimization schemes for generating stochastic penneability fields. The algorithms are not restricted to generating Gaussian random fields and have the potential to accomplish geolog- ic realism by combining data from many different sources. We have introduced a "heat-bath" algorithm for simulated annealing (SA) as an alternative to the commonly used "Metropolis" algorithm and a new stochastic modeling technique based on the "genetic" algorithm. We applied these algorithms to a set of outcrop and tracer flow data and examined the associated uncertainties in predictions. All three algorithms reproduce the major features of penneability distribution and fluid flow data. For relatively small problems, the Metropolis algorithm is the fastest. For larger problems, the heat-bath algorithm is at least as fast and often faster than the Metropolis algo- rithm, with significant potential for parallelization. The perfonnance of the genetic algorithm is highly dependent on the choice of popula- tion size and probabilities of crossover, update, and mutation. Introduction Discrete or combinatorial optimization techniques, SA in particular, have shown great promise in obtaining integrated reservoir descrip- tion because they can combine data from many different sources, such as cores, logs, seismic traces, and interwell tracer data. One of the principal advantages of these techniques over traditional sto- chastic models is their ability to incorporate effective properties derived from integrated measures, such as pressure-transient analy- sis. 1 ,2 The commonly used Metropolis method 3 - 5 for SA, although simple and effective, can be computationally prohibitive for large- scale reservoir engineering problems because of the large number of rejection moves it makes as annealing progresses. In this paper, we investigate an alternative algorithm for SA, the heat-bath algo- rithm,6,7 for generating stochastic permeability fields with specified geostatistical attributes. Unlike the Metropolis algorithm, this meth- od produces weighted selections that are always accepted. The heat- bath algorithm also offers significant potential for parallelization. We also investigate a new technique for stochastic reservoir model- ing based on the genetic algorithm (GA).8·IOLike SA, the GA is also an optimization procedure; it, however, is based on the mechanics of natural selection and genetics. The method combines an artificial sur- vival-of-the-fittest criterion with genetic operators abstracted from nature. It is also ideally suited for parallel computation. The stochastic modeling techniques have been compared by ap- plying them to data from the Antolini sandstone, an eolian outcrop from northern Arizona. We have also modeled tracer flow through the heterogeneous fields generated by these methods. The actual and computed effluent tracer concentration histories have been compared to examine how closely fluid flow is reproduced by the stochastic penneability fields. Finally, we quantify uncertainty in the tracer flow predictions and detennine a most likely tracer re- sponse from the stochastic penneability fields. Copyright 1995 Society of Petroleum Engineers Original SPE manuscript received for review Oct. 20. 1992. Revised manuscript received March 21. 1994. Paper accepted for publication May 24. 1994. Paper (SPE 24754) first pres· ented atthe 1992 SPE Annual Technical Conference and Exhibition held in Washington. Oct. 4-7. SPE Formation Evaluation, March 1995 SA: Metropolis vs. Heat-Bath Algorithms In this section, we discuss two different approaches to optimization by SA. The Metropolis algorithm has been previously used for gen- erating stochastic penneability fields. 1 ,2 Such an approach imposes the desired spatial structure by defining an appropriate objective function to minimize the differences between the computed and de- sired variograms or correlation functions. We discuss the Metropo- lis algorithm and introduce the heat-bath method as an alternative that is well-suited for parallel computation. Metropolis Algorithm. Metropolis et al. 3 addressed the problem of random sampling from a Gibbs distribution at a constant tempera- ture, thereby simulating the average behavior of a physical system in thennal equilibrium. The Metropolis algorithm, as applied by Kirkpatrick et al., 4 has recently been applied to several optimization problems. 5 We describe below the Metropolis algorithm from the point of view of generating stochastic permeability fields. 1. Select an initial state. We choose a random distribution of per- meabilities on a grid, sampled from a specified distribution. 2. Introduce perturbation. Several perturbation mechanisms are available. One possible choice is simply to swap penneability val- ues between two randomly chosen grid points. 1 ,2 Instead, we select a random location in the grid and replace the penneability at that location with another value drawn at random from a specified dis- tribution. We can sample penneabilities from different distributions at different spatial locations, and thus, incorporate a regionally vary- ing penneability distribution that is more consistent with geology. 3. Calculate the change in the energy function, fie, caused by the perturbation. The energy function in this case is a suitably defined objective function, which will be discussed later. 4. If the energy function decreases because of the perturbation (fie < 0), retain the change. 5. If fie> 0, accept the perturbation with probability P(fie) = exp( - fiell), where T is analogous to temperature in the Gibbs distribution. 6. After a sufficient number of perturbations have been accepted to ensure "thermal equilibrium" (typically, a factor of 10 greater than the number of grid points), lower T according to a prespecified annealing schedule. 7. Return to Step 2 and continue until a suitably defined conver- gence criterion is satisfied or a specified number of perturbations are exceeded. Heat-Bath Algorithm. Although the Metropolis method is simple and effective, at low temperatures the computation time may be quite large because many candidates are rejected (Step 5) before each move is made to a different state. Furthennore, if heuristic or other fast tailored methods are used to construct a good initial state, annealing should begin at a low temperature, and thus there is a low acceptance rate throughout. An alternative to the Metropolis algo- rithm is the single-step heat-bath method,6,7 which produces weighted selections that are always accepted. In the heat-bath algorithm, each gridblock is visited sequentially for possible penneability values, keeping the permeabilities of all other gridblocks fixed. The algorithm proceeds with the following steps for generation of stochastic permeability fields. 1. Select an initial state as in the Metropolis algorithm. 2. Randomly select M values of penneability from a specified dis- tribution. We can, for example, divide the allowable range of penne- 49