Cantera  3.1.0a1
CarbonDioxide.h
Go to the documentation of this file.
1 //! @file CarbonDioxide.h
2 
3 // This file is part of Cantera. See License.txt in the top-level directory or
4 // at https://cantera.org/license.txt for license and copyright information.
5 
6 #ifndef TPX_CARBONDIOXIDE_H
7 #define TPX_CARBONDIOXIDE_H
8 
9 #include "cantera/tpx/Sub.h"
10 
11 namespace tpx
12 {
13 
14 //! Pure species representation of carbon dioxide. Values and functions are
15 //! from Reynolds @cite reynolds1979.
16 class CarbonDioxide : public Substance
17 {
18 public:
19  CarbonDioxide() {
20  m_name="carbon-dioxide";
21  m_formula="CO2";
22  }
23 
24  double MolWt() override;
25  double Tcrit() override;
26  double Pcrit() override;
27  double Vcrit() override;
28  double Tmin() override;
29  double Tmax() override;
30 
31  //! Pressure. Equation P-3 in Reynolds. P(rho, T).
32  double Pp() override;
33 
34  /**
35  * internal energy. See Reynolds eqn (15) section 2
36  *
37  * u = (the integral from T to To of co(T)dT) +
38  * sum from i to N ([C(i) - T*Cprime(i)] + uo
39  */
40  double up() override;
41 
42  //! entropy. See Reynolds eqn (16) section 2
43  double sp() override;
44 
45  //! Pressure at Saturation. Equation S-2 in Reynolds.
46  double Psat() override;
47 
48 private:
49  //! Liquid density. Equation D2 in Reynolds.
50  double ldens() override;
51 
52  /**
53  * C returns a multiplier in each term of the sum in P-3, used in
54  * conjunction with C in the function Pp
55  * - j is used to represent which of the values in the summation to calculate
56  * - j=0 is the second additive in the formula in reynolds
57  * - j=1 is the third...
58  * (this part does not include the multiplier rho^n)
59  */
60  double C(int jm, double, double, double, double);
61 
62  //! Derivative of C(i)
63  double Cprime(int i, double, double, double);
64 
65  /**
66  * I = integral from o-rho { 1/(rho^2) * H(i, rho) d rho }
67  * ( see section 2 of Reynolds TPSI )
68  */
69  double I(int i, double, double);
70 
71  /**
72  * H returns a multiplier in each term of the sum in P-3. This is used in
73  * conjunction with C in the function Pp this represents the product
74  * rho^n
75  * - i=0 is the second additive in the formula in reynolds
76  * - i=1 is the third ...
77  */
78  double H(int i, double egrho);
79 };
80 
81 }
82 
83 #endif // ! TPX_CARBONDIOXIDE_H
Pure species representation of carbon dioxide.
Definition: CarbonDioxide.h:17
double Tmax() override
Maximum temperature for which the equation of state is valid.
double up() override
internal energy.
double ldens() override
Liquid density. Equation D2 in Reynolds.
double I(int i, double, double)
I = integral from o-rho { 1/(rho^2) * H(i, rho) d rho } ( see section 2 of Reynolds TPSI )
double Tmin() override
Minimum temperature for which the equation of state is valid.
double Tcrit() override
Critical temperature [K].
double sp() override
entropy. See Reynolds eqn (16) section 2
double Pp() override
Pressure. Equation P-3 in Reynolds. P(rho, T).
double MolWt() override
Molecular weight [kg/kmol].
double H(int i, double egrho)
H returns a multiplier in each term of the sum in P-3.
double C(int jm, double, double, double, double)
C returns a multiplier in each term of the sum in P-3, used in conjunction with C in the function Pp.
double Vcrit() override
Critical specific volume [m^3/kg].
double Pcrit() override
Critical pressure [Pa].
double Psat() override
Pressure at Saturation. Equation S-2 in Reynolds.
double Cprime(int i, double, double, double)
Derivative of C(i)
Base class from which all pure substances are derived.
Definition: Sub.h:37