devsim 2.12.0__cp315-abi3t-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.
Files changed (152) hide show
  1. devsim/__init__.py +33 -0
  2. devsim/__init__.pyi +2155 -0
  3. devsim/devsim_py3.pyd +0 -0
  4. devsim/python_packages/Klaassen.py +336 -0
  5. devsim/python_packages/__init__.py +0 -0
  6. devsim/python_packages/fermi_physics.py +31 -0
  7. devsim/python_packages/model_create.py +261 -0
  8. devsim/python_packages/mos_physics.py +170 -0
  9. devsim/python_packages/pythonmesh.py +131 -0
  10. devsim/python_packages/ramp.py +101 -0
  11. devsim/python_packages/simple_dd.py +75 -0
  12. devsim/python_packages/simple_physics.py +463 -0
  13. devsim/umfpack/umfpack_lgpl.dll +0 -0
  14. devsim/umfpack/umfpack_loader.py +538 -0
  15. devsim/umfpack/umfshim.py +115 -0
  16. devsim-2.12.0.data/data/devsim_data/BUILD.md +135 -0
  17. devsim-2.12.0.data/data/devsim_data/CHANGES.md +935 -0
  18. devsim-2.12.0.data/data/devsim_data/CITATION.cff +33 -0
  19. devsim-2.12.0.data/data/devsim_data/CITATION.md +23 -0
  20. devsim-2.12.0.data/data/devsim_data/CODE_OF_CONDUCT.md +74 -0
  21. devsim-2.12.0.data/data/devsim_data/CONTRIBUTING.md +43 -0
  22. devsim-2.12.0.data/data/devsim_data/HOWTO.md +25 -0
  23. devsim-2.12.0.data/data/devsim_data/INSTALL.md +84 -0
  24. devsim-2.12.0.data/data/devsim_data/LICENSE +202 -0
  25. devsim-2.12.0.data/data/devsim_data/NOTICE +241 -0
  26. devsim-2.12.0.data/data/devsim_data/README.md +99 -0
  27. devsim-2.12.0.data/data/devsim_data/TEST.md +13 -0
  28. devsim-2.12.0.data/data/devsim_data/VERSION +3 -0
  29. devsim-2.12.0.data/data/devsim_data/doc/devsim.pdf +0 -0
  30. devsim-2.12.0.data/data/devsim_data/doc/symdiff.pdf +0 -0
  31. devsim-2.12.0.data/data/devsim_data/examples/bioapp1/Ve0.jpg +0 -0
  32. devsim-2.12.0.data/data/devsim_data/examples/bioapp1/Ve0_3d.jpg +0 -0
  33. devsim-2.12.0.data/data/devsim_data/examples/bioapp1/Ve7.jpg +0 -0
  34. devsim-2.12.0.data/data/devsim_data/examples/bioapp1/Ve7_3d.jpg +0 -0
  35. devsim-2.12.0.data/data/devsim_data/examples/bioapp1/bioapp1_2d.py +85 -0
  36. devsim-2.12.0.data/data/devsim_data/examples/bioapp1/bioapp1_3d.py +85 -0
  37. devsim-2.12.0.data/data/devsim_data/examples/bioapp1/bioapp1_common.py +399 -0
  38. devsim-2.12.0.data/data/devsim_data/examples/bioapp1/disk_2d.geo +62 -0
  39. devsim-2.12.0.data/data/devsim_data/examples/bioapp1/disk_2d.msh +65606 -0
  40. devsim-2.12.0.data/data/devsim_data/examples/bioapp1/disk_3d.geo +183 -0
  41. devsim-2.12.0.data/data/devsim_data/examples/bioapp1/disk_3d.msh +25808 -0
  42. devsim-2.12.0.data/data/devsim_data/examples/capacitance/cap.lay +1587 -0
  43. devsim-2.12.0.data/data/devsim_data/examples/capacitance/cap1d.py +155 -0
  44. devsim-2.12.0.data/data/devsim_data/examples/capacitance/cap2d.py +200 -0
  45. devsim-2.12.0.data/data/devsim_data/examples/diode/3dblock.geo +48 -0
  46. devsim-2.12.0.data/data/devsim_data/examples/diode/diode_1d.py +94 -0
  47. devsim-2.12.0.data/data/devsim_data/examples/diode/diode_1d_custom.py +159 -0
  48. devsim-2.12.0.data/data/devsim_data/examples/diode/diode_2d.py +68 -0
  49. devsim-2.12.0.data/data/devsim_data/examples/diode/diode_common.py +253 -0
  50. devsim-2.12.0.data/data/devsim_data/examples/diode/diode_current.lay +3271 -0
  51. devsim-2.12.0.data/data/devsim_data/examples/diode/diode_density.lay +3271 -0
  52. devsim-2.12.0.data/data/devsim_data/examples/diode/diode_potential.lay +3272 -0
  53. devsim-2.12.0.data/data/devsim_data/examples/diode/gmsh_diode2d.msh +1477 -0
  54. devsim-2.12.0.data/data/devsim_data/examples/diode/gmsh_diode2d.py +55 -0
  55. devsim-2.12.0.data/data/devsim_data/examples/diode/gmsh_diode3d.msh +8557 -0
  56. devsim-2.12.0.data/data/devsim_data/examples/diode/gmsh_diode3d.py +74 -0
  57. devsim-2.12.0.data/data/devsim_data/examples/diode/gmsh_diode3d_equil.py +43 -0
  58. devsim-2.12.0.data/data/devsim_data/examples/diode/gmsh_diode3d_float128.py +85 -0
  59. devsim-2.12.0.data/data/devsim_data/examples/diode/laux2d.py +43 -0
  60. devsim-2.12.0.data/data/devsim_data/examples/diode/laux3d.py +54 -0
  61. devsim-2.12.0.data/data/devsim_data/examples/diode/laux_common.py +503 -0
  62. devsim-2.12.0.data/data/devsim_data/examples/diode/pythonmesh3d.py +61 -0
  63. devsim-2.12.0.data/data/devsim_data/examples/diode/ssac_diode.py +57 -0
  64. devsim-2.12.0.data/data/devsim_data/examples/diode/tran_diode.py +63 -0
  65. devsim-2.12.0.data/data/devsim_data/examples/mobility/gmsh_mos2d.geo +160 -0
  66. devsim-2.12.0.data/data/devsim_data/examples/mobility/gmsh_mos2d.msh +8599 -0
  67. devsim-2.12.0.data/data/devsim_data/examples/mobility/gmsh_mos2d.py +96 -0
  68. devsim-2.12.0.data/data/devsim_data/examples/mobility/gmsh_mos2d_create.py +174 -0
  69. devsim-2.12.0.data/data/devsim_data/examples/mobility/gmsh_mos2d_kla.py +162 -0
  70. devsim-2.12.0.data/data/devsim_data/examples/mobility/logElectrons.lay +1327 -0
  71. devsim-2.12.0.data/data/devsim_data/examples/mobility/pythonmesh2d.py +100 -0
  72. devsim-2.12.0.data/data/devsim_data/examples/mobility/test.lay +3385 -0
  73. devsim-2.12.0.data/data/devsim_data/examples/mobility/times.txt +34 -0
  74. devsim-2.12.0.data/data/devsim_data/examples/plotting/visualization.ipynb +160 -0
  75. devsim-2.12.0.data/data/devsim_data/examples/vectorpotential/twowire.geo +34 -0
  76. devsim-2.12.0.data/data/devsim_data/examples/vectorpotential/twowire.lay +1469 -0
  77. devsim-2.12.0.data/data/devsim_data/examples/vectorpotential/twowire.msh +13596 -0
  78. devsim-2.12.0.data/data/devsim_data/examples/vectorpotential/twowire.py +177 -0
  79. devsim-2.12.0.data/data/devsim_data/pyproject.toml +33 -0
  80. devsim-2.12.0.data/data/devsim_data/setup.py +64 -0
  81. devsim-2.12.0.data/data/devsim_data/testing/3dtetmesh.msh +281 -0
  82. devsim-2.12.0.data/data/devsim_data/testing/CMakeLists.txt +174 -0
  83. devsim-2.12.0.data/data/devsim_data/testing/Fermi1.py +59 -0
  84. devsim-2.12.0.data/data/devsim_data/testing/Fermi1_float128.py +18 -0
  85. devsim-2.12.0.data/data/devsim_data/testing/GaussFermi.py +38 -0
  86. devsim-2.12.0.data/data/devsim_data/testing/GaussFermi_float128.py +18 -0
  87. devsim-2.12.0.data/data/devsim_data/testing/cap2.py +439 -0
  88. devsim-2.12.0.data/data/devsim_data/testing/cap_mesh.py +33 -0
  89. devsim-2.12.0.data/data/devsim_data/testing/circ1.py +79 -0
  90. devsim-2.12.0.data/data/devsim_data/testing/circ2.py +79 -0
  91. devsim-2.12.0.data/data/devsim_data/testing/circ3.py +18 -0
  92. devsim-2.12.0.data/data/devsim_data/testing/circ4.py +105 -0
  93. devsim-2.12.0.data/data/devsim_data/testing/dio2_element_2d.py +136 -0
  94. devsim-2.12.0.data/data/devsim_data/testing/dio2_element_physics.py +302 -0
  95. devsim-2.12.0.data/data/devsim_data/testing/equation1.py +68 -0
  96. devsim-2.12.0.data/data/devsim_data/testing/erf1.py +52 -0
  97. devsim-2.12.0.data/data/devsim_data/testing/erf2.py +34 -0
  98. devsim-2.12.0.data/data/devsim_data/testing/fpetest1.py +21 -0
  99. devsim-2.12.0.data/data/devsim_data/testing/fpetest2.py +25 -0
  100. devsim-2.12.0.data/data/devsim_data/testing/gmsh_mos3d.geo +272 -0
  101. devsim-2.12.0.data/data/devsim_data/testing/info.py +15 -0
  102. devsim-2.12.0.data/data/devsim_data/testing/kahan.py +24 -0
  103. devsim-2.12.0.data/data/devsim_data/testing/kahan_float128.py +18 -0
  104. devsim-2.12.0.data/data/devsim_data/testing/laux1.py +232 -0
  105. devsim-2.12.0.data/data/devsim_data/testing/mctest.mc +30 -0
  106. devsim-2.12.0.data/data/devsim_data/testing/mctest_user.mc +33 -0
  107. devsim-2.12.0.data/data/devsim_data/testing/mesh1.msh +52 -0
  108. devsim-2.12.0.data/data/devsim_data/testing/mesh1.py +121 -0
  109. devsim-2.12.0.data/data/devsim_data/testing/mesh2.msh +70 -0
  110. devsim-2.12.0.data/data/devsim_data/testing/mesh2.py +210 -0
  111. devsim-2.12.0.data/data/devsim_data/testing/mesh2d.py +105 -0
  112. devsim-2.12.0.data/data/devsim_data/testing/mesh3.py +8 -0
  113. devsim-2.12.0.data/data/devsim_data/testing/mesh4.py +8 -0
  114. devsim-2.12.0.data/data/devsim_data/testing/mos_2d.py +111 -0
  115. devsim-2.12.0.data/data/devsim_data/testing/mos_2d_create.py +207 -0
  116. devsim-2.12.0.data/data/devsim_data/testing/mos_2d_restart.py +69 -0
  117. devsim-2.12.0.data/data/devsim_data/testing/mos_2d_restart2.py +24 -0
  118. devsim-2.12.0.data/data/devsim_data/testing/noise_res.py +51 -0
  119. devsim-2.12.0.data/data/devsim_data/testing/noise_res_2d.py +101 -0
  120. devsim-2.12.0.data/data/devsim_data/testing/other_blas.py +28 -0
  121. devsim-2.12.0.data/data/devsim_data/testing/ptest1.py +53 -0
  122. devsim-2.12.0.data/data/devsim_data/testing/ptest2.py +110 -0
  123. devsim-2.12.0.data/data/devsim_data/testing/pythonmesh1d.py +202 -0
  124. devsim-2.12.0.data/data/devsim_data/testing/res1.py +65 -0
  125. devsim-2.12.0.data/data/devsim_data/testing/res2.py +65 -0
  126. devsim-2.12.0.data/data/devsim_data/testing/res3.py +59 -0
  127. devsim-2.12.0.data/data/devsim_data/testing/rundifftest.py +62 -0
  128. devsim-2.12.0.data/data/devsim_data/testing/ssac_cap.py +145 -0
  129. devsim-2.12.0.data/data/devsim_data/testing/ssac_cap_2d_edge.py +199 -0
  130. devsim-2.12.0.data/data/devsim_data/testing/ssac_cap_2d_element.py +214 -0
  131. devsim-2.12.0.data/data/devsim_data/testing/ssac_cap_3d_edge.py +148 -0
  132. devsim-2.12.0.data/data/devsim_data/testing/ssac_cap_3d_element.py +167 -0
  133. devsim-2.12.0.data/data/devsim_data/testing/ssac_circ.py +18 -0
  134. devsim-2.12.0.data/data/devsim_data/testing/ssac_res.py +30 -0
  135. devsim-2.12.0.data/data/devsim_data/testing/symdiff1.py +54 -0
  136. devsim-2.12.0.data/data/devsim_data/testing/test_common.py +435 -0
  137. devsim-2.12.0.data/data/devsim_data/testing/testfunc.py +65 -0
  138. devsim-2.12.0.data/data/devsim_data/testing/testfunc_extended.py +8 -0
  139. devsim-2.12.0.data/data/devsim_data/testing/transient_circ.py +67 -0
  140. devsim-2.12.0.data/data/devsim_data/testing/transient_circ2.py +67 -0
  141. devsim-2.12.0.data/data/devsim_data/testing/transient_circ3.py +125 -0
  142. devsim-2.12.0.data/data/devsim_data/testing/transient_rc.py +157 -0
  143. devsim-2.12.0.data/data/devsim_data/testing/trimesh1.msh +47 -0
  144. devsim-2.12.0.data/data/devsim_data/testing/trimesh1.py +114 -0
  145. devsim-2.12.0.data/data/devsim_data/testing/trimesh2.py +114 -0
  146. devsim-2.12.0.data/data/devsim_data/testing/utf8_2.py +126 -0
  147. devsim-2.12.0.dist-info/METADATA +122 -0
  148. devsim-2.12.0.dist-info/RECORD +152 -0
  149. devsim-2.12.0.dist-info/WHEEL +5 -0
  150. devsim-2.12.0.dist-info/licenses/LICENSE +202 -0
  151. devsim-2.12.0.dist-info/licenses/NOTICE +241 -0
  152. devsim-2.12.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,21 @@
1
+ # Copyright 2013 DEVSIM LLC
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
5
+ import devsim
6
+ import test_common
7
+
8
+ device = "MyDevice"
9
+ region = "MyRegion"
10
+
11
+ test_common.CreateSimpleMesh(device, region)
12
+
13
+ for name, equation in (
14
+ ("test1", "log(-1)"),
15
+ ("test2", "log(x)"),
16
+ ):
17
+ devsim.node_model(device=device, region=region, name=name, equation=equation)
18
+ try:
19
+ print(devsim.get_node_model_values(device=device, region=region, name=name))
20
+ except devsim.error as x:
21
+ print(x)
@@ -0,0 +1,25 @@
1
+ # Copyright 2013 DEVSIM LLC
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+ import devsim
5
+
6
+ devsim.set_parameter(name="threads_available", value=2)
7
+
8
+ import fpetest1 # noqa
9
+
10
+
11
+ for name, value in (
12
+ ("threads_available", 1),
13
+ ("threads_available", 0),
14
+ ("threads_available", -1),
15
+ ("threads_available", 2),
16
+ ):
17
+ devsim.set_parameter(name=name, value=value)
18
+ try:
19
+ print(
20
+ devsim.get_node_model_values(
21
+ device=fpetest1.device, region=fpetest1.region, name="test2"
22
+ )
23
+ )
24
+ except devsim.error as x:
25
+ print(x)
@@ -0,0 +1,272 @@
1
+ device_width = 1.0e-4;
2
+ gate_width = 1.0e-5;
3
+ diffusion_width = 0.4;
4
+
5
+ air_thickness = 1e-7;
6
+ oxide_thickness = 1e-5;
7
+ gate_thickness = 1e-5;
8
+ device_thickness = 1e-4;
9
+ diffusion_thickness = 1e-5;
10
+
11
+ y_channel_spacing = 1e-7;
12
+ y_diffusion_spacing = 1e-6;
13
+ y_gate_top_spacing = 1e-8;
14
+ y_gate_mid_spacing = gate_thickness * 0.25;
15
+ y_gate_bot_spacing = 1e-8;
16
+ y_oxide_mid_spacing = oxide_thickness * 0.25;
17
+ x_channel_spacing = 1e-6;
18
+ x_diffusion_spacing = 1e-5;
19
+ max_y_spacing = 1e-4;
20
+ max_x_spacing = 1e-2;
21
+ y_bulk_mid_spacing = device_thickness * 0.25;
22
+ y_bulk_bot_spacing = 1e-8;
23
+
24
+ x_bulk_left = 0.0;
25
+ x_bulk_right = x_bulk_left + device_width;
26
+ x_center = 0.5 * (x_bulk_left + x_bulk_right);
27
+ x_gate_left = x_center - 0.5 * (gate_width);
28
+ x_gate_right = x_center + 0.5 * (gate_width);
29
+ x_device_left = x_bulk_left - air_thickness;
30
+ x_device_right = x_bulk_right + air_thickness;
31
+
32
+ y_bulk_top = 0.0;
33
+ y_oxide_top = y_bulk_top - oxide_thickness;
34
+ y_oxide_mid = 0.5 * (y_oxide_top + y_bulk_top);
35
+ y_gate_top = y_oxide_top - gate_thickness;
36
+ y_gate_mid = 0.5 * (y_gate_top + y_oxide_top);
37
+ y_device_top = y_gate_top - air_thickness;
38
+ y_bulk_bot = y_bulk_top + device_thickness;
39
+ y_bulk_mid = 0.5 * (y_bulk_top + y_bulk_bot);
40
+ y_device_bot = y_bulk_bot + air_thickness;
41
+ y_diffusion = y_bulk_top + diffusion_thickness;
42
+
43
+ z1 = -1e-5;
44
+ z2 = -0.5e-5;
45
+ z3 = 0.5e-5;
46
+ z4 = 1e-5;
47
+
48
+ //// Bulk
49
+ Point( 1) = {x_bulk_left, y_bulk_top, z1, x_diffusion_spacing};
50
+ Point( 3) = {x_gate_left, y_bulk_top, z1, x_diffusion_spacing};
51
+ Point( 4) = {x_gate_right, y_bulk_top, z1, x_diffusion_spacing};
52
+ Point( 6) = {x_bulk_right, y_bulk_top, z1, x_diffusion_spacing};
53
+ Point( 7) = {x_bulk_right, y_bulk_bot, z1, x_diffusion_spacing};
54
+ Point( 8) = {x_bulk_left, y_bulk_bot, z1, x_diffusion_spacing};
55
+
56
+ Point( 9) = {x_gate_left, y_gate_top, z2, x_diffusion_spacing};
57
+ Point(10) = {x_gate_right, y_gate_top, z2, x_diffusion_spacing};
58
+ Point(11) = {x_gate_right, y_oxide_top, z2, x_diffusion_spacing};
59
+ Point(12) = {x_gate_left, y_oxide_top, z2, x_diffusion_spacing};
60
+
61
+ Point(15) = {x_gate_right, y_bulk_top, z2, x_diffusion_spacing};
62
+ Point(16) = {x_gate_left, y_bulk_top, z2, x_diffusion_spacing};
63
+
64
+ Point(101) = {x_bulk_left, y_bulk_top, z4, x_diffusion_spacing};
65
+ Point(103) = {x_gate_left, y_bulk_top, z4, x_diffusion_spacing};
66
+ Point(104) = {x_gate_right, y_bulk_top, z4, x_diffusion_spacing};
67
+ Point(106) = {x_bulk_right, y_bulk_top, z4, x_diffusion_spacing};
68
+ Point(107) = {x_bulk_right, y_bulk_bot, z4, x_diffusion_spacing};
69
+ Point(108) = {x_bulk_left, y_bulk_bot, z4, x_diffusion_spacing};
70
+
71
+ Point(109) = {x_gate_left, y_gate_top, z3, x_diffusion_spacing};
72
+ Point(110) = {x_gate_right, y_gate_top, z3, x_diffusion_spacing};
73
+ Point(111) = {x_gate_right, y_oxide_top, z3, x_diffusion_spacing};
74
+ Point(112) = {x_gate_left, y_oxide_top, z3, x_diffusion_spacing};
75
+
76
+ Point(115) = {x_gate_right, y_bulk_top, z3, x_diffusion_spacing};
77
+ Point(116) = {x_gate_left, y_bulk_top, z3, x_diffusion_spacing};
78
+
79
+
80
+ delta = 1e-6;
81
+ source_w = 5e-6;
82
+ x_source1 = x_bulk_left + delta;
83
+ x_source2 = x_gate_left - delta;
84
+ z_source1 = z1 + delta;
85
+ z_source2 = z4 - delta;
86
+ Point(120) = { x_source1, y_bulk_top, z_source1, x_diffusion_spacing};
87
+ Point(121) = { x_source1, y_bulk_top, z_source2, x_diffusion_spacing};
88
+ Point(122) = { x_source2, y_bulk_top, z_source1, x_diffusion_spacing};
89
+ Point(123) = { x_source2, y_bulk_top, z_source2, x_diffusion_spacing};
90
+ Point(124) = { x_source1, y_bulk_top, z1, x_diffusion_spacing};
91
+ Point(125) = { x_source1, y_bulk_top, z4, x_diffusion_spacing};
92
+ Point(126) = { x_source2, y_bulk_top, z1, x_diffusion_spacing};
93
+ Point(127) = { x_source2, y_bulk_top, z4, x_diffusion_spacing};
94
+
95
+ x_drain1 = x_bulk_right - delta;
96
+ x_drain2 = x_gate_right + delta;
97
+ z_drain1 = z1 + delta;
98
+ z_drain2 = z4 - delta;
99
+ Point(130) = { x_drain1, y_bulk_top, z_drain1, x_diffusion_spacing};
100
+ Point(131) = { x_drain1, y_bulk_top, z_drain2, x_diffusion_spacing};
101
+ Point(132) = { x_drain2, y_bulk_top, z_drain1, x_diffusion_spacing};
102
+ Point(133) = { x_drain2, y_bulk_top, z_drain2, x_diffusion_spacing};
103
+ Point(134) = { x_drain1, y_bulk_top, z1, x_diffusion_spacing};
104
+ Point(135) = { x_drain1, y_bulk_top, z4, x_diffusion_spacing};
105
+ Point(136) = { x_drain2, y_bulk_top, z1, x_diffusion_spacing};
106
+ Point(137) = { x_drain2, y_bulk_top, z4, x_diffusion_spacing};
107
+
108
+
109
+
110
+
111
+ Line(1) = {1, 101};
112
+ Line(3) = {106, 6};
113
+ Line(5) = {1, 8};
114
+ Line(6) = {108, 101};
115
+ Line(7) = {8, 7};
116
+ Line(8) = {108, 107};
117
+ Line(9) = {6, 7};
118
+ Line(10) = {107, 7};
119
+ Line(11) = {8, 108};
120
+ Line(12) = {106, 107};
121
+ Line(13) = {109, 112};
122
+ Line(14) = {112, 111};
123
+ Line(15) = {111, 11};
124
+ Line(16) = {110, 10};
125
+ Line(17) = {10, 9};
126
+ Line(18) = {109, 9};
127
+ Line(19) = {110, 109};
128
+ Line(20) = {11, 12};
129
+ Line(21) = {12, 9};
130
+ Line(22) = {12, 112};
131
+ Line(23) = {111, 110};
132
+ Line(24) = {10, 11};
133
+ Line(25) = {111, 115};
134
+ Line(26) = {15, 11};
135
+ Line(27) = {12, 16};
136
+ Line(28) = {112, 116};
137
+ Line(29) = {116, 16};
138
+ Line(30) = {115, 15};
139
+ Line(31) = {115, 116};
140
+ Line(32) = {15, 16};
141
+ Line(79) = {116, 103};
142
+ Line(80) = {104, 115};
143
+ Line(81) = {16, 3};
144
+ Line(82) = {4, 15};
145
+
146
+ // bulk oxide interface
147
+ Physical Surface(85) = {84};
148
+ Line(87) = {103, 104};
149
+ Line(90) = {4, 3};
150
+ Line(135) = {130, 132};
151
+ Line(136) = {133, 132};
152
+ Line(137) = {130, 131};
153
+ Line(138) = {133, 131};
154
+ Line(139) = {123, 121};
155
+ Line(140) = {120, 122};
156
+ Line(141) = {122, 123};
157
+ Line(142) = {120, 121};
158
+ Line(147) = {125, 121};
159
+ Line(148) = {120, 124};
160
+ Line(149) = {123, 127};
161
+ Line(150) = {122, 126};
162
+ Line(151) = {101, 125};
163
+ Line(152) = {125, 127};
164
+ Line(153) = {127, 103};
165
+ Line(154) = {1, 124};
166
+ Line(155) = {124, 126};
167
+ Line(156) = {126, 3};
168
+ Line(157) = {4, 136};
169
+ Line(158) = {136, 132};
170
+ Line(159) = {136, 134};
171
+ Line(160) = {134, 130};
172
+ Line(161) = {6, 134};
173
+ Line(162) = {131, 135};
174
+ Line(163) = {106, 135};
175
+ Line(164) = {104, 137};
176
+ Line(165) = {137, 135};
177
+ Line(166) = {133, 137};
178
+ Line Loop(167) = {29, 81, -156, -150, 141, 149, 153, -79};
179
+ Plane Surface(168) = {167};
180
+ Line Loop(169) = {82, -30, -80, 164, -166, 136, -158, -157};
181
+ Plane Surface(170) = {169};
182
+ Line Loop(171) = {32, 81, -90, 82};
183
+ Plane Surface(172) = {171};
184
+ Line Loop(173) = {32, -29, -31, 30};
185
+ Plane Surface(174) = {173};
186
+ Line Loop(175) = {31, 79, 87, 80};
187
+ Plane Surface(176) = {175};
188
+ Line Loop(177) = {25, 30, 26, -15};
189
+ Plane Surface(178) = {177};
190
+ Line Loop(179) = {25, 31, -28, 14};
191
+ Plane Surface(180) = {179};
192
+ Line Loop(181) = {22, 28, 29, -27};
193
+ Plane Surface(182) = {181};
194
+ Line Loop(183) = {20, 27, -32, 26};
195
+ Plane Surface(184) = {183};
196
+ Line Loop(185) = {14, 15, 20, 22};
197
+ Plane Surface(186) = {185};
198
+ Line Loop(187) = {16, 17, -18, -19};
199
+ Plane Surface(188) = {187};
200
+ Line Loop(189) = {19, 13, 14, 23};
201
+ Plane Surface(190) = {189};
202
+ Line Loop(191) = {18, -21, 22, -13};
203
+ Plane Surface(192) = {191};
204
+ Line Loop(193) = {17, -21, -20, -24};
205
+ Plane Surface(194) = {193};
206
+ Line Loop(195) = {24, -15, 23, 16};
207
+ Plane Surface(196) = {195};
208
+ Line Loop(197) = {140, 141, 139, -142};
209
+ Plane Surface(198) = {197};
210
+ Line Loop(199) = {1, 151, 147, -142, 148, -154};
211
+ Plane Surface(200) = {199};
212
+ Line Loop(201) = {155, -150, -140, 148};
213
+ Plane Surface(202) = {201};
214
+ Line Loop(203) = {139, -147, 152, -149};
215
+ Plane Surface(204) = {203};
216
+ Line Loop(205) = {136, -135, 137, -138};
217
+ Plane Surface(206) = {205};
218
+ Line Loop(207) = {135, -158, 159, 160};
219
+ Plane Surface(208) = {207};
220
+ Line Loop(209) = {137, 162, -163, 3, 161, 160};
221
+ Plane Surface(210) = {209};
222
+ Line Loop(211) = {138, 162, -165, -166};
223
+ Plane Surface(212) = {211};
224
+ Line Loop(213) = {8, 10, -7, 11};
225
+ Plane Surface(214) = {213};
226
+ Line Loop(215) = {6, -1, 5, 11};
227
+ Plane Surface(216) = {215};
228
+ Line Loop(217) = {12, 10, -9, -3};
229
+ Plane Surface(218) = {217};
230
+ Line Loop(219) = {151, 152, 153, 87, 164, 165, -163, 12, -8, 6};
231
+ Plane Surface(221) = {219};
232
+ Line Loop(222) = {155, 156, -90, 157, 159, -161, 9, -7, -5, 154};
233
+ Plane Surface(223) = {222};
234
+ Surface Loop(226) = {186, 188, 196, 194, 192, 190};
235
+ Volume(227) = {226};
236
+ Surface Loop(228) = {180, 178, 184, 182, 174, 186};
237
+ Volume(229) = {228};
238
+ Surface Loop(230) = {198, 202, 223, 168, 172, 170, 176, 221, 200, 216, 214, 218, 210, 206, 208, 212, 204, 174};
239
+ Volume(231) = {230};
240
+
241
+
242
+ // Box field to impose a step change in element sizes inside a box
243
+ Field[6] = Box;
244
+ Field[6].VIn = x_diffusion_spacing/5;
245
+ Field[6].VOut = x_diffusion_spacing/5;
246
+ Field[6].XMin = x_device_left;
247
+ Field[6].XMax = x_device_right;
248
+ Field[6].YMax = y_bulk_bot;
249
+ Field[6].YMin = y_bulk_bot - diffusion_thickness;
250
+
251
+ // Use minimum of all the fields as the background field
252
+ Field[7] = Min;
253
+ Field[7].FieldsList = {6};
254
+ Background Field = 7;
255
+
256
+
257
+ /// source
258
+ Physical Surface("source_contact") = {198};
259
+ /// drain
260
+ Physical Surface("drain_contact") = {206};
261
+ /// gate contact
262
+ Physical Surface("gate_contact") = {188};
263
+ /// oxide bulk interface
264
+ Physical Surface("bulk_oxide_interface") = {174};
265
+ /// oxide gate interface
266
+ Physical Surface("gate_oxide_interface") = {186};
267
+ //// body contact
268
+ Physical Surface("body_contact") = {214};
269
+
270
+ Physical Volume("gate") = {227};
271
+ Physical Volume("oxide") = {229};
272
+ Physical Volume("bulk") = {231};
@@ -0,0 +1,15 @@
1
+ # Copyright 2020 DEVSIM LLC
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
5
+ ####
6
+ #### info.py
7
+ #### print features for this build
8
+ ####
9
+ import devsim
10
+
11
+ for k, v in devsim.get_parameter(name="info").items():
12
+ if isinstance(v, str):
13
+ print(f'"{k}"\t"{v}"')
14
+ else:
15
+ print(f'"{k}"\t{v}')
@@ -0,0 +1,24 @@
1
+ # Copyright 2013 DEVSIM LLC
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
5
+ import devsim
6
+ import test_common
7
+
8
+ device = "MyDevice"
9
+ region = "MyRegion"
10
+
11
+ test_common.CreateSimpleMesh(device, region)
12
+
13
+ for name, equation in (
14
+ ("NetDoping1", "kahan3(1e20, -1e20, x);"),
15
+ ("NetDoping2", "kahan4(1e20, -1e20, x,1e14);"),
16
+ ("NetDoping3", "kahan3(x, 1e20, -1e20);"),
17
+ ("NetDoping4", "kahan4(x, 1e20, -1e20, 1e14);"),
18
+ ):
19
+ devsim.node_model(device=device, region=region, name=name, equation=equation)
20
+ print(devsim.get_node_model_values(device=device, region=region, name=name))
21
+
22
+ print(devsim.symdiff(expr="diff(kahan3(a,b,c),c);"))
23
+ print(devsim.symdiff(expr="diff(kahan4(a,b,c,d),c);"))
24
+ print(devsim.symdiff(expr="diff(kahan4(a,b,c,c),c);"))
@@ -0,0 +1,18 @@
1
+ # Copyright 2013 DEVSIM LLC
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
5
+ # Purpose: Fermi integral and inverse
6
+
7
+ import devsim
8
+ import sys
9
+
10
+ if not devsim.get_parameter(name="info")["extended_precision"]:
11
+ print("Extended precision support is not available with this version")
12
+ sys.exit(0)
13
+
14
+ devsim.set_parameter(name="extended_solver", value=True)
15
+ devsim.set_parameter(name="extended_model", value=True)
16
+ devsim.set_parameter(name="extended_equation", value=True)
17
+
18
+ import kahan # noqa: E402, F401
@@ -0,0 +1,232 @@
1
+ # Copyright 2013 DEVSIM LLC
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
5
+ # The purpose is to verify our triangle element field calculation.
6
+ # It is based on Laux's weighting scheme
7
+ # @article{Laux:1985,
8
+ # author = {Laux, Steven E. and Byrnes, Robert G.},
9
+ # title = {Semiconductor device simulation using generalized mobility models},
10
+ # journal = {IBM J. Res. Dev.},
11
+ # issue_date = {May 1985},
12
+ # volume = {29},
13
+ # number = {3},
14
+ # month = may,
15
+ # year = {1985},
16
+ # issn = {0018-8646},
17
+ # pages = {289--301},
18
+ # numpages = {13},
19
+ # url = {http://dx.doi.org/10.1147/rd.293.0289},
20
+ # doi = {10.1147/rd.293.0289},
21
+ # acmid = {1012099},
22
+ # publisher = {IBM Corp.},
23
+ # address = {Riverton, NJ, USA},
24
+ # }
25
+
26
+ import sys
27
+
28
+ try:
29
+ import numpy
30
+ import numpy.linalg
31
+ except ImportError:
32
+ print(
33
+ "numpy is not available with your installation and is required for this program to run."
34
+ )
35
+ sys.exit(-1)
36
+
37
+
38
+ from devsim import (
39
+ edge_from_node_model,
40
+ element_from_edge_model,
41
+ element_from_node_model,
42
+ element_model,
43
+ get_edge_model_values,
44
+ get_element_model_values,
45
+ load_devices,
46
+ )
47
+
48
+
49
+ def calculateValues(scalar_efield, eecouple, sx, sy):
50
+ """
51
+ calculates values, using the exact algorithm used internally to the software
52
+ """
53
+ _row0 = numpy.array([0, 0, 1])
54
+ _row1 = numpy.array([1, 2, 2])
55
+ ans = numpy.zeros((3, 1))
56
+ M = numpy.zeros((2, 2))
57
+ B = numpy.zeros((2, 1))
58
+ e_this = [0] * 2
59
+ e_opp = [0] * 2
60
+ efx = [0] * len(scalar_efield)
61
+ efy = [0] * len(scalar_efield)
62
+ for ei in range(len(scalar_efield) // 3):
63
+ for i in range(3):
64
+ e_base = 3 * ei + i
65
+ k = 0
66
+ for j in range(3):
67
+ if i == j:
68
+ continue
69
+ e_this[k] = 3 * ei + j
70
+ k = k + 1
71
+
72
+ e_opp[0] = e_this[1]
73
+ e_opp[1] = e_this[0]
74
+
75
+ M[0][0] = sx[e_base]
76
+ M[0][1] = sy[e_base]
77
+ B[0] = scalar_efield[e_base]
78
+
79
+ ex = 0
80
+ ey = 0
81
+ den = 0
82
+ for j in range(2):
83
+ M[1][0] = sx[e_this[j]]
84
+ M[1][1] = sy[e_this[j]]
85
+ B[1] = scalar_efield[e_this[j]]
86
+ ans = numpy.linalg.solve(M, B)
87
+ ex = ex + ans[0] * eecouple[e_this[j]]
88
+ ey = ey + ans[1] * eecouple[e_this[j]]
89
+ den = den + eecouple[e_this[j]]
90
+ efx[e_base] = ex / den
91
+ efy[e_base] = ey / den
92
+ return (efx, efy)
93
+
94
+
95
+ load_devices(file="trimesh3.msh")
96
+ device = "MyDevice"
97
+ region = "MyRegion"
98
+ # trying to verify Laux current waiting implementation
99
+ # these are the scalar values
100
+ element_model(
101
+ device=device, region=region, name="scalar_efield", equation="ElectricField"
102
+ )
103
+ element_model(device=device, region=region, name="sx", equation="unitx")
104
+ element_model(device=device, region=region, name="sy", equation="unity")
105
+
106
+ scalar_efield = get_element_model_values(
107
+ device=device, region=region, name="scalar_efield"
108
+ )
109
+ sx = get_element_model_values(device=device, region=region, name="sx")
110
+ sy = get_element_model_values(device=device, region=region, name="sy")
111
+
112
+ element_from_edge_model(device=device, region=region, edge_model="ElectricField")
113
+ efieldx = get_element_model_values(device=device, region=region, name="ElectricField_x")
114
+ efieldy = get_element_model_values(device=device, region=region, name="ElectricField_y")
115
+ eecouple = get_element_model_values(
116
+ device=device, region=region, name="ElementEdgeCouple"
117
+ )
118
+
119
+
120
+ (ex, ey) = calculateValues(scalar_efield, eecouple, sx, sy)
121
+ for i in range(len(ex)):
122
+ print("%g\t%g\t%g\t%g" % (ex[i][0], ey[i][0], efieldx[i], efieldy[i]))
123
+
124
+ #
125
+ # now verify derivatives
126
+ #
127
+ edge_from_node_model(node_model="node_index", device=device, region=region)
128
+ edge_nodes = []
129
+ potential_diff = []
130
+ nedge = 0
131
+ for i in range(2):
132
+ tmp = get_edge_model_values(device=device, region=region, name="node_index@n%d" % i)
133
+ if not edge_nodes:
134
+ nedge = len(tmp)
135
+ edge_nodes = [0] * nedge
136
+ potential_diff = [0] * nedge
137
+ for j in range(nedge):
138
+ edge_nodes[j] = [0] * 2
139
+ potential_diff[j] = [0] * 2
140
+ for j in range(nedge):
141
+ edge_nodes[j][i] = tmp[j]
142
+ tmp = get_edge_model_values(
143
+ device=device, region=region, name="ElectricField:Potential@n%d" % i
144
+ )
145
+ for j in range(nedge):
146
+ potential_diff[j][i] = tmp[j]
147
+
148
+
149
+ element_model(
150
+ device=device, region=region, name="scalar_edge_index", equation="edge_index"
151
+ )
152
+ scalar_edge_index = get_element_model_values(
153
+ device=device, region=region, name="scalar_edge_index"
154
+ )
155
+ scalar_edge_index = [int(x) for x in scalar_edge_index]
156
+ element_from_node_model(node_model="node_index", device=device, region=region)
157
+
158
+ nelem = len(efieldx)
159
+ element_node_indexes = [0] * nelem
160
+ ddata_x = [0] * nelem
161
+ ddata_y = [0] * nelem
162
+ cdata_x = [0] * nelem
163
+ cdata_y = [0] * nelem
164
+ for i in range(nelem):
165
+ element_node_indexes[i] = [0] * 3
166
+ ddata_x[i] = [0] * 3
167
+ ddata_y[i] = [0] * 3
168
+ cdata_x[i] = [0] * 3
169
+ cdata_y[i] = [0] * 3
170
+ for i in range(3):
171
+ tmp = get_element_model_values(
172
+ device=device, region=region, name="node_index@en%d" % i
173
+ )
174
+ for j in range(nelem):
175
+ element_node_indexes[j][i] = int(tmp[j])
176
+
177
+ element_from_edge_model(
178
+ device=device, region=region, edge_model="ElectricField", derivative="Potential"
179
+ )
180
+ for i in range(3):
181
+ tmp = get_element_model_values(
182
+ device=device, region=region, name="ElectricField_x:Potential@en%d" % i
183
+ )
184
+ for j in range(nelem):
185
+ cdata_x[j][i] = tmp[j]
186
+ for i in range(3):
187
+ tmp = get_element_model_values(
188
+ device=device, region=region, name="ElectricField_y:Potential@en%d" % i
189
+ )
190
+ for j in range(nelem):
191
+ cdata_y[j][i] = tmp[j]
192
+
193
+ diff_field = [0] * nelem
194
+ dest_map = [0] * nelem # maps global node of element to this particular edge
195
+ for dnode in range(3): # this is the node we are taking the derivative with respect to
196
+ # it is the global node index and will be figure out shortly
197
+ for i in range(nelem // 3):
198
+ bi = 3 * i # this is the base element edge(0)
199
+ dindex = element_node_indexes[bi][
200
+ dnode
201
+ ] # this is the node we are taking the derivative with respect to
202
+ for j in range(3): # this is the edge of interest
203
+ ei = bi + j # this is the edge we are looking at
204
+ sei = scalar_edge_index[ei]
205
+ if dindex in edge_nodes[sei]:
206
+ pos = edge_nodes[sei].index(dindex)
207
+ diff_field[ei] = potential_diff[sei][pos]
208
+ else:
209
+ diff_field[ei] = 0.0
210
+ dest_map[ei] = element_node_indexes[ei].index(dindex)
211
+ (ex, ey) = calculateValues(diff_field, eecouple, sx, sy)
212
+ for i in range(nelem):
213
+ ddata_x[i][dest_map[i]] = ex[i]
214
+ ddata_y[i][dest_map[i]] = ey[i]
215
+ # these are the node indexes w.r.t. the first edge on the triangle
216
+ # ddata_x[i][dnode] = ex[i]
217
+ # ddata_y[i][dnode] = ey[i]
218
+
219
+ # print element_node_indexes
220
+
221
+ for i in range(3):
222
+ print("index %d" % i)
223
+ for j in range(nelem):
224
+ print(
225
+ "%g\t%g\t%g\t%g"
226
+ % (ddata_x[j][i][0], ddata_y[j][i][0], cdata_x[j][i], cdata_y[j][i])
227
+ )
228
+
229
+ # print element_node_indexes
230
+ # print potential_diff
231
+ # print get_edge_model_values(device=device, region=region, name="ElectricField:Potential@n0")
232
+ # print get_edge_model_values(device=device, region=region, name="ElectricField:Potential@n1")
@@ -0,0 +1,30 @@
1
+ # Need to make self-documenting with node description
2
+ # external_node va "anode";
3
+ title diode;
4
+ external_node va;
5
+ external_node vc;
6
+ internal_node vx;
7
+
8
+ # need to set valid bounds
9
+ # need to set nodefault (Error if not given)
10
+ parameter Is "sat current" 1.0;
11
+ parameter R "series R" 1.0;
12
+ parameter n "ideality" 1.0;
13
+ parameter VT "thermal voltage" 1.0;
14
+ parameter C "Capacitance" 1.0;
15
+
16
+ model id Is*exp((vx-vc)/(n*VT))-Is;
17
+ #model d_id_d_vx (id+Is)/(n*VT);
18
+ #model d_id_d_vc -d_id_d_vx;
19
+ model ir (va-vx)/R;
20
+
21
+ model qd C*(vx-vc);
22
+
23
+ equation evx id-ir ddt qd;
24
+ equation eva ir ddt 0;
25
+ equation evc -id ddt -qd;
26
+
27
+ link evx vx;
28
+ link eva va;
29
+ link evc vc;
30
+
@@ -0,0 +1,33 @@
1
+ # Need to make self-documenting with node description
2
+ # external_node va "anode";
3
+ title mctest_user;
4
+ external_node va;
5
+ external_node vc;
6
+ internal_node vx;
7
+ declarefunc cos(x);
8
+ definefuncdiff sin(x), cos(x);
9
+ definefuncdiff cos(x), -sin(x);
10
+
11
+ # need to set valid bounds
12
+ # need to set nodefault (Error if not given)
13
+ parameter Is "sat current" 1.0;
14
+ parameter R "series R" 1.0;
15
+ parameter n "ideality" 1.0;
16
+ parameter VT "thermal voltage" 1.0;
17
+ parameter C "Capacitance" 1.0;
18
+
19
+ model id Is*cos((vx-vc)/(n*VT))-Is;
20
+ #model d_id_d_vx (id+Is)/(n*VT);
21
+ #model d_id_d_vc -d_id_d_vx;
22
+ model ir (va-vx)/R;
23
+
24
+ model qd C*(vx-vc);
25
+
26
+ equation evx id-ir ddt qd;
27
+ equation eva ir ddt 0;
28
+ equation evc -id ddt -qd;
29
+
30
+ link evx vx;
31
+ link eva va;
32
+ link evc vc;
33
+