Concept
The adaptive implicit method (AIM) automatically selects a suitable implicit level node by node and step by step. The linearization methods used in reservoir simulation differ in their implicit level, and the three types, IMPES, semi-implicit, and fully implicit, spread widely in complexity and stability: IMPES is the simplest, saving computing effort and memory, but it is the least stable and suits only simple cases such as areal oil-water flow; the semi-implicit method lies between the two; the fully implicit method is the most complex and also the most stable, and complex cases such as three-phase coning cannot do without it.
Instability mostly starts where parameters change abruptly and nonlinearity is strong. Even when the problem itself is complex, the parameters do not change sharply everywhere in the solution domain; often they change sharply only locally, even in a very small region, and the severity also varies with time. In coning, for example, saturation and pressure change most sharply near the well, and the magnitude of the change varies with the production rate; far from the well, the parameters change gently, and the fully implicit method is not needed there.
The conventional practice, however, applies the same implicit level to all nodes and all time steps. To keep the whole calculation stable, the implicit level has to be raised everywhere to meet the requirements of the most unstable region, so many places that could have been computed well at a low implicit level are forced to use a high one, wasting computing effort for nothing.
The adaptive implicit method was designed for this: it lets each node and each time step set its own level as needed, keeping the whole calculation stable while saving computing effort. In operation, each grid block takes exactly the level it needs, no higher and no lower; the level of the same grid block may differ from one time step to another, and different grid blocks may take different levels at the same time step. This is the basic idea of the method, and the discussion in another source agrees with it.
Calculation Methods
Identifying the Implicit Level of Each Node
The quantities usually to be solved in a black oil model are three: pressure P, water saturation Sw, and gas saturation Sg (or bubble-point pressure Pb). Thomas and Thurnau defined the implicit level by the number of variables solved implicitly at each node: level 1 is IMPES, in which only pressure is solved implicitly; level 2 is the case in which two variables, one of them pressure, are solved implicitly; and level 3 is the case in which all three variables are solved implicitly.
The flow equations are not uniformly nonlinear: relative permeability and capillary pressure are the main sources, and both vary with saturation, while the nonlinearity from the pressure functions is much weaker. Even IMPES, the lowest level, treats pressure implicitly, so in practice the level is often set by looking only at how much the saturations change within one time step. The practice is to set a threshold value for the change of the water and gas saturations within one time step, and any variable whose change exceeds it is treated implicitly; in two-phase flow, the change of the bubble-point pressure can serve as the threshold value in place of the gas saturation threshold value.
Matrix Form of the Adaptive Implicit Method
The fully implicit form of the simultaneous solution of a black oil model can be written as the matrix equation AX = R, Eq. (7.19), where A can be split as A = T + D − C, Eq. (7.20). All the transmissibilities are held in T, which is built from the coefficients of the spatial difference terms and is block-banded; D corresponds to the implicitly treated source and sink terms and is block-diagonal; C corresponds to the accumulation term of the equation system and is also block-diagonal; R is the remainder vector. Taking a 3 x 2 grid system as an example, the structure of T is shown in Fig. 7.18, the structure of D and C is the same and is shown in Fig. 7.19, and the implicit variables are listed in Table 7.1.
In the fully implicit method, the transmissibility terms contain partial derivatives with respect to every variable. Once a variable is treated explicitly, its change within this step must be very small, and the transmissibilities are hardly affected by it; the practice is to set the partial derivative of that variable to zero, and the matrix T changes accordingly. Another source writes the same: the change of an explicit variable within this step must be very small, and its partial derivative term is set to zero.
Matrix Solution
With such a matrix in hand, first eliminate the nonzero elements that lie in the columns marked "e" on the diagonal blocks but off the diagonal, to obtain the eliminated matrix form of the equation system; then apply row and column transformations to obtain the final matrix form, from which the explicit variable solution equation and the implicit variable solution equation are derived. Solve the implicit variables first, substitute them into the explicit variable solution equation, and all the variables are obtained. Because the implicit and explicit variables change at every time step, the detailed structure of the matrix also changes with time.
From the implicit variable solution equation it can also be seen that the order of the matrix that really needs to be solved implicitly is much lower than that of the fully implicit matrix; the time spent on the explicit variable solution equation is in practice no more than the back substitution of a general elimination method, so the total solution time is less than that of the fully implicit method. The more explicit variables there are, the more time is saved. Another source reaches the same conclusion: once the implicit variables are solved and substituted into the explicit variable solution equation, all the variables are obtained; the total time is less than that of the fully implicit method, and the more explicit variables there are, the more is saved.
Measuring Effectiveness
Effectiveness is measured by the average implicit level: the average over all nodes in the solution domain at the k-th iteration, where N1, N2, and N3 are the numbers of nodes at levels 1, 2, and 3 in that iteration. In concept, it is the implicit level actually adopted divided by the implicit level of IMPES; it equals 1 when IMPES is actually used, and 3 when the fully implicit method is actually used. The average implicit level of each time step and the average implicit level of the whole simulation (also called the implicit factor) are each defined as well. Another source gives the same three definitions: the average implicit level of all nodes at the k-th iteration, the average implicit level of each time step, and the average implicit level of the whole simulation (the implicit factor).
The maximum time-step average implicit level can be fixed after a few trial runs, and computer memory is best allocated for a value slightly above it; it is generally about 20% larger than the implicit factor.
The value of the implicit factor shows how much work the adaptive implicit method saves; in black oil models it rarely exceeds 1.4, and values below 1.2 are common.
Influencing Factors and Considerations
- If the threshold value is set too high, there are too few implicit variables and the calculation is liable to become unstable; some therefore press the threshold value very low, the implicit variables then increase greatly, and the benefit of the adaptive implicit method is cancelled out. How to set the saturation threshold value properly is the first difficulty in using this method well.
- Explicit treatment may break mass conservation. Another drawback of the Thomas method is that, when some variables are treated explicitly, the partial derivative values of those variables in the transmissibility terms are taken as zero; this treatment has a side effect, especially when the transmissibilities take upstream weighting, in that mass conservation is not satisfied in some cases and the computed mass conservation error is rather large. Another source says the same: when some variables are treated explicitly, the derivative values of those variables in the transmissibility terms are taken as zero; this treatment has a side effect, especially when the transmissibilities take upstream weighting, in that mass conservation is not satisfied in some cases and the computed mass conservation error is rather large.
- Directions for improvement. In recent years, people have proposed some improved methods for the stability of the calculation when the threshold value is too large and for the large mass conservation error, and the details can be found in textbooks and reference books.
- Cost comparison with the fully implicit method. Another source compared the work and storage of IMPES with those of the simultaneous solution method: for a given problem, as the number of phases increases, the work and storage of the simultaneous solution method both grow markedly; in three-phase flow, the work and storage of the simultaneous solution method are 27 times and 9 times those of IMPES, respectively. The adaptive implicit method takes what is needed between the two, trading a smaller cost for stability.
- Relation to Implicit Pressure Explicit Saturation Method and Fully Implicit Method. When the average implicit level equals 1, IMPES is actually used; when it equals 3, the fully implicit method is actually used. This item describes the practice of automatically selecting between the two node by node and step by step.