19 SingleSpeciesTP::SingleSpeciesTP() :
84 cvbar -= alpha * alpha * V * T / beta;
183 for (
int n = 0; n < 50; n++) {
190 throw CanteraError(
"setState_HP",
"no convergence. dt = {}", dt);
202 for (
int n = 0; n < 50; n++) {
209 throw CanteraError(
"setState_UV",
"no convergence. dt = {}\n" 210 "u = {} v = {}\n", dt, u, v);
218 for (
int n = 0; n < 50; n++) {
225 throw CanteraError(
"setState_SP",
"no convergence. dt = {}", dt);
237 for (
int n = 0; n < 50; n++) {
244 throw CanteraError(
"setState_SV",
"no convergence. dt = {}", dt);
251 "Stoichiometric substances may only contain one species.");
virtual void getGibbs_ref(doublereal *g) const
Returns the vector of the Gibbs function of the reference state at the current temperature of the sol...
virtual bool addSpecies(shared_ptr< Species > spec)
virtual doublereal cp_mole() const
Molar heat capacity at constant pressure. Units: J/kmol/K.
virtual void setState_UV(double u, double v, double tol=1e-9)
Set the specific internal energy (J/kg) and specific volume (m^3/kg).
MultiSpeciesThermo m_spthermo
Pointer to the calculation manager for species reference-state thermodynamic properties.
double m_h0_RT
Dimensionless enthalpy at the (mtlast, m_p0)
virtual doublereal thermalExpansionCoeff() const
Return the volumetric thermal expansion coefficient. Units: 1/K.
const doublereal OneAtm
One atmosphere [Pa].
doublereal temperature() const
Temperature (K).
virtual void update(doublereal T, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const
Compute the reference-state properties for all species.
doublereal cp_mass() const
Specific heat at constant pressure. Units: J/kg/K.
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 doublereal isothermalCompressibility() const
Returns the isothermal compressibility. Units: 1/Pa.
virtual bool addSpecies(shared_ptr< Species > spec)
T clip(const T &value, const T &lower, const T &upper)
Clip value such that lower <= value <= upper.
virtual doublereal density() const
Density (kg/m^3).
virtual void getPartialMolarEntropies(doublereal *sbar) const
Get the species partial molar entropy. Units: J/kmol K.
doublereal enthalpy_mass() const
Specific enthalpy. Units: J/kg.
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).
virtual 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
doublereal RT() const
Return the Gas Constant multiplied by the current temperature.
double m_cp0_R
Dimensionless heat capacity at the (mtlast, m_p0)
virtual void getIntEnergy_RT(doublereal *urt) const
Returns the vector of nondimensional Internal Energies of the standard state species at the current T...
virtual 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...
void _updateThermo() const
virtual void setState_SP(double s, double p, double tol=1e-9)
Set the specific entropy (J/kg/K) and pressure (Pa).
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 getPartialMolarEnthalpies(doublereal *hbar) const
Get the species partial molar enthalpies. Units: J/kmol.
virtual doublereal cv_mole() const
Molar heat capacity at constant volume. Units: J/kmol/K.
double m_s0_R
Dimensionless entropy at the (mtlast, m_p0)
virtual void getChemPotentials(doublereal *mu) const
Get the array of chemical potentials.
doublereal entropy_mass() const
Specific entropy. Units: J/kg/K.
virtual void getChemPotentials_RT(doublereal *murt) const
Get the array of non-dimensional species chemical potentials.
virtual void getCp_R_ref(doublereal *cprt) const
Returns the vector of nondimensional constant pressure heat capacities of the reference state at the ...
Base class for exceptions thrown by Cantera classes.
virtual doublereal enthalpy_mole() const
Molar enthalpy. Units: J/kmol.
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.
virtual void getPureGibbs(doublereal *gpure) const
Get the Gibbs functions for the standard state of the species at the current T and P of the solution...
virtual void getPartialMolarVolumes(doublereal *vbar) const
Get the species partial molar volumes. Units: m^3/kmol.
virtual void setState_TP(doublereal t, doublereal p)
Set the temperature (K) and pressure (Pa)
virtual void getCp_R(doublereal *cpr) const
Get the nondimensional Heat Capacities at constant pressure for the species standard states at the cu...
virtual void getPartialMolarIntEnergies(doublereal *ubar) const
Get the species partial molar internal energies. Units: J/kmol.
doublereal cv_mass() const
Specific heat at constant volume. Units: J/kg/K.
virtual void setPressure(doublereal p)
Set the internally stored pressure (Pa) at constant temperature and composition.
virtual doublereal gibbs_mole() const
Molar Gibbs function. Units: J/kmol.
virtual void setTemperature(const doublereal temp)
Set the internally stored temperature of the phase (K).
const doublereal GasConstant
Universal Gas Constant. [J/kmol/K].
Contains declarations for string manipulation functions within Cantera.
virtual void getStandardChemPotentials(doublereal *mu) const
Get the array of chemical potentials at unit activity for the species at their standard states at the...
virtual doublereal intEnergy_mole() const
Molar internal energy. Units: J/kmol.
virtual void getEntropy_R(doublereal *sr) const
Get the array of nondimensional Entropy functions for the standard state species at the current T and...
virtual void getGibbs_RT_ref(doublereal *grt) const
Returns the vector of nondimensional Gibbs Free Energies of the reference state at the current temper...
virtual void setState_HP(double h, double p, double tol=1e-9)
Set the internally stored specific enthalpy (J/kg) and pressure (Pa) of the phase.
size_t m_kk
Number of species in the phase.
doublereal molecularWeight(size_t k) const
Molecular weight of species k.
virtual void getEnthalpy_RT_ref(doublereal *hrt) const
Returns the vector of nondimensional enthalpies of the reference state at the current temperature of ...
Namespace for the Cantera kernel.
doublereal intEnergy_mass() const
Specific internal energy. Units: J/kg.
virtual void setState_SV(double s, double v, double tol=1e-9)
Set the specific entropy (J/kg/K) and specific volume (m^3/kg).
virtual void getEntropy_R_ref(doublereal *er) const
Returns the vector of nondimensional entropies of the reference state at the current temperature of t...
virtual void setDensity(const doublereal density_)
Set the internally stored density (kg/m^3) of the phase.
virtual doublereal entropy_mole() const
Molar entropy. Units: J/kmol/K.