diff --git a/include/cantera/thermo/MixtureFugacityTP.h b/include/cantera/thermo/MixtureFugacityTP.h index 7444230cc..a479287e1 100644 --- a/include/cantera/thermo/MixtureFugacityTP.h +++ b/include/cantera/thermo/MixtureFugacityTP.h @@ -302,18 +302,6 @@ protected: virtual void compositionChanged(); void setMoleFractions_NoState(const doublereal* const x); -public: - //! Returns the current pressure of the phase - /*! - * The pressure is an independent variable in this phase. Its current value - * is stored in the object MixtureFugacityTP. - * - * @returns the pressure in pascals. - */ - virtual doublereal pressure() const { - return m_Pcurrent; - } - protected: //! Updates the reference state thermodynamic functions at the current T of //! the solution. @@ -550,15 +538,6 @@ protected: protected: virtual void invalidateCache(); - //! Current value of the pressure - /*! - * Because the pressure is now a calculation, we store the result of the - * calculation whenever it is recalculated. - * - * units = Pascals - */ - doublereal m_Pcurrent; - //! Storage for the current values of the mole fractions of the species /*! * This vector is kept up-to-date when some the setState functions are called. diff --git a/src/thermo/MixtureFugacityTP.cpp b/src/thermo/MixtureFugacityTP.cpp index 22255c877..eb0e401aa 100644 --- a/src/thermo/MixtureFugacityTP.cpp +++ b/src/thermo/MixtureFugacityTP.cpp @@ -18,7 +18,6 @@ namespace Cantera { MixtureFugacityTP::MixtureFugacityTP() : - m_Pcurrent(-1.0), iState_(FLUID_GAS), forcedState_(FLUID_UNDEFINED), m_Tlast_ref(-1.0) @@ -264,21 +263,18 @@ void MixtureFugacityTP::setState_TP(doublereal t, doublereal pres) _updateReferenceStateThermo(); // Depends on the mole fractions and the temperature updateMixingExpressions(); - m_Pcurrent = pres; if (forcedState_ == FLUID_UNDEFINED) { double rhoNow = Phase::density(); double rho = densityCalc(t, pres, iState_, rhoNow); if (rho > 0.0) { Phase::setDensity(rho); - m_Pcurrent = pres; iState_ = phaseState(true); } else { if (rho < -1.5) { rho = densityCalc(t, pres, FLUID_UNDEFINED , rhoNow); if (rho > 0.0) { Phase::setDensity(rho); - m_Pcurrent = pres; iState_ = phaseState(true); } else { throw CanteraError("MixtureFugacityTP::setState_TP()", "neg rho"); @@ -294,7 +290,6 @@ void MixtureFugacityTP::setState_TP(doublereal t, doublereal pres) double rho = densityCalc(t, pres, iState_, rhoNow); if (rho > 0.0) { Phase::setDensity(rho); - m_Pcurrent = pres; iState_ = phaseState(true); if (iState_ >= FLUID_LIQUID_0) { throw CanteraError("MixtureFugacityTP::setState_TP()", "wrong state"); @@ -309,7 +304,6 @@ void MixtureFugacityTP::setState_TP(doublereal t, doublereal pres) double rho = densityCalc(t, pres, iState_, rhoNow); if (rho > 0.0) { Phase::setDensity(rho); - m_Pcurrent = pres; iState_ = phaseState(true); if (iState_ == FLUID_GAS) { throw CanteraError("MixtureFugacityTP::setState_TP()", "wrong state"); @@ -330,8 +324,6 @@ void MixtureFugacityTP::setState_TR(doublereal T, doublereal rho) doublereal mv = molarVolume(); // depends on mole fraction and temperature updateMixingExpressions(); - - m_Pcurrent = pressureCalc(T, mv); iState_ = phaseState(true); } diff --git a/src/thermo/RedlichKwongMFTP.cpp b/src/thermo/RedlichKwongMFTP.cpp index 16cf28a9a..24969e035 100644 --- a/src/thermo/RedlichKwongMFTP.cpp +++ b/src/thermo/RedlichKwongMFTP.cpp @@ -171,10 +171,6 @@ doublereal RedlichKwongMFTP::pressure() const doublereal T = temperature(); double molarV = meanMolecularWeight() / density(); double pp = GasConstant * T/(molarV - m_b_current) - m_a_current/(sqrt(T) * molarV * (molarV + m_b_current)); -// if (fabs(pp -m_Pcurrent) > 1.0E-5 * fabs(m_Pcurrent)) { -// throw CanteraError(" RedlichKwongMFTP::pressure()", "setState broken down, maybe"); -// } - return pp; }