{"id":602,"date":"2016-04-19T20:15:12","date_gmt":"2016-04-20T01:15:12","guid":{"rendered":"http:\/\/rpchurchill.com\/?p=602"},"modified":"2017-02-04T17:16:50","modified_gmt":"2017-02-04T22:16:50","slug":"fixing-the-thermodynamic-functions-for-saturated-water-as-a-function-of-temperature","status":"publish","type":"post","link":"https:\/\/rpchurchill.com\/wordpress\/posts\/2016\/04\/19\/fixing-the-thermodynamic-functions-for-saturated-water-as-a-function-of-temperature\/","title":{"rendered":"Fixing the Thermodynamic Functions for Saturated Water As A Function of Temperature"},"content":{"rendered":"<p>I&#8217;ve updated five of the thermodynamic property functions vs. temperature. Note that most of these define properties only up to a bit above 600 \u00b0F and, more importantly, to 1800 psi. The values for saturated water are defined up to 705.44 \u00b0F and 3204 psi. I only fit the curves to the values I did because I was modeling systems in a boiling water reactor (BWR), which runs at not more than 1200 psi. Pressurized water reactors (PWR), by contrast, run up to around 2000 psi. It would be a good idea to extend all of the curves vs. both temperature and pressure to their maximum values.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.rpchurchill.com\/images\/articles\/test_P_of_T.png\" alt=\"\" \/><\/p>\n<p>The specific volume functions were both updated.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.rpchurchill.com\/images\/articles\/Tfind_v_f_fixed.png\" alt=\"\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.rpchurchill.com\/images\/articles\/Tfind_v_g_fixed.png\" alt=\"\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.rpchurchill.com\/images\/articles\/test_u_f_of_T.png\" alt=\"\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.rpchurchill.com\/images\/articles\/test_u_fg_of_T.png\" alt=\"\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.rpchurchill.com\/images\/articles\/test_u_g_of_T.png\" alt=\"\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.rpchurchill.com\/images\/articles\/test_h_f_of_T.png\" alt=\"\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.rpchurchill.com\/images\/articles\/test_h_fg_of_T.png\" alt=\"\" \/><\/p>\n<p>The enthalpy of vapor function was updated.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.rpchurchill.com\/images\/articles\/Tfind_h_g_fixed.png\" alt=\"\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.rpchurchill.com\/images\/articles\/test_s_f_of_T.png\" alt=\"\" \/><\/p>\n<p>The entropy of vaporization and vapor functions were also updated.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.rpchurchill.com\/images\/articles\/Tfind_s_fg_fixed.png\" alt=\"\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.rpchurchill.com\/images\/articles\/Tfind_s_g_fixed.png\" alt=\"\" \/><\/p>\n<p>Of further note was that I found a more advanced version of the curve fit program I used back when. It not only had more features and was a bit easier to use but also supported extra terms for polynomial powers of four through seven. It&#8217;s generally better to use polynomial functions than it is to use more expensive functions like square root and natural logarithm, especially if the multiplications are written out efficiently.<\/p>\n<p>The automatically generated function code did not make use of the technique, but it&#8217;s possible to write out a polynomial function of the form:<\/p>\n<p>Result = A + Bx + Cx<sup>2<\/sup> + Dx<sup>3<\/sup> + Ex<sup>4<\/sup><\/p>\n<p>in code as:<\/p>\n<p>Result = A + x * (B + x * (C + x * (D + E * x)))<\/p>\n<p>This has the advantage of requiring far fewer multiplications and additions than the method I have used.<\/p>\n<p>I&#8217;ll have to do some reverse engineering to figure out what I was doing with the different versions of the curve fit program before putting together a new one. I had four or five versions altogether, the last of which seemed to be incomplete.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.rpchurchill.com\/images\/articles\/Improved_Fit_Program.png\" alt=\"\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve updated five of the thermodynamic property functions vs. temperature. Note that most of these define properties only up to a bit above 600 \u00b0F and, more importantly, to 1800 psi. The values for saturated water are defined up to &hellip; <a href=\"https:\/\/rpchurchill.com\/wordpress\/posts\/2016\/04\/19\/fixing-the-thermodynamic-functions-for-saturated-water-as-a-function-of-temperature\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[79,77],"_links":{"self":[{"href":"https:\/\/rpchurchill.com\/wordpress\/wp-json\/wp\/v2\/posts\/602"}],"collection":[{"href":"https:\/\/rpchurchill.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rpchurchill.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rpchurchill.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/rpchurchill.com\/wordpress\/wp-json\/wp\/v2\/comments?post=602"}],"version-history":[{"count":4,"href":"https:\/\/rpchurchill.com\/wordpress\/wp-json\/wp\/v2\/posts\/602\/revisions"}],"predecessor-version":[{"id":1518,"href":"https:\/\/rpchurchill.com\/wordpress\/wp-json\/wp\/v2\/posts\/602\/revisions\/1518"}],"wp:attachment":[{"href":"https:\/\/rpchurchill.com\/wordpress\/wp-json\/wp\/v2\/media?parent=602"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rpchurchill.com\/wordpress\/wp-json\/wp\/v2\/categories?post=602"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rpchurchill.com\/wordpress\/wp-json\/wp\/v2\/tags?post=602"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}