Open dogiv opened 3 years ago
You could do root finding (usually not by binary search!) at a sequence of points, and then build an interpolation table.
It's not completely clear how you define e.g. the inverse function T(H, P) since SpecificH(T, P) is discontinuous across phase transitions, though…
Temperature_Ph
and Temperature_Ps
. IF-97 actually has backward equations for some of those ranges, but i added a root-finding strategy for those regions that don't have one. on the phase transition, the enthalpy varies, but the temperature remains constants, so if P < Pc and hl(Tsat(P)) <= h <= hv(Tsat(P)), then the temperature is Tsat(P).Thanks! Also good reminder for me to pick this project up again :)
Is there a good way to do reverse lookups of the values? For instance, I need to get: