-
Notifications
You must be signed in to change notification settings - Fork 0
/
input_FabryPerot.m
43 lines (33 loc) · 1.43 KB
/
input_FabryPerot.m
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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%% Solving Parameters %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
f0_guess= c/1e-6; %% Guess of the frequency solutions (Hz), f=c/lambda
f0_min = c/10e-6; %% filter the solutions where the frequency is superior than (Hz), f=c/lambda
f0_max = c/1e-6; %% filter the solutions where the frequency is inferior than (Hz), f=c/lambda
nmodes=10; %% number of solutions asked
AbsorbingBoundaryCondition=1; %% 0 or 1 (not sure it is working well...)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
dx=10e-9;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% VCSEL structure %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
n1=1;
n2=3;
lambda0=1000e-9; % Central wavelength
l1=1;
l2=5 * lambda0/(2*abs(n2))*1e6;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% first column is the length [um]
% second column is the optical index
layer=[
0.1 n1
l1 n1
l2 n2
l1 n1
0.1 n1
];
layer(:,1)=layer(:,1)*1e-6;
if AbsorbingBoundaryCondition==1
layer(1,2) = layer(1,2) + 1i;
layer(end,2) = layer(1,2) + 1i;
end