19 PDSS_SSVol::PDSS_SSVol()
32 "no standardState Node for species " + speciesNode.
name());
34 std::string model = ss->
attrib(
"model");
36 getFloatArray(*ss, coeffs,
true,
"toSI",
"volumeTemperaturePolynomial");
37 if (coeffs.size() != 4) {
39 " Didn't get 4 density polynomial numbers for species " + speciesNode.
name());
41 if (model ==
"temperature_polynomial") {
43 }
else if (model ==
"density_temperature_polynomial") {
47 "Unknown standardState model '{}'' for species '{}'",
48 model, speciesNode.
name());
53 for (
size_t i = 0; i < 4; i++) {
60 for (
size_t i = 0; i < 4; i++) {
96 doublereal dens2 = dens * dens;
100 d2VdT2_ = 2.0 *
m_mw / (dens2 * dens) * ddensdT * ddensdT -
m_mw / dens2 * d2densdT2;
102 throw CanteraError(
"PDSS_SSVol::calcMolarVolume",
"unimplemented");
110 if (fabs(deltaP) < 1.0E-10) {
132 if (fabs(deltaP) < 1.0E-10) {
157 if (fabs(rhoStored - rho) / (rhoStored + rho) > 1.0E-4) {
159 "Inconsistent supplied rho");
virtual void setParametersFromXML(const XML_Node &speciesNode)
Initialization routine for the PDSS object based on the speciesNode.
double m_gss_RT
Standard state Gibbs free energy divided by RT.
SSVolume_Model volumeModel_
Enumerated data type describing the type of volume model used to calculate the standard state volume ...
virtual doublereal intEnergy_mole() const
Return the molar internal Energy in units of J kmol-1.
CTML ("Cantera Markup Language") is the variant of XML that Cantera uses to store data...
std::string name() const
Returns the name of the XML node.
virtual doublereal satPressure(doublereal t)
saturation pressure
const XML_Node * findByName(const std::string &nm, int depth=100000) const
This routine carries out a recursive search for an XML node based on the name of the node...
virtual void initThermo()
Initialization routine.
size_t getFloatArray(const XML_Node &node, vector_fp &v, const bool convert, const std::string &unitsString, const std::string &nodeName)
This function reads the current node or a child node of the current node with the default name...
virtual void setParametersFromXML(const XML_Node &speciesNode)
Initialization routine for the PDSS object based on the speciesNode.
double m_sss_R
Standard state entropy divided by R.
doublereal m_pres
State of the system - pressure.
virtual void setTemperature(doublereal temp)
Set the internal temperature.
Class XML_Node is a tree-based representation of the contents of an XML file.
void setVolumePolynomial(double *coeffs)
Set polynomial coefficients for the standard state molar volume as a function of temperature.
double m_cp0_R
Reference state heat capacity divided by R.
void calcMolarVolume()
Does the internal calculation of the volume.
void setDensityPolynomial(double *coeffs)
Set polynomial coefficients for the standard state density as a function of temperature.
This approximation is for a species with a cubic polynomial in temperature.
virtual void setPressure(doublereal pres)
Sets the pressure in the object.
This approximation is for a species where the density is expressed as a cubic polynomial in temperatu...
double m_hss_RT
Standard state enthalpy divided by RT.
SSVolume_Model
Types of general formulations for the specification of the standard state volume. ...
double m_cpss_R
Standard state heat capacity divided by R.
double m_s0_R
Reference state entropy divided by R.
double m_Vss
Standard State molar volume (m^3/kmol)
doublereal d2VdT2_
2nd derivative of the volume wrt temperature
double m_V0
Reference state molar volume (m^3/kmol)
shared_ptr< SpeciesThermoInterpType > m_spthermo
Pointer to the species thermodynamic property manager.
Declarations for the class PDSS_SSVol (pressure dependent standard state) which handles calculations ...
double m_g0_RT
Reference state Gibbs free energy divided by RT.
virtual void setState_TP(doublereal temp, doublereal pres)
Set the internal temperature and pressure.
Base class for exceptions thrown by Cantera classes.
vector_fp TCoeff_
coefficients for the temperature representation
doublereal dVdT_
Derivative of the volume wrt temperature.
doublereal m_maxTemp
Maximum temperature.
doublereal m_minTemp
Minimum temperature.
virtual void initThermo()
Initialization routine.
virtual doublereal cv_mole() const
Return the molar const volume heat capacity in units of J kmol-1 K-1.
Header file for a derived class of ThermoPhase that handles variable pressure standard state methods ...
std::string attrib(const std::string &attr) const
Function returns the value of an attribute.
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
const doublereal GasConstant
Universal Gas Constant. [J/kmol/K].
doublereal m_temp
Current temperature used by the PDSS object.
double m_h0_RT
Reference state enthalpy divided by RT.
virtual void setState_TR(doublereal temp, doublereal rho)
Set the internal temperature and density.
virtual doublereal cp_mole() const
Return the molar const pressure heat capacity in units of J kmol-1 K-1.
Namespace for the Cantera kernel.
doublereal m_p0
Reference state pressure of the species.
doublereal m_mw
Molecular Weight of the species.