CAMP 1.0.0
Chemistry Across Multiple Phases
constants.F90
Go to the documentation of this file.
1! Copyright (C) 2005-2021 Barcelona Supercomputing Center and University of
2! Illinois at Urbana-Champaign
3! SPDX-License-Identifier: MIT
4
5!> \file
6!> The camp_constants module.
7
8!> Physical constants.
10
11 !> Kind of a single precision real number.
12 integer, parameter :: sp = kind(0.0)
13 !> Kind of a single precision complex number.
14 integer, parameter :: sc = sp
15 !> Kind of a double precision real number.
16 integer, parameter :: dp = kind(0.d0)
17 !> Kind of a double precision complex number.
18 integer, parameter :: dc = dp
19
20 !> Kind of an integer
21 integer, parameter :: i_kind = kind(1)
22
23 !> Physical constants.
24 !!
25 !! These are all absolute constants. Environment parameters that in
26 !! principle could change should go in scenario.f90.
27 !!
28 !! To access a constant in a subroutine you should <tt>use
29 !! camp_constants</tt> and then the constant value is accessed with
30 !! \c const%%pi or similar. Note that the type is called \c const_t
31 !! (with a trailing _t) but the single saved variable to access them
32 !! is just called \c const.
34 !> Pi.
35 real(kind=dp) :: pi = 3.14159265358979323846d0
36 !> Boltzmann constant (J K^{-1}).
37 real(kind=dp) :: boltzmann = 1.3806505d-23
38 !> Avogadro's number (mole^{-1}).
39 real(kind=dp) :: avagadro = 6.02214179d23
40 !> Universal gas constant (J mole^{-1} K^{-1}).
41 real(kind=dp) :: univ_gas_const = 8.314472d0
42 !> Acceleration due to gravity (m s^{-2}).
43 real(kind=dp) :: std_grav = 9.80665d0
44 !> Accomodation coefficient (have also used 0.045).
45 real(kind=dp) :: accom_coeff = 1d0
46
47 !> Equilibrium water vapor pressure at 273 K (Pa).
48 real(kind=dp) :: water_eq_vap_press = 611d0
49 !> Freezing point of water (K).
50 real(kind=dp) :: water_freeze_temp = 273.15d0
51 !> Surface energy of water (J m^{-2}).
52 real(kind=dp) :: water_surf_eng = 0.073d0
53 !> Latent heat of water (J kg^{-1}).
54 real(kind=dp) :: water_latent_heat = 2.272d6
55 !> Specific heat of air (J kg^{-1} K^{-1}).
56 real(kind=dp) :: air_spec_heat = 1005d0
57 !> Molecular weight of water (kg mole^{-1}).
58 real(kind=dp) :: water_molec_weight = 18d-3
59 !> Density of water (kg m^{-3}).
60 real(kind=dp) :: water_density = 1d3
61
62 !> Molecular weight of air (kg mole^{-1}).
63 real(kind=dp) :: air_molec_weight = 2.89644d-2
64 !> Atmospheric standard sea level pressure (Pa).
65 real(kind=dp) :: air_std_press = 101325d0
66 !> Dynamic viscosity of air (kg m^{-1} s^{-1}).
67 real(kind=dp) :: air_dyn_visc = 1.78d-5
68 end type const_t
69
70 !> Fixed variable for accessing the constant's values.
71 !!
72 !! To access a constant in a subroutine you should <tt>use
73 !! camp_constants</tt> and then the constant value is accessed with
74 !! \c const%%pi or similar. Note that the type is called \c const_t
75 !! (with a trailing _t) but the single saved variable to access them
76 !! is just called \c const.
77 type(const_t), save :: const
78
79end module camp_constants
Physical constants.
Definition constants.F90:9
integer, parameter dp
Kind of a double precision real number.
Definition constants.F90:16
integer, parameter sc
Kind of a single precision complex number.
Definition constants.F90:14
integer, parameter dc
Kind of a double precision complex number.
Definition constants.F90:18
type(const_t), save const
Fixed variable for accessing the constant's values.
Definition constants.F90:77
integer, parameter sp
Kind of a single precision real number.
Definition constants.F90:12
integer, parameter i_kind
Kind of an integer.
Definition constants.F90:21
Physical constants.
Definition constants.F90:33