{"id":4654,"date":"2024-09-27T08:14:50","date_gmt":"2024-09-27T08:14:50","guid":{"rendered":"https:\/\/workhouse.sweetdishy.com\/?p=4654"},"modified":"2024-09-27T08:14:51","modified_gmt":"2024-09-27T08:14:51","slug":"basic-computational-problems","status":"publish","type":"post","link":"https:\/\/workhouse.sweetdishy.com\/index.php\/2024\/09\/27\/basic-computational-problems\/","title":{"rendered":"Basic Computational Problems"},"content":{"rendered":"\n<p>Chemical engineers encounter problems ranging in complexity from simple arithmetic calculations to highly involved ones requiring programming. The following examples present of a few of these problems along with solution techniques using Excel and Mathcad.<\/p>\n\n\n\n<p><a><\/a>Example 5.1 Friction Factor for Pipe Flow<\/p>\n\n\n\n<p>Calculate the Fanning friction factor using the Nikuradse equation for the flow of water through a 1 in. diameter pipe when the Reynolds number is 10,000.<\/p>\n\n\n\n<p>Solution (using a spreadsheet program)<\/p>\n\n\n\n<p>This equation can be solved using a spreadsheet program such as Microsoft Excel. Excel has a built-in function called&nbsp;<em>Goal Seek<\/em>&nbsp;that enables users to solve the transcendental equation. The stepwise procedure for the solution follows:<\/p>\n\n\n\n<p><strong>1.<\/strong>&nbsp;Enter the Reynolds number value in a cell (B2).<\/p>\n\n\n\n<p><strong>2.<\/strong>&nbsp;Enter an initial guess for the friction factor in another cell (B3).<\/p>\n\n\n\n<p><strong>3.<\/strong>\u00a0Rearrange\u00a0equation 5.6\u00a0in the form of a function of the Reynolds number and the friction factor (f(<em>Re<\/em>,<em>f<\/em>) = 0), as shown below, and evaluate for the values previously entered in another cell (C3).<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9780134594064\/files\/graphics\/e_05equ01.jpg\" alt=\"Image\"\/><\/figure>\n\n\n\n<p><strong>4.<\/strong>\u00a0The function value will most likely not equal 0, meaning the initial guess of friction factor was incorrect. Here, an initial guess of 0.1 for the friction factor leads to a function value of \u201310.44, indicating that the guess was incorrect. Click the DATA tab from the command menu, then the\u00a0<em>What-if Analysis<\/em>, and select\u00a0<em>Goal Seek<\/em>, as shown in\u00a0Figure 5.4.<sup>4<\/sup><\/p>\n\n\n\n<p>4.\u00a0Excel also has a much more powerful\u00a0<em>Solver<\/em>\u00a0utility, which allows a user to manipulate multiple cells, as well as specify constraints on the solution (for example, no negative roots or maximum\/minimum solution permitted, etc.) for solving such problems.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9780134594064\/files\/graphics\/05fig04.jpg\" alt=\"Image\"\/><\/figure>\n\n\n\n<p><a><\/a><strong>Figure 5.4<\/strong>&nbsp;Goal Seek tool in Excel.<\/p>\n\n\n\n<p><strong>5.<\/strong>\u00a0This brings up a dialog box, where cell C3 (function) is specified to be set to a value of 0 by manipulating cell B3 (friction factor\u00a0<em>f<\/em>), as shown in\u00a0Figure 5.5. Click OK.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9780134594064\/files\/graphics\/05fig05.jpg\" alt=\"Image\"\/><\/figure>\n\n\n\n<p><a><\/a><strong>Figure 5.5<\/strong>&nbsp;Specifying solution constraint in Goal Seek.<\/p>\n\n\n\n<p>Excel reaches a solution by changing the value in the cell B3, ultimately arriving at the\u00a0<em>f<\/em>\u00a0value of 0.0007727, with the function value in cell C3 reaching a value of \u20135.1E\u20136 (~0), as shown in\u00a0Figure 5.6.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9780134594064\/files\/graphics\/05fig06.jpg\" alt=\"Image\"\/><\/figure>\n\n\n\n<p><a><\/a><strong>Figure 5.6<\/strong>&nbsp;Solution of Nikuradse equation by Goal Seek in Excel.<\/p>\n\n\n\n<p>Solution (using Mathcad)<\/p>\n\n\n\n<p>The same problem can also be solved using Mathcad. The stepwise solution procedure is as follows:<\/p>\n\n\n\n<p><strong>1.<\/strong>&nbsp;Specify the value of the Reynolds number by typing Re:10000. (Note that the statement appears as Re := 10000.)<\/p>\n\n\n\n<p><strong>2.<\/strong>&nbsp;Define a function (ff) of&nbsp;<em>Re<\/em>&nbsp;and friction factor&nbsp;<em>f<\/em>, by typing the following:<\/p>\n\n\n\n<p>ff(Re,f):4.0*log(Re*\\f)-0.40-1\/\\f<\/p>\n\n\n\n<p>(Note that the asterisk [*] specifies multiplication, the backslash [\\] specifies square root, and the forward slash [\/] specifies division.)<\/p>\n\n\n\n<p><strong>3.<\/strong>&nbsp;Guess an initial value of&nbsp;<em>f<\/em>&nbsp;by typing f:0.01.<\/p>\n\n\n\n<p><strong>4.<\/strong>\u00a0Type f.ans:root(ff(Re,f),f) to use the\u00a0<em>root<\/em>\u00a0command for solution. Typing = at the end of this statement yields 7.727 \u00d7 10<sup>\u22123<\/sup>\u00a0as the friction factor, as shown in\u00a0Figure 5.7.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9780134594064\/files\/graphics\/05fig07.jpg\" alt=\"Image\"\/><\/figure>\n\n\n\n<p><a><\/a><strong>Figure 5.7<\/strong>&nbsp;Solution of Nikuradse equation using Mathcad.<\/p>\n\n\n\n<p>The appearance of the statements is different from the characters typed. It should also be noted that there are alternative ways to specify the square root in Mathcad. The reader is left to explore the alternatives.<\/p>\n\n\n\n<p>Similar procedures can be used to obtain the solution using other software\u2014MATLAB, Mathematica, Maple, and so on\u2014mentioned previously.<\/p>\n\n\n\n<p><a><\/a>Example 5.2 Viscosity of a Fluid<\/p>\n\n\n\n<p>The viscosity of a fluid is a function of temperature and fluid density. The experimentally measured viscosity of water at various temperatures is as shown in\u00a0Table E5.1. What is the viscosity at 25\u00b0C?<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9780134594064\/files\/graphics\/e_05tab01.jpg\" alt=\"Image\"\/><\/figure>\n\n\n\n<p><a><\/a><strong>Table E5.1 Water Viscosity as a Function of Temperature<\/strong><\/p>\n\n\n\n<p>Solution (using a spreadsheet program)<\/p>\n\n\n\n<p>The approach to solving this problem involves fitting a function (polynomial in this case) to the data and evaluating the function at the desired temperature value. The steps involved are as follows:<\/p>\n\n\n\n<p><strong>1.<\/strong>\u00a0Enter the data from\u00a0Table E5.1\u00a0in two columns.<\/p>\n\n\n\n<p><strong>2.<\/strong>\u00a0Select the data by clicking in the upper leftmost corner of the data (cell containing number 5) and moving the cursor to the bottom rightmost corner (cell containing the number 0.315) before releasing the button.<\/p>\n\n\n\n<p><strong>3.<\/strong>\u00a0Click on the INSERT tab on the command menu, and select the scatter plot under the Chart options. This results in an x-y plot being created from the data, as shown in\u00a0Figure 5.8.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9780134594064\/files\/graphics\/05fig08.jpg\" alt=\"Image\"\/><\/figure>\n\n\n\n<p><a><\/a><strong>Figure 5.8<\/strong>&nbsp;Creating a viscosity-temperature plot in Excel.<\/p>\n\n\n\n<p><strong>4.<\/strong>&nbsp;To fit a curve to the data, right-click on a data point to bring up an options box, and select Add Trendline from the menu, as shown in&nbsp;<a href=\"https:\/\/learning.oreilly.com\/library\/view\/fundamental-concepts-and\/9780134594064\/ch05.xhtml#ch05fig09\">Figure 5.9<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9780134594064\/files\/graphics\/05fig09.jpg\" alt=\"Image\"\/><\/figure>\n\n\n\n<p><a><\/a><strong>Figure 5.9<\/strong>&nbsp;Fitting a trendline to the data.<\/p>\n\n\n\n<p><strong>5.<\/strong>\u00a0A Format Trendline options box opens up to the right of the cells, allowing a number of options for the type of function to be fitted. Select Polynomial of third order (a cubic equation) and check the boxes to obtain the equation and correlation coefficient R<sup>2<\/sup>\u00a0on the graph. The resulting equation is\u00a0<em>y<\/em>\u00a0= \u22123e \u2212 6<em>x<\/em><sup>3<\/sup>\u00a0+ 0.0006<em>x<\/em><sup>2<\/sup>\u00a0\u2212 0.045<em>x<\/em>\u00a0+ 1.7154,\u00a0<em>y<\/em>\u00a0being the viscosity and\u00a0<em>x<\/em>\u00a0the temperature. The correlation\u00a0coefficient for the fit is 0.9993, indicating that a third-order polynomial fits the data accurately within the given temperature range. The resulting graph, the equation of the trendline, and the correlation coefficient are shown in\u00a0Figure 5.10.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9780134594064\/files\/graphics\/05fig10.jpg\" alt=\"Image\"\/><\/figure>\n\n\n\n<p><a><\/a><strong>Figure 5.10<\/strong>&nbsp;Cubic fit of viscosity-temperature data.<\/p>\n\n\n\n<p><strong>6.<\/strong>&nbsp;Evaluate the function at&nbsp;<em>x<\/em>&nbsp;= 25 to calculate the viscosity at 25\u00b0C. This yields a viscosity of 0.9185 mPa s.<\/p>\n\n\n\n<p>Solution (using Mathcad)<\/p>\n\n\n\n<p>The solution using Mathcad starts with creating a data table. The steps are as follows:<\/p>\n\n\n\n<p><strong>1.<\/strong>\u00a0Click on Insert, and select Data, then Table, from the dropdown menu. This creates a table, whose rows and columns can be populated with the numbers. Insert a table with variable name Temp and another one named \u03bc, entering the temperature and corresponding viscosity values in the first column of the respective tables. (The Greek letter \u03bc is obtained in Mathcad by typing\u00a0<em>m<\/em>\u00a0followed by pressing simultaneously the &lt;Ctrl+g><sup>5<\/sup>\u00a0keys.)<\/p>\n\n\n\n<p>5.\u00a0In this book, Ctrl key combinations are enclosed in angle brackets to indicate that the keys must be pressed simultaneously. For example, &lt;Ctrl+g> means to hold down the Ctrl key and press g.<\/p>\n\n\n\n<p><strong>2.<\/strong>\u00a0A regress function is used for polynomial regression. The arguments of the function are Temp, \u03bc, and 3, representing the independent variable, dependent variable, and the order of the polynomial, respectively. Type vs:regress(Temp,\u03bc,3)= to obtain a column vector, which consists of the following values: 3, 3, 3, 1.715, \u22120.045, 5.558 \u00d7 10<sup>\u22124<\/sup>, and \u22122.556 \u00d7 10<sup>\u22126<\/sup>, as shown in\u00a0Figure 5.11. The first three numbers represent regress function, location of the first coefficient, and the order of the polynomial, and the last four numbers represent the values of the coefficients in the polynomial starting with the constant. The resulting equation is \u03bc = \u22122.556e \u2212 6Temp<sup>3<\/sup>\u00a0+ 0.000558Temp<sup>2<\/sup>\u00a0\u2212 0.045Temp + 1.715, which is close to that obtained using Excel.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9780134594064\/files\/graphics\/05fig11.jpg\" alt=\"Image\"\/><\/figure>\n\n\n\n<p><a><\/a><strong>Figure 5.11<\/strong>&nbsp;Regressing a cubic equation to the viscosity-temperature data in Mathcad.<\/p>\n\n\n\n<p><strong>3.<\/strong>\u00a0Use the interp function to obtain viscosity at 25\u00b0C. This function has four arguments: vs, Temp, \u03bc, and 25; that is, the regression\u00a0vector, independent variable, dependent variable, and the value of the independent variable at which the function value is desired. Typing interp(vs,Temp,\u03bc,25)= yields a value of 0.898 mPa s for the viscosity.<\/p>\n\n\n\n<p><strong>4.<\/strong>&nbsp;Define a viscosity function using the coefficients previously obtained by typing vis(T):-2.556*10^-6*T^3+5.558*10^-4*T^2-0.045*T+1.715.<\/p>\n\n\n\n<p><strong>5.<\/strong>\u00a0To create a plot of observed and calculated viscosities, first define a range of temperatures: T:5,5.1;90. Click on the Graph Toolbar button, or choose Insert from the command menu followed by Graph in the dropdown menu, to insert a chart in the program. The resultant graph showing observed data as symbols and calculated values as a line is presented in\u00a0Figure 5.12. The details of the manipulations are left to the reader.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9780134594064\/files\/graphics\/05fig12.jpg\" alt=\"Image\"\/><\/figure>\n\n\n\n<p><a><\/a><strong>Figure 5.12<\/strong>&nbsp;Plot of observed and calculated viscosities.<\/p>\n\n\n\n<p><a><\/a>Example 5.3 Flow Rate, Average Velocity, and Reynolds Number<\/p>\n\n\n\n<p>The velocity of a fluid flowing in a circular pipe was measured<sup>6<\/sup>\u00a0as a function of the radial position and the resultant data are shown in\u00a0Table E5.2. Calculate the flow rate, average velocity, and Reynolds number if the fluid is water at 25\u00b0C. Is the flow laminar?<\/p>\n\n\n\n<p><a href=\"https:\/\/learning.oreilly.com\/library\/view\/fundamental-concepts-and\/9780134594064\/ch05.xhtml#ch05fn06a\">6.<\/a>&nbsp;There are several measurement techniques available for measuring the flow rate of a fluid in conduits. Measuring local velocities at various locations in the cross-sectional area for the flow using instruments such as a Pitot tube is one of these techniques.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9780134594064\/files\/graphics\/e_05tab02.jpg\" alt=\"Image\"\/><\/figure>\n\n\n\n<p><a><\/a><strong>Table E5.2 Velocity-Radial Position Data<\/strong><\/p>\n\n\n\n<p>Solution algorithm<\/p>\n\n\n\n<p>The velocity across a cross section of the pipe is assumed to be a function of the radial position only; that is, if one draws a circle having that radius, the velocity is the same everywhere on that circle. In other words, the velocity does not depend on the\u00a0<em>angular position<\/em>\u00a0on that circle. Let\u00a0<em>v(r)<\/em>\u00a0represent the fluid velocity through a thin ring of thickness \u0394<em>r<\/em>\u00a0at radial location\u00a0<em>r<\/em>. Then the following gives the flow rate \u0394Q through this ring:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9780134594064\/files\/graphics\/e_05equ02.jpg\" alt=\"Image\"\/><\/figure>\n\n\n\n<p>Here, 2\u03c0<em>r<\/em>\u0394<em>r<\/em>\u00a0is the area of the circular ring. The schematic representation of the situation is shown in\u00a0Figure 5.13.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9780134594064\/files\/graphics\/05fig13.jpg\" alt=\"Image\"\/><\/figure>\n\n\n\n<p><a><\/a><strong>Figure 5.13<\/strong>&nbsp;Flow through pipe\u2014(a) side view, (b) cross-sectional view.<\/p>\n\n\n\n<p>The total flow rate is simply the summation of all such flow rates calculated at the locations where the velocity is measured:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9780134594064\/files\/graphics\/e_05equ03.jpg\" alt=\"Image\"\/><\/figure>\n\n\n\n<p>When the thickness of the ring becomes vanishingly small,&nbsp;<a href=\"https:\/\/learning.oreilly.com\/library\/view\/fundamental-concepts-and\/9780134594064\/ch05.xhtml#e_ch05equ03\">equation E5.3<\/a>&nbsp;turns into an integral:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9780134594064\/files\/graphics\/e_05equ04.jpg\" alt=\"Image\"\/><\/figure>\n\n\n\n<p>The average velocity and Reynolds number are calculated from&nbsp;<a href=\"https:\/\/learning.oreilly.com\/library\/view\/fundamental-concepts-and\/9780134594064\/ch05.xhtml#e_ch05equ05\">equations E5.5<\/a>&nbsp;and&nbsp;<a href=\"https:\/\/learning.oreilly.com\/library\/view\/fundamental-concepts-and\/9780134594064\/ch05.xhtml#e_ch05equ06\">E5.6<\/a>, respectively.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9780134594064\/files\/graphics\/e_05equ05.jpg\" alt=\"Image\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9780134594064\/files\/graphics\/e_05equ06.jpg\" alt=\"Image\"\/><\/figure>\n\n\n\n<p>Here,&nbsp;<em>D<\/em>&nbsp;is the pipe diameter, \u03c1 the density, and \u03bc the viscosity of the fluid.<\/p>\n\n\n\n<p>Solution (using a spreadsheet program)<\/p>\n\n\n\n<p>The calculations using Excel are shown in\u00a0Figure 5.14.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9780134594064\/files\/graphics\/05fig14.jpg\" alt=\"Image\"\/><\/figure>\n\n\n\n<p><a><\/a><strong>Figure 5.14<\/strong>&nbsp;Excel solution to&nbsp;<a href=\"https:\/\/learning.oreilly.com\/library\/view\/fundamental-concepts-and\/9780134594064\/ch05.xhtml#ch5exa3\">Example 5.3<\/a>.<\/p>\n\n\n\n<p>As seen from the figure, data from\u00a0Table E5.2\u00a0are entered in columns A and B, and the flow rate at various locations is calculated in column C. The calculation for cell C4 can be seen in the figure, the formula entered by typing =2*pi()*A4*(A5-A4)*B4, corresponding to the terms in\u00a0equation E5.2. The total flow rate is obtained by summing the flow rates in cells C3 through C12 by typing the formula =Sum(C3..C12) in cell C15. As seen from the figure, the total flow rate is calculated to be 15.55 cm<sup>3<\/sup>\/s. The average velocity is calculated by entering =C15\/F7 in cell C16, and the Reynolds number by typing = C16*F8*F4\/F5 in cell C17. The parameter values of the radius of the pipe, density, and viscosity are entered in cells F3, F4, and F5. The cross-sectional area is calculated in cell F7 (=pi()*F3^2), and cell F8 contains the diameter of the pipe, which is twice the radius (=2*F3). The average velocity is 4.95 cm\/s, and the Reynolds number is 1100, indicating that the flow is laminar.<\/p>\n\n\n\n<p>Solution (using Mathcad)<\/p>\n\n\n\n<p>The solution using Mathcad is shown in&nbsp;<a href=\"https:\/\/learning.oreilly.com\/library\/view\/fundamental-concepts-and\/9780134594064\/ch05.xhtml#ch05fig15\">Figure 5.15<\/a>, and the calculation steps follow.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9780134594064\/files\/graphics\/05fig15.jpg\" alt=\"Image\"\/><\/figure>\n\n\n\n<p><a><\/a><strong>Figure 5.15<\/strong>&nbsp;Mathcad Solution to&nbsp;<a href=\"https:\/\/learning.oreilly.com\/library\/view\/fundamental-concepts-and\/9780134594064\/ch05.xhtml#ch5exa3\">Example 5.3<\/a>.<\/p>\n\n\n\n<p><strong>1.<\/strong>&nbsp;Enter the parameters radius, density, and viscosity as follows: R:1*cm, r&lt;Ctrl+g&gt;:1*gm\/cm^3, and m&lt;Ctrl+g&gt;:0.009*poise,&nbsp;respectively. (As mentioned previously, pressing &lt;Ctrl+g&gt; after a Roman script letter changes it to a Greek symbol.) Enter the units using multiplication\/division operations. The appearance of the parameters and variables can be seen in the figure.<\/p>\n\n\n\n<p><strong>2.<\/strong>\u00a0Calculate the cross-sectional area and diameter by entering A:p&lt;Ctrl+g>*R^2 and d:2*R, respectively. Typing the = sign after entering these formulae yields the values of the area and the diameter. Mathcad automatically assigns SI units to quantities, yielding area in square meters (m<sup>2<\/sup>) and diameter in meters. The units are changed to square centimeters (cm<sup>2<\/sup>) and centimeters by clicking on the Mathcad units and entering the desired units.<\/p>\n\n\n\n<p><strong>3.<\/strong>\u00a0Enter the radial position and velocity data by defining row matrices for each: r:&lt;Ctrl+m> and v.r:&lt;Ctrl+m>. The &lt;Ctrl+m> key sequence brings up an Insert Matrix dialog box; enter the number of rows (1) and the number of columns (11). Click OK in the dialog box to create the matrix, and enter the respective data values. Assign units to the variables\u00a0<em>r<\/em>\u00a0and\u00a0<em>v<sub>r<\/sub><\/em>\u00a0in a similar manner as earlier; that is, using multiplication\/division operations. (It should be noted that typing v.r creates a variable named\u00a0<em>v<sub>r<\/sub><\/em>. The subscript\u00a0<em>r<\/em>\u00a0is not the index of the variable.)<\/p>\n\n\n\n<p><strong>4.<\/strong>\u00a0Calculate the flow rate in each ring (corresponding to\u00a0equation 5.7) by entering D&lt;Ctrl+g>Q.r[0,j:2*p&lt;Ctrl+g>*r[0,j *(r[0,j+1 -r[0,j)*v.r[0,j. (Note that three spaces must be inserted after \u201cj+1\u201d and two spaces must be inserted between \u201cj\u201d and \u201c)\u201d in this expression.) The key sequence D&lt;Ctrl+g>Q.r creates the variable \u0394<em>Q<sub>r<\/sub><\/em>, and the sequence [0,j identifies it as the flow rate corresponding to the\u00a0<em>j<\/em>th location. Of the terms on the right side of the equation, r[0,j represents the radial location\u00a0<em>r<\/em>, (r[0,j+1 -r[0,j) represents the thickness of the ring, and v.r[0,j represents the velocity corresponding to that radial location. As seen from\u00a0Figure 5.14, \u0394<em>Q<sub>r<\/sub><\/em>\u00a0is a matrix containing 1 row and 10 columns, with the numbers representing the flow in each differential element. The range of index j needs to be defined before these flow rate calculations can be performed; type j:0;9. To obtain the total flow rate\u00a0<em>Q<\/em>\u00a0by summation of the \u0394<em>Q<sub>r<\/sub><\/em>\u00a0values, type Q:&lt;Ctrl+4>D&lt;Ctrl+g>Q.r. The &lt;Ctrl+4> sequence inserts the summation operator in the Mathcad worksheet.<\/p>\n\n\n\n<p><strong>5.<\/strong>\u00a0Calculate the average velocity and the Reynolds number by entering the appropriate formulae. As mentioned previously, the units by default are SI units and need to be changed if the answers are desired in other units.<\/p>\n\n\n\n<p>It can be seen that the solution using Mathcad differs slightly from that obtained using Excel. The explanation for this discrepancy is left to the reader.<\/p>\n\n\n\n<p><a><\/a>Example 5.4 Shear Force on Pipe Wall<\/p>\n\n\n\n<p>For the flow problem in\u00a0Example 5.3, what is the shear force exerted at the pipe surface? Assume the pipe length to be 2 m.<\/p>\n\n\n\n<p>Solution algorithm<\/p>\n\n\n\n<p>The shear force,&nbsp;<em>F<sub>shear<\/sub><\/em>, is obtained by multiplying the shear stress by the area of the surface (<em>A<sub>shear<\/sub><\/em>) over which it acts. From&nbsp;<a href=\"https:\/\/learning.oreilly.com\/library\/view\/fundamental-concepts-and\/9780134594064\/ch05.xhtml#ch05equ02\">equation 5.2<\/a>, we get the following:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9780134594064\/files\/graphics\/e_05equ07.jpg\" alt=\"Image\"\/><\/figure>\n\n\n\n<p>Here&nbsp;<em>A<sub>shear<\/sub><\/em>&nbsp;is given by the following:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9780134594064\/files\/graphics\/e_05equ08.jpg\" alt=\"Image\"\/><\/figure>\n\n\n\n<p>The velocity gradient is obtained from the data in&nbsp;<a href=\"https:\/\/learning.oreilly.com\/library\/view\/fundamental-concepts-and\/9780134594064\/ch05.xhtml#ch05tab02\">Table 5.2<\/a>. The following is used for numerical differentiation:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9780134594064\/files\/graphics\/e_05equ09.jpg\" alt=\"Image\"\/><\/figure>\n\n\n\n<p>Solution (using a spreadsheet program)<\/p>\n\n\n\n<p>The calculations using Excel are shown in&nbsp;<a href=\"https:\/\/learning.oreilly.com\/library\/view\/fundamental-concepts-and\/9780134594064\/ch05.xhtml#ch05fig16\">Figure 5.16<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9780134594064\/files\/graphics\/05fig16.jpg\" alt=\"Image\"\/><\/figure>\n\n\n\n<p><a><\/a><strong>Figure 5.16<\/strong>&nbsp;Shear force calculation using Excel.<\/p>\n\n\n\n<p>The length of pipe is shown in cell F6. The shear force calculation is in cell C19 with the formula as shown. The conversion factor of 100 is used to convert the length units from meter to centimeter. The shear force obtained is ~214 dyn. The answer unit is converted into SI unit force (newtons, or N) using a conversion factor of 1 dyn = 10<sup>\u22125<\/sup>\u00a0N.<\/p>\n\n\n\n<p>Solution (using Mathcad)<\/p>\n\n\n\n<p>The solution involves inserting the following statements in the previous Mathcad document:<\/p>\n\n\n\n<p><strong>1.<\/strong>&nbsp;L:2*m<\/p>\n\n\n\n<p><strong>2.<\/strong>&nbsp;F.shear:m&lt;Ctrl+g&gt;*(v.r[0,10 -v.r[0,9)\/r[0,9 -r[0,10 *2*p&lt;Ctrl+g&gt;*R*L<\/p>\n\n\n\n<p>(Note that two spaces are inserted before \u201c-v.r\u201d; one space before \u201c)\u201d; one space before \u201c-r\u201d; and four spaces before \u201c*2*\u201d.)<\/p>\n\n\n\n<p>The shear force is calculated to be 2.149 \u00d7 10<sup>\u22123<\/sup>&nbsp;N, as seen in&nbsp;<a href=\"https:\/\/learning.oreilly.com\/library\/view\/fundamental-concepts-and\/9780134594064\/ch05.xhtml#ch05fig17\">Figure 5.17<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9780134594064\/files\/graphics\/05fig17.jpg\" alt=\"Image\"\/><\/figure>\n\n\n\n<p><a><\/a><strong>Figure 5.17<\/strong>&nbsp;Shear force calculation using Mathcad.<\/p>\n\n\n\n<p>The result is identical to that obtained using Excel. Entering the formula in Excel is slightly easier than in Mathcad. On the other hand, Mathcad offers automatic conversion of units, removing the need for manually entering the conversion factors.<\/p>\n\n\n\n<p>The accuracy of derivative computations increases with a decrease in the thickness of the ring. Additional radial position-velocity data availability at intervals of 0.05 cm rather than 0.1 cm would increase the number of computations but enable us to estimate the velocity derivative more accurately. The flow rate computations would also be more accurate.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Chemical engineers encounter problems ranging in complexity from simple arithmetic calculations to highly involved ones requiring programming. The following examples present of a few of these problems along with solution techniques using Excel and Mathcad. Example 5.1 Friction Factor for Pipe Flow Calculate the Fanning friction factor using the Nikuradse equation for the flow of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4598,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[561],"tags":[],"class_list":["post-4654","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-5-computations-in-fluid-flow"],"jetpack_featured_media_url":"https:\/\/workhouse.sweetdishy.com\/wp-content\/uploads\/2024\/09\/flow-1.png","_links":{"self":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts\/4654","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=4654"}],"version-history":[{"count":1,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts\/4654\/revisions"}],"predecessor-version":[{"id":4655,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts\/4654\/revisions\/4655"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/media\/4598"}],"wp:attachment":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/media?parent=4654"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/categories?post=4654"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/tags?post=4654"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}