-- R134a saturation properties at 0 degrees Celsius, in SI units. -- Run with texlua from the package root, with LUACOOLPROP_LIB configured. local lcp = require("luacoolprop") local fluid = "R134a" local temperature = 273.15 local pressure = lcp.propsSI("P", "T", temperature, "Q", 0, fluid) local liquid_enthalpy = lcp.propsSI("Hmass", "T", temperature, "Q", 0, fluid) local vapor_enthalpy = lcp.propsSI("Hmass", "T", temperature, "Q", 1, fluid) io.write("CoolProp version: ", lcp.version(), "\n") io.write("CoolProp revision: ", lcp.gitrevision(), "\n") io.write(string.format("Saturation pressure: %.6g Pa\n", pressure)) io.write(string.format("Specific enthalpy of vaporization: %.6g J/kg\n", vapor_enthalpy - liquid_enthalpy))