devsim 2.10.0__cp39-abi3-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- devsim/__init__.py +17 -0
- devsim/devsim_py3.pyd +0 -0
- devsim/python_packages/Klaassen.py +336 -0
- devsim/python_packages/__init__.py +0 -0
- devsim/python_packages/fermi_physics.py +31 -0
- devsim/python_packages/model_create.py +262 -0
- devsim/python_packages/mos_physics.py +170 -0
- devsim/python_packages/pythonmesh.py +131 -0
- devsim/python_packages/ramp.py +101 -0
- devsim/python_packages/simple_dd.py +75 -0
- devsim/python_packages/simple_physics.py +463 -0
- devsim/umfpack/umfpack_lgpl.dll +0 -0
- devsim/umfpack/umfpack_loader.py +517 -0
- devsim/umfpack/umfshim.py +116 -0
- devsim-2.10.0.data/data/devsim_data/BUILD.md +94 -0
- devsim-2.10.0.data/data/devsim_data/CHANGES.md +773 -0
- devsim-2.10.0.data/data/devsim_data/CITATION.md +23 -0
- devsim-2.10.0.data/data/devsim_data/CODE_OF_CONDUCT.md +74 -0
- devsim-2.10.0.data/data/devsim_data/CONTRIBUTING.md +43 -0
- devsim-2.10.0.data/data/devsim_data/HOWTO.md +27 -0
- devsim-2.10.0.data/data/devsim_data/INSTALL.md +65 -0
- devsim-2.10.0.data/data/devsim_data/README.md +97 -0
- devsim-2.10.0.data/data/devsim_data/TEST.md +13 -0
- devsim-2.10.0.data/data/devsim_data/doc/devsim.pdf +0 -0
- devsim-2.10.0.data/data/devsim_data/doc/symdiff.pdf +0 -0
- devsim-2.10.0.data/data/devsim_data/examples/bioapp1/Ve0.jpg +0 -0
- devsim-2.10.0.data/data/devsim_data/examples/bioapp1/Ve0_3d.jpg +0 -0
- devsim-2.10.0.data/data/devsim_data/examples/bioapp1/Ve7.jpg +0 -0
- devsim-2.10.0.data/data/devsim_data/examples/bioapp1/Ve7_3d.jpg +0 -0
- devsim-2.10.0.data/data/devsim_data/examples/bioapp1/bioapp1_2d.py +85 -0
- devsim-2.10.0.data/data/devsim_data/examples/bioapp1/bioapp1_3d.py +85 -0
- devsim-2.10.0.data/data/devsim_data/examples/bioapp1/bioapp1_common.py +399 -0
- devsim-2.10.0.data/data/devsim_data/examples/bioapp1/disk_2d.geo +62 -0
- devsim-2.10.0.data/data/devsim_data/examples/bioapp1/disk_2d.msh +65606 -0
- devsim-2.10.0.data/data/devsim_data/examples/bioapp1/disk_3d.geo +183 -0
- devsim-2.10.0.data/data/devsim_data/examples/bioapp1/disk_3d.msh +25808 -0
- devsim-2.10.0.data/data/devsim_data/examples/capacitance/cap.lay +1587 -0
- devsim-2.10.0.data/data/devsim_data/examples/capacitance/cap1d.py +155 -0
- devsim-2.10.0.data/data/devsim_data/examples/capacitance/cap2d.py +200 -0
- devsim-2.10.0.data/data/devsim_data/examples/diode/3dblock.geo +48 -0
- devsim-2.10.0.data/data/devsim_data/examples/diode/diode_1d.py +94 -0
- devsim-2.10.0.data/data/devsim_data/examples/diode/diode_1d_custom.py +159 -0
- devsim-2.10.0.data/data/devsim_data/examples/diode/diode_2d.py +68 -0
- devsim-2.10.0.data/data/devsim_data/examples/diode/diode_common.py +253 -0
- devsim-2.10.0.data/data/devsim_data/examples/diode/diode_current.lay +3271 -0
- devsim-2.10.0.data/data/devsim_data/examples/diode/diode_density.lay +3271 -0
- devsim-2.10.0.data/data/devsim_data/examples/diode/diode_potential.lay +3272 -0
- devsim-2.10.0.data/data/devsim_data/examples/diode/gmsh_diode2d.msh +1477 -0
- devsim-2.10.0.data/data/devsim_data/examples/diode/gmsh_diode2d.py +55 -0
- devsim-2.10.0.data/data/devsim_data/examples/diode/gmsh_diode3d.msh +8557 -0
- devsim-2.10.0.data/data/devsim_data/examples/diode/gmsh_diode3d.py +74 -0
- devsim-2.10.0.data/data/devsim_data/examples/diode/gmsh_diode3d_equil.py +43 -0
- devsim-2.10.0.data/data/devsim_data/examples/diode/gmsh_diode3d_float128.py +85 -0
- devsim-2.10.0.data/data/devsim_data/examples/diode/laux2d.py +43 -0
- devsim-2.10.0.data/data/devsim_data/examples/diode/laux3d.py +54 -0
- devsim-2.10.0.data/data/devsim_data/examples/diode/laux_common.py +503 -0
- devsim-2.10.0.data/data/devsim_data/examples/diode/pythonmesh3d.py +61 -0
- devsim-2.10.0.data/data/devsim_data/examples/diode/ssac_diode.py +57 -0
- devsim-2.10.0.data/data/devsim_data/examples/diode/tran_diode.py +63 -0
- devsim-2.10.0.data/data/devsim_data/examples/mobility/gmsh_mos2d.geo +160 -0
- devsim-2.10.0.data/data/devsim_data/examples/mobility/gmsh_mos2d.msh +8599 -0
- devsim-2.10.0.data/data/devsim_data/examples/mobility/gmsh_mos2d.py +96 -0
- devsim-2.10.0.data/data/devsim_data/examples/mobility/gmsh_mos2d_create.py +174 -0
- devsim-2.10.0.data/data/devsim_data/examples/mobility/gmsh_mos2d_kla.py +162 -0
- devsim-2.10.0.data/data/devsim_data/examples/mobility/logElectrons.lay +1327 -0
- devsim-2.10.0.data/data/devsim_data/examples/mobility/pythonmesh2d.py +100 -0
- devsim-2.10.0.data/data/devsim_data/examples/mobility/test.lay +3385 -0
- devsim-2.10.0.data/data/devsim_data/examples/mobility/times.txt +34 -0
- devsim-2.10.0.data/data/devsim_data/examples/plotting/visualization.ipynb +160 -0
- devsim-2.10.0.data/data/devsim_data/examples/symdiff/arrhenius.py +24 -0
- devsim-2.10.0.data/data/devsim_data/examples/symdiff/deftest.py +48 -0
- devsim-2.10.0.data/data/devsim_data/examples/symdiff/modellist1.py +9 -0
- devsim-2.10.0.data/data/devsim_data/examples/symdiff/models1.py +41 -0
- devsim-2.10.0.data/data/devsim_data/examples/symdiff/ordered.py +9 -0
- devsim-2.10.0.data/data/devsim_data/examples/symdiff/parsetest.py +107 -0
- devsim-2.10.0.data/data/devsim_data/examples/symdiff/remove1.py +8 -0
- devsim-2.10.0.data/data/devsim_data/examples/symdiff/subexpression1.py +10 -0
- devsim-2.10.0.data/data/devsim_data/examples/symdiff/table.py +7 -0
- devsim-2.10.0.data/data/devsim_data/examples/symdiff/undefined1.py +10 -0
- devsim-2.10.0.data/data/devsim_data/examples/symdiff/utf8.py +10 -0
- devsim-2.10.0.data/data/devsim_data/examples/vectorpotential/twowire.geo +34 -0
- devsim-2.10.0.data/data/devsim_data/examples/vectorpotential/twowire.lay +1469 -0
- devsim-2.10.0.data/data/devsim_data/examples/vectorpotential/twowire.msh +13596 -0
- devsim-2.10.0.data/data/devsim_data/examples/vectorpotential/twowire.py +177 -0
- devsim-2.10.0.data/data/devsim_data/setup.cfg +23 -0
- devsim-2.10.0.data/data/devsim_data/setup.py +58 -0
- devsim-2.10.0.data/data/devsim_data/testing/3dtetmesh.msh +281 -0
- devsim-2.10.0.data/data/devsim_data/testing/CMakeLists.txt +175 -0
- devsim-2.10.0.data/data/devsim_data/testing/Fermi1.py +59 -0
- devsim-2.10.0.data/data/devsim_data/testing/Fermi1_float128.py +18 -0
- devsim-2.10.0.data/data/devsim_data/testing/GaussFermi.py +38 -0
- devsim-2.10.0.data/data/devsim_data/testing/GaussFermi_float128.py +18 -0
- devsim-2.10.0.data/data/devsim_data/testing/cap2.py +439 -0
- devsim-2.10.0.data/data/devsim_data/testing/cap_mesh.py +33 -0
- devsim-2.10.0.data/data/devsim_data/testing/circ1.py +79 -0
- devsim-2.10.0.data/data/devsim_data/testing/circ2.py +79 -0
- devsim-2.10.0.data/data/devsim_data/testing/circ3.py +18 -0
- devsim-2.10.0.data/data/devsim_data/testing/circ4.py +105 -0
- devsim-2.10.0.data/data/devsim_data/testing/dio2_element_2d.py +136 -0
- devsim-2.10.0.data/data/devsim_data/testing/dio2_element_physics.py +302 -0
- devsim-2.10.0.data/data/devsim_data/testing/equation1.py +68 -0
- devsim-2.10.0.data/data/devsim_data/testing/erf1.py +52 -0
- devsim-2.10.0.data/data/devsim_data/testing/erf2.py +34 -0
- devsim-2.10.0.data/data/devsim_data/testing/fpetest1.py +21 -0
- devsim-2.10.0.data/data/devsim_data/testing/fpetest2.py +25 -0
- devsim-2.10.0.data/data/devsim_data/testing/gmsh_mos3d.geo +272 -0
- devsim-2.10.0.data/data/devsim_data/testing/info.py +11 -0
- devsim-2.10.0.data/data/devsim_data/testing/kahan.py +24 -0
- devsim-2.10.0.data/data/devsim_data/testing/kahan_float128.py +18 -0
- devsim-2.10.0.data/data/devsim_data/testing/laux1.py +232 -0
- devsim-2.10.0.data/data/devsim_data/testing/mctest.mc +30 -0
- devsim-2.10.0.data/data/devsim_data/testing/mctest_user.mc +33 -0
- devsim-2.10.0.data/data/devsim_data/testing/mesh1.msh +52 -0
- devsim-2.10.0.data/data/devsim_data/testing/mesh1.py +121 -0
- devsim-2.10.0.data/data/devsim_data/testing/mesh2.msh +70 -0
- devsim-2.10.0.data/data/devsim_data/testing/mesh2.py +210 -0
- devsim-2.10.0.data/data/devsim_data/testing/mesh2d.py +105 -0
- devsim-2.10.0.data/data/devsim_data/testing/mesh3.py +8 -0
- devsim-2.10.0.data/data/devsim_data/testing/mesh4.py +8 -0
- devsim-2.10.0.data/data/devsim_data/testing/mos_2d.py +111 -0
- devsim-2.10.0.data/data/devsim_data/testing/mos_2d_create.py +207 -0
- devsim-2.10.0.data/data/devsim_data/testing/mos_2d_restart.py +69 -0
- devsim-2.10.0.data/data/devsim_data/testing/mos_2d_restart2.py +24 -0
- devsim-2.10.0.data/data/devsim_data/testing/noise_res.py +51 -0
- devsim-2.10.0.data/data/devsim_data/testing/noise_res_2d.py +101 -0
- devsim-2.10.0.data/data/devsim_data/testing/ptest1.py +53 -0
- devsim-2.10.0.data/data/devsim_data/testing/ptest2.py +110 -0
- devsim-2.10.0.data/data/devsim_data/testing/pythonmesh1d.py +202 -0
- devsim-2.10.0.data/data/devsim_data/testing/res1.py +65 -0
- devsim-2.10.0.data/data/devsim_data/testing/res2.py +65 -0
- devsim-2.10.0.data/data/devsim_data/testing/res3.py +59 -0
- devsim-2.10.0.data/data/devsim_data/testing/rundifftest.py +62 -0
- devsim-2.10.0.data/data/devsim_data/testing/ssac_cap.py +145 -0
- devsim-2.10.0.data/data/devsim_data/testing/ssac_cap_2d_edge.py +199 -0
- devsim-2.10.0.data/data/devsim_data/testing/ssac_cap_2d_element.py +214 -0
- devsim-2.10.0.data/data/devsim_data/testing/ssac_cap_3d_edge.py +148 -0
- devsim-2.10.0.data/data/devsim_data/testing/ssac_cap_3d_element.py +167 -0
- devsim-2.10.0.data/data/devsim_data/testing/ssac_circ.py +18 -0
- devsim-2.10.0.data/data/devsim_data/testing/ssac_res.py +30 -0
- devsim-2.10.0.data/data/devsim_data/testing/symdiff1.py +54 -0
- devsim-2.10.0.data/data/devsim_data/testing/test_common.py +435 -0
- devsim-2.10.0.data/data/devsim_data/testing/testfunc.py +65 -0
- devsim-2.10.0.data/data/devsim_data/testing/testfunc_extended.py +8 -0
- devsim-2.10.0.data/data/devsim_data/testing/transient_circ.py +67 -0
- devsim-2.10.0.data/data/devsim_data/testing/transient_circ2.py +67 -0
- devsim-2.10.0.data/data/devsim_data/testing/transient_circ3.py +125 -0
- devsim-2.10.0.data/data/devsim_data/testing/transient_rc.py +157 -0
- devsim-2.10.0.data/data/devsim_data/testing/trimesh1.msh +47 -0
- devsim-2.10.0.data/data/devsim_data/testing/trimesh1.py +114 -0
- devsim-2.10.0.data/data/devsim_data/testing/trimesh2.py +114 -0
- devsim-2.10.0.data/data/devsim_data/testing/utf8_2.py +126 -0
- devsim-2.10.0.dist-info/METADATA +121 -0
- devsim-2.10.0.dist-info/RECORD +157 -0
- devsim-2.10.0.dist-info/WHEEL +5 -0
- devsim-2.10.0.dist-info/licenses/LICENSE +202 -0
- devsim-2.10.0.dist-info/licenses/NOTICE +241 -0
- devsim-2.10.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,463 @@
|
|
|
1
|
+
# Copyright 2013 DEVSIM LLC
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
|
|
5
|
+
from .simple_dd import CreateBernoulli, CreateElectronCurrent, CreateHoleCurrent
|
|
6
|
+
from .model_create import (
|
|
7
|
+
CreateSolution,
|
|
8
|
+
CreateNodeModel,
|
|
9
|
+
CreateNodeModelDerivative,
|
|
10
|
+
CreateContactNodeModel,
|
|
11
|
+
CreateContactNodeModelDerivative,
|
|
12
|
+
CreateEdgeModel,
|
|
13
|
+
CreateEdgeModelDerivatives,
|
|
14
|
+
CreateContinuousInterfaceModel,
|
|
15
|
+
InEdgeModelList,
|
|
16
|
+
InNodeModelList,
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
from devsim import (
|
|
20
|
+
contact_equation,
|
|
21
|
+
equation,
|
|
22
|
+
get_contact_current,
|
|
23
|
+
get_parameter,
|
|
24
|
+
interface_equation,
|
|
25
|
+
set_parameter,
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
contactcharge_edge = "contactcharge_edge"
|
|
29
|
+
ece_name = "ElectronContinuityEquation"
|
|
30
|
+
hce_name = "HoleContinuityEquation"
|
|
31
|
+
celec_model = "(1e-10 + 0.5*abs(NetDoping+(NetDoping^2 + 4 * n_i^2)^(0.5)))"
|
|
32
|
+
chole_model = "(1e-10 + 0.5*abs(-NetDoping+(NetDoping^2 + 4 * n_i^2)^(0.5)))"
|
|
33
|
+
|
|
34
|
+
q = 1.6e-19 # coul
|
|
35
|
+
k = 1.3806503e-23 # J/K
|
|
36
|
+
eps_0 = 8.85e-14 # F/cm^2
|
|
37
|
+
# T = 300 # K
|
|
38
|
+
eps_si = 11.1
|
|
39
|
+
eps_ox = 3.9
|
|
40
|
+
# TODO: make this temperature dependent
|
|
41
|
+
n_i = 1.0e10 # #/cm^3
|
|
42
|
+
# constant in our approximation
|
|
43
|
+
mu_n = 400
|
|
44
|
+
mu_p = 200
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def GetContactBiasName(contact):
|
|
48
|
+
return "{0}_bias".format(contact)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def GetContactNodeModelName(contact):
|
|
52
|
+
return "{0}nodemodel".format(contact)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def PrintCurrents(device, contact):
|
|
56
|
+
"""
|
|
57
|
+
print out contact currents
|
|
58
|
+
"""
|
|
59
|
+
# TODO add charge
|
|
60
|
+
_contact_bias_name = GetContactBiasName(contact)
|
|
61
|
+
electron_current = get_contact_current(
|
|
62
|
+
device=device, contact=contact, equation=ece_name
|
|
63
|
+
)
|
|
64
|
+
hole_current = get_contact_current(
|
|
65
|
+
device=device, contact=contact, equation=hce_name
|
|
66
|
+
)
|
|
67
|
+
total_current = electron_current + hole_current
|
|
68
|
+
voltage = get_parameter(device=device, name=GetContactBiasName(contact))
|
|
69
|
+
print(
|
|
70
|
+
"{0}\t{1}\t{2}\t{3}\t{4}".format(
|
|
71
|
+
contact, voltage, electron_current, hole_current, total_current
|
|
72
|
+
)
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
# in the future, worry about workfunction
|
|
77
|
+
def CreateOxideContact(device, region, contact):
|
|
78
|
+
_conteq = "Permittivity*ElectricField"
|
|
79
|
+
contact_bias_name = GetContactBiasName(contact)
|
|
80
|
+
contact_model_name = GetContactNodeModelName(contact)
|
|
81
|
+
eq = "Potential - {0}".format(contact_bias_name)
|
|
82
|
+
CreateContactNodeModel(device, contact, contact_model_name, eq)
|
|
83
|
+
CreateContactNodeModelDerivative(
|
|
84
|
+
device, contact, contact_model_name, eq, "Potential"
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
# TODO: make everyone use dfield
|
|
88
|
+
if not InEdgeModelList(device, region, contactcharge_edge):
|
|
89
|
+
CreateEdgeModel(
|
|
90
|
+
device, region, contactcharge_edge, "Permittivity*ElectricField"
|
|
91
|
+
)
|
|
92
|
+
CreateEdgeModelDerivatives(
|
|
93
|
+
device,
|
|
94
|
+
region,
|
|
95
|
+
contactcharge_edge,
|
|
96
|
+
"Permittivity*ElectricField",
|
|
97
|
+
"Potential",
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
contact_equation(
|
|
101
|
+
device=device,
|
|
102
|
+
contact=contact,
|
|
103
|
+
name="PotentialEquation",
|
|
104
|
+
node_model=contact_model_name,
|
|
105
|
+
edge_charge_model=contactcharge_edge,
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
#####
|
|
110
|
+
##### Constants
|
|
111
|
+
#####
|
|
112
|
+
def SetOxideParameters(device, region, T):
|
|
113
|
+
"""
|
|
114
|
+
Sets physical parameters
|
|
115
|
+
"""
|
|
116
|
+
set_parameter(
|
|
117
|
+
device=device, region=region, name="Permittivity", value=eps_ox * eps_0
|
|
118
|
+
)
|
|
119
|
+
set_parameter(device=device, region=region, name="ElectronCharge", value=q)
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def SetSiliconParameters(device, region, T):
|
|
123
|
+
"""
|
|
124
|
+
Sets physical parameters assuming constants
|
|
125
|
+
"""
|
|
126
|
+
#### TODO: make T a free parameter and T dependent parameters as models
|
|
127
|
+
set_parameter(
|
|
128
|
+
device=device, region=region, name="Permittivity", value=eps_si * eps_0
|
|
129
|
+
)
|
|
130
|
+
set_parameter(device=device, region=region, name="ElectronCharge", value=q)
|
|
131
|
+
set_parameter(device=device, region=region, name="n_i", value=n_i)
|
|
132
|
+
set_parameter(device=device, region=region, name="T", value=T)
|
|
133
|
+
set_parameter(device=device, region=region, name="kT", value=k * T)
|
|
134
|
+
set_parameter(device=device, region=region, name="V_t", value=k * T / q)
|
|
135
|
+
set_parameter(device=device, region=region, name="mu_n", value=mu_n)
|
|
136
|
+
set_parameter(device=device, region=region, name="mu_p", value=mu_p)
|
|
137
|
+
# default SRH parameters
|
|
138
|
+
set_parameter(device=device, region=region, name="n1", value=n_i)
|
|
139
|
+
set_parameter(device=device, region=region, name="p1", value=n_i)
|
|
140
|
+
set_parameter(device=device, region=region, name="taun", value=1e-5)
|
|
141
|
+
set_parameter(device=device, region=region, name="taup", value=1e-5)
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
def CreateSiliconPotentialOnly(device, region):
|
|
145
|
+
"""
|
|
146
|
+
Creates the physical models for a Silicon region
|
|
147
|
+
"""
|
|
148
|
+
if not InNodeModelList(device, region, "Potential"):
|
|
149
|
+
print("Creating Node Solution Potential")
|
|
150
|
+
CreateSolution(device, region, "Potential")
|
|
151
|
+
elec_i = "n_i*exp(Potential/V_t)"
|
|
152
|
+
hole_i = "n_i^2/IntrinsicElectrons"
|
|
153
|
+
charge_i = "kahan3(IntrinsicHoles, -IntrinsicElectrons, NetDoping)"
|
|
154
|
+
pcharge_i = "-ElectronCharge * IntrinsicCharge"
|
|
155
|
+
|
|
156
|
+
# require NetDoping
|
|
157
|
+
for i in (
|
|
158
|
+
("IntrinsicElectrons", elec_i),
|
|
159
|
+
("IntrinsicHoles", hole_i),
|
|
160
|
+
("IntrinsicCharge", charge_i),
|
|
161
|
+
("PotentialIntrinsicCharge", pcharge_i),
|
|
162
|
+
):
|
|
163
|
+
n = i[0]
|
|
164
|
+
e = i[1]
|
|
165
|
+
CreateNodeModel(device, region, n, e)
|
|
166
|
+
CreateNodeModelDerivative(device, region, n, e, "Potential")
|
|
167
|
+
|
|
168
|
+
### TODO: Edge Average Model
|
|
169
|
+
for i in (
|
|
170
|
+
("ElectricField", "(Potential@n0-Potential@n1)*EdgeInverseLength"),
|
|
171
|
+
("PotentialEdgeFlux", "Permittivity * ElectricField"),
|
|
172
|
+
):
|
|
173
|
+
n = i[0]
|
|
174
|
+
e = i[1]
|
|
175
|
+
CreateEdgeModel(device, region, n, e)
|
|
176
|
+
CreateEdgeModelDerivatives(device, region, n, e, "Potential")
|
|
177
|
+
|
|
178
|
+
equation(
|
|
179
|
+
device=device,
|
|
180
|
+
region=region,
|
|
181
|
+
name="PotentialEquation",
|
|
182
|
+
variable_name="Potential",
|
|
183
|
+
node_model="PotentialIntrinsicCharge",
|
|
184
|
+
edge_model="PotentialEdgeFlux",
|
|
185
|
+
variable_update="log_damp",
|
|
186
|
+
)
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
def CreateSiliconPotentialOnlyContact(device, region, contact, is_circuit=False):
|
|
190
|
+
"""
|
|
191
|
+
Creates the potential equation at the contact
|
|
192
|
+
if is_circuit is true, than use node given by GetContactBiasName
|
|
193
|
+
"""
|
|
194
|
+
# Means of determining contact charge
|
|
195
|
+
# Same for all contacts
|
|
196
|
+
#### TODO: This is the same as D-Field
|
|
197
|
+
if not InEdgeModelList(device, region, "contactcharge_edge"):
|
|
198
|
+
CreateEdgeModel(
|
|
199
|
+
device, region, "contactcharge_edge", "Permittivity*ElectricField"
|
|
200
|
+
)
|
|
201
|
+
CreateEdgeModelDerivatives(
|
|
202
|
+
device,
|
|
203
|
+
region,
|
|
204
|
+
"contactcharge_edge",
|
|
205
|
+
"Permittivity*ElectricField",
|
|
206
|
+
"Potential",
|
|
207
|
+
)
|
|
208
|
+
|
|
209
|
+
# set_parameter(device=device, region=region, name=GetContactBiasName(contact), value=0.0)
|
|
210
|
+
|
|
211
|
+
contact_model = "Potential -{0} + ifelse(NetDoping > 0, \
|
|
212
|
+
-V_t*log({1}/n_i), \
|
|
213
|
+
V_t*log({2}/n_i))".format(GetContactBiasName(contact), celec_model, chole_model)
|
|
214
|
+
|
|
215
|
+
contact_model_name = GetContactNodeModelName(contact)
|
|
216
|
+
CreateContactNodeModel(device, contact, contact_model_name, contact_model)
|
|
217
|
+
# Simplify it too complicated
|
|
218
|
+
CreateContactNodeModel(
|
|
219
|
+
device, contact, "{0}:{1}".format(contact_model_name, "Potential"), "1"
|
|
220
|
+
)
|
|
221
|
+
if is_circuit:
|
|
222
|
+
CreateContactNodeModel(
|
|
223
|
+
device,
|
|
224
|
+
contact,
|
|
225
|
+
"{0}:{1}".format(contact_model_name, GetContactBiasName(contact)),
|
|
226
|
+
"-1",
|
|
227
|
+
)
|
|
228
|
+
|
|
229
|
+
if is_circuit:
|
|
230
|
+
contact_equation(
|
|
231
|
+
device=device,
|
|
232
|
+
contact=contact,
|
|
233
|
+
name="PotentialEquation",
|
|
234
|
+
node_model=contact_model_name,
|
|
235
|
+
edge_model="",
|
|
236
|
+
node_charge_model="",
|
|
237
|
+
edge_charge_model="contactcharge_edge",
|
|
238
|
+
node_current_model="",
|
|
239
|
+
edge_current_model="",
|
|
240
|
+
circuit_node=GetContactBiasName(contact),
|
|
241
|
+
)
|
|
242
|
+
else:
|
|
243
|
+
contact_equation(
|
|
244
|
+
device=device,
|
|
245
|
+
contact=contact,
|
|
246
|
+
name="PotentialEquation",
|
|
247
|
+
node_model=contact_model_name,
|
|
248
|
+
edge_model="",
|
|
249
|
+
node_charge_model="",
|
|
250
|
+
edge_charge_model="contactcharge_edge",
|
|
251
|
+
node_current_model="",
|
|
252
|
+
edge_current_model="",
|
|
253
|
+
)
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
def CreateSRH(device, region):
|
|
257
|
+
USRH = "(Electrons*Holes - n_i^2)/(taup*(Electrons + n1) + taun*(Holes + p1))"
|
|
258
|
+
Gn = "-ElectronCharge * USRH"
|
|
259
|
+
Gp = "+ElectronCharge * USRH"
|
|
260
|
+
CreateNodeModel(device, region, "USRH", USRH)
|
|
261
|
+
CreateNodeModel(device, region, "ElectronGeneration", Gn)
|
|
262
|
+
CreateNodeModel(device, region, "HoleGeneration", Gp)
|
|
263
|
+
for i in ("Electrons", "Holes"):
|
|
264
|
+
CreateNodeModelDerivative(device, region, "USRH", USRH, i)
|
|
265
|
+
CreateNodeModelDerivative(device, region, "ElectronGeneration", Gn, i)
|
|
266
|
+
CreateNodeModelDerivative(device, region, "HoleGeneration", Gp, i)
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
def CreateECE(device, region, mu_n):
|
|
270
|
+
CreateElectronCurrent(device, region, mu_n)
|
|
271
|
+
|
|
272
|
+
NCharge = "-ElectronCharge * Electrons"
|
|
273
|
+
CreateNodeModel(device, region, "NCharge", NCharge)
|
|
274
|
+
CreateNodeModelDerivative(device, region, "NCharge", NCharge, "Electrons")
|
|
275
|
+
|
|
276
|
+
equation(
|
|
277
|
+
device=device,
|
|
278
|
+
region=region,
|
|
279
|
+
name="ElectronContinuityEquation",
|
|
280
|
+
variable_name="Electrons",
|
|
281
|
+
time_node_model="NCharge",
|
|
282
|
+
edge_model="ElectronCurrent",
|
|
283
|
+
variable_update="positive",
|
|
284
|
+
node_model="ElectronGeneration",
|
|
285
|
+
)
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
def CreateHCE(device, region, mu_p):
|
|
289
|
+
CreateHoleCurrent(device, region, mu_p)
|
|
290
|
+
PCharge = "ElectronCharge * Holes"
|
|
291
|
+
CreateNodeModel(device, region, "PCharge", PCharge)
|
|
292
|
+
CreateNodeModelDerivative(device, region, "PCharge", PCharge, "Holes")
|
|
293
|
+
|
|
294
|
+
equation(
|
|
295
|
+
device=device,
|
|
296
|
+
region=region,
|
|
297
|
+
name="HoleContinuityEquation",
|
|
298
|
+
variable_name="Holes",
|
|
299
|
+
time_node_model="PCharge",
|
|
300
|
+
edge_model="HoleCurrent",
|
|
301
|
+
variable_update="positive",
|
|
302
|
+
node_model="HoleGeneration",
|
|
303
|
+
)
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
def CreatePE(device, region):
|
|
307
|
+
pne = "-ElectronCharge*kahan3(Holes, -Electrons, NetDoping)"
|
|
308
|
+
CreateNodeModel(device, region, "PotentialNodeCharge", pne)
|
|
309
|
+
CreateNodeModelDerivative(device, region, "PotentialNodeCharge", pne, "Electrons")
|
|
310
|
+
CreateNodeModelDerivative(device, region, "PotentialNodeCharge", pne, "Holes")
|
|
311
|
+
|
|
312
|
+
equation(
|
|
313
|
+
device=device,
|
|
314
|
+
region=region,
|
|
315
|
+
name="PotentialEquation",
|
|
316
|
+
variable_name="Potential",
|
|
317
|
+
node_model="PotentialNodeCharge",
|
|
318
|
+
edge_model="PotentialEdgeFlux",
|
|
319
|
+
time_node_model="",
|
|
320
|
+
variable_update="log_damp",
|
|
321
|
+
)
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
def CreateSiliconDriftDiffusion(device, region, mu_n="mu_n", mu_p="mu_p"):
|
|
325
|
+
CreatePE(device, region)
|
|
326
|
+
CreateBernoulli(device, region)
|
|
327
|
+
CreateSRH(device, region)
|
|
328
|
+
CreateECE(device, region, mu_n)
|
|
329
|
+
CreateHCE(device, region, mu_p)
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
def CreateSiliconDriftDiffusionAtContact(device, region, contact, is_circuit=False):
|
|
333
|
+
"""
|
|
334
|
+
Restrict electrons and holes to their equilibrium values
|
|
335
|
+
Integrates current into circuit
|
|
336
|
+
"""
|
|
337
|
+
contact_electrons_model = (
|
|
338
|
+
"Electrons - ifelse(NetDoping > 0, {0}, n_i^2/{1})".format(
|
|
339
|
+
celec_model, chole_model
|
|
340
|
+
)
|
|
341
|
+
)
|
|
342
|
+
contact_holes_model = "Holes - ifelse(NetDoping < 0, +{1}, +n_i^2/{0})".format(
|
|
343
|
+
celec_model, chole_model
|
|
344
|
+
)
|
|
345
|
+
contact_electrons_name = "{0}nodeelectrons".format(contact)
|
|
346
|
+
contact_holes_name = "{0}nodeholes".format(contact)
|
|
347
|
+
|
|
348
|
+
CreateContactNodeModel(
|
|
349
|
+
device, contact, contact_electrons_name, contact_electrons_model
|
|
350
|
+
)
|
|
351
|
+
# TODO: The simplification of the ifelse statement is time consuming
|
|
352
|
+
# CreateContactNodeModelDerivative(device, contact, contact_electrons_name, contact_electrons_model, "Electrons")
|
|
353
|
+
CreateContactNodeModel(
|
|
354
|
+
device, contact, "{0}:{1}".format(contact_electrons_name, "Electrons"), "1"
|
|
355
|
+
)
|
|
356
|
+
|
|
357
|
+
CreateContactNodeModel(device, contact, contact_holes_name, contact_holes_model)
|
|
358
|
+
CreateContactNodeModel(
|
|
359
|
+
device, contact, "{0}:{1}".format(contact_holes_name, "Holes"), "1"
|
|
360
|
+
)
|
|
361
|
+
|
|
362
|
+
# TODO: keyword args
|
|
363
|
+
if is_circuit:
|
|
364
|
+
contact_equation(
|
|
365
|
+
device=device,
|
|
366
|
+
contact=contact,
|
|
367
|
+
name="ElectronContinuityEquation",
|
|
368
|
+
node_model=contact_electrons_name,
|
|
369
|
+
edge_current_model="ElectronCurrent",
|
|
370
|
+
circuit_node=GetContactBiasName(contact),
|
|
371
|
+
)
|
|
372
|
+
|
|
373
|
+
contact_equation(
|
|
374
|
+
device=device,
|
|
375
|
+
contact=contact,
|
|
376
|
+
name="HoleContinuityEquation",
|
|
377
|
+
node_model=contact_holes_name,
|
|
378
|
+
edge_current_model="HoleCurrent",
|
|
379
|
+
circuit_node=GetContactBiasName(contact),
|
|
380
|
+
)
|
|
381
|
+
|
|
382
|
+
else:
|
|
383
|
+
contact_equation(
|
|
384
|
+
device=device,
|
|
385
|
+
contact=contact,
|
|
386
|
+
name="ElectronContinuityEquation",
|
|
387
|
+
node_model=contact_electrons_name,
|
|
388
|
+
edge_current_model="ElectronCurrent",
|
|
389
|
+
)
|
|
390
|
+
|
|
391
|
+
contact_equation(
|
|
392
|
+
device=device,
|
|
393
|
+
contact=contact,
|
|
394
|
+
name="HoleContinuityEquation",
|
|
395
|
+
node_model=contact_holes_name,
|
|
396
|
+
edge_current_model="HoleCurrent",
|
|
397
|
+
)
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
def CreateOxidePotentialOnly(device, region, update_type="default"):
|
|
401
|
+
"""
|
|
402
|
+
Create electric field model in oxide
|
|
403
|
+
Creates Potential solution variable if not available
|
|
404
|
+
"""
|
|
405
|
+
if not InNodeModelList(device, region, "Potential"):
|
|
406
|
+
print("Creating Node Solution Potential")
|
|
407
|
+
CreateSolution(device, region, "Potential")
|
|
408
|
+
|
|
409
|
+
efield = "(Potential@n0 - Potential@n1)*EdgeInverseLength"
|
|
410
|
+
# this needs to remove derivatives w.r.t. independents
|
|
411
|
+
CreateEdgeModel(device, region, "ElectricField", efield)
|
|
412
|
+
CreateEdgeModelDerivatives(device, region, "ElectricField", efield, "Potential")
|
|
413
|
+
dfield = "Permittivity*ElectricField"
|
|
414
|
+
CreateEdgeModel(device, region, "PotentialEdgeFlux", dfield)
|
|
415
|
+
CreateEdgeModelDerivatives(device, region, "PotentialEdgeFlux", dfield, "Potential")
|
|
416
|
+
equation(
|
|
417
|
+
device=device,
|
|
418
|
+
region=region,
|
|
419
|
+
name="PotentialEquation",
|
|
420
|
+
variable_name="Potential",
|
|
421
|
+
edge_model="PotentialEdgeFlux",
|
|
422
|
+
variable_update=update_type,
|
|
423
|
+
)
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
def CreateSiliconOxideInterface(device, interface):
|
|
427
|
+
"""
|
|
428
|
+
continuous potential at interface
|
|
429
|
+
"""
|
|
430
|
+
model_name = CreateContinuousInterfaceModel(device, interface, "Potential")
|
|
431
|
+
interface_equation(
|
|
432
|
+
device=device,
|
|
433
|
+
interface=interface,
|
|
434
|
+
name="PotentialEquation",
|
|
435
|
+
interface_model=model_name,
|
|
436
|
+
type="continuous",
|
|
437
|
+
)
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
#
|
|
441
|
+
##TODO: similar model for silicon/silicon interface
|
|
442
|
+
## should use quasi-fermi potential
|
|
443
|
+
def CreateSiliconSiliconInterface(device, interface):
|
|
444
|
+
"""
|
|
445
|
+
Enforces potential, electron, and hole continuity across the interface
|
|
446
|
+
"""
|
|
447
|
+
CreateSiliconOxideInterface(device, interface)
|
|
448
|
+
ename = CreateContinuousInterfaceModel(device, interface, "Electrons")
|
|
449
|
+
interface_equation(
|
|
450
|
+
device=device,
|
|
451
|
+
interface=interface,
|
|
452
|
+
name="ElectronContinuityEquation",
|
|
453
|
+
interface_model=ename,
|
|
454
|
+
type="continuous",
|
|
455
|
+
)
|
|
456
|
+
hname = CreateContinuousInterfaceModel(device, interface, "Holes")
|
|
457
|
+
interface_equation(
|
|
458
|
+
device=device,
|
|
459
|
+
interface=interface,
|
|
460
|
+
name="HoleContinuityEquation",
|
|
461
|
+
interface_model=hname,
|
|
462
|
+
type="continuous",
|
|
463
|
+
)
|
|
Binary file
|