Cantera  3.1.0a1
Hydrogen.h
Go to the documentation of this file.
1 //! @file Hydrogen.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_HYDROGEN_H
7 #define TPX_HYDROGEN_H
8 
9 #include "cantera/tpx/Sub.h"
10 
11 namespace tpx
12 {
13 
14 //! Pure species representation of hydrogen. Values and functions are
15 //! from Reynolds @cite reynolds1979.
16 class hydrogen : public Substance
17 {
18 public:
19  hydrogen() {
20  m_name = "hydrogen";
21  m_formula = "H2";
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  double Pp() override;
32  double up() override;
33  double sp() override;
34 
35  //! Saturation pressure. Equation s3 in Reynolds TPSI.
36  double Psat() override;
37 
38 protected:
39  //! Liquid density. Equation D4 in Reynolds TPSI.
40  double ldens() override;
41 
42 private:
43  double C(int i, double rt, double rt2);
44  double Cprime(int i, double rt, double rt2, double rt3);
45  double I(int i, double egrho);
46  double H(int i, double egrho);
47  double W(int i, double egrho);
48  double icv(int i, double x, double xlg);
49 };
50 
51 }
52 
53 #endif // ! HYDROGEN_H
Base class from which all pure substances are derived.
Definition: Sub.h:37
double x()
Vapor mass fraction.
Definition: Sub.cpp:262
Pure species representation of hydrogen.
Definition: Hydrogen.h:17
double Tmax() override
Maximum temperature for which the equation of state is valid.
Definition: Hydrogen.cpp:264
double up() override
Internal energy of a single-phase state.
Definition: Hydrogen.cpp:151
double ldens() override
Liquid density. Equation D4 in Reynolds TPSI.
Definition: Hydrogen.cpp:220
double Tmin() override
Minimum temperature for which the equation of state is valid.
Definition: Hydrogen.cpp:260
double Tcrit() override
Critical temperature [K].
Definition: Hydrogen.cpp:248
double sp() override
Entropy of a single-phase state.
Definition: Hydrogen.cpp:179
double MolWt() override
Molecular weight [kg/kmol].
Definition: Hydrogen.cpp:268
double Vcrit() override
Critical specific volume [m^3/kg].
Definition: Hydrogen.cpp:256
double Pcrit() override
Critical pressure [Pa].
Definition: Hydrogen.cpp:252
double Psat() override
Saturation pressure. Equation s3 in Reynolds TPSI.
Definition: Hydrogen.cpp:235