{"id":4726,"date":"2024-10-05T20:08:53","date_gmt":"2024-10-05T20:08:53","guid":{"rendered":"https:\/\/workhouse.sweetdishy.com\/?p=4726"},"modified":"2024-10-05T20:08:54","modified_gmt":"2024-10-05T20:08:54","slug":"prediction-via-equations","status":"publish","type":"post","link":"https:\/\/workhouse.sweetdishy.com\/index.php\/2024\/10\/05\/prediction-via-equations\/","title":{"rendered":"Prediction via Equations"},"content":{"rendered":"\n<p>You can see from\u00a0Figure 7.2\u00a0(line AB) that the function of\u00a0<em>p<\/em>* versus\u00a0<em>T<\/em>\u00a0is not a linear function (except as an approximation over a very small temperature range). Many functional forms have been proposed to predict\u00a0<em>p<\/em>* from\u00a0<em>T<\/em>, but\u00a0we use the\u00a0<strong>Antoine equation<\/strong>\u00a0in this text because it has sufficient accuracy for our needs, and coefficients for the equation exist in the literature for over 5000 compounds:ln(p*)=A\u2212BC+T<\/p>\n\n\n\n<p>(7.4)<\/p>\n\n\n\n<p>where&nbsp;<em>A<\/em>,&nbsp;<em>B<\/em>,&nbsp;<em>C<\/em>&nbsp;= constants for each substance, and&nbsp;<em>T<\/em>&nbsp;= temperature, kelvin.<\/p>\n\n\n\n<p>Refer to\u00a0Appendix F\u00a0(available online; see Preface, page xvi) for the values of\u00a0<em>A, B,<\/em>\u00a0and\u00a0<em>C<\/em>\u00a0for various compounds.<\/p>\n\n\n\n<p>You can estimate the values of\u00a0<em>A, B,<\/em>\u00a0and\u00a0<em>C<\/em>\u00a0in Equation (7.4) from experimental data by using a regression program such as found in MATLAB and Python. With just three experimental values for the vapor pressure versus temperature, you can fit Equation (7.4), but more values are better!<\/p>\n\n\n\n<p><strong>Example 7.2 Vaporization of Metals for Thin Film Deposition<\/strong><\/p>\n\n\n\n<p><strong>Problem Statement<\/strong><\/p>\n\n\n\n<p>Three methods of providing vaporized metals for thin film deposition are evaporation from a boat, evaporation from a filament, and transfer via an electronic beam.\u00a0Figure E7.2\u00a0illustrates evaporation from a boat placed in a vacuum chamber.<\/p>\n\n\n\n<figure class=\"wp-block-image\" id=\"ch07figE02\"><img decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9780137327164\/files\/graphics\/Ex07-02.jpg\" alt=\"An illustration depicts the evaporation from a boat placed in a vacuum chamber. Target is placed above a bar. It is connected to electrodes. The target and the bar are inside the vacuum chamber. To pump is below the bar.\"\/><figcaption class=\"wp-element-caption\"><strong>Figure E7.2<\/strong><\/figcaption><\/figure>\n\n\n\n<p>The boat made of tungsten has a negligible vapor pressure at 972\u00b0C, the operating temperature for the vaporization of aluminum (which melts at 660\u00b0C and fills the boat). The approximate rate of evaporation&nbsp;<em>m<\/em>&nbsp;is given in g\/(cm<sup>2<\/sup>)(s) bym=0.437p*(MW)1\/2T1\/2<\/p>\n\n\n\n<p>where&nbsp;<em>p<\/em>* is the vapor pressure in kilopascals,&nbsp;<em>MW<\/em>&nbsp;is the molecular weight and&nbsp;<em>T<\/em>&nbsp;is the temperature in kelvin. What is the vaporization rate for Al at 972\u00b0C in g\/(cm<sup>2<\/sup>)(s)?<\/p>\n\n\n\n<p><strong>Solution<\/strong><\/p>\n\n\n\n<p>You have to calculate&nbsp;<em>p<\/em>* for Al at 972\u00b0C. The Antoine equation is suitable if data are known for the vapor pressure of Al. Considerable variation exists in the data for Al at high temperatures, but we will use&nbsp;<em>A<\/em>&nbsp;= 8.779,&nbsp;<em>B<\/em>&nbsp;= 1.615 \u00d7 104, and&nbsp;<em>C<\/em>&nbsp;= 0 with&nbsp;<em>p<\/em>* in millimeters of Hg and&nbsp;<em>T<\/em>&nbsp;in kelvin.In\u2009p972\u00b0C*=8.799\u22121.615\u00d7104972+273=0.0154&nbsp;mm&nbsp;Hg\u2009(0.00201&nbsp;kPa)m=0.437(0.00201)(26.98)1\/2(972+273)1\/2=1.3\u00d710\u22124\u2009g\/(cm2)(s)<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"ch07lev10\">7.3.2 Retrieving Vapor Pressures from the Tables<\/h4>\n\n\n\n<p>You can find the vapor pressures of substances listed in tables in handbooks, physical property books, and websites. We use water as an example. Tabulations of the properties of water and steam (water vapor) are commonly called the\u00a0<strong>steam tables<\/strong>, although the tables are as much about water as they are about steam. The properties of water and steam from one source may not agree precisely with other sources because the values available from different sources are likely generated by using equations having different accuracy and precision.<\/p>\n\n\n\n<p>Four classes of tables exist in the foldout:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>A table of&nbsp;<em>p<\/em>* versus&nbsp;<em>T<\/em>&nbsp;(saturated water and vapor) listing other properties such as&nbsp;V^Properties of Saturated WaterVolume, m<sup>3<\/sup>\/kgPress. kPaT (K)V^<sub>l<\/sub>V<sub>g<\/sub>0.80276.920.001000159.71.0280.130.001000129.21.2282.810.001000108.71.4285.130.00100193.921.6287.170.00100182.761.8288.990.00100174.032.0290.650.00100267.002.5294.230.00100254.253.0297.230.00100345.674.0302.120.00100434.80<\/li>\n\n\n\n<li>A table of&nbsp;<em>T<\/em>&nbsp;versus&nbsp;<em>p<\/em>* (saturated water and vapor) containing other properties such as&nbsp;V^Properties of Saturated WaterVolume (m<sup>3<\/sup>\/kg)T (K)Press. (kPa)V^<sub>l<\/sub>V<sub>g<\/sub>273.160.61130.001000206.12750.69800.001000181.72800.99120.001000130.32851.3880.00100194.672901.9190.00100169.672952.6200.00100251.903003.5360.00100439.103054.7180.00100529.783106.2300.00100722.913158.1430.00100917.80<\/li>\n\n\n\n<li>A table listing superheated vapor (steam) properties as a function of&nbsp;<em>T<\/em>&nbsp;and&nbsp;<em>p<\/em>Superheated Steam<sup><a href=\"https:\/\/learning.oreilly.com\/library\/view\/basic-principles-and\/9780137327164\/ch07.xhtml#table004_1a\">*<\/a><\/sup>Abs. Press. lb\/in.<sup>2<\/sup>&nbsp;(Sat. Temp. \u00b0F)Sat. WaterSat. Steam400\u00b0F420\u00b0F440\u00b0F<em>Sh<\/em>29.2349.2369.23<strong>175<\/strong><em>v<\/em>0.01822.6012.7302.8142.897(370.77)<em>h<\/em>343.611196.71215.61227.61239.9<em>Sh<\/em>26.9246.9266.92<strong>180<\/strong><em>v<\/em>0.01832.5322.6482.7312.812(373.08)<em>h<\/em>346.071197.21214.61226.81239.2<em>Sh<\/em>24.6644.6664.66<strong>185<\/strong><em>v<\/em>0.01832.4662.5702.6512.731(375.34)<em>h<\/em>348.471197.61213.71226.01238.4<sup><a href=\"https:\/\/learning.oreilly.com\/library\/view\/basic-principles-and\/9780137327164\/ch07.xhtml#table004_1\">*<\/a><\/sup><em>Sh<\/em>&nbsp;= degrees of superheat, \u00b0F;&nbsp;<em>v<\/em>&nbsp;= specific volume, ft<sup>3<\/sup>\/lb<sub>m<\/sub>;&nbsp;<em>h<\/em>&nbsp;= specific enthalpy, Btu\/lb<sub>m<\/sub><\/li>\n\n\n\n<li>A table of subcooled water (liquid) properties as a function of\u00a0<em>p<\/em>\u00a0and\u00a0<em>T<\/em>\u00a0(<em>h<\/em>\u00a0and\u00a0<em>u<\/em>\u00a0in this table are the specific enthalpy and the specific internal energy, respectively, which are introduced in\u00a0Chapter 8)Properties of Liquid Waterp, kPa400425450<strong>Sat.<\/strong>\u03c1, kg\/m<sup>3<\/sup>937.35915.08890.25h, kJ\/kg532.69639.71748.98u, kJ\/kg532.43639.17747.93<strong>500<\/strong>\u03c1, kg\/m<sup>3<\/sup>937.51915.08h, kJ\/kg532.82639.71u, kJ\/kg532.29639.17<strong>700<\/strong>\u03c1, kg\/m<sup>3<\/sup>937.62915.22h, kJ\/kg532.94639.84u, kJ\/kg532.19639.07<\/li>\n<\/ol>\n\n\n\n<p>Locate each table in the foldout, and use the tables with the following explanations. How can you tell which table to use to get the properties you want? One way is to look at one of the phase diagrams for water. For example, do the conditions of 25\u00b0C and 4 atm refer to liquid water, a saturated liquid-vapor mixture, or water vapor? You can use the values in the steam tables plus what you know about phases to reach a decision about the state of the water. In the SI steam tables of&nbsp;<em>T<\/em>&nbsp;versus&nbsp;<em>p<\/em>* for saturated water,&nbsp;<em>T<\/em>&nbsp;is just less than 300 K at which&nbsp;<em>p<\/em>* = 3.536 kPa. Because the given pressure was about 400 kPa, much higher than the saturation pressure at 298 K, clearly the water is subcooled (compressed liquid).<\/p>\n\n\n\n<p>Can you locate the point&nbsp;<em>p<\/em>* = 250 kPa and&nbsp;V^=1.00\u2009m3\/kg&nbsp;using&nbsp;<a href=\"https:\/\/learning.oreilly.com\/library\/view\/basic-principles-and\/9780137327164\/ch07.xhtml#ch07fig08\">Figure 7.8<\/a>? Do you find the water is in the superheated steam region? The specified volume is larger than the saturated volume of 0.7187 m<sup>3<\/sup>\/kg at 250 kPa. What about the point&nbsp;<em>T<\/em>&nbsp;= 300 K and&nbsp;V^=0.505\u2009\u2009m3\/kg? Water at that state is a mixture of saturated liquid and vapor. You can calculate the quality of the water-water vapor mixture using Equation (<a href=\"https:\/\/learning.oreilly.com\/library\/view\/basic-principles-and\/9780137327164\/ch07.xhtml#equ7_1\">7.1<\/a>) as follows: From the steam tables, the specific volumes of the saturated liquid and vapor are<\/p>\n\n\n\n<figure class=\"wp-block-image\" id=\"ch07fig08\"><img decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9780137327164\/files\/graphics\/07fig08.jpg\" alt=\"A phase diagram for water is given.\"\/><figcaption class=\"wp-element-caption\"><strong>Figure 7.8<\/strong>&nbsp;Portion of the&nbsp;p\u2212V^&nbsp;phase diagram for water (note that the axes are logarithmic scales)<\/figcaption><\/figure>\n\n\n\n<p>V^l=0.001004&nbsp;\u2009m3\/kg\u2009\u2009\u2009V^g=39.10\u2009m3\/kgBasis:\u20091\u2009kg\u2009of\u2009wet\u2009\u2009steam\u2009mixture<\/p>\n\n\n\n<p>Let&nbsp;<em>x<\/em>&nbsp;= mass fraction vapor. Then0.001004&nbsp;m31&nbsp;kg&nbsp;liquid|(1\u2212x)kg&nbsp;liquid+39.10&nbsp;m31&nbsp;kg&nbsp;vapor|x&nbsp;kg&nbsp;vapor=0.505\u2009m3\u2009\u2009\u2009\u2009\u2009\u2009\u2009\u2009\u2009\u2009\u2009\u2009\u2009\u2009\u2009\u2009\u2009\u2009\u2009\u2009\u2009\u2009\u2009\u2009\u2009\u2009\u2009\u2009\u2009\u2009\u2009\u2009\u2009\u2009\u2009x=0.0129&nbsp;(the&nbsp;fractional&nbsp;quality)<\/p>\n\n\n\n<p>If you are given a specific mass of saturated water plus steam at a specified temperature or pressure so that you know the state of the water is in the two-phase region, you can use the steam tables for various calculations. For example, suppose a 10.0 m<sup>3<\/sup>&nbsp;vessel contains 2000 kg of water plus steam at 10 atm, and you are asked to calculate the volume of each phase. Let the volume of water be&nbsp;<em>V<\/em><sub>l<\/sub>&nbsp;and the volume of steam be&nbsp;<em>V<\/em>g; then the masses of each phase are&nbsp;Vl\/V^l&nbsp;and&nbsp;Vg\/V^g&nbsp;respectively. From your knowledge of the total volume and total mass:<\/p>\n\n\n\n<p><em>V<sub>l<\/sub><\/em>&nbsp;+&nbsp;<em>V<sub>g<\/sub><\/em>&nbsp;= 10<\/p>\n\n\n\n<p>andVl\/V^l+Vg\/V^g=2000<\/p>\n\n\n\n<p>From the steam tables,&nbsp;V^l=0.0011274&nbsp;\u2009m3\/kg&nbsp;and&nbsp;V^g=0.19430\u2009\u2009m3\/kg. Solving these simultaneous equations for&nbsp;<em>V<\/em><em><sub>l<\/sub><\/em>&nbsp;and&nbsp;<em>V<\/em><em><sub>g<\/sub><\/em>&nbsp;gives the volume of the liquid as 2.21 m<sup>3<\/sup>&nbsp;and the volume of the steam as 7.79 m<sup>3<\/sup>. The mass of the liquid is 1960 kg, and the mass of the steam is 40 kg.<\/p>\n\n\n\n<p>Because the values in the steam tables are tabulated in discrete increments, for intermediate values, you will have to interpolate to retrieve values between the discrete values. (If interpolation does not appeal to you, use the physical property software on the website that accompanies this book.) The next example shows how to carry out interpolations in tables.<\/p>\n\n\n\n<p><strong>Example 7.3 Interpolating in the Steam Tables<\/strong><\/p>\n\n\n\n<p><strong>Problem Statement<\/strong><\/p>\n\n\n\n<p>What is the saturation pressure of water at 312 K?<\/p>\n\n\n\n<p><strong>Solution<\/strong><\/p>\n\n\n\n<p>To solve this problem, you have to carry out a single interpolation. Look in the steam tables under the properties of saturated water to get&nbsp;<em>p<\/em>* so as to bracket 312 K:T(K)p*(kPa)3106.2303158.143<\/p>\n\n\n\n<p>Figure E7.3\u00a0shows the concept of a linear interpolation between 310 K and 315 K. Find the change of\u00a0<em>p<\/em>* per unit change in\u00a0<em>T<\/em>.<\/p>\n\n\n\n<figure class=\"wp-block-image\" id=\"ch07figE03\"><img decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9780137327164\/files\/graphics\/Ex07-03.jpg\" alt=\"A graph depicts the concept of a linear interpolation between 310 Kelvin and 315 Kelvin.\"\/><figcaption class=\"wp-element-caption\"><strong>Figure E7.3<\/strong><\/figcaption><\/figure>\n\n\n\n<p>\u0394p*\u0394T=8.143\u22126.230315\u2212310=1.915=0.383<\/p>\n\n\n\n<p>Multiply the fractional change times the number of degrees increase from 310 K to get change in&nbsp;<em>p<\/em>*, and add the result to the value of&nbsp;<em>p<\/em>* at 310 K of 6.230 kPa:p312\u2009K*=p310\u2009K*+\u0394p*\u0394T(T312\u2212T310)=6.230+0. 383(2)=7.000\u2009kPa<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"ch07lev11\">7.3.3 Predicting Vapor Pressures from Reference Substance Plots<\/h4>\n\n\n\n<p>Because of the curvature of the vapor-pressure data versus temperature (see\u00a0Figure 7.2), no simple equation with two or three coefficients will fit the data\u00a0accurately from the triple point to the critical point. Othmer proposed in numerous articles<sup>1<\/sup>\u00a0that\u00a0<strong>reference substance plots<\/strong>\u00a0(the name will become clear in a moment) could convert the vapor-pressure-versus-temperature curve into a straight line. One well-known example is the Cox chart.<sup>2<\/sup>\u00a0You can use the Cox chart to retrieve vapor-pressure values as well as to test the reliability of experimental data, to interpolate, and to extrapolate.\u00a0Figure 7.9\u00a0is a Cox chart.<\/p>\n\n\n\n<p><sup><a href=\"https:\/\/learning.oreilly.com\/library\/view\/basic-principles-and\/9780137327164\/ch07.xhtml#fn7_1a\">1<\/a><\/sup>&nbsp;See, for example, D. F. Othmer,&nbsp;<em>Ind. Eng. Chem.,<\/em>&nbsp;<strong>32<\/strong>, 841 (1940); and J. H. Perry and E. R. Smith,&nbsp;<em>Ind. Eng. Chem<\/em>.,&nbsp;<strong>25<\/strong>, 195 (1933).<\/p>\n\n\n\n<p><sup><a href=\"https:\/\/learning.oreilly.com\/library\/view\/basic-principles-and\/9780137327164\/ch07.xhtml#fn7_2a\">2<\/a><\/sup>&nbsp;E. R. Cox,&nbsp;<em>Ind. Eng. Chem.,<\/em>&nbsp;<strong>15<\/strong>, 592 (1923).<\/p>\n\n\n\n<p>Here is how you can make a Cox chart:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Mark on the horizontal scale values of log&nbsp;<em>p<\/em>* so as to cover the desired range of&nbsp;<em>p<\/em>*.<\/li>\n\n\n\n<li>Next, draw a straight line on the plot at a suitable angle, say, 45\u00b0, that covers the range of&nbsp;<em>T<\/em>&nbsp;that is to be marked on the vertical axis.<\/li>\n\n\n\n<li>To calibrate the vertical axis in common integers such as 25, 50, 100, 200 degrees, and so on, you use a\u00a0<strong>reference substance<\/strong>, usually water. For the first integer, say,\u00a0<em>T<\/em>\u00a0= 100\u00b0F, you look up the vapor pressure of water in the steam tables, or calculate it from the Antoine equation, to get 0.9487 psia. Locate this value on the horizontal axis, and proceed vertically until you hit the 45\u00b0 straight line. Then proceed horizontally left until you hit the vertical axis. Mark the scale there as 100\u00b0F.<\/li>\n\n\n\n<li>Pick the next temperature, say, 200\u00b0F, and get 11.525 psia. Proceed vertically from&nbsp;<em>p<\/em>* = 11.525 to the 45\u00b0 straight line, and then horizontally to the vertical axis. Mark the scale as 200\u00b0F.<\/li>\n\n\n\n<li>Continue as in steps 3 and 4 until the vertical scale is established over the desired range for the temperature.<\/li>\n<\/ol>\n\n\n\n<p>Other compounds will give straight lines for\u00a0<em>p<\/em>* versus\u00a0<em>T<\/em>\u00a0as shown in\u00a0Figure 7.9. What proves useful about the Cox chart is that the vapor pressures of other substances plotted on this specially prepared set of coordinates will yield straight lines over extensive temperature ranges and thus facilitate the extrapolation and interpolation of vapor-pressure data. It has been found that lines so constructed for closely related compounds, such as hydrocarbons, all meet at a common point. Since straight lines can be obtained in a Cox chart, only\u00a0<em>two points<\/em>\u00a0of vapor-pressure data are needed to provide adequate information about the vapor pressure of a substance over a considerable temperature range.<\/p>\n\n\n\n<figure class=\"wp-block-image\" id=\"ch07fig09\"><img decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9780137327164\/files\/graphics\/07fig09.jpg\" alt=\"A figure shows a Cox chart.\"\/><figcaption class=\"wp-element-caption\"><strong>Figure 7.9<\/strong>&nbsp;Cox chart. The vapor pressure of compounds other than water can be observed to fall on straight lines.<\/figcaption><\/figure>\n\n\n\n<p>Let\u2019s look at an example of using a Cox chart.<\/p>\n\n\n\n<p><strong>Example 7.4 Extrapolation of Vapor-Pressure Data<\/strong><\/p>\n\n\n\n<p><strong>Problem Statement<\/strong><\/p>\n\n\n\n<p>The control of solvents was first described in the\u00a0<em>Federal Register<\/em>\u00a0[<strong>36<\/strong>, No. 158 ( August 14, 1971)] under Title 42,\u00a0Chapter 4, Appendix 4.0, \u201cControl of Organic Compound Emissions.\u201d Chlorinated solvents and many other solvents used in industrial finishing and processing, dry-cleaning plants, metal degreasing, printing operations, and so forth can be recycled and reused by the introduction of carbon adsorption equipment. To predict the size of the adsorber, you first need to know the vapor pressure of the compound being adsorbed at the process conditions.<\/p>\n\n\n\n<p>The vapor pressure of chlorobenzene is 400 mm Hg absolute at 110\u00b0C and 5 atm at 205\u00b0C. Estimate the vapor pressure at 245\u00b0C and also at the critical point (359\u00b0C).<\/p>\n\n\n\n<p><strong>Solution<\/strong><\/p>\n\n\n\n<p>The vapor pressures will be estimated by use of a Cox chart. You construct the temperature scale (vertical) and vapor-pressure scale (horizontal) as described in connection with\u00a0Figure 7.9. On the horizontal axis with\u00a0<em>p<\/em>* given in a log<sub>10<\/sub>\u00a0scale, mark the vapor pressures of water from 3.72 to 3094 psia corresponding to 150\u00b0F to 700\u00b0F, and mark the respective temperatures on the vertical scale as shown in\u00a0Figure E7.4.<\/p>\n\n\n\n<figure class=\"wp-block-image\" id=\"ch07figE04\"><img decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9780137327164\/files\/graphics\/Ex07-04.jpg\" alt=\"An illustration of an estimation by the use of a Cox chart.\"\/><figcaption class=\"wp-element-caption\"><strong>Figure E7.4<\/strong><\/figcaption><\/figure>\n\n\n\n<p>Next, convert the two given vapor pressures of chlorobenzene into psia:400\u2009\u2009\u2009mm\u2009\u2009Hg\u2009\u2009|14.7\u2009psia760\u2009mm\u2009Hg=7.74\u2009psia\u2009110\u00b0C=230\u00b0\u2009F5\u2009atm|14.7\u2009psia1\u2009atm=73.5\u2009psia\u2009205\u00b0C=401\u00b0\u2009F<\/p>\n\n\n\n<p>and plot these two points on the graph paper. Examine the encircled dots. Finally, draw a straight line between the encircled points and extrapolate to 471\u00b0F (245\u00b0C) and 678\u00b0F (359\u00b0C). At these two temperatures, you can read off the estimated vapor pressures.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>&nbsp;<\/td><td>471\u00b0F (245\u00b0C)<\/td><td>678\u00b0 (359\u00b0C)<\/td><\/tr><tr><td>Estimated:<\/td><td>150 psia<\/td><td>700 psia<\/td><\/tr><tr><td>Experimental:<\/td><td>147 psia<\/td><td>666 psia<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Experimental values are given for comparison.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"ch07lev11a\">7.3.4 Using MATLAB and Python to Interpolate Nonlinear Data<\/h5>\n\n\n\n<p>Linear interpolation can be highly accurate when applied to certain data sets and not so accurate for other. How can you tell if a set of data lends itself to linear interpolation or requires nonlinear interpolation? The following two data sets can be used to address this issue:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th colspan=\"5\"><strong>Vapor Pressure and Specific Volume of Liquid Saturated Steam<\/strong><\/th><\/tr><tr><th>T (K)<\/th><th>Vapor Pressure (kpa)<\/th><th>dpvpdT<\/th><th>V^lip(m3\/kg)\u00d7104<\/th><th>dV^lipdT\u00d7104<\/th><\/tr><\/thead><tbody><tr><td>275<\/td><td>0.6980<\/td><td>0.059<\/td><td>9.9959<\/td><td>0.0013<\/td><\/tr><tr><td>280<\/td><td>0.9912<\/td><td>0.059<\/td><td>10.0022<\/td><td>0.0012<\/td><\/tr><tr><td>285<\/td><td>1.388<\/td><td>0.079<\/td><td>10.0084<\/td><td>0.0012<\/td><\/tr><tr><td>290<\/td><td>1.919<\/td><td>0.106<\/td><td>10.0147<\/td><td>0.0012<\/td><\/tr><tr><td>295<\/td><td>2.620<\/td><td>0.140<\/td><td>10.0209<\/td><td>0.0019<\/td><\/tr><tr><td>300<\/td><td>3.536<\/td><td>0.183<\/td><td>10.0334<\/td><td>0.0025<\/td><\/tr><tr><td>305<\/td><td>4.718<\/td><td>0.236<\/td><td>10.0459<\/td><td>0.0037<\/td><\/tr><tr><td>310<\/td><td>6.230<\/td><td>0.302<\/td><td>10.0709<\/td><td>0.0044<\/td><\/tr><tr><td>315<\/td><td>8.143<\/td><td>0.383<\/td><td>10.0896<\/td><td>0.0037<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>The data sets come from the saturated steam data for the vapor pressure and the specific volume of liquid water as functions of temperature. For nonlinear data, the slope of the data changes significantly, while for relatively linear data, the slope changes gradually. Also, when you plot the data on a linear scale, the plot will have significant curvature for a nonlinear set of data. Note that the derivatives of the vapor pressure with respect to temperature changes by a factor of 6 for the range of temperatures shown, while the specific volume of the liquid changed by a factor of 3. Therefore, both sets of data contain significant nonlinearity.<\/p>\n\n\n\n<p>Now note that the total change in the specific volume for this set of data is less than 1% while the total change for the vapor pressure is about 250%. Therefore, the relative change in the specific volume between data points is quite small. As a result, linear interpolation applied to the data for the specific volume will provide highly accurate approximations of the data. On the other hand, the relative change between data for the vapor pressure is significant. Therefore, the combination of the nonlinearity of the data and the magnitude of relative change between adjacent data values for the vapor pressure will produce significant error if linear interpolation is used. This point is demonstrated by the following two examples.<\/p>\n\n\n\n<p>Both MATLAB and Python offer functions that apply interpolation based on a cubic spline approximating equation. A&nbsp;<em>spline<\/em>&nbsp;is a nonlinear function that can be viewed as a mathematical representation of a flexible curve because the function will pass through each data point but can have slopes that vary through the data set. The following examples demonstrate how to apply these cubic spline functions for interpolation of data that cannot be accurately interpolated using linear interpolation.<\/p>\n\n\n\n<p><strong>MATLAB<\/strong><\/p>\n\n\n\n<p>MATLAB offers a built-in function for cubic spline interpolation: function spline. The call statement for function&nbsp;<code>spline<\/code>&nbsp;is given by<\/p>\n\n\n\n<p><code>fv=spline(<strong>xd<\/strong>,<strong>fd<\/strong>,xv)<\/code><\/p>\n\n\n\n<p>where&nbsp;<code>fv<\/code>&nbsp;is the interpolated value based on&nbsp;<code>xv, xd<\/code>&nbsp;is a vector containing the values of&nbsp;<em>x<\/em>&nbsp;for the data used for the interpolation,&nbsp;<code>fd<\/code>&nbsp;is a vector containing the values of&nbsp;<em>f<\/em>(<em>x<\/em>) for the data used for the interpolation, and&nbsp;<code>xv<\/code>&nbsp;is the value of&nbsp;<em>x<\/em>&nbsp;used for the interpolation. Function&nbsp;<code>spline<\/code>&nbsp;uses linear, quadratic, or cubic interpolation depending on the nonlinearity of the data.<\/p>\n\n\n\n<p><strong>Example 7.5 Cubic Spline Interpolation Using MATLAB<\/strong><\/p>\n\n\n\n<p><strong>Problem Statement<\/strong><\/p>\n\n\n\n<p>Using the saturated steam data for vapor pressure in the last table, estimate the vapor pressure at 307.5 K.<\/p>\n\n\n\n<p><strong>Solution<\/strong><\/p>\n\n\n\n<p><strong>MATLAB Solution for&nbsp;<a href=\"https:\/\/learning.oreilly.com\/library\/view\/basic-principles-and\/9780137327164\/ch07.xhtml#box7_5\">Example 7.5<\/a><\/strong><\/p>\n\n\n\n<p>Click here to view code image%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % <strong>NOMENCLATURE<\/strong> % % fv &#8211; the interpolated value % xd &#8211; a vector containing the x values of the data % fd &#8211; a vector containing the y values of the data % xv- the value of x that is to be interpolated % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % <strong>PROGRAMfunction Ex7_5_Splineclear; clc;<\/strong> % Insert data <strong>xd<\/strong>=<strong>[275,280,285,290,295,300,305,310,315];fd<\/strong>=<strong>[0.6968,0.9912,1.388,1.919,2.62,3.536,4.718,6.23,8.143];xv<\/strong>=<strong>[307.5]<\/strong>; % Set value to be interpolated <strong>fv<\/strong>=<strong>spline(xd,fd,xv)<\/strong> % Call built-in function spline <strong>end<\/strong> % <strong>PROGRAM END<\/strong> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% <strong>fv<\/strong> = <strong>5.4284<\/strong><\/p>\n\n\n\n<p><strong>Analysis of Results.<\/strong>&nbsp;If linear interpolation were used for this example, the result would be 5.474 kPa, and this amounts to a difference of 0.046 kPa between linear and cubic spline interpolation, which is a relatively small difference but nevertheless significant based on the number of digits reported in the vapor pressure data.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"ch07lev12\">Python<\/h4>\n\n\n\n<p>Python offers a built-in function for interpolation:&nbsp;<code>scipy.interpolate.interp1d<\/code>. The call statement for&nbsp;<code>interp1d<\/code>&nbsp;is given by<\/p>\n\n\n\n<p><code><strong>f<\/strong>=scipy.interpolate.interp1d(<strong>xd<\/strong>,&nbsp;<strong>yd<\/strong>, kind=\u2019linear\u2019)<\/code><\/p>\n\n\n\n<p><code>yi=<strong>f<\/strong>(xv)<\/code><\/p>\n\n\n\n<p>where&nbsp;<strong><code>f<\/code><\/strong>&nbsp;is a function that can be used for interpolation,&nbsp;<strong><code>xd<\/code><\/strong>&nbsp;is a vector containing the values of&nbsp;<em>x<\/em>&nbsp;for the data used for the interpolation,&nbsp;<strong><code>yd<\/code><\/strong>&nbsp;is a vector containing the values of&nbsp;<em>y<\/em>(<em>x<\/em>) for the data used for the interpolation,&nbsp;<code>xv<\/code>&nbsp;is the value of&nbsp;<em>x<\/em>&nbsp;for which interpolation evaluation is to be made, and yi is the interpolated value for&nbsp;<code>xv. scipy.interpolate.interp1d<\/code>&nbsp;offers linear, quadratic, or cubic spline interpolation depending on the value of kind for which the default is linear (i.e.,&nbsp;<code>'linear', 'quadratic'<\/code>, or&nbsp;<code>'cubic'<\/code>). Note that function&nbsp;<strong><code>f<\/code><\/strong>&nbsp;determined by this function can be used for a single interpolation or for a number of interpolations.<\/p>\n\n\n\n<p><strong>Example 7.6 Cubic Spline Interpolation Using Python<\/strong><\/p>\n\n\n\n<p><strong>Problem Statement<\/strong><\/p>\n\n\n\n<p>Using the saturated steam data for vapor pressure in the last table, estimate the vapor pressure at 307.5 K.<\/p>\n\n\n\n<p><strong>Solution<\/strong><\/p>\n\n\n\n<p><strong>Python Code for\u00a0Example 7.6<\/strong><\/p>\n\n\n\n<p>Click here to view code image<strong>Ex7_6 Interpolation.py<\/strong> ######################################################################### # <strong>NOMENCLATURE<\/strong> # # xd &#8211; a vector containing the x values for the data # xv- a vector containing the values of x that are to be used for interpolation # yd &#8211; a vector containing the y values for the data # yi &#8211; the interpolated value ######################################################################### # <strong>PROGRAMimport scipy.interpolateimport numpy as np<\/strong> # Input the x,y data <strong>xd<\/strong>=<strong>np.array([275, 280, 285, 290, 295, 300, 305, 310, 315])yd<\/strong>=<strong>np.array([0.6968, 0.9912, 1.388, 1.919, 2.62, 3.536, 4.718, 6.23, 8.143])<\/strong> # # Apply function scipy.interpolate.interp1d to implement cubic spine interpolation # <strong>f<\/strong>=<strong>scipy.interpolate.interp1d(xd, yd, kind<\/strong>=<strong>&#8216;cubic&#8217;)<\/strong> # Specify the value that will be used to perform the interpolation <strong>xv<\/strong>=<strong>307.5<\/strong> # Use the function determined by scipy.interpolate.interp1d to perform the interpolation <strong>yi<\/strong>=<strong>f(xv)print(&#8220;The interpolated value for x<\/strong>=<strong>{0:5.2f} is {1:6.4f}&#8221;.format(xv, yi))<\/strong> # <strong>PROGRAM END<\/strong> #########################################################################<\/p>\n\n\n\n<p><strong>IPython Console:<\/strong><\/p>\n\n\n\n<p>Click here to view code image In[1]: runfile(\u2026 Out[1]: The interpolated value for x=307.5 is 5.4284 kPa<\/p>\n\n\n\n<p><strong>Analysis of Results.<\/strong>&nbsp;If linear interpolation were used for this example, the result would be 5.474 kPa, and this amounts to a difference of 0.046 kPa between linear and cubic spline interpolation, which is a relatively small difference but nevertheless significant based on the number of digits reported in the vapor pressure data.<\/p>\n\n\n\n<p>Although this chapter uses the vapor pressure of a pure component, we should mention that the term&nbsp;<em>vapor pressure<\/em>&nbsp;has been applied to solutions of multiple components as well. For example, to meet emission standards, refiners formulate gasoline and diesel fuel differently in the summer than in the winter. The rules on emissions are related to the vapor pressure of a fuel, which is specified in terms of the&nbsp;<em>Reid vapor pressure<\/em>&nbsp;(RVP), a value that is determined at 100\u00b0F in a bomb that permits partial vaporization. For a pure component, the RVP is the true vapor pressure, but for a mixture (as are most fuels), the RVP is lower than the true vapor pressure of the mixture (by roughly 10% for gasoline).<sup><a href=\"https:\/\/learning.oreilly.com\/library\/view\/basic-principles-and\/9780137327164\/ch07.xhtml#fn7_3\">3<\/a><\/sup><\/p>\n\n\n\n<p><sup><a href=\"https:\/\/learning.oreilly.com\/library\/view\/basic-principles-and\/9780137327164\/ch07.xhtml#fn7_3a\">3<\/a><\/sup>&nbsp;Refer to J. J. Vazquez-Esparragoza, G. A. Iglesias-Silva, M. W. Hlavinka, and J. Bulin, \u201cHow to Estimate RVP of Blends,\u201d&nbsp;<em>Hydrocarbon Processing<\/em>,&nbsp;<strong>135<\/strong>&nbsp;(August, 1992), for specific details about estimating the RVP.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can see from\u00a0Figure 7.2\u00a0(line AB) that the function of\u00a0p* versus\u00a0T\u00a0is not a linear function (except as an approximation over a very small temperature range). Many functional forms have been proposed to predict\u00a0p* from\u00a0T, but\u00a0we use the\u00a0Antoine equation\u00a0in this text because it has sufficient accuracy for our needs, and coefficients for the equation exist in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4719,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[568],"tags":[],"class_list":["post-4726","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-analysis-of-the-degrees-of-freedom-in-steady-state-processes"],"jetpack_featured_media_url":"https:\/\/workhouse.sweetdishy.com\/wp-content\/uploads\/2024\/10\/equilibrium.png","_links":{"self":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts\/4726","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/comments?post=4726"}],"version-history":[{"count":1,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts\/4726\/revisions"}],"predecessor-version":[{"id":4727,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts\/4726\/revisions\/4727"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/media\/4719"}],"wp:attachment":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/media?parent=4726"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/categories?post=4726"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/tags?post=4726"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}