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.

problem creating constractive and destractive interference electromagnetic plot

Status
Not open for further replies.

yefj

Advanced Member level 4
Joined
Sep 12, 2019
Messages
1,070
Helped
1
Reputation
2
Reaction score
3
Trophy points
38
Activity points
6,363
Hello , i want to create the plot of E_i and E_r shown bellow , i should get square blocks ,which comes from constructive and distructive interference of the two modes.

I have written the mathematical expressions and implemented them in matlab (code is attached) but i get in the plot only one wave pattern, no two wave behavior(constructive and distructive interference squares)

1667676614467.png


1667672743153.png


Code:
clc
clear all
f=6;
lambda=300/6;
theta_in_rad=0;
theta_out_rad=70/180*pi;
x=linspace(-0.5*lambda,0.5*lambda,1000);
y=linspace(-0.5*lambda,0.5*lambda,1000);
[xx,yy]=meshgrid(x,y);
k=2*pi/lambda;
E_i=1;
E_r=E_i*sqrt(cos(theta_in_rad)/cos(theta_out_rad))
eta=377;
D_x=1.064*lambda;
k_x=k*sin(theta_in_rad)+2*pi/D_x;
k_y=sqrt(k^2-k_x.^2);
%E_t=E_i.*exp(-j*k*xx*sin(theta_in_rad)+j*k*yy*cos(theta_in_rad))+E_r.*exp(-j*k_x*xx-j*k_y*yy);%E_z
E_t=E_i.*exp(-j*k*xx*sin(theta_in_rad)+j*k*yy*cos(theta_in_rad))+E_i.*exp(-j*k_x*xx-j*k_y*yy);%E_z

figure;
imagesc(x/lambda,y/lambda,abs(E_t))
xlabel('x [\lambda]')
ylabel('y [\lambda]')
colorbar;

1667677029984.png
 

you may be misinterpreting the data
generally the pattern of constructive and destructive is constructive, destructive, constructive destructive, etc
it is generally easy if one only considers fully constructive (bright) and fully destructive (dark)
what is in between, is in between

if the dark lines between the blue is fully destructive, and the bright yellow between the oranges is fully constructive,
the span of colors between, blue, green, orange, yellow is one view of a path from fully destructive to fully constructive
then the span from yellow, orange, green and blue is the corresponding path from fully constructive to fully destructive

the colorbar seems to confirm this

why do you expect a grid pattern?
 

when i try to plot the real part of the field i get the square pattern i expect
imagesc(x/lambda,y/lambda,real(E_t))
What is the logic of plotting the real part of a field in order to analize things?
why plotting abs is not correct?

1667846234055.png
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top