# MATLAB代做-EFIE算法的仿真

### 时间：2018-12-22 12:44:10 点击：

核心提示：MATLAB代做-EFIE算法的仿真...
function [Iz,C,Imi] = EFIE(zs,ze,E0,a,beta);
% Compute charge distribution for 2D electrostatics by MoM
% Elements extend from z = zs to z = ze (both vectors)
% E0 is the incoming Ez and Iz the total current on each element
% xi is an integration parameter
% Imi is the current density on the midpoint of the wire

xi = 0.5 - sqrt(0.25-exp(-2));
n = length(zs) - 1;           % # interior nodes = # unknowns
zobs = ze;
z1 = zs + xi*(ze-zs);     %Integration points
z2 = ze + xi*(zs-ze);     %       -"-
hh = (zs-ze)/2;
as4 = 4*a^2;
A = zeros(n+1);
for k = 1:n+1        %Loop over elements
z = zobs - z1(k);
zsq = z.^2;
za = sqrt(zsq+a^2);
K = EIK(as4./(as4 + zsq));
temp1 = 2*K./(pi*sqrt(as4 + zsq)) + (exp(j*beta*za)-1)./za;
z = zobs - z2(k);
zsq = z.^2;
za = sqrt(zsq+a^2);
K = EIK(as4./(as4 + zsq));
temp2 = 2*K./(pi*sqrt(as4 + zsq)) + (exp(j*beta*za)-1)./za;
if (k > 1)
A(:,k-1) = A(:,k-1) + hh(k)*((1-xi)*temp1(:) + xi*temp2(:));
end
if (k < n+1)
A(:,k)   = A(:,k)   + hh(k)*(xi*temp1(:) + (1-xi)*temp2(:));
end
end
lastrow = A(n+1,1:n);
for i = 1:n
A(n+1,i) = 0.5*(lastrow(i)+lastrow(n+1-i));
end
A(n+1,n+1) = cos(beta*zs(1));
for i = 1:n
A(i,n+1) = cos(beta*ze(i));
end
I = (A\E0')';
Iz = I(1:n);
Imi = I(round((n+1)/2));
C = I(n+1);
function K = EIK(x)
m1 = 1 - x;
a = [0.01451196212 0.03742563713 0.03590092383 0.09666344259 1.38629436112];
b = [0.00441787012 0.03328355346 0.06880248576 0.12498593597 0.5];
K = polyval(a,m1) - polyval(b,m1).*log(m1);

QQ ：1224848052

Tags:EFIE算法

• 百度搜索
• 查阅资料过程中
• 论坛发现
• 百度贴吧发现
• 朋友介绍
• 没有相关文章
• 大名：
• 内容：