Presentation is loading. Please wait.

Presentation is loading. Please wait.

Fast Refrigerant Property Calculations

Similar presentations


Presentation on theme: "Fast Refrigerant Property Calculations"— Presentation transcript:

1 Fast Refrigerant Property Calculations
Using Interpolation-Based Methods Christopher Laughman Yiming Zhao Daniel Nikovski 19 July 2012 2012/07/19 CONFIDENTIAL

2 Overview Motivation Structure of method Implementation Results
2012/07/19 CONFIDENTIAL

3 On calculating refrigerant properties
Refprop is commonly used: It’s very accurate! …but it’s not so fast. Typical simulation of a moving-boundary model of a vapor compression air-conditioning system: ~90 property evaluations / timestep. Long transient simulations with variable step ODE solvers can be very slow. 2012/07/19 CONFIDENTIAL

4 Property calculation wish list
When will my simulation finish? Speed (at least 30x faster) Accuracy (< 1% error in comparison to Refprop) Consistency given 𝑇 ∗ , 𝑃 ∗ : |𝑇 𝑃 ∗ , ℎ 𝑇 ∗ , 𝑃 ∗ − 𝑇 ∗ |< 𝜖 Where epsilon is set by the machine tolerance, not by numerical error. 2012/07/19 CONFIDENTIAL

5 Choosing an interpolation variable
Consistency is difficult to ensure when creating interpolation functions h(T, p) Thermodynamic potentials and fundamental equations of state, such as the Helmholtz energy 𝑎 𝑇,𝑣 , have distinct advantages: 𝑝= 𝜕𝑎 𝜕𝑣 𝑇 𝑠=− 𝜕𝑎 𝜕𝑇 𝜌 ℎ=𝑢+𝑝𝑣 2012/07/19 CONFIDENTIAL

6 General property calculation method
A thermodynamic potential (e.g. Helmholtz energy 𝑎(𝑇,𝑣)) is used as a pivot variable: Relate the variables of interest to a value of 𝑎 A given value of 𝑎 uniquely determines (𝑇,𝑣) Use 𝑎(𝑇,𝑣) to calculate any other desired property 2012/07/19 CONFIDENTIAL

7 Fitting the Helmholtz energy
Once we know the right values of A, then we just use the fundamental EOS from Lemmon, etc. to calculate the desired properties. Bicubic splines are advantageous for this interpolation problem because they can be easily differentiated to calculate other properties: Φ 𝑖,𝑗 𝑇,𝑣 = 𝑘=0 3 𝑙=0 3 𝛼 𝑘,𝑙 (𝑇− 𝑇 𝑖 ) 𝑘 (𝑣− 𝑣 𝑗 ) 𝑙 for 𝑇,𝑣 ∈ 𝑇 𝑖 , 𝑇 𝑖+1 × 𝑣 𝑖 , 𝑣 𝑖+1 . 2012/07/19 CONFIDENTIAL

8 Φ 𝑖,𝑗 𝑇,𝑣 = 𝑘=0 3 𝑙=0 3 𝛼 𝑘,𝑙 (𝑇− 𝑇 𝑖 ) 𝑘 (𝑣− 𝑣 𝑗 ) 𝑙
Example 1: 𝑻,𝒗 →𝒔 Can manipulate the previous equation Φ 𝑖,𝑗 𝑇,𝑣 = 𝑘=0 3 𝑙=0 3 𝛼 𝑘,𝑙 (𝑇− 𝑇 𝑖 ) 𝑘 (𝑣− 𝑣 𝑗 ) 𝑙 into a matrix equation Φ 𝑖,𝑗 𝑇,𝑣 = 1 𝑇 𝑇 2 𝑇 𝛼 00 ⋯ 𝛼 03 ⋮ ⋱ ⋮ 𝛼 30 ⋯ 𝛼 ⋮ 𝑣 3 Since s 𝑇,𝑣 = 𝜕𝑎(𝑇,𝑣) 𝜕𝑇 , 𝑠 𝑇,𝑣 = 1 2𝑇 3 𝑇 𝛼 10 ⋯ 𝛼 13 ⋮ ⋱ ⋮ 𝛼 30 ⋯ 𝛼 ⋮ 𝑣 3 2012/07/19 CONFIDENTIAL

9 it is clear that 𝑠 is a quadratic function in 𝑇.
Example 2: 𝒔,𝒗 →𝑻 From 𝑠 𝑇,𝑣 = 1 2𝑇 3 𝑇 𝛼 10 ⋯ 𝛼 13 ⋮ ⋱ ⋮ 𝛼 30 ⋯ 𝛼 ⋮ 𝑣 3 it is clear that 𝑠 is a quadratic function in 𝑇. Solve for 𝑇 as a function of 𝑠 by finding the roots of that quadratic and choosing the feasible root. 2012/07/19 CONFIDENTIAL

10 𝑇 𝑘 − 𝑇 𝑘−1 + 𝑣 𝑘 − 𝑣 𝑘−1 + 𝑝 𝑘 −𝑝 + 𝑠 𝑘 −𝑠 < 𝜖
Example 3: 𝒔,𝒑 →(𝑻,𝒗) When only 𝑠,𝑝 are given, it is not possible to analytically calculate 𝑇,𝑣 . Instead, find the roots of 𝑓 𝑇,𝑣 = 𝑓 𝑝 𝑇,𝑣 −𝑝 𝑓 𝑠 𝑇,𝑣 −𝑠 =0; the search terminates when 𝑇 𝑘 − 𝑇 𝑘−1 + 𝑣 𝑘 − 𝑣 𝑘−1 + 𝑝 𝑘 −𝑝 + 𝑠 𝑘 −𝑠 < 𝜖 where 𝜖 is determined by the user. Newton’s method (or other equivalent methods) can be used to find the roots of this equation. 2012/07/19 CONFIDENTIAL

11 Results: Speed This method on the superheated region of R134a inside the region [280,400]K x [0.9,10]mol/L. Three meshes were used: Mesh 1 = 50 points x 100 points Mesh 2 = 100 points x 200 points Mesh 3 = 200 points x 400 points Average computation time (ms) Mesh 1 Mesh 2 Mesh 3 Type 1 (T,v) → s 7.56e-3 7.37e-4 7.5e-4 (T,v) → p 7.43e-3 7.43e-4 8.61e-4 Type 2 (s,v) → T 2.99e-2 3.09e-2 3.25e-2 (T,p) → v 2.95e-2 3.08e-2 3.48e-2 Type 3 (s,p) → (T,v) 0.364 0.546 1.24 Table 1 shows the computation speed of the new method, as well as the impact of base mesh size on the computation speed. Three different size meshes were used: Mesh 1 was 50 points by 100 points, Mesh 2 was 100 points by 200 points, and Mesh 3 was 200 points by 400 points. As expected, the first class of calculations, described in Section 3.2, are the most efficient since they only require the evaluation of very low order polynomials, and the grid cell allocation requires very little computation. The second class of calculations, described in Section 3.3, performs analytic root computation for quadratic functions, and are about 4-40 times slower than the first class. For this class of calculations, grid cell allocation requires a considerable amount of computation when the mesh size is large. The third class of calculations, described in Section 3.4, is the least computationally efficient due to the iterative nature of Newton’s method. 2012/07/19 CONFIDENTIAL

12 Results: Accuracy This method was compared to the function tprho in Refprop 9.0 (NIST). Refprop with standard tolerances and the interpolation-based method were compared to Refprop with reduced convergence tolerance 𝜌 𝑛 − 𝜌 𝑛−1 < 1e-12 rather than the standard tolerance of 1e-9. The interpolation-based method was tested for the 3 mesh sizes. Refprop was tested for 3 different convergence tolerances. The interpolation-based method was 53x faster than Refprop on average. Newton-based method Interpolation-based method Tolerance Time (ms) Relative error Mesh 1e-3 1.42 9.85e-4 Mesh 1 2.95e-2 2.98e-4 1e-5 1.70 9.98e-6 Mesh 2 3.08e-2 1.84e-5 1e-8 1.92 9.91e-9 Mesh 3 3.48e-2 6.28e-6 2012/07/19 CONFIDENTIAL

13 Results: Consistency 𝐸 𝑇 𝐸 𝑣 𝐸 𝑇𝑣 Three metrics were examined:
𝐸 𝑇 = 𝑇− 𝐹 𝑇 𝐹 𝑠 𝑇,𝑣 ,𝑣 𝐸 𝑣 = 𝑣− 𝐹 𝑣 𝑇, 𝐹 𝑝 𝑇,𝑣 𝐸 𝑇𝑣 = [𝑇,𝑣] 𝑇 − 𝐹 𝑇𝑣 𝐹 𝑠 𝑇,𝑣 , 𝐹 𝑝 (𝑇,𝑣) 𝐸 𝑇 𝐸 𝑣 𝐸 𝑇𝑣 2012/07/19 CONFIDENTIAL

14 Summary Property calculation methods which are based upon interpolated values of the thermodynamic potentials can achieve high accuracy and consistency while substantially reducing the computational time required as compared to conventional iterative methods. More work remains to be done to extend these methods to other regions of the phase space. 2012/07/19 CONFIDENTIAL

15 Thank you. Any questions? 2012/07/19 CONFIDENTIAL


Download ppt "Fast Refrigerant Property Calculations"

Similar presentations


Ads by Google