My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
constants.h
Go to the documentation of this file.
1 /*
2  * constants.h - global natural constant header file
3  *
4  * Copyright (C) 2004, 2005 Stefan Jahn <stefan@lkcc.org>
5  *
6  * This is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * This software is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this package; see the file COPYING. If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  *
21  * $Id: constants.h 1825 2011-03-11 20:42:14Z ela $
22  *
23  */
24 
29 #ifndef __CONSTANTS_H__
30 #define __CONSTANTS_H__
31 
32 #include "consts.h"
33 #include "precision.h"
34 
36 #define C0 299792458.0
37 
38 #define MU0 12.566370614e-7
39 
40 #define E0 8.854187817e-12
41 
42 #define Z0 376.73031346958504364963
43 
46 #define H 6.626069311e-34
47 
48 #define K -273.15
49 
50 #define T0 290
51 
53 #define kB 1.380650524e-23
54 
55 #define Q 1.6021765314e-19
56 
57 #define kBoverQ 0.86173433260414314916e-4
58 
59 #define QoverkB 1.16045045690360379713e+4
60 
62 #define ESiO2 3.9
63 
64 #define ESi 11.7
65 
66 #define EGe 15.8
67 
68 #define EGaAs 13.1
69 
70 #define NiSi 1.45e16
71 
72 #define NiGe 2.40e19
73 
74 #define NiGaAs 9.00e12
75 
76 #define EgSi 1.11
77 
80 #define EgSchottky 0.69
81 
82 #define EgGe 0.67
83 
84 #define EgGaAs 1.43
85 
86 #define Eg0Si 1.16
87 
91 #define GMin NR_TINY
92 
98 #define sqr(x) ((x) * (x))
99 
104 #define cubic(x) ((x) * (x) * (x))
105 
113 #define quadr(x) (exp (4 * log (fabs (x))))
114 
117 #define coth(x) (1.0 / tanh (x))
118 
121 #define sech(x) (1.0 / cosh (x))
122 
125 #define cosech(x) (1.0 / sinh (x))
126 
130 #define kelvin(x) ((x) - K)
131 
135 #define degree(x) (K + (x))
136 
140 #define rad(x) (M_PI * (x) / 180.0)
141 
145 #define deg(x) (180.0 * (x) / M_PI)
146 
147 #ifndef MAX
148 
149 # define MAX(x,y) (((x) > (y)) ? (x) : (y))
150 #endif
151 
152 #ifndef MIN
153 
154 # define MIN(x,y) (((x) < (y)) ? (x) : (y))
155 #endif
156 
157 #endif /* __CONSTANTS_H__ */