Single & Double Slit diffraction

中文/English

Single Slit


Diffraction of single silt is a basically problem in optics.


Define Parameters

Here considering a wave source wavelength = 300 nm, pass through a single silt with gaps = 1200 nm


1. Selected the simulation dimension.

2. Define total x, y, z length that equal to CAD, and then set a appropriate resolution.

3. Press【建立網格 Cad to Grids (Create)】button to create simulation grids.



A. Define the boundary conditions

B. Press the【創建 (Create)】button => Create the total grid size (Include the boundary condition & add space)


select plane wave with linear polarization normal incident from bottom position z=21


1. Checked the simulation material that will be used

2. Input the builtin function

3. Press the run button to execute the code

4. Checked out the geometries

5. If correct! then Press 【輸出 output】button to output the *.csv files.


Input a gap = 1200 nm single slit,material is perfect electric conductor (PEC)


%=================狹縫 Slit===========================
lengthx=1200e-9;  
lengthz=100e-9; 
nindex=1^2;
sigma=0;
choice='PEC'; %E_Iso,PEC,M_Iso,PMC,E_Model1,M_Model1,EM_Model1
gridtype=-1;    %
xposition=icenter*gdx;
yposition=jcenter*gdy;
zposition=100*gdz;
Iso_Slit(choice,gridtype,nindex,sigma,xposition,zposition,lengthx,lengthz)
%=================狹縫 Slit===========================

Checked out the simulation geometries, and then press 【輸出 Output】button to output the geometries files

Data_Materials.csv // (simulation index of structures)


instruction webpage: Built-in Function



1. Set the Spectrum Analysis & Wavelength range

2. Check out the source



1. Set the simulation time setp

2. Save parameters

3. Calculation



★(Result Analysis):

In finite difference time domain (FDTD) method, can use the near to far field (NTFF) technology to calculate far-field diffraction pattern.

The diffraction of single slit can integrate the energy of the output gap side as shown in below. The left figure is sum a small ㄇshape, The right figure is sum a large ㄇ shape. Which one is correct?

The answer : both are correct!


The NTFF setup at above figure, we checked ☑X-,☑X+,☑Z+

The range X from 200 => 400, Z from 103 => 180

in other words

☑X- range is x=200, Z=103:180

☑X+ range is x=400, Z=103:180

☑Z+ range is x=200:400, Z=180


This will be a ㄇ shape, and then press the【確定】button

To compare the far-field diffraction pattern of FonSinEM and theoretically solution

# Variable RCS_theta is built-in function

figure;
plot(scan_theta,sqrt(RCS_theta),'r','linewidth',2.5);
hold on;
d=1200e-9;
angles=linspace(-90,90,180);
beta=1/2*2*pi/(lambda0)*d*sin(angles/180*pi);
Intensity=abs(sin(beta)./beta);
plot(angles,Intensity*max(sqrt(RCS_theta)),'*b','linewidth',0.5);
title('\bf\it  Far Field','Color','k','VerticalAlignment','bottom')
xlabel('\bf theta','FontSize',12,'FontName','Arial','Color','b','VerticalAlignment','middle')
ylabel('\bf intensity (a.u.)','FontSize',12,'FontName','Arial','Color','b')
legend('FDTD','Analytical Solution')
 
 
figure;
polar(scan_theta'/180*pi,sqrt(RCS_theta),'r');
hold on;
polar(angles/180*pi,Intensity*max(sqrt(RCS_theta)),'b'); 
title('\bf\it  Polar Plot (theta)','Color','k','VerticalAlignment','bottom')







Double Slits



1. Checked the simulation material that will be used

2. Input the builtin function

3. Press the run button to execute the code

4. Checked out the geometries

5. If correct! then Press 【輸出 output】button to output the *.csv files.


Input a gap d = 1200 nm single slit,material is perfect electric conductor (PEC)

d=1200e-9;
b=d;
%=================矩形 Brick===========================
xstart=icenter*gdx-d/2;
xend=icenter*gdx+d/2;
ystart=1*gdy;
yend=1*gdy;
zstart=100*gdz;
zend=100*gdz+100e-9;
nindex=1^2;
sigma=0;
choice='PEC'; %E_Iso,PEC,M_Iso,PMC,E_Model1,M_Model1,EM_Model1
gridtype=-1;    %
Iso_Brick(choice,gridtype,nindex,sigma,xstart,xend,ystart,yend,zstart,zend)
%=================矩形 Brick===========================
 
%=================矩形 Brick===========================
xstart=1*gdx;
xend=icenter*gdx-b-d/2;
ystart=1*gdy;
yend=1*gdy;
zstart=100*gdz;
zend=100*gdz+100e-9;
nindex=1^2;
sigma=0;
choice='PEC'; %E_Iso,PEC,M_Iso,PMC,E_Model1,M_Model1,EM_Model1
gridtype=-1;    %
Iso_Brick(choice,gridtype,nindex,sigma,xstart,xend,ystart,yend,zstart,zend)
%=================矩形 Brick===========================
 
%=================矩形 Brick===========================
xstart=icenter*gdx+b+d/2;
xend=ib*gdx;
ystart=1*gdy;
yend=1*gdy;
zstart=100*gdz;
zend=100*gdz+100e-9;
nindex=1^2;
sigma=0;
choice='PEC'; %E_Iso,PEC,M_Iso,PMC,E_Model1,M_Model1,EM_Model1
gridtype=-1;    %
Iso_Brick(choice,gridtype,nindex,sigma,xstart,xend,ystart,yend,zstart,zend)
%=================矩形 Brick===========================



Other setups are all the same

Result Analysis


The NTFF setup at above figure, we checked ☑X-,☑X+,☑Z+

The range X from 30 => 570, Z from 103 => 180

in other words

☑X- range is x=30, Z=103:150

☑X+ range is x=30, Z=103:150

☑Z+ range is x=30:570, Z=150


This will be a ㄇ shape, and then press the【確定】button

To compare the far-field diffraction pattern of FonSinEM and theoretically solution

# Variable RCS_theta is built-in function



figure;
plot(scan_theta,sqrt(RCS_theta),'r','linewidth',2.5);
hold on;
d=1200e-9;
distance=2.*d; %兩狹縫中心距離
angles=linspace(-90,90,360);
beta=1/2*2*pi/(lambda0)*d*sin(angles/180*pi);
Intensity=abs(sin(beta)./beta.*cos(pi/(lambda0)*distance*sin(angles/180*pi)));
plot(angles,Intensity*max(sqrt(RCS_theta)),'*b', 'MarkerSize',5);
title('\bf\it  Far Field','Color','k','VerticalAlignment','bottom')
xlabel('\bf theta','FontSize',12,'FontName','Arial','Color','b','VerticalAlignment','middle')
ylabel('\bf intensity (a.u.)','FontSize',12,'FontName','Arial','Color','b')
legend('FDTD','Analytical Solution')


figure;
polar(scan_theta'/180*pi,sqrt(RCS_theta),'r');
hold on;
polar(angles/180*pi,Intensity*max(sqrt(RCS_theta)),'b');
title('\bf\it  Polar Plot (theta)','Color','k','VerticalAlignment','bottom')