Xyce  6.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
N_DEV_Const.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 // Copyright Notice
3 //
4 // Copyright 2002 Sandia Corporation. Under the terms
5 // of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S.
6 // Government retains certain rights in this software.
7 //
8 // Xyce(TM) Parallel Electrical Simulator
9 // Copyright (C) 2002-2014 Sandia Corporation
10 //
11 // This program is free software: you can redistribute it and/or modify
12 // it under the terms of the GNU General Public License as published by
13 // the Free Software Foundation, either version 3 of the License, or
14 // (at your option) any later version.
15 //
16 // This program is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with this program. If not, see <http://www.gnu.org/licenses/>.
23 //-----------------------------------------------------------------------------
24 
25 //-----------------------------------------------------------------------------
26 // Filename : $RCSfile: N_DEV_Const.h,v $
27 //
28 // Purpose :
29 //
30 // Special Notes :
31 //
32 // Creator : Eric R. Keiter, SNL, Parallel Computational Sciences
33 //
34 // Creation Date : 01/17/01
35 //
36 // Revision Information:
37 // ---------------------
38 //
39 // Revision Number: $Revision: 1.22 $
40 //
41 // Revision Date : $Date: 2014/04/15 23:10:37 $
42 //
43 // Current Owner : $Author: erkeite $
44 //-----------------------------------------------------------------------------
45 
46 
47 #ifndef Xyce_N_DEV_Const_h
48 #define Xyce_N_DEV_Const_h
49 
50 #define CONSTroot2 sqrt(2.0)
51 #define CONSTQ (1.6021918e-19) // electron charge
52 #define CONSTCtoK (273.15) // conversion of Celsius to Kelvin
53 #define CONSTboltz (1.3806226e-23) // Boltzmann's constant
54 #define CONSTplanck (6.62606957e-34) // Planck's constant (in J-s)
55 #define CONSTemass (9.10938291e-31) // e- mass in kg.
56 #define CONSTREFTEMP (300.15) // 27 degrees C
57 
58 #define CONSTKoverQ (CONSTboltz/CONSTQ) // K_b/q
59 
60 #define CONSTe exp(1.0)
61 #define CONSTperm0 (8.854214871e-12) // permitivity of free space.
62 #define CONSTpermOxide (3.9*CONSTperm0)
63 
64 #define CONSTvt0 (CONSTboltz * (27.0 +CONSTCtoK)/CONSTQ)
65 
66 // these two constants are used to caluculate the temperature dependent
67 // bandgap for Si.
68 
69 #define CONSTEg300 (1.1150877) // band gap for Si at T=300.15K (room temp)
70 #define CONSTEg0 (1.16) // band gap for Si at T=0K. (eV)
71 #define CONSTalphaEg (7.02e-4) // (eV/K)
72 #define CONSTbetaEg (1108.0) // (K)
73 
74 #define CONSTNi0 (1.45e10) // carrier concentration at room temp.
75 
76 #define CONSTNMOS 1
77 #define CONSTPMOS -1
78 
79 #define CONSTEPSOX (3.453133e-11)
80 #define CONSTEPSSI (1.03594e-10)
81 
82 #define CONSTEPSSIL (11.7 * 8.854214871e-12)
83 
84 
85 // BSIM3 constants:
86 // Most of these exponential constants are taken from 3f5's BSIM3 model.
87 // In reality they may be machine dependent.
88 //
89 // Normally machine dependent limits which are used in 3f5 come from
90 // files such as limits.h, hw.h, hw_ieee.h, and/or hw_vax.h. limits.h
91 // is a file that comes with the compiler, but the rest are part of 3f5.
92 //
93 #define CONSTEXP_THRESHOLD 34.0
94 #define CONSTMAX_EXP 5.834617425e14
95 #define CONSTMIN_EXP 1.713908431e-15
96 
97 #define CONSTDELTA_1 0.02
98 #define CONSTDELTA_2 0.02
99 #define CONSTDELTA_3 0.02
100 #define CONSTDELTA_4 0.02
101 
102 // end of the BSIM3 constants.
103 
104 // This value, 100.0 was arbitrarily chosen, mainly to
105 // avoid ieee errors when running Xyce without spice-style
106 // voltage limiters.
107 #define CONSTMAX_EXP_ARG 100.0
108 
109 // tanh threshold constant (value for which tanh(x) - 1.0 == 0.0) - this seems
110 // to vary from machine to machine but the largest I found was 22.0 on g++2.96
111 // with -O2 (it was less with no optimization). I've chose 20.0 as a
112 // comprimise. SAH, 14 April 2003
113 
114 #define CONSTTANH_THRESH 20.0
115 
116 #endif
117