Special Matrices Banded matrices Solutions to problems that depend on their neighbours eg 1D T i = f(T i-1,T i+1 ) 2D T i,j = f(T i-1,j,T i+1,j,T i,j -1,T i,j +1 )
Tridiagonal Matrices
Tridiagonal Matrix Algorithm
TDMA procedure
Iterative Methods Often much better on sparse matrices than direct solvers Idea: –guess {x} –use in an approximation of [A] {x}= {b} to get new values of {x} –repeat until {x} is not changing much Pros: –much less effort / faster –less problems with roundoff
Point-Jacobi rearrange equation set so that you get series of x i = fn(other x’s) pick order so that using the x i with the largest coefficient in each equation guess value for x i, then iterate 6 x x 2 + x 3 = 11 x x x 3 = x x x 3 = 5
Jacobi Iteration Rearrange x 1 = 1/6 ( x 2 - x 3 ) x 2 = 1/7 ( x x 3 ) x 3 = 1/5 (1 + x x 2 ) Iterate x 1 n+1 = 1/6 ( x 2 n - x 3 n ) x 2 n+1 = 1/7 ( x 1 n - 2 x 3 n ) x 3 n+1 = 1/5 (1 + x 1 n + 2 x 2 n ) Guess, plugin, repeat n0x10x20x30n0x10x20x30
Importance of diagonal dominance Simple example
Convergence Formally
Stability criteria
Convergence criteria How to judge whether solution is “close enough”
Gauss-Seidal In Point-Jacobi technique, we use “old” values of x i throughout each iteration but we are calculating “new” values all the way through the procedure if we use these “new” values on the RHS’s, this is Gauss-Seidal
Speed-up
Relaxation
Under-relaxation and Over-relaxation x i n = x i n-1 + (x i n - x i n-1 ) New value depends on 0 < < 1 > 1 = 1
Engineering examples Concentrations in a series of connected tanks (steady state) mass balances 1, V1 3, V3 2, V2 Q2in, C2in Q13, C1 Q12, C1 Q21, C2 Q23, C2 Q1in, C1in Q3out, C3
Engineering examples - Forces on truss FcextV a b c Fab Fbc Fac FbextV FbextH FaextV Sum of forces at each node = 0 (both vertical & horizontal)
Trusses Forces on trusses loads: –dead weight –live (train) weight –wind loads –seismic