mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-04-23 03:00:17 -04:00
implement calc_saturated_liquid_keyed_output and calc_saturated_vapor_keyed_output for tabular backends; closes #814
This commit is contained in:
@@ -348,6 +348,27 @@ void CoolProp::TabularBackend::load_tables(){
|
||||
if (get_debug_level() > 0){ std::cout << "Tables loaded" << std::endl; }
|
||||
}
|
||||
|
||||
CoolPropDbl CoolProp::TabularBackend::calc_saturated_vapor_keyed_output(parameters key){
|
||||
PhaseEnvelopeData & phase_envelope = dataset->phase_envelope;
|
||||
PureFluidSaturationTableData &pure_saturation = dataset->pure_saturation;
|
||||
if (is_mixture){
|
||||
return phase_envelope_sat(phase_envelope, key, iP, _p);
|
||||
}
|
||||
else{
|
||||
return pure_saturation.evaluate(key, _p, 1, cached_saturation_iL, cached_saturation_iV);
|
||||
}
|
||||
}
|
||||
CoolPropDbl CoolProp::TabularBackend::calc_saturated_liquid_keyed_output(parameters key){
|
||||
PhaseEnvelopeData & phase_envelope = dataset->phase_envelope;
|
||||
PureFluidSaturationTableData &pure_saturation = dataset->pure_saturation;
|
||||
if (is_mixture){
|
||||
return phase_envelope_sat(phase_envelope, key, iP, _p);
|
||||
}
|
||||
else{
|
||||
return pure_saturation.evaluate(key, _p, 0, cached_saturation_iL, cached_saturation_iV);
|
||||
}
|
||||
};
|
||||
|
||||
CoolPropDbl CoolProp::TabularBackend::calc_p(void){
|
||||
PhaseEnvelopeData & phase_envelope = dataset->phase_envelope;
|
||||
if (using_single_phase_table){
|
||||
|
||||
@@ -784,7 +784,9 @@ class TabularBackend : public AbstractState
|
||||
virtual double evaluate_single_phase_pT_transport(parameters output, std::size_t i, std::size_t j) = 0;
|
||||
virtual double evaluate_single_phase_phmolar_derivative(parameters output, std::size_t i, std::size_t j, std::size_t Nx, std::size_t Ny) = 0;
|
||||
virtual double evaluate_single_phase_pT_derivative(parameters output, std::size_t i, std::size_t j, std::size_t Nx, std::size_t Ny) = 0;
|
||||
|
||||
CoolPropDbl calc_saturated_liquid_keyed_output(parameters key);
|
||||
CoolPropDbl calc_saturated_vapor_keyed_output(parameters key);
|
||||
|
||||
/// Returns the path to the tables that shall be written
|
||||
std::string path_to_tables(void);
|
||||
/// Load the tables from file; throws UnableToLoadException if there is a problem
|
||||
|
||||
Reference in New Issue
Block a user