You are on page 1of 2

KETA01 & KKK01, 2007-2008 Computer Lab 10 Solution of a dierential equation Three tanks in series are used to preheat

an oil solution. Steam condensed within coils is used to heat the oil. The oil is fed into the rst tank and overows into the second and the third tanks at the same ow rate.

Energy balances can be made on each of the individual tanks: ACCUMULATION = INPUT - OUTPUT. For each of the three tanks this gives a dierential equation M Cp dT1 dt dT2 M Cp dt dT3 M Cp dt = W Cp T0 + U A(Tsteam T1 ) W Cp T1 = W Cp T1 + U A(Tsteam T2 ) W Cp T2 = W Cp T2 + U A(Tsteam T3 ) W Cp T3 (1) (2) (3)

where the parameters are dened as follows: t = time (in min) M = mass of oil in each tank (in kg) W = mass ow rate of oil into the rst tank (in kg/min) Cp = heat capacity of oil (in kJ/kg C) U = heat transfer coecient (in kJ/min m2 C) A = area of the coil in each tank (in m2 ) 1

T0 = temperature of oil fed to the rst tank (in C) Tsteam = temperature of steam (in C) Ti = temperature in tank i (in C) and the following values are given: M = 1000 W = 100 Cp = 2 U A = 10 T0 = 20 Tsteam = 250 1. Identify the independent variable and the dependent variables and write the system in vector form, T = f (t, T ). 2. Write an M-le function Tprime=lab10(t,T) that, for given input variables time, t, and temperatures in each tank, T, computes the right-hand side of the system, f (t, T ). 3. In steady-state the derivatives are zero. Determine the steady-state temperatures in all three tanks. 4. Solve the dierential equation with ode45 for the rst 6 hours (note that time should be entered in minutes) and display the output in tabular form. 5. What time interval will be required for T3 to reach 99% of this steadystate value during startup? You may have to solve the system once more, specifying the points at which you want the solution. 6. Use subplot to plot the three temperatures separately.

You might also like