In numerical simulations of system models that include two-phase media, for example a refrigerant in an air conditioning system, the mathematical formulation of a given set of medium properties can significantly impact the simulation performance. Helmholtz equations are commonly used to describe the thermophysical properties in both the single-phase liquid and two-phase region of a given fluid. Although providing accurate results, solving these equations very often imposes a penalty on computational speed.
In order to remedy the computational penalties while at the same time maintaining accurate thermophysical properties, a mix of lookup tables and spline interpolation can be used, as outlined in the 2015 IAPWS “Guideline on the Fast Calculation of Steam and Water Properties with the Spline-Based Table Look-Up Method (SBTL)”. This paper describes a medium implementation based on SBTL, some details relevant to model-based systems engineering, as well as a procedure for the generation of lookup tables. CoolProp or NIST RefProp can be used to generate the thermophysical data set by calculation of thermodynamic properties for large p-h, p-T and ρ-T input matrices. The generated data is then transformed to an equidistant enthalpy and logarithmic pressure grid, which is used to determine coefficients of second-degree polynomials that approximate thermophysical properties of interest, such as for example entropy, density and specific heat.
The proposed method makes it possible to produce accurate thermodynamic data in a wide pressure-enthalpy range for any given pure fluid medium in gas-, liquid- and two-phase. Meanwhile, calculating a desired thermophysical property will, for a given enthalpy and pressure, only involve a second-degree polynomial evaluation and a table lookup to retrieve the corresponding set of polynomial coefficients. In this way the computational performance can be improved, and the accuracy of the thermodynamic properties maintained.
The proposed implementation methodology is in this paper evaluated for a system model representing an air-conditioning system typically found in a passenger vehicle. The system model, as well as the R1234yf spline-based table lookup medium, used as the refrigerant, is implemented in Modelica. The performed simulations suggest a negligible difference in result output between the system model using the R1234yf refrigerant implemented with classical Helmholtz equations and the corresponding system model using the R1234yf polynomial spline-based table lookup medium. At the same time, the system model utilizing spline-based table lookup medium is significantly faster than the case using Helmholtz equations to determine thermophysical properties.
Presented by: Kenan Muric
Kenan Muric is a Simulation Engineer at Modelon.