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,167 @@
|
|
|
1
|
+
# Copyright 2013 DEVSIM LLC
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
|
|
5
|
+
# cap device to test displacement current at contact
|
|
6
|
+
import devsim
|
|
7
|
+
import test_common
|
|
8
|
+
|
|
9
|
+
device = "test"
|
|
10
|
+
region = "bulk"
|
|
11
|
+
devsim.load_devices(file="3dtetmesh.msh")
|
|
12
|
+
# c=3.9*8.85e-14*(6e-2*6e-2)/6e-2
|
|
13
|
+
|
|
14
|
+
###
|
|
15
|
+
### Set parameters on the region
|
|
16
|
+
###
|
|
17
|
+
devsim.set_parameter(
|
|
18
|
+
device=device, region=region, name="Permittivity", value=3.9 * 8.85e-14
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
###
|
|
22
|
+
### Create the Potential solution variable
|
|
23
|
+
###
|
|
24
|
+
devsim.node_solution(device=device, region=region, name="Potential")
|
|
25
|
+
|
|
26
|
+
###
|
|
27
|
+
### Creates the Potential@n0 and Potential@n1 edge model
|
|
28
|
+
###
|
|
29
|
+
devsim.edge_from_node_model(device=device, region=region, node_model="Potential")
|
|
30
|
+
|
|
31
|
+
###
|
|
32
|
+
### Electric field on each edge, as well as its derivatives with respect to
|
|
33
|
+
### the potential at each node
|
|
34
|
+
###
|
|
35
|
+
devsim.edge_model(
|
|
36
|
+
device=device,
|
|
37
|
+
region=region,
|
|
38
|
+
name="ElectricField",
|
|
39
|
+
equation="(Potential@n0 - Potential@n1)*EdgeInverseLength",
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
devsim.edge_model(
|
|
43
|
+
device=device,
|
|
44
|
+
region=region,
|
|
45
|
+
name="ElectricField:Potential@n0",
|
|
46
|
+
equation="EdgeInverseLength",
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
devsim.edge_model(
|
|
50
|
+
device=device,
|
|
51
|
+
region=region,
|
|
52
|
+
name="ElectricField:Potential@n1",
|
|
53
|
+
equation="-EdgeInverseLength",
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
###
|
|
57
|
+
### Model the D Field
|
|
58
|
+
###
|
|
59
|
+
devsim.element_model(
|
|
60
|
+
device=device, region=region, name="DField", equation="Permittivity*ElectricField"
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
devsim.element_model(
|
|
64
|
+
device=device,
|
|
65
|
+
region=region,
|
|
66
|
+
name="DField:Potential@en0",
|
|
67
|
+
equation="diff(Permittivity*ElectricField, Potential@n0)",
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
devsim.element_model(
|
|
71
|
+
device=device,
|
|
72
|
+
region=region,
|
|
73
|
+
name="DField:Potential@en1",
|
|
74
|
+
equation="-DField:Potential@en0",
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
devsim.element_model(
|
|
78
|
+
device=device, region=region, name="DField:Potential@en2", equation="0"
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
devsim.element_model(
|
|
82
|
+
device=device, region=region, name="DField:Potential@en3", equation="0"
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
###
|
|
86
|
+
### Create the bulk equation
|
|
87
|
+
###
|
|
88
|
+
devsim.equation(
|
|
89
|
+
device=device,
|
|
90
|
+
region=region,
|
|
91
|
+
name="PotentialEquation",
|
|
92
|
+
variable_name="Potential",
|
|
93
|
+
element_model="DField",
|
|
94
|
+
variable_update="default",
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
# the topbias is a circuit node, and we want to prevent it from being overridden by a parameter
|
|
98
|
+
devsim.set_parameter(device=device, region=region, name="botbias", value=0.0)
|
|
99
|
+
|
|
100
|
+
for name, equation in (
|
|
101
|
+
("topnode_model", "Potential - topbias"),
|
|
102
|
+
("topnode_model:Potential", "1"),
|
|
103
|
+
("topnode_model:topbias", "-1"),
|
|
104
|
+
("botnode_model", "Potential - botbias"),
|
|
105
|
+
("botnode_model:Potential", "1"),
|
|
106
|
+
):
|
|
107
|
+
devsim.node_model(device=device, region=region, name=name, equation=equation)
|
|
108
|
+
|
|
109
|
+
# attached to circuit node
|
|
110
|
+
devsim.contact_equation(
|
|
111
|
+
device=device,
|
|
112
|
+
contact="top",
|
|
113
|
+
name="PotentialEquation",
|
|
114
|
+
node_model="topnode_model",
|
|
115
|
+
element_charge_model="DField",
|
|
116
|
+
circuit_node="topbias",
|
|
117
|
+
)
|
|
118
|
+
# attached to ground
|
|
119
|
+
devsim.contact_equation(
|
|
120
|
+
device=device,
|
|
121
|
+
contact="bot",
|
|
122
|
+
name="PotentialEquation",
|
|
123
|
+
node_model="botnode_model",
|
|
124
|
+
element_charge_model="DField",
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
#
|
|
128
|
+
# Voltage source
|
|
129
|
+
#
|
|
130
|
+
devsim.circuit_element(name="V1", n1=1, n2=0, value=1.0, acreal=1.0)
|
|
131
|
+
devsim.circuit_element(name="R1", n1="topbias", n2=1, value=1e3)
|
|
132
|
+
|
|
133
|
+
#
|
|
134
|
+
devsim.solve(type="dc", absolute_error=1.0, relative_error=1e-10, maximum_iterations=30)
|
|
135
|
+
#
|
|
136
|
+
print(
|
|
137
|
+
devsim.get_contact_charge(
|
|
138
|
+
device=device, contact="top", equation="PotentialEquation"
|
|
139
|
+
)
|
|
140
|
+
)
|
|
141
|
+
print(
|
|
142
|
+
devsim.get_contact_charge(
|
|
143
|
+
device=device, contact="bot", equation="PotentialEquation"
|
|
144
|
+
)
|
|
145
|
+
)
|
|
146
|
+
#
|
|
147
|
+
devsim.solve(type="ac", frequency=1e-3)
|
|
148
|
+
test_common.print_ac_circuit_solution()
|
|
149
|
+
devsim.solve(type="ac", frequency=1e10)
|
|
150
|
+
test_common.print_ac_circuit_solution()
|
|
151
|
+
devsim.solve(type="ac", frequency=1e15)
|
|
152
|
+
test_common.print_ac_circuit_solution()
|
|
153
|
+
|
|
154
|
+
# for i in devsim.get_element_model_values(device=device, region=region, name="DField"):
|
|
155
|
+
# print(i)
|
|
156
|
+
#
|
|
157
|
+
# ec = devsim.get_edge_model_values(device=device, region=region, name="EdgeCouple")
|
|
158
|
+
# devsim.element_model(device=device, region=region, name="eindex", equation="edge_index")
|
|
159
|
+
# ei = [int(x) for x in devsim.get_element_model_values(device=device, region=region, name="eindex")]
|
|
160
|
+
# eec = devsim.get_element_model_values(device=device, region=region, name="ElementEdgeCouple")
|
|
161
|
+
# ec_compare=[0.0]*len(ec)
|
|
162
|
+
# for q, v in zip(ei, eec):
|
|
163
|
+
# #print(q,v)
|
|
164
|
+
# ec_compare[q] += v
|
|
165
|
+
#
|
|
166
|
+
# for q,v in zip(ec, ec_compare):
|
|
167
|
+
# print(q,v)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Copyright 2013 DEVSIM LLC
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
|
|
5
|
+
# ssac circuit only
|
|
6
|
+
import devsim
|
|
7
|
+
import test_common
|
|
8
|
+
|
|
9
|
+
devsim.circuit_element(name="V1", n1=1, n2=0, value=1.0, acreal=1.0)
|
|
10
|
+
devsim.circuit_element(name="R1", n1=1, n2=2, value=5)
|
|
11
|
+
devsim.circuit_element(name="C1", n1=2, n2=0, value=5)
|
|
12
|
+
|
|
13
|
+
devsim.solve(type="dc", absolute_error=1.0, relative_error=1e-14, maximum_iterations=3)
|
|
14
|
+
test_common.print_circuit_solution()
|
|
15
|
+
devsim.solve(type="ac", frequency=1.0e2)
|
|
16
|
+
test_common.print_ac_circuit_solution()
|
|
17
|
+
devsim.solve(type="ac", frequency=1.0e3)
|
|
18
|
+
test_common.print_ac_circuit_solution()
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Copyright 2013 DEVSIM LLC
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
|
|
5
|
+
# solid state resistor ssac
|
|
6
|
+
import devsim
|
|
7
|
+
import res1
|
|
8
|
+
import test_common
|
|
9
|
+
|
|
10
|
+
devsim.circuit_element(name="V1", n1="topbias", n2=0, acreal=1.0)
|
|
11
|
+
test_common.CreateSimpleMesh(res1.device, res1.region)
|
|
12
|
+
devsim.set_parameter(name="botbias", value=0.0)
|
|
13
|
+
res1.run_initial_bias(use_circuit_bias=True)
|
|
14
|
+
|
|
15
|
+
for v in (0.0, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.10):
|
|
16
|
+
devsim.circuit_alter(name="V1", value=v)
|
|
17
|
+
devsim.solve(
|
|
18
|
+
type="dc", absolute_error=1.0, relative_error=1e-10, maximum_iterations=30
|
|
19
|
+
)
|
|
20
|
+
for contact in res1.contacts:
|
|
21
|
+
test_common.printResistorCurrent(device=res1.device, contact=contact)
|
|
22
|
+
|
|
23
|
+
for f in (0, 1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12):
|
|
24
|
+
devsim.solve(type="ac", frequency=f)
|
|
25
|
+
test_common.print_ac_circuit_solution()
|
|
26
|
+
|
|
27
|
+
for x in devsim.get_circuit_node_list():
|
|
28
|
+
for y in devsim.get_circuit_solution_list():
|
|
29
|
+
z = devsim.get_circuit_node_value(node=x, solution=y)
|
|
30
|
+
print("%s %s %1.15e" % (x, y, z))
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Copyright 2013 DEVSIM LLC
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
|
|
5
|
+
import devsim
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def callSymdiff(arg):
|
|
9
|
+
x = devsim.symdiff(expr=arg)
|
|
10
|
+
dx = devsim.symdiff(expr="diff(%s,x)" % arg)
|
|
11
|
+
print('"%s"\n"%s"\n"%s"\n' % (arg, x, dx))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
callSymdiff("min(x*b, x+b)")
|
|
15
|
+
callSymdiff("min(x*b, x+!b)")
|
|
16
|
+
callSymdiff("max(x*b, x+b)")
|
|
17
|
+
callSymdiff("asinh(x)")
|
|
18
|
+
callSymdiff("acosh(x)")
|
|
19
|
+
callSymdiff("atanh(x)")
|
|
20
|
+
|
|
21
|
+
callSymdiff("exp(0)")
|
|
22
|
+
callSymdiff("simplify(exp(0))")
|
|
23
|
+
callSymdiff("exp(1)")
|
|
24
|
+
callSymdiff("exp(2)")
|
|
25
|
+
|
|
26
|
+
callSymdiff("pow(x,0)")
|
|
27
|
+
callSymdiff("simplify(pow(x,0))")
|
|
28
|
+
callSymdiff("pow(x,1)")
|
|
29
|
+
callSymdiff("simplify(pow(x,1))")
|
|
30
|
+
callSymdiff("pow(x*y,1)")
|
|
31
|
+
callSymdiff("pow(x*y,2)")
|
|
32
|
+
callSymdiff("pow(x,2)")
|
|
33
|
+
callSymdiff("pow(2,x)")
|
|
34
|
+
callSymdiff("pow(2,x*y)")
|
|
35
|
+
callSymdiff("pow(2,3)")
|
|
36
|
+
callSymdiff("pow(0,x)")
|
|
37
|
+
callSymdiff("simplify(pow(0,x))")
|
|
38
|
+
callSymdiff("pow(1,x)")
|
|
39
|
+
callSymdiff("simplify(pow(1,x))")
|
|
40
|
+
|
|
41
|
+
callSymdiff("exp(x)")
|
|
42
|
+
callSymdiff("exp(x*y)")
|
|
43
|
+
callSymdiff("log(x)")
|
|
44
|
+
callSymdiff("log(x*y)")
|
|
45
|
+
callSymdiff("log(1)")
|
|
46
|
+
callSymdiff("x*y")
|
|
47
|
+
callSymdiff("x")
|
|
48
|
+
callSymdiff("0*x")
|
|
49
|
+
callSymdiff("0*x*y")
|
|
50
|
+
callSymdiff("x*y*z")
|
|
51
|
+
callSymdiff("0+x+y")
|
|
52
|
+
callSymdiff("pow(x*y,z)")
|
|
53
|
+
callSymdiff("pow(y,x*z)")
|
|
54
|
+
callSymdiff("pow(x*y,x*z)")
|
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
# Copyright 2019 DEVSIM LLC
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
|
|
5
|
+
import devsim
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def print_ac_circuit_solution():
|
|
9
|
+
print("Circuit AC Solution")
|
|
10
|
+
_nodes = devsim.get_circuit_node_list()
|
|
11
|
+
for node in devsim.get_circuit_node_list():
|
|
12
|
+
r = devsim.get_circuit_node_value(solution="ssac_real", node=node)
|
|
13
|
+
i = devsim.get_circuit_node_value(solution="ssac_imag", node=node)
|
|
14
|
+
print("%s\t%1.15e\t%1.15e" % (node, r, i))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def print_circuit_solution():
|
|
18
|
+
print("Circuit Solution")
|
|
19
|
+
_nodes = devsim.get_circuit_node_list()
|
|
20
|
+
for node in devsim.get_circuit_node_list():
|
|
21
|
+
r = devsim.get_circuit_node_value(solution="dcop", node=node)
|
|
22
|
+
print("%s\t%1.15e" % (node, r))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def printResistorCurrent(device, contact):
|
|
26
|
+
ecurr = devsim.get_contact_current(
|
|
27
|
+
device=device, contact=contact, equation="ElectronContinuityEquation"
|
|
28
|
+
)
|
|
29
|
+
hcurr = 0.0
|
|
30
|
+
tcurr = ecurr + hcurr
|
|
31
|
+
print(
|
|
32
|
+
"Contact: %s\nElectron %g\nHole %g\nTotal %g" % (contact, ecurr, hcurr, tcurr)
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
####
|
|
37
|
+
#### Meshing
|
|
38
|
+
####
|
|
39
|
+
def CreateSimpleMesh(device, region, material="Si"):
|
|
40
|
+
"""
|
|
41
|
+
Commonly used for the regressions
|
|
42
|
+
device length: 1
|
|
43
|
+
spacing: 0.1
|
|
44
|
+
contacts: top (x=0), bot (x=1)
|
|
45
|
+
"""
|
|
46
|
+
devsim.create_1d_mesh(mesh="dog")
|
|
47
|
+
devsim.add_1d_mesh_line(mesh="dog", pos=0, ps=0.1, tag="top")
|
|
48
|
+
devsim.add_1d_mesh_line(mesh="dog", pos=1, ps=0.1, tag="bot")
|
|
49
|
+
devsim.add_1d_contact(mesh="dog", name="top", tag="top", material="metal")
|
|
50
|
+
devsim.add_1d_contact(mesh="dog", name="bot", tag="bot", material="metal")
|
|
51
|
+
devsim.add_1d_region(
|
|
52
|
+
mesh="dog", material=material, region=region, tag1="top", tag2="bot"
|
|
53
|
+
)
|
|
54
|
+
devsim.finalize_mesh(mesh="dog")
|
|
55
|
+
devsim.create_device(mesh="dog", device=device)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def CreateSimpleMeshWithInterface(
|
|
59
|
+
device, region0, region1, interface, material1="Si", material2="Si"
|
|
60
|
+
):
|
|
61
|
+
"""
|
|
62
|
+
Commonly used for the regressions
|
|
63
|
+
device length: 1
|
|
64
|
+
spacing: 0.1
|
|
65
|
+
contacts: top (x=0), bot (x=1)
|
|
66
|
+
interface: mid (x=0.5)
|
|
67
|
+
"""
|
|
68
|
+
devsim.create_1d_mesh(mesh="dog")
|
|
69
|
+
devsim.add_1d_mesh_line(mesh="dog", pos=0, ps=0.1, tag="top")
|
|
70
|
+
devsim.add_1d_mesh_line(mesh="dog", pos=0.5, ps=0.1, tag="mid")
|
|
71
|
+
devsim.add_1d_mesh_line(mesh="dog", pos=1, ps=0.1, tag="bot")
|
|
72
|
+
devsim.add_1d_contact(mesh="dog", name="top", tag="top", material="metal")
|
|
73
|
+
devsim.add_1d_contact(mesh="dog", name="bot", tag="bot", material="metal")
|
|
74
|
+
devsim.add_1d_interface(mesh="dog", name=interface, tag="mid")
|
|
75
|
+
devsim.add_1d_region(
|
|
76
|
+
mesh="dog", material=material1, region=region0, tag1="top", tag2="mid"
|
|
77
|
+
)
|
|
78
|
+
devsim.add_1d_region(
|
|
79
|
+
mesh="dog", material=material2, region=region1, tag1="mid", tag2="bot"
|
|
80
|
+
)
|
|
81
|
+
devsim.finalize_mesh(mesh="dog")
|
|
82
|
+
devsim.create_device(mesh="dog", device=device)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def CreateNoiseMesh(device, region, material="Si"):
|
|
86
|
+
"""
|
|
87
|
+
Commonly used for the regressions
|
|
88
|
+
device length: 1
|
|
89
|
+
spacing: 0.1
|
|
90
|
+
contacts: top (x=0), bot (x=1)
|
|
91
|
+
"""
|
|
92
|
+
devsim.create_1d_mesh(mesh="dog")
|
|
93
|
+
devsim.add_1d_mesh_line(mesh="dog", pos=0, ps=5e-7, tag="top")
|
|
94
|
+
devsim.add_1d_mesh_line(mesh="dog", pos=1e-5, ps=5e-7, tag="bot")
|
|
95
|
+
devsim.add_1d_contact(mesh="dog", name="top", tag="top", material="metal")
|
|
96
|
+
devsim.add_1d_contact(mesh="dog", name="bot", tag="bot", material="metal")
|
|
97
|
+
devsim.add_1d_region(
|
|
98
|
+
mesh="dog", material=material, region=region, tag1="top", tag2="bot"
|
|
99
|
+
)
|
|
100
|
+
devsim.finalize_mesh(mesh="dog")
|
|
101
|
+
devsim.create_device(mesh="dog", device=device)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
####
|
|
105
|
+
#### Constants
|
|
106
|
+
####
|
|
107
|
+
def SetupResistorConstants(device, region):
|
|
108
|
+
for name, value in (
|
|
109
|
+
("Permittivity", 11.1 * 8.85e-14),
|
|
110
|
+
("ElectronCharge", 1.6e-19),
|
|
111
|
+
("IntrinsicDensity", 1.0e10),
|
|
112
|
+
("ThermalVoltage", 0.0259),
|
|
113
|
+
("mu_n", 400),
|
|
114
|
+
("mu_p", 200),
|
|
115
|
+
):
|
|
116
|
+
devsim.set_parameter(device=device, region=region, name=name, value=value)
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
def SetupInitialResistorSystem(device, region, net_doping=1e16):
|
|
120
|
+
"""
|
|
121
|
+
resistor physics
|
|
122
|
+
"""
|
|
123
|
+
devsim.set_parameter(
|
|
124
|
+
device=device, region=region, name="net_doping", value=net_doping
|
|
125
|
+
)
|
|
126
|
+
devsim.node_solution(device=device, region=region, name="Potential")
|
|
127
|
+
devsim.edge_from_node_model(device=device, region=region, node_model="Potential")
|
|
128
|
+
|
|
129
|
+
# node models
|
|
130
|
+
for name, equation in (
|
|
131
|
+
("NetDoping", "net_doping"),
|
|
132
|
+
("IntrinsicElectrons", "NetDoping"),
|
|
133
|
+
("IntrinsicCharge", "-IntrinsicElectrons + NetDoping"),
|
|
134
|
+
("IntrinsicCharge:Potential", "-IntrinsicElectrons:Potential"),
|
|
135
|
+
):
|
|
136
|
+
devsim.node_model(device=device, region=region, name=name, equation=equation)
|
|
137
|
+
|
|
138
|
+
# edge models
|
|
139
|
+
for name, equation in (
|
|
140
|
+
("ElectricField", "(Potential@n0 - Potential@n1)*EdgeInverseLength"),
|
|
141
|
+
("ElectricField:Potential@n0", "EdgeInverseLength"),
|
|
142
|
+
("ElectricField:Potential@n1", "-EdgeInverseLength"),
|
|
143
|
+
("PotentialEdgeFlux", "Permittivity*ElectricField"),
|
|
144
|
+
(
|
|
145
|
+
"PotentialEdgeFlux:Potential@n0",
|
|
146
|
+
"diff(Permittivity*ElectricField, Potential@n0)",
|
|
147
|
+
),
|
|
148
|
+
("PotentialEdgeFlux:Potential@n1", "-PotentialEdgeFlux:Potential@n0"),
|
|
149
|
+
):
|
|
150
|
+
devsim.edge_model(device=device, region=region, name=name, equation=equation)
|
|
151
|
+
|
|
152
|
+
####
|
|
153
|
+
#### PotentialEquation
|
|
154
|
+
####
|
|
155
|
+
devsim.equation(
|
|
156
|
+
device=device,
|
|
157
|
+
region=region,
|
|
158
|
+
name="PotentialEquation",
|
|
159
|
+
variable_name="Potential",
|
|
160
|
+
edge_model="PotentialEdgeFlux",
|
|
161
|
+
variable_update="log_damp",
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
def SetupCarrierResistorSystem(device, region):
|
|
166
|
+
"""
|
|
167
|
+
This adds electron continuity
|
|
168
|
+
"""
|
|
169
|
+
devsim.node_solution(device=device, region=region, name="Electrons")
|
|
170
|
+
devsim.edge_from_node_model(device=device, region=region, node_model="Electrons")
|
|
171
|
+
devsim.set_node_values(
|
|
172
|
+
device=device, region=region, name="Electrons", init_from="IntrinsicElectrons"
|
|
173
|
+
)
|
|
174
|
+
|
|
175
|
+
####
|
|
176
|
+
#### PotentialNodeCharge
|
|
177
|
+
####
|
|
178
|
+
for name, equation in (
|
|
179
|
+
("PotentialNodeCharge", "-ElectronCharge*(-Electrons + NetDoping)"),
|
|
180
|
+
("PotentialNodeCharge:Electrons", "+ElectronCharge"),
|
|
181
|
+
):
|
|
182
|
+
devsim.node_model(device=device, region=region, name=name, equation=equation)
|
|
183
|
+
|
|
184
|
+
####
|
|
185
|
+
#### PotentialEquation modified for carriers present
|
|
186
|
+
####
|
|
187
|
+
devsim.equation(
|
|
188
|
+
device=device,
|
|
189
|
+
region=region,
|
|
190
|
+
name="PotentialEquation",
|
|
191
|
+
variable_name="Potential",
|
|
192
|
+
node_model="PotentialNodeCharge",
|
|
193
|
+
edge_model="PotentialEdgeFlux",
|
|
194
|
+
variable_update="default",
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
####
|
|
198
|
+
#### vdiff, Bern01, Bern10
|
|
199
|
+
####
|
|
200
|
+
for name, equation in (
|
|
201
|
+
("vdiff", "(Potential@n0 - Potential@n1)/ThermalVoltage"),
|
|
202
|
+
("vdiff:Potential@n0", "ThermalVoltage^(-1)"),
|
|
203
|
+
("vdiff:Potential@n1", "-ThermalVoltage^(-1)"),
|
|
204
|
+
("Bern01", "B(vdiff)"),
|
|
205
|
+
("Bern01:Potential@n0", "dBdx(vdiff)*vdiff:Potential@n0"),
|
|
206
|
+
("Bern01:Potential@n1", "dBdx(vdiff)*vdiff:Potential@n1"),
|
|
207
|
+
("Bern10", "Bern01 + vdiff"),
|
|
208
|
+
("Bern10:Potential@n0", "Bern01:Potential@n0 + vdiff:Potential@n0"),
|
|
209
|
+
("Bern10:Potential@n1", "Bern01:Potential@n1 + vdiff:Potential@n1"),
|
|
210
|
+
):
|
|
211
|
+
devsim.edge_model(device=device, region=region, name=name, equation=equation)
|
|
212
|
+
|
|
213
|
+
####
|
|
214
|
+
#### Electron Current
|
|
215
|
+
####
|
|
216
|
+
current_equation = "ElectronCharge*mu_n*EdgeInverseLength*ThermalVoltage*(Electrons@n1*Bern10 - Electrons@n0*Bern01)"
|
|
217
|
+
for name, equation in (
|
|
218
|
+
("ElectronCurrent", current_equation),
|
|
219
|
+
(
|
|
220
|
+
"ElectronCurrent:Electrons@n0",
|
|
221
|
+
"simplify(diff(%s, Electrons@n0))" % current_equation,
|
|
222
|
+
),
|
|
223
|
+
(
|
|
224
|
+
"ElectronCurrent:Electrons@n1",
|
|
225
|
+
"simplify(diff(%s, Electrons@n1))" % current_equation,
|
|
226
|
+
),
|
|
227
|
+
(
|
|
228
|
+
"ElectronCurrent:Potential@n0",
|
|
229
|
+
"simplify(diff(%s, Potential@n0))" % current_equation,
|
|
230
|
+
),
|
|
231
|
+
(
|
|
232
|
+
"ElectronCurrent:Potential@n1",
|
|
233
|
+
"simplify(diff(%s, Potential@n1))" % current_equation,
|
|
234
|
+
),
|
|
235
|
+
):
|
|
236
|
+
devsim.edge_model(device=device, region=region, name=name, equation=equation)
|
|
237
|
+
|
|
238
|
+
####
|
|
239
|
+
#### Time derivative term
|
|
240
|
+
####
|
|
241
|
+
for name, equation in (
|
|
242
|
+
("NCharge", "-ElectronCharge * Electrons"),
|
|
243
|
+
("NCharge:Electrons", "-ElectronCharge"),
|
|
244
|
+
):
|
|
245
|
+
devsim.node_model(device=device, region=region, name=name, equation=equation)
|
|
246
|
+
|
|
247
|
+
####
|
|
248
|
+
#### Electron Continuity Equation
|
|
249
|
+
####
|
|
250
|
+
devsim.equation(
|
|
251
|
+
device=device,
|
|
252
|
+
region=region,
|
|
253
|
+
name="ElectronContinuityEquation",
|
|
254
|
+
variable_name="Electrons",
|
|
255
|
+
edge_model="ElectronCurrent",
|
|
256
|
+
time_node_model="NCharge",
|
|
257
|
+
variable_update="positive",
|
|
258
|
+
)
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
def SetupInitialResistorContact(
|
|
262
|
+
device, contact, use_circuit_bias=False, circuit_node=""
|
|
263
|
+
):
|
|
264
|
+
if circuit_node:
|
|
265
|
+
bias_name = circuit_node
|
|
266
|
+
else:
|
|
267
|
+
bias_name = contact + "bias"
|
|
268
|
+
bias_node_model = contact + "node_model"
|
|
269
|
+
|
|
270
|
+
devsim.contact_node_model(
|
|
271
|
+
device=device,
|
|
272
|
+
contact=contact,
|
|
273
|
+
name=bias_node_model,
|
|
274
|
+
equation="Potential - %s" % bias_name,
|
|
275
|
+
)
|
|
276
|
+
devsim.contact_node_model(
|
|
277
|
+
device=device,
|
|
278
|
+
contact=contact,
|
|
279
|
+
name="%s:Potential" % bias_node_model,
|
|
280
|
+
equation="1",
|
|
281
|
+
)
|
|
282
|
+
if use_circuit_bias:
|
|
283
|
+
devsim.contact_node_model(
|
|
284
|
+
device=device,
|
|
285
|
+
contact=contact,
|
|
286
|
+
name="%s:%s" % (bias_node_model, bias_name),
|
|
287
|
+
equation="-1",
|
|
288
|
+
)
|
|
289
|
+
# edge_model -device $device -region $region -name "contactcharge_edge_top" -equation $conteq
|
|
290
|
+
if use_circuit_bias:
|
|
291
|
+
devsim.contact_equation(
|
|
292
|
+
device=device,
|
|
293
|
+
contact=contact,
|
|
294
|
+
name="PotentialEquation",
|
|
295
|
+
node_model=bias_node_model,
|
|
296
|
+
circuit_node=bias_name,
|
|
297
|
+
)
|
|
298
|
+
else:
|
|
299
|
+
devsim.contact_equation(
|
|
300
|
+
device=device,
|
|
301
|
+
contact=contact,
|
|
302
|
+
name="PotentialEquation",
|
|
303
|
+
node_model=bias_node_model,
|
|
304
|
+
)
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
def SetupCarrierResistorContact(
|
|
308
|
+
device, contact, use_circuit_bias=False, circuit_node=""
|
|
309
|
+
):
|
|
310
|
+
"""
|
|
311
|
+
Electron continuity equation at contact
|
|
312
|
+
"""
|
|
313
|
+
if circuit_node:
|
|
314
|
+
bias_name = circuit_node
|
|
315
|
+
else:
|
|
316
|
+
bias_name = contact + "bias"
|
|
317
|
+
region = devsim.get_region_list(device=device, contact=contact)[0]
|
|
318
|
+
if "celec" not in devsim.get_node_model_list(device=device, region=region):
|
|
319
|
+
devsim.node_model(
|
|
320
|
+
device=device,
|
|
321
|
+
region=region,
|
|
322
|
+
name="celec",
|
|
323
|
+
equation="0.5*(NetDoping+(NetDoping^2 + 4 * IntrinsicDensity^2)^(0.5))",
|
|
324
|
+
)
|
|
325
|
+
|
|
326
|
+
for name, equation in (
|
|
327
|
+
("%snodeelectrons" % contact, "Electrons - celec"),
|
|
328
|
+
("%snodeelectrons:Electrons" % contact, "1."),
|
|
329
|
+
):
|
|
330
|
+
devsim.contact_node_model(
|
|
331
|
+
device=device, contact=contact, name=name, equation=equation
|
|
332
|
+
)
|
|
333
|
+
|
|
334
|
+
if use_circuit_bias:
|
|
335
|
+
devsim.contact_equation(
|
|
336
|
+
device=device,
|
|
337
|
+
contact=contact,
|
|
338
|
+
name="ElectronContinuityEquation",
|
|
339
|
+
node_model="%snodeelectrons" % contact,
|
|
340
|
+
edge_current_model="ElectronCurrent",
|
|
341
|
+
circuit_node=bias_name,
|
|
342
|
+
)
|
|
343
|
+
else:
|
|
344
|
+
devsim.contact_equation(
|
|
345
|
+
device=device,
|
|
346
|
+
contact=contact,
|
|
347
|
+
name="ElectronContinuityEquation",
|
|
348
|
+
node_model="%snodeelectrons" % contact,
|
|
349
|
+
edge_current_model="ElectronCurrent",
|
|
350
|
+
)
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
def SetupContinuousPotentialAtInterface(device, interface):
|
|
354
|
+
# type continuous means that regular equations in both regions are swapped into the primary region
|
|
355
|
+
devsim.interface_model(
|
|
356
|
+
device=device,
|
|
357
|
+
interface=interface,
|
|
358
|
+
name="continuousPotential",
|
|
359
|
+
equation="Potential@r0-Potential@r1",
|
|
360
|
+
)
|
|
361
|
+
devsim.interface_model(
|
|
362
|
+
device=device,
|
|
363
|
+
interface=interface,
|
|
364
|
+
name="continuousPotential:Potential@r0",
|
|
365
|
+
equation="1",
|
|
366
|
+
)
|
|
367
|
+
devsim.interface_model(
|
|
368
|
+
device=device,
|
|
369
|
+
interface=interface,
|
|
370
|
+
name="continuousPotential:Potential@r1",
|
|
371
|
+
equation="-1",
|
|
372
|
+
)
|
|
373
|
+
devsim.interface_equation(
|
|
374
|
+
device=device,
|
|
375
|
+
interface=interface,
|
|
376
|
+
name="PotentialEquation",
|
|
377
|
+
interface_model="continuousPotential",
|
|
378
|
+
type="continuous",
|
|
379
|
+
)
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
def SetupContinuousElectronsAtInterface(device, interface):
|
|
383
|
+
# type continuous means that regular equations in both regions are swapped into the primary region
|
|
384
|
+
devsim.interface_model(
|
|
385
|
+
device=device,
|
|
386
|
+
interface=interface,
|
|
387
|
+
name="continuousElectrons",
|
|
388
|
+
equation="Electrons@r0-Electrons@r1",
|
|
389
|
+
)
|
|
390
|
+
devsim.interface_model(
|
|
391
|
+
device=device,
|
|
392
|
+
interface=interface,
|
|
393
|
+
name="continuousElectrons:Electrons@r0",
|
|
394
|
+
equation="1",
|
|
395
|
+
)
|
|
396
|
+
devsim.interface_model(
|
|
397
|
+
device=device,
|
|
398
|
+
interface=interface,
|
|
399
|
+
name="continuousElectrons:Electrons@r1",
|
|
400
|
+
equation="-1",
|
|
401
|
+
)
|
|
402
|
+
devsim.interface_equation(
|
|
403
|
+
device=device,
|
|
404
|
+
interface=interface,
|
|
405
|
+
name="ElectronContinuityEquation",
|
|
406
|
+
interface_model="continuousElectrons",
|
|
407
|
+
type="continuous",
|
|
408
|
+
)
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
def SetupElectronSRVAtInterface(device, interface):
|
|
412
|
+
"""
|
|
413
|
+
Surface Recombination Velocity At Interface
|
|
414
|
+
"""
|
|
415
|
+
devsim.set_parameter(device=device, name="alpha_n", value=1e-7)
|
|
416
|
+
iexp = "(alpha_n@r0)*(Electrons@r0-Electrons@r1)"
|
|
417
|
+
for name, equation in (
|
|
418
|
+
("srvElectrons", iexp),
|
|
419
|
+
("srvElectrons2", "srvElectrons"),
|
|
420
|
+
("srvElectrons:Electrons@r0", "diff(%s,Electrons@r0)" % iexp),
|
|
421
|
+
("srvElectrons:Electrons@r1", "diff(%s,Electrons@r1)" % iexp),
|
|
422
|
+
("srvElectrons2:Electrons@r0", "srvElectrons:Electrons@r0"),
|
|
423
|
+
("srvElectrons2:Electrons@r1", "srvElectrons:Electrons@r1"),
|
|
424
|
+
):
|
|
425
|
+
devsim.interface_model(
|
|
426
|
+
device=device, interface=interface, name=name, equation=equation
|
|
427
|
+
)
|
|
428
|
+
|
|
429
|
+
devsim.interface_equation(
|
|
430
|
+
device=device,
|
|
431
|
+
interface=interface,
|
|
432
|
+
name="ElectronContinuityEquation",
|
|
433
|
+
interface_model="srvElectrons2",
|
|
434
|
+
type="fluxterm",
|
|
435
|
+
)
|