Skip to content

Commit

Permalink
Fix cp0 for tabular backends; closes #696
Browse files Browse the repository at this point in the history
  • Loading branch information
ibell committed Jun 28, 2015
1 parent 350004f commit ef929fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/AbstractState.h
Expand Up @@ -372,6 +372,8 @@ class AbstractState {
*/
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)
Expand Down
1 change: 1 addition & 0 deletions src/Backends/Tabular/TabularBackends.h
Expand Up @@ -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();
}

Expand Down

0 comments on commit ef929fc

Please sign in to comment.