Cantera  2.3.0
vcs_species_thermo.h
Go to the documentation of this file.
1 //! @file vcs_species_thermo.h
2 
3 // This file is part of Cantera. See License.txt in the top-level directory or
4 // at http://www.cantera.org/license.txt for license and copyright information.
5 
6 #ifndef VCS_SPECIES_THERMO_H
7 #define VCS_SPECIES_THERMO_H
8 
9 #include <cstdlib>
10 
11 namespace Cantera
12 {
13 
14 class vcs_VolPhase;
15 
16 // Models for the species standard state Naught temperature dependence
17 #define VCS_SS0_NOTHANDLED -1
18 #define VCS_SS0_CONSTANT 0
19 //#define VCS_SS0_NASA_POLY 1
20 #define VCS_SS0_CONSTANT_CP 2
21 
22 // Models for the species standard state extra pressure dependence
23 #define VCS_SSSTAR_NOTHANDLED -1
24 #define VCS_SSSTAR_CONSTANT 0
25 #define VCS_SSSTAR_IDEAL_GAS 1
26 
27 /*!
28  * Identifies the thermo model for the species. This structure is shared by
29  * volumetric and surface species. However, each will have its own types of
30  * thermodynamic models. These quantities all have appropriate units.
31  */
33 {
34  /*
35  * All objects are public for ease of development
36  */
37 public:
38  //! Index of the phase that this species belongs to.
39  size_t IndexPhase;
40 
41  //! Index of this species in the current phase.
43 
44  //! Pointer to the owning phase object.
46 
47  //! Integer representing the models for the species standard state Naught
48  //! temperature dependence. They are listed above and start with VCS_SS0_...
49  int SS0_Model;
50 
51  //! Internal storage of the last calculation of the reference naught Gibbs
52  //! free energy at SS0_TSave. (always in units of Kelvin)
53  double SS0_feSave;
54 
55  //! Internal storage of the last temperature used in the calculation of the
56  //! reference naught Gibbs free energy. units = kelvin
57  double SS0_TSave;
58 
59  //! Base temperature used in the VCS_SS0_CONSTANT_CP model
60  double SS0_T0;
61 
62  //! Base enthalpy used in the VCS_SS0_CONSTANT_CP model
63  double SS0_H0;
64 
65  //! Base entropy used in the VCS_SS0_CONSTANT_CP model
66  double SS0_S0;
67 
68  //! Base heat capacity used in the VCS_SS0_CONSTANT_CP model
69  double SS0_Cp0;
70 
71  //! Value of the pressure for the reference state.
72  //! defaults to 1.01325E5 = 1 atm
73  double SS0_Pref;
74 
75  //! Integer value representing the star state model.
77 
78  //! Models for the standard state volume of each species
80 
81  //! parameter that is used in the VCS_SSVOL_CONSTANT model.
82  double SSStar_Vol0;
83 
84  VCS_SPECIES_THERMO(size_t indexPhase, size_t indexSpeciesPhase);
85  virtual ~VCS_SPECIES_THERMO() {}
86 
87  //! Duplication function for derived classes.
89 
90  /**
91  * This function calculates the standard state Gibbs free energy
92  * for species, kspec, at the temperature TKelvin and pressure, Pres.
93  *
94  * @param kspec species global index
95  * @param TKelvin Temperature in Kelvin
96  * @param pres pressure in Pa
97  * @return standard state free energy in units of Kelvin.
98  * @deprecated Unused. To be removed after Cantera 2.3.
99  */
100  virtual double GStar_R_calc(size_t kspec, double TKelvin, double pres);
101 
102  /**
103  * This function calculates the standard state Gibbs free energy for
104  * species, kspec, at the temperature TKelvin
105  *
106  * @param kglob species global index.
107  * @param TKelvin Temperature in Kelvin
108  * @return standard state free energy in Kelvin.
109  * @deprecated Unused. To be removed after Cantera 2.3.
110  */
111  virtual double G0_R_calc(size_t kglob, double TKelvin);
112 
113  /**
114  * This function calculates the standard state molar volume for species,
115  * kspec, at the temperature TKelvin and pressure, Pres,
116  *
117  * @return standard state volume in m**3 / kmol
118  * @deprecated Unused. To be removed after Cantera 2.3.
119  */
120  virtual double VolStar_calc(size_t kglob, double TKelvin, double Pres);
121 
122  /**
123  * This function evaluates the activity coefficient for species, kspec
124  *
125  * Note, T, P and mole fractions are obtained from the single private
126  * instance of VCS_SOLVE
127  *
128  * @param kspec index of the species in the global species list within
129  * VCS_SOLVE. Phase and local species id can be looked up within object.
130  * @return activity coefficient for species kspec
131  * @deprecated Unused. To be removed after Cantera 2.3.
132  */
133  virtual double eval_ac(size_t kspec);
134 };
135 
136 }
137 
138 #endif
vcs_VolPhase * OwningPhase
Pointer to the owning phase object.
virtual double GStar_R_calc(size_t kspec, double TKelvin, double pres)
This function calculates the standard state Gibbs free energy for species, kspec, at the temperature ...
double SS0_Cp0
Base heat capacity used in the VCS_SS0_CONSTANT_CP model.
size_t IndexSpeciesPhase
Index of this species in the current phase.
virtual double VolStar_calc(size_t kglob, double TKelvin, double Pres)
This function calculates the standard state molar volume for species, kspec, at the temperature TKelv...
double SSStar_Vol0
parameter that is used in the VCS_SSVOL_CONSTANT model.
int SSStar_Vol_Model
Models for the standard state volume of each species.
double SS0_S0
Base entropy used in the VCS_SS0_CONSTANT_CP model.
size_t IndexPhase
Index of the phase that this species belongs to.
virtual double eval_ac(size_t kspec)
This function evaluates the activity coefficient for species, kspec.
virtual VCS_SPECIES_THERMO * duplMyselfAsVCS_SPECIES_THERMO()
Duplication function for derived classes.
double SS0_H0
Base enthalpy used in the VCS_SS0_CONSTANT_CP model.
virtual double G0_R_calc(size_t kglob, double TKelvin)
This function calculates the standard state Gibbs free energy for species, kspec, at the temperature ...
Phase information and Phase calculations for vcs.
Definition: vcs_VolPhase.h:81
double SS0_T0
Base temperature used in the VCS_SS0_CONSTANT_CP model.
int SSStar_Model
Integer value representing the star state model.
int SS0_Model
Integer representing the models for the species standard state Naught temperature dependence...
Namespace for the Cantera kernel.
Definition: application.cpp:29
double SS0_TSave
Internal storage of the last temperature used in the calculation of the reference naught Gibbs free e...
double SS0_feSave
Internal storage of the last calculation of the reference naught Gibbs free energy at SS0_TSave...
double SS0_Pref
Value of the pressure for the reference state.