Tutorial 4 - 2010
Due date(s): | 7 October 2010 |
(PDF) | Tutorial questions |
Other instructions | Hand-in at class. |
Tutorial objectives
- Derive linear models for actual systems.
- Solve these models by hand, and with computer software.
Hand-in date:
- Tutorials must be handed in at the start of class on Thursday, 7 October.
Question 1 [1]
In the second tutorial you derived the set of linear equations for the reaction:
where \(n\), \(p\) and \(q\) denote the stoichiometric coefficients for the \(\sf P_4\), \(\sf H_2O\) and \(\sf H_3PO_4\) species respectively.
- Solve the linear equations using Gauss elimination, by hand.
- Verify your solution using the
mldivide
(MATLAB) orsolve
(Python) function. How long does it take to find the solution? Contrast this with the approach used in tutorial 2.
Question 2 [1.5]
When it comes down to the basics, any recipe can be reduced to 4 components: fat, carbohydrates, protein and moisture (usually water). What differentiates each recipe though is the list of ingredients which are combined, and the ratio of fat:carbohydrate:protein:water. Of course how the ingredients are mixed and the reactions that take place during cooking are also important, but that affects mainly taste and texture, not nutritional value.
Let's consider a biscuit recipe for this question. One can use butter for the fat component, use brown sugar and chocolate for the carbohydrate component (chocolate also contributes to the fat component), flour adds to the carbohydrate component also and somewhat to the protein component, while eggs, milk or water make up the rest of the recipe for protein and moisture.
We would like to blend raw materials where the ratio of fat:carbohydrate:protein:water of the uncooked ingredients is 20:50:10:20. We have the following ingredients available, broken down on a mass percentage basis.
Component | Butter | Lard | Flour | Sugar | Whole milk | Egg | Chocolate |
---|---|---|---|---|---|---|---|
Fat | 85 | 81 | 0 | 0 | 4 | 10 | 14 |
Carbohydrate | 0 | 1 | 86 | 98 | 6 | 1 | 75 |
Protein | 1 | 4 | 10 | 0 | 4 | 35 | 6 |
Moisture | 14 | 14 | 4 | 2 | 86 | 54 | 5 |
- Write down the 4 mass balance equations, one for each component, in the form \(Ax = b\), where \(x\) is vector that represents the mass of each ingredient to be used, a vector with 7 rows and one column.
- What is the technical (mathematical) reason why we cannot solve this system of equations using Gauss elimination? Translate your mathematical answer to English, explaining it in terms of the recipe.
- If we are constrained to using only butter, flour, whole milk and eggs: solve, using LU decomposition on the computer, for the amounts of each to be used, in grams, to obtain 100 grams of uncooked ingredients, in the required ratio.
If you prefer, you can interpret this question in the context of rubber manufacturing, where various oils, polypropylene and existing rubber materials are blended to create a new rubber with desired physical properties.
Question 3 [1.5]
In class we derived the molar balance for a species in a similar flowsheet. Use the slightly modified flowsheet below
and let \(\alpha\) be the proportion of \(m_3\) that is sent to reactor RB, and the rest, \((1-\alpha)m_3\), is sent to reactor RC. Similarly, let \(\beta\) represent the proportion of \(m_8\) that leaves the system, and let \((1-\beta)m_8\) be the amount sent to the recycle stream. Also let \(X_A\) be the conversion of the species in reactor RA, and similarly for \(X_B\) and \(X_C\).
Write a MATLAB or Python function that will return a matrix \(A\) given the five inputs, \(\alpha, \beta, X_A, X_B\), and \(X_C\). This matrix \(A\) represents the coefficients in the molar balances on the flowsheet, and these balances can be solved using \(Ax = b\).
Given that \(m_1\) = 10 mol/second, and that the molar conversion of the inlet stream to reactor A is 5%, i.e. \(X_A = 0.05\), \(X_B = 0.60\) and \(X_C = 0.85\). What are the molar flow rates, \(m_6, m_7, m_9\), and \(m_{10}\) when:
- \(\alpha=0.2\), \(\beta=0.7\)
- \(\alpha=0.2\), \(\beta=0.4\)
Are your answers reasonable?
You should use either MATLAB or Python's built-in functions to solve the system of equations.