Page 224 - Numerical methods for chemical engineering
P. 224

210     4 Initial value problems



                   at z = h(t) to the values at the pipe outlet at z =−L p ,
                      
         2
                       1   dh                  1   2
                        ρ       + p atm +ρgh −   ρv + p atm + ρg(−L p ) = net viscous loss > 0
                                                   p
                       2    dt                 2
                                                                                     (4.251)
                   The net viscous loss is dominated by the entrance flow at the pipe outlet and the viscous
                   dissipation within the outlet pipe itself,

                                                1   2        L p   1  2
                             net viscous loss ≈ K L  ρv p  + f D    ρv p             (4.252)
                                                2            D p   2
                   For a well-rounded entrance, K L ≈ 0.2. The friction factor f D is a function of the Reynolds’
                   number in the pipe,
                                                      ρv p D p
                                                 Re =                                (4.253)
                                                        µ
                   For laminar flow when Re < 2100, f D = 64/Re.For Re > 4000, the friction factor can be
                   estimated from the empirical Colebrook equation

                                        1             (e/D p )  2.51
                                       √    =−2log          +    √                   (4.254)
                                                   10
                                         f D            3.7    Re  f D
                   e is the characteristic surface roughness length of the pipe wall, and for commercial steel is
                   0.045 mm. In the intermediate range 2100 < Re < 4000, it is difficult to predict the friction
                   factor.
                     Plot the height of water and the volume of water in the tank as functions of time. How
                   long does it take for the tank to empty?

                   4.B.2. For the test equation, ˙ x = λx, Re(λ) < 0, plot the region of absolute stability for the
                   RK4 method in the complex plane of ω =−( t)λ.
                   4.B.3. Consider the calculation of radial integrals in three dimensions,
                                        '  R               '  1
                                                                      2
                                                  2
                                    I F =   f (r)4πr dr = R 3  f (ξ R)4πξ dξ         (4.255)
                                         0                  0
                   Write a routine that computes the Gaussian quadrature weights and nodes {ξ 0 , ξ 1 ,..., ξ N }
                                                  2
                                                          m
                   for N = 3, 5, 7. For f (r) = 1 + r + r + ··· + r , R = 1, plot the error in the computed
                   integral as a function of degree m. Compare the errors to those obtained from Newton Cotes
                   integration with N + 1 support points.
                   4.C.1. Consider again the tank in Problem 4.B.1. We want to maintain the height of water
                   at h set = 1.5 m by adding an input water stream of volumetric flowrate υ in . Compute the
                   inlet flow rate υ in,set that maintains h set at steady state.
                     Next, let us say that there is a second inlet whose flow rate υ in,2 (t) we cannot control.
                   We then must use feedback control to vary υ in (t) in order to maintain a constant height. Let
                   the error of the height from its set point be e(t) = h(t) − h set and let υ in (t) = υ in,set + u(t),
                   where for a proportional integral derivative (PID) controller
                                                       '  t
                                                     1              de
                                      u(t) = K C e(t) +   e(s)ds + τ D               (4.256)
                                                     τ I  0         dt
   219   220   221   222   223   224   225   226   227   228   229