-
Notifications
You must be signed in to change notification settings - Fork 24
/
aestimo.py
executable file
·5142 lines (4858 loc) · 202 KB
/
aestimo.py
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/usr/bin/env python
# -*- coding: utf-8 -*-
Description = f'''
Aestimo 1D Schrodinger-Poisson Solver
Copyright (C) 2013-2022
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. This program is distributed in
the hope that it will be useful, but WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more
details. You should have received a copy of the GNU General Public
License along with this program. See ~/COPYING file or
http://www.gnu.org/copyleft/gpl.txt
INFORMATION:
This is the effective mass calculator for conduction band and
3x3 k.p Numpy calculator for valence band calculations.
Usage:
$ ./aestimo.py <args>
'''
import os, sys, getopt, time, logging
import matplotlib.pyplot as pl
import numpy as np
from math import log, exp, sqrt
from scipy import linalg
from argparse import ArgumentParser, HelpFormatter
from pathlib import Path
import textwrap
from aeslibs.VBHM import qsv, VBMAT1, VBMAT2, VBMAT_V, CBMAT, CBMAT_V, VBMAT_V_2
import config, database
from aeslibs.aestimo_poisson1d import (
Poisson_equi2,
equi_np_fi,
Write_results_equi2,
equi_np_fi2,
equi_np_fi3,
Poisson_non_equi3,
Poisson_equi_non_2,
equi_np_fi22,
equi_np_fi222,
)
from aeslibs.aestimo_poisson1d import (
Poisson_equi1,
Mobility2,
Continuity2,
Mobility3,
Continuity3,
Poisson_non_equi2,
Current2,
Write_results_non_equi2,
Write_results_equi1,
amort_wave,
)
from aeslibs.ddggummelmap import DDGgummelmap
from aeslibs.ddnnewtonmap import DDNnewtonmap
from aeslibs.func_lib import Ubernoulli
from aeslibs.ddgnlpoisson import DDGnlpoisson_new
time0 = time.time() # timing audit
# Because alen is not used anymore
def alen(x):
return 1 if np.isscalar(x) else len(x)
#alen = np.alen
# Version
__version__ = "3.0.0"
# Logger
logger = logging.getLogger('aestimo')
def initialize_logger():
hdlr = logging.FileHandler(os.path.abspath(os.path.join(output_directory, 'aestimo.log')))
hdlr_formatter = logging.Formatter('%(asctime)s %(levelname)s %(name)s %(message)s')
hdlr.setFormatter(hdlr_formatter)
logger.addHandler(hdlr)
# stderr
ch = logging.StreamHandler()
ch_formatter = logging.Formatter('%(levelname)s %(message)s')
ch.setFormatter(ch_formatter)
logger.addHandler(ch)
# LOG level can be INFO, WARNING, ERROR
logger.setLevel(logging.INFO)
#Preset variables
drawFigures = False
# Defining constants and material parameters
q = 1.602176e-19 # C
kb = 1.3806504e-23 # J/K
hbar = 1.054588757e-34 # Js
m_e = 9.1093826e-31 # kg
pi = np.pi
eps0 = 8.8541878176e-12 # F/m
# TEMPERATURE
T = 300.0 # Kelvin
Vt = kb * T / q # [eV]
J2meV = 1e3 / q # Joules to meV
meV2J = 1e-3 * q # meV to Joules
time1 = time.time() # timing audit
# To print Description variable with argparse
class RawFormatter(HelpFormatter):
def _fill_text(self, text, width, indent):
return "\n".join([textwrap.fill(line, width) for line in textwrap.indent(textwrap.dedent(text), indent).splitlines()])
def round2int(x):
"""int is sensitive to floating point numerical errors near whole numbers,
this moves the discontinuity to the half interval. It is also equivalent
to the normal rules for rounding positive numbers."""
# int(x + (x>0) -0.5) # round2int for positive and negative numbers
return int(x + 0.5)
def vegard1(first, second, mole):
return first * mole + second * (1 - mole)
class Structure:
def __init__(self, database, **kwargs):
"""This class holds details on fthe structure to be simulated.
database is the module containing the material properties. Then
this class should have the following attributes set
Fapp - applied field (Vm**-1)
T - Temperature (K)
subnumber_e - number of subbands to look for.
comp_scheme - computing scheme
dx - grid step size (m)
n_max - number of grid points
cb_meff #conduction band effective mass (kg) (array, len n_max)
cb_meff_alpha #non-parabolicity constant.
fi #Bandstructure potential (J) (array, len n_max)
eps #dielectric constant (including eps0) (array, len n_max)
dop #doping distribution (m**-3) (array, len n_max)
These last 4 can be created by using the method
create_structure_arrays(material_list)
"""
# setting any parameters provided with initialisation
for key, value in kwargs.items():
setattr(self, key, value)
# Loading materials database
self.material_property = database.materialproperty
totalmaterial = alen(self.material_property)
self.alloy_property = database.alloyproperty
totalalloy = alen(self.alloy_property)
self.alloy_property_4 = database.alloyproperty4
totalalloy += alen(self.alloy_property_4)
logger.info(
"Total material number in database: %d", (totalmaterial + totalalloy)
)
def create_structure_arrays(self):
""" initialise arrays/lists for structure"""
# self.N_wells_real0=sum(sum(np.char.count(self.material,'w')))
self.N_wells_real0 = sum(
np.char.count([layer[6] for layer in self.material], "w")
)
self.N_layers_real0 = len(
self.material
) # sum(np.char.count([layer[6] for layer in self.material],'w'))+sum(np.char.count([layer[6] for layer in self.material],'b'))
# Calculate the required number of grid points
self.x_max = (
sum([layer[0] for layer in self.material]) * 1e-9
) # total thickness (m)
n_max = round2int(self.x_max / self.dx)
# Check on n_max
maxgridpoints = self.maxgridpoints
mat_crys_strc = self.mat_crys_strc
if n_max > maxgridpoints:
logger.error("Grid number is exceeding the max number of %d", maxgridpoints)
sys.exit()
#
self.n_max = n_max
dx = self.dx
material_property = self.material_property
alloy_property = self.alloy_property
alloy_property_4 = self.alloy_property_4
cb_meff = np.zeros(n_max) # conduction band effective mass
cb_meff_alpha = np.zeros(n_max) # non-parabolicity constant.
m_hh = np.zeros(n_max)
m_lh = np.zeros(n_max)
m_so = np.zeros(n_max)
# Elastic constants C11,C12
C12 = np.zeros(n_max)
C11 = np.zeros(n_max)
# Elastic constants Wurtzite C13,C33
C13 = np.zeros(n_max)
C33 = np.zeros(n_max)
C44 = np.zeros(n_max)
# Spontaneous and Piezoelectric Polarizations constants D15,D13,D33 and Psp
D15 = np.zeros(n_max)
D31 = np.zeros(n_max)
D33 = np.zeros(n_max)
Psp = np.zeros(n_max)
# Luttinger Parameters γ1,γ2,γ3
GA3 = np.zeros(n_max)
GA2 = np.zeros(n_max)
GA1 = np.zeros(n_max)
# Hole eff. mass parameter Wurtzite Semiconductors
A1 = np.zeros(n_max)
A2 = np.zeros(n_max)
A3 = np.zeros(n_max)
A4 = np.zeros(n_max)
A5 = np.zeros(n_max)
A6 = np.zeros(n_max)
# Lattice constant a0
a0 = np.zeros(n_max)
a0_wz = np.zeros(n_max)
a0_sub = np.zeros(n_max)
# Deformation potentials ac,av,b
Ac = np.zeros(n_max)
Av = np.zeros(n_max)
B = np.zeros(n_max)
# Deformation potentials Wurtzite Semiconductors
D1 = np.zeros(n_max)
D2 = np.zeros(n_max)
D3 = np.zeros(n_max)
D4 = np.zeros(n_max)
delta = np.zeros(n_max) # delta splitt off
delta_so = np.zeros(n_max) # delta Spin–orbit split energy
delta_cr = np.zeros(n_max) # delta Crystal-field split energy
# Strain related
fi_h = np.zeros(n_max) # Bandstructure potential
fi_e = np.zeros(n_max) # Bandstructure potential
eps = np.zeros(n_max) # dielectric constant
dop = np.zeros(n_max) # doping
pol_surf_char = np.zeros(n_max)
N_wells_real = 0
N_wells_real2 = 0
N_layers_real2 = 0
N_wells_real0 = self.N_wells_real0
N_layers_real0 = self.N_layers_real0
N_wells_virtual = N_wells_real0 + 2
N_wells_virtual2 = N_wells_real0 + 2
N_layers_virtual = N_layers_real0 + 2
Well_boundary = np.zeros((N_wells_virtual, 2), dtype=int)
Well_boundary2 = np.zeros((N_wells_virtual, 2), dtype=int)
barrier_boundary = np.zeros((N_wells_virtual + 1, 2), dtype=int)
layer_boundary = np.zeros((N_layers_virtual, 2), dtype=int)
n_max_general = np.zeros(N_wells_virtual, dtype=int)
Well_boundary[N_wells_virtual - 1, 0] = n_max - 1
Well_boundary[N_wells_virtual - 1, 1] = n_max - 1
Well_boundary2[N_wells_virtual - 1, 0] = n_max - 1
Well_boundary2[N_wells_virtual - 1, 1] = n_max - 1
barrier_boundary[N_wells_virtual, 0] = n_max - 1
barrier_len = np.zeros(N_wells_virtual + 1)
n = np.zeros(n_max)
p = np.zeros(n_max)
TAUN0 = np.zeros(n_max)
TAUP0 = np.zeros(n_max)
mun0 = np.zeros(n_max)
mup0 = np.zeros(n_max)
Cn0 = np.zeros(n_max)
Cp0 = np.zeros(n_max)
BETAN = np.zeros(n_max)
BETAP = np.zeros(n_max)
VSATN = np.zeros(n_max)
VSATP = np.zeros(n_max)
position = 0.0 # keeping in nanometres (to minimise errors)
for layer in self.material:
startindex = round2int(position * 1e-9 / dx)
z0 = round2int(position * 1e-9 / dx)
position += layer[0] # update position to end of the layer
finishindex = round2int(position * 1e-9 / dx)
z1 = round2int(position * 1e-9 / dx)
#
matType = layer[1]
if matType in material_property:
matprops = material_property[matType]
cb_meff[startindex:finishindex] = matprops["m_e"] * m_e
cb_meff_alpha[startindex:finishindex] = matprops["m_e_alpha"]
fi_e[startindex:finishindex] = (
matprops["Band_offset"] * matprops["Eg"] * q
) # Joule
if mat_crys_strc == "Zincblende":
a0_sub[startindex:finishindex] = matprops["a0_sub"] * 1e-10
C11[startindex:finishindex] = matprops["C11"] * 1e10
C12[startindex:finishindex] = matprops["C12"] * 1e10
GA1[startindex:finishindex] = matprops["GA1"]
GA2[startindex:finishindex] = matprops["GA2"]
GA3[startindex:finishindex] = matprops["GA3"]
Ac[startindex:finishindex] = matprops["Ac"] * q
Av[startindex:finishindex] = matprops["Av"] * q
B[startindex:finishindex] = matprops["B"] * q
delta[startindex:finishindex] = matprops["delta"] * q
fi_h[startindex:finishindex] = (
-(1 - matprops["Band_offset"]) * matprops["Eg"] * q
) # Joule #-0.8*q-(1-matprops['Band_offset'])*matprops['Eg']*q #Joule
eps[startindex:finishindex] = matprops["epsilonStatic"] * eps0
a0[startindex:finishindex] = matprops["a0"] * 1e-10
TAUN0[startindex:finishindex] = matprops["TAUN0"]
TAUP0[startindex:finishindex] = matprops["TAUP0"]
mun0[startindex:finishindex] = matprops["mun0"]
mup0[startindex:finishindex] = matprops["mup0"]
Cn0[startindex:finishindex] = matprops["Cn0"] * 1e-12
Cp0[startindex:finishindex] = matprops["Cp0"] * 1e-12
BETAN[startindex:finishindex] = matprops["BETAN"]
BETAP[startindex:finishindex] = matprops["BETAP"]
VSATN[startindex:finishindex] = matprops["VSATN"]
VSATP[startindex:finishindex] = matprops["VSATP"]
if mat_crys_strc == "Wurtzite":
a0_sub[startindex:finishindex] = matprops["a0_sub"] * 1e-10
C11[startindex:finishindex] = matprops["C11"] * 1e10
C12[startindex:finishindex] = matprops["C12"] * 1e10
C13[startindex:finishindex] = matprops["C13"] * 1e10
C33[startindex:finishindex] = matprops["C33"] * 1e10
A1[startindex:finishindex] = matprops["A1"]
A2[startindex:finishindex] = matprops["A2"]
A3[startindex:finishindex] = matprops["A3"]
A4[startindex:finishindex] = matprops["A4"]
A5[startindex:finishindex] = matprops["A5"]
A6[startindex:finishindex] = matprops["A6"]
Ac[startindex:finishindex] = matprops["Ac"] * q
D1[startindex:finishindex] = matprops["D1"] * q
D2[startindex:finishindex] = matprops["D2"] * q
D3[startindex:finishindex] = matprops["D3"] * q
D4[startindex:finishindex] = matprops["D4"] * q
D31[startindex:finishindex] = matprops["D31"]
D33[startindex:finishindex] = matprops["D33"]
a0_wz[startindex:finishindex] = matprops["a0_wz"] * 1e-10
delta_so[startindex:finishindex] = matprops["delta_so"] * q
delta_cr[startindex:finishindex] = matprops["delta_cr"] * q
eps[startindex:finishindex] = matprops["epsilonStatic"] * eps0
fi_h[startindex:finishindex] = (
-(1 - matprops["Band_offset"]) * matprops["Eg"] * q
)
Psp[startindex:finishindex] = matprops["Psp"]
TAUN0[startindex:finishindex] = matprops["TAUN0"]
TAUP0[startindex:finishindex] = matprops["TAUP0"]
mun0[startindex:finishindex] = matprops["mun0"]
mup0[startindex:finishindex] = matprops["mup0"]
Cn0[startindex:finishindex] = matprops["Cn0"] * 1e-12
Cp0[startindex:finishindex] = matprops["Cp0"] * 1e-12
BETAN[startindex:finishindex] = matprops["BETAN"]
BETAP[startindex:finishindex] = matprops["BETAP"]
VSATN[startindex:finishindex] = matprops["VSATN"]
VSATP[startindex:finishindex] = matprops["VSATP"]
elif matType in alloy_property:
alloyprops = alloy_property[matType]
mat1 = material_property[alloyprops["Material1"]]
mat2 = material_property[alloyprops["Material2"]]
x = layer[2] # alloy ratio
cb_meff_alloy = x * mat1["m_e"] + (1 - x) * mat2["m_e"]
cb_meff[startindex:finishindex] = cb_meff_alloy * m_e
Eg = (
x * mat1["Eg"]
+ (1 - x) * mat2["Eg"]
- alloyprops["Bowing_param"] * x * (1 - x)
) # eV
fi_e[startindex:finishindex] = (
alloyprops["Band_offset"] * Eg * q
) # for electron. Joule
a0_sub[startindex:finishindex] = alloyprops["a0_sub"] * 1e-10
TAUN0[startindex:finishindex] = alloyprops["TAUN0"]
TAUP0[startindex:finishindex] = alloyprops["TAUP0"]
BETAN[startindex:finishindex] = alloyprops["BETAN"]
BETAP[startindex:finishindex] = alloyprops["BETAP"]
VSATN[startindex:finishindex] = alloyprops["VSATN"]
VSATP[startindex:finishindex] = alloyprops["VSATP"]
if mat_crys_strc == "Zincblende":
C11[startindex:finishindex] = (
x * mat1["C11"] + (1 - x) * mat2["C11"]
) * 1e10
C12[startindex:finishindex] = (
x * mat1["C12"] + (1 - x) * mat2["C12"]
) * 1e10
GA1[startindex:finishindex] = (
x * mat1["GA1"] + (1 - x) * mat2["GA1"]
)
GA2[startindex:finishindex] = (
x * mat1["GA2"] + (1 - x) * mat2["GA2"]
)
GA3[startindex:finishindex] = (
x * mat1["GA3"] + (1 - x) * mat2["GA3"]
)
Ac_alloy = x * mat1["Ac"] + (1 - x) * mat2["Ac"]
Ac[startindex:finishindex] = Ac_alloy * q
Av_alloy = x * mat1["Av"] + (1 - x) * mat2["Av"]
Av[startindex:finishindex] = Av_alloy * q
B_alloy = x * mat1["B"] + (1 - x) * mat2["B"]
B[startindex:finishindex] = B_alloy * q
delta_alloy = x * mat1["delta"] + (1 - x) * mat2["delta"]
delta[startindex:finishindex] = delta_alloy * q
fi_h[startindex:finishindex] = (
-(1 - alloyprops["Band_offset"]) * Eg * q
) # -(-1.33*(1-x)-0.8*x)for electron. Joule-1.97793434e-20 #
eps[startindex:finishindex] = (
x * mat1["epsilonStatic"] + (1 - x) * mat2["epsilonStatic"]
) * eps0
a0[startindex:finishindex] = (
x * mat1["a0"] + (1 - x) * mat2["a0"]
) * 1e-10
cb_meff_alpha[startindex:finishindex] = alloyprops["m_e_alpha"] * (
mat2["m_e"] / cb_meff_alloy
) # non-parabolicity constant for alloy. THIS CALCULATION IS MOSTLY WRONG. MUST BE CONTROLLED. SBL
mun0[startindex:finishindex] = (
x * mat1["mun0"] + (1 - x) * mat2["mun0"]
)
mup0[startindex:finishindex] = (
x * mat1["mup0"] + (1 - x) * mat2["mup0"]
)
Cn0[startindex:finishindex] = (
x * mat1["Cn0"] + (1 - x) * mat2["Cn0"]
) * 1e-12
Cp0[startindex:finishindex] = (
x * mat1["Cp0"] + (1 - x) * mat2["Cp0"]
) * 1e-12
if mat_crys_strc == "Wurtzite":
# A1[startindex:finishindex] =vegard1(mat1['A1'],mat1['A1'],x)
A1[startindex:finishindex] = x * mat1["A1"] + (1 - x) * mat2["A1"]
A2[startindex:finishindex] = x * mat1["A2"] + (1 - x) * mat2["A2"]
A3[startindex:finishindex] = x * mat1["A3"] + (1 - x) * mat2["A3"]
A4[startindex:finishindex] = x * mat1["A4"] + (1 - x) * mat2["A4"]
A5[startindex:finishindex] = x * mat1["A5"] + (1 - x) * mat2["A5"]
A6[startindex:finishindex] = x * mat1["A6"] + (1 - x) * mat2["A6"]
D1[startindex:finishindex] = (
x * mat1["D1"] + (1 - x) * mat2["D1"]
) * q
D2[startindex:finishindex] = (
x * mat1["D2"] + (1 - x) * mat2["D2"]
) * q
D3[startindex:finishindex] = (
x * mat1["D3"] + (1 - x) * mat2["D3"]
) * q
D4[startindex:finishindex] = (
x * mat1["D4"] + (1 - x) * mat2["D4"]
) * q
C13[startindex:finishindex] = (
x * mat1["C13"] + (1 - x) * mat2["C13"]
) * 1e10 # for newton/meter²
C33[startindex:finishindex] = (
x * mat1["C33"] + (1 - x) * mat2["C33"]
) * 1e10
D31[startindex:finishindex] = (
x * mat1["D31"] + (1 - x) * mat2["D31"]
)
D33[startindex:finishindex] = (
x * mat1["D33"] + (1 - x) * mat2["D33"]
)
Psp[startindex:finishindex] = (
x * mat1["Psp"] + (1 - x) * mat2["Psp"]
)
C11[startindex:finishindex] = (
x * mat1["C11"] + (1 - x) * mat2["C11"]
) * 1e10
C12[startindex:finishindex] = (
x * mat1["C12"] + (1 - x) * mat2["C12"]
) * 1e10
a0_wz[startindex:finishindex] = (
x * mat1["a0_wz"] + (1 - x) * mat2["a0_wz"]
) * 1e-10
eps[startindex:finishindex] = (
x * mat1["epsilonStatic"] + (1 - x) * mat2["epsilonStatic"]
) * eps0
fi_h[startindex:finishindex] = (
-(1 - alloyprops["Band_offset"]) * Eg * q
)
delta_so[startindex:finishindex] = (
x * mat1["delta_so"] + (1 - x) * mat2["delta_so"]
) * q
delta_cr[startindex:finishindex] = (
x * mat1["delta_cr"] + (1 - x) * mat2["delta_cr"]
) * q
Ac_alloy = x * mat1["Ac"] + (1 - x) * mat2["Ac"]
Ac[startindex:finishindex] = Ac_alloy * q
mun0[startindex:finishindex] = (
x * mat1["mun0"] + (1 - x) * mat2["mun0"]
)
mup0[startindex:finishindex] = (
x * mat1["mup0"] + (1 - x) * mat2["mup0"]
)
Cn0[startindex:finishindex] = (
x * mat1["Cn0"] + (1 - x) * mat2["Cn0"]
) * 1e-12
Cp0[startindex:finishindex] = (
x * mat1["Cp0"] + (1 - x) * mat2["Cp0"]
) * 1e-12
#############################################
elif matType in alloy_property_4:
alloyprops = alloy_property_4[matType]
TAUN0[startindex:finishindex] = alloyprops["TAUN0"]
TAUP0[startindex:finishindex] = alloyprops["TAUP0"]
BETAN[startindex:finishindex] = alloyprops["BETAN"]
BETAP[startindex:finishindex] = alloyprops["BETAP"]
VSATN[startindex:finishindex] = alloyprops["VSATN"]
VSATP[startindex:finishindex] = alloyprops["VSATP"]
if mat_crys_strc == "Zincblende":
alloyprops = alloy_property_4[matType]
mat1 = material_property[alloyprops["Material1"]]
mat2 = material_property[alloyprops["Material2"]]
mat3 = material_property[alloyprops["Material3"]]
mat4 = material_property[alloyprops["Material4"]]
# mat1:InAs
# mat2:GaAs
# mat3:InP
# mat4:GaP
# This is accourding to interpolated Vegard’s law for quaternary AxB(1-x)CyD(1-y)=InxGa(1-x)AsyP(1-y)
x = layer[2] # alloy ratio x
y = layer[3] # alloy ratio y
cb_meff_alloy_ABC_x = x * mat1["m_e"] + (1 - x) * mat2["m_e"]
cb_meff_alloy_ABD_x = x * mat3["m_e"] + (1 - x) * mat4["m_e"]
cb_meff_alloy_ACD_y = y * mat1["m_e"] + (1 - y) * mat3["m_e"]
cb_meff_alloy_BCD_y = y * mat2["m_e"] + (1 - y) * mat4["m_e"]
cb_meff_alloy = (
x
* (1 - x)
* (y * cb_meff_alloy_ABC_x + (1 - y) * cb_meff_alloy_ABD_x)
+ y
* (1 - y)
* (x * cb_meff_alloy_ACD_y + (1 - x) * cb_meff_alloy_BCD_y)
) / (x * (1 - x) + y * (1 - y))
cb_meff[startindex:finishindex] = cb_meff_alloy * m_e
Eg_alloy_ABC_x = (
x * mat1["Eg"]
+ (1 - x) * mat2["Eg"]
- alloyprops["Bowing_param_ABC"] * x * (1 - x)
) # eV InGaAs
Eg_alloy_ABD_x = (
x * mat3["Eg"]
+ (1 - x) * mat4["Eg"]
- alloyprops["Bowing_param_ABD"] * x * (1 - x)
) # eV InGaP
Eg_alloy_ACD_y = (
y * mat1["Eg"]
+ (1 - y) * mat3["Eg"]
- alloyprops["Bowing_param_ACD"] * y * (1 - y)
) # eV InAsP
Eg_alloy_BCD_y = (
y * mat2["Eg"]
+ (1 - y) * mat4["Eg"]
- alloyprops["Bowing_param_BCD"] * y * (1 - y)
) # eV GaAsP
Eg = (
x * (1 - x) * (y * Eg_alloy_ABC_x + (1 - y) * Eg_alloy_ABD_x)
+ y * (1 - y) * (x * Eg_alloy_ACD_y + (1 - x) * Eg_alloy_BCD_y)
) / (x * (1 - x) + y * (1 - y))
fi_e[startindex:finishindex] = (
alloyprops["Band_offset"] * Eg * q
) # for electron. Joule
a0_sub[startindex:finishindex] = alloyprops["a0_sub"] * 1e-10
C11_alloy_ABC_x = x * mat1["C11"] + (1 - x) * mat2["C11"]
C11_alloy_ABD_x = x * mat3["C11"] + (1 - x) * mat4["C11"]
C11_alloy_ACD_y = y * mat1["C11"] + (1 - y) * mat3["C11"]
C11_alloy_BCD_y = y * mat2["C11"] + (1 - y) * mat4["C11"]
C11[startindex:finishindex] = (
(
x
* (1 - x)
* (y * C11_alloy_ABC_x + (1 - y) * C11_alloy_ABD_x)
+ y
* (1 - y)
* (x * C11_alloy_ACD_y + (1 - x) * C11_alloy_BCD_y)
)
/ (x * (1 - x) + y * (1 - y))
) * 1e10
C12_alloy_ABC_x = x * mat1["C12"] + (1 - x) * mat2["C12"]
C12_alloy_ABD_x = x * mat3["C12"] + (1 - x) * mat4["C12"]
C12_alloy_ACD_y = y * mat1["C12"] + (1 - y) * mat3["C12"]
C12_alloy_BCD_y = y * mat2["C12"] + (1 - y) * mat4["C12"]
C12[startindex:finishindex] = (
(
x
* (1 - x)
* (y * C12_alloy_ABC_x + (1 - y) * C12_alloy_ABD_x)
+ y
* (1 - y)
* (x * C12_alloy_ACD_y + (1 - x) * C12_alloy_BCD_y)
)
/ (x * (1 - x) + y * (1 - y))
) * 1e10
GA1_alloy_ABC_x = x * mat1["GA1"] + (1 - x) * mat2["GA1"]
GA1_alloy_ABD_x = x * mat3["GA1"] + (1 - x) * mat4["GA1"]
GA1_alloy_ACD_y = y * mat1["GA1"] + (1 - y) * mat3["GA1"]
GA1_alloy_BCD_y = y * mat2["GA1"] + (1 - y) * mat4["GA1"]
GA1[startindex:finishindex] = (
x * (1 - x) * (y * GA1_alloy_ABC_x + (1 - y) * GA1_alloy_ABD_x)
+ y
* (1 - y)
* (x * GA1_alloy_ACD_y + (1 - x) * GA1_alloy_BCD_y)
) / (x * (1 - x) + y * (1 - y))
GA2_alloy_ABC_x = x * mat1["GA2"] + (1 - x) * mat2["GA2"]
GA2_alloy_ABD_x = x * mat3["GA2"] + (1 - x) * mat4["GA2"]
GA2_alloy_ACD_y = y * mat1["GA2"] + (1 - y) * mat3["GA2"]
GA2_alloy_BCD_y = y * mat2["GA2"] + (1 - y) * mat4["GA2"]
GA2[startindex:finishindex] = (
x * (1 - x) * (y * GA2_alloy_ABC_x + (1 - y) * GA2_alloy_ABD_x)
+ y
* (1 - y)
* (x * GA2_alloy_ACD_y + (1 - x) * GA2_alloy_BCD_y)
) / (x * (1 - x) + y * (1 - y))
GA3_alloy_ABC_x = x * mat1["GA3"] + (1 - x) * mat2["GA3"]
GA3_alloy_ABD_x = x * mat3["GA3"] + (1 - x) * mat4["GA3"]
GA3_alloy_ACD_y = y * mat1["GA3"] + (1 - y) * mat3["GA3"]
GA3_alloy_BCD_y = y * mat2["GA3"] + (1 - y) * mat4["GA3"]
GA3[startindex:finishindex] = (
x * (1 - x) * (y * GA3_alloy_ABC_x + (1 - y) * GA3_alloy_ABD_x)
+ y
* (1 - y)
* (x * GA3_alloy_ACD_y + (1 - x) * GA3_alloy_BCD_y)
) / (x * (1 - x) + y * (1 - y))
Ac_alloy_ABC_x = x * mat1["Ac"] + (1 - x) * mat2["Ac"]
Ac_alloy_ABD_x = x * mat3["Ac"] + (1 - x) * mat4["Ac"]
Ac_alloy_ACD_y = y * mat1["Ac"] + (1 - y) * mat3["Ac"]
Ac_alloy_BCD_y = y * mat2["Ac"] + (1 - y) * mat4["Ac"]
Ac_alloy = (
x * (1 - x) * (y * Ac_alloy_ABC_x + (1 - y) * Ac_alloy_ABD_x)
+ y * (1 - y) * (x * Ac_alloy_ACD_y + (1 - x) * Ac_alloy_BCD_y)
) / (x * (1 - x) + y * (1 - y))
Ac[startindex:finishindex] = Ac_alloy * q
Av_alloy_ABC_x = x * mat1["Av"] + (1 - x) * mat2["Av"]
Av_alloy_ABD_x = x * mat3["Av"] + (1 - x) * mat4["Av"]
Av_alloy_ACD_y = y * mat1["Av"] + (1 - y) * mat3["Av"]
Av_alloy_BCD_y = y * mat2["Av"] + (1 - y) * mat4["Av"]
Av_alloy = (
x * (1 - x) * (y * Av_alloy_ABC_x + (1 - y) * Av_alloy_ABD_x)
+ y * (1 - y) * (x * Av_alloy_ACD_y + (1 - x) * Av_alloy_BCD_y)
) / (x * (1 - x) + y * (1 - y))
Av[startindex:finishindex] = Av_alloy * q
B_alloy_ABC_x = x * mat1["B"] + (1 - x) * mat2["B"]
B_alloy_ABD_x = x * mat3["B"] + (1 - x) * mat4["B"]
B_alloy_ACD_y = y * mat1["B"] + (1 - y) * mat3["B"]
B_alloy_BCD_y = y * mat2["B"] + (1 - y) * mat4["B"]
B_alloy = (
x * (1 - x) * (y * B_alloy_ABC_x + (1 - y) * B_alloy_ABD_x)
+ y * (1 - y) * (x * B_alloy_ACD_y + (1 - x) * B_alloy_BCD_y)
) / (x * (1 - x) + y * (1 - y))
B[startindex:finishindex] = B_alloy * q
delta_alloy_ABC_x = x * mat1["delta"] + (1 - x) * mat2["delta"]
delta_alloy_ABD_x = x * mat3["delta"] + (1 - x) * mat4["delta"]
delta_alloy_ACD_y = y * mat1["delta"] + (1 - y) * mat3["delta"]
delta_alloy_BCD_y = y * mat2["delta"] + (1 - y) * mat4["delta"]
delta_alloy = (
x
* (1 - x)
* (y * delta_alloy_ABC_x + (1 - y) * delta_alloy_ABD_x)
+ y
* (1 - y)
* (x * delta_alloy_ACD_y + (1 - x) * delta_alloy_BCD_y)
) / (x * (1 - x) + y * (1 - y))
delta[startindex:finishindex] = delta_alloy * q
fi_h[startindex:finishindex] = (
-(1 - alloyprops["Band_offset"]) * Eg * q
) # -(-1.33*(1-x)-0.8*x)for electron. Joule-1.97793434e-20 #
eps_alloy_ABC_x = (
x * mat1["epsilonStatic"] + (1 - x) * mat2["epsilonStatic"]
)
eps_alloy_ABD_x = (
x * mat3["epsilonStatic"] + (1 - x) * mat4["epsilonStatic"]
)
eps_alloy_ACD_y = (
y * mat1["epsilonStatic"] + (1 - y) * mat3["epsilonStatic"]
)
eps_alloy_BCD_y = (
y * mat2["epsilonStatic"] + (1 - y) * mat4["epsilonStatic"]
)
eps_alloy = (
x * (1 - x) * (y * eps_alloy_ABC_x + (1 - y) * eps_alloy_ABD_x)
+ y
* (1 - y)
* (x * eps_alloy_ACD_y + (1 - x) * eps_alloy_BCD_y)
) / (x * (1 - x) + y * (1 - y))
eps[startindex:finishindex] = eps_alloy * eps0
a0_alloy_ABC_x = x * mat1["a0"] + (1 - x) * mat2["a0"]
a0_alloy_ABD_x = x * mat3["a0"] + (1 - x) * mat4["a0"]
a0_alloy_ACD_y = y * mat1["a0"] + (1 - y) * mat3["a0"]
a0_alloy_BCD_y = y * mat2["a0"] + (1 - y) * mat4["a0"]
a0_alloy = (
x * (1 - x) * (y * a0_alloy_ABC_x + (1 - y) * a0_alloy_ABD_x)
+ y * (1 - y) * (x * a0_alloy_ACD_y + (1 - x) * a0_alloy_BCD_y)
) / (x * (1 - x) + y * (1 - y))
a0[startindex:finishindex] = a0_alloy * 1e-10
mun0_alloy_ABC_x = x * mat1["mun0"] + (1 - x) * mat2["mun0"]
mun0_alloy_ABD_x = x * mat3["mun0"] + (1 - x) * mat4["mun0"]
mun0_alloy_ACD_y = y * mat1["mun0"] + (1 - y) * mat3["mun0"]
mun0_alloy_BCD_y = y * mat2["mun0"] + (1 - y) * mat4["mun0"]
mun0[startindex:finishindex] = (
x
* (1 - x)
* (y * mun0_alloy_ABC_x + (1 - y) * mun0_alloy_ABD_x)
+ y
* (1 - y)
* (x * mun0_alloy_ACD_y + (1 - x) * mun0_alloy_BCD_y)
) / (x * (1 - x) + y * (1 - y))
mup0_alloy_ABC_x = x * mat1["mup0"] + (1 - x) * mat2["mup0"]
mup0_alloy_ABD_x = x * mat3["mup0"] + (1 - x) * mat4["mup0"]
mup0_alloy_ACD_y = y * mat1["mup0"] + (1 - y) * mat3["mup0"]
mup0_alloy_BCD_y = y * mat2["mup0"] + (1 - y) * mat4["mup0"]
mup0[startindex:finishindex] = (
x
* (1 - x)
* (y * mup0_alloy_ABC_x + (1 - y) * mup0_alloy_ABD_x)
+ y
* (1 - y)
* (x * mup0_alloy_ACD_y + (1 - x) * mup0_alloy_BCD_y)
) / (x * (1 - x) + y * (1 - y))
Cn0_alloy_ABC_x = x * mat1["Cn0"] + (1 - x) * mat2["Cn0"]
Cn0_alloy_ABD_x = x * mat3["Cn0"] + (1 - x) * mat4["Cn0"]
Cn0_alloy_ACD_y = y * mat1["Cn0"] + (1 - y) * mat3["Cn0"]
Cn0_alloy_BCD_y = y * mat2["Cn0"] + (1 - y) * mat4["Cn0"]
Cn0[startindex:finishindex] = (
(
x
* (1 - x)
* (y * Cn0_alloy_ABC_x + (1 - y) * Cn0_alloy_ABD_x)
+ y
* (1 - y)
* (x * Cn0_alloy_ACD_y + (1 - x) * Cn0_alloy_BCD_y)
)
/ (x * (1 - x) + y * (1 - y))
* 1e-12
)
Cp0_alloy_ABC_x = x * mat1["Cp0"] + (1 - x) * mat2["Cp0"]
Cp0_alloy_ABD_x = x * mat3["Cp0"] + (1 - x) * mat4["Cp0"]
Cp0_alloy_ACD_y = y * mat1["Cp0"] + (1 - y) * mat3["Cp0"]
Cp0_alloy_BCD_y = y * mat2["Cp0"] + (1 - y) * mat4["Cp0"]
Cp0[startindex:finishindex] = (
(
x
* (1 - x)
* (y * Cp0_alloy_ABC_x + (1 - y) * Cp0_alloy_ABD_x)
+ y
* (1 - y)
* (x * Cp0_alloy_ACD_y + (1 - x) * Cp0_alloy_BCD_y)
)
/ (x * (1 - x) + y * (1 - y))
* 1e-12
)
cb_meff_alpha[startindex:finishindex] = alloyprops["m_e_alpha"] * (
mat2["m_e"] / cb_meff_alloy
) # non-parabolicity constant for alloy. THIS CALCULATION IS MOSTLY WRONG. MUST BE CONTROLLED. SBL
if mat_crys_strc == "Wurtzite":
alloyprops = alloy_property_4[matType]
mat1 = material_property[alloyprops["Material1"]] # GaN
mat2 = material_property[alloyprops["Material2"]] # InN
mat3 = material_property[alloyprops["Material3"]] # AlN
# This is accourding to interpolated Vegard’s law for quaternary BxCyD1-x-yA=AlxInyGa1-x-yN
# I. Vurgaftman, J.R. Meyer, L.R. RamMohan, J. Appl. Phys. 89 (2001) 5815.
# C. K. Williams, T. H. Glisson, J. R. Hauser, and M. A. Littlejohn, J. Electron. Mater. 7, 639 (1978).
x = layer[2] # alloy ratio x
y = layer[3] # alloy ratio y
u_4 = (1 - x + y) / 2
v_4 = (2 - x - 2 * y) / 2
w_4 = (2 - 2 * x - y) / 2
cb_meff_alloy_ABC = (
u_4 * mat2["m_e"] + (1 - u_4) * mat3["m_e"]
) # AlInN
cb_meff_alloy_ACD = (
v_4 * mat1["m_e"] + (1 - v_4) * mat2["m_e"]
) # InGaN
cb_meff_alloy_ABD = (
w_4 * mat1["m_e"] + (1 - w_4) * mat3["m_e"]
) # AlGaN
cb_meff_alloy = (
x * y * cb_meff_alloy_ABC
+ y * (1 - x - y) * cb_meff_alloy_ACD
+ x * (1 - x - y) * cb_meff_alloy_ABD
) / (x * y + y * (1 - x - y) + x * (1 - x - y))
cb_meff[startindex:finishindex] = cb_meff_alloy * m_e
Eg_alloy_ABC = (
u_4 * mat2["Eg"]
+ (1 - u_4) * mat3["Eg"]
- alloyprops["Bowing_param_ABC"] * u_4 * (1 - u_4)
) # eV AlInN
Eg_alloy_ACD = (
v_4 * mat1["Eg"]
+ (1 - v_4) * mat2["Eg"]
- alloyprops["Bowing_param_ACD"] * v_4 * (1 - v_4)
) # eV InGaN
Eg_alloy_ABD = (
w_4 * mat1["Eg"]
+ (1 - w_4) * mat3["Eg"]
- alloyprops["Bowing_param_ABD"] * w_4 * (1 - w_4)
) # eV AlGaN
Eg = (
x * y * Eg_alloy_ABC
+ y * (1 - x - y) * Eg_alloy_ACD
+ x * (1 - x - y) * Eg_alloy_ABD
) / (x * y + y * (1 - x - y) + x * (1 - x - y))
fi_e[startindex:finishindex] = (
alloyprops["Band_offset"] * Eg * q
) # for electron. Joule
a0_sub[startindex:finishindex] = alloyprops["a0_sub"] * 1e-10
A1_alloy_ABC = u_4 * mat2["A1"] + (1 - u_4) * mat3["A1"]
A1_alloy_ACD = v_4 * mat1["A1"] + (1 - v_4) * mat2["A1"]
A1_alloy_ABD = w_4 * mat1["A1"] + (1 - w_4) * mat3["A1"]
A1[startindex:finishindex] = (
x * y * A1_alloy_ABC
+ y * (1 - x - y) * A1_alloy_ACD
+ x * (1 - x - y) * A1_alloy_ABD
) / (x * y + y * (1 - x - y) + x * (1 - x - y))
A2_alloy_ABC = u_4 * mat2["A2"] + (1 - u_4) * mat3["A2"]
A2_alloy_ACD = v_4 * mat1["A2"] + (1 - v_4) * mat2["A2"]
A2_alloy_ABD = w_4 * mat1["A2"] + (1 - w_4) * mat3["A2"]
A2[startindex:finishindex] = (
x * y * A2_alloy_ABC
+ y * (1 - x - y) * A2_alloy_ACD
+ x * (1 - x - y) * A2_alloy_ABD
) / (x * y + y * (1 - x - y) + x * (1 - x - y))
A3_alloy_ABC = u_4 * mat2["A3"] + (1 - u_4) * mat3["A3"]
A3_alloy_ACD = v_4 * mat1["A3"] + (1 - v_4) * mat2["A3"]
A3_alloy_ABD = w_4 * mat1["A3"] + (1 - w_4) * mat3["A3"]
A3[startindex:finishindex] = (
x * y * A3_alloy_ABC
+ y * (1 - x - y) * A3_alloy_ACD
+ x * (1 - x - y) * A3_alloy_ABD
) / (x * y + y * (1 - x - y) + x * (1 - x - y))
A4_alloy_ABC = u_4 * mat2["A4"] + (1 - u_4) * mat3["A4"]
A4_alloy_ACD = v_4 * mat1["A4"] + (1 - v_4) * mat2["A4"]
A4_alloy_ABD = w_4 * mat1["A4"] + (1 - w_4) * mat3["A4"]
A4[startindex:finishindex] = (
x * y * A4_alloy_ABC
+ y * (1 - x - y) * A4_alloy_ACD
+ x * (1 - x - y) * A4_alloy_ABD
) / (x * y + y * (1 - x - y) + x * (1 - x - y))
A5_alloy_ABC = u_4 * mat2["A5"] + (1 - u_4) * mat3["A5"]
A5_alloy_ACD = v_4 * mat1["A5"] + (1 - v_4) * mat2["A5"]
A5_alloy_ABD = w_4 * mat1["A5"] + (1 - w_4) * mat3["A5"]
A5[startindex:finishindex] = (
x * y * A5_alloy_ABC
+ y * (1 - x - y) * A5_alloy_ACD
+ x * (1 - x - y) * A5_alloy_ABD
) / (x * y + y * (1 - x - y) + x * (1 - x - y))
A6_alloy_ABC = u_4 * mat2["A6"] + (1 - u_4) * mat3["A6"]
A6_alloy_ACD = v_4 * mat1["A6"] + (1 - v_4) * mat2["A6"]
A6_alloy_ABD = w_4 * mat1["A6"] + (1 - w_4) * mat3["A6"]
A6[startindex:finishindex] = (
x * y * A6_alloy_ABC
+ y * (1 - x - y) * A6_alloy_ACD
+ x * (1 - x - y) * A6_alloy_ABD
) / (x * y + y * (1 - x - y) + x * (1 - x - y))
D1_alloy_ABC = u_4 * mat2["D1"] + (1 - u_4) * mat3["D1"]
D1_alloy_ACD = v_4 * mat1["D1"] + (1 - v_4) * mat2["D1"]
D1_alloy_ABD = w_4 * mat1["D1"] + (1 - w_4) * mat3["D1"]
D1_alloy = (
x * y * D1_alloy_ABC
+ y * (1 - x - y) * D1_alloy_ACD
+ x * (1 - x - y) * D1_alloy_ABD
) / (x * y + y * (1 - x - y) + x * (1 - x - y))
D1[startindex:finishindex] = D1_alloy * q
D2_alloy_ABC = u_4 * mat2["D2"] + (1 - u_4) * mat3["D2"]
D2_alloy_ACD = v_4 * mat1["D2"] + (1 - v_4) * mat2["D2"]
D2_alloy_ABD = w_4 * mat1["D2"] + (1 - w_4) * mat3["D2"]
D2_alloy = (
x * y * D2_alloy_ABC
+ y * (1 - x - y) * D2_alloy_ACD
+ x * (1 - x - y) * D2_alloy_ABD
) / (x * y + y * (1 - x - y) + x * (1 - x - y))
D2[startindex:finishindex] = D2_alloy * q
D3_alloy_ABC = u_4 * mat2["D3"] + (1 - u_4) * mat3["D3"]
D3_alloy_ACD = v_4 * mat1["D3"] + (1 - v_4) * mat2["D3"]
D3_alloy_ABD = w_4 * mat1["D3"] + (1 - w_4) * mat3["D3"]
D3_alloy = (
x * y * D3_alloy_ABC
+ y * (1 - x - y) * D3_alloy_ACD
+ x * (1 - x - y) * D3_alloy_ABD
) / (x * y + y * (1 - x - y) + x * (1 - x - y))
D3[startindex:finishindex] = D3_alloy * q
D4_alloy_ABC = u_4 * mat2["D4"] + (1 - u_4) * mat3["D4"]
D4_alloy_ACD = v_4 * mat1["D4"] + (1 - v_4) * mat2["D4"]
D4_alloy_ABD = w_4 * mat1["D4"] + (1 - w_4) * mat3["D4"]
D4_alloy = (
x * y * D4_alloy_ABC
+ y * (1 - x - y) * D4_alloy_ACD
+ x * (1 - x - y) * D4_alloy_ABD
) / (x * y + y * (1 - x - y) + x * (1 - x - y))
D4[startindex:finishindex] = D4_alloy * q
D31_alloy_ABC = u_4 * mat2["D31"] + (1 - u_4) * mat3["D31"]
D31_alloy_ACD = v_4 * mat1["D31"] + (1 - v_4) * mat2["D31"]
D31_alloy_ABD = w_4 * mat1["D31"] + (1 - w_4) * mat3["D31"]
D31[startindex:finishindex] = (
x * y * D31_alloy_ABC
+ y * (1 - x - y) * D31_alloy_ACD
+ x * (1 - x - y) * D31_alloy_ABD
) / (x * y + y * (1 - x - y) + x * (1 - x - y))
D33_alloy_ABC = u_4 * mat2["D33"] + (1 - u_4) * mat3["D33"]
D33_alloy_ACD = v_4 * mat1["D33"] + (1 - v_4) * mat2["D33"]
D33_alloy_ABD = w_4 * mat1["D33"] + (1 - w_4) * mat3["D33"]
D33[startindex:finishindex] = (
x * y * D33_alloy_ABC
+ y * (1 - x - y) * D33_alloy_ACD
+ x * (1 - x - y) * D33_alloy_ABD
) / (x * y + y * (1 - x - y) + x * (1 - x - y))
Psp_alloy_ABC = u_4 * mat2["Psp"] + (1 - u_4) * mat3["Psp"]
Psp_alloy_ACD = v_4 * mat1["Psp"] + (1 - v_4) * mat2["Psp"]
Psp_alloy_ABD = w_4 * mat1["Psp"] + (1 - w_4) * mat3["Psp"]
Psp[startindex:finishindex] = (
x * y * Psp_alloy_ABC
+ y * (1 - x - y) * Psp_alloy_ACD
+ x * (1 - x - y) * Psp_alloy_ABD
) / (x * y + y * (1 - x - y) + x * (1 - x - y))
C11_alloy_ABC = u_4 * mat2["C11"] + (1 - u_4) * mat3["C11"]
C11_alloy_ACD = v_4 * mat1["C11"] + (1 - v_4) * mat2["C11"]
C11_alloy_ABD = w_4 * mat1["C11"] + (1 - w_4) * mat3["C11"]
C11[startindex:finishindex] = (
(
x * y * C11_alloy_ABC
+ y * (1 - x - y) * C11_alloy_ACD
+ x * (1 - x - y) * C11_alloy_ABD
)
/ (x * y + y * (1 - x - y) + x * (1 - x - y))
* 1e10
) # for newton/meter²
C12_alloy_ABC = u_4 * mat2["C12"] + (1 - u_4) * mat3["C12"]
C12_alloy_ACD = v_4 * mat1["C12"] + (1 - v_4) * mat2["C12"]
C12_alloy_ABD = w_4 * mat1["C12"] + (1 - w_4) * mat3["C12"]
C12[startindex:finishindex] = (
(
x * y * C12_alloy_ABC
+ y * (1 - x - y) * C12_alloy_ACD
+ x * (1 - x - y) * C12_alloy_ABD
)
/ (x * y + y * (1 - x - y) + x * (1 - x - y))
* 1e10
)
C13_alloy_ABC = u_4 * mat2["C13"] + (1 - u_4) * mat3["C13"]
C13_alloy_ACD = v_4 * mat1["C13"] + (1 - v_4) * mat2["C13"]
C13_alloy_ABD = w_4 * mat1["C13"] + (1 - w_4) * mat3["C13"]
C13[startindex:finishindex] = (
(
x * y * C13_alloy_ABC
+ y * (1 - x - y) * C13_alloy_ACD
+ x * (1 - x - y) * C13_alloy_ABD
)
/ (x * y + y * (1 - x - y) + x * (1 - x - y))
* 1e10
)
C33_alloy_ABC = u_4 * mat2["C33"] + (1 - u_4) * mat3["C33"]
C33_alloy_ACD = v_4 * mat1["C33"] + (1 - v_4) * mat2["C33"]
C33_alloy_ABD = w_4 * mat1["C33"] + (1 - w_4) * mat3["C33"]
C33[startindex:finishindex] = (
(
x * y * C33_alloy_ABC
+ y * (1 - x - y) * C33_alloy_ACD
+ x * (1 - x - y) * C33_alloy_ABD
)
/ (x * y + y * (1 - x - y) + x * (1 - x - y))
* 1e10
)
fi_h[startindex:finishindex] = (
-(1 - alloyprops["Band_offset"]) * Eg * q
) # -(-1.33*(1-x)-0.8*x)for electron. Joule-1.97793434e-20 #