Geoscience Reference
In-Depth Information
4.5 SOLUTION OF ALGEBRAIC EQUATIONS
After a partial differential equation is discretized using one of the previously introduced
numerical methods, the next task is to solve the resulting algebraic equations. If an
explicit scheme is used for an unsteady problem, only one unknown appears at each
time step, so the calculation can be easily performed step by step. If an implicit scheme
is used for an unsteady problem or a numerical scheme involving more than two
grid points is used for a steady problem, multiple unknowns appear in the algebraic
equations that must be solved together. The implicit scheme is usually more stable and
allows for larger time steps than the explicit scheme, yet its overall efficiency depends
on the method used to solve the algebraic equations.
The algebraic equations can be solved directly or iteratively. Direct methods, such
as the Gaussian elimination, are often used to solve linear algebraic equations; iter-
ation methods are usually used for nonlinear equations, because the coefficients
have to be updated and the equations have to be solved repeatedly. The meth-
ods often used for solving algebraic equations in computational river dynamics are
introduced below.
4.5.1 Thomas algorithm
The Thomas algorithm, also called the double sweep algorithm, is often used to solve
the set of algebraic equations resulting from the use of a three-point implicit finite
difference or finite volume method for a 1-D second-order differential equation. The
algebraic equations at internal points are
a P , i
φ
=
a W , i
φ
+
a E , i
φ
+
b i
(
i
=
2, 3,
...
, m
1
)
(4.209)
i
i
1
i
+
1
and boundary conditions are
a P ,1
φ
=
a E ,1
φ
+
b 1
(4.210)
1
2
a P , m
φ
=
a W , m
φ
+
b m
(4.211)
m
m
1
where m is the total number of grid points.
The set of equations (4.209)-(4.211) can be written in matrix form as
a P ,1
a E ,1
φ 1
φ 2
·
φ i
·
φ m 1
φ m
b 1
b 2
b i
·
b m 1
b m
a W ,2
a P ,2
a E ,2
·
·
·
=
a W , i
a P , i
a E , i
·
·
·
a W , m 1
a P , m 1
a E , m 1
a W , m
a P , m
(4.212)
which has a tridiagonal coefficient matrix.
 
Search WWH ::




Custom Search