Resistor example (1D): Difference between revisions

From Flooxs
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
This example shows how to create and simulate a simple 1D n-type resistor. After creating a 1D structure, we plot the output current as an external bias is applied. Once you run and understand this example, you should study the [[PN Diode example (1D)|1D p-n diode]] and the [[Resistor example (2D)|2D resistor]].
This example shows how to create and simulate a simple 1D n-type resistor. After creating a 1D structure, we plot the output current as an external bias is applied. Once you run and understand this example, you should study the [[PN Diode example (1D)]] and the [[Resistor example (2D)]].





Revision as of 19:27, 15 September 2008

This example shows how to create and simulate a simple 1D n-type resistor. After creating a 1D structure, we plot the output current as an external bias is applied. Once you run and understand this example, you should study the PN Diode example (1D) and the Resistor example (2D).


Define solution variables

DevicePackage
solution name=Potential nosolve
solution add name=DevPsi solve negative 
solution add name=Elec solve !negative
solution add name=Hole solve !negative

Create 1D struture

line x loc=0.0 spac=0.01 tag=Top
line x loc=1.0 spac=0.01 tag=Bottom
region silicon xlo=Top xhi=Bottom
init

Create contacts

contact name=VSS silicon xlo=-0.1 xhi=0.1 add
contact name=GND silicon xlo=0.9 xhi=1.1 add
contact name=VSS voltage supply=0.0
contact name=GND voltage supply=0.0

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

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

set Win [CreateGraphWindow]
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])]
	AddtoLine $Win I $bias $cur
}

Notes

This deck was successfully run by Daniel on 9/15/08 using TEC ~flooxs/linux64