Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Need help for Matlab code: Method of Moments: Conducting Plate

Status
Not open for further replies.

Teg-Men

Junior Member level 2
Joined
Sep 22, 2010
Messages
24
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Location
Ankara
Activity points
1,468
Hi, I am trying to write a Matlab code that works for charged conducting Plate. Spesifically, the problem is from R.F. Harringston's "Field Computation by Moment Method" Ch2.2

I have following codes, but that does not work for the cases if I choose number of subsections more than one.

Here are codes:
function [x, y] = lengthVectors2x2(length, N)
%AREA2X2 Summary of this function goes here
% Detailed explanation goes here
subLength = length/(N);
for i = 1:N;
x(i) = abs((length+subLength)/2 - i* subLength);
end
y = x;
end

function [Gm] = MatrixG2x2(N,V)
%It calculates Lmn matrix by using point matching
% Enter the N*N matrix size
% Detailed explanation goes here
for m =1:N
Gm(m) =V;
end
Gm = Gm';
end

function [q] = SolutionX2x2(length, N , V)
% V is first
%UNTİTLED3 Summary of this function goes here
% Detailed explanation goes here
f = MatrixL2x2(length, N);
g = MatrixG2x2(N,V);
a = inv(f)*g;
q = 0;
for i = 1:N
q = q + a(i)*((length/N)^2);
end
q = q / V;
q = q / length;
end

function [Lmn] = MatrixL2x2(length, N)
%It calculates Lmn matrix by using point matching
% Enter the N*N matrix size
% Detailed explanation goes here
permitivity = 8.85*1e-12;
[x, y] = LengthVectors2x2(length, N);
for m =1:N;
for n=1:N;
if m == n;
Lmn(m,n) = (0.8814*length/N)/(pi*permitivity);
else
Lmn(m,n) = (length/N)^2/(4*pi*permitivity*sqrt(x(m)^2 + y(n)^2));
end
end
end

end

I think the problem is in the function MatrixL2x2. Because I calculate the value for the case #subsection = 1

Here are the actual results:
N = 1 => 31.5 picofarads/meter
N = 3 => 37.3 picofarads/meter
N = 4 => 38.2 picofarads/meter
N = 6 => 39.2 picofarads/meter

As I said, the code can find N=1 case result.
Please ignore comments.
Thanks.
 

I solved the problem, the topic can be closed.
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top