21 SingleSpeciesTP::SingleSpeciesTP() :
124 cvbar -= alpha * alpha * V * T / beta;
236 for (
int n = 0; n < 50; n++) {
239 if (fabs(dt) < tol) {
255 for (
int n = 0; n < 50; n++) {
258 if (fabs(dt) < tol) {
263 "no convergence. dt = " +
fp2str(dt)+
"\n"
272 for (
int n = 0; n < 50; n++) {
275 if (fabs(dt) < tol) {
291 for (
int n = 0; n < 50; n++) {
294 if (fabs(dt) < tol) {
308 "stoichiometric substances may only contain one species.");
doublereal molecularWeight(size_t k) const
Molecular weight of species k.
virtual doublereal density() const
Density (kg/m^3).
doublereal cv_mole() const
Molar heat capacity at constant volume. Units: J/kmol/K.
const doublereal OneAtm
One atmosphere [Pa].
ThermoPhase * duplMyselfAsThermoPhase() const
Duplication function.
An error indicating that an unimplemented function has been called.
virtual void getEnthalpy_RT(doublereal *hrt) const
Get the nondimensional Enthalpy functions for the species at their standard states at the current T a...
virtual void setState_HP(doublereal h, doublereal p, doublereal tol=1.e-8)
Set the internally stored specific enthalpy (J/kg) and pressure (Pa) of the phase.
virtual void initThermo()
Initialize the ThermoPhase object after all species have been set up.
ThermoPhase & operator=(const ThermoPhase &right)
Assignment operator.
virtual void getEnthalpy_RT_ref(doublereal *hrt) const
virtual void setState_UV(doublereal u, doublereal v, doublereal tol=1.e-8)
Set the specific internal energy (J/kg) and specific volume (m^3/kg).
T clip(const T &value, const T &lower, const T &upper)
Clip value such that lower <= value <= upper.
virtual void getEntropy_R_ref(doublereal *er) const
virtual void getStandardChemPotentials(doublereal *mu) const
Get the array of chemical potentials at unit activity for the species at their standard states at the...
This file contains definitions for utility functions and text for modules, inputfiles, logs, textlogs, (see Input File Handling, Diagnostic Output, and Writing messages to the screen).
void getPartialMolarCp(doublereal *cpbar) const
Get the species partial molar Heat Capacities. Units: J/ kmol /K.
doublereal m_tlast
last value of the temperature processed by reference state
void _updateThermo() const
vector_fp m_s0_R
Dimensionless entropy at the (mtlast, m_p0)
virtual doublereal thermalExpansionCoeff() const
Return the volumetric thermal expansion coefficient. Units: 1/K.
doublereal intEnergy_mass() const
Specific internal energy.
Base class for a phase with thermodynamic properties.
void getChemPotentials_RT(doublereal *murt) const
Get the array of non-dimensional species chemical potentials These are partial molar Gibbs free energ...
void getPartialMolarEnthalpies(doublereal *hbar) const
Get the species partial molar enthalpies. Units: J/kmol.
virtual void getGibbs_RT_ref(doublereal *grt) const
virtual void getCp_R_ref(doublereal *cprt) const
void getPartialMolarEntropies(doublereal *sbar) const
Get the species partial molar entropy. Units: J/kmol K.
virtual void getIntEnergy_RT(doublereal *urt) const
Returns the vector of nondimensional Internal Energies of the standard state species at the current T...
doublereal entropy_mass() const
Specific entropy.
virtual int eosType() const
Returns the equation of state type flag.
doublereal enthalpy_mole() const
Molar enthalpy. Units: J/kmol.
void getChemPotentials(doublereal *mu) const
Get the array of chemical potentials.
std::string fp2str(const double x, const std::string &fmt)
Convert a double into a c++ string.
virtual void getCp_R(doublereal *cpr) const
Get the nondimensional Heat Capacities at constant pressure for the species standard states at the cu...
SingleSpeciesTP & operator=(const SingleSpeciesTP &right)
Assignment operator.
doublereal cp_mass() const
Specific heat at constant pressure.
void getElectrochemPotentials(doublereal *mu) const
Get the species electrochemical potentials. Units: J/kmol.
doublereal entropy_mole() const
Molar entropy. Units: J/kmol/K.
Base class for exceptions thrown by Cantera classes.
vector_fp m_h0_RT
Dimensionless enthalpy at the (mtlast, m_p0)
doublereal cv_mass() const
Specific heat at constant volume.
Header for the SingleSpeciesTP class, which is a filter class for ThermoPhase, that eases the constru...
virtual void setMoleFractions(const doublereal *const x)
Set the mole fractions to the specified values There is no restriction on the sum of the mole fractio...
vector_fp m_cp0_R
Dimensionless heat capacity at the (mtlast, m_p0)
virtual void getGibbs_ref(doublereal *g) const
virtual void initThermo()
void getStandardVolumes(doublereal *vbar) const
Get the molar volumes of each species in their standard states at the current T and P of the solution...
virtual void setState_TP(doublereal t, doublereal p)
Set the temperature (K) and pressure (Pa)
size_t nSpecies() const
Returns the number of species in the phase.
virtual void setState_SP(doublereal s, doublereal p, doublereal tol=1.e-8)
Set the specific entropy (J/kg/K) and pressure (Pa).
virtual doublereal isothermalCompressibility() const
Returns the isothermal compressibility. Units: 1/Pa.
virtual void getEntropy_R(doublereal *sr) const
Get the array of nondimensional Entropy functions for the standard state species at the current T and...
doublereal gibbs_mole() const
Molar Gibbs function. Units: J/kmol.
doublereal temperature() const
Temperature (K).
doublereal intEnergy_mole() const
Molar internal energy. Units: J/kmol.
virtual void setPressure(doublereal p)
Set the internally stored pressure (Pa) at constant temperature and composition.
virtual void setState_SV(doublereal s, doublereal v, doublereal tol=1.e-8)
Set the specific entropy (J/kg/K) and specific volume (m^3/kg).
virtual void setTemperature(const doublereal temp)
Set the internally stored temperature of the phase (K).
doublereal enthalpy_mass() const
Specific enthalpy.
const doublereal GasConstant
Universal Gas Constant. [J/kmol/K].
Contains declarations for string manipulation functions within Cantera.
#define DATA_PTR(vec)
Creates a pointer to the start of the raw data for a vector.
virtual void getPartialMolarIntEnergies(doublereal *ubar) const
Get the species partial molar internal energies. Units: J/kmol.
doublereal m_press
The current pressure of the solution (Pa)
doublereal cp_mole() const
Molar heat capacity at constant pressure. Units: J/kmol/K.
void getPartialMolarVolumes(doublereal *vbar) const
Get the species partial molar volumes. Units: m^3/kmol.
void getPureGibbs(doublereal *gpure) const
Get the dimensional Gibbs functions for the standard state of the species at the current T and P...
SingleSpeciesTP()
Base empty constructor.
virtual void update(doublereal T, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const =0
Compute the reference-state properties for all species.
SpeciesThermo * m_spthermo
Pointer to the calculation manager for species reference-state thermodynamic properties.
The SingleSpeciesTP class is a filter class for ThermoPhase.
virtual void getGibbs_RT(doublereal *grt) const
Get the nondimensional Gibbs functions for the species in their standard states at the current T and ...
virtual void setDensity(const doublereal density_)
Set the internally stored density (kg/m^3) of the phase Note the density of a phase is an independent...