Geology Reference
In-Depth Information
U 3,3 - (2 + 1/m 2 )U 4,3 + U 5,3 = (-2U 4,2 +U 4,1 )/m 2
(4.2.75d)
U 4,3 - (2 + 1/m 2 )U 5,3 + U 6,3 = (-2U 5,2 +U 5,1 )/m 2
(4.2.75e)
U 5,3 - U 6,3 = 0
(4.2.75f)
This short example illustrates the set-up process only. Equations 4.2.75a to
4.2.75f, as shown, will yield zero solutions for zero initial conditions, because
an excitation source has not yet been introduced. In general, it is clear that when
i max spatial nodes define the drillstring, corresponding to (i max -1) grid blocks,
the resulting equations take the “tridiagonal” matrix form
|B 1
C 1
| |V 1
|
| 1
|
(4.2.76)
|A 2
B 2
C 2
| |V 2
|
| 2
|
|
B 3
C 3
| |V 3
|
| 3
|
3
|
.......
| | ..
| = | ...
|
|
| |
|
|
|
|
A imax-1
B imax-1
C imax-1
| |V imax-1
|
| imax-1 |
|
A imax B imax
| |V imax
|
| imax |
Thus, this differencing is said to involve “tridiagonal equations.” Equation
4.2.76 can be solved computationally by calling the Fortran subroutine in Figure
4.2.6 below (A 1 and C imax are “dummies”). Tridiagonal forms are important to
numerical analysis because an order N system (that is, N equations in N
unknowns) requires only 3N multiplies or divides for inversion. By contrast,
inefficient Gaussian elimination (for full matrixes) requires N 3 such operations.
SUBROUTINE TRIDI(A,B,C,V,W,N)
DIMENSION A(100), B(100), C(100), V(100), W(100)
A(N) = A(N)/B(N)
W(N) = W(N)/B(N)
DO 100 I = 2,N
II = -I+N+2
BN = 1./(B(II-1)-A(II)*C(II-1))
A(II-1) = A(II-1)*BN
W(II-1) = (W(II-1)-C(II-1)*W(II))*BN
100 CONTINUE
V(1) = W(1)
DO 200 I = 2,N
V(I) = W(I)-A(I)*V(I-1)
200 CONTINUE
RETURN
END
Figure 4.2.6. Tridiagonal matrix solver.
Search WWH ::




Custom Search