Numerical Method - Gauss Seidel help

bombers

New member
Joined
Sep 6, 2010
Messages
9
http://i52.tinypic.com/2d161zn.png

Here is the problem. It is an assignment problem and this is what I have so far. We decide to use SOR (successive overrelation method) with omega, w=1, so that we can solve it with G-S method as described in the problem. But I can't figure out the G-S equation to input to solve. I have the coding to plot and I think it is right because my partner and I worked in it together with the professor's help. Just can't figure out how to apply the G-S to solve for the temperature and have it plot...

clc
e = 0.00001;
lx=10;ly=15;
h=2.5;
n =(lx/h)+1;
m = (ly/h) +1;
w=1.0;
x(1) = 0;

for j=1:n-1
x(j+1) = x(j) + h;
end

....
more steps here which i cant figure out
....



[x,y] = meshgrid(0:h:lx,0:h:ly);
contour (x,y,u,20)
 
Top