27
27
#####
28
28
def SetUniversalParameters (device , region ):
29
29
universal = {
30
- 'q' : 1.6e-19 , #, 'coul'),
30
+ 'q' : 1.6e-19 , #, 'coul'),
31
31
'k' : 1.3806503e-23 , #, 'J/K'),
32
32
'Permittivity_0' : 8.85e-14 #, 'F/cm^2')
33
33
}
@@ -51,7 +51,7 @@ def SetSiliconParameters(device, region):
51
51
52
52
##D. B. M. Klaassen, J. W. Slotboom, and H. C. de Graaff, "Unified apparent bandgap narrowing in n- and p-type Silicon," Solid-State Electronics, vol. 35, no. 2, pp. 125-29, 1992.
53
53
par = {
54
- 'Permittivity' : 11.1 * get_parameter (device = device , region = region , name = 'Permittivity_0' ),
54
+ 'Permittivity' : 11.1 * get_parameter (device = device , region = region , name = 'Permittivity_0' ),
55
55
'NC300' : 2.8e19 , # '1/cm^3'
56
56
'NV300' : 3.1e19 , # '1/cm^3'
57
57
'EG300' : 1.12 , # 'eV'
@@ -90,7 +90,7 @@ def SetSiliconParameters(device, region):
90
90
"n1" : 1e10 ,
91
91
"p1" : 1e10 ,
92
92
# TEMP
93
- # "T" : 300
93
+ # "T" : 300
94
94
}
95
95
96
96
for k , v in list (par .items ()):
@@ -101,7 +101,7 @@ def CreateQuasiFermiLevels(device, region, electron_model, hole_model, variables
101
101
Creates the models for the quasi-Fermi levels. Assuming Boltzmann statistics.
102
102
'''
103
103
eq = (
104
- ('EFN' , 'EC + V_t * log(%s/NC)' % electron_model , ('Potential' , 'Electrons' )),
104
+ ('EFN' , 'EC + V_t * log(%s/NC)' % electron_model , ('Potential' , 'Electrons' )),
105
105
('EFP' , 'EV - V_t * log(%s/NV)' % hole_model , ('Potential' , 'Holes' )),
106
106
)
107
107
for (model , equation , variable_list ) in eq :
@@ -118,16 +118,16 @@ def CreateDensityOfStates(device, region, variables):
118
118
Neglects Bandgap narrowing.
119
119
'''
120
120
eq = (
121
- ('NC' , 'NC300 * (T/300)^1.5' , ('T' ,)),
121
+ ('NC' , 'NC300 * (T/300)^1.5' , ('T' ,)),
122
122
('NV' , 'NV300 * (T/300)^1.5' , ('T' ,)),
123
- # ('NTOT', 'Donors + Acceptors', ()),
123
+ # ('NTOT', 'Donors + Acceptors', ()),
124
124
# Band Gap Narrowing
125
125
('DEG' , '0' , ()),
126
126
#('DEG', 'V0.BGN * (log(NTOT/N0.BGN) + ((log(NTOT/N0.BGN)^2 + CON.BGN)^(0.5)))', ()),
127
127
('EG' , 'EG300 + EGALPH*((300^2)/(300+EGBETA) - (T^2)/(T+EGBETA)) - DEG' , ('T' )),
128
128
('NIE' , '((NC * NV)^0.5) * exp(-EG/(2*V_t))*exp(DEG)' , ('T' )),
129
129
('EC' , '-Potential - Affinity - DEG/2' , ('Potential' ,)),
130
- # ('EV', 'Potential', ('Potential', 'T')),
130
+ # ('EV', 'Potential', ('Potential', 'T')),
131
131
('EV' , 'EC - EG' , ('Potential' , 'T' )),
132
132
('EI' , '0.5 * (EC + EV + V_t*log(NC/NV))' , ('Potential' , 'T' )),
133
133
)
@@ -145,7 +145,7 @@ def CreateBandEdgeModels(device, region, variables):
145
145
# TODO; remember derivatives for these models
146
146
147
147
eq = (
148
- ('EN' , 'EC + Le' , ('Potential' , 'T' , 'Le' )),
148
+ ('EN' , 'EC + Le' , ('Potential' , 'T' , 'Le' )),
149
149
('EP' , 'EV - Lh' , ('Potential' , 'T' , 'Lh' )),
150
150
)
151
151
@@ -164,7 +164,7 @@ def CreateBandEdgeModels(device, region, variables):
164
164
edge_from_node_model (device = device , region = region , node_model = "Lh" )
165
165
166
166
eeq = (
167
- ('ECdiff' , '(Potential@n0-Potential@n1) + 0.5*(DEG@n0-DEG@n1)' , ('T' ,)),
167
+ ('ECdiff' , '(Potential@n0-Potential@n1) + 0.5*(DEG@n0-DEG@n1)' , ('T' ,)),
168
168
('EVdiff' , 'kahan3(ECdiff, (EG@n0-EG@n1), 0.5*(DEG@n1-DEG@n0))' , ('T' ,)),
169
169
('ECdiff:Potential@n0' , '1' , ()),
170
170
('ECdiff:Potential@n1' , '-1' , ()),
@@ -220,9 +220,9 @@ def CreateEField(device, region):
220
220
Creates the EField and DField.
221
221
'''
222
222
edge_average_model (device = device , region = region , node_model = "Potential" ,
223
- edge_model = "EField" , average_type = "negative_gradient" )
223
+ edge_model = "EField" , average_type = "negative_gradient" )
224
224
edge_average_model (device = device , region = region , node_model = "Potential" ,
225
- edge_model = "EField" , average_type = "negative_gradient" , derivative = "Potential" )
225
+ edge_model = "EField" , average_type = "negative_gradient" , derivative = "Potential" )
226
226
227
227
def CreateDField (device , region ):
228
228
CreateEdgeModel (device , region , "DField" , "Permittivity * EField" )
@@ -242,11 +242,11 @@ def CreateSiliconPotentialOnly(device, region):
242
242
243
243
# require NetDoping
244
244
for i in (
245
- ("IntrinsicElectrons" , "NIE*exp(ifelse(((Potential-Le)/V_t) < 80, ((Potential-Le)/V_t), 80))" ),
245
+ ("IntrinsicElectrons" , "NIE*exp(ifelse(((Potential-Le)/V_t) < 80, ((Potential-Le)/V_t), 80))" ),
246
246
("IntrinsicHoles" , "NIE*exp(ifelse(((-Potential-Lh)/V_t) < 80, ((-Potential-Lh)/V_t), 80))" ),
247
247
("IntrinsicCharge" , "kahan3(IntrinsicHoles, -IntrinsicElectrons, NetDoping)" ),
248
248
("PotentialIntrinsicCharge" , "-q * IntrinsicCharge" )
249
- ):
249
+ ):
250
250
n = i [0 ]
251
251
e = i [1 ]
252
252
CreateNodeModel (device , region , n , e )
@@ -284,14 +284,14 @@ def CreateSiliconPotentialOnlyContact(device, region, contact, is_circuit=False)
284
284
285
285
if is_circuit :
286
286
contact_equation (device = device , contact = contact , name = "PotentialEquation" , variable_name = "Potential" ,
287
- node_model = contact_model_name , edge_model = "" ,
288
- node_charge_model = "contactcharge_node" , edge_charge_model = "DField" ,
289
- node_current_model = "" , edge_current_model = "" , circuit_node = GetContactBiasName (contact ))
287
+ node_model = contact_model_name , edge_model = "" ,
288
+ node_charge_model = "contactcharge_node" , edge_charge_model = "DField" ,
289
+ node_current_model = "" , edge_current_model = "" , circuit_node = GetContactBiasName (contact ))
290
290
else :
291
291
contact_equation (device = device , contact = contact , name = "PotentialEquation" , variable_name = "Potential" ,
292
- node_model = contact_model_name , edge_model = "" ,
293
- node_charge_model = "contactcharge_node" , edge_charge_model = "DField" ,
294
- node_current_model = "" , edge_current_model = "" )
292
+ node_model = contact_model_name , edge_model = "" ,
293
+ node_charge_model = "contactcharge_node" , edge_charge_model = "DField" ,
294
+ node_current_model = "" , edge_current_model = "" )
295
295
296
296
297
297
def CreateSRH (device , region , variables ):
@@ -322,8 +322,8 @@ def CreateECE(device, region, Jn):
322
322
CreateNodeModelDerivative (device , region , "NCharge" , NCharge , "Electrons" )
323
323
324
324
equation (device = device , region = region , name = "ElectronContinuityEquation" , variable_name = "Electrons" ,
325
- time_node_model = "NCharge" ,
326
- edge_model = Jn , variable_update = "positive" , node_model = "ElectronGeneration" )
325
+ time_node_model = "NCharge" ,
326
+ edge_model = Jn , variable_update = "positive" , node_model = "ElectronGeneration" )
327
327
328
328
def CreateHCE (device , region , Jp ):
329
329
'''
@@ -334,8 +334,8 @@ def CreateHCE(device, region, Jp):
334
334
CreateNodeModelDerivative (device , region , "PCharge" , PCharge , "Holes" )
335
335
336
336
equation (device = device , region = region , name = "HoleContinuityEquation" , variable_name = "Holes" ,
337
- time_node_model = "PCharge" ,
338
- edge_model = Jp , variable_update = "positive" , node_model = "HoleGeneration" )
337
+ time_node_model = "PCharge" ,
338
+ edge_model = Jp , variable_update = "positive" , node_model = "HoleGeneration" )
339
339
340
340
def CreatePE (device , region ):
341
341
'''
@@ -347,8 +347,8 @@ def CreatePE(device, region):
347
347
CreateNodeModelDerivative (device , region , "PotentialNodeCharge" , pne , "Holes" )
348
348
349
349
equation (device = device , region = region , name = "PotentialEquation" , variable_name = "Potential" ,
350
- node_model = "PotentialNodeCharge" , edge_model = "DField" ,
351
- time_node_model = "" , variable_update = "log_damp" )
350
+ node_model = "PotentialNodeCharge" , edge_model = "DField" ,
351
+ time_node_model = "" , variable_update = "log_damp" )
352
352
353
353
354
354
def CreateSiliconDriftDiffusion (device , region , mu_n = "mu_n" , mu_p = "mu_p" , Jn = 'Jn' , Jp = 'Jp' ):
@@ -385,21 +385,21 @@ def CreateSiliconDriftDiffusionContact(device, region, contact, Jn, Jp, is_circu
385
385
386
386
if is_circuit :
387
387
contact_equation (device = device , contact = contact , name = "ElectronContinuityEquation" , variable_name = "Electrons" ,
388
- node_model = contact_electrons_name ,
389
- edge_current_model = Jn , circuit_node = GetContactBiasName (contact ))
388
+ node_model = contact_electrons_name ,
389
+ edge_current_model = Jn , circuit_node = GetContactBiasName (contact ))
390
390
391
391
contact_equation (device = device , contact = contact , name = "HoleContinuityEquation" , variable_name = "Holes" ,
392
- node_model = contact_holes_name ,
393
- edge_current_model = Jp , circuit_node = GetContactBiasName (contact ))
392
+ node_model = contact_holes_name ,
393
+ edge_current_model = Jp , circuit_node = GetContactBiasName (contact ))
394
394
395
395
else :
396
396
contact_equation (device = device , contact = contact , name = "ElectronContinuityEquation" , variable_name = "Electrons" ,
397
- node_model = contact_electrons_name ,
398
- edge_current_model = Jn )
397
+ node_model = contact_electrons_name ,
398
+ edge_current_model = Jn )
399
399
400
400
contact_equation (device = device , contact = contact , name = "HoleContinuityEquation" , variable_name = "Holes" ,
401
- node_model = contact_holes_name ,
402
- edge_current_model = Jp )
401
+ node_model = contact_holes_name ,
402
+ edge_current_model = Jp )
403
403
404
404
405
405
def CreateBernoulliString (Potential = "Potential" , scaling_variable = "V_t" , sign = - 1 ):
@@ -416,7 +416,7 @@ def CreateBernoulliString (Potential="Potential", scaling_variable="V_t", sign=-
416
416
'''
417
417
418
418
tdict = {
419
- "Potential" : Potential ,
419
+ "Potential" : Potential ,
420
420
"V_t" : scaling_variable
421
421
}
422
422
#### test for requisite models here
@@ -451,7 +451,7 @@ def CreateElectronCurrent(device, region, mu_n, Potential="Potential", sign=-1,
451
451
raise NameError ("Implement proper call" )
452
452
453
453
tdict = {
454
- 'Bern01' : Bern01 ,
454
+ 'Bern01' : Bern01 ,
455
455
'vdiff' : vdiff ,
456
456
'mu_n' : mu_n ,
457
457
'V_t' : V_t
@@ -482,7 +482,7 @@ def CreateHoleCurrent(device, region, mu_p, Potential="Potential", sign=-1, Hole
482
482
raise NameError ("Implement proper call for " + Potential )
483
483
484
484
tdict = {
485
- 'Bern01' : Bern01 ,
485
+ 'Bern01' : Bern01 ,
486
486
'vdiff' : vdiff ,
487
487
'mu_p' : mu_p ,
488
488
'V_t' : V_t
@@ -500,11 +500,11 @@ def CreateAroraMobilityLF(device, region):
500
500
Add T derivative dependence later
501
501
'''
502
502
models = (
503
- ('Tn' , 'T/300' ),
503
+ ('Tn' , 'T/300' ),
504
504
('mu_arora_n_node' ,
505
- 'MUMN * pow(Tn, MUMEN) + (MU0N * pow(T, MU0EN))/(1 + pow((NTOT/(NREFN*pow(Tn, NREFNE))), ALPHA0N*pow(Tn, ALPHAEN)))' ),
505
+ 'MUMN * pow(Tn, MUMEN) + (MU0N * pow(T, MU0EN))/(1 + pow((NTOT/(NREFN*pow(Tn, NREFNE))), ALPHA0N*pow(Tn, ALPHAEN)))' ),
506
506
('mu_arora_p_node' ,
507
- 'MUMP * pow(Tn, MUMEP) + (MU0P * pow(T, MU0EP))/(1 + pow((NTOT/(NREFP*pow(Tn, NREFPE))), ALPHA0P*pow(Tn, ALPHAEP)))' )
507
+ 'MUMP * pow(Tn, MUMEP) + (MU0P * pow(T, MU0EP))/(1 + pow((NTOT/(NREFP*pow(Tn, NREFPE))), ALPHA0P*pow(Tn, ALPHAEP)))' )
508
508
)
509
509
510
510
for k , v in models :
@@ -523,7 +523,7 @@ def CreateAroraMobilityLF(device, region):
523
523
CreateElectronCurrent (device , region , mu_n = 'mu_arora_n_lf' , Potential = "EN" , sign = 1 , ElectronCurrent = "Jn_arora_lf" , V_t = "V_t_edge" )
524
524
CreateHoleCurrent (device , region , mu_p = 'mu_arora_p_lf' , Potential = "EP" , sign = 1 , HoleCurrent = "Jp_arora_lf" , V_t = "V_t_edge" )
525
525
return {
526
- 'mu_n' : 'mu_arora_n_lf' ,
526
+ 'mu_n' : 'mu_arora_n_lf' ,
527
527
'mu_p' : 'mu_arora_p_lf' ,
528
528
'Jn' : 'Jn_arora_lf' ,
529
529
'Jp' : 'Jp_arora_lf' ,
@@ -538,24 +538,24 @@ def CreateHFMobility(device, region, mu_n, mu_p, Jn, Jp):
538
538
'''
539
539
540
540
tdict = {
541
- 'Jn' : Jn ,
541
+ 'Jn' : Jn ,
542
542
'mu_n' : mu_n ,
543
543
'Jp' : Jp ,
544
544
'mu_p' : mu_p
545
545
}
546
546
tlist = (
547
- ("vsat_n" , "VSATN0 * pow(T, VSATNE)" % tdict , ('T' )),
547
+ ("vsat_n" , "VSATN0 * pow(T, VSATNE)" % tdict , ('T' )),
548
548
("beta_n" , "BETAN0 * pow(T, BETANE)" % tdict , ('T' )),
549
549
("Epar_n" ,
550
- "ifelse((%(Jn)s * EField) > 0, abs(EField), 1e-15)" % tdict , ('Potential' )),
550
+ "ifelse((%(Jn)s * EField) > 0, abs(EField), 1e-15)" % tdict , ('Potential' )),
551
551
("mu_n" , "%(mu_n)s * pow(1 + pow((%(mu_n)s*Epar_n/vsat_n), beta_n), -1/beta_n)"
552
- % tdict , ('Electrons' , 'Holes' , 'Potential' , 'T' )),
552
+ % tdict , ('Electrons' , 'Holes' , 'Potential' , 'T' )),
553
553
("vsat_p" , "VSATP0 * pow(T, VSATPE)" % tdict , ('T' )),
554
554
("beta_p" , "BETAP0 * pow(T, BETAPE)" % tdict , ('T' )),
555
555
("Epar_p" ,
556
- "ifelse((%(Jp)s * EField) > 0, abs(EField), 1e-15)" % tdict , ('Potential' )),
556
+ "ifelse((%(Jp)s * EField) > 0, abs(EField), 1e-15)" % tdict , ('Potential' )),
557
557
("mu_p" , "%(mu_p)s * pow(1 + pow(%(mu_p)s*Epar_p/vsat_p, beta_p), -1/beta_p)"
558
- % tdict , ('Electrons' , 'Holes' , 'Potential' , 'T' )),
558
+ % tdict , ('Electrons' , 'Holes' , 'Potential' , 'T' )),
559
559
)
560
560
561
561
variable_list = ('Electrons' , 'Holes' , 'Potential' )
@@ -569,7 +569,7 @@ def CreateHFMobility(device, region, mu_n, mu_p, Jn, Jp):
569
569
CreateElectronCurrent (device , region , mu_n = 'mu_n' , Potential = "Potential" , sign = - 1 , ElectronCurrent = "Jn" , V_t = "V_t_edge" )
570
570
CreateHoleCurrent ( device , region , mu_p = 'mu_p' , Potential = "Potential" , sign = - 1 , HoleCurrent = "Jp" , V_t = "V_t_edge" )
571
571
return {
572
- 'mu_n' : 'mu_n' ,
572
+ 'mu_n' : 'mu_n' ,
573
573
'mu_p' : 'mu_p' ,
574
574
'Jn' : 'Jn' ,
575
575
'Jp' : 'Jp' ,
@@ -592,7 +592,7 @@ def CreateOxidePotentialOnly(device, region, update_type="default"):
592
592
CreateEdgeModel (device , region , "PotentialEdgeFlux" , dfield )
593
593
CreateEdgeModelDerivatives (device , region , "PotentialEdgeFlux" , dfield , "Potential" )
594
594
equation (device = device , region = region , name = "PotentialEquation" , variable_name = "Potential" ,
595
- edge_model = "PotentialEdgeFlux" , variable_update = update_type )
595
+ edge_model = "PotentialEdgeFlux" , variable_update = update_type )
596
596
597
597
598
598
def CreateSiliconOxideInterface (device , interface ):
@@ -618,7 +618,7 @@ def CreateOxideContact(device, region, contact):
618
618
CreateEdgeModelDerivatives (device , region , contactcharge_edge , "Permittivity*EField" , "Potential" )
619
619
620
620
contact_equation (device = device , contact = contact , name = "PotentialEquation" , variable_name = "Potential" ,
621
- node_model = contact_model_name , edge_charge_model = contactcharge_edge )
621
+ node_model = contact_model_name , edge_charge_model = contactcharge_edge )
622
622
623
623
624
624
0 commit comments