netxsimdg
Loading...
Searching...
No Matches
constants.hpp
Go to the documentation of this file.
1
7#ifndef SRC_INCLUDE_CONSTANTS_HPP
8#define SRC_INCLUDE_CONSTANTS_HPP
9
12
18const double g = 9.8321849378;
19
21const double sigma = 5.670374419e-8;
22
24const double vonKarman = 0.4;
25
27const double omega = 7.2921158e-5;
28
30const double Tt = 273.16;
31
33const double tau = 6.28318530717958647652;
34}
35
37namespace Ice {
38
40const double cp = 2100.;
41
43const double epsilon = 0.996;
44
46const double kappa = 2.0334;
47
49const double Lf = 333.55e3;
50
56const double rho = 917;
57
63const double rhoSnow = 330.;
64
66const double s = 5;
67
69const double Tm = 273.15;
70}
71
73namespace Air {
74
76const double cp = 1004.64;
77
79const double Ra = 287.058;
80
82const double rho = 1.2754;
83}
84
86namespace Vapour {
87
89const double cp = 1860.;
90
92const double Lv0 = 2500.79e3;
93
95const double Ra = 461.5;
96}
97
99namespace Water {
100
102const double cp = 4186.84;
103
105const double Lf = Ice::Lf;
106
108const double Lv0 = Vapour::Lv0;
109
111const double mu = 0.055;
112
114const double rho = 1000;
115
117const double rhoOcean = 1025;
118
120const double Tf = Ice::Tm;
121
123const double TfOcean = -1.8;
124}
125
126namespace Nextsim {
128inline double kelvin(double celsius) { return celsius + Water::Tf; }
129
131inline double celsius(double kelvin) { return kelvin - Water::Tf; }
132
134inline double degrees(double radians) { return radians * 360 / PhysicalConstants::tau; }
135
137inline double radians(double degrees) { return degrees * PhysicalConstants::tau / 360; }
138
140inline double mbar(double pascals) { return pascals / 100; }
141
143inline double pascals(double mbar) { return mbar * 100; }
144}
145#endif /* SRC_INCLUDE_CONSTANTS_HPP */
double radians(double degrees)
Convert an angle from degrees to radians.
double pascals(double mbar)
Convert a pressure from mbar to Pa.
double celsius(double kelvin)
Convert a temperature from K to ˚C.
double kelvin(double celsius)
Convert a temperature from ˚C to K.
double degrees(double radians)
Convert an angle from radians to degrees.
double mbar(double pascals)
Convert a pressure from Pa to mbar.
Properties of dry air around 0˚C and 101.3 kPa.
Definition constants.hpp:73
const double cp
Specific heat capacity at constant pressure of dry air [J kg⁻¹ K⁻¹].
Definition constants.hpp:76
const double rho
Density of dry air at IUPAC STP [kg m⁻³].
Definition constants.hpp:82
const double Ra
Specific gas constant for dry air [J kg⁻¹ K⁻¹].
Definition constants.hpp:79
Properties of water ice around 0˚C and 101.3 kPa.
Definition constants.hpp:37
const double epsilon
Thermal emissivity of smooth ice [0..1].
Definition constants.hpp:43
const double rhoSnow
Definition constants.hpp:63
const double s
Salinity of sea ice. [g kg⁻¹].
Definition constants.hpp:66
const double Lf
Latent heat of fusion of ice/water [J kg⁻¹].
Definition constants.hpp:49
const double kappa
Heat conductivity of ice [W m⁻¹ K⁻¹].
Definition constants.hpp:46
const double rho
Definition constants.hpp:56
const double Tm
Melting point of pure ice [K].
Definition constants.hpp:69
const double cp
Specific heat capacity at constant pressure of water ice [J kg⁻¹ K⁻¹].
Definition constants.hpp:40
General physical constants of the Earth and universe.
Definition constants.hpp:11
const double tau
Ratio of circumference to radius.
Definition constants.hpp:33
const double sigma
Stefan-Boltzmann constant. [W m⁻² K⁻⁴].
Definition constants.hpp:21
const double Tt
Triple point temperature of pure water [K].
Definition constants.hpp:30
const double vonKarman
Von Karman constant. [1].
Definition constants.hpp:24
const double omega
Rotation rate of the Earth [rad s⁻¹].
Definition constants.hpp:27
const double g
Definition constants.hpp:18
Properties of water vapour.
Definition constants.hpp:86
const double cp
Specific heat capacity at constant pressure of water vapour [J kg⁻¹ K⁻¹].
Definition constants.hpp:89
const double Lv0
Latent heat of vaporization at 0˚C [J kg⁻¹].
Definition constants.hpp:92
const double Ra
Specific gas constant for water vapour [J kg⁻¹ K⁻¹].
Definition constants.hpp:95
Properties of liquid water.
Definition constants.hpp:99
const double TfOcean
Freezing point of typical ocean water. [˚C].
const double rho
Density of fresh water at 4˚C. [kg m⁻³].
const double mu
Proportionality constant between salinity in psu and freezing point depression [K psu⁻¹].
const double Lv0
Latent heat of vaporization at 0˚C [J kg⁻¹].
const double Tf
Freezing point of pure water. [K].
const double cp
Specific heat capacity at constant pressure of water [J kg⁻¹ K⁻¹].
const double rhoOcean
Typical density of ocean water. [kg m⁻³].
const double Lf
Latent heat of fusion of water/ice [J kg⁻¹].