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,439 @@
|
|
|
1
|
+
# Copyright 2013 DEVSIM LLC
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
|
|
5
|
+
####
|
|
6
|
+
#### cap2.py
|
|
7
|
+
#### tests physics of cap made of two insulating regions
|
|
8
|
+
####
|
|
9
|
+
import array
|
|
10
|
+
from devsim import (
|
|
11
|
+
add_1d_contact,
|
|
12
|
+
add_1d_interface,
|
|
13
|
+
add_1d_mesh_line,
|
|
14
|
+
add_1d_region,
|
|
15
|
+
contact_equation,
|
|
16
|
+
create_1d_mesh,
|
|
17
|
+
create_device,
|
|
18
|
+
delete_contact_equation,
|
|
19
|
+
delete_edge_model,
|
|
20
|
+
delete_equation,
|
|
21
|
+
delete_interface_equation,
|
|
22
|
+
delete_interface_model,
|
|
23
|
+
delete_node_model,
|
|
24
|
+
edge_from_node_model,
|
|
25
|
+
edge_model,
|
|
26
|
+
edge_solution,
|
|
27
|
+
equation,
|
|
28
|
+
finalize_mesh,
|
|
29
|
+
get_contact_charge,
|
|
30
|
+
get_contact_equation_command,
|
|
31
|
+
get_contact_equation_list,
|
|
32
|
+
get_contact_list,
|
|
33
|
+
get_edge_model_values,
|
|
34
|
+
get_equation_command,
|
|
35
|
+
get_equation_list,
|
|
36
|
+
get_interface_equation_command,
|
|
37
|
+
get_interface_equation_list,
|
|
38
|
+
get_interface_list,
|
|
39
|
+
get_matrix_and_rhs,
|
|
40
|
+
get_node_model_values,
|
|
41
|
+
get_region_list,
|
|
42
|
+
interface_equation,
|
|
43
|
+
interface_model,
|
|
44
|
+
node_model,
|
|
45
|
+
node_solution,
|
|
46
|
+
print_edge_values,
|
|
47
|
+
print_node_values,
|
|
48
|
+
set_edge_values,
|
|
49
|
+
set_node_value,
|
|
50
|
+
set_node_values,
|
|
51
|
+
set_parameter,
|
|
52
|
+
solve,
|
|
53
|
+
edge_average_model,
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
device = "MyDevice"
|
|
57
|
+
interface = "MySiOx"
|
|
58
|
+
regions = ("MyOxRegion", "MySiRegion")
|
|
59
|
+
|
|
60
|
+
create_1d_mesh(mesh="cap")
|
|
61
|
+
add_1d_mesh_line(mesh="cap", pos=0, ps=0.1, tag="top")
|
|
62
|
+
add_1d_mesh_line(mesh="cap", pos=0.5, ps=0.1, tag="mid")
|
|
63
|
+
add_1d_mesh_line(mesh="cap", pos=1, ps=0.1, tag="bot")
|
|
64
|
+
add_1d_contact(mesh="cap", name="top", tag="top", material="metal")
|
|
65
|
+
add_1d_contact(mesh="cap", name="bot", tag="bot", material="metal")
|
|
66
|
+
add_1d_interface(mesh="cap", name="MySiOx", tag="mid")
|
|
67
|
+
add_1d_region(mesh="cap", material="Si", region="MySiRegion", tag1="top", tag2="mid")
|
|
68
|
+
add_1d_region(mesh="cap", material="Ox", region="MyOxRegion", tag1="mid", tag2="bot")
|
|
69
|
+
finalize_mesh(mesh="cap")
|
|
70
|
+
create_device(mesh="cap", device=device)
|
|
71
|
+
|
|
72
|
+
set_parameter(
|
|
73
|
+
device=device, region="MySiRegion", name="Permittivity", value=11.1 * 8.85e-14
|
|
74
|
+
)
|
|
75
|
+
set_parameter(device=device, region="MySiRegion", name="ElectricCharge", value=1.6e-19)
|
|
76
|
+
|
|
77
|
+
set_parameter(
|
|
78
|
+
device=device, region="MyOxRegion", name="Permittivity", value=3.9 * 8.85e-14
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
set_parameter(device=device, region="MyOxRegion", name="ElectricCharge", value=1.6e-19)
|
|
82
|
+
|
|
83
|
+
for region in regions:
|
|
84
|
+
node_solution(device=device, region=region, name="Potential")
|
|
85
|
+
edge_from_node_model(device=device, region=region, node_model="Potential")
|
|
86
|
+
|
|
87
|
+
edge_model(
|
|
88
|
+
device=device,
|
|
89
|
+
region=region,
|
|
90
|
+
name="ElectricField",
|
|
91
|
+
equation="(Potential@n0 - Potential@n1)*EdgeInverseLength",
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
edge_model(
|
|
95
|
+
device=device,
|
|
96
|
+
region=region,
|
|
97
|
+
name="ElectricField:Potential@n0",
|
|
98
|
+
equation="EdgeInverseLength",
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
edge_model(
|
|
102
|
+
device=device,
|
|
103
|
+
region=region,
|
|
104
|
+
name="ElectricField:Potential@n1",
|
|
105
|
+
equation="-EdgeInverseLength",
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
edge_model(
|
|
109
|
+
device=device,
|
|
110
|
+
region=region,
|
|
111
|
+
name="PotentialEdgeFlux",
|
|
112
|
+
equation="Permittivity*ElectricField",
|
|
113
|
+
)
|
|
114
|
+
edge_model(
|
|
115
|
+
device=device,
|
|
116
|
+
region=region,
|
|
117
|
+
name="PotentialEdgeFlux:Potential@n0",
|
|
118
|
+
equation="diff(Permittivity*ElectricField, Potential@n0)",
|
|
119
|
+
)
|
|
120
|
+
edge_model(
|
|
121
|
+
device=device,
|
|
122
|
+
region=region,
|
|
123
|
+
name="PotentialEdgeFlux:Potential@n1",
|
|
124
|
+
equation="-PotentialEdgeFlux:Potential@n0",
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
equation(
|
|
128
|
+
device=device,
|
|
129
|
+
region=region,
|
|
130
|
+
name="PotentialEquation",
|
|
131
|
+
variable_name="Potential",
|
|
132
|
+
node_model="",
|
|
133
|
+
edge_model="PotentialEdgeFlux",
|
|
134
|
+
time_node_model="",
|
|
135
|
+
variable_update="default",
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
set_parameter(device=device, region="MySiRegion", name="topbias", value=1.0)
|
|
139
|
+
set_parameter(device=device, region="MyOxRegion", name="botbias", value=0.0)
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
conteq = "Permittivity*ElectricField"
|
|
143
|
+
|
|
144
|
+
node_model(
|
|
145
|
+
device=device,
|
|
146
|
+
region="MySiRegion",
|
|
147
|
+
name="topnode_model",
|
|
148
|
+
equation="Potential - topbias",
|
|
149
|
+
)
|
|
150
|
+
node_model(
|
|
151
|
+
device=device, region="MySiRegion", name="topnode_model:Potential", equation="1"
|
|
152
|
+
)
|
|
153
|
+
edge_model(
|
|
154
|
+
device=device, region="MySiRegion", name="contactcharge_edge_top", equation=conteq
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
node_model(
|
|
158
|
+
device=device,
|
|
159
|
+
region="MyOxRegion",
|
|
160
|
+
name="botnode_model",
|
|
161
|
+
equation="Potential - botbias",
|
|
162
|
+
)
|
|
163
|
+
node_model(
|
|
164
|
+
device=device, region="MyOxRegion", name="botnode_model:Potential", equation="1"
|
|
165
|
+
)
|
|
166
|
+
edge_model(
|
|
167
|
+
device=device,
|
|
168
|
+
region="MyOxRegion",
|
|
169
|
+
name="contactcharge_edge_bottom",
|
|
170
|
+
equation=conteq,
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
contact_equation(
|
|
174
|
+
device=device,
|
|
175
|
+
contact="top",
|
|
176
|
+
name="PotentialEquation",
|
|
177
|
+
node_model="topnode_model",
|
|
178
|
+
edge_model="",
|
|
179
|
+
node_charge_model="",
|
|
180
|
+
edge_charge_model="contactcharge_edge_top",
|
|
181
|
+
node_current_model="",
|
|
182
|
+
edge_current_model="",
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
contact_equation(
|
|
186
|
+
device=device,
|
|
187
|
+
contact="bot",
|
|
188
|
+
name="PotentialEquation",
|
|
189
|
+
node_model="botnode_model",
|
|
190
|
+
edge_model="",
|
|
191
|
+
node_charge_model="",
|
|
192
|
+
edge_charge_model="contactcharge_edge_bottom",
|
|
193
|
+
node_current_model="",
|
|
194
|
+
edge_current_model="",
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
# type continuous means that regular equations in both regions are swapped into the primary region
|
|
198
|
+
interface_model(
|
|
199
|
+
device=device,
|
|
200
|
+
interface=interface,
|
|
201
|
+
name="continuousPotential",
|
|
202
|
+
equation="Potential@r0-Potential@r1",
|
|
203
|
+
)
|
|
204
|
+
interface_model(
|
|
205
|
+
device=device,
|
|
206
|
+
interface=interface,
|
|
207
|
+
name="continuousPotential:Potential@r0",
|
|
208
|
+
equation="1",
|
|
209
|
+
)
|
|
210
|
+
interface_model(
|
|
211
|
+
device=device,
|
|
212
|
+
interface=interface,
|
|
213
|
+
name="continuousPotential:Potential@r1",
|
|
214
|
+
equation="-1",
|
|
215
|
+
)
|
|
216
|
+
interface_equation(
|
|
217
|
+
device=device,
|
|
218
|
+
interface=interface,
|
|
219
|
+
name="PotentialEquation",
|
|
220
|
+
interface_model="continuousPotential",
|
|
221
|
+
type="continuous",
|
|
222
|
+
)
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
solve(type="dc", absolute_error=1.0, relative_error=1e-10, maximum_iterations=30)
|
|
226
|
+
|
|
227
|
+
print((get_contact_charge(device=device, contact="top", equation="PotentialEquation")))
|
|
228
|
+
print((get_contact_charge(device=device, contact="bot", equation="PotentialEquation")))
|
|
229
|
+
|
|
230
|
+
print_edge_values(device=device, region="MySiRegion", name="PotentialEdgeFlux")
|
|
231
|
+
print_edge_values(device=device, region="MyOxRegion", name="PotentialEdgeFlux")
|
|
232
|
+
set_parameter(
|
|
233
|
+
device=device, region="MySiRegion", name="Permittivity", value=1.0 * 8.85e-14
|
|
234
|
+
)
|
|
235
|
+
set_parameter(
|
|
236
|
+
device=device, region="MyOxRegion", name="Permittivity", value=1.0 * 8.85e-14
|
|
237
|
+
)
|
|
238
|
+
print_edge_values(device=device, region="MySiRegion", name="PotentialEdgeFlux")
|
|
239
|
+
print_edge_values(device=device, region="MyOxRegion", name="PotentialEdgeFlux")
|
|
240
|
+
|
|
241
|
+
solve(type="dc", absolute_error=1.0, relative_error=1e-14, maximum_iterations=30)
|
|
242
|
+
print_edge_values(device=device, region="MySiRegion", name="PotentialEdgeFlux")
|
|
243
|
+
print_edge_values(device=device, region="MyOxRegion", name="PotentialEdgeFlux")
|
|
244
|
+
print((get_contact_charge(device=device, contact="top", equation="PotentialEquation")))
|
|
245
|
+
print((get_contact_charge(device=device, contact="bot", equation="PotentialEquation")))
|
|
246
|
+
|
|
247
|
+
set_parameter(device=device, name="Permittivity", value=11.1 * 8.85e-14)
|
|
248
|
+
set_parameter(
|
|
249
|
+
device=device, region="MySiRegion", name="Permittivity", value=11.1 * 8.85e-14
|
|
250
|
+
)
|
|
251
|
+
set_parameter(
|
|
252
|
+
device=device, region="MyOxRegion", name="Permittivity", value=3.9 * 8.85e-14
|
|
253
|
+
)
|
|
254
|
+
|
|
255
|
+
solve(type="dc", absolute_error=1.0, relative_error=1e-10, maximum_iterations=30)
|
|
256
|
+
print_edge_values(device=device, region="MySiRegion", name="PotentialEdgeFlux")
|
|
257
|
+
print_edge_values(device=device, region="MyOxRegion", name="PotentialEdgeFlux")
|
|
258
|
+
print_edge_values(device=device, region="MySiRegion", name="ElectricField")
|
|
259
|
+
print_edge_values(device=device, region="MyOxRegion", name="ElectricField")
|
|
260
|
+
print_node_values(device=device, region="MySiRegion", name="Potential")
|
|
261
|
+
print_node_values(device=device, region="MyOxRegion", name="Potential")
|
|
262
|
+
print((get_contact_charge(device=device, contact="top", equation="PotentialEquation")))
|
|
263
|
+
print((get_contact_charge(device=device, contact="bot", equation="PotentialEquation")))
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
#
|
|
267
|
+
# Edge Average Model
|
|
268
|
+
#
|
|
269
|
+
list1 = []
|
|
270
|
+
for i in ("ElectricField", "ElectricField:Potential@n0", "ElectricField:Potential@n1"):
|
|
271
|
+
list1.append(get_edge_model_values(device=device, region="MySiRegion", name=i))
|
|
272
|
+
print(*zip(*list1))
|
|
273
|
+
|
|
274
|
+
edge_average_model(
|
|
275
|
+
device=device,
|
|
276
|
+
region="MySiRegion",
|
|
277
|
+
edge_model="efield",
|
|
278
|
+
node_model="Potential",
|
|
279
|
+
average_type="negative_gradient",
|
|
280
|
+
)
|
|
281
|
+
edge_average_model(
|
|
282
|
+
device=device,
|
|
283
|
+
region="MySiRegion",
|
|
284
|
+
edge_model="efield",
|
|
285
|
+
node_model="Potential",
|
|
286
|
+
average_type="negative_gradient",
|
|
287
|
+
derivative="Potential",
|
|
288
|
+
)
|
|
289
|
+
|
|
290
|
+
list2 = []
|
|
291
|
+
for i in ("efield", "efield:Potential@n0", "efield:Potential@n1"):
|
|
292
|
+
list2.append(get_edge_model_values(device=device, region="MySiRegion", name=i))
|
|
293
|
+
print(*zip(*list2))
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
def get_rlist():
|
|
297
|
+
rlist = []
|
|
298
|
+
for r in get_region_list(device=device):
|
|
299
|
+
print("Region: " + r)
|
|
300
|
+
for e in get_equation_list(device=device, region=r):
|
|
301
|
+
print("Equation: " + e)
|
|
302
|
+
cmd = get_equation_command(device=device, region=r, name=e)
|
|
303
|
+
print("Options: " + str(cmd))
|
|
304
|
+
rlist.append(get_equation_command(device=device, region=r, name=e))
|
|
305
|
+
return rlist
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
def get_clist():
|
|
309
|
+
clist = []
|
|
310
|
+
for c in get_contact_list(device=device):
|
|
311
|
+
print("Contact: " + c)
|
|
312
|
+
for e in get_contact_equation_list(device=device, contact=c):
|
|
313
|
+
print("Contact Equation: " + e)
|
|
314
|
+
cmd = get_contact_equation_command(device=device, contact=c, name=e)
|
|
315
|
+
print("Options: " + str(cmd))
|
|
316
|
+
clist.append(cmd)
|
|
317
|
+
return clist
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
def get_ilist():
|
|
321
|
+
ilist = []
|
|
322
|
+
for i in get_interface_list(device=device):
|
|
323
|
+
print("Interface: " + i)
|
|
324
|
+
for e in get_interface_equation_list(device=device, interface=i):
|
|
325
|
+
print("Interface Equation: " + e)
|
|
326
|
+
cmd = get_interface_equation_command(device=device, interface=i, name=e)
|
|
327
|
+
print("Options: " + str(cmd))
|
|
328
|
+
ilist.append(cmd)
|
|
329
|
+
return ilist
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
rl = get_rlist()
|
|
333
|
+
cl = get_clist()
|
|
334
|
+
il = get_ilist()
|
|
335
|
+
|
|
336
|
+
print()
|
|
337
|
+
print()
|
|
338
|
+
|
|
339
|
+
for i in rl:
|
|
340
|
+
delete_equation(device=i["device"], region=i["region"], name=i["name"])
|
|
341
|
+
for i in il:
|
|
342
|
+
delete_interface_equation(
|
|
343
|
+
device=i["device"], interface=i["interface"], name=i["name"]
|
|
344
|
+
)
|
|
345
|
+
for i in cl:
|
|
346
|
+
delete_contact_equation(device=i["device"], contact=i["contact"], name=i["name"])
|
|
347
|
+
|
|
348
|
+
get_rlist()
|
|
349
|
+
get_clist()
|
|
350
|
+
get_ilist()
|
|
351
|
+
|
|
352
|
+
# solve(type="dc", absolute_error=1.0, relative_error=1e-10, maximum_iterations=30)
|
|
353
|
+
|
|
354
|
+
for r in rl:
|
|
355
|
+
equation(**r)
|
|
356
|
+
for c in cl:
|
|
357
|
+
contact_equation(**c)
|
|
358
|
+
for i in il:
|
|
359
|
+
interface_equation(**i)
|
|
360
|
+
|
|
361
|
+
solve(type="dc", absolute_error=1.0, relative_error=1e-10, maximum_iterations=30)
|
|
362
|
+
print(get_matrix_and_rhs())
|
|
363
|
+
|
|
364
|
+
node_solution(device=device, region="MySiRegion", name="testing")
|
|
365
|
+
set_node_value(device=device, region="MySiRegion", name="testing", value=8, index=3)
|
|
366
|
+
nv = get_node_model_values(device=device, region="MySiRegion", name="Potential")
|
|
367
|
+
print(nv)
|
|
368
|
+
set_node_value(device=device, region="MySiRegion", name="Potential", value=1.1)
|
|
369
|
+
print(get_node_model_values(device=device, region="MySiRegion", name="Potential"))
|
|
370
|
+
set_node_value(device=device, region="MySiRegion", name="Potential", value=0, index=3)
|
|
371
|
+
print(get_node_model_values(device=device, region="MySiRegion", name="Potential"))
|
|
372
|
+
set_node_values(
|
|
373
|
+
device=device, region="MySiRegion", name="Potential", init_from="testing"
|
|
374
|
+
)
|
|
375
|
+
print(get_node_model_values(device=device, region="MySiRegion", name="Potential"))
|
|
376
|
+
set_node_values(device=device, region="MySiRegion", name="Potential", values=nv)
|
|
377
|
+
print(get_node_model_values(device=device, region="MySiRegion", name="Potential"))
|
|
378
|
+
|
|
379
|
+
solve(type="dc", absolute_error=1.0, relative_error=1e-10, maximum_iterations=30)
|
|
380
|
+
|
|
381
|
+
print_edge_values(device=device, region="MySiRegion", name="ElectricField")
|
|
382
|
+
edge_solution(device=device, region="MySiRegion", name="testcopy1")
|
|
383
|
+
print_edge_values(device=device, region="MySiRegion", name="testcopy1")
|
|
384
|
+
set_edge_values(
|
|
385
|
+
device=device, region="MySiRegion", name="testcopy1", init_from="ElectricField"
|
|
386
|
+
)
|
|
387
|
+
print_edge_values(device=device, region="MySiRegion", name="testcopy1")
|
|
388
|
+
v = list(get_edge_model_values(device=device, region="MySiRegion", name="testcopy1"))
|
|
389
|
+
v[0] = -1
|
|
390
|
+
v[-1] = +2
|
|
391
|
+
set_edge_values(device=device, region="MySiRegion", name="testcopy1", values=v)
|
|
392
|
+
print_edge_values(device=device, region="MySiRegion", name="testcopy1")
|
|
393
|
+
edge_model(
|
|
394
|
+
device=device,
|
|
395
|
+
region="MySiRegion",
|
|
396
|
+
name="testcopy2",
|
|
397
|
+
equation="ElectricField-testcopy1",
|
|
398
|
+
)
|
|
399
|
+
print_edge_values(device=device, region="MySiRegion", name="testcopy2")
|
|
400
|
+
|
|
401
|
+
delete_edge_model(device=device, region="MySiRegion", name="ElectricField")
|
|
402
|
+
delete_node_model(device=device, region="MySiRegion", name="Potential")
|
|
403
|
+
delete_interface_model(device=device, interface=interface, name="continuousPotential")
|
|
404
|
+
|
|
405
|
+
x = get_node_model_values(device=device, region="MySiRegion", name="testing")
|
|
406
|
+
print(x)
|
|
407
|
+
x[0] = 1
|
|
408
|
+
print(x)
|
|
409
|
+
set_node_values(device=device, region="MySiRegion", name="testing", values=x)
|
|
410
|
+
set_node_values(device=device, region="MySiRegion", name="testing", values=list(x))
|
|
411
|
+
x = get_node_model_values(device=device, region="MySiRegion", name="testing")
|
|
412
|
+
x[1] = 2
|
|
413
|
+
print(x)
|
|
414
|
+
set_node_values(device=device, region="MySiRegion", name="testing", values=x.tobytes())
|
|
415
|
+
x = get_node_model_values(device=device, region="MySiRegion", name="testing")
|
|
416
|
+
x = b"\x00" * 8 * 6
|
|
417
|
+
print(x)
|
|
418
|
+
set_node_values(device=device, region="MySiRegion", name="testing", values=x)
|
|
419
|
+
x = get_node_model_values(device=device, region="MySiRegion", name="testing")
|
|
420
|
+
print(x)
|
|
421
|
+
x = array.array("i", [-1] * 6)
|
|
422
|
+
print(x)
|
|
423
|
+
set_node_values(device=device, region="MySiRegion", name="testing", values=x)
|
|
424
|
+
x = get_node_model_values(device=device, region="MySiRegion", name="testing")
|
|
425
|
+
print(x)
|
|
426
|
+
x = x.tobytes()
|
|
427
|
+
print(x)
|
|
428
|
+
x = get_node_model_values(device=device, region="MySiRegion", name="testing")
|
|
429
|
+
print(x)
|
|
430
|
+
x = array.array("i", b"\x01\x00\x00\x00" * 6)
|
|
431
|
+
print(x)
|
|
432
|
+
set_node_values(device=device, region="MySiRegion", name="testing", values=x)
|
|
433
|
+
x = get_node_model_values(device=device, region="MySiRegion", name="testing")
|
|
434
|
+
print(x)
|
|
435
|
+
x = array.array("Q", b"\x01\x00\x00\x00\x00\x00\x00\x00" * 6)
|
|
436
|
+
print(x)
|
|
437
|
+
set_node_values(device=device, region="MySiRegion", name="testing", values=x.tobytes())
|
|
438
|
+
x = get_node_model_values(device=device, region="MySiRegion", name="testing")
|
|
439
|
+
print(x)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Copyright 2013 DEVSIM LLC
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
|
|
5
|
+
from devsim import (
|
|
6
|
+
add_1d_contact,
|
|
7
|
+
add_1d_mesh_line,
|
|
8
|
+
add_1d_region,
|
|
9
|
+
create_1d_mesh,
|
|
10
|
+
finalize_mesh,
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def cap_mesh(region_name, material_name):
|
|
15
|
+
"""
|
|
16
|
+
Creates a simple cap mesh named cap1 for test purposes with a given region name
|
|
17
|
+
Contacts, top, bot
|
|
18
|
+
length 1.0
|
|
19
|
+
material "Ox"
|
|
20
|
+
mesh can be instantiated as a device
|
|
21
|
+
"""
|
|
22
|
+
create_1d_mesh(mesh="cap1")
|
|
23
|
+
for p, s, t in ((0.0, 0.1, "top"), (1.0, 0.1, "bot")):
|
|
24
|
+
add_1d_mesh_line(mesh="cap1", pos=p, ps=s, tag=t)
|
|
25
|
+
|
|
26
|
+
for t in ("top", "bot"):
|
|
27
|
+
add_1d_contact(mesh="cap1", name=t, tag=t, material="metal")
|
|
28
|
+
|
|
29
|
+
add_1d_region(
|
|
30
|
+
mesh="cap1", material=material_name, region=region_name, tag1="top", tag2="bot"
|
|
31
|
+
)
|
|
32
|
+
finalize_mesh(mesh="cap1")
|
|
33
|
+
return "cap1"
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Copyright 2013 DEVSIM LLC
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
|
|
5
|
+
#### circ1.tcl
|
|
6
|
+
####
|
|
7
|
+
#### two devices which connected to one another
|
|
8
|
+
|
|
9
|
+
import devsim
|
|
10
|
+
import test_common
|
|
11
|
+
|
|
12
|
+
devices = ("MyDevice1", "MyDevice2")
|
|
13
|
+
region = "MyRegion"
|
|
14
|
+
|
|
15
|
+
####
|
|
16
|
+
#### Meshing
|
|
17
|
+
####
|
|
18
|
+
test_common.CreateSimpleMesh(device=devices[0], region=region)
|
|
19
|
+
devsim.create_device(mesh="dog", device=devices[1])
|
|
20
|
+
|
|
21
|
+
for device in devices:
|
|
22
|
+
test_common.SetupResistorConstants(device=device, region="")
|
|
23
|
+
test_common.SetupInitialResistorSystem(device, region)
|
|
24
|
+
|
|
25
|
+
devsim.add_circuit_node(name="cnode1", variable_update="log_damp")
|
|
26
|
+
devsim.circuit_element(name="R1", n1="cnode1", n2=0, value=1e15)
|
|
27
|
+
|
|
28
|
+
# ground these contacts
|
|
29
|
+
devsim.set_parameter(device="MyDevice1", name="topbias", value=0.0)
|
|
30
|
+
devsim.set_parameter(device="MyDevice2", name="botbias", value=0.0)
|
|
31
|
+
|
|
32
|
+
test_common.SetupInitialResistorContact(
|
|
33
|
+
device="MyDevice1", contact="top", use_circuit_bias=False
|
|
34
|
+
)
|
|
35
|
+
test_common.SetupInitialResistorContact(
|
|
36
|
+
device="MyDevice1", contact="bot", use_circuit_bias=True, circuit_node="cnode1"
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
test_common.SetupInitialResistorContact(
|
|
40
|
+
device="MyDevice2", contact="top", use_circuit_bias=True, circuit_node="cnode1"
|
|
41
|
+
)
|
|
42
|
+
test_common.SetupInitialResistorContact(
|
|
43
|
+
device="MyDevice2", contact="bot", use_circuit_bias=False
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
devsim.solve(type="dc", absolute_error=1.0, relative_error=1e-14, maximum_iterations=30)
|
|
47
|
+
|
|
48
|
+
for device in devices:
|
|
49
|
+
print(device)
|
|
50
|
+
for name in ("Potential", "IntrinsicElectrons"):
|
|
51
|
+
devsim.print_node_values(device=device, region=region, name=name)
|
|
52
|
+
|
|
53
|
+
for device in devices:
|
|
54
|
+
test_common.SetupCarrierResistorSystem(device=device, region=region)
|
|
55
|
+
|
|
56
|
+
test_common.SetupCarrierResistorContact(
|
|
57
|
+
device="MyDevice1", contact="top", use_circuit_bias=False
|
|
58
|
+
)
|
|
59
|
+
test_common.SetupCarrierResistorContact(
|
|
60
|
+
device="MyDevice1", contact="bot", use_circuit_bias=True, circuit_node="cnode1"
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
test_common.SetupCarrierResistorContact(
|
|
64
|
+
device="MyDevice2", contact="top", use_circuit_bias=True, circuit_node="cnode1"
|
|
65
|
+
)
|
|
66
|
+
test_common.SetupCarrierResistorContact(
|
|
67
|
+
device="MyDevice2", contact="bot", use_circuit_bias=False
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
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):
|
|
71
|
+
print("topbias %f" % v)
|
|
72
|
+
devsim.set_parameter(device="MyDevice1", name="topbias", value=v)
|
|
73
|
+
devsim.solve(
|
|
74
|
+
type="dc", absolute_error=1, relative_error=1e-9, maximum_iterations=30
|
|
75
|
+
)
|
|
76
|
+
test_common.print_circuit_solution()
|
|
77
|
+
for device in devices:
|
|
78
|
+
test_common.printResistorCurrent(device=device, contact="top")
|
|
79
|
+
test_common.printResistorCurrent(device=device, contact="bot")
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Copyright 2013 DEVSIM LLC
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
|
|
5
|
+
#### circ2.tcl
|
|
6
|
+
####
|
|
7
|
+
#### Copy of circ1 where the contact connections have moved around
|
|
8
|
+
|
|
9
|
+
import devsim
|
|
10
|
+
import test_common
|
|
11
|
+
|
|
12
|
+
devices = ("MyDevice1", "MyDevice2")
|
|
13
|
+
region = "MyRegion"
|
|
14
|
+
|
|
15
|
+
####
|
|
16
|
+
#### Meshing
|
|
17
|
+
####
|
|
18
|
+
test_common.CreateSimpleMesh(device=devices[0], region=region)
|
|
19
|
+
devsim.create_device(mesh="dog", device=devices[1])
|
|
20
|
+
|
|
21
|
+
for device in devices:
|
|
22
|
+
test_common.SetupResistorConstants(device=device, region="")
|
|
23
|
+
test_common.SetupInitialResistorSystem(device, region)
|
|
24
|
+
|
|
25
|
+
devsim.add_circuit_node(name="cnode1", variable_update="log_damp")
|
|
26
|
+
devsim.circuit_element(name="R1", n1="cnode1", n2=0, value=1e15)
|
|
27
|
+
|
|
28
|
+
# ground these contacts
|
|
29
|
+
devsim.set_parameter(device="MyDevice1", name="topbias", value=0.0)
|
|
30
|
+
devsim.set_parameter(device="MyDevice2", name="botbias", value=0.0)
|
|
31
|
+
|
|
32
|
+
test_common.SetupInitialResistorContact(
|
|
33
|
+
device="MyDevice1", contact="top", use_circuit_bias=True, circuit_node="cnode1"
|
|
34
|
+
)
|
|
35
|
+
test_common.SetupInitialResistorContact(
|
|
36
|
+
device="MyDevice1", contact="bot", use_circuit_bias=False, circuit_node="topbias"
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
test_common.SetupInitialResistorContact(
|
|
40
|
+
device="MyDevice2", contact="top", use_circuit_bias=True, circuit_node="cnode1"
|
|
41
|
+
)
|
|
42
|
+
test_common.SetupInitialResistorContact(
|
|
43
|
+
device="MyDevice2", contact="bot", use_circuit_bias=False
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
devsim.solve(type="dc", absolute_error=1.0, relative_error=1e-14, maximum_iterations=30)
|
|
47
|
+
|
|
48
|
+
for device in devices:
|
|
49
|
+
print(device)
|
|
50
|
+
for name in ("Potential", "IntrinsicElectrons"):
|
|
51
|
+
devsim.print_node_values(device=device, region=region, name=name)
|
|
52
|
+
|
|
53
|
+
for device in devices:
|
|
54
|
+
test_common.SetupCarrierResistorSystem(device=device, region=region)
|
|
55
|
+
|
|
56
|
+
test_common.SetupCarrierResistorContact(
|
|
57
|
+
device="MyDevice1", contact="top", use_circuit_bias=True, circuit_node="cnode1"
|
|
58
|
+
)
|
|
59
|
+
test_common.SetupCarrierResistorContact(
|
|
60
|
+
device="MyDevice1", contact="bot", use_circuit_bias=False, circuit_node="topbias"
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
test_common.SetupCarrierResistorContact(
|
|
64
|
+
device="MyDevice2", contact="top", use_circuit_bias=True, circuit_node="cnode1"
|
|
65
|
+
)
|
|
66
|
+
test_common.SetupCarrierResistorContact(
|
|
67
|
+
device="MyDevice2", contact="bot", use_circuit_bias=False
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
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):
|
|
71
|
+
print("topbias %f" % v)
|
|
72
|
+
devsim.set_parameter(device="MyDevice1", name="topbias", value=v)
|
|
73
|
+
devsim.solve(
|
|
74
|
+
type="dc", absolute_error=1, relative_error=1e-9, maximum_iterations=30
|
|
75
|
+
)
|
|
76
|
+
test_common.print_circuit_solution()
|
|
77
|
+
for device in devices:
|
|
78
|
+
test_common.printResistorCurrent(device=device, contact="top")
|
|
79
|
+
test_common.printResistorCurrent(device=device, contact="bot")
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Copyright 2013 DEVSIM LLC
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
|
|
5
|
+
# basic linear circuit solved by itself
|
|
6
|
+
import devsim
|
|
7
|
+
import test_common
|
|
8
|
+
|
|
9
|
+
devsim.circuit_element(name="V1", n1=1, n2=0, value=1.0)
|
|
10
|
+
devsim.circuit_element(name="R1", n1=1, n2=2, value=5)
|
|
11
|
+
devsim.circuit_element(name="R2", 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
|
+
|
|
16
|
+
devsim.circuit_alter(name="V1", value=2.0)
|
|
17
|
+
devsim.solve(type="dc", absolute_error=1.0, relative_error=1e-14, maximum_iterations=3)
|
|
18
|
+
test_common.print_circuit_solution()
|