Resistor example (1D): Difference between revisions

From Flooxs
Jump to navigation Jump to search
No edit summary
 
(19 intermediate revisions by 2 users not shown)
Line 1: Line 1:
DevicePackage
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)]].
solution name=Potential nosolve
 
solution add name=DevPsi solve negative
== New Concepts ==
solution add name=Elec solve !negative
* Creating a structure (i.e. grid) with 1 material
solution add name=Hole solve !negative
* Declaring the 3 basic device solution variables
* Declaring and using tcl variables (set, expr, $), and tcl procedures
* Using a constant dopant profile
* Storing "Equation" strings in the parameter database (pdb)
* Initial conditions, guesses, and solves
* "Ramping," i.e. consecutive DC solves


  line x loc=0.0 spac=0.01 tag=Top
== 1D Resistor Deck ==
  line x loc=1.0 spac=0.01 tag=Bottom
Create 1D struture - [[Resistor example 1D - Create 1D structure explanation | explanation]]
  region silicon xlo=Top xhi=Bottom
#Grid
  line x loc=0.0 spac=0.1 tag=Top
  line x loc=1.0 spac=0.1 tag=Bottom
mater add name=Silicon
  region Silicon xlo=Top xhi=Bottom
  init
  init
#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 silicon xlo=-0.1 xhi=0.1 add
Declare solution variables - [[Declare solution variables explanation | explanation]]
  contact name=GND silicon xlo=0.9 xhi=1.1 add
  DevicePackage
  contact name=VSS voltage supply=0.0
  solution add name=DevPsi pde solve negative damp
  contact name=GND voltage supply=0.0
  solution add name=Elec  pde solve !negative
 
  solution add name=Hole  pde solve !negative


  set T 300
Define constants - [[Resistor example 1D - Define constants explanation | explanation]]
  set T 300.0
  set k 1.38066e-23
  set k 1.38066e-23
  set q 1.619e-19
  set q 1.619e-19
Line 25: Line 39:
  set Emob 350.0
  set Emob 350.0
  set Hmob 150.0
  set Hmob 150.0
set small 1.0e-10
Ionized dopant profile - [[Resistor example 1D - Ionized dopant profile explanation | explanation]]
set Nd 1.0e19
set Na 1.0e15
set Doping [expr {$Nd-$Na}]


  set eqnP "$eps * grad(DevPsi) + Doping - Elec + Hole"
Bulk Equations - [[Resistor example 1D - Bulk Equations explanation | explanation]]
  set eqnP "$eps * grad(DevPsi) + $Doping - Elec + Hole"
  set eqnE "ddt(Elec) - ($Emob) * $Vt * sgrad(Elec, DevPsi/$Vt)"
  set eqnE "ddt(Elec) - ($Emob) * $Vt * sgrad(Elec, DevPsi/$Vt)"
  set eqnH "ddt(Hole) - ($Hmob) * $Vt * sgrad(Hole, -DevPsi/$Vt)"
  set eqnH "ddt(Hole) - ($Hmob) * $Vt * sgrad(Hole, -DevPsi/$Vt)"
pdbSetDouble Silicon DevPsi DampValue $Vt
pdbSetString Silicon DevPsi Equation $eqnP
pdbSetString Silicon Elec  Equation $eqnE
pdbSetString Silicon Hole  Equation $eqnH


pdbSetDouble Si DevPsi DampValue $Vt
Contact Equations - [[Resistor example 1D - Ohmic contact procedure explanation | explanation]]
pdbSetString Si DevPsi Equation $eqnP
  proc OhmicContact {Contact} {
pdbSetString Si Elec Equation $eqnE
    global Vt ni Nd Na
pdbSetString Si Hole Equation $eqnH
    pdbSetBoolean $Contact Elec Flux 1
 
    pdbSetBoolean $Contact Hole Flux 1
sel z=1.0e19 name=ND
    pdbSetBoolean $Contact DevPsi Flux 1
sel z=1.0e15 name=NA
    pdbSetBoolean $Contact Elec Fixed 1
sel z=ND-NA name=Doping
    pdbSetBoolean $Contact Hole Fixed 1
 
    pdbSetBoolean $Contact DevPsi Fixed 1
  proc ohmic.contact {Contact} {
    pdbSetDouble $Contact Elec Flux.Scale 1.619e-19
set vt 0.02558357
    pdbSetDouble $Contact Hole Flux.Scale 1.619e-19
set ni 1.1e10
    pdbSetString $Contact DevPsi Equation "$Nd - $Na - Elec + Hole"
pdbSetBoolean $Contact Elec Flux 1
    pdbSetString $Contact Elec Equation "DevPsi - $Vt*log((Elec)/$ni) -$Contact"
pdbSetBoolean $Contact Hole Flux 1
    pdbSetString $Contact Hole Equation "DevPsi + $Vt*log((Hole)/$ni) -$Contact"
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"
  }
  }
OhmicContact VSS
OhmicContact GND


  ohmic.contact VSS
Initial Conditions - [[Resistor example 1D - Initial conditions explanation | explanation]]
  ohmic.contact GND
#Bias Voltage on the Contacts
 
  contact name=VSS voltage supply=0.0
proc InitialGuess {Doping} {
  contact name=GND voltage supply=0.0
sel z= {(Doping>0.0)  
   
? ( 0.025*log( (Doping+1.0e10) / 1.0e10))
  #Initial Guess at Zero Bias
: (-0.025*log(-(Doping+1.0e10) / 1.0e10))} name = DevPsi
  sel z=($Vt*log(($Doping+$small)/$ni)) name=DevPsi
sel z=1.0e10*exp(DevPsi/0.025) name=Elec
sel z=$ni*exp(DevPsi/0.025) name=Elec
sel z=1.0e10*exp(-DevPsi/0.025) name=Hole
sel z=$ni*exp(-DevPsi/0.025) name=Hole
  }
   
  InitialGuess Doping
  #DC Solve at Zero Bias
 
device


set Win [CreateGraphWindow]
DC solve / plot I-V as output - [[Resistor example 1D - DC solve explanation | explanation]]
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]} {
Line 74: Line 93:
  device
  device
  set cur [expr abs([contact name=VSS sol=Elec flux] - [contact name=VSS sol=Hole flux])]
  set cur [expr abs([contact name=VSS sol=Elec flux] - [contact name=VSS sol=Hole flux])]
  AddtoLine $Win I $bias $cur
  chart graph=IV curve=IV xval=$bias yval=$cur
  }
  }
== Full Deck Without Explanations ==
Copy-paste [[Resistor example 1D - full deck | this entire deck]] into a file (for example, 1dres.tcl) to make running it easy. Use the [[Startup Script | startup script]] to alias your paths to the floods executable. Then, on the BASH and then flooxs command line type:
$ floods
flooxs> source 1dres.tcl
== Exercises ==
* This was an n-type resistor. Now make a p-type resistor.
* Read the [[Plotting Examples - new short version | plotting examples section]]. Use the plot.1d method to plot the electron and hole profiles on the same plot (Elec vs x and Hole vs x). Then use the [CreateGraphWindow] method to do the same thing.
* The [[PN diode example (1D) | 1D PN diode]] is next


== Notes ==
== Notes ==
This deck was successfully run by Daniel on 9/15/08 using TEC ~flooxs/linux64
This deck was successfully run by Nicole on 10/26/10 using TEC ~flooxs/linux64

Latest revision as of 14:19, 12 March 2019

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).

New Concepts

  • Creating a structure (i.e. grid) with 1 material
  • Declaring the 3 basic device solution variables
  • Declaring and using tcl variables (set, expr, $), and tcl procedures
  • Using a constant dopant profile
  • Storing "Equation" strings in the parameter database (pdb)
  • Initial conditions, guesses, and solves
  • "Ramping," i.e. consecutive DC solves

1D Resistor Deck

Create 1D struture - explanation

#Grid
line x loc=0.0 spac=0.1 tag=Top
line x loc=1.0 spac=0.1 tag=Bottom
mater add name=Silicon
region Silicon xlo=Top xhi=Bottom
init

#Contacts
contact name=VSS Silicon xlo=-0.1 xhi=0.1 add
contact name=GND Silicon xlo=0.9  xhi=1.1 add

Declare solution variables - explanation

DevicePackage
solution add name=DevPsi pde solve negative damp
solution add name=Elec   pde solve !negative
solution add name=Hole   pde solve !negative

Define constants - explanation

set T 300.0
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
set small 1.0e-10

Ionized dopant profile - explanation

set Nd 1.0e19
set Na 1.0e15
set Doping [expr {$Nd-$Na}]

Bulk Equations - explanation

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 Silicon DevPsi DampValue $Vt
pdbSetString Silicon DevPsi Equation $eqnP
pdbSetString Silicon Elec   Equation $eqnE
pdbSetString Silicon Hole   Equation $eqnH 

Contact Equations - explanation

proc OhmicContact {Contact} {
    global Vt ni Nd Na
    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"
}
OhmicContact VSS
OhmicContact GND

Initial Conditions - explanation

#Bias Voltage on the Contacts
contact name=VSS voltage supply=0.0
contact name=GND voltage supply=0.0

#Initial Guess at Zero Bias
sel z=($Vt*log(($Doping+$small)/$ni)) name=DevPsi
sel z=$ni*exp(DevPsi/0.025) name=Elec
sel z=$ni*exp(-DevPsi/0.025) name=Hole

#DC Solve at Zero Bias
device

DC solve / plot I-V as output - explanation

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 Without Explanations

Copy-paste this entire deck into a file (for example, 1dres.tcl) to make running it easy. Use the startup script to alias your paths to the floods executable. Then, on the BASH and then flooxs command line type:

$ floods
flooxs> source 1dres.tcl

Exercises

  • This was an n-type resistor. Now make a p-type resistor.
  • Read the plotting examples section. Use the plot.1d method to plot the electron and hole profiles on the same plot (Elec vs x and Hole vs x). Then use the [CreateGraphWindow] method to do the same thing.
  • The 1D PN diode is next

Notes

This deck was successfully run by Nicole on 10/26/10 using TEC ~flooxs/linux64