mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-04-23 03:00:17 -04:00
Add REFPROP_DONT_ESTIMATE_INTERACTION_PARAMETERS config variable and implement; closes #804
This commit is contained in:
@@ -253,6 +253,9 @@ void REFPROPMixtureBackend::set_REFPROP_fluids(const std::vector<std::string> &f
|
||||
}
|
||||
if (CoolProp::get_debug_level() > 5){ std::cout << format("%s:%d: Successfully loaded REFPROP fluid: %s\n",__FILE__,__LINE__, components_joined.c_str()); }
|
||||
if (dbg_refprop) std::cout << format("%s:%d: Successfully loaded REFPROP fluid: %s\n",__FILE__,__LINE__, components_joined.c_str());
|
||||
if (get_config_bool(REFPROP_DONT_ESTIMATE_INTERACTION_PARAMETERS) && ierr == -117){
|
||||
throw ValueError(format("Interaction parameter estimation has been disabled: %s", herr));
|
||||
}
|
||||
set_mole_fractions(std::vector<CoolPropDbl>(x.begin(), x.begin()+N));
|
||||
return;
|
||||
}
|
||||
@@ -306,10 +309,16 @@ void REFPROPMixtureBackend::set_REFPROP_fluids(const std::vector<std::string> &f
|
||||
cached_component_string = component_string;
|
||||
if (CoolProp::get_debug_level() > 5){ std::cout << format("%s:%d: Successfully loaded REFPROP fluid: %s\n",__FILE__,__LINE__, components_joined.c_str()); }
|
||||
if (dbg_refprop) std::cout << format("%s:%d: Successfully loaded REFPROP fluid: %s\n",__FILE__,__LINE__, components_joined.c_str());
|
||||
if (get_config_bool(REFPROP_DONT_ESTIMATE_INTERACTION_PARAMETERS) && ierr == -117){
|
||||
throw ValueError(format("Interaction parameter estimation has been disabled: %s", herr));
|
||||
}
|
||||
return;
|
||||
}
|
||||
else if (k < number_of_endings-1){ // Keep going
|
||||
if (CoolProp::get_debug_level() > 5){std::cout << format("REFPROP error/warning [ierr: %d]: %s",ierr, herr) << std::endl;}
|
||||
if (get_config_bool(REFPROP_DONT_ESTIMATE_INTERACTION_PARAMETERS) && ierr == -117){
|
||||
throw ValueError(format("Interaction parameter estimation has been disabled: %s", herr));
|
||||
}
|
||||
continue;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user