Page 84 - Standard Handbook Of Petroleum & Natural Gas Engineering
P. 84
Numerical Methods 73
or
CX = R
The solution for xk in a system of equations such as given in the matrix above
is
xk = (det C,)/(det C)
where C, is the matrix C, with its kth column replaced by R (Cramer’s Rule). If
det C = 0, C and its equations are singular and there is no solution.
Sets of simultaneous linear equations are frequently defined as [ 121:
Sparse (many zero elements) and large
Dense (few zero elements) and small. A banded matrix has all zero elements
except for a band centered on the main diagonal, e.g.,
then C is a banded matrix of bandwidth 3, also called a tridiugonal matrix.
Equation-solving techniques may be defined as direct, expected to yield results
in a predictable number of operations, or iterative, yielding results of increasing
accuracy with increasing numbers of iterations. Iterative techniques are in
general preferable for very large sets and for large, sparse (not banded) sets.
Direct methods are usually more suitable for small, dense sets and also for sets
having banded coefficient matrices.
Gauss elimination is the sequential application of the two operations:
1. Multiplication, or division, of any equation by a constant.
2. Replacement of an equation by the sum, or difference, of that equation
and any other equation in the set, so that a set of equations
‘11 ‘12 ‘19 ‘14 x1 rl
‘21 ‘22 ‘25 ‘24 x2 = r2
‘31 ‘32 ‘83 ‘34 XS rs
‘41 ‘42 ‘43 ‘44 x4 r4
1 c:, c;, c;, x1 rI
‘21 ‘22 ‘25 ‘24 = ‘2
‘91 ‘32 ‘35 ‘34 xS ‘3
‘41 ‘42 ‘45 ‘44 x4 ‘4