Professional Documents
Culture Documents
CHE 508 - Laboratory Exercise 6
CHE 508 - Laboratory Exercise 6
6
Steady-state Material Balances on a Separation Train
1. Objective:
The activity aims to solve a chemical engineering problem dealing with steady-state material balances
on a separation train using matlab.
3. Discussion :
A mass balance, also called a material balance, is an application of conservation of mass to the analysis
of physical systems. By accounting for material entering and leaving a system, mass flows can be
identified which might have been unknown, or difficult to measure without this technique. The exact law
used in the analysis of the system depends on the context of the problem, but all revolve around mass
conservation, i.e. that matter cannot disappear or be created spontaneously.
Therefore, mass balances are used widely in engineering and environmental analyses. For example,
mass balance theory is used to design chemical reactors, to analyze alternative processes to produce
chemicals, as well as to model pollution dispersion and other processes of physical systems. Closely
related and complementary analysis techniques include the population balance, energy balance and the
somewhat more complex entropy balance. These techniques are required for thorough design and
analysis of systems such as the refrigeration cycle.
4. Resources:
Matlab
5. Procedure:
1. For the four equations four unknowns as shown below :
2w + 5x - 3y - 4z = 9
-3w - 2x +4y - 5z = 23
2w + 5x + 3y - 6z = 39
w + 5x + 4y - 2z = 29
a. Obtain the four by four matrix of the LHS of the system of equations and assign it to variable A.
Run it in the matlab command window. Show the results.
b. Obtain the one by four matrix of the RHS of the system of equations and assign it to variable
B. Run it in the matlab command window. Show the results.
c. Using the command A\B and assign to it to variable w, x, y and z values. Run it in the matlab
command window. Show the results.
d. Create an m-file for the solution of the system of equations. Run it and show the results.
e. Create an m-file using disp( ), input( ), and fprintf( ) commands. Run it and show the results.
2. Provide a unique system of equations, ten equations in ten unknowns and answer the following:
a. Obtain the ten by ten matrix of the LHS of the system of equations and assign it to variable A.
Run it in the matlab command window. Show the results.
b. Obtain the one by ten matrix of the RHS of the system of equations and assign it to variable B.
Run it in the maltlab command window. Show the results.
c. Using the command A\B and assign it to ten distinct variables. Run it in matlab command
window. Show the results.
d. Create an m-file for the solution of the system of equations. Run it and show the results.
e. Create an m-file using disp( ), input( ), and fprintf( ) commands. Run it and show the results.
3. In this problem, we are separating paraxylene, styrene, toluene and benzene via continuous
distillation in three columns. Continuous distillation is typically a steady-state process as the
‘lighter’ components (lower boiling temperatures at the operating pressure) will collect overhead
and the ‘heavier’ will collect in the bottoms. Depending on what your purity specifications are will
then determine how you want to operate your equipment. A schematic with the problem details is
shown below:
a. Using 1 minute of operation, obtain the system of equations, four equations in four unknowns,
involving material balances of xylene, styrene, toluene, and benzene.
b. Obtain the four by four matrix of the resulting system of equations in 3a and assign it to variable A.
Run it in the matlab command window. Show the results.
c. Obtain the one by four matrix of the resulting system of equations in 3a and assign it to variable B.
Run it in the matlab command window. Show the results.
d. Using the command A\B, assign it to four distinct variables representing the molar flow rates of
D_1, B_1, D_2, and B_2. Run it in the matlab command window. Show the results.
e. Create an m-file for the solution of system of equations in 3a. Run it and show the results.
f. Create an m-file using disp( ), input( ) and fprintf( ) matlab commands. Run it and show the results.
a. Using Column #2, provide for the matlab command that will determine the flowrate of stream D.
Run it in the matlab command window. Show the results.
b. Provide for matlab commands that will determine the mole fraction of xylene, styrene, toluene,
and benzene in stream D. Run them in the command window. Show the results.
c. Create an m-file that will provide solutions in 4a and 4b. Run it and show the results.
d. Create an m-file using disp( ), input( ) and fprint( ) matlab commands that will provide solutions
in 4a and 4b. Run it and show the results.
5. Using Figure1,
a. Using Column #2, provide for the matlab command that will determine the flowrate of stream B.
Run it in the matlab command window. Show the results
b. Provide matlab commands that will determine the mole fraction of xylene, styrene, toluene, and
benzene in stream B. Run them in the command window. Show the results.
c. Create an m-file that will provide solutions in 5a and 5b. Run it and show the results.
d. Create an m-file using disp( ), input( ), and fprint( ) matlab commands that will provide solutions
in 5a and 5b. Run it and show the results.
Procedure Results
1a >> A = [2 5 -3 -4; -3 -2 4 -5; 2 5 3 -6; 1 5 4 -2]
A=
2 5 -3 -4
-3 -2 4 -5
2 5 3 -6
1 5 4 -2
B=
9
23
39
29
soln =
2.0000
1.0000
4.0000
-3.0000
>> w = soln(1)
w=
2.0000
>> x = soln(2)
x=
1.0000
>> y = soln(3)
y=
>> z = soln(4)
z=
-3.0000
>> le06_p1d
w=
2.0000
x=
1.0000
y=
z=
-3.0000
>> le06_p1e
System of 4 Equations Solver
Enter matrix of coefficients: [2 5 -3 -4; -3 -2 4 -5; 2 5 3 -6; 1 5 4 -2]
Enter matrix of constants: [9; 23; 39; 29]
w = 2.000000
x = 1.000000
y = 4.000000
z = -3.000000
2a >> A = rand(10)
A=
Columns 1 through 8
Columns 9 through 10
0.3517 0.0759
0.8308 0.0540
0.5853 0.5308
0.5497 0.7792
0.9172 0.9340
0.2858 0.1299
0.7572 0.5688
0.7537 0.4694
0.3804 0.0119
0.5678 0.3371
2b >> B = rand(10,1)
B=
0.1622
0.7943
0.3112
0.5285
0.1656
0.6020
0.2630
0.6541
0.6892
0.7482
soln =
0.1549
1.1242
-0.1112
0.3506
0.1600
-0.2884
0.7694
-0.8864
-0.3121
-0.3871
>> a = soln(1)
a=
0.1549
>> b = soln(2)
b=
1.1242
>> c = soln(3)
c=
-0.1112
>> d = soln(4)
d=
0.3506
>> e = soln(5)
e=
0.1600
>> f = soln(6)
f=
-0.2884
>> g = soln(7)
g=
0.7694
>> h = soln(8)
h=
-0.8864
>> i = soln(9)
i=
-0.3121
>> j = soln(10)
j=
-0.3871
>> le06_p2d
a=
0.1547
b=
1.1239
c=
-0.1115
d=
0.3507
e=
0.1603
f=
-0.2886
g=
0.7693
h=
-0.8863
i=
-0.3116
j=
-0.3872
3b >> 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]
A=
B=
10.5000
17.5000
28.0000
14.0000
soln =
26.2500
17.5000
8.7500
17.5000
>> D1 = soln(1)
D1 =
26.2500
>> B1 = soln(2)
B1 =
17.5000
>> D2 = soln(3)
D2 =
8.7500
>> B2 = soln(4)
B2 =
17.5000
3e 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 = 70*[0.15; 0.25; 0.40; 0.20];
soln = A\B;
D1 = soln(1)
B1 = soln(2)
D2 = soln(3)
B2 = soln(4)
>> le06_p3e
D1 =
26.2500
B1 =
17.5000
D2 =
8.7500
B2 =
17.5000
>> le06_p3f
Separation Train Solver
Enter matrix of coefficients: [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]
Enter matrix of constants: 70*[0.15; 0.25; 0.40; 0.20]
D1 = 26.250000
B1 = 17.500000
D2 = 8.750000
B2 = 17.500000
4a >> 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 = 70*[0.15; 0.25; 0.40; 0.20];
>> soln = A\B;
>> D1 = soln(1);
>> B1 = soln(2);
>> D2 = soln(3);
>> B2 = soln(4);
>> D = D1 + B1
D=
43.7500
4b >> 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 = 70*[0.15; 0.25; 0.40; 0.20];
>> soln = A\B;
>> D1 = soln(1);
>> B1 = soln(2);
>> D2 = soln(3);
>> B2 = soln(4);
>> D = D1 + B1;
>> x_xylene = (0.07*D1 + 0.18*B1)/D
x_xylene =
0.1140
x_styrene =
0.1200
>> x_toluene = (0.54*D1 + 0.42*B1)/D
x_toluene =
0.4920
x_benzene =
0.2740
4c 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 = 70*[0.15; 0.25; 0.40; 0.20];
soln = A\B;
D1 = soln(1);
B1 = soln(2);
D2 = soln(3);
B2 = soln(4);
D = D1 + B1
x_xylene = (0.07*D1 + 0.18*B1)/D
x_styrene = (0.04*D1 + 0.24*B1)/D
x_toluene = (0.54*D1 + 0.42*B1)/D
x_benzene = (0.35*D1 + 0.16*B1)/D
>> le06_p4c
D=
43.7500
x_xylene =
0.1140
x_styrene =
0.1200
x_toluene =
0.4920
x_benzene =
0.2740
>> le06_p4d
Separation Train Solver: Column 2
Enter matrix of coefficients: [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]
Enter matrix of constants: 70*[0.15; 0.25; 0.40; 0.20]
D = 43.750000
x_xylene = 0.114000
x_styrene = 0.120000
x_toluene = 0.492000
x_benzene = 0.274000
5a >> 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 = 70*[0.15; 0.25; 0.40; 0.20];
>> soln = A\B;
>> D1 = soln(1);
>> B1 = soln(2);
>> D2 = soln(3);
>> B2 = soln(4);
>> D = D1 + B1
>> B = D2 + B2
B=
26.2500
x_xylene =
0.1860
x_styrene =
0.3200
x_toluene =
0.3640
x_benzene =
0.1300
5c 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 = 70*[0.15; 0.25; 0.40; 0.20];
soln = A\B;
D1 = soln(1);
B1 = soln(2);
D2 = soln(3);
B2 = soln(4);
B = D2 + B2
x_xylene = (0.15*D1 + 0.24*B1)/D
x_styrene = (0.10*D1 + 0.65*B1)/D
x_toluene = (0.54*D1 + 0.42*B1)/D
x_benzene = (0.21*D1 + 0.01*B1)/D
>> le06_p5c
B=
26.2500
x_xylene =
0.1860
x_styrene =
0.3200
x_toluene =
0.4920
x_benzene =
0.1300
>> le06_p5d
Separation Train Solver: Column 3
Enter matrix of coefficients: [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]
Enter matrix of constants: 70*[0.15; 0.25; 0.40; 0.20]
B = 26.250000
x_xylene = 0.186000
x_styrene = 0.320000
x_toluene = 0.364000
x_benzene = 0.130000
7. Conclusion:
I therefore conclude that steady-state material balances can be solved in MATLAB. This can be done by
formulating a system of n linear equations with n unknowns, converting the system of equations into an
augmented matrix, entering the matrix of coefficients A and the matrix of constants B, and using the
command or operation A\B.