parent
0bfd04b415
commit
eea457bae4
|
|
@ -9,7 +9,7 @@ semi_lineDistance=257;%
|
||||||
semi_lineCount=4;%分裂数
|
semi_lineCount=4;%分裂数
|
||||||
ConductorX=[-14500,14500];%导线距地高度
|
ConductorX=[-14500,14500];%导线距地高度
|
||||||
ConductorY=[16500,16500];%导线间距
|
ConductorY=[16500,16500];%导线间距
|
||||||
CSM_N=10;%每一个子导线的模拟电荷数
|
CSM_N=80;%每一个子导线的模拟电荷数
|
||||||
subconductorR=30;%子导线半径
|
subconductorR=30;%子导线半径
|
||||||
%%
|
%%
|
||||||
%设置电压
|
%设置电压
|
||||||
|
|
@ -22,9 +22,9 @@ CSM_arc=2*pi/CSM_N;
|
||||||
%子导线中心到导线中心的距离
|
%子导线中心到导线中心的距离
|
||||||
R=semi_lineDistance/2/sin(arc/2);
|
R=semi_lineDistance/2/sin(arc/2);
|
||||||
%计算模拟电荷的位置
|
%计算模拟电荷的位置
|
||||||
r1=2;
|
r1=20;
|
||||||
error=10000;
|
error=10000;
|
||||||
step=1/20;
|
step=1/10;
|
||||||
maxLoop=round((subconductorR-r1)/step);
|
maxLoop=round((subconductorR-r1)/step);
|
||||||
for Loop=1:maxLoop;
|
for Loop=1:maxLoop;
|
||||||
simulationChargePos=ones(CSM_N,1);
|
simulationChargePos=ones(CSM_N,1);
|
||||||
|
|
@ -60,11 +60,11 @@ for Loop=1:maxLoop;
|
||||||
%求电荷
|
%求电荷
|
||||||
QRI=P\Volt;
|
QRI=P\Volt;
|
||||||
%以下是验证部分
|
%以下是验证部分
|
||||||
if error<0.01
|
if error<0.0001
|
||||||
break;
|
break;
|
||||||
end
|
end
|
||||||
%选检验导线上一个角度
|
%选检验导线上一个角度
|
||||||
vrfRelA=linspace(0,2*pi)';%vrf=verify
|
vrfRelA=linspace(0,2*pi,200)';%vrf=verify
|
||||||
%计算检验点相对于子导线的位置
|
%计算检验点相对于子导线的位置
|
||||||
vrfRelPos=exp(1j*vrfRelA)*subconductorR;
|
vrfRelPos=exp(1j*vrfRelA)*subconductorR;
|
||||||
%移动坐标,使验证的子导线中心和实际子导线中心重合。
|
%移动坐标,使验证的子导线中心和实际子导线中心重合。
|
||||||
|
|
@ -80,10 +80,13 @@ for Loop=1:maxLoop;
|
||||||
Pij=1/2/pi/eslong*log(vrf2MirrorDistance./vrf2ConductorDistance);
|
Pij=1/2/pi/eslong*log(vrf2MirrorDistance./vrf2ConductorDistance);
|
||||||
%计算电压
|
%计算电压
|
||||||
V=Pij*QRI;
|
V=Pij*QRI;
|
||||||
error=sum(abs(V-500)./500)/length(V)
|
error=sum(abs(V-500)./500)/length(V);
|
||||||
r1=r1+step;
|
r1=r1+step;
|
||||||
end
|
end
|
||||||
display('Finished.');
|
display('Finished.');
|
||||||
|
if Loop<maxLoop
|
||||||
|
display('Converged.');
|
||||||
|
end
|
||||||
display(Loop);
|
display(Loop);
|
||||||
scatter(real(simulationChargeAPos),imag(simulationChargeAPos),[],'r');
|
scatter(real(simulationChargeAPos),imag(simulationChargeAPos),[],'r');
|
||||||
hold on;
|
hold on;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue