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.21 $
40 //
41 // Revision Date : $Date: 2014/02/24 23:49:14 $
42 //
43 // Current Owner : $Author: tvrusso $
44 //-----------------------------------------------------------------------------
45 
46 
47 #ifndef Xyce_N_DEV_Const_h
48 #define Xyce_N_DEV_Const_h
49 
50 //#define CONSTroot2 (1.41421356237) // sqrt(2.0)
51 #define CONSTroot2 sqrt(2.0)
52 #define CONSTQ (1.6021918e-19) // electron charge
53 #define CONSTCtoK (273.15) // conversion of Celsius to Kelvin
54 #define CONSTboltz (1.3806226e-23) // Boltzmann's constant
55 #define CONSTREFTEMP (300.15) // 27 degrees C
56 
57 #define CONSTKoverQ (CONSTboltz/CONSTQ) // K_b/q
58 
59 #define CONSTe exp(1.0)
60 #define CONSTperm0 (8.854214871e-12) // permitivity of free space.
61 #define CONSTpermOxide (3.9*CONSTperm0)
62 
63 #define CONSTvt0 (CONSTboltz * (27.0 +CONSTCtoK)/CONSTQ)
64 
65 // these two constants are used to caluculate the temperature dependent
66 // bandgap for Si.
67 
68 #define CONSTEg300 (1.1150877) // band gap for Si at T=300.15K (room temp)
69 #define CONSTEg0 (1.16) // band gap for Si at T=0K. (eV)
70 #define CONSTalphaEg (7.02e-4) // (eV/K)
71 #define CONSTbetaEg (1108.0) // (K)
72 
73 #define CONSTNi0 (1.45e10) // carrier concentration at room temp.
74 
75 #define CONSTNMOS 1
76 #define CONSTPMOS -1
77 
78 #define CONSTEPSOX (3.453133e-11)
79 #define CONSTEPSSI (1.03594e-10)
80 
81 #define CONSTEPSSIL (11.7 * 8.854214871e-12)
82 
83 
84 // BSIM3 constants:
85 // Most of these exponential constants are taken from 3f5's BSIM3 model.
86 // In reality they may be machine dependent.
87 //
88 // Normally machine dependent limits which are used in 3f5 come from
89 // files such as limits.h, hw.h, hw_ieee.h, and/or hw_vax.h. limits.h
90 // is a file that comes with the compiler, but the rest are part of 3f5.
91 //
92 #define CONSTEXP_THRESHOLD 34.0
93 #define CONSTMAX_EXP 5.834617425e14
94 #define CONSTMIN_EXP 1.713908431e-15
95 
96 #define CONSTDELTA_1 0.02
97 #define CONSTDELTA_2 0.02
98 #define CONSTDELTA_3 0.02
99 #define CONSTDELTA_4 0.02
100 
101 // end of the BSIM3 constants.
102 
103 // This value, 100.0 was arbitrarily chosen, mainly to
104 // avoid ieee errors when running Xyce without spice-style
105 // voltage limiters.
106 #define CONSTMAX_EXP_ARG 100.0
107 
108 // tanh threshold constant (value for which tanh(x) - 1.0 == 0.0) - this seems
109 // to vary from machine to machine but the largest I found was 22.0 on g++2.96
110 // with -O2 (it was less with no optimization). I've chose 20.0 as a
111 // comprimise. SAH, 14 April 2003
112 
113 #define CONSTTANH_THRESH 20.0
114 
115 #endif
116