MPI-AMRVAC  3.1
The MPI - Adaptive Mesh Refinement - Versatile Advection Code (development version)
mod_constants.t
Go to the documentation of this file.
1 !> Module for physical and numeric constants
3 
4  implicit none
5  public
6 
7  ! A very small real number (but above machine precision)
8  double precision, parameter :: smalldouble = 1.d-12
9 
10  !> A very large real number
11  double precision, parameter :: bigdouble = 1.d+99
12 
13  !> A very large integer
14  integer, parameter :: biginteger = 10000000
15 
16  !> some frequently used numbers
17  double precision, parameter :: zero = 0.0d0
18  double precision, parameter :: one = 1.0d0
19  double precision, parameter :: two = 2.0d0
20  double precision, parameter :: half = 0.5d0
21  double precision, parameter :: quarter = 0.25d0
22  double precision, parameter :: third = 1.d0/3.0d0
23 
24  !> Pi
25  double precision, parameter :: dpi=3.141592653589793238462643383279502884197169399375105d0
26 
27  !> Proton mass in cgs
28  double precision, parameter :: mp_cgs = 1.672621777d-24 ! g
29 
30  !> Hydrogen mass in cgs
31  double precision, parameter :: mh_cgs = 1.6733d-24 ! g
32 
33  !> Boltzmann constant in cgs
34  double precision, parameter :: kb_cgs = 1.3806488d-16 ! erg K^-1
35 
36  !> Proton mass in SI
37  double precision, parameter :: mp_si = 1.672621777d-27 ! kg
38 
39  !> Boltzmann constant in SI
40  double precision, parameter :: kb_si = 1.3806488d-23 ! J K^-1
41 
42  !> Permeability in SI
43  double precision, parameter :: miu0_si = 1.2566370614d-6 ! H m^-1
44 
45  !> Speed of light in SI
46  double precision, parameter :: c_si = 2.99792458d8 ! m s^-1
47 
48  double precision, PARAMETER :: const_c = 2.99792458d10 ! cm s^-1 ; Speed of light
49  double precision, PARAMETER :: const_me = 9.1093897d-28 ! g ; Electron mass
50  double precision, PARAMETER :: const_mp = 1.672621777d-24 ! g ; Proton mass
51  double precision, PARAMETER :: const_e = 4.8032068d-10 ! g^1/2 cm^3/2 s^-1 ; Electron charge
52  double precision, PARAMETER :: const_lsun = 3.828d33 ! erg s^-1 ; Solar luminosity
53  double precision, PARAMETER :: const_msun = 1.98892d33 ! g ; Solar mass
54  double precision, PARAMETER :: const_rsun = 6.9570d10 ! cm ; Solar radius
55  double precision, PARAMETER :: const_kb = 1.3806488d-16 ! erg K^-1 ; Boltzmann constant
56  double precision, PARAMETER :: const_h = 6.6260755d-27 ! erg s ; Planck constant
57  double precision, parameter :: const_pc = 3.08567758128d18! cm ; 1 parsec
58 
59  double precision, PARAMETER :: const_sigma = 5.670367d-5 ! erg cm^-2 K^-4 s^-1 ; Stefan-Boltzman constant
60  double precision, PARAMETER :: const_g = 6.67191d-8 ! cm^3 g^-1 s^-2 ; Cavendish gravitational constant
61  double precision, PARAMETER :: const_rad_a = 7.5657e-15 ! erg cm^-3 K^-4 ; radiation density constant
62  double precision, PARAMETER :: const_kappae = 0.34d0 ! cm^2 g^-1 ; free-electron scattering opacity
63 
64  ! Conversion factors:
65  double precision, PARAMETER :: const_ev = 1.6021772d-12 ! erg/eV ; Electron volt
66  double precision, PARAMETER :: const_tera = 1.d12 ! - ; Tera
67  double precision, PARAMETER :: const_peta = 1.d15 ! - ; Peta
68  double precision, PARAMETER :: const_years = 3.1536d7 ! s year^-1 ; seconds in a year
69 
70 end module mod_constants
Module for physical and numeric constants.
Definition: mod_constants.t:2
double precision, parameter const_lsun
Definition: mod_constants.t:52
double precision, parameter const_ev
Definition: mod_constants.t:65
double precision, parameter const_pc
Definition: mod_constants.t:57
double precision, parameter const_rsun
Definition: mod_constants.t:54
double precision, parameter quarter
Definition: mod_constants.t:21
double precision, parameter third
Definition: mod_constants.t:22
double precision, parameter const_me
Definition: mod_constants.t:49
double precision, parameter kb_cgs
Boltzmann constant in cgs.
Definition: mod_constants.t:34
double precision, parameter half
Definition: mod_constants.t:20
double precision, parameter const_years
Definition: mod_constants.t:68
double precision, parameter const_e
Definition: mod_constants.t:51
double precision, parameter one
Definition: mod_constants.t:18
double precision, parameter const_mp
Definition: mod_constants.t:50
double precision, parameter const_h
Definition: mod_constants.t:56
double precision, parameter const_msun
Definition: mod_constants.t:53
double precision, parameter mh_cgs
Hydrogen mass in cgs.
Definition: mod_constants.t:31
double precision, parameter dpi
Pi.
Definition: mod_constants.t:25
double precision, parameter const_g
Definition: mod_constants.t:60
double precision, parameter const_tera
Definition: mod_constants.t:66
double precision, parameter bigdouble
A very large real number.
Definition: mod_constants.t:11
double precision, parameter zero
some frequently used numbers
Definition: mod_constants.t:17
double precision, parameter miu0_si
Permeability in SI.
Definition: mod_constants.t:43
double precision, parameter kb_si
Boltzmann constant in SI.
Definition: mod_constants.t:40
double precision, parameter const_peta
Definition: mod_constants.t:67
double precision, parameter two
Definition: mod_constants.t:19
double precision, parameter smalldouble
Definition: mod_constants.t:8
double precision, parameter const_kappae
Definition: mod_constants.t:62
double precision, parameter mp_cgs
Proton mass in cgs.
Definition: mod_constants.t:28
double precision, parameter const_c
Definition: mod_constants.t:48
double precision, parameter c_si
Speed of light in SI.
Definition: mod_constants.t:46
double precision, parameter const_kb
Definition: mod_constants.t:55
integer, parameter biginteger
A very large integer.
Definition: mod_constants.t:14
double precision, parameter mp_si
Proton mass in SI.
Definition: mod_constants.t:37
double precision, parameter const_rad_a
Definition: mod_constants.t:61
double precision, parameter const_sigma
Definition: mod_constants.t:59