-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSIM CODE 1 loop PARAMETER
51 lines (46 loc) · 2.44 KB
/
SIM CODE 1 loop PARAMETER
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This program is the main program of RCWA method to calculate the spectral directional radiative properties for TE and TM incidence
% Dr. Zhuomin Zhang's group at Georgia Tech
% Last modified by Bo Zhao (September 2014)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all; clc;
%temp = Tran;
for lol = 1:10
c0 = 299792458; % speed of light in space, [m/s]
theta =0; % angle of incidence, [rad]
wn = linspace(5000,10000,300) ; % wavenumber, [1/cm]
lambda =1e4./wn; % wavelength, [um]
w = 1e6*2*pi*c0./lambda; % angular frequency, [rad/s]
d = [0.02 0.022]; % thickness of each layer from front to back, [um]
N = length(d); % # of layers
Period(1:N) = 1.12; % Period of gratings for each layer, [um]
width = [1 1.05]; % width of metal strips, [um]
psi = width/Period(1); % filling ratio of grating layer
f1 = [0 0]; % normalized position for left-end of metal strip
f2 = [psi]; % normalized position for right-end of metal strip
Num_ord = 19; % number for the highest diffraction order
for ind = 1:length(lambda)
% Incidence medium
e(1) = 1.32 + lol/100 ; % Usually is air or vacuum
% Layered structure
e_m(1) = Palik_SiO2(lambda(ind)); % Ridge material (metal)
e_d(1) = Palik_SiO2(lambda(ind));
e_m(2) = Palik_Au(lambda(ind)); % Ridge material (metal)
e_d(2) = Palik_SiO2(lambda(ind)); % Groove material (air)
%Substrate
e(2)= Palik_SiO2(lambda(ind)); % air or opaque substrate
%==========================================
[Ref(ind), Tran(ind)] = RCWA_Multi_TM(N, e_m, e_d, f1, f2, Period, d, e, lambda(ind), theta, Num_ord);
end
disp(lol);
if lol == 1
temp=Tran;
else temp = [temp;Tran];
end
end
figure;
plot(wn,temp);
% legend('Tran');
% xlim([5000,10000]);
% xlabel('Wavenumber, \nu (cm^-^1)');
% ylabel('R,T,\alpha');