Microsoft Word - HJIC 2015 43(2) 55-101.docx HUNGARIAN JOURNAL OF INDUSTRY AND CHEMISTRY Vol. 43(2) pp. 67–71 (2015) hjic.mk.uni-pannon.hu DOI: 10.1515/hjic-2015-0011 COMPARISON OF TWO VARIABLE INTERPOLATION METHODS FOR PREDICTING THE VAPOUR PRESSURE OF AQUEOUS GLYCEROL SOLUTIONS ISTVÁN SZALKAI, 1* ATTILA SEBESTYÉN, 2, † BIANCAMARIA DELLA-VECCHIA, 3 TAMÁS KRISTÓF, 4 LÁSZLÓ KÓTAI, 5 AND FERENC BÓDI6 1 Department of Mathematics, University of Pannonia, Veszprém, 8201, HUNGARY 2 Department of Inorganic Chemistry, University of Pannonia, Veszprém, 8201, HUNGARY 3 Dipartimento di Matematica, Istituto G. Castelnuovo, Universita degli Studi di Roma ‘La Sapienza’, Rome, 00185, ITALY 4 Department of Physical Chemistry, University of Pannonia, Veszprém, 8201, HUNGARY 5 Institute of Materials and Environmental Chemistry, Research Centre for Natural Sciences, Hungarian Academy of Sciences, PO Box 17, Budapest, 1525, HUNGARY 6 Faculty of Engineering, University of Pannonia, Veszprém, 8201, HUNGARY Several general mathematical methods for approximating two variable functions are applied for the study of the relationships between the temperature, concentration, and vapour pressure of aqueous glycerol solutions. The general properties of each of the applied methods are discussed in respect of possible alternative applications. Keywords: vapour-pressure approximation, splines, glycerol, aqueous solutions, multi-dimensional interpolation 1. Introduction Recently, the evaporation of aqueous solutions with low glycerol concentrations from the combined processes of ion-exchange and chemisorption of diluted solutions is preferred instead of the expensive purification of concentrated glycerol solutions. These processes are important in the cosmetic industry [1–3]. During the atmospheric evaporation of highly concentrated glycerol solutions, glycerol molecules condense by losing water and convert into acrolein or polyglycerols. Thus, the control of the appropriate temperature and pressure limits is of great importance in industrial processes. In the present work, mathematical relationships with regard to concentration, vapour pressure, boiling point, and temperature data are studied for aqueous glycerol solutions. The possibilities for data interpolation using several two variable spline- interpolation methods are investigated with the aim of calculating low pressure evaporation conditions and upper temperature limits for aqueous glycerol solutions with given concentrations as a continuation of our previous work [4, 5]. *Correspondence: szalkai@almos.uni-pannon.hu †Deceased in 2001. 2. Data and Methods We use the data shown in Table 1 that were taken from Ref. [6]. The dataset is graphically presented in Fig.1. Approximating a two valued function means that we are given the measured values zi, j ∈ R at the measured points Pi, j = (xi, yj) for 1 < i < M, 1 < j < N and we want to construct a smooth function S: R2 → R such that S(xi, yj) = zi, j for 1 < i < M, 1 < j < N. In the present paper we considered the following general approximation methods: • iterated one-dimensional (1D) cubic splines [8], • Hermite type, two-dimensional (2D) interpolation, improved by Lénárd in three versions [10-12], and • Shepard’s generalised method for a scattered dataset with certain parameters in two versions [15, 17]. These methods are general approximation methods that are applicable not only to the present problem. When discussing the errors in computer outputs, we differentiate between general mathematical and chemical (material) specific reasons. In order to test the practical applicability of these methods we used every second column of the original dataset (Table 1, pressures of 5.3, 20.2, ..., 101.3 kPa) as inputs, then we computed the approximations for the omitted columns, and finally we compared the computed values to the measured data from Table 1 in the omitted columns (13.3, 26.6, ..., 93.3). These SZALKAI, SEBESTYÉN, DELLA-VECCHIA, KRISTÓF, KÓTAI, AND BÓDI Hungarian Journal of Industry and Chemistry 68 approximations and comparisons are shown in Table S1 (not included in the paper due to its size) and are graphically summarised in Figs.2–6. We did not consider specific semi-empirical relationships such as those in Ref. [7]: ln(p) = A(c) ⋅ ta(c), where p, c, and t stand for pressure (MPa), concentration (%), and temperature (ºC), respectively. 2.1. Iterated One-Dimensional Interpolations In Refs. [8] and [9], one finds the well-known method of two variable spline interpolations, which repeatedly uses 1D spline interpolations. The details can be found in Ref. [2] as well. This method requires that the domain of the function we are approximating is rectangular [a, b] × [c, d]. Furthermore, the measured points Pi, j lie on lines ℓj parallel to the ordinate axis for 1 < j < N. For calculating S(x, y) at each inner point (x, y) ∈ [a, b] × [c, d] we follow a two-step calculation. First, we use 1D splines sj in each horizontal line ℓj to compute the values ℓj(x, yj) = sj(x) for 1 < j < N. Next, we use another 1D spline along the vertical line crossing the point (x, y). Then, we calculate the value S(x, y) using the numbers ℓj(x, yj) for 1 < j < N and a 1D spline on them. In practice we can compute all the formulae of the splines sj in advance, so later the values of sj(x) can be obtained by an easy substitution. In our computations, we used cubic splines as described in Refs. [2], [8] and [9]. The approximating function S(x, y) for our glycerol data is plotted in Fig.2, detailed numeric values can be found in Table S1. The similarity between Figs.1 and 2 shows the small error of iterated 1D spline interpolation, while magnification can reveal some differences. The advantages of this method include that the 1D approximation is widely known, no equidistance tabulated (measured) points yj or xi are needed, and only the parallel lines ℓj are assumed. The method also gives an approximation at the margins of the closed rectangle [a, b]×[c, d] and it can be easily generalised for higher dimensions. A disadvantage of this method is the repeated use of the final spline approximation (“vertical step”) for getting S(x, y) at each point (x, y), which makes the computation slightly slower. We repeatedly have to build up and solve a tridiagonal N×N size system of linear equations. 2.2. Direct Two-Dimensional Interpolations In Ref. [10], one can find simple, but general direct 2D methods for constructing directly a 2D spline interpolation of minimal degree of Hermite type, invented by Lénárd. She investigated 2D and higher dimensional methods as discussed also in Refs. [2], [11], and [12]. This method requires that the dataset (measured data points) form a rectangular grid, i.e. each quadruple of Table 1. The measured boiling points (in ºC) of aqueous glycerol solutions as a function of pressure (kPa) and concentration (mass percent, g g-1) as in Table 44 of Ref. [6]. conc. pressure 5.3 13.3 20.2 26.6 33.3 39.9 46.6 53.3 59.9 66.6 73.3 79.9 86.6 93.3 101.3 0% 34.0 51.6 60.1 66.4 71.6 75.9 79.6 82.9 85.9 88.7 91.2 93.5 95.7 97.7 100.0 10% 34.4 52.1 60.7 67.0 72.3 76.6 80.3 83.7 86.7 89.5 92.0 94.3 96.6 98.6 100.9 20% 34.9 52.7 61.3 67.7 73.0 77.3 81.1 84.4 87.5 90.3 92.9 95.2 97.4 99.5 101.8 30% 35.5 53.4 62.1 68.6 73.8 78.2 82.0 85.3 88.4 91.3 93.8 96.2 98.4 100.4 102.8 40% 36.5 54.4 63.1 69.5 74.9 79.3 83.1 86.4 89.5 92.4 95.0 97.3 99.6 101.7 104.0 50% 37.5 55.7 64.5 71.1 76.4 80.9 84.8 88.2 91.3 94.2 96.8 99.2 101.5 103.6 106.0 60% 39.5 58.0 66.9 73.5 79.0 83.5 87.4 90.9 94.1 97.0 99.7 102.1 104.4 106.0 109.0 70% 43.0 61.7 70.8 77.6 83.1 87.7 91.7 95.2 98.4 101.4 104.1 106.6 109.0 111.1 113.6 80% 49.1 68.2 77.4 84.3 90.0 94.6 98.7 102.3 105.6 108.7 111.4 113.9 116.3 118.5 121.0 90% 59.5 80.2 90.3 97.7 103.9 109.1 113.5 117.4 121.0 124.4 127.4 130.2 132.8 135.2 138.0 Figure 1. The original dataset from Table 1. Figure 2. Estimated boiling points from iterated 1D splines. INTERPOLATION METHODS FOR PREDICTING VAPOUR PRESSURE 43(2) pp. 67–71 (2015) DOI: 10.1515/hjic-2015-0011 69 { (xi, yj), (xi+1, yj), (xi, yj+1), (xi+1, yj+1) } (1) forms a rectangle, but not necessarily of the same size. Ref. [11] requires equidistant grids. The problem associated with this is discussed in Ref. [2]. The method we currently use is from Ref. [10] that gives us separate formulae for each rectangle in Eq.(1) as S(x, y) = Si, j(x, y) if (x, y) ∈ [xi, xi+1] × [yj, yj+1] (2) such that finally a) S is twice continuously partially differentiable in both variables on its whole domain [a, b]×[c, d], b) Si, j values are polynomials in both variables of minimal degree and their degrees, as two variable polynomials, are minimal, too. Moreover, Lénárd provided three different formulae for points a) and b) with the details described in Eqs.(1,3), (2,3), and (3,3) of Ref. [10]. The implementation of each of these three methods with numeric values can be found in Table S1. The differences among the approximated results using these methods are not so significant, so we present here the plot only for the results of the first method in Fig.3. The similarity between Figs.1 and 3 shows the small error of Lénárd’s Hermite-type interpolation. An advantage of this method is that although the precomputation of the higher dimensional arrays takes some time, S(x, y) can then be computed as a polynomial at any point (x, y), making the computation fast. Furthermore, the method can be easily generalised for higher dimensions as described in Ref. [12]. One disadvantage of this method is that we ultimately need rectangular tabulated, measured data points, Pi, j = (xi, yj). If required, the data points can be transformed to form an equidistant grid, i.e. the rectangles in Eq.(1) would become congruent as in Ref.[2], for example. Furthermore, the method gives no approximation at certain margins of the rectangle [a, b]×[c, d], since we cannot compute the finite partial differences of higher order at the margins. 2.3. Shepard’s Method In Ref.[13], Shepard presented a more general method for continuous approximation in any dimension as was also discussed in Refs. [14–17]. This method does not require any special assumption on the positions of the data points Pi, j∈Rn as it works for arbitrary distribution as well. This method can be introduced as follows: Let the arbitrary measured data points P1, P2, ..., PM ∈Rn and the corresponding values F1, F2, ..., FM ∈R be given. Then the formula for each P∈Rn U (P) = Fi ⋅σ d(P,Pi )( ) i=1 M ∑ σ d(P,Pi )( ) i=1 M ∑ (3) gives a continuous and exact approximation: U(Pi) = Fi for any i≤M (4) where d(P, Pi) is the Euclidean distance of the points P and Pi and the positive “weight function” σ:R→R+ satisfies lim d→0+ σ d( ) = +∞ and lim d→+∞ σ d( ) = 0+ . (5) In other words, U(P) is a weighted arithmetic mean of the measured values Fi with weights, which are “inverses” of the distances of points Pi from point P. The closer Pi is to P, the greater weight F has in Eq.(3). Theoretical and practical considerations in Refs. [15] and [17] suggest σ to be chosen as Figure 3. Estimated boiling points from Lénárd’s Hermite-type interpolation. Figure 4. Estimated boiling points from Shepard’s method. SZALKAI, SEBESTYÉN, DELLA-VECCHIA, KRISTÓF, KÓTAI, AND BÓDI Hungarian Journal of Industry and Chemistry 70 σ d( ) = d−α ⋅e−λd (6) for some "appropriate" α, λ ≥ 1, usually 1 ≤ α, λ ≤ 2 are satisfactory in practice. This problem is discussed in detail in Refs. [14–17]. In our present calculations, we used the values α = λ = 1. The approximating function U(P) of Shepard’s method is shown in Fig.4, detailed numeric values can be found in Table S1. It is worth noting that the wave-like patterns on the surface in Fig.4 show the unique property of Shepard's interpolation (see References [15] and [17] for details). The main advantage of Shepard’s method is the simplicity of Eq.(3), which makes both theoretical investigations and practical computations easy. Furthermore, the measured points P1, P2, ..., PM ∈ Rn can be chosen totally arbitrarily, which may be of great assistance during measurements. However, an important disadvantage of this method is that σ and thus U are sensitive to the measurement units, MPa or kPa in our case. Though U is always continuous and Eq.(4) is valid for any σ, which satisfies Eq.(5), the “shape” of U is the best when the distribution of the data points Pi is “nearly” uniform in a region of Rn (see Ref. [17]). To improve our approximation we used data expressed in kPa in Table 1. Moreover, larger data sets slow down the processing of Eq.(3) greatly, even when M ≈ 150 the computational time can be several minutes. A workaround for managing this problem is to deal only with the data points Pi closest to P. In our example with aqueous glycerol solutions, we used 4×4 matrices of data points againts pressure and concentration, respectively, surrounding the requested approximated point. This approximation greatly speeded up the execution times. The continuity property of U in this variant is discussed in Refs. [15] and [16]. 3. Discussion For an alternative comparison of the methods considered in this paper, we present Figs.5 and 6. In Fig.5, we displayed the boiling points for different fixed concentrations. In Fig.6, the pressure is examined. Iterated 1D splines are the dashed-dotted lines, Lénárd’s Hermite-type 2D spline is the dashed line, and Shepard’s method is shown in dotted lines. As can be seen, Lénárd’s and iterated splines are practically undistinguishable. It seems that Shepard’s method works less well than the other two methods. We can see this from the 3D plot (Fig.4) with the effect of the flattening being evident. Also it is evident from the 2D plot (Fig.6) with constant concentration, where estimation in the middle (supposed missing) points is poor (plotted as squares). The flattening effect is again evident from the 2D plot (Fig.5) with constant pressure. 4. Conclusion We conclude that although Shepard’s method represented by Eqs.(3) and (4) is an easy approximating method for the measured data, it is extremely sensitive for the large and small distances among the data points. For data sets situated in a rectangular grid (as in Table 1), spline methods are more accurate. SYMBOLS zi, j measured values in 2D Fi measured values in ‘n’-dimension Pi, j measured points in 2D Pi measured points in ‘n’-dimension S approximating function in 2D U approximating function in ‘n’-dimension σ weight function in Shepard’s method Figure 6. Boiling point dependence on glycerol vapour pressure as a function of concentration. Figure 5. Boiling point dependence on glycerol concentration as a function of vapour pressure. INTERPOLATION METHODS FOR PREDICTING VAPOUR PRESSURE 43(2) pp. 67–71 (2015) DOI: 10.1515/hjic-2015-0011 71 Acknowledgement The research is supported by the European Union and co-funded by the European Social Fund, “Telemedicine- focused research activities in the field of Mathematics, Informatics and Medical Sciences”, project number: TÁMOP-4.2.2.A-11/1/KONV-2012-0073. Supporting Information Table S1 can be downloaded free of charge from math.uni-pannon.hu/~szalkai/HJIC-16-Table2-150110.xls. REFERENCES [1] Isahak, W.N.R.W.; Ramli, Z.A.C.; Ismail, M.; Jahim, J.M.; Yarmo, M.A.: Recovery and purification of crude glycerol from vegetable oil trans-esterification, Sep. Purif. Rev., 2015, 44(3), 250–267 DOI:10.1080/15422119.2013.851696 [2] Ardi, M.S.; Aroua, M.K.; Hashim, N.A.: Progress, prospect and challenges in glycerol purification process: A review, Renewable Sustainable Ene. Rev., 2015, 42, 1164–1173 DOI: 10.1016/j.rser.2014.10.091 [3] Hunsom, M.; Autthanit, C.: Adsorptive purification of crude glycerol by sewage sludge-derived activated carbon prepared by chemical activation with H3PO4, K2CO3 and KOH, Chem. Eng. J., 2013, 229, 334–343 DOI: 10.1016/j.cej.2013.05.120 [4] Szalkai, I.; Sebestyén, A.; Kótai, L.; Bódi, F.: Comparison of interpolation methods for predicting the vapour pressure of aqueous glycerol solutions, Proc. 42nd Annual Conf. Canadian Soc. Chem. Engng., Toronto, Canada, 1992, pp. 279– 280 math.uni-pannon.hu/~szalkai/Szalkai-1992c-konfTor.pdf [5] Szalkai, I.; Sebestyén, A.; Kótai, L.; Bódi, F.: Comparison of interpolation methods for predicting the vapour pressure of aqueous glycerol solutions, Preprint No. 036 (University of Veszprém, Veszprém, Hungary) 1995 math.uni- pannon.hu/~szalkai/Szalkai-1995Preprint-Glic.pdf [6] Kiss B.: Plants oil industry and household tables (Mezőgazdasági Kiadó, Budapest, Hungary) 1988 (in Hungarian) [7] Saburov, A.G.; Vasilienec, I.M.; Postolov, J.M.; Klibov, N.P.: Numerical formulae for thermodynamic properties of aqueous glycerol solutions, Mashlo-Khim. Promusl., 1987, 21–22 (in Russian) [8] Djuric, M.; Ranogajec, J.; Marinkov-Neducin, R.: Predicting of floor tiles behaviour by using two- dimensional spline interpolation, Hung. J. Ind. Chem., 1992, 20(1), 39–44 [9] Press, W.H.; Flannery, B.P.; Teukolsky, B.P.; Vetterling, W.T.: Numerical recipes - The art of scientific computing (Cambridge Univ. Press, Cambridge, UK) 1985 [10] Lénárd M.: On the two-dimensional spline interpolation of Hermite-type, Colloquia Math. Soc. J. Bolyai, 1985, 49, 531–541 [11] Lénárd M.: Spline interpolation in two variables, Studia Sci. Math. Hung., 1985, 20, 145–154 [12] Lénárd M.: On an N-dimensional quadratic spline approximation, J. Approx. Theory, 1992, 68(2), 113–135 DOI: 10.1016/0021-9045(92)90088-6 [13] Shepard D.: A two dimensional interpolation function for irregularly spaced data, Proc. 23rd ACM Nat. Conf., New York, NY, USA, 1968, pp. 517–524 DOI: 10.1145/800186.810616 [14] Gordon, W.J.; Wixon J.A.: Shepard’s method of "Metric Interpolation" to bivariate and multivariate interpolation, Math. Comp., 1978, 32(141), 253– 264 DOI: 10.1090/S0025-5718-1978-0458027-6 [15] Szalkai I. : Scattered data interpolation via improved Shepard’s method, Preprint No. 76. (University of Veszprém, Veszprém, Hungary) 1999 math.uni- pannon.hu/~szalkai/Szalkai-1999Preprint-Shepard.pdf [16] Allasia G.: A class of interpolating positive linear operators: theoretical and computational aspects, in Approximation Theory, Wavelets and Approximation, (Ed.: Singh S.P., Kluwer Publ., Dordrecht, The Netherlands) 1995, pp. 1–36 DOI: 10.1007/978-94-015-8577-4 [17] Della-Vecchia, B.; Szalkai I.: Finding better weight functions for generalised Shepard’s operator on infinite intervals, Int. J. Comp. Math., 2011, 88(13), 2838–2851 DOI: 10.1080/00207160.2011.559542