You are on page 1of 4

Date: DEC-05-2023

LAB MANUAL
CHEMICAL PROCESS OPTIMIZATION (CH-404)
Lab No: 04 Roll No: 20313
LAB ASSESSMENT RUBRICS

TITLE:
Using the Knowledge of matrices to solve linear algebraic equations.
DESCRIPTION:
Task 1: Solution of simultaneous linear equations.
Question 1: Steady-state material balance on a separation train. p-xylene, styrene, toluene and
benzene are to be separated with the array of distillation columns shown in figure. Where F, D, B, D1,
D2, B1, B2 are molar flow rates, mol/min.
Date: DEC-05-2023
LAB MANUAL
CHEMICAL PROCESS OPTIMIZATION (CH-404)
Lab No: 04 Roll No: 20313

CODES:
1. m. file:
%TASK 1%
A=[0.07 0.18 0.15 0.24;0.04 0.24 0.10 0.65;0.54 0.42 0.54 0.10;0.35 0.16 0.21
0.01]
B=[10.5;17.5;28;14]
X=inv(A)*B
D1 = X(1)
B1 = X(2)
D2 = X(3)
B2 = X(4)
D= D1+B1;

Xdx=(0.07*D1+0.18*B1)/D
XDs=(0.04*D1+0.24*B1)/D
XDt=(0.54*D1+0.42*B1)/D
XDb=(0.35*D1+0.16*B1)/D
B=D2+B2
XBx=(0.15*D2+0.24*B2)/B
XBs=(0.10*D2+0.65*B2)/B
XBt=(0.54*D2+0.10*B2)/B
XBb=(0.21*D2+0.01*B2)/B

2. command window:
command window has been attached

RESULT & DISCUSSION:


The results are found to be
D1 = 26.2500, B1 = 17.5000; D2 =8.7500; B2 =17.5000; Xdx =0.1140; XDs =0.1200;
XDt =0.4920;XDb =0.2740;B =26.2500;XBx =0.2100;XBs =0.4667;XBt =0.2467;XBb =0.0767
Date: DEC-05-2023
LAB MANUAL
CHEMICAL PROCESS OPTIMIZATION (CH-404)
Lab No: 04 Roll No: 20313
Question 2: Steady state material balance for liquid mixing reactor. The complex
reaction is occurred in liquid mixing reactor.

a) solve for the reactor volume (V) 100[L], feed composition ( ), feed rate(Q) 50[ ].
The initial values are all 0, use global Q. (chap 2 solutions of eq.)
b) Show the solutions as like Figure (2) for change of feed rate
12:1:100. CA0 and V can be transferred by global, and use num2str() for text.
Express all letters and numbers are bold face and line width as
2.

CODES:
1. m. file:
clear all; close all; clc;
global Q
fprintf('\n answer a) : system of nonlinear equations\n' );
Q=50; x0(1)=0; x0(2)=0; x0(3)=0; x0(4)=0;
x=fsolve('prob_2fun',x0,optimset('Disp','off'));
fprintf('CA=%6.4f, CB=%6.4f, CC=%6.4f, CD=%6.4f [gmole/L]\n', x);
% answer b)
global CA0 V
fprintf('answer b) -> See Figure(2)\n' );
q=12:1:100;
for i=1:length(q);
Q=q(i);
x=fsolve('prob_2fun',x0,optimset('Disp','off'));
CA(i)=x(1); CB(i)=x(2); CC(i)=x(3); CD(i)=x(4);
end
Date: DEC-05-2023
LAB MANUAL
CHEMICAL PROCESS OPTIMIZATION (CH-404)
Lab No: 04 Roll No: 20313
figure(2); set(2,'color','w')
plot(q,CA,q,CB,q,CC,q,CD,'linewidth',1.5)
grid on
xlabel('\bf{Q, [L/sec]}');
ylabel('\bf{Concentrations, [gmole/L]}');
title('\bf{Variation of each components for flow ratechange}');
text(50,2.45,'\bf{Given Conditions}')
text(50,2.25,['CA_0=' num2str(CA0,'%3.1f')
'[gmol/L]'],'fontweight','b');
text(50,2.05,['V =' num2str(V, '%3.0f')
'[L]'],'fontweight','b');
text(11,CA(1),'\bfA'); text(11,CB(1),'\bfB');
text(11,CC(1),'\bfC'); text(11,CD(1),'\bfD');
L=length(CA);
text(95,CA(L),'\bfA');text(95,CB(L),'\bfB');
text(95,CC(L),'\bfC');text(95,CD(L),'\bfD');
set(gca,'fontweight','b')
% answer c)
global k1 k2 k3 k4
Q=50;
A=[Q+V*(k1+k2) 0 -k3 0;
2*V*k1 -(Q+V*k4) 0 0;
V*k2 V*k4 -(Q+V*k3) 0;
0 V*k4 0 -Q];
B=[CA0*Q ; 0; 0; 0];
X=inv(A)*B;
fprintf('answer c) : system of linearized linearequations\n' );
fprintf('CA=%6.4f, CB=%6.4f, CC=%6.4f, CD=%6.4f [gmole/L]\n', X);
RESULT & DISCUSSION:

You might also like