22 for (
size_t i = 0; i < 4; i++) {
29 for (
size_t i = 0; i < 4; i++) {
38 vector<AnyValue> data(4);
40 eosNode[
"model"] =
"density-temperature-polynomial";
41 data[0].setQuantity(
TCoeff_[0],
"kg/m^3");
42 data[1].setQuantity(
TCoeff_[1],
"kg/m^3/K");
43 data[2].setQuantity(
TCoeff_[2],
"kg/m^3/K^2");
44 data[3].setQuantity(
TCoeff_[3],
"kg/m^3/K^3");
46 eosNode[
"model"] =
"molar-volume-temperature-polynomial";
47 data[0].setQuantity(
TCoeff_[0],
"m^3/kmol");
48 data[1].setQuantity(
TCoeff_[1],
"m^3/kmol/K");
49 data[2].setQuantity(
TCoeff_[2],
"m^3/kmol/K^2");
50 data[3].setQuantity(
TCoeff_[3],
"m^3/kmol/K^3");
52 eosNode[
"data"] = std::move(data);
59 const string& model =
m_input[
"model"].asString();
61 if (model ==
"density-temperature-polynomial") {
69 }
else if (model ==
"molar-volume-temperature-polynomial") {
106 double dens2 = dens * dens;
110 d2VdT2_ = 2.0 *
m_mw / (dens2 * dens) * ddensdT * ddensdT -
m_mw / dens2 * d2densdT2;
120 if (fabs(deltaP) < 1.0E-10) {
142 if (fabs(deltaP) < 1.0E-10) {
Declarations for the class PDSS_SSVol (pressure dependent standard state) which handles calculations ...
Header file for a derived class of ThermoPhase that handles variable pressure standard state methods ...
A map of string keys to values whose type can vary at runtime.
bool hasKey(const string &key) const
Returns true if the map contains an item named key.
const UnitSystem & units() const
Return the default units that should be used to convert stored values.
A wrapper for a variable whose type is determined at runtime.
An error indicating that an unimplemented function has been called.
double m_sss_R
Standard state entropy divided by R.
double m_cpss_R
Standard state heat capacity divided by R.
double m_h0_RT
Reference state enthalpy divided by RT.
double m_g0_RT
Reference state Gibbs free energy divided by RT.
double m_s0_R
Reference state entropy divided by R.
double m_gss_RT
Standard state Gibbs free energy divided by RT.
double m_cp0_R
Reference state heat capacity divided by R.
double cp_mole() const override
Return the molar const pressure heat capacity in units of J kmol-1 K-1.
double m_Vss
Standard State molar volume (m^3/kmol)
double m_hss_RT
Standard state enthalpy divided by RT.
double m_V0
Reference state molar volume (m^3/kmol)
void setPressure(double pres) override
Sets the pressure in the object.
void setTemperature(double temp) override
Set the internal temperature.
double dVdT_
Derivative of the volume wrt temperature.
void setDensityPolynomial(double *coeffs)
Set polynomial coefficients for the standard state density as a function of temperature.
void setVolumePolynomial(double *coeffs)
Set polynomial coefficients for the standard state molar volume as a function of temperature.
void initThermo() override
Initialization routine.
double cv_mole() const override
Return the molar const volume heat capacity in units of J kmol-1 K-1.
PDSS_SSVol()
Default Constructor.
void getParameters(AnyMap &eosNode) const override
Store the parameters needed to reconstruct a copy of this PDSS object.
vector< double > TCoeff_
coefficients for the temperature representation
double intEnergy_mole() const override
Return the molar internal Energy in units of J kmol-1.
void setState_TP(double temp, double pres) override
Set the internal temperature and pressure.
@ tpoly
This approximation is for a species with a cubic polynomial in temperature.
@ density_tpoly
This approximation is for a species where the density is expressed as a cubic polynomial in temperatu...
void calcMolarVolume()
Does the internal calculation of the volume.
double d2VdT2_
2nd derivative of the volume wrt temperature
SSVolume_Model volumeModel_
Enumerated data type describing the type of volume model used to calculate the standard state volume ...
double satPressure(double t) override
saturation pressure
virtual void initThermo()
Initialization routine.
double m_p0
Reference state pressure of the species.
double m_temp
Current temperature used by the PDSS object.
shared_ptr< SpeciesThermoInterpType > m_spthermo
Pointer to the species thermodynamic property manager.
double m_pres
State of the system - pressure.
double m_maxTemp
Maximum temperature.
double m_minTemp
Minimum temperature.
double m_mw
Molecular Weight of the species.
AnyMap m_input
Input data supplied via setParameters.
virtual void getParameters(AnyMap &eosNode) const
Store the parameters needed to reconstruct a copy of this PDSS object.
double convert(double value, const string &src, const string &dest) const
Convert value from the units of src to the units of dest.
const double GasConstant
Universal Gas Constant [J/kmol/K].
Namespace for the Cantera kernel.