# Difference between revisions of "Written midterm"

 Date: 18 October 2010 (PDF) Question paper

<rst> <rst-options: 'toc' = False/> <rst-options: 'reset-figures' = False/>

.. rubric:: Special instructions

- You may bring in any printed materials to the final; **any** textbooks, **any** papers, *etc*. - You may use any calculator during the test. - You may not use a cellphone as a calculator. Nor may you use any other communication device (web, email, chat, etc) during the test. - You may not use any type of computer. - You may answer the questions in any order in the answer booklet. - The test covers all material taught so far in the course. - Make sure that you provide explanations with your calculations. - If you are not sure about the meaning of a problem, please write out your interpretation and follow through with the calculation. - If you are short of time, please write what you would have done in this test, if you had more time. - There are a total of **45 marks** available.

.. raw:: latex

   \pagestyle{plain}
\vspace*{0.2cm}


\hrule \vspace*{0.2cm} \newpage

.. Chemical engineering modelling [16] .. Roundoff and computer representation [6] .. Linear algebraic equations [16] .. Taylor-series expansion [4] .. Non-linear equation solution [8]

Question 1 [11]

###### ===

Consider the following 3 reactions taking place in a liquid-based system: a continuously stirred tank reactor (CSTR).

• :math:{\sf A} \stackrel{r_1}{\rightarrow} {\sf 2B}, where :math:r_1 = k_1 C_{\sf A}
• :math:{\sf A} \displaystyle \mathop{\rightleftharpoons}_{r_3}^{r_2} {\sf C}, where :math:r_2=k_2 C_{\sf A}^{1.5} and :math:r_3 = k_3 C_{\sf C}^2
• :math:{\sf 2B} \stackrel{r_4}{\rightarrow} {\sf 3D + C}, where :math:r_4 = k_4 C_{\sf B}^2

Derive the equations that can be solved for the steady state concentrations of :math:\sf A, B, C and :math:\sf D. You may assume that species :math:\sf A is fed to the reactor in a single stream, flowing in at :math:Q \text{m}^3/\text{s}, with a concentration of :math:C_{\sf A}^{\text{in}}. Please state all other assumptions that you make while answering the question.

Question 2 [5]

###### ==

Consider the system in question 1 again, but modified now to be a semi-batch system - material only enters the reactor, but nothing leaves. Continue on from question 1, using any equations derived there and any assumptions stated there, and derive the dynamic balances **only for species** :math:C_{\sf A} **and** :math:C_{\sf D}.

Question 3 [2]

###### ==

Represent the decimal number, -1.0, in an 8-bit word that uses 1 bit for the sign, 3 bits for the signed exponent and the remaining bits for the significand. Normalization must be used for the significand and only zero or one entries can used in each bit position.

Question 4 [4 = 2 + 1 + 1]

###### ===============

4.1 A linearized system of equations, :math:Ax = b, has been constructed for a very high accuracy model of a distillation column. There are at most 12,000 equations in the system. What is the size, in megabytes, required to store :math:A at double precision?

4.2 Can this matrix be stored in 1 gigabyte of RAM?

4.3 The matrix :math:A is sparse (i.e. consists mostly of zeros). The number of non-zero elements is about 16,000. How much RAM, in megabytes, would be required to only store the non-zero entries?

Question 5 [11 = 2 + 2 + 2 + 5]

###### ============================

This questions considers a simple model of a 3-stage absorber (a similar model was used in assignment 2 in the course, but it is not exactly the same as the model used here).

An illustration of the system, and the steady-state equations for system can be shown to be:

.. figure:: images/absorber-column-midterm.png :scale: 30 :align: center

.. math::

y_F &= 0.5\\ \frac{1}{\beta} y_F - (\delta+1)x_1 + \delta x_2 &= 0 \\ x_1 - (\delta+1)x_2 + \delta x_3 &= 0 \\ x_2 - (\delta+1)x_3 + \delta x_F &= 0 \\ x_F &= 0.1

where :math:\beta is a coefficient, assumed constant throughout the absorber tower, that relates the liquid phase composition, :math:x_n, to the gas-phase composition, :math:y_n = \beta x_n, assuming of course that equilibrium is achieved in each stage.

The :math:\delta coefficient is a dimensionless number defined as a function of the molar gas and liquid flows in the column, and :math:\beta, so that :math:\delta = \displaystyle \frac{L}{G \beta}

• 5.1** Write the given steady-state equations in the form :math:A{\bf x} = b where :math:{\bf x} = \left[y_F, x_1, x_2, x_3, x_F\right]. Report the :math:A matrix and :math:b vector.
• 5.2** What condition(s) must be satisfied so that matrix :math:A is diagonally dominant?
• 5.3** You decide to use the Gauss-Seidel method to solve this system of equations. Also, you are given that :math:L/G = 1.5, and :math:\beta = 0.8. Is this method guaranteed to converge for these coefficient values?
• 5.4** Perform one iteration of the Gauss-Seidel method, starting from a suitable initial guess that you believe will converge in fewer iterations than simply using the default guess of :math:{\bf x} = \left[y_F, x_1, x_2, x_3, x_F\right] = [0, 0, 0, 0, 0]. Use :math:L/G = 1.5, and :math:\beta = 0.8 in your matrix, and briefly explain your choice for the initial guess.

Question 6 [5 = 4 + 1]

###### ============================
• 6.1** When implementing either the Gauss-Seidel method, or the Jacobi method to solve **any** system of equations, :math:A{\bf x} = b, you can experience trouble with convergence. What are 2 options you can implement to try obtain convergence with these methods? Clearly explain what each option does to try achieve convergence.
• 6.2** The Gauss elimination process to solve the system of equations, :math:A{\bf x} = b uses partial pivoting. Please give a reason why this partial pivoting process is performed.

Question 7 [2]

###### ====

In solving the equation, :math:f(x)=0 for a single variable, :math:x, how many steps of the bisection method are necessary to guarantee the solution is within an interval of width :math:\varepsilon = 2 \times 10^{-6}, starting with an interval that is 10 units wide?

Question 8 [5]

###### =======

Consider the modelling of a jacketed CSTR, fed with a single inlet stream. Under some fairly straightforward assumptions, one can show that the steady state temperature of the fluid leaving the tank is given by:

.. figure:: images/CSTR2_1feed_jacket.png :scale: 76 :align: center

.. math::

\frac{F^{\rm in}}{V}[T^{\rm in}-T] - \frac{UA_s}{\rho\,c_p\,V}[T - T_j] + \frac{2\,k_0\,(-\Delta H_r)}{\rho\,c_p}\,C_{\sf A}^2\,e^{\displaystyle -\frac{E_a}{RT}} = 0 \\ \text{After substituting in relevant values for the constant physical properties, and fixing the value of $C_{\sf A}$, the equation can be reduced to:}& \\ 2.6 - 1.45 T + 5 \times 10^{5} e ^{-\tfrac{2000}{T}} = 0

Please perform 2 iterations of the Newton-Raphson algorithm for finding the roots of a nonlinear equation. A reasonable starting guess for :math:T^{(0)} is the same temperature as the inlet stream: i.e. :math:T^{(0)} = T^{\rm in} = 290 {\rm K}. Note: you do not need to derive the energy-balance equation above.

.. raw:: latex

\vspace{0.5cm} \hrule \begin{center}END\end{center}

</rst>