3K4 2013 Tutorial Week 5
3K4 2013 Tutorial Week 5
Kevin Dunn, [email protected] Objectives of this short assignment: We are going to start using software more frequently in the course, because the equations we deal with are too difcult to integrate analytically. So the main purpose of this tutorial is: To install and use a numerical integration software package on your computer. You may use any software, but Python, MATLAB and Polymath are recommended candidates. Ensure you can use the software to successfully integrate one or more differential equations.
Question 1
A can of your favourite beverage, initially at 25C, is placed in the fridge, where the ambient temperature is 5C. Plot the temperature prole of the cans contents (assume the contents are well mixed) over time. The temperature of the cans contents, T , can be derived and modelled as: dT = K (T Tf ) dt where t is the time, in minutes, K is the heat transfer coefcient that lumps the cans properties into a single variable, and Tf is the fridge reference temperature. 1. Plot the temperature proles for K = 0.03 min1 , K = 0.09 min1 and K = 0.15 min1 on the same plot, on a range to 1 hour. 2. Repeat the same exercise, but use a logarithmic y -axis. Comment on the results from this part, as compared to the previous part.
Question 2
This question is a good check to ensure you are using the software correctly: you must be able to get the same answer with the software that you get analytically. A batch bioreactor is charged with substrate at time t = 0 to start a reaction that will consume the substrate. The reaction mechanism is too complex to model exactly, but previous experience suggests it is roughly a rst-order reaction, with apparent rate expression is rS = kS CS , where kS = 0.58 hour1 , and CS is the concentration of the substrate being depleted.
1. Show that the rate of change of the concentration of S is given by: dCS = kS CS (t) dt 2. The time required to consume the substrate from a starting level of 260 mol.L1 to 5 mol.L1 can be calculated by analytical integration of the above expression. What is the total time required? 3. The tank volume is doubled; how long will the duration be to go from the same starting to nal substate concentration? 4. Use software tools and integrate between the same limits and calculate the result numerically. Verify that your result matches the analytical answer. Show the software source code you wrote to nd the solution.
Question 3
From the midterm, the solution to the last question was to write the ODEs: (1 X )2 (y )2 rA (1 X )2 (y )2 dX (1 + X )2 = = = 1 . 808 dW F A0 (1 + 0.5X )2 0.005 mol.s1 dy 5.17 104 = (1 + X ) = (1 + 0.5X ) dW 2y 2y X (W = 0) = 0.0 y (W = 0) = 1.0 (1 105 )(30.07)2 1. Integrate the solution from W = 0 zero to W = 235.6 kg and include the proles of conversion and y (on the same graph) as your answer. 2. What is the pressure leaving the reactor? 3. What is the conversion leaving the reactor? 4. What is the conversion midway along the reactors length? Note: in the course project and future questions, you will NOT simplify the equations. You will write multiple equations for the knowns and unknowns and let the software do all the work for you. END