This can be done with kitControl math blocks and a little help from excel's Trendline feature. Copy and paste the temperature vs pressure values in to excel. Convert to PSIA and Deg R (curve fitting works better). Create a graph and try the various Trendlines until you get a good fit. I came up with this for R134a. y = 0.00003561 x^3 - 0.01308796 x^2 + 2.12259171 x + 421.11910836 With x = PSIA and a range of 20.7 to 149.7 and y = deg R.
Could I get a copy of the program objects also, email is in my profile, Thank you.
nice work ... though I think it maybe time to make a generic curve-fit Program Object to the 4th or 5th order.
Originally Posted by DaveCR
...maybe even have an Enum setting for different refrigerants
Thanks. For 134a:
y = 9.20621E-10 x^5 - 6.26875E-07 x^4 + 1.65989E-04 x^3 - 2.26106E-02 x^2 + 2.14070E+00 x - 1.32707E+01
Input pressure range (PSIA) 14.7 to 244.7. Output °R. This turns out to be quite a good fit with R squared = 0.9999