-
Notifications
You must be signed in to change notification settings - Fork 0
/
gst_pd_batch.lsf
150 lines (127 loc) · 4.13 KB
/
gst_pd_batch.lsf
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
#########################################################
#
# Simulate the SiGe LPD response under dark and illuminated
# conditions.
#
#(c) Lumerical Solutions
#########################################################
clear;
project_name = 'gst_pd_hex';
sweep_name = 'metal';
L = 2e-6; # active photodetector length
#
# General setup
#
switchtolayout;
setnamed('::model','pd_length',L);
setnamed('GST_film','material', 'c-GST-hex');
save;
orig_project = currentfilename;
slash = '\'; # or '/' for Linux
sweep_path = pwd + slash + project_name + '_' + sweep_name;
if(!fileexists(sweep_path)) {
system('mkdir "'+sweep_path+'"');
}
#
# Setup configurations for simulation
#
# In this simulation, compare the effect of different metal on c-GST
Au = "Au (Gold) - CRC";
Pt = "Pt (Platinum)";
Al = "Al (Aluminium) - CRC";
aGST = "a-GST";
cGST = "c-GST";
#
# work function from low to high
#
# Al (4.28 eV) has a much smaller work function than c-GST (4.92 eV)
# Au (5.1 eV) has a similar work function than c-GST (4.92 eV)
# Pt (5.65 eV) has a much larger work function than c-GST (4.92 eV)
metal_list = {Al, Au, Pt}; # Lumerial only supports structure for array of strings
metal_name_list = {"Al", "Au", "Pt"};
n_metal_list = length(metal_list);
flag_illum = {"dark", "illu_0.5mW"};
#
# Load the job queue (simulate forward and reverse bias separately
#
clearjobs;
for (i = 1:n_metal_list) {
for (j = 1:n_metal_list) {
for (k = 1:2){
file_tag = '_' + metal_name_list{i} + '_' + metal_name_list{j}+ "_" + flag_illum{k};
?'Building job for ' + file_tag;
switchtolayout;
# change the contact
select("contact_left");
set("material", metal_list{i});
select("contact_right");
set("material", metal_list{j});
# set the optical generation rate
select("CHARGE::OGR");
if(k==1){
set("enabled", 0);
}
else{
set("enabled", 1);
}
# calculate forward and reverse bias separately to ensure convergence
#
#reverse bias
#
select('CHARGE::boundary conditions::anode');
set('range start',0);
set('range stop',-3);
set('range num points',31);
fname = sweep_path + slash + project_name + file_tag + '_rvs.ldev';
save(fname);
addjob(fname);
#
# forward bias
#
select('CHARGE::boundary conditions::anode');
set('range start', 0);
set('range stop',3);
set('range num points',31);
fname = sweep_path + slash + project_name + file_tag + '_fwd.ldev';
save(fname);
addjob(fname);
}
}
}
load(orig_project);
#
# Run jobs
#
runjobs;
#
# Analyze results
#
V_tot = cell(2);
I_tot = cell(2);
for (i = 1:n_metal_list) {
for (j = 1:n_metal_list) {
for (k = 1:2){
file_tag = '_' + metal_name_list{i} + '_' + metal_name_list{j}+ "_" + flag_illum{k};
?'Analyzing job for ' + file_tag;
fname = sweep_path + slash + project_name + file_tag + '_rvs.ldev';
load(fname);
anode = getresult('CHARGE','anode');
Vr = anode.V_anode;
Vr = Vr(2:length(Vr));
Ir = pinch(anode.I);
Ir = -Ir(2:length(Ir)) + 1e-12;
fname = sweep_path + slash + project_name + file_tag + '_fwd.ldev';
load(fname);
anode = getresult('CHARGE','anode');
Vf = anode.V_anode;
If = pinch(anode.I) + 1e-12;
V_tot{k} = [flip(Vr,1); Vf];
I_tot{k} = [flip(Ir,1); If];
}
plotxy(V_tot{1},abs(I_tot{1}*1e3),
V_tot{2},abs(I_tot{2}*1e3),
'Voltage (V)','Current (mA)', metal_name_list{i} + ' & ' + metal_name_list{j});
legend('dark','0.5 mW illumination');
}
}
load(orig_project);