Sunteți pe pagina 1din 27

SOLUTION OF LINEAR

SETS OF EQUATIONS
LINEAR SETS OF EQUATIONS
As an illustration of solution of linear
equations, consider the following set of 3
equations:
(1)

(2)

(3)
Gauss elimination method
Multiplying Eqn. (1) by -a21/a11, and then
adds the resulting equation to Eqn. (2),
becomes:

Multiply Eqn. (1) by - a31/a11 and then add


the resulting equation to Eqn. (3),
becomes:
The set of equations has now
become:
(4)

(5)

(6)
The next step is to multiply Eqn. (5) by
– a’32/a’22 and then add the resulting
equation to Eqn. (6). Our set of equations
is now:
(7)

(8)

(9)

The above elimination process is called forward elimination.


Now perform a backward substitution.
Eqn. (9) can now be solved directly for x3:

For Eqs. (7) and (8), this is done as


follows:
Gaussian elimination method
A general formula for solving a set of
equations consisting of n equations and n
unknowns may be derived:
1) Forward elimination

2) Backward substitution
The Gauss-Seidel Method
The Gauss-Seidel Method
Banded coefficient matrix for
regular grid systems
The 1-D finite difference equations derived
for the following grid system

We generally solve the 3-diagonal


pressure equation
Graphically, the coefficient matrix may be
presented as
Gaussian elimination algorithm may be
simplified to operate only on the band
itself, as shown in the following:
– Forward elimination, i=2,N

– Computation of PN

– Backward substitution, i=N-1,1


For a 2-D grid system

the set of linear


equations to be solved
for pressures is
For numbering along the i-direction,
we get the coefficient matrix at
right below:

The bandwidth of the above system may


be computed as
If we had numbered the grid blocks along
the j-direction, the coefficients e and a,
and f and c, would have changed places:

the bandwidth would have become

Since the number of operations involved in a


Gaussian elimination solutions is approximately
2D representation of reservoir with irregular
boundary. The 26 numbered blocks are the active
blocks
Coefficient matrix resulting
from the discritization and
node numbering scheme.
Filled squares are nonzero
entries.
3-D grid system
the set of linear
equations to be
solved for
pressures has 7
non-zero diagonals
on the left hand
side:
Structure of matrix
coefficient :
The bandwidth of the
3-D system, if
numbered along the
x- and z-directions
first, may be
computed as

For this system, the


number of operations
is approximately
3D Reservoir – block ordering in 3 layers
Heptadiagonal coefficient matrix formed for 3D
Coefficient matrix for circular
grids
A 2-D grid that requires special attention is
the r−θ system shown
The set of linear equations for this system
is, identical to the one for the 2D,
rectangular coordinates system:
While all f coefficients
are zero for row 8 in
the case of the
rectangular grid, the
equivalent "row" in
the cylindrical case is
connected to "row" 1.
The structure of the
coefficient matrix for
the cylindrical grid
becomes:
Effects of wells on coefficient
matrix
The coefficient
matrix of this system
will of course be
affected by the well.
In case the
production rate is
constant, the Pbh will
be an additional
unknown that must
be included in the
solution.
We add a term to the linear equations:

we add a well constraint equation to the system of equations:


Adding a well constraint equation, the
system of linear equations become:

S-ar putea să vă placă și