Successive over-relaxation method - SOR
From CFD-Wiki
Introduction
We seek the solution to set of linear equations
In matrix terms, the successive over-relaxation (SOR) iteration can be expressed as
where , , and represent the diagonal, lower triangular, and upper triangular parts of the coefficient matrix , is the iteration count, and is a relaxation factor. This matrix expression is not usually used to program the method, and an element-based expression is used:
Note that for that the iteration reduces to the Gauss-Seidel iteration. As with the Gauss-Seidel method, the computation may be done in place, and the iteration is continued until the changes made by an iteration are below some tolerance.
The choice of relaxation factor is not necessarily easy, and depends upon the properties of the coefficient matrix. For symmetric, positive definite matrices it can be proven that will lead to convergence, but we are generally interested in faster convergence rather than just convergence.
Algorithm
Chose an initial guess to the solution
- for k := 1 step 1 until convergence do
- for i := 1 step until n do
-
- for j := 1 step until i-1 do
- end (j-loop)
- for j := i+1 step until n do
- end (j-loop)
-
- end (i-loop)
- check if convergence is reached
- for i := 1 step until n do
- end (k-loop)
TODO - add references, more about relaxation factor