%Blahblah Uncle Don's T-Line using Cylindrical Coordinates %First build A Matrix for 3 circles divided into 8 pies romax=3; %romax is the total ro values we take simax=8; %simax is the divisions of the coordinate system siz = romax*simax; %size of the A matrix A = eye(siz)*0; %this sucka is just the matrix with no values in yet. It's reset to zero B = zeros(siz,1); k = 1:siz; k(9)=0,k(11)=0;k(13)=0;k(17:24)=0; n = 1:siz; %And now let's build the functions to calculate the constants for our %cylindrical coordinate finite difference method calculations delro = 0.005; %5 cm delsi = pi/4; %psi increment in radians ronot = 0.01; %the circle layer distance from origin %inner node ~closer to origin Ao = 1-delro/2/ronot; %outer node ~towards edge Bo = 1+delro/2/ronot; %counterclockwise node and clockwise node Co = (delro/ronot/delsi)^2; %original node ~the center node Do = -(2+2*(delro/ronot/delsi)^2); for n = 1:siz,k=1:siz if k~=simax*k, k~=simax*k-7 if k(n-simax) ~= 0 A(k,k-simax) = Ao; end end end V=A\B; V=V(1:siz,1); Phi = reshape(V,romax,simax); tline(1:5,1:8)=0; hole(1,1:8)=65; edge(5,1:8)=0; tline(2:4,1:8)=Phi; tline(1,1:8)=hole; tline k