Practice Problem on Linear Algebra
1. A stage extraction process is depicted in Figure. In such systems, a stream containing a
weight fraction Yin of a chemical enters from the left at a mass flow rate of F1.
Simultaneously, a solvent carrying a weight fraction Xin of the same chemical enters from
the right at a flow rate of F2. Thus, for stage i, a mass balance can be represented as
F1Yi−1 + F2 Xi+1 = F1Yi + F2Xi
At each stage, an equilibrium is assumed to be established between Yi and Xi as in K =Xi/Yi
(a) Develop the linear set of equations for Yi in AX=B form, with K = 0.5 and F1 = 100 kg/s
and F2 = 50 kg/s. Assume steady state.
(b) Solve by LU Decomposition
(c) Solve by Gauss Jacobi with initial guesses as 1. Write a MATLAB code.
2. An irreversible, first-order reaction takes place in four well mixed reactors, A
k
B . Thus,
the rate at which A is transformed to B can be represented as
r = - kcA
The reactors have different volumes, and because they are operated at different temperatures,
each has a different reaction rate:
(a) Develop the linear set of equations for concentrations of A and B in AX=B form at
steady state.
(b) Solve by Gauss elimination and Gauss-Seidel method (initial guess are [0,0]T). Write a
MATLAB code for the both.