Resistor example (2D): Difference between revisions
No edit summary |
|||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
This example builds upon the [[resistor example (1D)|1D resistor example]]. After creating a 2D structure, we plot the structure and contacts. Once you run and understand this example, you should study the [[PN diode example (2D)|2D p-n diode]] | This example builds upon the [[resistor example (1D)|1D resistor example]]. For ease of comparison, new code snippets are highlighted below with '''bold font''' After creating a 2D structure, we plot the structure and contacts. Once you run and understand this example, you should study the [[PN diode example (2D)|2D p-n diode]]. | ||
== New Concepts == | |||
* adding another dimension to the structure | |||
* viewing the 2D grid. | |||
== 2D PN Diode Deck == | |||
Define solution variables | Define solution variables | ||
DevicePackage | DevicePackage | ||
solution add name=DevPsi solve negative | solution add name=DevPsi solve negative | ||
solution add name=Elec solve !negative | solution add name=Elec solve !negative | ||
Line 12: | Line 15: | ||
line x loc=0.0 spac=0.01 tag=Top | line x loc=0.0 spac=0.01 tag=Top | ||
line x loc=1.0 spac=0.01 tag=Bottom | line x loc=1.0 spac=0.01 tag=Bottom | ||
'''line y loc=0.0 spac=0.01 tag=Left | '''line y loc=0.0 spac=0.01 tag=Left''' | ||
line y loc=0.2 spac=0.01 tag=Right''' | '''line y loc=0.2 spac=0.01 tag=Right''' | ||
region silicon xlo=Top xhi=Bottom ylo=Left yhi=Right | region silicon xlo=Top xhi=Bottom ylo=Left yhi=Right | ||
init | init | ||
Line 24: | Line 27: | ||
Plot structure and contacts. The !cle allows features to be added to the current graphic. | Plot structure and contacts. The !cle allows features to be added to the current graphic. | ||
'''plot.2d grid | '''plot.2d bound''' | ||
plot.2d contact=VSS !cle | '''plot.2d grid !cle''' | ||
plot.2d contact=GND !cle''' | '''plot.2d contact=VSS !cle''' | ||
'''plot.2d contact=GND !cle''' | |||
Define constants | Define constants | ||
Line 83: | Line 87: | ||
Run DC simulation and plot the current output vs. the source voltage | Run DC simulation and plot the current output vs. the source voltage | ||
window | |||
set bias 0.0 | set bias 0.0 | ||
for {set bias 0.0} {$bias < 1.01} {set bias [expr $bias+0.1]} { | for {set bias 0.0} {$bias < 1.01} {set bias [expr $bias+0.1]} { | ||
contact name=VSS supply = $bias | |||
device | |||
set cur [expr abs([contact name=VSS sol=Elec flux] - [contact name=VSS sol=Hole flux])] | |||
chart graph=IV curve=IV xval=$bias yval=$cur | |||
} | } | ||
== Full Deck == | |||
The full deck for easy copy-pasting to a file is located here. | |||
== Notes == | == Notes == | ||
This deck was successfully run by Daniel on 9/15/08 using TEC ~flooxs/linux64 | This deck was successfully run by Daniel on 9/15/08 using TEC ~flooxs/linux64 |
Latest revision as of 14:23, 12 March 2019
This example builds upon the 1D resistor example. For ease of comparison, new code snippets are highlighted below with bold font After creating a 2D structure, we plot the structure and contacts. Once you run and understand this example, you should study the 2D p-n diode.
New Concepts
- adding another dimension to the structure
- viewing the 2D grid.
2D PN Diode Deck
Define solution variables
DevicePackage solution add name=DevPsi solve negative solution add name=Elec solve !negative solution add name=Hole solve !negative
Create 2D structure
line x loc=0.0 spac=0.01 tag=Top line x loc=1.0 spac=0.01 tag=Bottom line y loc=0.0 spac=0.01 tag=Left line y loc=0.2 spac=0.01 tag=Right region silicon xlo=Top xhi=Bottom ylo=Left yhi=Right init
Create contacts
contact name=VSS silicon xlo=-0.1 xhi=0.0 add contact name=GND silicon xlo=1.0 xhi=1.1 add contact name=VSS voltage supply=0.0 contact name=GND voltage supply=0.0
Plot structure and contacts. The !cle allows features to be added to the current graphic.
plot.2d bound plot.2d grid !cle plot.2d contact=VSS !cle plot.2d contact=GND !cle
Define constants
set T 300 set k 1.38066e-23 set q 1.619e-19 set Vt [expr {$k*$T/$q}] set ni 1.1e10 set esi [expr 11.8 * 8.85418e-14] set eps [expr $esi / $q] set Emob 350.0 set Hmob 150.0
Define Poisson's solution and continuity equations
set eqnP "$eps * grad(DevPsi) + Doping - Elec + Hole" set eqnE "ddt(Elec) - ($Emob) * $Vt * sgrad(Elec, DevPsi/$Vt)" set eqnH "ddt(Hole) - ($Hmob) * $Vt * sgrad(Hole, -DevPsi/$Vt)" pdbSetDouble Si DevPsi DampValue $Vt pdbSetString Si DevPsi Equation $eqnP pdbSetString Si Elec Equation $eqnE pdbSetString Si Hole Equation $eqnH
Doping profile, n-type resistor
sel z=1.0e19 name=ND sel z=1.0e15 name=NA sel z=ND-NA name=Doping
Define ohmic contact equations
proc ohmic.contact {Contact} { set vt 0.02558357 set ni 1.1e10 pdbSetBoolean $Contact Elec Flux 1 pdbSetBoolean $Contact Hole Flux 1 pdbSetBoolean $Contact DevPsi Flux 1 pdbSetBoolean $Contact Elec Fixed 1 pdbSetBoolean $Contact Hole Fixed 1 pdbSetBoolean $Contact DevPsi Fixed 1 pdbSetDouble $Contact Elec Flux.Scale 1.619e-19 pdbSetDouble $Contact Hole Flux.Scale 1.619e-19 pdbSetString $Contact DevPsi Equation "ND - NA - Elec + Hole" pdbSetString $Contact Elec Equation "DevPsi - $vt*log((Elec)/$ni) -$Contact" pdbSetString $Contact Hole Equation "DevPsi + $vt*log((Hole)/$ni) -$Contact" } ohmic.contact VSS ohmic.contact GND
Initial guess procedure, assumes charge neutrality
proc InitialGuess {Doping} { sel z= {(Doping>0.0) ? ( 0.025*log( (Doping+1.0e10) / 1.0e10)) : (-0.025*log(-(Doping+1.0e10) / 1.0e10))} name = DevPsi sel z=1.0e10*exp(DevPsi/0.025) name=Elec sel z=1.0e10*exp(-DevPsi/0.025) name=Hole } InitialGuess Doping
Run DC simulation and plot the current output vs. the source voltage
window set bias 0.0 for {set bias 0.0} {$bias < 1.01} {set bias [expr $bias+0.1]} { contact name=VSS supply = $bias device set cur [expr abs([contact name=VSS sol=Elec flux] - [contact name=VSS sol=Hole flux])] chart graph=IV curve=IV xval=$bias yval=$cur }
Full Deck
The full deck for easy copy-pasting to a file is located here.
Notes
This deck was successfully run by Daniel on 9/15/08 using TEC ~flooxs/linux64