• Tidak ada hasil yang ditemukan

Iterative Solution of the Linear Equations using Orthomin

Parameter Symbol Dimensions SI Units Darcy Units Field Units

Chapter 3: Numerical Scheme

3.8 Iterative Solution of the Linear Equations using Orthomin

Most simulators use iterative methods to solve the linear equations. Eclipse uses a technique known as Orthomin. This technique relies on the ability to calculate an easily inverted approximation, B, to the Jacobian, A. B-1 is then used to calculate a vector that represents the direction to move in that will bring one closer to the required solution. The solution is updated by moving along the vector by an amount that optimises the residual. This in turn involves a pre-multiplication by A in order to calculate the new residual. A special feature of the method is that the change to be made to the residual at each iteration is forced to be orthogonal to all previous changes. This speeds convergence by minimising the number of iterations required to reach a solution.

Orthomin is computationally very efficient, requiring one multiplication by the pre- conditioning matrix B-1 and one multiplication by A at each iteration. The enforced orthogonalisation does however require the storage of all previous changes to the solution and the residual which can use a considerable amount of computer memory.

The objective is to solve Equation 95 for x which can be re-phrased as reducing the residual, r" =b - Ax11' to zero where Xn is an estimate of the required solution. Note that if A could be inverted, an exact solution could be obtained by calculating

/),x"

=

x - XII

=

A-Ir" and adding this to the current estimate. In practice however, inverting a matrix such as A is a non-trivial task. The change to be made to the solution is therefore calculated using the approximation B-1

At the first time step the initial estimate, xo,gives rise to the initial residual, (105) A new search direction for the solution, /),xo, is given by

(106) But since B-1 is only an approximation for A-I the solution is updated by moving a distance along the solution search direction that minimises the square of the new residual, rl. Thus:

(107) and

r) =b-Ax)

= b - Ax0 - a oA L1xo

= ro- aoMo'

(108)

where the residual search direction, ilro, is given by &0 = AL1xo= AB-Iroand a ois a scalar. To find the optimum value of ao, r\2 is differentiated with respect to a o and set to zero.

(109) therefore

(110)

givmg:

(111 )

Note that this choice ofaoimplies that the new residual is orthogonal to the previous search direction because r). ilro

= o.

The residual vectors are depicted in Figure 3.7.

FIGURE 3.7: THE RESIDUAL VECTORS IN ORTHOMIN

It is important that no part of ilroenters the residual at any subsequent iteration since the absolute minimum in the square of the residual has already been found for this

search direction. This is achieved by forcing the residual search direction to be orthogonal to all previous residual search directions. For the second iteration the extra degree of freedom needed is provided by adding a component of the previous search directions. The new search directions then become:

(112) (113) where

PlO

is chosen so that

(114) Substituting Equation 113 in Equation 114 gives:

(115)

As before, the solution and residual are updated using the search directions:

X 2=X1+aJ&J

r2 = rl - a,l1r, ( 116)

where a J is calculated to minimise r22. Differentiating r22 with respect to al and equating to zero gives:

(117) so that r2·&0

=

0 and r2.l1rJ

=

0, which implies that the current residual is orthogonal to both of the previous residual search directions.

At the next iteration the new search directions must be orthogonal to both sets of previous search directions therefore a component ofXI is added, giving:

(118) (119) where

P

21 and

P

20 are chosen so that:

(120) (121)

Substituting Equation 119 into 120 gives:

(122)

because the term involving

1320

is multiplied by the dot-product of the orthogonal vectors &0 and t.rl Similarly, if Equation 119 is substituted into 121:

(123)

For the n-th iteration it becomes necessary to calculate n-1 coefficients and the search directions become:

11-1

~11 =

B-\,

+I13l1m~m

;

m=O n-I

t.r"

=

AB - \+

I13nm&m ,

m=O

where

Eclipse makes some slight modifications to the basic Orthomin procedure.

(124)

(125)

(126)

The first is that the residuals being minimised are saturation normalised as previously discussed for the non-linear iterations. Thus the procedure minimises

r,,2

giving an optimum step size, an' of:

r" .t.r"

an =-_-?-,

t.r" - (127)

where

r

signifies a residual that has been saturation normalised for each cell by multiplying by the time-step and fluid volume factor and dividing by the cell pore volume. That is, for cell i and component c, the saturation normalised residual is given by:

(128)

where t.t is the time-step, Bc is the fluid volume factor for the component, and V, is the pore volume of the block. Convergence is determined by checking whether the

maximum saturation normalised residual for all the cells is within the specified bounds. It is not necessary to test for material-balance in the linear iterations because the pre-conditioning matrix used by Eclipse preserves material balance at each linear iteration.

A second modification is that the initial approximation is calculated as

(129) If the approximation B-1 does not introduce any material balance error then this ensures that material balance is preserved throughout the entire procedure.

A high level algorithm for the Orthomin procedure is as follows:

1. Calculate the initial estimate Xo

=

B-'b . 2. Calculate the initial residual ro= b - Axo.

3. While the maximum saturation residual is greater than the user specified limit:

n-I

3.1. Compute new search directions, &n

=

B-'r" +

I

fJnlll & 111,

111=0

n-I

!1r" = AB-Irn+IfJnlll!1r,n ,

111=0

fJ = (AB-lr,,}!1rll/

/1/11 !1r 2

11/

32. . Determme t le optImum step sIze,. l · . an

=

~

r".!1f"

urn

3.3. Update the solution and residual, xn+1

=

Xn+an&n' rn+1

=

rn - an!1r,,·

3.4. Store previous search directions and increment n.