Fix cp0 for tabular backends; closes #696

This commit is contained in:
Ian Bell
2015-06-28 12:31:09 -06:00
parent 350004f1c4
commit ef929fcd2a
2 changed files with 3 additions and 0 deletions

View File

@@ -372,6 +372,8 @@ public:
*/
static AbstractState * factory(const std::string &backend, const std::vector<std::string> &fluid_names);
/// Set the internal variable T without a flash call (expert use only!)
void set_T(CoolPropDbl T){ _T = T; }
/// Get a string representation of the backend
virtual std::string backend_name(void) = 0;
// The derived classes must implement this function to define whether they use mole fractions (true) or mass fractions (false)

View File

@@ -703,6 +703,7 @@ class TabularBackend : public AbstractState
return _Q*yV + (1-_Q)*yL;
}
CoolPropDbl calc_cpmolar_idealgas(void){
this->AS->set_T(_T);
return this->AS->cp0molar();
}