Paper On Development of MATLAB Code For Finding Surface Tension
Paper On Development of MATLAB Code For Finding Surface Tension
This paper was prepared for presentation at the SPE Middle East Oil and Gas Show and Conference held in Manama, Bahrain, 25–28 September 2011.
This paper was selected for presentation by an SPE program committee following review of information contained in an abstract submitted by the author(s). Contents of the paper have not been reviewed
by the Society of Petroleum Engineers and are subject to correction by the author(s). The material does not necessarily reflect any position of the Society of Petroleum Engineers, its officers, or
members. Electronic reproduction, distribution, or storage of any part of this paper without the written consent of the Society of Petroleum Engineers is prohibited. Permission to reproduce in print is
restricted to an abstract of not more than 300 words; illustrations may not be copied. The abstract must contain conspicuous acknowledgment of SPE copyright.
Abstract
One of the most striking demonstrations of intermolecular forces is the tension at the surface of liquid n-alkanes. The prediction of
surface tension is important in the design of distillation towers, extraction units and tower internals such as bubble caps and trays,
since it has a considerable influence on the transfer of mass and energy across interfaces. Surface tension data are needed wherever
foaming emulsification, droplet formation or wetting are involved. They are also required in a number of equations for two-phase
flow calculations and for determining the flow regime. Petroleum engineers are especially interested in the surface tension in the
extraction of crude oil to add surfactants to modify the interfacial properties between crude oil and the geological reservoir to
improve production and increase oil yields. In this work, a simple computer program using Arrhenius-type asymptotic exponential
function, Vandermoned matrix and Matlab technical computing language, is developed for the estimation of surface tension of
paraffin hydrocarbons as a function of molecular weight and temperature. The surface tension is calculated for temperatures in the
range of 250 to 440 K and paraffin hydrocarbons molecular weights between 30 and 250. The proposed numerical technique is
superior owing to its accuracy and clear numerical background, wherein the relevant coefficients can be retuned quickly if more
data become available in the future. Estimations are found to be in excellent agreement with the reliable data in the literature
1. Introduction
Surface tension is an important property used in the design of fractionators, absorbers, two-phase pipelines, petroleum reservoir
engineering calculations, and it is an important property where foaming, wetting, emulsification, and droplet formation are likely
to occur [1][2]. Numerous methods have been proposed to estimate the surface tension of pure liquids and liquid
mixtures [3][4]. One of the simplest is the empirical formula proposed by Macleod [5] which expresses the surface
tension of a liquid in equilibrium with its own vapor as a function of the liquid and vapor phase densities. However,
Sugden [6][7] modified this expression as a function of a temperature-independent parameter, parachor, and indicated
a way to estimate it from molecular structure. Quayle [8] used experimental surface tension and density data for
numerous compounds to calculate the parachors of hydrocarbons. It has been shown that the parachor is a weak
function of temperature for a variety of fluids and within wide range of temperatures [5][6][7][8], and thus it is
generally assumed to be a constant. The good performance and extreme simplicity of its analytical form have made
Macleod equation [5] a very popular method for surface tension calculation [9] [10][11][12][13]. Nevertheless, there
are various shortcomings for the application of this equation: (1) the parachor is actually a temperature-dependent
parameter whose functional form with temperature was not known, (2) the empirical nature of parachor poses
difficulty in deriving a more accurate expression for it, and (3) the absolute average percent deviation in surface
tension prediction increases with increasing complexity of the molecular structure of fluid under consideration [14].
Macleod's empirical expression for surface tension calculation has proven to work very well for many substances and
over a wide range of temperature. Nonetheless, deviations with respect to temperature are generally observed. Thus,
efforts should be made to derive the functionality of surface tension with respect to temperature. The bottom-line is
that methods of physical properties should be sought only in terms of independent variables such as temperature,
In view of the above mentioned issues, it is necessary to develop an accurate and simple method which is easier than
existing approaches less complicated with fewer computations for predicting the paraffin hydrocarbons surface tension
as a function of molecular weight and temperature using Matlab [16] technical computing language. The paper
discusses the formulation of such equations in a systematic manner along with a sample example to show the
simplicity of the model and usefulness of such tools.
SPE 140741 3
The primary purpose of the present study is to accurately correlate the paraffin hydrocarbons surface tension as a
function of molecular weight and temperature. This is done by a simple method using an Arrhenius-type asymptotic
exponential function with a small modification of the Vogel-Tammann-Fulcher (VTF) equation (Vogel, [17] Tammann
This is important, because such an accurate and mathematically simple method of the paraffin hydrocarbons surface
tension as a function of molecular weight and temperature is required frequently for the quick engineering calculations
to avoid the additional computational burden of complicated calculations. The VTF equation is an asymptotic
E
ln f = ln( f c ) − (1)
R (T − Tc )
In equation 2, f is a properly defined temperature-dependent parameter, the units for which are determined individually
for a certain property; fc is a pre-exponential coefficient, having the same unit of the property of interest; T and Tc are
the actual temperature and the characteristic-limit temperature, respectively (both given in degrees Kelvin); E is
referenced as the activation energy of the process causing parameter variation (given in units of J/kmol); and R is the
universal gas constant (R ) 8.314 J/(kmol K)). A special case of the VFT equation for Tc = 0 is the well-known
For the purpose of the present application which involves the method of paraffin hydrocarbons surface tension as a
function of molecular weight and temperature e, the VTF equation has been modified in the following form by adding
b c d
ln f =ln f c + + +
T −Tc (T −T ) 2 ( T −T )3 (2)
c c
In equation 2, Tc has been considered zero to convert equation 2 to the well-known Arrhenius equation [20] type.
4 SPE 140741
b c d
ln f = ln f c + + 2 + 3 (3)
T T T
The required data to develop this method includes the reported data [21][22] for the loss paraffin hydrocarbons surface
tension as a function of molecular weight and temperature. The following methodology has been applied to develop
this method.
Vandermonde matrix is a matrix with the terms of a geometric progression in each row, i.e., an m × n matrix (Horn and
Johnson, 1991).
(4)
Or
V i , j = α i j −1 (5)
For all indices i and j, the determinant of a square Vandermonde matrix (where m=n) can be expressed as [23]:
det (V)= ∏ (α
1≤i < j ≤ n
j − αi ) (6)
The Vandermonde matrix evaluates a polynomial at a set of points; formally, it transforms coefficients of a polynomial
a 0 + a1 x + a 2 x 2 + ... + a n −1 x n −1 to the values the polynomial takes at the point’s αi. The non-vanishing of the
Vandermonde determinant for distinct points αi shows that, for distinct points, the map from coefficients to values at
those points is a one-to-one correspondence, and thus that the polynomial interpolation problem is solvable with
unique solution; this result is called the unisolvence theorem (Fulton and Harris 1991). They are thus useful in
SPE 140741 5
polynomial interpolation, since solving the system of linear equations Vu = y for u with V an m × n Vandermonde
n −1
P(x ) = ∑ u j x j (7)
j =0
The Vandermonde matrix can easily be inverted in terms of Lagrange basis polynomials: each column is the
coefficients of the Lagrange basis polynomial, with terms in increasing order going down. The resulting solution to the
The required data to develop this method includes the reported data [21][22][25] for the loss of paraffin hydrocarbons
surface tension as a function of molecular weight and temperature. The following methodology has been applied to
develop this method. Firstly, surface tensions of paraffin hydrocarbons are correlated as a function of temperature for
several molecular weights then, the calculated coefficients for these equations are correlated as a function of molecular
weight. The derived equations are applied to calculate new coefficients for equation (9) to predict surface tensions of
paraffin hydrocarbons. Table 1 shows the tuned coefficients for equations (10) to (13) for predicting surface tensions
of paraffin hydrocarbons. In brief, the following steps are repeated to tune the method's coefficients [26][27]:
1. Correlate the surface tensions of paraffin hydrocarbons as a function of temperature (T) for a given molecular
weight.
3. Correlate corresponding polynomial coefficients, which were obtained for different temperature versus molecular
Equation 9 represents the proposed governing equation in which four coefficients are used to correlate the paraffin
6 SPE 140741
hydrocarbons surface tensions as a function of temperature (T) for a given molecular weight where the relevant
b c d
ln(σ ) = a + + 2 + 3 (9)
T T T
Where:
B1 C1 D
a = A1 + + 2 + 13 (10)
M M M
B2 C 2 D 2
b = A2 + + + (11)
M M M
B3 C 3 D
c = A3 + + 2 + 33 (12)
M M M
B4 C 4 D
c = A4 + + 2 + 43 (13)
M M M
These optimum tuned coefficients help to cover the temperatures in the range of 230 to 420 K and molecular weight
ranging between 30 and 240. The optimum tuned coefficients given in Table 1 can be further retuned quickly
In this work, our efforts directed at formulating a method can be expected to assist engineers for rapid calculation of
surface tensions of paraffin hydrocarbons as a function of temperature (T) and molecular weight (M) using an
exponential function. The proposed novel tool developed in the present work is simple and unique expression which is
non-existent in the literature. Furthermore, the selected exponential function to develop the tool leads to well-behaved
(i.e. smooth and non-oscillatory) equations enabling reliable and more accurate predictions.
3. Results
Figure 1 shows a snap shot of developed Matlab-based Computer Program. Figures 2 and 3 show the results from the
proposed method to predict the surface tensions of paraffin hydrocarbons for temperatures ranging between -40 to
150°C and molecular weights in the range of 30 to 240 in two different view points. Table 2 illustrates the accuracy of
SPE 140741 7
proposed method for predicting the surface tension of paraffin hydrocarbons in comparison with some reported data
[21][22][25]. The accuracy of method in terms of average absolute deviation is 1.85%. Table 3 illustrates the accuracy
of proposed method for predicting the surface tension of paraffin hydrocarbons in comparison with some reported data
in the literature [25][28][29][30][31]. The accuracy of method in terms of average absolute deviation is around 1%. It
is expected that our efforts in formulating a simple tool in this investigation will pave the way for arriving at an
accurate prediction of surface tension of paraffin hydrocarbons at various conditions which can be used by practice
engineers and scientists for monitoring the key parameters periodically. The proposed tool has been developed using
Matlab technical computing language [16] and it works for temperatures in the range of 230 to 420 K and molecular
weights of paraffin hydrocarbons ranging between 30 and 240. Typical example is given below to illustrate the
simplicity associated with the use of proposed method for rapid estimation of surface tension of paraffin hydrocarbons.
The tool developed in this study can be of immense practical value for engineers and scientists to have a quick check
of surface tension on the paraffin hydrocarbons at various conditions without opting for any experimental
measurements. In particular, chemical and process engineers would find the approach to be user-friendly with
3.1 Example:
Calculate surface tension of a paraffin liquid hydrocarbon with molecular weight 100 (N-heptanes) and at 40°C:
Solution:
T=40+273.15=313.15 K
a= -1.3935396617 × 101 (from equation 10)
4. Conclusions:
In this work, simple-to-use equations, which are easier than existing approaches less complicated with fewer
8 SPE 140741
computations and suitable for process and petroleum engineers, are presented here for the estimation of surface
tensions of paraffin hydrocarbons as a function of temperature and molecular weight. Unlike complex mathematical
approaches for estimating surface tensions of paraffin hydrocarbons, the proposed method is simple-to-use and would
be of immense help for process engineers especially those dealing with hydrocarbon processing. Additionally, the level
of mathematical formulations associated with the estimation of surface tensions can be easily handled by an engineer
or practitioner without any in-depth mathematical abilities. Example shown for the benefit of engineers clearly
demonstrates the simplicity and usefulness of the proposed tool. Furthermore, estimations are quite accurate as
evidenced from the comparisons with literature data (with average absolute deviation being less than 2%) and would
help in attempting design and operations modifications with less time. The proposed method has clear numerical
background, wherein the relevant coefficients can be retuned quickly if more data are available in the future.
Nomenclatures:
A: Tuned coefficient
B: Tuned coefficient
C: Tuned coefficient
D: Tuned coefficient
E: The activation energy of the process causing parameter variation (J/kmol);
f : a properly defined temperature-dependent parameter, the units for which are determined individually for a certain
property;
fc is a pre-exponential coefficient, having the same unit of the property of interest;
i: index
j: index
m : matrix row index for m × n matrix
M: Molecular weight
n: matrix column index for m × n matrix
P: Polynomial
T: Temperature, K
Tc : The characteristic-limit temperature, K
R : The universal gas constant (R ) 8.314 J/(kmol K)).
σ : Surface tension, mN/m
α : Matrix element
SPE 140741 9
u: coefficient of polynomial
V: Vandermonde matrix
References:
[1] Miqueu, C., Mendiboure, B. Graciaa, A. and Lachaise J. Petroleum mixtures: An efficient predictive method for
[2] Queimada, A.J. Rolo, L.I. Caço, A.I. Marrucho, I.M. . Stenby, E.H Coutinho J.A.P. Prediction of viscosities
and surface tensions of fuels using a new corresponding states model, Fuel, 2006 ; 85: 874-877
[3] Drelich, J. and Miller J. D., Surface and interfacial tension of the Whiterocks bitumen and its relationship to
bitumen release from tar sands during hot water processing, Fuel, 1994;73: 1504-1510
[4] B.Venkata Rao, M.C. Kakati, P.G. Rao User interactive computer program for estimation of Watson
characterization factor and surface tension of undefined petroleum fractions, Fuel, 1991; 70;1991: 795-797
[5] Macleod, D.B., Relation between surface tension and density, Trans. Faraday Soc., 1923; 19: 38.
[6] Sugden, S. The Variation of surface tension with temperature and some related functions”, J. Chem. Soc.,
1924;125: 32.
[7] Sugden, S. A relation between surface tension, density, and chemical composition, J. Chem. Soc. 1924; 125:
1177–1189.
[8] Quayle, O.R., The parachors of organic compounds, Chem. Rev. 1953; 53: 439–585.
[9] Weinaug, C.F., and D.L. Katz, Surface tensions of methane-propane mixtures," Ind. Eng.Chem., 1943; 35: 239.
[10] Hugill, J.A., and van Welsenes, A.J. Surface Tension: A simple method for natural Gas + condensate systems,
[11] Gasem, K.A.M., P.B. Dulcamara, B.K. Dickson, and R.L. Robinson, Jr., Test of prediction methods for interfacial
tensions of CO2 and ethane in hydrocarbon solvents," Fluid Phase Equilibria. 1989; 53: 39.
[12] Fanchi, J.R., Calculation of parachors for compositional simulation: an update," SPE Reservoir Eng. J., 1990, 433.
[13] Ali, J.K., Prediction of parachors of petroleum cuts and pseudocomponents," Fluid Phase Equilibria., 1994; 95:
383.
10 SPE 140741
[14] Escobedo, J., and Mansoori, G.A., Surface tension prediction for pure fluids”, AIChE Journal, 1996; 42 (5):
1425-1433.
[15] Civan, F. Use exponential functions to correlate temperature dependence, Chemical Engineering Progress, 2008;
[16] MATLAB software, Version 7.6.0.324, The MathWorks, Inc, MA, USA, 2008.
[17] Vogel, H., Das temperature-abha¨ngigketsgesetz der viskosita¨t von flu¨ssigkeiten. Phys. Z. 1921;22:645-646.
[18] Tammann, G. Hesse, W., Die abha¨ngigkeit der viskosita¨t von der temperature bei unterku¨hlten flu¨ssigkeiten.
[19] Fulcher, G. S. , Analysis of recent data of the viscosity of glasses. J. Am. Ceram. Soc., 1925; 8: .339-355.
[20] Arrhenius, S., 1889, Uber die reaktionsgeschwindigkeit der inversion von rohrzucker durch saeuren. Z. Phys.
[21] GPSA Engineering Data Book, 12th Ed. Gas Processors Suppliers Association, Tulsa, OK USA 2004.
[22] Katz, D.L. Monroe, R.R. and Trainer R.P., Surface tension of crude oils containing dissolved gases, AIME,
[23]Horn, R. A. and Johnson C. R., Topics in matrix analysis, Cambridge University Press. Section 6.1, UK 1991.
[24] Fulton, W.; Harris, J., Representation theory. A first course, Graduate Texts in Mathematics, Readingsin
[25] Jasper J. J. and Kring, E. V The isobaric surface tensions and thermodynamic properties of the surfaces of a
[26] Bahadori A. and Vuthaluru H. B., Method for an accurate estimation of carbon dioxide transport properties,
[27] Matlab software, The MathWorks, Inc., Version 7.6.0.324, MA, USA 2008.
[28] Queimada, A.J. Silva, F. A.E. Caçoa, A. I. Marrucho I. M. and, Coutinho, J. P. Measurement and modeling of
surface tensions of asymmetric systems: heptane, eicosane, docosane, tetracosane and their mixtures, Fluid Phase
Equilibria 2003 ; 214: 211–221
SPE 140741 11
[29] Jasper, J., The Surface Tension of Pure Liquid Compounds J. Phys. Chem. Ref. Data 1972;1 (4) : 841–948.
[30] Rolo, L. I. Cacü A. I. . Queimada, A. J Marrucho, I. M. and. Coutinho, J. A. P, Surface Tension of Heptane,
Decane, Hexadecane, Eicosane, and Some of Their Binary Mixtures, J. Chem. Eng. Data 2002; 47: 1442-1445.
[31] McLure, I., Sipowska, J. and Pegg, I., Surface Tensions of (an alkanol+an alkane) 1.Propan-1-ol + heptane
Value
Coefficient
1
A1 1.4533851511745 × 10
3
B1 -3.566784747107 × 10
5
C1 1.612520992827 × 10
6
D1 -8.9266105865786 × 10
3
A2 -9.7583129667822 × 10
6
B2 2.7812788879690 × 10
C2 -1.0679264826168 × 10 8
9
D2 6.0896474940908 × 10
A3 2.9276256778760 × 10
6
B3 -7.6092394098361 × 10
8
C3 2.4336871495109 × 10
10
D3 -1.3903544950612 × 10
12
8
A4 -2.9482231725508 × 10
10
B4 7.20742048653290 × 10
12
C4 -1.9662175686654 × 10
14
D4 1.0689869316790 × 10
12 SPE 140741
100 170 n − C12 H 26 18.49 18.28 Jasper and Kring, [25] 1.15
Temperature= -5°C
Surface Tension, mN/m
1
10
Temperature= 200°C
0
10 2
10
Molecular weight
Figure 2 Performance of model for prediction of surface tensions of paraffin hydrocarbons using new proposed method
SPE 140741 17
0 5 10 15 20 25
30
S u rface T en sio n , (m N )/m
25
20
15
10
0
250
200 500
150 450
100 400
350
50 300
Paraffin Hydrocarbon Molecular Weight Temperature, K
0 250
Figure 3 Performance of model for prediction of surface tensions of paraffin hydrocarbons in another view point