IdealGasPhase.cpp Source File#
IdealGasPhase.cpp
Go to the documentation of this file.
27 return GasConstant * (mean_X(entropy_R_ref()) - sum_xlogx() - std::log(pressure() / refPressure()));
ThermoPhase object for the ideal gas equation of state - workhorse for Cantera (see Thermodynamic Pro...
Headers for the factory class that can create known ThermoPhase objects (see Thermodynamic Properties...
const vector< double > & entropy_R_ref() const
Returns a reference to the dimensionless reference state Entropy vector.
Definition IdealGasPhase.h:535
void getPartialMolarEnthalpies(double *hbar) const override
Returns an array of partial molar enthalpies for the species in the mixture.
Definition IdealGasPhase.cpp:78
void getChemPotentials(double *mu) const override
Get the species chemical potentials. Units: J/kmol.
Definition IdealGasPhase.cpp:69
double soundSpeed() const override
Return the speed of sound. Units: m/s.
Definition IdealGasPhase.cpp:40
vector< double > m_g0_RT
Temporary storage for dimensionless reference state Gibbs energies.
Definition IdealGasPhase.h:570
void getEntropy_R(double *sr) const override
Get the array of nondimensional Entropy functions for the standard state species at the current T and...
Definition IdealGasPhase.cpp:125
vector< double > m_h0_RT
Temporary storage for dimensionless reference state enthalpies.
Definition IdealGasPhase.h:564
void getGibbs_ref(double *g) const override
Returns the vector of the Gibbs function of the reference state at the current temperature of the sol...
Definition IdealGasPhase.cpp:188
vector< double > m_pp
Temporary array containing internally calculated partial pressures.
Definition IdealGasPhase.h:578
void getStandardChemPotentials(double *mu) const override
Get the array of chemical potentials at unit activity for the species at their standard states at the...
Definition IdealGasPhase.cpp:58
void getCp_R(double *cpr) const override
Get the nondimensional Heat Capacities at constant pressure for the species standard states at the cu...
Definition IdealGasPhase.cpp:160
void setPressure(double p) override
Set the pressure at constant temperature and composition.
Definition IdealGasPhase.h:352
const vector< double > & gibbs_RT_ref() const
Returns a reference to the dimensionless reference state Gibbs free energy vector.
Definition IdealGasPhase.h:525
void getStandardVolumes_ref(double *vol) const override
Get the molar volumes of the species reference states at the current T and P_ref of the solution.
Definition IdealGasPhase.cpp:214
void getPartialMolarVolumes(double *vbar) const override
Return an array of partial molar volumes for the species in the mixture.
Definition IdealGasPhase.cpp:109
double cv_mole() const override
Molar heat capacity at constant volume.
Definition IdealGasPhase.cpp:35
virtual void updateThermo() const
Update the species reference state thermodynamic functions.
Definition IdealGasPhase.cpp:267
void getPureGibbs(double *gpure) const override
Get the Gibbs functions for the standard state of the species at the current T and P of the solution.
Definition IdealGasPhase.cpp:145
void getIntEnergy_RT_ref(double *urt) const override
Returns the vector of nondimensional internal Energies of the reference state at the current temperat...
Definition IdealGasPhase.cpp:200
void getEnthalpy_RT(double *hrt) const override
Get the nondimensional Enthalpy functions for the species at their standard states at the current T a...
Definition IdealGasPhase.cpp:119
void getEntropy_R_ref(double *er) const override
Returns the vector of nondimensional entropies of the reference state at the current temperature of t...
Definition IdealGasPhase.cpp:194
vector< double > m_s0_R
Temporary storage for dimensionless reference state entropies.
Definition IdealGasPhase.h:573
void getGibbs_RT(double *grt) const override
Get the nondimensional Gibbs functions for the species in their standard states at the current T and ...
Definition IdealGasPhase.cpp:135
void getCp_R_ref(double *cprt) const override
Returns the vector of nondimensional constant pressure heat capacities of the reference state at the ...
Definition IdealGasPhase.cpp:208
void getStandardVolumes(double *vol) const override
Get the molar volumes of the species standard states at the current T and P of the solution.
Definition IdealGasPhase.cpp:166
void getPartialMolarIntEnergies(double *ubar) const override
Return an array of partial molar internal energies for the species in the mixture.
Definition IdealGasPhase.cpp:95
double cp_mole() const override
Molar heat capacity at constant pressure.
Definition IdealGasPhase.cpp:30
void getIntEnergy_RT(double *urt) const override
Returns the vector of nondimensional Internal Energies of the standard state species at the current T...
Definition IdealGasPhase.cpp:155
void getPartialMolarCp(double *cpbar) const override
Return an array of partial molar heat capacities for the species in the mixture.
Definition IdealGasPhase.cpp:103
double standardConcentration(size_t k=0) const override
Returns the standard concentration , which is used to normalize the generalized concentration.
Definition IdealGasPhase.cpp:46
vector< double > m_cp0_R
Temporary storage for dimensionless reference state heat capacities.
Definition IdealGasPhase.h:567
bool addSpecies(shared_ptr< Species > spec) override
Add a Species to this Phase.
Definition IdealGasPhase.cpp:222
void setToEquilState(const double *mu_RT) override
This method is used by the ChemEquil equilibrium solver.
Definition IdealGasPhase.cpp:239
void getGibbs_RT_ref(double *grt) const override
Returns the vector of nondimensional Gibbs Free Energies of the reference state at the current temper...
Definition IdealGasPhase.cpp:182
void getActivityCoefficients(double *ac) const override
Get the array of non-dimensional activity coefficients at the current solution temperature,...
Definition IdealGasPhase.cpp:51
IdealGasPhase(const string &inputFile="", const string &id="")
Construct and initialize an IdealGasPhase ThermoPhase object directly from an input file.
Definition IdealGasPhase.cpp:18
void getPartialMolarEntropies(double *sbar) const override
Returns an array of partial molar entropies of the species in the solution.
Definition IdealGasPhase.cpp:84
const vector< double > & cp_R_ref() const
Returns a reference to the dimensionless reference state Heat Capacity vector.
Definition IdealGasPhase.h:545
void getEnthalpy_RT_ref(double *hrt) const override
Returns the vector of nondimensional enthalpies of the reference state at the current temperature of ...
Definition IdealGasPhase.cpp:176
const vector< double > & enthalpy_RT_ref() const
Returns a reference to the dimensionless reference state enthalpy vector.
Definition IdealGasPhase.h:515
virtual void update(double T, double *cp_R, double *h_RT, double *s_R) const
Compute the reference-state properties for all species.
Definition MultiSpeciesThermo.cpp:94
virtual void setMoleFractions(const double *const x)
Set the mole fractions to the specified values.
Definition Phase.cpp:289
double moleFraction(size_t k) const
Return the mole fraction of a single species.
Definition Phase.cpp:439
double mean_X(const double *const Q) const
Evaluate the mole-fraction-weighted mean of an array Q.
Definition Phase.cpp:616
double RT() const
Return the Gas Constant multiplied by the current temperature.
Definition ThermoPhase.h:1062
void initThermoFile(const string &inputFile, const string &id)
Initialize a ThermoPhase object using an input file.
Definition ThermoPhase.cpp:995
MultiSpeciesThermo m_spthermo
Pointer to the calculation manager for species reference-state thermodynamic properties.
Definition ThermoPhase.h:1962
bool addSpecies(shared_ptr< Species > spec) override
Add a Species to this Phase.
Definition ThermoPhase.cpp:1054
CachedScalar getScalar(int id)
Get a reference to a CachedValue object representing a scalar (double) with the given id.
Definition ValueCache.h:161
void scale(InputIter begin, InputIter end, OutputIter out, S scale_factor)
Multiply elements of an array by a scale factor.
Definition utilities.h:104
A cached property value and the state at which it was evaluated.
Definition ValueCache.h:33
double state1
Value of the first state variable for the state at which value was evaluated, for example temperature...
Definition ValueCache.h:102
Various templated functions that carry out common vector and polynomial operations (see Templated Arr...
Generated by 1.9.7