QuestionQuestion

Transcribed TextTranscribed Text

2. Flow-through tanks The system illustrated below is a two-chambered ethanol tank with a fixed-rate inflow and a level- dependent outflow. Initially, the total volume in both chambers of the tank is 12.06 m³. Q1 T Q2 5 (a) You have measurements of the flow rates into (Q1) and out of (Q2 the tank, in terms of time. In- tegrate using trapezoidal rule to determine the volume of ethanol in the tank at 10 S intervals. The relevant integral looks like V = + - t (s) Q1 (m³/s) Q2 (m³/s) t (s) Q1 (m³/s) Q2 (m³/s) 0.0630 0.0854 40 0.0630 0.0828 10 0.0630 0.0850 50 0.0630 0.0820 20 0.0630 0.0842 60 0.0630 0.0814 30 0.0630 0.0836 5 (b) The data has been collected such that trapezoidal rule or Simpson's rule is appropriate. Gauss quadrature has far better error behaviour, especially with many points per interval and exact data. Explain the practical difficulties associated with collecting data suitable for Gauss quadrature. 5 (c) The per-interval formulas for trapezoidal rule and Simpson's 1/3 rule have a significant advantage over the entire-integral formulas in a modern environment. Explain this advantage. 5 (d) Explain why Gauss quadrature tables are given over a normalized range of (-1, +1). 3. Falling object in air The velocity of an object falling vertically through air is known to be well-approximated by a two- parameter model, at least through the initial acceleration: U=gt-kt³ = where time is in seconds, and g & k are the two unknown parameters. t (s) U (m/s) 2 22 4 35 6 51 8 79 10 80 10 (a) Transform the system into standard form for least squares, including specifying the parameters X and y, and any fit function(s), Q((x). 10 (b) Write out the matrix problem that must be solved, in terms of the fit function(s) Calculate all of the required sums from the above data. 5 (c) Solve the matrix problem for the unknown coefficients (hints: you expect that the unknown g will be close to the standard value of 9.81 m²/s, and the coefficient k is a reasonably round positive num- ber, something like 0.0150062) 5 (d) In this case, the root mean square error is relatively large: it's equal to 4.8 m/s. Explain why a large RMS error does not necessarily mean the model is a poor fit. There is no need to calculate the RMS error here, except perhaps as a check. 2. Flow-through tanks The system illustrated below is a two-chambered ethanol tank with a fixed-rate inflow and a level- dependent outflow. Initially, the total volume in both chambers of the tank is 12.06 m³. Q1 Q2 t (s) Q1 (m³/s) Q2 (m³/s) t (s) Q1 (m³/s) Q2 (m³/s) 0.0630 0.0854 40 0.0630 0.0828 10 0.0630 0.0850 50 0.0630 0.0820 20 0.0630 0.0842 60 0.0630 0.0814 30 0.0630 0.0836 (a) You have measurements of the flow rates into (Q1) and out of (Q2) the tank, in terms of time. In- tegrate using trapezoidal rule to determine the volume of ethanol in the tank at 10 S intervals. The relevant integral looks like = The simplest approach here is to integrate based on a table of the actual integrand, which in this case is Q1 - Q2. The divisions in the table are increments of 10 S, so here h = 10 S. trapezoidal rule over an interval is I and in this case each incremental integral represents an incremental change in volume. The resulting table is as follows: 3. Falling object in air solution3 The velocity of an object falling vertically through air is known to be well-approximated by a two- parameter model, at least through the initial acceleration: U=gt-kt³ - where time is in seconds, and 8 & k are the two unknown parameters. solution Numerical Methods 5 of 8 3 t (s) U (m/s) 2 22 4 35 6 51 8 79 10 80 (a) Transform the system into standard form for least squares, including specifying the parameters X and y, and any fit function(s), Q((x). No reorganization is required to apply least squares. The y parameter is best defined asy = U. The X parameter is most simply defined as time, x = t. The model equation simply becomes U=gt-kt³ y=ax-azx3 The model has two unknown parameters, each multiplied by a known function, so that the coeffi- cients and fit functions are a,=8 91(x)=: = x a2=k 02(x)=x3 = 3 (b) Write out the matrix problem that must be solved, in terms of the fit function(s) Calculate all of the required sums from the above data. For two fit functions, the matrix equation has the form N 20((x)102(x)) y,01(x) a as N (9(x))92(x)) [02((x) i=1 i=1 solutio. ~ 3 Numerical Methods 6 of 8 which simplifies to 4 xiyi The most straightforward approach here is to tabulate the fit functions and their products: x, y, Ó2 2(x,) x2 x1 x,6 xy x3y 2 22 2 8 4 16 64 44 176 4 35 4 64 16 256 4096 140 2240 6 51 6 216 36 1296 46656 306 11016 8 79 8 512 64 4096 262144 632 40448 10 80 10 1000 100 10000 106 800 80000 sum: 220 15664 1.31296x106 1922 133880 (c) Solve the matrix problem for the unknown coefficients (hints: you expect that the unknown g will be close to the standard value of 9.81 m²/s, and the coefficient k is a reasonably round positive num- ber, something like 0.0150062) The matrix problem is therefore 220 15664 a 1922 15664 1.31296x10 a 133880 which has the solutions a = 9.80478 a2 = -0.0150058 or, in the original form, 8 = 9.80478 k =0.0150058 U = 9.8051-0.015t³ - 2. Density of water At atmospheric pressure, the density of water has a maximum at a temperature of 4°C, and follows a near-parabolic curve around that temperature. The density of water at 4°C is known to be 999.9750 kg/m³. The resulting model has the form p=p(4°C)-Kf2 where k is an unknown coefficient, and where t = T - 4°C. 24 (a) Use linear least squares method to fit the data below to the above one-parameter model, using all six points (include the 4°C point, despite its incorporation in the model). Determine k. T (°C) p (kg/m³) 2 999.9429 4 999.9750 6 999.9430 8 999.8509 10 999.7021 12 999.4996 8 (b) The RMS error for the above fit is 0.003. Confirm this by calculating the RMS error directly. 4. Multi-parameter ODE solution Consider a four-parameter system: u(t), v(t), w(t), and x(t). The derivatives are given such that where each of the derivatives depends on all of the other parameters as well as time. The system is to be solved using RK2 method. 10 (a) Write out the values to be calculated to take two steps in RK2 method, with step size h, starting at an initial point of (up, Vo Wo xo), where to = 0. For credit, you must indicate precisely the order in which the values are to be calculated, as well as what is to be calculated. 10 (b) Explain the role of intermediate/fictitious/fake points in Runge-Kutta steps, especially for multi- parameter systems such as this one. Highlight such points in your solution to the first part of this question, or alternatively, detail them here. 2. Density of water At atmospheric pressure, the density of water has a maximum at a temperature of 4°C, and follows a near-parabolic curve around that temperature. The density of water at 4°C is known to be 999.9750 kg/m³. The resulting model has the form p=p(4°C)-Kt2 where k is an unknown coefficient, and where t = T - 4°C. (a) Use linear least squares method to fit the data below to the above one-parameter model, using all six points (include the 4°C point, despite its incorporation in the model). Determine k. T (°C) P (kg/m³) 2 999.9429 4 999.9750 6 999.9430 8 999.8509 10 999.7021 12 999.4996 The system must be reorganized to apply least squares, since the density at 4°C is known: x=t=T-4 p=p(1°C)-Kt2 There is just one unknown parameter in the resulting model equation, so that a1=-k y=-kx² Q1(x)==2 = The equation for a single-parameter least squares equation is a1 = Therefore, from the values and sums tabulated below, a = Ex,1 2 4 = -42.4920 5680 = -0.00748099 so that k = 0.00748099 = 0.75. Ti 2 4 2 2 Pi Xi Yi xi xi xixi anx, (yi - -a1x,²) 2 2 999.9429 -2 -0.0321 4 16 -0.1284 -0.029924 4.73522x10-6 4 999.9750 0.0000 0.000000 6 999.9430 2 -0.0320 4 16 -0.1280 -0.029924 4.31001x10-6 8 999.8509, 4 -0.1241 16 256 -1.9856 -0.119696 1.93972x10"5 10 999.7021 6 -0.2729 36 1296 -9.8244 -0.269315 1.28487x10-5 12 999.4996 8 -0.4754 64 4096 -30.4256 -0.478783 1.14454x10°5 sums: 5680 -42.4920 - 5.27365x10 (b) The RMS error for the above fit is 0.003. Confirm this by calculating the RMS error directly. The root-mean-square error can be calculated either in terms of y or of p, but both approaches give the same result here. As it is simpler, the following outlines the determination of RMS error in y. The above table shows the model estimates for y (second-last column) and the squares of the differences between the actual values Y1 and the estimated values a,x,2 (last column). The RMS error follows as i=6 1/2 1 -5 = 0.00296469 0 0.00 i=1 4. Multi-parameter ODE solution Consider a four-parameter system: u(t), v(t), w(t), and x(t). The derivatives are given such that f,(u,v,w,x,t)=v'( fw(w,w,w,x,t)=w'( fr(u,v,w,x,t)=x'(t where each of the derivatives depends on all of the other parameters as well as time. The system is to be solved using RK2 method. (a) Write out the values to be calculated to take two steps in RK2 method, with step size h, starting at an initial point of (uo, Yo Wo xo), where to = 0. For credit, you must indicate precisely the order in which the values are to be calculated, as well as what is to be calculated. First, determine the k1 values for the first step: k1u=hfu KIW The k2 values for the first step then depend on a fictitious (intermediate) point: (uo + KIu, so that +kivs Wo KIN, xo +k1x h) K2v = =hfy (uo + KIII VO +KIV Wo +kiw xo +kix h) k2w=hfw Wo KIW Xo + kix ,h) The (actual) point after the first step follows as u = 24++1(kin+k2u) V1 = vo+1(kivtk2v) W1 4=h The process is then repeated for the second step, in sequence, starting at the new point. The k1 values follow directly, KIU leading to a fictitious (intermediate) point, which gives the k2 values, k2v know h) K2x and ultimately the (actual and final) point after the second step: =11+1((kin+k2u) = ww++kim+k2w) t2=2h

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

    By purchasing this solution you'll be able to access the following files:
    Solution1.docx and Solution2.xlsx.

    50% discount

    Hours
    Minutes
    Seconds
    $35.00 $17.50
    for this solution

    PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

    Find A Tutor

    View available Numerical Analysis Tutors

    Get College Homework Help.

    Are you sure you don't want to upload any files?

    Fast tutor response requires as much info as possible.

    Decision:
    Upload a file
    Continue without uploading

    SUBMIT YOUR HOMEWORK
    We couldn't find that subject.
    Please select the best match from the list below.

    We'll send you an email right away. If it's not in your inbox, check your spam folder.

    • 1
    • 2
    • 3
    Live Chats