Devsim
Devsim
Release 2.8.2
DEVSIM LLC
Contents
Contents vi
1 Front matter 1
1.1 Contact . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Copyright . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 Citing this work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.4 Contributing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.5 Documentation license . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.6 Documentation source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.7 Software license . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.8 Third party licenses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.9 Disclaimer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.10 Trademark . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2 Release notes 3
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Version 2.8.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2.1 Documentation refactor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.3 Version 2.8.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.3.1 Help files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.3.2 Database command removal . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.4 Version 2.8.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.4.1 Python scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.4.2 Data output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Reduction in data file sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
FLOOPS data file output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.4.3 Platform support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Windows build issue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Centos 7 end of life . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.5 Previous releases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3 Getting started 6
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
i
3.2 Getting help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.3 Supported platforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.4 Install Python . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.4.1 Create virtual environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Anaconda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Using venv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.5 Install DEVSIM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.5.1 Install . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.5.2 Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.5.3 Running DEVSIM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.6 Building from source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.7 Install external software tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.7.1 Meshing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Gmsh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Other meshers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.7.2 Visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.7.3 Math libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
BLAS and LAPACK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Intel MKL Pardiso . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4 User interface 11
4.1 Starting DEVSIM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.2 Directory structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.3 Python language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.3.2 DEVSIM commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.3.3 Unicode support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.4 Error handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.4.1 Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.4.2 Fatal errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.4.3 Floating point exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.4.4 Solver errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.4.5 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.5 Verbosity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.6 Command help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.7 Parallelization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.7.1 Model evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.7.2 Long operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.7.3 External math libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.8 Reset simulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.9 Array type input and output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
ii
5.2.3 Element edge models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5.2.4 Model derivatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.2.5 Conversions between model types . . . . . . . . . . . . . . . . . . . . . . . . 23
5.2.6 Equation assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.3 Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.3.1 Interface models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.3.2 Interface model derivatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.3.3 Interface equation assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.4 Contact . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.4.1 Contact models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.4.2 Contact model derivatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.4.3 Contact equation assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
5.5 Custom matrix assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
5.6 Cylindrical coordinate systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.7 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.7.1 Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Interace equation coupling . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Interface and contact surface area . . . . . . . . . . . . . . . . . . . . . . . . 30
Skip nodes shared with contact . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.7.2 Element assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.7.3 Edge volume model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.7.4 Element pair from edge model . . . . . . . . . . . . . . . . . . . . . . . . . . 31
6 Parameters 32
6.1 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
6.2 Environment variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
6.3 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
7 Circuits 35
7.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
7.2 Circuit elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
7.3 Connecting devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
7.4 Clearing circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
8 Meshing 37
8.1 1D mesher . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
8.2 2D mesher . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
8.3 Using an external mesher . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
8.3.1 Gmsh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
8.3.2 Custom mesh loading using scripting . . . . . . . . . . . . . . . . . . . . . . 40
8.4 Loading and saving results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
8.5 Mesh processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
8.6 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
8.6.1 Contacts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Contact material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Create contacts from interface . . . . . . . . . . . . . . . . . . . . . . . . . . 40
8.6.2 Device and mesh deletion commands . . . . . . . . . . . . . . . . . . . . . . 41
8.6.3 Periodic boundary conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
iii
9 Solver and numerics 42
9.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
9.2 Solution methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
9.2.1 DC analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
9.2.2 AC analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
9.2.3 Noise and sensitivity analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
9.2.4 Transient analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
9.3 Extended precision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
9.3.1 Platform dependence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
9.3.2 How to control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
9.3.3 Kahan summation in extended precision mode . . . . . . . . . . . . . . . . . 44
9.4 Floating point exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
9.4.1 FPE checking during external solve . . . . . . . . . . . . . . . . . . . . . . . 44
9.4.2 Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
9.5 Solver and math library selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
9.5.1 Available libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Intel Math Kernel Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
UMFPACK 5.1 solver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Custom solver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
SuperLU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
9.5.2 Automatic direct solver selection . . . . . . . . . . . . . . . . . . . . . . . . . 46
9.5.3 BLAS/LAPACK library selection . . . . . . . . . . . . . . . . . . . . . . . . . . 46
9.5.4 Default math search path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
9.5.5 Determine loaded math libraries . . . . . . . . . . . . . . . . . . . . . . . . . 47
9.6 Custom direct solver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
9.7 Diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
9.7.1 Problem node identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
9.7.2 Convergence information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
9.8 Symbolic factorization reuse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
9.9 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
9.9.1 Convergence tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
9.9.2 Simulation matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
9.9.3 Get matrix and rhs for external use . . . . . . . . . . . . . . . . . . . . . . . . 49
9.9.4 Transient analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
10 SYMDIFF 50
10.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
10.2 Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
10.2.1 Variables and numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
10.2.2 Basic expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
10.2.3 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
10.2.4 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
10.2.5 User functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
10.2.6 Macro assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
10.3 Invoking SYMDIFF from DEVSIM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
10.3.1 Equation parser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
10.3.2 Evaluating external math . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
10.3.3 Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
iv
11 Visualization and post processing 58
11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
11.2 Visualization software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
11.2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
11.2.2 Using ParaView . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
11.2.3 Using VisIt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
11.3 Reducing file sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
11.4 Post processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
11.4.1 Index information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
11.4.2 Element node list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
12 Examples 60
12.1 Included examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
12.2 Test scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
12.3 Related projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
12.3.1 Source code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
12.3.2 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
12.3.3 Regression results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
12.4 Mobile app . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
12.5 Third party libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
13 Simple Examples 65
13.1 Capacitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
13.1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
13.1.2 1D capacitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Creating the mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Setting device parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Creating the models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Contact boundary conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Setting the boundary conditions . . . . . . . . . . . . . . . . . . . . . . . . . 68
Running the simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
13.1.3 2D capacitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Defining the mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Setting up the models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Fields for visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Running the simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
13.2 Diode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
13.2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
13.2.2 1D diode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Using the python packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Creating the mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Physical models and parameters . . . . . . . . . . . . . . . . . . . . . . . . . 76
Plotting the result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
14 Command Reference 81
14.1 Circuit commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
14.2 Equation commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
v
14.3 Geometry commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
14.4 Material commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
14.5 Meshing commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
14.6 Model commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
14.7 Solver commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Bibliography 113
Index 114
vi
List of Figures
12.1 Simulation result for solving for the magnetic potential and field. The coloring is by
the Z component of the magnetic potential, and the stream traces are for compo-
nents of magnetic field. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
13.1 Capacitance simulation result. The coloring is by Potential, and the stream traces
are for components of ElectricField. . . . . . . . . . . . . . . . . . . . . . . . . . . 74
13.2 Carrier density versus position in 1D diode. . . . . . . . . . . . . . . . . . . . . . . . 78
13.3 Potential and electric field versus position in 1D diode. . . . . . . . . . . . . . . . . . 79
13.4 Electron and hole current and recombination. . . . . . . . . . . . . . . . . . . . . . . 80
vii
List of Tables
1.1 Contact . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
viii
Chapter 1
Front matter
1.1 Contact
1.2 Copyright
Please check [Link] in the distribution for suggestions on how to cite this work.
1.4 Contributing
Contributions to this project are welcome in the form of bug reporting, documentation, modeling,
and feature implementation. Please see the [Link] file in the source code distribution.
1
DEVSIM Manual, Release 2.8.2
This work is licensed under the Creative Commons Attribution 4.0 International License. To view
a copy of this license, visit [Link]
DEVSIM is available from [Link] The source code is available under the terms of the
Apache License Version 2.0 [10]. Examples are released under the same license. Please see the
NOTICE and LICENSE files in the distribution for more information.
Please see the NOTICE file in the distribution, as well as Third party libraries (page 64).
1.9 Disclaimer
DEVSIM LLC MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD
TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
1.10 Trademark
DEVSIM is a registered trademark and SYMDIFF is a trademark of DEVSIM LLC. All other product or
company names are trademarks of their respective owners.
Release notes
2.1 Introduction
DEVSIM download and installation instructions are located in Supported platforms (page 7). The
following sections list bug fixes and enhancements over time. Contact information is listed in
Contact (page 1). A file named [Link] is now distributed with DEVSIM, which can contain
additional details concerning a new release.
The release notes section has been shortened to the most recent releases. Important information
from the release notes was placed in the appropriate sections of the manual. The manual has also
been reorganized. The pdf formatting has been improved to reducte the number of empty pages.
For older release notes, please refer to the Version 2.8.1 manual located at [Link]
zenodo.12211919. The latest version is available from [Link]
3
DEVSIM Manual, Release 2.8.2
devsim.write_devices(
file="mesh2d_reduced.tec",
type="tecplot",
include_test=lambda x: x in ("NetDoping",),
)
The floops option for devsim.write_devices() (page 95) has been removed.
During testing, it was found the Visual Studio 2022 builds were failing a test related to threading.
This was found to be a problem with version 17.10, but not version 17.9. This affects the build
automation, but should not affect the binary releases.
This is the last version to support Centos 7 before its end of life on June 30, 2024. After this date
we will be moving to the AlmaLinux 8 based manylinux_2_28.
For older release notes, please refer to the Version 2.8.1 manual located at [Link]
zenodo.12211919. The latest version is available from [Link]
Getting started
3.1 Introduction
DEVSIM is a technology computer-aided design (TCAD) software for semiconductor device simu-
lation. While geared toward this application, it may be used where the control volume approach
is appropriate for solving systems of partial-differential equations (PDE’s) on a static mesh. Af-
ter introducing DEVSIM, the rest of the manual discusses the key components of the system, and
instructions for their use.
The primary goal of DEVSIM is to give the user as much flexibility and control as possible. In this
regard, few models are coded into the program binary. They are implemented in human-readable
scripts that can be modified if necessary.
DEVSIM has a scripting language interface (User interface (page 11)). This provides control struc-
tures and language syntax in a consistent and intuitive manner. The user is provided an envi-
ronment where they can implement new models on their own. This is without requiring extensive
vendor support or use of compiled programming languages.
SYMDIFF (SYMDIFF (page 50)) is the symbolic expression parser used to allow the formulation
of device equations in terms of models and parameters. Using symbolic differentiation, the re-
quired partial derivatives can be generated, or provided by the user. DEVSIM then assembles these
equations over the mesh.
Please see Contact (page 1) for project contact information. The most responsive method is to
contact the online forum at [Link] Additional information, with links to documen-
tation is available at [Link] Additional documentation files released with the simulator
are presented at [Link]
6
DEVSIM Manual, Release 2.8.2
These are the minimum supported platforms, and also expected to work on newer versions of
these operating systems. If you require a version on a different software platform, please contact
us Contact (page 1).
A Python version of 3.7 or higher is needed to run DEVSIM. This requirement is often met by the
default installations of the above systems. In addition, it is possible to download other Python
versions online. Popular distributions of Python are listed in Table 3.2.
Creating a virtual environment is needed so DEVSIM may necessary math libraries, as discussed
in Default math search path (page 47). The numpy package is also recommended to ensure that
needed math libraries are available.
Anaconda
Using the conda package manager in an Anaconda, a virtual environment is created using.
where denv is the name of the environment. If you are using a x64 or x86_64 based system, you
may install the Intel Math Kernel Library with the Pardiso Solver.
Using venv
For other Python distributions, the requisite packages may be installed by using a venv based
virtual environment.
where denv is the name of directory containing the environment. If you are using a x64 or x86_64
based system, you may install the Intel Math Kernel Library with the Pardiso Solver.
3.5.1 Install
DEVSIM is available from PyPI ([Link] using pip. To install this package
for your platform:
Please see the devsim_data/[Link] file in the distribution for more information. This files
may be found in the prefix directory for your chosen environment listed in Table 3.2.
3.5.2 Test
See User interface (page 11) for instructions on how to invoke DEVSIM.
Building from source is possible, and is useful when you want to extend the simulator, use com-
piler optimizations, or port to a new platform. See the [Link] file in the project files for more
information.
3.7.1 Meshing
Gmsh
Gmsh [2] is available from [Link] DEVSIM is able to import triangular or tetrahedral
meshes from this application. More information is in Gmsh (page 39).
Other meshers
It is also possible to import other mesh formats by writing a converter in Python, as described in
Custom mesh loading using scripting (page 40).
3.7.2 Visualization
See Visualization software (page 58) for a listing of available meshing tools, which are known to
work with DEVSIM.
These are the basic linear algebra routines used in DEVSIM and their selection is described in
BLAS/LAPACK library selection (page 46).
This library may be installed and selected using the instructions in Available libraries (page 45).
User interface
Refer to Supported platforms (page 7) for instructions on how to install DEVSIM. Once installed,
DEVSIM may be invoked using the following command
devsim is loaded by calling
import devsim
from Python.
Many of the examples in the distribution rely on the python_packages module, which is available
by using:
import devsim.python_packages
A DEVSIM directory is created with the following sub directories listed in Directory structure for
DEVSIM (page 11).
This may be found using the virtual environment path specified in Table 3.2.
11
DEVSIM Manual, Release 2.8.2
4.3.1 Introduction
Python is the scripting language employed as the text interface to DEVSIM. Documentation and
tutorials for the language are available from [1]. A paper discussing the general benefits of using
scripting languages may be found in [5].
All of commands are in the devsim namespace. In order to invoke a command, the command
should be prefixed with devsim., or the following may be placed at the beginning of the script:
Internally, DEVSIM uses UTF-8 encoding, and expects model equations and saved mesh files to be
written using this encoding. Care should be taken when using non-ASCII characters in names for
visualization using the tools in Visualization and post processing (page 58), as this character set
may not be supported in these third-party tools.
4.4.1 Exceptions
When a syntax error occurs in a Python script an exception may be thrown. If it is uncaught, then
DEVSIM will terminate. An exception that is thrown by DEVSIM is of the type [Link]. It may
be caught, and a message may be extracted to determine the issue.
When DEVSIM enters a state in which it may not recover. The interpreter will throw a [Link]
exception with a message DEVSIM FATAL. At this point DEVSIM may enter an inconsistent state, so
it is suggested not to attempt to continue script execution if this occurs.
In rare situations, the program may behave in an erratic manner, print a message, such as
UNEXPECTED or terminate abruptly. Please report this using the contact information in Contact
(page 1).
During model evaluation, DEVSIM will attempt to detect floating point issues and return an error
with some diagnostic information printed to the screen, such as the symbolic expression being
evaluated. Floating point errors may be characterized as invalid, division by zero, and numerical
overflow. This is considered to be a fatal error.
When using the [Link]() (page 111), the solver may not converge and a message will be
printed and an exception may be thrown. The solution will be restored to its previous value before
the simulation began. This exception may be caught and the bias conditions may be changed so
the simulation may be continued.
4.4.5 Example
More helpful exception information returned to Python if the error is considered fatal. This can
be used to decide if the simulation can be restarted. Note that if this occurs during a solve, it is
necessary for the user to restore the previous circuit and device solutions if a restart is desired. In
addition, model evaluation is reset so that no false cyclic dependencies are reported after an error.
In this example code below, the previously DEVSIM FATAL error string will now provide the context
that a floating point exception occurred and be handled in Python.
try:
[Link]()
except error as msg:
m = str(msg)
if 'Convergence failure' in m:
self.set_vapp(last_bias)
elif'floating point exception' in m:
self.set_vapp(last_bias)
self.restore_callback(self.is_circuit)
else:
raise
4.5 Verbosity
The set_parameter() may be used to set the verbosity globally, per device, or per region. Setting
the debug_level parameter to info results in the default level of information to the screen. Setting
this option to verbose or any other name results in more information to the screen which may be
useful for debugging.
The following example sets the default level of debugging for the entire simulation, except that the
gate region will have additional debugging information.
4.5. Verbosity 13
DEVSIM Manual, Release 2.8.2
devsim.set_parameter(name="debug_level", value="info")
devsim.set_parameter(device="device" region="gate",
name="debug_level", value="verbose")
help([Link])
4.7 Parallelization
Routines for the evaluating of models are parallelized. In order to select the number of threads to
use
devsim.set_parameter(name="threads_available", value=2)
where the value specified is the number of threads to be used. By default, DEVSIM does not use
threading. For regions with a small number of elements, the time for switching threads is more than
the time to evaluate in a single thread. To set the minimum number of elements for a calculation,
set the following parameter.
devsim.set_parameter(name="threads_task_size", value=1024)
The Intel Math Kernel Library is parallelized, the number of thread may be controlled by set-
ting the MKL_NUM_THREADS environment variable.
While running long operations, DEVSIM, will yield to the Python to allow it to perform other opera-
tions.
Please see the documentation for external solvers, such as BLAS/LAPACK or the Intel MKL
Pardiso, on how to control their threading behavior.
The devsim.reset_devsim() (page 88) command will clear all simulator data, so that a program
restart is not necessary.
In most circumstances, the software now returns numerical data using the Python array class.
This is more efficient than using standard lists, as it encapsulates a contiguous block of memory.
More information about this class can be found at [Link] The
representation can be easily converted to lists and numpy arrays for efficient manipulation.
When accepting user input involving lists of homogenous data, such as devsim.
set_node_values() (page 109) the user may enter data using either a list, string of bytes, or
the array class. It may also be used to input numpy arrays or any other class with a tobytes
method.
5.1 Overview
DEVSIM uses the control volume approach for assembling partial-differential equations (PDE’s) on
the simulation mesh. DEVSIM is used to solve equations of the form:
∂X
+ ∇ ·⃗Y + Z = 0
∂t
Internally, it transforms the PDE’s into an integral form.
∂X
Z Z Z
∂r + ⃗Y · ∂ s + Z∂ r = 0
∂t
Equations involving the divergence operators are converted into surface integrals, while other
components are integrated over the device volume.
Additional detail concerning the discussion that follows is available in [7, 8].
In Mesh elements in 2D (page 17), 2D mesh elements are depicted. The shaded area around
the center node is referred to as the node volume, and it is used for the volume integration. The
lines from the center node to other nodes are referred to as edges. The flux through the edge are
integrated with respect to the perpendicular bisectors (dashed lines) crossing each triangle edge.
In this form, we refer to a model integrated over the edges of triangles as edge models. Models
integrated over the volume of each triangle vertex are referred to as node models. Element edge
models are a special case where variables at other nodes off the edge may cause the flux to
change.
There are a default set of models created in each region upon initialization of a device, and are
typically based on the geometrical attributes. These are described in the following sections. Mod-
els required for describing the device behavior are created using the equation parser described
in SYMDIFF (page 50). For special situations, custom matrix assembly is also available and is
discussed in Custom matrix assembly (page 28).
16
DEVSIM Manual, Release 2.8.2
NodeVolume
EdgeCouple
5.1. Overview 17
DEVSIM Manual, Release 2.8.2
EdgeCouple
EdgeLength
n0 n1
EdgeNodeVolume
5.1. Overview 18
DEVSIM Manual, Release 2.8.2
en2
ElementEdgeCouple
en0 en1
ElementNodeVolume
EdgeLength
5.1. Overview 19
DEVSIM Manual, Release 2.8.2
5.1.1 Structures
Devices A device refers to a discrete structure being simulated. It is composed of the following
types of objects.
Regions A region defines a portion of the device of a specific material. Each region has its own
system of equations being solved.
Interfaces An interface connects two regions together. At the interfaces, equations are specified
to account for how the flux in each device region crosses the region boundary.
Contacts A contact specifies the boundary conditions required for device simulation. It also
specifies how terminal currents are are integrated into an external circuit.
Node models may be specified in terms of other node models, mathematical functions, and pa-
rameters on the device. The simplest model is the node solution, and it represents the solution
variables being solved for. Node models automatically created for a region are listed in Node
models defined on each region of a device (page 21).
In this example, we present an implementation of Shockley Read Hall recombination [4].
The first model specified, USRH, is the recombination model itself. The derivatives with respect to
electrons and holes are USRH:Electrons and USRH:Holes, respectively. In this particular example
Electrons and Holes have already been defined as solution variables. The remaining variables in
the equation have already been specified as parameters.
The diff function tells the equation parser to take the derivative of the original expression, with
respect to the variable specified as the second argument. During equation assembly, these deriva-
tives are required in order to converge upon a solution. The simplify function tells the expression
parser to attempt to simplify the expression as much as possible.
Edge models may be specified in terms of other edge models, mathematical functions, and pa-
rameters on the device. In addition, edge models may reference node models defined on the ends
of the edge. As depicted in Edge model constructs in 2D (page 18), edge models are with respect
to the two nodes on the edge, n0 and n1.
For example, to calculate the electric field on the edges in the region, the following scheme is
employed:
In this example, EdgeInverseLength is a built-in model for the inverse length between nodes on
an edge. Potential@n0 and Potential@n1 is the Potential node solution on the nodes at the
end of the edge. These edge quantities are created using the devsim.edge_from_node_model()
(page 99). In addition, the devsim.edge_average_model() (page 99) can be used to create edge
models in terms of node model quantities.
Edge models automatically created for a region are listed in Edge models defined on each region
of a device (page 22).
Element edge models are used when the edge quantitites cannot be specified entirely in terms
of the quantities on both nodes of the edge, such as when the carrier mobility is dependent on
the normal electric field. In 2D, element edge models are evaluated on each triangle edge. As
depicted in Element edge model constructs in 2D (page 19), edge models are with respect to the
three nodes on each triangle edge and are denoted as en0, en1, and en2. Derivatives are with
respect to each node on the triangle.
In 3D, element edge models are evaluated on each tetrahedron edge. Derivatives are with respect
to the nodes on both triangles on the tetrahedron edge. Element edge models automatically cre-
ated for a region are listed in Element edge models defined on each region of a device (page 22).
As an alternative to treating integrating the element edge model with respect to
ElementEdgeCouple, the integration may be performed with respect to ElementNodeVolume. See
[Link]() (page 84) for more information.
To converge upon the solution, derivatives are required with respect to each of the solution vari-
ables in the system. DEVSIM will look for the required derivatives. For a model model, the deriva-
tives with respect to solution variable variable are presented in Required derivatives for equation
assembly. model is the name of the model being evaluated, and variable is one of the solution
variables being solved at each node (page 23).
The devsim.edge_from_node_model() (page 99) is used to create edge models referring to the
nodes connecting the edge. For example, the edge models Potential@n0 and Potential@n1 refer
to the Potential node model on each end of the edge.
The devsim.edge_average_model() (page 99) creates an edge model which is either the arith-
metic mean, geometric mean, gradient, or negative of the gradient of the node model on each
edge.
When an edge model is referred to in an element edge model expression, the edge values are
implicity converted into element edge values during expression evaluation. In addition, derivatives
of the edge model with respect to the nodes of an element edge are required, they are converted as
well. For example, edgemodel:variable@n0 and edgemodel:variable@n1 are implicitly converted
to edgemodel:variable@en0 and edgemodel:variable@en1, respectively.
The devsim.element_from_edge_model() (page 101) is used to create directional components of
an edge model over an entire element. The derivative option is used with this command to create
the derivatives with respect to a specific node model. The devsim.element_from_node_model()
(page 102) is used to create element edge models referring to each node on the element of the
element edge.
Bulk equations are specified in terms of the node, edge, and element edge models using the
[Link]() (page 84). Node models are integrated with respect to the node volume.
Edge models are integrated with the perpendicular bisectors along the edge onto the nodes on
either end.
Element edge models are treated as flux terms and are integrated with respect to
ElementEdgeCouple using the element_model option. Alternatively, they may be treated as source
terms and are integrated with respect to ElementNodeVolume using the volume_node0_model and
volume_node1_model option.
In this example, we are specifying the Potential Equation in the region to consist of a flux term
named PotentialEdgeFlux and to not have any node volume terms.
In addition, the solution variable coupled with this equation is Potential and it will be updated
using logarithmic damping.
5.3 Interface
Interface constructs in 2D. Interface node pairs are located at each \bullet. The SurfaceArea model
is used to integrate flux term models. (page 25) depicts an interface in DEVSIM. It is a collection of
overlapping nodes existing in two regions, r0 and r1.
Interface models are node models specific to the interface being considered. They are unique from
bulk node models, in the sense that they may refer to node models on both sides of the interface.
They are specified using the devsim.interface_model() (page 106). Interface models may refer
to node models or parameters on either side of the interface using the syntax nodemodel@r0 and
nodemodel@r1 to refer to the node model in the first and second regions of the interface. The
naming convention for node models, interface node models, and their derivatives are shown in
5.3. Interface 24
DEVSIM Manual, Release 2.8.2
r0
r1
SurfaceArea
Fig. 5.4: Interface constructs in 2D. Interface node pairs are located at each •. The SurfaceArea
model is used to integrate flux term models.
5.3. Interface 25
DEVSIM Manual, Release 2.8.2
Required derivatives for interface equation assembly. The node model name nodemodel and its
derivatives nodemodel:variable are suffixed with @r0 and @r1 to denote which region on the
interface is being referred to (page 24).
devsim.interface_model(device="device", interface="interface",
name="continuousPotential", equation="Potential@r0-Potential@r1")
For a given interface model, model, the derivatives with respect to the variable variable in the
regions are
• model:variable@r0
• model:variable@r1
devsim.interface_model(device="device", interface="interface",
name="continuousPotential:Potential@r0", equation="1")
devsim.interface_model(device="device", interface="interface",
name="continuousPotential:Potential@r1", equation="-1")
There are three types of interface equations considered in DEVSIM. They are both activated using
the devsim.interface_equation() (page 87).
In the first form, continuous, the equations for the nodes on both sides of the interface are inte-
grated with respect to their volumes and added into the same equation. An additional equation
is then specified to relate the variables on both sides. In this example, continuity in the potential
solution across the interface is enforced, using the continuousPotential model defined in the
previous section.
interface_model="continuousPotential", type="continuous")
In the second form, fluxterm, a flux term is integrated over the surface area of the interface and
added to the first region, and subtracted from the second.
In the third form, hybrid, equations for nodes on both sides of the interface are added into the
equation for the node in the first region. The equation for the node on the second interface is
integrated in the second region, and the fluxterm is subracted in the second region.
5.3. Interface 26
DEVSIM Manual, Release 2.8.2
5.4 Contact
circuit_node
Contact constructs in 2D. (page 27) depicts how a contact is treated in a simulation. It is a collec-
tion of nodes on a region. During assembly, the specified models form an equation, which replaces
the equation applied to these nodes for a bulk node.
Contact models are equivalent to node and edge models, and are specified using the devsim.
contact_node_model() (page 96) and the devsim.contact_edge_model() (page 96), respec-
tively. The key difference is that the models are only evaluated on the contact nodes for the
contact specified.
The derivatives are equivalent to the discussion in Model derivatives (page 23). If external circuit
boundary conditions are being used, the model model derivative with respect to the circuit node
node name should be specified as model:node.
5.4. Contact 27
DEVSIM Manual, Release 2.8.2
The devsim.contact_equation() (page 83) is used to specify the boundary conditions on the
contact nodes. The models specified replace the models specified for bulk equations of the same
name. For example, the node model specified for the contact equation is assembled on the contact
nodes, instead of the node model specified for the bulk equation. Contact equation models not
specified are not assembled, even if the model exists on the bulk equation for the region attached
to the contact.
As an example
node_model="contact_bc", edge_charge_model="DField")
Current models refer to the instantaneous current flowing into the device. Charge models refer to
the instantaneous charge at the contact.
During a transient, small-signal or ac simulation, the time derivative is taken so that the net current
into a circuit node is
∂ q (t)
I (t) = i (t) +
∂t
where i is the integrated current and q is the integrated charge.
devsim.custom_equation(name="test1", procedure="myassemble")
DC
TIME
When timemode is DC, the time-independent part of the equation is returned. When timemode
is TIME, the time-derivative part of the equation is returned. The simulator will scale the time-
derivative terms with the proper frequency or time scale.
The return value from the procedure must return two lists and a boolean value of the form
[1 1 1.0 2 2 1.0 1 2 -1.0 2 1 -1.0 2 2 1.0], [1 1.0 2 1.0 2 -1.0], True
where the length of the first list is divisible by 3 and contains the row, column, and value to be
assembled into the matrix. The second list is divisible by 2 and contains the right hand side
entries. Either list may be empty.
The boolean value denotes whether the matrix and right hand side entries should be row permu-
tated. A value of True should be used for assembling bulk equations, and a value of False should
be used for assembling contact and interface boundary conditions.
The devsim.get_circuit_equation_number() (page 82) may be used to get the equation num-
bers corresponding to circuit node names. The devsim.get_equation_numbers() (page 86) may
be used to find the equation number corresponding to each node index in a region.
The matrix and right hand side entries should be scaled by the NodeVolume if they are assembled
into locations in a device region as volume integration.
In 2D, models representing the edge couples, surface areas and node volumes may be generated
using the following commands:
• devsim.cylindrical_edge_couple() (page 96)
• devsim.cylindrical_node_volume() (page 97)
• devsim.cylindrical_surface_area() (page 97)
In order to change the integration from the default models to cylindrical models, the following
parameters may be set
set_parameter(name="node_volume_model",
value="CylindricalNodeVolume")
set_parameter(name="edge_couple_model",
value="CylindricalEdgeCouple")
set_parameter(name="edge_node0_volume_model",
value="CylindricalEdgeNodeVolume@n0")
set_parameter(name="edge_node1_volume_model",
value="CylindricalEdgeNodeVolume@n1")
set_parameter(name="element_edge_couple_model",
value="ElementCylindricalEdgeCouple")
set_parameter(name="element_node0_volume_model",
(continues on next page)
5.7 Notes
5.7.1 Interface
The name0, and name1 options are now available for the devsim.interface_equation() (page 87)
command. They make it possible to couple dissimilar equation names across regions.
Interface surface area is stored in the SurfaceArea node model. Contact surface area is stored in
the ContactSurfaceArea node model. These are listed in Table 5.1.
Interface equation assembly skips nodes when an interface node is shared with a contact. Best to
be avoided. Share helper script.
The EdgeNodeVolume model is now available for the volume contained by an edge and is referenced
in Edge models (page 21).
The [Link]() (page 84) supports these options:
• volume_node0_model
• volume_node1_model
This makes it possible to better integrate nodal quantities on the volumes of element edges. For
example, a field dependent generation-recombination rate can be volume integrated separately for
each node of an element edge.
The devsim.contact_equation() (page 83) supports the following options:
• edge_volume_model
• volume_node0_model
• volume_node1_model
5.7. Notes 30
DEVSIM Manual, Release 2.8.2
This makes it possible to integrate edge and element edge quantities with respect to the volume
on nodes of the edge at the contact. This is similar to [Link]() (page 84).
The integration parameters for edge_volume_model are set with
• edge_node0_volume_model (default EdgeNodeVolume Edge models (page 21) )
• edge_node1_volume_model (default EdgeNodeVolume)
and for volume_model with:
• element_node0_volume_model (default ElementNodeVolume Element edge models defined
on each region of a device (page 22))
• element_node1_volume_model (default ElementNodeVolume)
These parameters are applicable to both [Link]() (page 84) devsim.
contact_equation() (page 83).
The [Link]() (page 84) suppports the edge_volume_model. This makes it possible to
integrate edge quantities properly so that it is integrated with respect to the volume on nodes of
the edge. To set the node volumes for integration, it is necessary to define a model for the node
volumes on both nodes of the edge. For example:
For the cylindrical coordinate system in 2D, please see Cylindrical coordinate systems (page 29).
5.7. Notes 31
Chapter 6
Parameters
6.1 Parameters
Parameters are set globally, on devices, or on regions of a device. The models on each device
region are automatically updated whenever parameters change.
devsim.set_parameter(device="device", region="region",
name="ThermalVoltage", value=0.0259)
They may also be used to control program behavior, as listed in Parameters controlling program
behavior (page 33):
32
DEVSIM Manual, Release 2.8.2
Environment variables to control program behavior are listed in Environment controlling program
behavior (page 33):. Please consult Release notes (page 3): for the most up to information
concerning their usage.
6.3 Notes
Parameters may be used in model expressions. If a parameter is not found, then DEVSIM will also
look for a circuit node by the name used in the model expression.
6.3. Notes 34
Chapter 7
Circuits
7.1 Overview
Circuit boundary conditions allow multi-device simulation. They are also required for setting
sources and their response for AC and noise analysis. Circuit elements, such as voltage sources,
current sources, resistors, capacitors, and inductors may be specified.
Circuit elements are manipulated using the commands in Circuit commands (page 81). Using
the devsim.circuit_element() (page 81) to add a circuit element will implicitly create the nodes
being references.
A simple resistor divider with a voltage source would be specified as:
Circuit nodes are created automatically when referred to by these commands. Voltage sources
create an additional circuit node of the form V1.I to account for the current flowing through it.
For devices to contribute current to an external circuit, the devsim.contact_equation() (page 83)
should use the circuitnode option to specify the circuit node in which to integrate its current.
This option does not create a node in the circuit. No circuit boundary condition for the con-
tact equation will exist if the circuit node does not actually exist in the circuit. The devsim.
circuit_node_alias() (page 82) may be used to associate the name specified on the contact
equation to an existing circuit node on the circuit.
35
DEVSIM Manual, Release 2.8.2
The circuit node names may be used in any model expression on the regions and interfaces.
However, the simulator will only take derivatives with respect to circuit nodes names on models
used to compose the contact equation.
The devsim.delete_circuit() (page 82) command may be used to remove the circuit com-
pletely.
Meshing
8.1 1D mesher
DEVSIM has an internal 1D mesher and the proper sequence of commands follow in this example.
devsim.create_1d_mesh(mesh="cap")
devsim.add_1d_mesh_line(mesh="cap", pos=0, ps=0.1, tag="top")
devsim.add_1d_mesh_line(mesh="cap", pos=0.5, ps=0.1, tag="mid")
devsim.add_1d_mesh_line(mesh="cap", pos=1, ps=0.1, tag="bot")
devsim.add_1d_contact(mesh="cap", name="top", tag="top", material="metal")
devsim.add_1d_contact(mesh="cap", name="bot", tag="bot", material="metal")
devsim.add_1d_interface(mesh="cap", name="MySiOx", tag="mid")
devsim.add_1d_region(mesh="cap", material="Si", region="MySiRegion",
tag1="top", tag2="mid")
devsim.add_1d_region(mesh="cap", material="Ox", region="MyOxRegion",
tag1="mid", tag2="bot")
devsim.finalize_mesh(mesh="cap")
devsim.create_device(mesh="cap", device="device")
The devsim.create_1d_mesh() (page 93) is first used to initialize the specification of a new mesh
by the name specified with the command option. The devsim.add_1d_mesh_line() (page 90) is
used to specify the end points of the 1D structure, as well as the location of points where the
spacing changes. The command is used to create reference labels used for specifying the contacts,
interfaces and regions.
The devsim.add_1d_contact() (page 90), devsim.add_1d_interface() (page 90) and devsim.
add_1d_region() (page 90) are used to specify the contacts, interfaces and regions for the device.
Once the meshing commands have been completed, the devsim.finalize_mesh() (page 95) is
called to create a mesh structure and then devsim.create_device() (page 93) is used to create
a device using the mesh.
37
DEVSIM Manual, Release 2.8.2
8.2 2D mesher
Similar to the 1D mesher, the 2D mesher uses a sequence of non-terminating mesh lines are
specified in both the x and y directions to specify a mesh structure. As opposed to using tags, the
regions are specified using devsim.add_2d_region() (page 92) as box coordinates on the mesh
coordinates. The contacts and interfaces are specified using boxes, however it is best to ensure
the the interfaces and contacts encompass only one line of points.
devsim.create_2d_mesh(mesh="cap")
devsim.add_2d_mesh_line(mesh="cap", dir="y", pos=-0.001, ps=0.001)
devsim.add_2d_mesh_line(mesh="cap", dir="x", pos=xmin, ps=0.1)
devsim.add_2d_mesh_line(mesh="cap", dir="x", pos=xmax, ps=0.1)
devsim.add_2d_mesh_line(mesh="cap", dir="y", pos=ymin, ps=0.1)
devsim.add_2d_mesh_line(mesh="cap", dir="y", pos=ymax, ps=0.1)
devsim.add_2d_mesh_line(mesh="cap", dir="y", pos=+1.001, ps=0.001)
devsim.add_2d_region(mesh="cap", material="gas", region="gas1", yl=-.001, yh=0.0)
devsim.add_2d_region(mesh="cap", material="gas", region="gas2", yl=1.0, yh=1.001)
devsim.add_2d_region(mesh="cap", material="Oxide", region="r0", xl=xmin, xh=xmax,
yl=ymid1, yh=ymin)
devsim.add_2d_region(mesh="cap", material="Silicon", region="r1", xl=xmin, xh=xmax,
yl=ymid2, yh=ymid1)
devsim.add_2d_region(mesh="cap", material="Silicon", region="r2", xl=xmin, xh=xmax,
yl=ymid2, yh=ymax)
In the current implementation of the software, it is necessary to create a region on both sides of
the contact in order to create a contact using devsim.add_2d_contact() (page 91) or an interface
using devsim.add_2d_interface() (page 91).
Once the meshing commands have been completed, the devsim.finalize_mesh() (page 95) is
called to create a mesh structure and then devsim.create_device() (page 93) is used to create
a device using the mesh.
8.2. 2D mesher 38
DEVSIM Manual, Release 2.8.2
8.3.1 Gmsh
The Gmsh meshing software (see Gmsh (page 9)) can be used to create a 1D, 2D, or 3D mesh
suitable for use in DEVSIM. DEVSIM supports reading version 2.2 meshes from Gmsh. In order to
write this format, it is necessary to specify the mesh format when writing out a mesh file. From the
gmsh command line, use the -format msh2 option.
When creating the mesh file using the software, use physical group names to map the difference
entities in the resulting mesh file to a group name.
In this example, a MOS structure is read in:
devsim.create_gmsh_mesh(file="gmsh_mos2d.msh", mesh="mos2d")
devsim.add_gmsh_region(mesh="mos2d" gmsh_name="bulk", region="bulk",
material="Silicon")
devsim.add_gmsh_region(mesh="mos2d" gmsh_name="oxide", region="oxide",
material="Silicon")
devsim.add_gmsh_region(mesh="mos2d" gmsh_name="gate", region="gate",
material="Silicon")
devsim.add_gmsh_contact(mesh="mos2d" gmsh_name="drain_contact", region="bulk",
name="drain", material="metal")
devsim.add_gmsh_contact(mesh="mos2d" gmsh_name="source_contact", region="bulk",
name="source", material="metal")
devsim.add_gmsh_contact(mesh="mos2d" gmsh_name="body_contact", region="bulk",
name="body", material="metal")
devsim.add_gmsh_contact(mesh="mos2d" gmsh_name="gate_contact", region="gate",
name="gate", material="metal")
devsim.add_gmsh_interface(mesh="mos2d" gmsh_name="gate_oxide_interface",
region0="gate", region1="oxide", name="gate_oxide")
devsim.add_gmsh_interface(mesh="mos2d" gmsh_name="bulk_oxide_interface",
region0="bulk", region1="oxide", name="bulk_oxide")
devsim.finalize_mesh(mesh="mos2d")
devsim.create_device(mesh="mos2d", device="mos2d")
Once the meshing commands have been completed, the devsim.finalize_mesh() (page 95) is
called to create a mesh structure and then devsim.create_device() (page 93) is used to create
a device using the mesh.
It is also possible to arbitrarily load a mesh from a Python using the devsim.create_gmsh_mesh()
(page 94). This is explained in the Notes section of the command. In addition, please see the
testing/pythonmesh1d script for a simple demonstration script. These meshes may only con-
tain points, lines, triangles, and tetrahedra. Hybrid meshes or uniform meshes containing other
elements are not supported at this time.
The devsim.write_devices() (page 95) is used to create an ASCII file suitable for saving data
for restarting the simulation later. The devsim format encodes structural information, as well as
the commands necessary for generating the models and equations used in the simulation. The
devsim_data format is used for storing numerical information for use in other programs for analysis.
The devsim.load_devices() (page 95) is then used to reload the device data for restarting the
simulation.
8.6 Notes
8.6.1 Contacts
Contact material
Contacts requires a material setting (e.g. metal). This is for informational purposes. Contact
models still look up parameter values based on the region they are located.
The devsim.delete_device() (page 95) command makes it possible to delete devices so they
will no longer be solved in the simulation. Any parameters set on the device are also removed
from the system.
The devsim.delete_mesh() (page 95) command makes it possible to delete meshes. Once a
mesh has been deleted, it is no longer possible to create devices from it using the devsim.
create_device() (page 93) command.
8.6. Notes 41
Chapter 9
9.1 Overview
DEVSIM uses Newton methods to solve the system of PDE’s. All of the analyses are performed
using the [Link]() (page 111).
9.2.1 DC analysis
42
DEVSIM Manual, Release 2.8.2
9.2.2 AC analysis
An AC analysis is performed using the [Link]() (page 111). A circuit voltage source is
required to set the AC source.
An noise analysis is performed using the [Link]() (page 111) command. A circuit node
is specified in order to find its sensitivity to changes in the bulk quantities of each device. If the
circuit node is named V1.I. A noise simulation is performed using:
Noise and sensitivity analysis is performed using the [Link]() (page 111). If the equation
begin solved is PotentialEquation, the names of the scalar impedance field is then:
• V1.I_PotentialEquation_real
• V1.I_PotentialEquation_imag
and the vector impedance fields evaluated on the nodes are
• V1.I_PotentialEquation_real_gradx
• V1.I_PotentialEquation_imag_gradx
• V1.I_PotentialEquation_real_grady (2D and 3D)
• V1.I_PotentialEquation_imag_grady (2D and 3D)
• V1.I_PotentialEquation_real_gradz (3D only)
• V1.I_PotentialEquation_imag_gradz (3D only)
Transient analysis is performed using the [Link]() (page 111). DEVSIM supports time-
integration of the device PDE’s. The three methods are supported are:
• BDF1
• TRBDF
• BDF2
Extended precision is available on all binaries. For Linux x86_64, this uses the 128-bit
precision available with the GCC compilers. On other platforms, x64, arm64, aarch64, the
cpp_bin_float_quad type is used from the boost libraries, and is similar to 128-bit precision.
The kahan3 and kahan4 functions use the Kahan summation algorithm for extended precision
model evaluation. With this change, better than 128-bit floating precision is available when ex-
tended precision is enabled.
On arm64 and aarch64 platforms, the software does not check for floating point exceptions (FPEs)
during usage of the direct solver. During testing, it was discovered that FPEs were occuring during
factorization for both the SuperLU and the UMFPACK 5.1. Removing this check allows more of the
tests to run through to completion.
A specific version is not required when loading the Intel Math Kernel Library. This method is
the default for x64 and x86_64 systems. Instructions for installing in a Python virtual environment
are given in Create virtual environment (page 7).
The UMFPACK 5.1 solver is now available as a shared library distributed with the software. It is
licensed under the terms of the LGPL 2.1 and our version is hosted here:
[Link]
Please note that this version uses a scheme to detect the BLAS/LAPACK libraries being used by
DEVSIM, as described in BLAS/LAPACK library selection (page 46).
In order to use this library, a shim script is provided to load UMFPACK 5.1 and set it as the solver.
Please see this example:
Custom solver
Please see Custom direct solver (page 47) for more information.
SuperLU
SuperLU is no longer available as a solver in the binary distributions of DEVSIM. It is available for
custom applications, which would require a custom build of the software.
UMFPACK 5.1 is the default when the Intel Math Kernel Library is not available, making this the
default for the macOS arm64 platform.
The direct solver may be selected by using the direct_solver parameter.
devsim.set_parameter(name='direct_solver', value='mkl_pardiso')
All compatible platforms will search for the Intel MKL Pardiso. The default is mkl_pardiso when
the Intel Math Kernel Library is loaded. The umfshim described in UMFPACK 5.1 solver
(page 45) uses the custom option for this parameter to implement calls using the custom solver
callback system described in Custom direct solver (page 47).
Reference versions are available from [Link] There are optimized versions available
from other vendors. It is possible to load alternative implementations of the BLAS/LAPACK used
by the software. The DEVSIM_MATH_LIBS environment variable may be used to set a : separated
list of libraries. These names may be based on relative or absolute paths. The program will load
the libraries in order, and stop when all of the necessary math symbols are supplied. If symbols
for the Intel Math Kernel Library are detected, then the Pardiso direct solver will be enabled.
Linux example:
export DEVSIM_MATH_LIBS=[Link]:[Link]
export DEVSIM_MATH_LIBS=[Link]:[Link]
On Windows the DEVSIM_MATH_LIBS uses the ; as the path separator, while macOS and Linux still
use :.
The math library search order is then:
• The math libraries listed in the DEVSIM_MATH_LIBS environment variable, with the appropriate
separator.
• The Intel Math Kernel Library
• These dynamic libraries * OpenBLAS (e.g. [Link]) * LAPACK (e.g. [Link]) *
BLAS (e.g. [Link])
It is recommended to use the full path for all of the math solver libraries. On macOS and Linux,
the RPATH has been modified to look in places relative to the devsim module, instead of using
CONDA_PREFIX or VIRTUAL_ENV.
• macOS : @loader_path;@loader_path/../lib;@loader_path/../../../../lib;
@executable_path/../lib
• Linux : $ORIGIN:$ORIGIN/../lib:$ORIGIN/../../../../lib
devsim.get_parameter(name='info')['math_libraries']
It is call a custom direct solver. The direct solver is called from Python and the callback is imple-
mented by setting these parameters:
parameter table
devsim.set_parameter(name="direct_solver", value="custom")
devsim.set_parameter(name="solver_callback", value=local_solver_callback)
Where the first parameter enables the use of the second parameter to set a callback function.
Please see the testing/umfpack_shim.py for a sample implementation using UMFPACK 5.1.
9.7 Diagnostics
The node indexes with the maximum error for each equation will be printed when debug_level is
verbose.
devsim.set_parameter(name="debug_level", value="verbose")
This information is also returned when using the info=True option on the [Link]()
(page 111) command for each equation on each region of a device.
If the info flag is set to True on the solve command, the iteration information will be returned, and
an exception for convergence will no longer be thrown. It is the responsibility of the caller to test
the result of the solve command to see if the simulation converged. Other types of exceptions,
such as floating point errors, will still result in a Python exception that needs to be caught.
The [Link]() (page 111) now supports the info option. The solve command will then
return convergence information.
The Intel Math Kernel Library solver will now use reuse the symbolic factorization, if the sim-
ulation matrix sparse matrix pattern has not changed after the second nonlinear solver iteration.
This reduces simulation time, but can result in numerical differences in the simulation result. Set-
ting the environment variable, DEVSIM_NEW_SYMBOLIC, will do a new symbolic factorization for each
iteration.
This behavior may be controlled by using this option in the [Link]() (page 111) command
solve(symbolic_iteration_limit = -1)
where setting the value to -1 will create a new symbolic factorization for all nonlinear iterations.
Setting the value to a number greater than 0 will mark all iterations afterwards for reusing the
previous symbolic factorization.
9.9 Notes
The devsim.get_matrix_and_rhs() (page 111) command was not properly accepting the format
parameter, and was always returning the same type.
The devsim.get_matrix_and_rhs() (page 111) command has been added to assemble the static
and dynamic matrices, as well as their right hand sides, based on the current state of the device
being simulated. The format option is used to specify the sparse matrix format, which may be
either in the compressed column or compressed row formats, csc or csr.
9.9. Notes 49
Chapter 10
SYMDIFF
10.1 Overview
SYMDIFF is a tool capable of evaluating derivatives of symbolic expressions. Using a natural syntax,
it is possible to manipulate symbolic equations in order to aid derivation of equations for a variety
of applications. It has been tailored for use within DEVSIM.
10.2 Syntax
Variables and numbers are the basic building blocks for expressions. A variable is defined as any
sequence of characters beginning with a letter and followed by letters, integer digits, and the _
character. Note that the letters are case sensitive so that a and {A} are not the same variable. Any
other characters are considered to be either mathematical operators or invalid, even if there is no
space between the character and the rest of the variable name.
Examples of valid variable names are:
a, dog, var1, var_2
Numbers can be integer or floating point. Scientific notation is accepted as a valid syntax. For
example:
1.0, 1.0e-2, 3.4E-4
50
DEVSIM Manual, Release 2.8.2
In Basic expressions involving unary, binary, and logical operators (page 51), the basic syntax
for the language is presented. An expression may be composed of variables and numbers tied
together with mathematical operations. Order of operations is from bottom to top in order of in-
creasing precedence. Operators with the same level of precedence are contained within horizontal
lines.
In the expression a + b * c, the multiplication will be performed before the addition. In order to
override this precedence, parenthesis may be used. For example, in (a + b) * c, the addition
operation is performed before the multiplication.
The logical operators are based on non zero values being true and zero values being false. The
test operators evaluate the numerical values and result in 0 for false and 1 for true.
10.2. Syntax 51
DEVSIM Manual, Release 2.8.2
It is important to note since values are based on double precision arithmetic, testing for
equality with values other than 0.0 may yield unexpected results.
10.2.3 Functions
10.2. Syntax 52
DEVSIM Manual, Release 2.8.2
In Predefined functions (page 52) are the built in functions of SYMDIFF. Note that the pow function
uses the , operator to separate arguments. In addition an expression like pow(a,b+y) is equivalent
to an expression like a^(b+y). Both exp and log are provided since many derivative expressions
can be expressed in terms of these two functions. It is possible to nest expressions within func-
tions and vice-versa. Error functions (page 53) lists the error functions, derivatives, and inverses.
Fermi Integral functions (page 53) lists the Fermi functions, and are based on the Joyce-Dixon Ap-
proximation [3]. The Gauss-Fermi functions are listed in Gauss-Fermi Integral functions (page 53),
based on [6].
10.2. Syntax 53
DEVSIM Manual, Release 2.8.2
10.2.4 Commands
Commands are shown in Commands (page 54). While they appear to have the same form as
functions, they are special in the sense that they manipulate expressions and are never present in
the expression which results. For example, note the result of the following command
> diff(a*b, b)
a
Commands for specifying and manipulating user functions are listed in Commands for user func-
tions (page 54). They are used in order to define new user function, as well as the derivatives of
the functions with respect to the user variables. For example, the following expression defines a
function named f which takes one argument.
The list after the function protoype is used to define the derivatives with respect to each of the
independent variables. Once defined, the function may be used in any other expression. In
additions the any expression can be used as an arguments. For example:
10.2. Syntax 54
DEVSIM Manual, Release 2.8.2
> diff(f(x*y),x)
((0.5 * (x * y)) * y)
> simplify((0.5 * (x * y)) * y)
(0.5 * x * (y^2))
The chain rule is applied to ensure that the derivative is correct. This can be expressed as
∂ ∂u ∂ ∂v ∂
f (u, v, . . .) = · f (u, v, . . .) + · f (u, v, . . .) + . . .
∂x ∂x ∂u ∂x ∂v
The declare command is required when the derivatives of two user functions are based on one
another. For example:
> declare(cos(x))
cos(x)
> define(sin(x),cos(x))
sin(x)
> define(cos(x),-sin(x))
cos(x)
When declared, a functions derivatives are set to 0, unless specified with a define command. It is
now possible to use these expressions as desired.
> diff(sin(cos(x)),x)
(cos(cos(x)) * (-sin(x)))
> simplify(cos(cos(x)) * (-sin(x)))
(-cos(cos(x)) * sin(x))
The use of macro assignment allows the substitution of expressions into new expressions. Every
time a command is successfully used, the resulting expression is assigned to a special macro
definition, $_.
In this example, the result of the each command is substituted into the next.
> a+b
(a + b)
> $_-b
((a + b) - b)
> simplify($_)
a
In addition to the default macro definition, it is possible to specify a variable identifier by using the
$ character followed by an alphanumeric string beginning with a letter. In addition to letters and
numbers, a _ character may be used as well. A macro which has not previously assigned will
implicitly use 0 as its value.
This example demonstrates the use of macro assignment.
10.2. Syntax 55
DEVSIM Manual, Release 2.8.2
> $a1 = a + b
(a + b)
> $a2 = a - b
(a - b)
> simplify($a1+$a2)
(2 * a)
The [Link]() (page 109) should be used when defining new functions to the parser.
Since you do not specify regions or interfaces, it considers all strings as being independent vari-
ables, as opposed to models. Model commands (page 96) presents commands which have the
concepts of models. A ; should be used to separate each statement.
This is a sample invocation from DEVSIM
The cos and sin function may then be used for model evaluation. For improved efficiency, it is
possible to create procedures written in C or C++ and load them into Python.
10.3.3 Models
When used withing the model commands discussed in Model commands (page 96), DEVSIM has
been extended to recognize model names in the expressions. In this situation, the derivative of a
model named, model, with respect to another model, variable, is then model:variable.
During the element assembly process, DEVSIM evaluates all models of an equation together. While
the expressions in models and their derivatives are independent, the software uses a caching
scheme to ensure that redundant calculations are not performed. It is recommended, however, that
users developing their own models investigate creating intermediate models in order to improve
their understanding of the equations that they wish to be assembled.
11.1 Introduction
DEVSIM is able to create files for visualization tools. Information about acquiring these tools are
presented in Install external software tools (page 9).
11.2.1 Overview
The tools in Table 11.1 can read the file Tecplot and VTK Formats.
The devsim.write_devices() (page 95) is used to create an ASCII file suitable for use in
ParaView. Edge quantities are interpolated onto the node positions in the resulting structure.
Element edge quantities are interpolated onto the centers of each triangle or tetrahedron in the
mesh.
write_devices(file="mos_2d_dd", type="vtk")
One vtu file per device region will be created, as well as a vtm file which may be used to load all
of the device regions into ParaView.
58
DEVSIM Manual, Release 2.8.2
VisIt supports reading the Tecplot and ParaView formats. When using the vtk option on the
devsim.write_devices() (page 95), a file with a visit filename extension is created to load the
files created for ParaView.
devsim.write_devices(
file="mesh2d_reduced.tec",
type="tecplot",
include_test=lambda x: x in ("NetDoping",),
)
DEVSIM has several commands for getting information on the mesh. Those related to post pro-
cessing are described in Model commands (page 96) and Geometry commands (page 87).
See Loading and saving results (page 40) for information about loading and saving mesh informa-
tion to a file.
The coordinate_index and node_index are default node models created on a region (Table 5.1}).
The edge_index is a default edge models created on a region Table 5.2.
The devsim.get_element_node_list() (page 87) retrieves a list of nodes for every element on a
region, contact, or interface.
Examples
The following example directories are contained in the distribution. Some of them are described
in Simple Examples (page 65).
60
DEVSIM Manual, Release 2.8.2
0
y
-1
-2
-3
-3 -2 -1 0 1 2 3
x
Fig. 12.1: Simulation result for solving for the magnetic potential and field. The coloring is by the Z
component of the magnetic potential, and the stream traces are for components of magnetic field.
The scripts in the testing and examples directories are used for the regression tests whose plat-
form dependent results are kept in the repositories listed in Regression results (page 63).
Some of them demonstrate the use of different features of the simulator.
• Extended precision
examples/diode/gmsh_diode3d_float128.py
• Version and Solver Information
Parameter info can be queried for getting version information. The file testing/
[Link] contains an example.
• Small signal simulation
examples/diode/ssac_diode.py
• Custom Matrix Assembly
examples/diode/diode_1d_custom.py demonstrates custom matrix assembly and
can be directly compared to examples/diode/diode_1d.py.
• Custom External Meshing
testing/[Link] demonstrates how to create a mesh via script, and how
to get mesh information using devsim.get_element_node_list() (page 87).
• Transient Simulation
– examples/diode/tran_diode.py demonstrates transient diode simulation.
– testing/transient_rc.py test which compares simulation with analytic result for RC
circuit.
• Fermi and Gauss-Fermi Statistics
– testing/[Link] Fermi integral
– testing/Fermi1_float128.py Fermi integral in extended floating point precision
– testing/[Link] Gauss-Fermi integral
– testing/[Link] Gauss-Fermi integral with extended floating point precision
• devsim ([Link]
The simulator
• devsim_documentation ([Link]
12.3.2 Examples
• devsim_bjt_example ([Link]
BJT Example.
• devsim_3dmos ([Link]
Simulation files use in publication. Processes mesh generated with Cubit.
• devsim_misc ([Link]
Miscellaneous Documentation Files. Contains mesh refinement scripts and Gmsh
processing.
• devsim_density_gradient ([Link]
Density Gradient Simulation
• devsim_tests_linux_aarch64 ([Link]
Linux arm64
• devsim_tests_linux_x86_64 ([Link]
Linux x86_64
• devsim_tests_macos_arm64 ([Link]
macOS arm64
• devsim_tests_win64 ([Link]
Windows x64
• [Link]
• Eigen ([Link]
• Boost multiprecision ([Link]
• Boost math ([Link]
• |superlu| ([Link]
Simple Examples
13.1 Capacitor
13.1.1 Overview
In this chapter, we present a capacitance simulations. The purpose is to demonstrate the use
of DEVSIM with a rather simple example. The first example in 1D capacitor (page 65) is called
[Link] and is located in the examples/capacitance directory distributed with DEVSIM. In this
example, we have manually taken the derivative expressions. In other examples, we will show
use of SYMDIFF to create the derivatives in an automatic fashion. The second example is in 2D
capacitor (page 69).
13.1.2 1D capacitor
Equations
In this example, we are solving Poisson’s equation. In differential operator form, the equation to
be solved over the structure is:
ε∇2 ψ = 0
ψi −Vc = 0
where ψi is the potential at the contact node and Vc is the applied voltage.
65
DEVSIM Manual, Release 2.8.2
The following statements create a one-dimensional mesh which is 1 cm long with a 0.1 cm spacing.
A contact is placed at 0 and 1 and are named contact1 and contact2 respectively.
###
### Create a 1D mesh
###
create_1d_mesh (mesh="mesh1")
add_1d_mesh_line (mesh="mesh1", pos=0.0, ps=0.1, tag="contact1")
add_1d_mesh_line (mesh="mesh1", pos=1.0, ps=0.1, tag="contact2")
add_1d_contact (mesh="mesh1", name="contact1", tag="contact1",
material="metal")
add_1d_contact (mesh="mesh1", name="contact2", tag="contact2",
material="metal")
add_1d_region (mesh="mesh1", material="Si", region=region,
tag1="contact1", tag2="contact2")
finalize_mesh (mesh="mesh1")
create_device (mesh="mesh1", device=device)
###
### Set parameters on the region
###
set_parameter(device=device, region=region,
name="Permittivity", value=3.9*8.85e-14)
###
### Create the Potential solution variable
###
node_solution(device=device, region=region, name="Potential")
In order to create the edge models, we need to be able to refer to Potential on the nodes on each
edge.
13.1. Capacitor 66
DEVSIM Manual, Release 2.8.2
###
### Creates the Potential@n0 and Potential@n1 edge model
###
edge_from_node_model(device=device, region=region, node_model="Potential")
We then create the ElectricField model with knowledge of Potential on each node, as
well as the EdgeInverseLength of each edge. We also manually calculate the derivative of
ElectricField with Potential on each node and name them ElectricField:Potential@n0 and
ElectricField:Potential@n1.
###
### Electric field on each edge, as well as its derivatives with respect to
### the potential at each node
###
edge_model(device=device, region=region, name="ElectricField",
equation="(Potential@n0 - Potential@n1)*EdgeInverseLength")
###
### Model the D Field
###
edge_model(device=device, region=region, name="DField",
equation="Permittivity*ElectricField")
The bulk equation is now created for the structure using the models and parameters we have
previously defined.
###
### Create the bulk equation
###
equation(device=device, region=region, name="PotentialEquation",
variable_name="Potential", edge_model="DField",
variable_update="default")
13.1. Capacitor 67
DEVSIM Manual, Release 2.8.2
We then create the contact models and equations. We use the Python for loop construct and
variable substitutions to create a unique model for each contact, contact1_bc and contact2_bc.
###
### Contact models and equations
###
for c in ("contact1", "contact2"):
contact_node_model(device=device, contact=c, name="%s _bc" % c,
equation="Potential - %s _bias" % c)
In this example, the contact bias is applied through parameters named contact1_bias and
contact2_bias. When applying the boundary conditions through circuit nodes, models with re-
spect to their names and their derivatives would be required.
###
### Set the contact
###
set_parameter(device=device, region=region, name="contact1_bias", value=1.0e-0)
set_parameter(device=device, region=region, name="contact2_bias", value=0.0)
###
### Solve
###
solve(type="dc", absolute_error=1.0, relative_error=1e-10, maximum_iterations=30)
###
### Print the charge on the contacts
###
for c in ("contact1", "contact2"):
print("contact: %s charge: %1.5e "
% (c, get_contact_charge(device=device, contact=c, equation="PotentialEquation
,→")))
13.1. Capacitor 68
DEVSIM Manual, Release 2.8.2
contact2
(region: MyRegion)
(contact: contact1)
(contact: contact2)
Region "MyRegion" on device "MyDevice" has equations 0:10
Device "MyDevice" has equations 0:10
number of equations 11
Iteration: 0
Device: "MyDevice" RelError: 1.00000e+00 AbsError: 1.00000e+00
Region: "MyRegion" RelError: 1.00000e+00 AbsError: 1.00000e+00
Equation: "PotentialEquation" RelError: 1.00000e+00 AbsError: 1.00000e+00
Iteration: 1
Device: "MyDevice" RelError: 2.77924e-16 AbsError: 1.12632e-16
Region: "MyRegion" RelError: 2.77924e-16 AbsError: 1.12632e-16
Equation: "PotentialEquation" RelError: 2.77924e-16 AbsError: 1.12632e-16
contact: contact1 charge: 3.45150e-13
contact: contact2 charge: -3.45150e-13
Which corresponds to our expected result of 3.451510−13 F/cm2 for a homogenous capacitor.
13.1.3 2D capacitor
This example is called [Link] and is located in the examples/capacitance directory distributed
with DEVSIM. This file uses the same physics as the 1D example, but with a 2D structure. The mesh
is built using the DEVSIM internal mesher. An air region exists with two electrodes in the simulation
domain.
xmin=-25
x1 =-24.975
x2 =-2
x3 =2
x4 =24.975
xmax=25.0
ymin=0.0
(continues on next page)
13.1. Capacitor 69
DEVSIM Manual, Release 2.8.2
create_2d_mesh(mesh=device)
add_2d_mesh_line(mesh=device, dir="y", pos=ymin, ps=0.1)
add_2d_mesh_line(mesh=device, dir="y", pos=y1 , ps=0.1)
add_2d_mesh_line(mesh=device, dir="y", pos=y2 , ps=0.1)
add_2d_mesh_line(mesh=device, dir="y", pos=y3 , ps=0.1)
add_2d_mesh_line(mesh=device, dir="y", pos=y4 , ps=0.1)
add_2d_mesh_line(mesh=device, dir="y", pos=ymax, ps=5.0)
device=device
region="air"
finalize_mesh(mesh=device)
create_device(mesh=device, device=device)
13.1. Capacitor 70
DEVSIM Manual, Release 2.8.2
###
### Set parameters on the region
###
set_parameter(device=device, region=region, name="Permittivity", value=3.9*8.85e-
,→14)
###
### Create the Potential solution variable
###
node_solution(device=device, region=region, name="Potential")
###
### Creates the Potential@n0 and Potential@n1 edge model
###
edge_from_node_model(device=device, region=region, node_model="Potential")
###
### Electric field on each edge, as well as its derivatives with respect to
### the potential at each node
###
edge_model(device=device, region=region, name="ElectricField",
equation="(Potential@n0 - Potential@n1)*EdgeInverseLength")
###
### Model the D Field
###
edge_model(device=device, region=region, name="DField",
equation="Permittivity*ElectricField")
###
### Create the bulk equation
###
(continues on next page)
13.1. Capacitor 71
DEVSIM Manual, Release 2.8.2
###
### Contact models and equations
###
for c in ("top", "bot"):
contact_node_model(device=device, contact=c, name="%s _bc" % c,
equation="Potential - %s _bias" % c)
###
### Set the contact
###
set_parameter(device=device, name="top_bias", value=1.0e-0)
set_parameter(device=device, name="bot_bias", value=0.0)
Before writing the mesh out for visualization, the element_from_edge_model is used to calculate
the electric field at each triangle center in the mesh. The components are the ElectricField_x
and ElectricField_y.
13.1. Capacitor 72
DEVSIM Manual, Release 2.8.2
write_devices(file="[Link]", type="devsim")
write_devices(file="[Link]", type="tecplot")
A visualization of the results is shown in Capacitance simulation result. The coloring is by Potential,
and the stream traces are for components of ElectricField. (page 74).
13.1. Capacitor 73
DEVSIM Manual, Release 2.8.2
10
6
y
0
-6 -4 -2 0 2 4 6
x
Fig. 13.1: Capacitance simulation result. The coloring is by Potential, and the stream traces are
for components of ElectricField.
13.1. Capacitor 74
DEVSIM Manual, Release 2.8.2
13.2 Diode
13.2.1 Overview
The diode examples are located in the examples/diode. They demonstrate the use of packages
located in the python_packages directory to simulate drift-diffusion using the Scharfetter-Gummel
method [9].
13.2.2 1D diode
For these examples, python modules are provided to supply the appropriate model and parameter
settings. A listing is shown in Python package files (page 75). The devsim.python_packages
module is part of the distribution. The example files in the DEVSIM distribution set the path properly
when loading modules.
For this example, diode_1d.py, the following line is used to import the relevant physics.
This creates a mesh 10−5 cm long with a junction located at the midpoint. The name of the device
is MyDevice with a single region names MyRegion. The contacts on either end are called top and
bot.
finalize_mesh(mesh="dio")
(continues on next page)
13.2. Diode 75
DEVSIM Manual, Release 2.8.2
device="MyDevice"
region="MyRegion"
createMesh(device, region)
####
#### Set parameters for 300 K
####
SetSiliconParameters(device, region, 300)
set_parameter(device=device, region=region, name="taun", value=1e-8)
set_parameter(device=device, region=region, name="taup", value=1e-8)
####
#### NetDoping
####
CreateNodeModel(device, region, "Acceptors", "1.0e18*step(0.5e-5-x)")
CreateNodeModel(device, region, "Donors", "1.0e18*step(x-0.5e-5)")
CreateNodeModel(device, region, "NetDoping", "Donors-Acceptors")
print_node_values(device=device, region=region, name="NetDoping")
####
#### Create Potential, Potential@n0, Potential@n1
####
CreateSolution(device, region, "Potential")
####
#### Create potential only physical models
####
CreateSiliconPotentialOnly(device, region)
####
#### Set up the contacts applying a bias
####
for i in get_contact_list(device=device):
set_parameter(device=device, name=GetContactBiasName(i), value=0.0)
CreateSiliconPotentialOnlyContact(device, region, i)
####
#### Initial DC solution
(continues on next page)
13.2. Diode 76
DEVSIM Manual, Release 2.8.2
####
#### drift diffusion solution variables
####
CreateSolution(device, region, "Electrons")
CreateSolution(device, region, "Holes")
####
#### create initial guess from dc only solution
####
set_node_values(device=device, region=region,
name="Electrons", init_from="IntrinsicElectrons")
set_node_values(device=device, region=region,
name="Holes", init_from="IntrinsicHoles")
###
### Set up equations
###
CreateSiliconDriftDiffusion(device, region)
for i in get_contact_list(device=device):
CreateSiliconDriftDiffusionAtContact(device, region, i)
###
### Drift diffusion simulation at equilibrium
###
solve(type="dc", absolute_error=1e10, relative_error=1e-10, maximum_iterations=30)
####
#### Ramp the bias to 0.5 Volts
####
v = 0.0
while v < 0.51:
set_parameter(device=device, name=GetContactBiasName("top"), value=v)
solve(type="dc", absolute_error=1e10, relative_error=1e-10, maximum_
,→iterations=30)
PrintCurrents(device, "top")
PrintCurrents(device, "bot")
v += 0.1
####
#### Write out the result
####
write_devices(file="diode_1d.dat", type="tecplot")
13.2. Diode 77
DEVSIM Manual, Release 2.8.2
A plot showing the doping profile and carrier densities are shown in Carrier density versus position
in 1D diode. (page 78). The potential and electric field distribution is shown in Potential and electric
field versus position in 1D diode. (page 79). The current distributions are shown in Electron and
hole current and recombination. (page 80).
18
10
1016
Acceptors
14 Donors
10
Electrons
Holes
12
10
1010
8
10
106
4
10
2
10
0 2E-06 4E-06 6E-06 8E-06 1E-05
x
13.2. Diode 78
DEVSIM Manual, Release 2.8.2
+00
0.0x10
5.0x10-01
Potential
-01 ElectricField +05
4.0x10 -1.0x10
-01
3.0x10
-2.0x10+05
-01
2.0x10
1.0x10-01 -3.0x10+05
0.0x10+00
+05
-4.0x10
0 2E-06 4E-06 6E-06 8E-06 1E-05
x
13.2. Diode 79
DEVSIM Manual, Release 2.8.2
+22
1.6x10
1.2x10-02
USRH
ElectronCurrent 1.2x10+22
HoleCurrent
8.0x10+21
-03
8.0x10
4.0x10+21
+00
0.0x10
0 2E-06 4E-06 6E-06 8E-06 1E-05
x
13.2. Diode 80
Chapter 14
Command Reference
81
DEVSIM Manual, Release 2.8.2
Notes
The integration variables can be changed in 2D for cylindrical coordinate systems by setting
the appropriate parameters as described in Cylindrical coordinate systems (page 29).
In order to set the node volumes for integration of the edge_volume_model, it is possible to
do something like this:
devsim.edge_model(device=”device”, region=”region”,
name=”EdgeNodeVolume”, equation=”0.5*SurfaceArea*EdgeLength”)
devsim.set_parameter(name=”edge_node0_volume_model”,
value=”EdgeNodeVolume”) devsim.set_parameter(name=”edge_node1_volume_model”,
value=”EdgeNodeVolume”)
devsim.get_contact_equation_command(device, contact, name)
This command gets the options used when creating this contact equation.
Parameters
• device (str ) – The selected device
• contact (str ) – Contact on which to apply this command
• name (str ) – Name of the contact equation being command options re-
turned
devsim.get_contact_equation_list(device, contact)
This command gets a list of equations on the specified contact.
Parameters
• device (str ) – The selected device
• contact (str ) – Contact on which to apply this command
devsim.get_equation_command(device, region, name)
This command gets the options used when creating this equation.
Parameters
• device (str ) – The selected device
• region (str ) – The selected region
• name (str ) – Name of the equation being command options returned
devsim.get_equation_list(device, region)
This command gets a list of equations on the specified region.
Parameters
• device (str ) – The selected device
• region (str ) – The selected region
devsim.get_equation_numbers(device, region, equation, variable)
Returns a list of the equation numbers corresponding to each node in a region. Values are
only valid when during the course of a solve.
Parameters
• device (str ) – The selected device
• region (str ) – The selected region
• equation (str , optional ) – Name of the equation
• variable (str , optional ) – Name of the variable
devsim.get_interface_equation_command(device, interface, name)
This command gets the options used when creating this interface equation.
Parameters
• device (str ) – The selected device
• interface (str ) – Interface on which to apply this command
• name (str ) – Name of the interface equation being command options re-
turned
devsim.get_interface_equation_list(device, interface)
This command gets a list of equations on the specified interface.
Parameters
• device (str ) – The selected device
• interface (str ) – Interface on which to apply this command
devsim.get_interface_list(device)
Gets a list of interfaces on a device.
Parameters
device (str ) – The selected device
devsim.get_region_list(device, contact, interface)
Gets a list of regions on a device, contact, or interface.
Parameters
• device (str ) – The selected device
• contact (str , optional ) – If specified, gets the name of the region be-
longing to this contact on the device
• interface (str , optional ) – If specified, gets the name of the regions
belonging to this interface on the device
devsim.reset_devsim()
Resets all data for clean restart.
Notes
Note that the device and region options are optional. If the region is not specified, the
parameter is retrieved for the entire device. If the device is not specified, the parameter is
retrieved for all devices. If the parameter is not found on the region, it is retrieved on the
device. If it is not found on the device, it is retrieved over all devices.
devsim.get_parameter_list(device, region)
Get list of parameter names on region, device, or globally
Parameters
• device (str , optional ) – The selected device
• region (str , optional ) – The selected region
Notes
Note that the device and region options are optional. If the region is not specified, the
parameter is retrieved for the entire device. If the device is not specified, the parameter is
retrieved for all devices. Unlike the [Link](), parameter names on the the
device are not retrieved if they do not exist on the region. Similarly, the parameter names
over all devices are not retrieved if they do not exist on the device.
devsim.set_material(device, region, contact, material)
Sets the new material for a region
Parameters
• device (str , optional ) – The selected device
• region (str , optional ) – The selected region
• contact (str , optional ) – Contact on which to apply this command
• material (str ) – New material name
devsim.set_parameter(device, region, name, value)
Set a parameter on region, device, or globally
Parameters
• device (str , optional ) – The selected device
• region (str , optional ) – The selected region
• name (str ) – Name of the parameter name being retrieved
• value (any ) – value to set for the parameter
Notes
Note that the device and region options are optional. If the region is not specified, the
parameter is set for the entire device. If the device is not specified, the parameter is set for
all devices.
• tag1 (str ) – Text label for the position bounding the region being added
• tag2 (str ) – Text label for the position bounding the region being added
• region (str ) – Name for the region being created
• material (str ) – Material for the region being created
devsim.add_2d_contact(name, material, mesh, region, xl, xh, yl, yh, bloat)
Add an interface to a 2D mesh
Parameters
• name (str ) – Name for the contact being created
• material (str ) – material for the contact being created
• mesh (str ) – Mesh to add the contact to
• region (str ) – Name of the region included in the contact
• xl (Float , optional ) – x position for corner of bounding box (default
-MAXDOUBLE)
• xh (Float , optional ) – x position for corner of bounding box (default
+MAXDOUBLE)
• yl (Float , optional ) – y position for corner of bounding box (default
-MAXDOUBLE)
• yh (Float , optional ) – y position for corner of bounding box (default
+MAXDOUBLE)
• bloat (Float , optional ) – Extend bounding box by this amount when
search for mesh to include in region (default 1e-10)
devsim.add_2d_interface(mesh, name, region0, region1, xl, xh, yl, yh, bloat)
Add an interface to a 2D mesh
Parameters
• mesh (str ) – Mesh to add the interface to
• name (str ) – Name for the interface being created
• region0 (str ) – Name of the region included in the interface
• region1 (str ) – Name of the region included in the interface
• xl (Float , optional ) – x position for corner of bounding box (default
-MAXDOUBLE)
• xh (Float , optional ) – x position for corner of bounding box (default
+MAXDOUBLE)
• yl (Float , optional ) – y position for corner of bounding box (default
-MAXDOUBLE)
Notes
This file will import a Gmsh format mesh from a file. Alternatively, the mesh structure may
be passed in as as arguments:
coordinates is a float list of positions in the mesh. Each coordinate adds an x, y, and z
position so that the coordinate list length is 3 times the number of coordinates.
physical_names is a list of contact, interface, and region names. It is referenced by index by
the elements list.
elements is a list of elements. Each element adds
• Element Type (float)
– 0 node
– 1 edge
– 2 triangle
– 3 tetrahedron
• Physical Index
– This indexes into the physical_names list.
• Nodes
– Each node of the element indexes into the coordinates list.
devsim.create_interface_from_nodes(device, name, region0, region1, nodes0, nodes1)
Creates an interface from lists of nodes
Parameters
• device (str ) – The selected device
Notes
Notes
Notes
Notes
For a node model, creates 2 edge models referring to the node model value at both ends of
the edge. For example, to calculate electric field:
devsim.edge_average_model(device=device, region=region,
node_model=”Potential”, edge_model=”ElecticField”, aver-
age_type=”negative_gradient”)
and the derivatives ElectricField:Potential@n0 and ElectricField:Potential@n1 are
then created from
devsim.edge_average_model(device=device, region=region,
node_model=”Potential”, edge_model=”ElecticField”, aver-
age_type=”negative_gradient”, derivative=”Potential”)
Notes
Notes
The vector option uses an averaging scheme for the edge values projected in the direction
of each edge. For a given model, model, the generated components in the visualization files
is:
• model_x_onNode
• model_y_onNode
• model_z_onNode (3D)
This averaging scheme does not produce accurate results, and it is recommended to use
the devsim.element_from_edge_model() (page 101) to create components better suited for
visualization. See Visualization and post processing (page 58) for more information about
creating data files for external visualization programs.
Notes
For an edge model emodel, creates an element models referring to the directional compo-
nents on each edge of the element:
• emodel_x
• emodel_y
If the derivative variable option is specified, the emodel@n0 and emodel@n1 are used to
create:
• emodel_x:variable@en0
• emodel_y:variable@en0
• emodel_x:variable@en1
• emodel_y:variable@en1
• emodel_x:variable@en2
• emodel_y:variable@en2
in 2D for each node on a triangular element. and
• emodel_x:variable@en0
• emodel_y:variable@en0
• emodel_z:variable@en0
• emodel_x:variable@en1
• emodel_y:variable@en1
• emodel_z:variable@en1
• emodel_x:variable@en2
• emodel_y:variable@en2
• emodel_z:variable@en2
• emodel_x:variable@en3
• emodel_y:variable@en3
• emodel_z:variable@en3
in 3D for each node on a tetrahedral element.
The suffix en0 refers to the first node on the edge of the element and en1 refers to the second
node. en2 and en3 specifies the derivatives with respect the variable at the nodes opposite
the edges on the element being considered.
devsim.element_from_node_model(device, region, node_model)
Creates element edge models from a node model
Parameters
• device (str ) – The selected device
• region (str ) – The selected region
• node_model (str ) – The node model from which we are creating the edge
model
Notes
This command creates an element edge model from a node model so that each corner of
the element is represented. A node model, nmodel, would be be accessible as
• nmodel@en0
• nmodel@en1
• nmodel@en2
• nmodel@en3 (3D)
where en0, and en1 refers to the nodes on the element’s edge. In 2D, en2 refers to the node
on the triangle node opposite the edge. In 3D, en2 and en3 refers to the nodes on the nodes
off the element edge on the tetrahedral element.
devsim.element_model(device, region, name, equation, display_type)
Create a model evaluated on element edges.
Parameters
• device (str ) – The selected device
Notes
For an edge model emodel, creates an element models referring to the directional compo-
nents on each edge of the element:
• emodel_node0_x
• emodel_node0_y
• emodel_node1_x
• emodel_node1_y
If the derivative variable option is specified, the emodel@n0 and emodel@n1 are used to
create:
• emodel_node0_x:variable@en0
• emodel_node0_y:variable@en0
• emodel_node0_x:variable@en1
• emodel_node0_y:variable@en1
• emodel_node0_x:variable@en2
• emodel_node0_y:variable@en2
• emodel_node1_x:variable@en0
• emodel_node1_y:variable@en0
• emodel_node1_x:variable@en1
• emodel_node1_y:variable@en1
• emodel_node1_x:variable@en2
• emodel_node1_y:variable@en2
in 2D for each node on a triangular element. and
• emodel_node0_x:variable@en0
• emodel_node0_y:variable@en0
• emodel_node0_z:variable@en0
• emodel_node0_x:variable@en1
• emodel_node0_y:variable@en1
• emodel_node0_z:variable@en1
• emodel_node0_x:variable@en2
• emodel_node0_y:variable@en2
• emodel_node0_z:variable@en2
• emodel_node0_x:variable@en3
• emodel_node0_y:variable@en3
• emodel_node0_z:variable@en3
• emodel_node1_x:variable@en0
• emodel_node1_y:variable@en0
• emodel_node1_z:variable@en0
• emodel_node1_x:variable@en1
• emodel_node1_y:variable@en1
• emodel_node1_z:variable@en1
• emodel_node1_x:variable@en2
• emodel_node1_y:variable@en2
• emodel_node1_z:variable@en2
• emodel_node1_x:variable@en3
• emodel_node1_y:variable@en3
• emodel_node1_z:variable@en3
in 3D for each node on a tetrahedral element.
The label node0 and node1 refer to the node on the edge for which the element field average
was performed. For example, node0 signifies that all edges connected to node0 where used
to calculate the element field.
The suffix en0 refers to the first node on the edge of the element and en1 refers to the second
node. en2 and en3 specifies the derivatives with respect the variable at the nodes opposite
the edges on the element being considered.
devsim.element_solution(device, region, name)
Create node model whose values are set.
Parameters
• device (str ) – The selected device
• region (str ) – The selected region
• name (str ) – Name of the solution being created
devsim.get_edge_model_list(device, region)
Returns a list of the edge models on the device region
Parameters
• device (str ) – The selected device
• region (str ) – The selected region
devsim.get_edge_model_values(device, region, name)
Get the edge model values calculated at each edge.
Parameters
• device (str ) – The selected device
• region (str ) – The selected region
• name (str ) – Name of the edge model values being returned as a list
devsim.get_element_model_list(device, region)
Returns a list of the element edge models on the device region
Parameters
• device (str ) – The selected device
• region (str ) – The selected region
devsim.get_element_model_values(device, region, name)
Get element model values at each element edge
Parameters
• device (str ) – The selected device
• region (str ) – The selected region
• name (str ) – Name of the element edge model values being returned as
a list
devsim.get_interface_model_list(device, interface)
Returns a list of the interface models on the interface
Parameters
• device (str ) – The selected device
• interface (str ) – Interface on which to apply this command
devsim.get_interface_model_values(device, interface, name)
Gets interface model values evaluated at each interface node.
Parameters
• device (str ) – The selected device
• interface (str ) – Interface on which to apply this command
• name (str ) – Name of the interface model values being returned as a list
devsim.get_node_model_list(device, region)
Returns a list of the node models on the device region
Parameters
• device (str ) – The selected device
• region (str ) – The selected region
devsim.get_node_model_values(device, region, name)
Get node model values evaluated at each node in a region.
Parameters
• device (str ) – The selected device
• region (str ) – The selected region
• name (str ) – Name of the node model values being returned as a list
devsim.interface_model(device, interface, equation)
Create an interface model from an equation.
Parameters
• device (str ) – The selected device
• interface (str ) – Interface on which to apply this command
• equation (str ) – Equation used to describe the interface node model be-
ing created
devsim.interface_normal_model(device, region, interface)
Creates edge models whose components are based on direction and distance to an interface
Parameters
• device (str ) – The selected device
Notes
Notes
This command creates element edge models from an element model which represent the
vector components on the element edge. An element model, emodel, would then have
• emodel_x
• emodel_y
• emodel_z (3D only)
The primary use of these components are for visualization.
devsim.vector_gradient(device, region, node_model, calc_type)
Creates the vector gradient for noise analysis
Parameters
• device (str ) – The selected device
• region (str ) – The selected region
• node_model (str ) – The node model from which we are creating the edge
model
• calc_type ({'default' , 'avoidzero'} ) – The node model from which
we are creating the edge model
Notes
Used for noise analysis. The avoidzero option is important for noise analysis, since a node
model value of zero is not physical for some contact and interface boundary conditions. For
a given node model, model, a node model is created in each direction:
• model_gradx (1D)
• model_grady (2D and 3D)
• model_gradz (3D)
It is important not to use these models for simulation, since DEVSIM, does not have a
way of evaluating the derivatives of these models. The models can be used for integrating
the impedance field, and other postprocessing. The devsim.element_from_edge_model()
(page 101) command can be used to create gradients for use in a simulation.
113
Index
114
DEVSIM Manual, Release 2.8.2
Index 115
DEVSIM Manual, Release 2.8.2
V
vector_element_model() (in module devsim),
109
vector_gradient() (in module devsim), 110
W
write_devices() (in module devsim), 95
Index 116