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

Method value_at

src/CoolPropPlot.cpp:341–370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

339}
340
341double PropertyPlot::value_at(CoolProp::parameters key, double xvalue, double yvalue, CoolProp::phases phase) const {
342 if (key == xkey_) return xvalue;
343 if (key == ykey_) return yvalue;
344
345 try {
346 if (swap_axis_inputs_for_update_) std::swap(xvalue, yvalue);
347 state_->specify_phase(phase);
348 state_->update(axis_pair_, xvalue, yvalue);
349 switch (key) {
350 case CoolProp::iT:
351 return state_->T();
352 case CoolProp::iP:
353 return state_->p();
354 case CoolProp::iDmass:
355 return state_->rhomass();
356 case CoolProp::iHmass:
357 return state_->hmass();
358 case CoolProp::iSmass:
359 return state_->smass();
360 case CoolProp::iUmass:
361 return state_->umass();
362 case CoolProp::iQ:
363 return state_->Q();
364 default:
365 return Detail::NaN;
366 }
367 } catch (...) {
368 return Detail::NaN;
369 }
370}
371
372Range PropertyPlot::get_sat_bounds(CoolProp::parameters key) const {
373 double s = 1e-7;

Callers 1

CoolPropPlot.cppFile · 0.80

Calls 9

specify_phaseMethod · 0.80
updateMethod · 0.45
TMethod · 0.45
pMethod · 0.45
rhomassMethod · 0.45
hmassMethod · 0.45
smassMethod · 0.45
umassMethod · 0.45
QMethod · 0.45

Tested by

no test coverage detected