Testing the Thermodynamic Functions for Saturated Water As A Function of Temperature

Here are plots of the standard thermodynamic values for saturated water, all as a function of temperature. Tomorrow I’ll plot them all out as a function of pressure.

I extended the range of each function below 32 degrees Fahrenheit to address conditions that occurred in a model I build earlier in my career. For those lower temperatures the water is not saturated but exists either in a subcooled state in the liquid phase of the superheated state in the vapor phase. Many of these function exhibit a discontinuity at 32 degrees. I apparently used data from a different set of tables which I’ll try to identify going forward, particularly as I work through the process of recreating the curve fits I did and correcting those that seem obviously in error. I’ll be working through that process next week.

I also believe that I’ve figured out why the plotted lines are so thick and why they often include small bulges that make the plot look like it’s chattering up and down unexpectedly. The effect appears to be caused by drawing lines with the lineCap mode set to “square,” which adds nearly a full pixel to either end of each plotted line segment. Since the curves are drawn at one-pixel intervals along the x-axis any pixel changes along the y-axis should result in extra thick lines or lone pixels above or below the plotted line. Tomorrow I will try producing the graphs with the lineCap mode set to “butt.”

There are clearly a few segments that look awry on these graphs, and they are usually at the lower end of the temperature scale, above 32 and less than 100 degrees. Re-fitting the curves will require me to implement a few of the features on my to-do list for the graph project, as well as demonstrating how the curve function were created in the first place.

Finally, here is an example of one of the thermodynamic functions. It is composed of individual curve fits across a limited range or temperatures, and the value for a global variable called graphCycle is set to an index based on which of the fits are used. That index is used to select the color in which that section of the function’s output curve is to be drawn. If the input value is out of the range covered by the function the value for graphCycle is set to a different constant indicating that the input value is lower or higher than the active range. In those cases no line segments are added to the graph.

This entry was posted in Tools and methods and tagged , . Bookmark the permalink.

Leave a Reply