TAGGED: angle
-
-
January 17, 2025 at 3:54 amchenymjxzsSubscriber
######## y-z plane (phi=0 corresponds to the direction (0,1,0))
?" Projecting in y-z plane";
x = 0; y = cos(phi*pi/180); z = sin(phi*pi/180);# Calculate far field by summing contribution from each monitor
temp = farfieldexact("x2",x,y,z,i) + farfieldexact("y2",x,y,z,i) + farfieldexact("z2",x,y,z,i);
if(havedata("x1")){
temp = temp - farfieldexact("x1",x,y,z,i);
}else{
temp2 = farfieldexact("x2",-x,y,z,i);
s = symm_x*[1,-1,-1];
temp2(1:npts,1) = s(1)*temp2(1:npts,1);
temp2(1:npts,2) = s(2)*temp2(1:npts,2);
temp2(1:npts,3) = s(3)*temp2(1:npts,3);
temp = temp - temp2;
}
if(havedata("y1")){
temp = temp - farfieldexact("y1",x,y,z,i);
}else{
temp2 = farfieldexact("y2",x,-y,z,i);
s = symm_y*[-1,1,-1];
temp2(1:npts,1) = s(1)*temp2(1:npts,1);
temp2(1:npts,2) = s(2)*temp2(1:npts,2);
temp2(1:npts,3) = s(3)*temp2(1:npts,3);
temp = temp - temp2;
}
if(havedata("z1")){
temp = temp - farfieldexact("z1",x,y,z,i);
}else{
temp2 = farfieldexact("z2",x,y,-z,i);
s = symm_z*[-1,-1,1];
temp2(1:npts,1) = s(1)*temp2(1:npts,1);
temp2(1:npts,2) = s(2)*temp2(1:npts,2);
temp2(1:npts,3) = s(3)*temp2(1:npts,3);
temp = temp - temp2;
}
E_yz (1:length(phi), 1:3, i) = temp;
E2_yz (1:length(phi), i) = sum(abs(temp)^2,2); # E2 = |Ex|^2 + |Ey|^2 + |Ez|^2
H2_yz (1:length(phi), i) = E2_yz (1:length(phi), i) * n^2 * eps0/mu0; # for a plane wave, E^2 and H^2 only differ by a factor of n^2*eps0/mu0
首先我不能理解为什呢计算远场需要全部加起来:也就是:temp = farfieldexact("x2",x,y,z,i) + farfieldexact("y2",x,y,z,i) + farfieldexact("z2",x,y,z,i);其次,我不知道为什么加起来之后又需要这么处理
if(havedata("x1")){ temp = temp - farfieldexact("x1",x,y,z,i); } else { temp2 = farfieldexact("x2",-x,y,z,i); s = symm_x*[1,-1,-1]; temp2(1:npts,1) = s(1)*temp2(1:npts,1); temp2(1:npts,2) = s(2)*temp2(1:npts,2); temp2(1:npts,3) = s(3)*temp2(1:npts,3); temp = temp - temp2; }
-
- You must be logged in to reply to this topic.
-
1882
-
802
-
599
-
591
-
366
© 2025 Copyright ANSYS, Inc. All rights reserved.