KMU-206 Questions for Midterm I

 

 

1.                 Write a MATLAB® script to solve the following Continuous Stirred Tank Reactor (CSTR) problem using Gauss-Siedel iteration. Five CSTR’s are connected in series. Find the exit concentration from each reactor.

 

Assumptions for the system are:

§    

ki

 
Steady state system

§     First-order irreversible reaction in liquid phase AŕB

§     No change in volume or density of liquid

§     Rate of disappearance of solute in reactor given by: Ri=VikiCi  mol/h

 

Reactor 1

Reactor 2

Reactor 3

Reactor 4

Reactor 5

Vi (L)

100

150

75

40

80

ki (h-1)

0.1

0.2

0.3

0.5

0.3

 

 

Hints: First set up the material (mass) balance equations for each of the reactors

Remember: input-output-disappearance by reaction-accumulation=0, where accumulation will be zero for a steady state system.

You will have 5 equations and 5 unknown variables Ci, where i=1:5

Make sure the system of linear equations is diagonally dominant.

 

 

2.                 Write a MATLAB® function to calculate the condition number of a symmetric square matrix of any size by means of Eigenvalues:

§     The power method should be used to calculate the Eigenvalues.

§     The script (function) should give an error message if the matrix is not square and/or is not symmetric.

§     The result of the built-in MATLAB® function “cond” should be displayed in addition to the results of the power method.

For example:

 

function  [condPower,condMatlab]=NameofFunction(A,…)

condPower=…;

condMatlab=cond(A);

fprintf(‘Condition of matrix calculated using the Power method is %5.2g and using cond(A) is %5.2g \n’, condPower,condMatlab);