Simbody  3.7
Constants.h
Go to the documentation of this file.
1 #ifndef SimTK_SimTKCOMMON_CONSTANTS_H_
2 #define SimTK_SimTKCOMMON_CONSTANTS_H_
3 
4 /* -------------------------------------------------------------------------- *
5  * Simbody(tm): SimTKcommon *
6  * -------------------------------------------------------------------------- *
7  * This is part of the SimTK biosimulation toolkit originating from *
8  * Simbios, the NIH National Center for Physics-Based Simulation of *
9  * Biological Structures at Stanford, funded under the NIH Roadmap for *
10  * Medical Research, grant U54 GM072970. See https://simtk.org/home/simbody. *
11  * *
12  * Portions copyright (c) 2006-12 Stanford University and the Authors. *
13  * Authors: Michael Sherman *
14  * Contributors: *
15  * *
16  * Licensed under the Apache License, Version 2.0 (the "License"); you may *
17  * not use this file except in compliance with the License. You may obtain a *
18  * copy of the License at http://www.apache.org/licenses/LICENSE-2.0. *
19  * *
20  * Unless required by applicable law or agreed to in writing, software *
21  * distributed under the License is distributed on an "AS IS" BASIS, *
22  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
23  * See the License for the specific language governing permissions and *
24  * limitations under the License. *
25  * -------------------------------------------------------------------------- */
26 
112  /**************************/
113  /* MATHEMATICAL CONSTANTS */
114  /**************************/
115 
139 #define SimTK_PI 3.141592653589793238462643383279502884197169399375105820974944592L
140 
145 #define SimTK_E 2.718281828459045235360287471352662497757247093699959574966967628L
146 
152 #define SimTK_LN2 6.931471805599453094172321214581765680755001343602552541206800095e-1L
153 
159 #define SimTK_LN10 2.302585092994045684017991454684364207601101488628772976033327901L
160 
165 #define SimTK_LOG2E 1.442695040888963407359924681001892137426645954152985934135449407L
166 
171 #define SimTK_LOG10E 4.342944819032518276511289189166050822943970058036665661144537832e-1L
172 
177 #define SimTK_SQRT2 1.414213562373095048801688724209698078569671875376948073176679738L
178 
184 #define SimTK_OOSQRT2 .7071067811865475244008443621048490392848359376884740365883398690L
185 
190 #define SimTK_CBRT2 1.259921049894873164767210607278228350570251464701507980081975112L
191 
196 #define SimTK_OOCBRT2 .7937005259840997373758528196361541301957466639499265049041428810L
197 
202 #define SimTK_SIXRT2 1.122462048309372981433533049679179516232411110613986753440409546L
203 
208 #define SimTK_OOSIXRT2 .8908987181403393047402262055905125079872126158781604033837569922L
209 
214 #define SimTK_SQRT3 1.732050807568877293527446341505872366942805253810380628055806979L
215 
220 #define SimTK_CBRT3 1.442249570307408382321638310780109588391869253499350577546416195L
221 
222  /*end of Mathematical Constants*/
224 
225  /**********************/
226  /* PHYSICAL CONSTANTS */
227  /**********************/
228 
263 #define SimTK_AVOGADROS_NUMBER 6.0221415e23L
264 
279 #define SimTK_MASS_OF_PROTON_IN_MD 1.00727646688L
280 
287 #define SimTK_MASS_OF_NEUTRON_IN_MD 1.00866491560L
288 
295 #define SimTK_MASS_OF_ELECTRON_IN_MD 5.4857990945e-4L
296 
303 #define SimTK_CHARGE_OF_PROTON_IN_SI 1.60217653e-19L
304 
311 #define SimTK_CHARGE_OF_PROTON_IN_MD 1.L
312 
321 #define SimTK_MOLAR_CHARGE_IN_SI 9.6485338e+4L
322 
329 #define SimTK_MOLAR_CHARGE_IN_MD SimTK_AVOGADROS_NUMBER
330 
337 #define SimTK_LIGHTSPEED_IN_SI 2.99792458e+8L
338 
345 #define SimTK_LIGHTSPEED_IN_MD 2.99792458e+5L
346 
356 #define SimTK_GRAVITATIONAL_CONSTANT_IN_SI 6.6742e-11L
357 
370 #define SimTK_GRAVITATIONAL_CONSTANT_IN_MD 1.10827e-34L
371 
381 #define SimTK_MAGNETIC_PERMEABILITY_IN_SI \
382  1.256637061435917295385057353311801153678867759750042328389977837e-6L
383 
394 #define SimTK_MAGNETIC_PERMEABILITY_IN_MD 1.94259179e-8L
395 
402 #define SimTK_ELECTRIC_PERMITTIVITY_IN_SI \
403  8.854187817620389850536563031710750260608370166599449808102417149e-12L /* approx of exact */
404 
412 #define SimTK_ELECTRIC_PERMITTIVITY_IN_MD 5.7276575e-4L
413 
420 #define SimTK_COULOMB_CONSTANT_IN_SI 8.9875517873681764e+9L
421 
433 #define SimTK_COULOMB_CONSTANT_IN_MD 1.38935456e+2L
434 
442 #define SimTK_COULOMB_CONSTANT_IN_KCAL_ANGSTROM 3.32063711e+2L
443 
449 #define SimTK_MOLAR_GAS_CONSTANT_SI 8.314472L
450 
458 #define SimTK_MOLAR_GAS_CONSTANT_MD 8.314472e-3L
459 
467 #define SimTK_MOLAR_GAS_CONSTANT_KCAL_ANGSTROM 1.9872065e-3L
468 
474 #define SimTK_BOLTZMANN_CONSTANT_SI 1.3806505e-23L
475 
480 #define SimTK_BOLTZMANN_CONSTANT_MD SimTK_MOLAR_GAS_CONSTANT_MD
481 
486 #define SimTK_BOLTZMANN_CONSTANT_KCAL_ANGSTROM SimTK_MOLAR_GAS_CONSTANT_KCAL_ANGSTROM
487  /*end of Physical Constants*/
489 
490  /***************************/
491  /* UNIT CONVERSION FACTORS */
492  /***************************/
493 
511 #define SimTK_RADIAN_TO_DEGREE 5.729577951308232087679815481410517033240547246656432154916024386e+1L
512 
519 #define SimTK_DEGREE_TO_RADIAN 1.745329251994329576923690768488612713442871888541725456097191440e-2L
520 
527 #define SimTK_NS_TO_S 1e-9L
528 
535 #define SimTK_S_TO_NS 1e9L
536 
543 #define SimTK_KCAL_TO_KJOULE 4.184L /* exact */
544 
551 #define SimTK_KJOULE_TO_KCAL 2.390057361376673040152963671128107074569789674952198852772466539e-1L
552 
559 #define SimTK_DALTON_TO_GRAM 1.66053886e-24L
560 
568 #define SimTK_E_TO_COULOMB SimTK_CHARGE_OF_PROTON_IN_SI
569 
577 #define SimTK_EV_TO_JOULE SimTK_CHARGE_OF_PROTON_IN_SI
578  /*end of Unit Conversion Factors*/
580 
581 #endif /* SimTK_SimTKCOMMON_CONSTANTS_H_ */