Resistor example 1D - Ohmic contact procedure explanation

From Flooxs
Revision as of 21:43, 26 October 2010 by Nrowsey (talk | contribs) (New page: This page explains the following code snipped from the 1D Resistor example: Ohmic contact equations using a procedure proc OhmicContact {Contact} { global Vt ni Nd Na pdbSetBoo...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This page explains the following code snipped from the 1D Resistor example:

Ohmic contact equations using a procedure

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

proc - the tcl procedure

  • function or routine to accomplish repetetive tasks
  • $Contact = the contact name as an argument
  • global - because inside the proc, eveyrthing is local
  • calling the procedure

Ohmic Contact Physics

Contact equations are boundary conditions. These are necessary to find a specific solution to pde's.

  • fixed and flux
  • 3 equations for the 3 unknowns

- charge neutrality - Efp=$Contact - Efn=$Contact

Advanced

  • BEWARE: Do not use "solution const val=" variables in your contact Equation expressions. This is not relevant in the simple 1D resistor example, but keep it in mind for later.