Tutorial 5 - 2013
Due date(s): | All questions due as assignment 3B |
(PDF) | Tutorial questions |
(PDF) | Assignment solutions |
Assignment objectives
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 difficult 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 25°C, is placed in the fridge, where the ambient temperature is 5°C. Plot the temperature profile of the can's contents (assume the contents are well mixed) over time. The temperature of the can's contents, \(T\), can be derived and modelled as:
where \(t\) is the time, in minutes, \(K\) is the heat transfer coefficient that lumps the can's properties into a single variable, and \(T_f\) is the fridge reference temperature.
- Plot the temperature profiles for \(K = 0.03\,\text{min}^{-1}\), \(K = 0.09\,\text{min}^{-1}\) and \(K = 0.15\,\text{min}^{-1}\) on the same plot, on a range to 1 hour.
- 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 first-order reaction, with apparent rate expression is \(-r_S = k_S C_S\), where \(k_S = 0.58\,\text{hour}^{-1}\), and \(C_S\) is the concentration of the substrate being depleted.
Show that the rate of change of the concentration of S is given by:
\[\frac{dC_S}{dt} = -k_S C_S(t)\]The time required to consume the substrate from a starting level of \(260\,\text{mol.L}^{-1}\) to \(5\,\text{mol.L}^{-1}\) can be calculated by analytical integration of the above expression. What is the total time required?
The tank volume is doubled; how long will the duration be to go from the same starting to final substate concentration?
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 find the solution.
Question 3
From the midterm, the solution to the last question was to write the ODEs:
- Integrate the solution from \(W=0\) zero to \(W = 235.6\,\text{kg}\) and include the profiles of conversion and \(y\) (on the same graph) as your answer.
- What is the pressure leaving the reactor?
- What is the conversion leaving the reactor?
- What is the conversion midway along the reactor's 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.