MCPcopy Create free account
hub / github.com/CoolProp/CoolProp / Props

Function Props

src/CoolPropLib.cpp:165–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163 return Props(Output, Name1[0], Prop1, Name2[0], Prop2, Ref);
164}
165EXPORT_CODE double CONVENTION Props(const char* Output, const char Name1, double Prop1, const char Name2, double Prop2, const char* Ref) {
166 fpu_reset_guard guard;
167 try {
168 // Get parameter indices
169 std::string sName1 = std::string(1, Name1), sName2 = std::string(1, Name2);
170 CoolProp::parameters iOutput = CoolProp::get_parameter_index(Output);
171 if (!CoolProp::is_trivial_parameter(iOutput)) {
172 CoolProp::parameters iName1 = CoolProp::get_parameter_index(sName1);
173 CoolProp::parameters iName2 = CoolProp::get_parameter_index(sName2);
174
175 // Convert inputs to SI
176 Prop1 = convert_from_kSI_to_SI(iName1, Prop1);
177 Prop2 = convert_from_kSI_to_SI(iName2, Prop2);
178 }
179
180 // Call the SI function
181 double val = PropsSI(Output, sName1.c_str(), Prop1, sName2.c_str(), Prop2, Ref);
182
183 // Convert back to unit system
184 return convert_from_SI_to_kSI(iOutput, val);
185 } catch (std::exception& e) {
186 CoolProp::set_error_string(e.what());
187 } catch (...) {
188 CoolProp::set_error_string("Undefined error");
189 }
190 return _HUGE;
191}
192EXPORT_CODE double CONVENTION saturation_ancillary(const char* fluid_name, const char* output, int Q, const char* input, double value) {
193 fpu_reset_guard guard;
194 try {

Callers 14

__init__Method · 0.90
__init__Method · 0.90
generate_1phase_dataMethod · 0.90
evaluate_REFPROPMethod · 0.90
saturation_densityFunction · 0.90
saturation_pressureFunction · 0.90
check_hs.pyFile · 0.90
fFunction · 0.90
viscosity_diluteFunction · 0.90
viscosity_linearFunction · 0.90

Calls 8

get_parameter_indexFunction · 0.85
is_trivial_parameterFunction · 0.85
convert_from_kSI_to_SIFunction · 0.85
convert_from_SI_to_kSIFunction · 0.85
set_error_stringFunction · 0.85
whatMethod · 0.80
PropsSIFunction · 0.70
stringClass · 0.50

Tested by 1

fFunction · 0.72