Professional Documents
Culture Documents
Faculty of Engineering
Department of Chemical Engineering
1. Check each of the following and state with reason whether it is an acceptable variable
name in GNU Octave or not. [10 marks]
a. CHEN309GRADE f. whole-sale-price
b. dy/dx g. id&numb
c. -CGPA h. D^2
d. 3rho i. CA_0
e. Min Concentration j. sqrt(40)
2. Convert the following mathematical equations into their GNU Octave equivalents. [5
marks]
𝑘 𝑧
cosh[𝐿(√ )(1− )]
𝐷𝐴𝐵 𝐿 0.00266𝑇 3/2
a. 𝐶𝐴 = 𝐶𝐴𝑜 𝑘
𝑏.𝐷𝐴𝐵 = 𝜎 +𝜎 2 1 1
cosh[𝐿√ ] Ω𝑃( 𝐴 𝐵 ) √ +
𝐷𝐴𝐵 2 𝑀𝐴 𝑀𝐵
4. Four reactors are connected by pipes, where directions of flow are depicted by means
of arrows as shown in Figure Q4. The flow rate of the key component is given by the
volumetric flow rate Q(liter /sec) multiplied by the concentration C (g/liter) of the
component. The incoming flow rate is assumed to be equal to the outgoing rate.
𝑸𝟑𝟐 𝑪𝟑
𝑸𝟐𝟏 𝑪𝟐 𝑸𝟒𝟑 𝑪𝟒
𝑸𝟐𝟒 𝑪𝟐
Key component material balances around the 4 reactors are given as follows:
Reactor 1: 350 + 25𝐶2 = 75𝐶1 Reactor 2: 45𝐶3 = 45𝐶2
Reactor 3: 75𝐶1 + 30𝐶4 = 105𝐶3 Reactor 4: 150 + 20𝐶2 = 30𝐶4
a. Rewrite the above equations in Matrix-Vector format. [4 marks]
b. Write a GNU Octave code to calculate the concentration of the key component
at each reactor (i.e. 𝐶1 , 𝐶2 , 𝐶3 𝑎𝑛𝑑𝐶4 ) [6 marks]