23 VCS_SPECIES_THERMO::VCS_SPECIES_THERMO(
size_t indexPhase,
24 size_t indexSpeciesPhase) :
26 IndexPhase(indexPhase),
27 IndexSpeciesPhase(indexSpeciesPhase),
29 SS0_Model(VCS_SS0_CONSTANT),
38 SSStar_Model(VCS_SSSTAR_CONSTANT),
40 Activity_Coeff_Model(VCS_AC_CONSTANT),
41 Activity_Coeff_Params(0),
45 UseCanteraCalls(false),
46 m_VCS_UnitsFormat(VCS_UNITS_UNITLESS)
51 VCS_SPECIES_THERMO::~VCS_SPECIES_THERMO()
55 VCS_SPECIES_THERMO::VCS_SPECIES_THERMO(
const VCS_SPECIES_THERMO& b) :
56 IndexPhase(b.IndexPhase),
57 IndexSpeciesPhase(b.IndexSpeciesPhase),
58 OwningPhase(b.OwningPhase),
59 SS0_Model(b.SS0_Model),
60 SS0_feSave(b.SS0_feSave),
61 SS0_TSave(b.SS0_TSave),
68 SSStar_Model(b.SSStar_Model),
70 Activity_Coeff_Model(b.Activity_Coeff_Model),
71 Activity_Coeff_Params(0),
72 SSStar_Vol_Model(b.SSStar_Vol_Model),
74 SSStar_Vol0(b.SSStar_Vol0),
75 UseCanteraCalls(b.UseCanteraCalls),
76 m_VCS_UnitsFormat(b.m_VCS_UnitsFormat)
82 VCS_SPECIES_THERMO::operator=(
const VCS_SPECIES_THERMO& b)
113 m_VCS_UnitsFormat = b.m_VCS_UnitsFormat;
126 char yo[] =
"VCS_SPECIES_THERMO::GStar_R_calc ";
131 if (m_VCS_UnitsFormat != VCS_UNITS_MKS) {
133 "Possible inconsistency");
143 case VCS_SSSTAR_CONSTANT:
145 case VCS_SSSTAR_IDEAL_GAS:
146 fe += T * log(pres/ pref);
149 plogf(
"%sERROR: unknown SSStar model\n", yo);
159 char yo[] =
"VCS_SPECIES_THERMO::VStar_calc ";
164 if (m_VCS_UnitsFormat != VCS_UNITS_MKS) {
166 "Possible inconsistency");
173 case VCS_SSVOL_CONSTANT:
180 plogf(
"%sERROR: unknown SSVol model\n", yo);
190 char yo[] =
"VS_SPECIES_THERMO::G0_R_calc ";
200 if (m_VCS_UnitsFormat != VCS_UNITS_MKS) {
202 "Possible inconsistency");
211 case VCS_SS0_CONSTANT:
214 case VCS_SS0_CONSTANT_CP:
217 fe = H - TKelvin * S;
221 plogf(
"%sERROR: unknown model\n", yo);
234 char yo[] =
"VCS_SPECIES_THERMO::eval_ac ";
248 case VCS_AC_CONSTANT:
253 plogf(
"%sERROR: unknown model\n", yo);
double SS0_Pref
Value of the pressure for the reference state.
double vcsUtil_gasConstant(int mu_units)
Returns the value of the gas constant in the units specified by parameter.
double SSStar_Vol0
parameter that is used in the VCS_SSVOL_CONSTANT model.
int SS0_Model
Integer representing the models for the species standard state Naught temperature dependence...
double SS0_S0
Base entropy used in the VCS_SS0_CONSTANT_CP model.
virtual double eval_ac(size_t kspec)
This function evaluates the activity coefficient for species, kspec.
int SSStar_Vol_Model
Models for the standard state volume of each species.
bool UseCanteraCalls
If true, this object will call Cantera to do its member calculations.
size_t IndexSpeciesPhase
Index of this species in the current phase.
int SSStar_Model
Integer value representing the star state model.
double VolStar_calc_one(size_t kspec) const
Molar volume calculation for standard state of one species.
int Activity_Coeff_Model
Integer value representing the activity coefficient model These are defined in vcs_VolPhase.h and start with VCS_AC_...
#define VCS_SSVOL_IDEALGAS
Models for the standard state volume of each species.
vcs_VolPhase * OwningPhase
Pointer to the owning phase object.
double GStar_calc_one(size_t kspec) const
Gibbs free energy calculation for standard state of one species.
void * SSStar_Params
Pointer to a list of parameters that is malloced for complicated reference star state calculation...
Header file for the internal object that holds the vcs equilibrium problem (see Class VCS_SOLVE and E...
Header for the object representing each phase within vcs.
Defines and definitions within the vcs package.
Internal declarations for the VCSnonideal package.
double SS0_Cp0
Base heat capacity used in the VCS_SS0_CONSTANT_CP model.
virtual double G0_R_calc(size_t kspec, double TKelvin)
This function calculates the standard state Gibbs free energy for species, kspec, at the temperature ...
double G0_calc_one(size_t kspec) const
Gibbs free energy calculation at a temperature for the reference state of a species, return a value for one species.
void * SSStar_Vol_Params
Pointer to a list of parameters that is malloced for volume models.
double AC_calc_one(size_t kspec) const
Evaluate activity coefficients and return the kspec coefficient.
double SS0_T0
Base temperature used in the VCS_SS0_CONSTANT_CP model.
Base class for exceptions thrown by Cantera classes.
void setState_T(const double temperature_Kelvin)
Sets the temperature in this object and underlying ThermoPhase objects.
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 SS0_TSave
Internal storage of the last temperature used in the calculation of the reference naught Gibbs free e...
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 ...
void * Activity_Coeff_Params
Pointer to a list of parameters that is malloced for activity coefficient models. ...
double SS0_feSave
Internal storage of the last calculation of the reference naught Gibbs free energy at SS0_TSave...
const doublereal GasConstant
Universal Gas Constant. [J/kmol/K].
#define plogf
define this Cantera function to replace printf
virtual VCS_SPECIES_THERMO * duplMyselfAsVCS_SPECIES_THERMO()
Duplication function for derived classes.
void setState_TP(const double temperature_Kelvin, const double pressure_PA)
Sets the temperature and pressure in this object and underlying ThermoPhase objects.
size_t IndexPhase
Index of the phase that this species belongs to.
double SS0_H0
Base enthalpy used in the VCS_SS0_CONSTANT_CP model.
Definitions for the classes that are thrown when Cantera experiences an error condition (also contain...