1717
1818def SetUniversalParameters (device , region ):
1919 universal = {
20- 'q' : 1.6e-19 , #, 'coul'),
20+ 'q' : 1.6e-19 , #, 'coul'),
2121 'k' : 1.3806503e-23 , #, 'J/K'),
2222 'Permittivity_0' : 8.85e-14 #, 'F/cm^2')
2323 }
@@ -35,7 +35,7 @@ def SetSiliconParameters(device, region):
3535
3636##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.
3737 par = {
38- 'Permittivity' : 11.1 * get_parameter (device = device , region = region , name = 'Permittivity_0' ),
38+ 'Permittivity' : 11.1 * get_parameter (device = device , region = region , name = 'Permittivity_0' ),
3939 'NC300' : 2.8e19 , # '1/cm^3'
4040 'NV300' : 3.1e19 , # '1/cm^3'
4141 'EG300' : 1.12 , # 'eV'
@@ -85,7 +85,7 @@ def CreateQuasiFermiLevels(device, region, electron_model, hole_model, variables
8585 Creates the models for the quasi-Fermi levels. Assuming Boltzmann statistics.
8686 '''
8787 eq = (
88- ('EFN' , 'EC + V_t * log(%s/NC)' % electron_model , ('Potential' , 'Electrons' )),
88+ ('EFN' , 'EC + V_t * log(%s/NC)' % electron_model , ('Potential' , 'Electrons' )),
8989 ('EFP' , 'EV - V_t * log(%s/NV)' % hole_model , ('Potential' , 'Holes' )),
9090 )
9191 for (model , equation , variable_list ) in eq :
@@ -102,7 +102,7 @@ def CreateDensityOfStates(device, region, variables):
102102 Neglects Bandgap narrowing.
103103 '''
104104 eq = (
105- ('NC' , 'NC300 * (T/300)^1.5' , ('T' ,)),
105+ ('NC' , 'NC300 * (T/300)^1.5' , ('T' ,)),
106106 ('NV' , 'NV300 * (T/300)^1.5' , ('T' ,)),
107107 ('NTOT' , 'Donors + Acceptors' , ()),
108108 # Band Gap Narrowing
@@ -148,9 +148,9 @@ def CreateEField(device, region):
148148 Creates the EField and DField.
149149 '''
150150 edge_average_model (device = device , region = region , node_model = "Potential" ,
151- edge_model = "EField" , average_type = "negative_gradient" )
151+ edge_model = "EField" , average_type = "negative_gradient" )
152152 edge_average_model (device = device , region = region , node_model = "Potential" ,
153- edge_model = "EField" , average_type = "negative_gradient" , derivative = "Potential" )
153+ edge_model = "EField" , average_type = "negative_gradient" , derivative = "Potential" )
154154
155155def CreateDField (device , region ):
156156 CreateEdgeModel (device , region , "DField" , "Permittivity * EField" )
@@ -170,11 +170,11 @@ def CreateSiliconPotentialOnly(device, region):
170170
171171 # require NetDoping
172172 for i in (
173- ("IntrinsicElectrons" , "NIE*exp(Potential/V_t)" ),
173+ ("IntrinsicElectrons" , "NIE*exp(Potential/V_t)" ),
174174 ("IntrinsicHoles" , "NIE^2/IntrinsicElectrons" ),
175175 ("IntrinsicCharge" , "kahan3(IntrinsicHoles, -IntrinsicElectrons, NetDoping)" ),
176176 ("PotentialIntrinsicCharge" , "-q * IntrinsicCharge" )
177- ):
177+ ):
178178 n = i [0 ]
179179 e = i [1 ]
180180 CreateNodeModel (device , region , n , e )
@@ -210,14 +210,14 @@ def CreateSiliconPotentialOnlyContact(device, region, contact, is_circuit=False)
210210
211211 if is_circuit :
212212 contact_equation (device = device , contact = contact , name = "PotentialEquation" , variable_name = "Potential" ,
213- node_model = contact_model_name , edge_model = "" ,
214- node_charge_model = "contactcharge_node" , edge_charge_model = "DField" ,
215- node_current_model = "" , edge_current_model = "" , circuit_node = GetContactBiasName (contact ))
213+ node_model = contact_model_name , edge_model = "" ,
214+ node_charge_model = "contactcharge_node" , edge_charge_model = "DField" ,
215+ node_current_model = "" , edge_current_model = "" , circuit_node = GetContactBiasName (contact ))
216216 else :
217217 contact_equation (device = device , contact = contact , name = "PotentialEquation" , variable_name = "Potential" ,
218- node_model = contact_model_name , edge_model = "" ,
219- node_charge_model = "contactcharge_node" , edge_charge_model = "DField" ,
220- node_current_model = "" , edge_current_model = "" )
218+ node_model = contact_model_name , edge_model = "" ,
219+ node_charge_model = "contactcharge_node" , edge_charge_model = "DField" ,
220+ node_current_model = "" , edge_current_model = "" )
221221
222222
223223def CreateSRH (device , region , variables ):
@@ -245,8 +245,8 @@ def CreateECE(device, region, Jn):
245245 CreateNodeModelDerivative (device , region , "NCharge" , NCharge , "Electrons" )
246246
247247 equation (device = device , region = region , name = "ElectronContinuityEquation" , variable_name = "Electrons" ,
248- time_node_model = "NCharge" ,
249- edge_model = Jn , variable_update = "positive" , node_model = "ElectronGeneration" )
248+ time_node_model = "NCharge" ,
249+ edge_model = Jn , variable_update = "positive" , node_model = "ElectronGeneration" )
250250
251251def CreateHCE (device , region , Jp ):
252252 '''
@@ -257,8 +257,8 @@ def CreateHCE(device, region, Jp):
257257 CreateNodeModelDerivative (device , region , "PCharge" , PCharge , "Holes" )
258258
259259 equation (device = device , region = region , name = "HoleContinuityEquation" , variable_name = "Holes" ,
260- time_node_model = "PCharge" ,
261- edge_model = Jp , variable_update = "positive" , node_model = "HoleGeneration" )
260+ time_node_model = "PCharge" ,
261+ edge_model = Jp , variable_update = "positive" , node_model = "HoleGeneration" )
262262
263263def CreatePE (device , region ):
264264 '''
@@ -270,8 +270,8 @@ def CreatePE(device, region):
270270 CreateNodeModelDerivative (device , region , "PotentialNodeCharge" , pne , "Holes" )
271271
272272 equation (device = device , region = region , name = "PotentialEquation" , variable_name = "Potential" ,
273- node_model = "PotentialNodeCharge" , edge_model = "DField" ,
274- time_node_model = "" , variable_update = "log_damp" )
273+ node_model = "PotentialNodeCharge" , edge_model = "DField" ,
274+ time_node_model = "" , variable_update = "log_damp" )
275275
276276
277277def CreateSiliconDriftDiffusion (device , region , mu_n = "mu_n" , mu_p = "mu_p" , Jn = 'Jn' , Jp = 'Jp' ):
@@ -308,21 +308,21 @@ def CreateSiliconDriftDiffusionContact(device, region, contact, Jn, Jp, is_circu
308308
309309 if is_circuit :
310310 contact_equation (device = device , contact = contact , name = "ElectronContinuityEquation" , variable_name = "Electrons" ,
311- node_model = contact_electrons_name ,
312- edge_current_model = Jn , circuit_node = GetContactBiasName (contact ))
311+ node_model = contact_electrons_name ,
312+ edge_current_model = Jn , circuit_node = GetContactBiasName (contact ))
313313
314314 contact_equation (device = device , contact = contact , name = "HoleContinuityEquation" , variable_name = "Holes" ,
315- node_model = contact_holes_name ,
316- edge_current_model = Jp , circuit_node = GetContactBiasName (contact ))
315+ node_model = contact_holes_name ,
316+ edge_current_model = Jp , circuit_node = GetContactBiasName (contact ))
317317
318318 else :
319319 contact_equation (device = device , contact = contact , name = "ElectronContinuityEquation" , variable_name = "Electrons" ,
320- node_model = contact_electrons_name ,
321- edge_current_model = Jn )
320+ node_model = contact_electrons_name ,
321+ edge_current_model = Jn )
322322
323323 contact_equation (device = device , contact = contact , name = "HoleContinuityEquation" , variable_name = "Holes" ,
324- node_model = contact_holes_name ,
325- edge_current_model = Jp )
324+ node_model = contact_holes_name ,
325+ edge_current_model = Jp )
326326
327327
328328def CreateBernoulliString (Potential = "Potential" , scaling_variable = "V_t" , sign = - 1 ):
@@ -339,7 +339,7 @@ def CreateBernoulliString (Potential="Potential", scaling_variable="V_t", sign=-
339339 '''
340340
341341 tdict = {
342- "Potential" : Potential ,
342+ "Potential" : Potential ,
343343 "V_t" : scaling_variable
344344 }
345345 #### test for requisite models here
@@ -369,7 +369,7 @@ def CreateElectronCurrent(device, region, mu_n, Potential="Potential", sign=-1,
369369 raise NameError ("Implement proper call" )
370370
371371 tdict = {
372- 'Bern01' : Bern01 ,
372+ 'Bern01' : Bern01 ,
373373 'vdiff' : vdiff ,
374374 'mu_n' : mu_n ,
375375 'V_t' : V_t
@@ -395,7 +395,7 @@ def CreateHoleCurrent(device, region, mu_p, Potential="Potential", sign=-1, Hole
395395 raise NameError ("Implement proper call for " + Potential )
396396
397397 tdict = {
398- 'Bern01' : Bern01 ,
398+ 'Bern01' : Bern01 ,
399399 'vdiff' : vdiff ,
400400 'mu_p' : mu_p ,
401401 'V_t' : V_t
@@ -413,11 +413,11 @@ def CreateAroraMobilityLF(device, region):
413413 Add T derivative dependence later
414414 '''
415415 models = (
416- ('Tn' , 'T/300' ),
416+ ('Tn' , 'T/300' ),
417417 ('mu_arora_n_node' ,
418- 'MUMN * pow(Tn, MUMEN) + (MU0N * pow(T, MU0EN))/(1 + pow((NTOT/(NREFN*pow(Tn, NREFNE))), ALPHA0N*pow(Tn, ALPHAEN)))' ),
418+ 'MUMN * pow(Tn, MUMEN) + (MU0N * pow(T, MU0EN))/(1 + pow((NTOT/(NREFN*pow(Tn, NREFNE))), ALPHA0N*pow(Tn, ALPHAEN)))' ),
419419 ('mu_arora_p_node' ,
420- 'MUMP * pow(Tn, MUMEP) + (MU0P * pow(T, MU0EP))/(1 + pow((NTOT/(NREFP*pow(Tn, NREFPE))), ALPHA0P*pow(Tn, ALPHAEP)))' )
420+ 'MUMP * pow(Tn, MUMEP) + (MU0P * pow(T, MU0EP))/(1 + pow((NTOT/(NREFP*pow(Tn, NREFPE))), ALPHA0P*pow(Tn, ALPHAEP)))' )
421421 )
422422
423423 for k , v in models :
@@ -427,7 +427,7 @@ def CreateAroraMobilityLF(device, region):
427427 CreateElectronCurrent (device , region , mu_n = 'mu_arora_n_lf' , Potential = "Potential" , sign = - 1 , ElectronCurrent = "Jn_arora_lf" , V_t = "V_t_edge" )
428428 CreateHoleCurrent (device , region , mu_p = 'mu_arora_p_lf' , Potential = "Potential" , sign = - 1 , HoleCurrent = "Jp_arora_lf" , V_t = "V_t_edge" )
429429 return {
430- 'mu_n' : 'mu_arora_n_lf' ,
430+ 'mu_n' : 'mu_arora_n_lf' ,
431431 'mu_p' : 'mu_arora_p_lf' ,
432432 'Jn' : 'Jn_arora_lf' ,
433433 'Jp' : 'Jp_arora_lf' ,
@@ -442,24 +442,24 @@ def CreateHFMobility(device, region, mu_n, mu_p, Jn, Jp):
442442 '''
443443
444444 tdict = {
445- 'Jn' : Jn ,
445+ 'Jn' : Jn ,
446446 'mu_n' : mu_n ,
447447 'Jp' : Jp ,
448448 'mu_p' : mu_p
449449 }
450450 tlist = (
451- ("vsat_n" , "VSATN0 * pow(T, VSATNE)" % tdict , ('T' )),
451+ ("vsat_n" , "VSATN0 * pow(T, VSATNE)" % tdict , ('T' )),
452452 ("beta_n" , "BETAN0 * pow(T, BETANE)" % tdict , ('T' )),
453453 ("Epar_n" ,
454- "ifelse((%(Jn)s * EField) > 0, abs(EField), 1e-15)" % tdict , ('Potential' )),
454+ "ifelse((%(Jn)s * EField) > 0, abs(EField), 1e-15)" % tdict , ('Potential' )),
455455 ("mu_n" , "%(mu_n)s * pow(1 + pow((%(mu_n)s*Epar_n/vsat_n), beta_n), -1/beta_n)"
456- % tdict , ('Electrons' , 'Holes' , 'Potential' , 'T' )),
456+ % tdict , ('Electrons' , 'Holes' , 'Potential' , 'T' )),
457457 ("vsat_p" , "VSATP0 * pow(T, VSATPE)" % tdict , ('T' )),
458458 ("beta_p" , "BETAP0 * pow(T, BETAPE)" % tdict , ('T' )),
459459 ("Epar_p" ,
460- "ifelse((%(Jp)s * EField) > 0, abs(EField), 1e-15)" % tdict , ('Potential' )),
460+ "ifelse((%(Jp)s * EField) > 0, abs(EField), 1e-15)" % tdict , ('Potential' )),
461461 ("mu_p" , "%(mu_p)s * pow(1 + pow(%(mu_p)s*Epar_p/vsat_p, beta_p), -1/beta_p)"
462- % tdict , ('Electrons' , 'Holes' , 'Potential' , 'T' )),
462+ % tdict , ('Electrons' , 'Holes' , 'Potential' , 'T' )),
463463 )
464464
465465 variable_list = ('Electrons' , 'Holes' , 'Potential' )
@@ -473,7 +473,7 @@ def CreateHFMobility(device, region, mu_n, mu_p, Jn, Jp):
473473 CreateElectronCurrent (device , region , mu_n = 'mu_n' , Potential = "Potential" , sign = - 1 , ElectronCurrent = "Jn" , V_t = "V_t_edge" )
474474 CreateHoleCurrent ( device , region , mu_p = 'mu_p' , Potential = "Potential" , sign = - 1 , HoleCurrent = "Jp" , V_t = "V_t_edge" )
475475 return {
476- 'mu_n' : 'mu_n' ,
476+ 'mu_n' : 'mu_n' ,
477477 'mu_p' : 'mu_p' ,
478478 'Jn' : 'Jn' ,
479479 'Jp' : 'Jp' ,
0 commit comments