Canoe
Comprehensive Atmosphere N' Ocean Engine
methane_vapors.hpp
Go to the documentation of this file.
1 #ifndef SRC_SNAP_THERMODYNAMICS_VAPORS_METHANE_VAPORS_HPP_
2 #define SRC_SNAP_THERMODYNAMICS_VAPORS_METHANE_VAPORS_HPP_
3 
4 // C/C++
5 #include <cmath>
6 
7 inline double svpch4(double t, double p, double beta, double gamma) {
8  return p * exp((1. - 1. / t) * beta - gamma * log(t));
9 }
10 
11 inline double sat_vapor_p_CH4_Ideal(double T) {
12  double betal = 10.15, gammal = 2.1;
13  double betas = 10.41, gammas = 0.9;
14  double tr = 90.67, pr = 11690.;
15 
16  return T > tr ? svpch4(T / tr, pr, betal, gammal)
17  : svpch4(T / tr, pr, betas, gammas);
18 }
19 
20 // best fit in [90.99, 189.99] K
21 inline double sat_vapor_p_CH4_Antoine(double T) {
22  double A = 3.9895;
23  double B = 443.028;
24  double C = -0.49;
25  double result = pow(10, A - B / (T + C));
26  return 1.E5 * result;
27 }
28 
29 #endif // SRC_SNAP_THERMODYNAMICS_VAPORS_METHANE_VAPORS_HPP_
#define A(i, j)
Definition: band_back_sub.c:18
double sat_vapor_p_CH4_Ideal(double T)
double sat_vapor_p_CH4_Antoine(double T)
double svpch4(double t, double p, double beta, double gamma)