diff --git a/include/cantera/thermo/PengRobinson.h b/include/cantera/thermo/PengRobinson.h index 6680b1087e1..bc6e6f0be28 100644 --- a/include/cantera/thermo/PengRobinson.h +++ b/include/cantera/thermo/PengRobinson.h @@ -205,6 +205,22 @@ class PengRobinson : public MixtureFugacityTP public: + //! Returns the isothermal compressibility (\f$\beta_T\f$). Units: 1/Pa. + /*! + * \f[ + * \beta_T = -\frac{1}{v} \left(\frac{\partial v}{\partial p}\right)_T + * \f] + */ + virtual double isothermalCompressibility() const; + + //! Return the volumetric thermal expansion coefficient (\f$\alpha_V\f$). Units: 1/K. + /*! + * \f[ + * \alpha_V = \frac{1}{v} \left(\frac{\partial v}{\partial T}\right)_p + * \f] + */ + virtual double thermalExpansionCoeff() const; + //! Calculate \f$dp/dV\f$ and \f$dp/dT\f$ at the current conditions /*! * These are stored internally. @@ -248,7 +264,7 @@ class PengRobinson : public MixtureFugacityTP */ double m_a; - //! Value of \f$\alpha\f$ in the equation of state + //! Value of \f$a \alpha\f$ in the equation of state /*! * `m_aAlpha_mix` is a function of the temperature and the mole fractions. */ diff --git a/include/cantera/thermo/RedlichKwongMFTP.h b/include/cantera/thermo/RedlichKwongMFTP.h index f6ceba56d59..d243932ec71 100644 --- a/include/cantera/thermo/RedlichKwongMFTP.h +++ b/include/cantera/thermo/RedlichKwongMFTP.h @@ -173,6 +173,22 @@ class RedlichKwongMFTP : public MixtureFugacityTP virtual doublereal densSpinodalGas() const; virtual doublereal dpdVCalc(doublereal TKelvin, doublereal molarVol, doublereal& presCalc) const; + //! Returns the isothermal compressibility (\f$\beta_T\f$). Units: 1/Pa. + /*! + * \f[ + * \beta_T = -\frac{1}{v} \left(\frac{\partial v}{\partial p}\right)_T + * \f] + */ + virtual double isothermalCompressibility() const; + + //! Return the volumetric thermal expansion coefficient (\f$\alpha_V\f$). Units: 1/K. + /*! + * \f[ + * \alpha_V = \frac{1}{v} \left(\frac{\partial v}{\partial T}\right)_p + * \f] + */ + virtual double thermalExpansionCoeff() const; + //! Calculate dpdV and dpdT at the current conditions /*! * These are stored internally. diff --git a/src/thermo/PengRobinson.cpp b/src/thermo/PengRobinson.cpp index 913a392bac1..2fe5fffe49a 100644 --- a/src/thermo/PengRobinson.cpp +++ b/src/thermo/PengRobinson.cpp @@ -630,6 +630,18 @@ double PengRobinson::dpdVCalc(double T, double molarVol, double& presCalc) const return -GasConstant * T / (vmb * vmb) + 2 * m_aAlpha_mix * vpb / (denom*denom); } +double PengRobinson::isothermalCompressibility() const +{ + calculatePressureDerivatives(); + return -1 / (molarVolume() * m_dpdV); +} + +double PengRobinson::thermalExpansionCoeff() const +{ + calculatePressureDerivatives(); + return -m_dpdT / (molarVolume() * m_dpdV); +} + void PengRobinson::calculatePressureDerivatives() const { double T = temperature(); diff --git a/src/thermo/RedlichKwongMFTP.cpp b/src/thermo/RedlichKwongMFTP.cpp index 3267af53572..8c615630fe5 100644 --- a/src/thermo/RedlichKwongMFTP.cpp +++ b/src/thermo/RedlichKwongMFTP.cpp @@ -707,6 +707,18 @@ doublereal RedlichKwongMFTP::dpdVCalc(doublereal TKelvin, doublereal molarVol, d return dpdv; } +double RedlichKwongMFTP::isothermalCompressibility() const +{ + pressureDerivatives(); + return -1 / (molarVolume() * dpdV_); +} + +double RedlichKwongMFTP::thermalExpansionCoeff() const +{ + pressureDerivatives(); + return -dpdT_ / (molarVolume() * dpdV_); +} + void RedlichKwongMFTP::pressureDerivatives() const { doublereal TKelvin = temperature();