Laboratory Exercise No. 13 Vapor Pressure Data Representation by Polynomials and Equations 1. Objective(s): The The acti activi vity ty aims aims to solv solvee regr regres essi sion on of poly polyno nomi mial alss of vari variou ouss degr degree ees, s, line linear ar regr regres essi sion on of mathe mathemat matica icall models models with with variab variable le transf transform ormati ation onss and and nonli nonlinea nearr regres regressio sionn with with the use of polynomi polynomials, als, a modified modified Clausius-Clap Clausius-Clapeyron eyron equation, equation, and the Antoine Antoine equation equation to model model vapor vapor pressure versus temperature data. 2. Intended Learning Outcomes (ILOs): The students shall be able to: 2.1 solve regression regression of polynomials polynomials of of various degrees. degrees. 2.2 apply linear linear regression of mathematical models with variable variable transformations. transformations. 2.3 2.3 appl applyy nonl nonlin inea earr regr regres essi sion on with with the the use use of poly polyno nomi mial alss to mode modell vapo vaporr pres pressu sure re vers versus us temperature data. 3. Discussion : Vapor pressure or equilibrium vapor pressure is the pressure exerted by a vapor in thermodynamic equilibrium with equilibrium with its condensed phases (solid or liquid) at a given temperature in a closed system. The equilibrium vapor pressure is an indication of a liquid's evaporation rate. It relates to the tendency of particles to escape from the liquid (or a solid). A substance with a high vapor pressure at normal temperatures is often referred to as volatile volatile.. The vapor pressure of any substance increases non-linearly with temperature according to the Clausius–Clapeyron relation. relation . The atmospheric pressure boiling point of a liquid (also known as the normal boiling point) point ) is the temperature at which the vapor pressure equals the ambient atmospheric pressure. With any incremental increase in that temperature, the vapor pressure becomes sufficient to overcome atmo atmosphe spheric ric press pressure ure and and lift lift the the liq liquid uid to form form vapo vaporr bubb bubble less insi inside de the the bulk bulk of the the substance. Bubble format formation ion deeper deeper in the liquid liquid requir requires es a higher higher pressu pressure, re, and and theref therefore ore highe higherr temperature, because the fluid pressure increases above the atmospheric pressure as the depth increases. In mathematics mathematics,, a polynomial is an expression of finite length constructed from variables (also called indeterminates indeterminates)) and constants constants,, using only the operations of addition addition,, subtraction subtraction,, multiplication multiplication,, and non-negative integer exponents exponents.. However the division by a constant is allowed, because the multiplicative inverse of a non zero constant is also a constant. For example, x 2 − x /4 /4 + 7 is a polynomial, but x but x 2 − 4/ x + x + 3/2 7 x is not, because its second term involves division by the variable x variable x (4/x), (4/x), and also because its third term contains an exponent that is not an integer (3/2). The term "polynomial" can also be used as an adjective, for quantities that can be expressed as a polynomial of some parameter, as in polynomial time, time , which is used in computationa computationall complexity theory theory.. Polynomial comes from the Greek poly Greek poly , "many" and medieval Latin binomium, binomium, "binomial binomial". ". The word was introduced introduced in Latin by Franciscus Vieta. Vieta. Polynomials appear in a wide variety of areas of mathematics and science. For example, they are used to form polynomial equations, which encode a wide range of problems, from elementary word problems to complicated problems in the sciences; they are used to define polynomial functions, which appear in settings ranging from basic chemistry and physics to economics and social science; science; they are
used in calculus and numerical analysis to approximate other functions. In advanced mathematics, polynomials are used to construct polynomial rings, a central concept in abstract algebra and algebraic geometry. The Antoine equation is a vapor pressure equation and describes the relation between vapor pressure and temperature for pure components. The Antoine equation is derived from the ClausiusClapeyron relation.
where p is the vapor pressure, T is temperature and A, B and C are component-specific constants. The simplified form with C set to zero:
is named the August equation, after the German physicist Ernst Ferdinand August (1795–1870). The August equation describes a linear relation between the logarithm of the pressure and the reciprocal temperature. This assumes a temperature-independent heat of vaporization. The Antoine equation allows an improved, but still inexact description of the change of the heat of vaporization with the temperature. The Antoine equation can also be transformed in a temperature-explicit form with simple algebraic manipulations:
4. Resources: Microsoft Excel 5. Procedure: 1.Start with an equation such as y = 2x +5 and generate points over the interval 0.0
4.Use the appropriate Excel functions to estimate the slope and intercept as well as R-sq value.
5.Using scatter-plot, highlight the series to be associated with a trend line( with only one series), and right click and select “Add Trendline”.Specify options to specify the numerical values of slope and intercept (as well as Rsq) on the graph. Further, specify to force the regression line through the origin (zero) or any other value. When this is done the value of the slope is recalculated to properly “best fit” the data with this additional constraint. 6. Excel’s Linear Regression Analysis Package is part of the “Data analysis” Add-In. This Add-In must be available (installed) and must be selected (activated) before it can be used. This is done by checking the Analysis Toolpak in the Tools/Add-Ins menu.
Using the data below
Time 0 1 2 3 4 5 6 7 8 9
Temp 298 299 301 304 306 309 312 316 319 322
7. Identify the “x” and “y” data ranges from the spreadsheet using the “to the spreadsheet” buttons. Also select the options shown below and direct the analysis to a “new worksheet ply”.
8. The “coefficients” are the “answers”. Intercept and Variable 1 are the “intercept” and “slope” ( or coefficient of the “first ‘x’”.
9. Add another term to our time-temperature data: temp = b o + b1(time) + b2(time 1.5)
10.Using regression analysis, the output is shown below:
11. Based on the analysis, the regression equation is: temp = 297.745 + 0.8913(time) + 0.6163(time 1.5) 12. The solver is an Add-In that has to be installed before use. As with the Statistical Package, it is part of Excel but not installed by default. Go to “Tools/Add-Ins”. Once installed, Solver is easy to use. Type the guess value in B3 (3.6) and the formula =B3^3 – 17*B3 + 12 in B4
13. Start Solver by selecting “Tools/Solver” and fill in the values as shown:
Press “Solve” to see both cells update.
Note that we found the value of x (=3.710213 that makes the function equal to 0.0 (actually -1.555E-7 in this case). The idea behind solver is very simple…Excel will control the value of the target cell to make it equal to the value specified) by varying the value in the “Changing Cell”. It is obviously required that when one changes the value in the “Changing Cell” it affects the answer in the “Target Cell”. 14. The Solver can be used to determine unconstrained and constrained optimization problems (mins and maxs).
Type 1 Simple 1 Var Unconstrained y = 10 + 8x – x 2
Type 2 – Simple 1 Var with Constraints Suppose we wish to limit our search to the region 2
Type 3 – Multi Variable Unconstrained
15.The problem we will solve is to take a set of vapor pressure data and fit the parameters of the Antoine Equation using nonlinear regression In this case:
A quick investigation shows there is no way to “linearize” this equation so we must employ nonlinear regression techniques to establish the values of A, B and C for a particular substance. In our case we will use data for n-pentane’s vapor pressure as reported in Perry’s Handbook. Start by entering the available data (T,p*) as well as providing for “guesses” for A, B and C and named these as conA, conB and conC.
In regression analysis one minimizes the sum of squared error (SSE) which is defined as
where yi are the original data, yp are the predicted values using assumed values for A, B and C. Then add columns for log(p*), y, yp, error and error 2 where error = yi – yp. The value for yp(D9) are Derived from = ConA – ( conB/(conC + A9)) and the others are obvious. Also, add the entry for SSE which is the sum of the “error 2 “. A portion of the results are shown below.
We use Solver to minimize SSE by varying A, B and C. 16. In order to verify the success of the regression we should plot the original data against the predicted values obtained by employing the constants determined by the nonlinear regression. This is not the same as plotting the original values and the predicted values against the independent variable. One can also “visualize” the fit by plotting the “error” or deviation, as it is called in statistics. The data needed for these plots can easily be developed (as shown).
Since the fit was not “superlative” one should consider if the method needed tighter tolerance, more iterations, or more time. Use the Options button of the Solver menu to adjust these.
Reviewing the new results.
Since the fit STILL is not “superlative” on should consider 1. The quality of the data 2. Did we make a mistake in the analysis (error in formula, etc.) 3. Does the deviation data suggest systematic error? If so, can a better model be proposed and fit with additional parameters. It should be noted, the book has analyzed the data for water (very accurately known) and they had available 42 data points (whereas we have only 10 data points to estimate the coefficients for npentane. The values listed in Felder are: Felder Solver/Perry’s A 6.84471 6.663363 B 1060.793 1002.3834 C 231.541 227.87899 o Temp Range 13.3 – 36.8 C -76.6 to 36.1 o C
17.Table (2) presents data of vapor pressure versus temperature for benzene. Some design calculations require these data to be accurately correlated by various algebraic expressions which provide P in mmHg as a function of T in °C.
A simple polynomial is often used as an empirical modeling equation. This can be written in general form for this problem as P = a0 + a1T + a2T 2 + a3T 3 + ...+anT n Equation 9 where a0... an are the parameters (coefficients) to be determined by regression and n is the degree of the polynomial. The Clausius-Clapeyron equation which is useful for the correlation of vapor pressure data is given by Equation 10
where P is the vapor pressure in mmHg and T is the temperature in °C. Note that the denominator is just the absolute temperature in K. Both A and B are the parameters of the equation which are typically determined by regression. The Antoine equation which is widely used for the representation of vapor pressure data is given by Equation 11
where typically P is the vapor pressure in mmHg and T is the temperature in °C. Note that this equation has parameters A, B, and C which must be determined by nonlinear regression as it is not possible to linearize this equation. The Antoine equation is equivalent to the Clausius-Clapeyron equation when C = 273.15. (a) Regress the data with polynomials having the form of Equation (9). Determine the degree of polynomial which best represents the data. (b) Regress the data using linear regression on Equation (10), the Clausius-Clapeyron equation. (c) Regress the data using nonlinear regression on Equation (11), the Antoine equation.
Course: Group No.: Group Members:
6. Data and Results:
7. Conclusion:
8. Assessment (Rubric for Laboratory Performance):
Laboratory Exercise No.: Section: Date Performed: Date Submitted: Instructor: