0% found this document useful (0 votes)
242 views29 pages

Spreadsheet For Mass Balance

This document discusses degree of freedom analysis and process simulation. It defines degree of freedom as the number of variables minus the number of independent equations. It then provides examples of degree of freedom calculations for different process systems. The document also discusses using sequential modular simulation to solve processes with recycle streams through an iterative approach by comparing inlet and outlet streams of recycle loops.

Uploaded by

Zakariya Mohamed
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
242 views29 pages

Spreadsheet For Mass Balance

This document discusses degree of freedom analysis and process simulation. It defines degree of freedom as the number of variables minus the number of independent equations. It then provides examples of degree of freedom calculations for different process systems. The document also discusses using sequential modular simulation to solve processes with recycle streams through an iterative approach by comparing inlet and outlet streams of recycle loops.

Uploaded by

Zakariya Mohamed
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

H82CYS - Computer System Intro to Process Simulation 2

ODegree of freedom (n
df
) of a system:
n
df
= n
v
n
e
where, n
v
= variables; n
e
= independent eq
OIf n
df
= 0 (e.g. 3 unknowns & 3 independent
eq), the unknown variables can be
calculated.
OIf n
df
> 0 (e.g. 5 unknowns & 3 independent
eq n
df
= 2), specify the design variables &
calculate the state variables.
OIf n
df
< 0 (independent eq > unknowns)
process is over-specified.
(Felder & Rousseau, 2000)
H82CYS - Computer System Intro to Process Simulation 3
OUnknown variables for a single unit:
-Unknown component amounts / flowrate for all inlet &
outlet streams
-Unknown stream T & P
-Unknown rate of energy transfer (as heat & power)
OEquation to determine these unknowns:
-Material balances for each independent species
-Energy balance
-Phase & chemical equilibrium relations
-Additional specified relationship among process
variables
H82CYS - Computer System Intro to Process Simulation 4
Heated mixer
n
2
(kg O
2
)
n
3
(kg N
2
)
25C
n
4
(kg O
2
)
n
5
(kg N
2
)
50C
n
1
(kg O
2
)
40C
Q (kJ)
On
df
analysis:
6 variables (n
1
, , n
5
, Q)
3 eq (2 material balances & 1 energy balances)
= 3 degrees of freedom
OSpecify 3 design variables & solve the rest.
H82CYS - Computer System Intro to Process Simulation 5
O Given the following equations:
x
1
+ 2x
2
x
3
2
= 0
5x
1
x
2
3
+ 4 = 0
i. What is the n
df
for this system?
ii. Which design variable to be chosen for an easier
solution?
H82CYS - Computer System Intro to Process Simulation 6
ODetermine the n
df
for the system
OWhat are the design variables & state variables?
Mixing
n
A3
(mol A/s)
n
B3
(mol B/s)
n
C3
(mol C/s)
n
D3
(mol D/s)
n
E3
(mol E/s)
T
3
(C)
n
A2
(mol A/s)
n
B2
(mol B/s)
n
C2
(mol C/s)
n
D2
(mol D/s)
n
E2
(mol E/s)
T
2
(C)
n
A1
(mol A/s)
n
B1
(mol B/s)
n
C1
(mol C/s)
n
D1
(mol D/s)
n
E1
(mol E/s)
T
1
(C)
S
1
S
2
S
3
(Felder & Rousseau, 2000)
H82CYS - Computer System Intro to Process Simulation 7
OMass balance equations:
n
A3
= n
A1
+ n
A2
n
B3
= n
B1
+ n
B2
n
C3
= n
C1
+ n
C2
n
D3
= n
D1
+ n
D2
n
E3
= n
E1
+ n
E2
OEnergy balance equation:
DH = Sn
out
H
out
Sn
in
H
in

(assumption: P = 1 atm; temp = T
1
H
1
= 0; no
phase change; constant C
p
)
On
df
= 18 variables (6 on each streams) 6 equations
= 12 degrees of freedom
H82CYS - Computer System Intro to Process Simulation 8
O Specify the design variables:
OStream 1:
-n
A1
= 23.5 mol A/s
-n
B1
= 16.2 mol B/s
-n
C1
= 8.5 mol C/s
-n
D1
= 5.6 mol D/s
-n
E1
= 2.2 mol E/s
-T
1
= 135.0C
OStream 2:
-n
A2
= 0.0 mol A/s

-n
B2
= 57.0 mol B/s

-n
C2
= 29.0 mol C/s

-n
D2
= 15.6 mol D/s

-n
E2
= 0.0 mol E/s
-T
2
= 23.0

O Other info [constant heat capacity in J/(mol.C)]:
C
pA
= 77.3; C
pB
= 135.0; C
pC
= 159.1; C
pD
= 173.2; C
pE
=
188.7
O Determine the component flowrate & T for stream 3.
H82CYS - Computer System Intro to Process Simulation 9
OEnergy balance equation (cont.):
DH = Sn
out
H
out
Sn
in
H
in
= 0
0 = [ n
A3
C
pA
+ n
B3
C
pB
+ + n
E3
C
pE
] (T
3
T
1
)
[ n
A2
C
pA
+ n
B2
C
pB
+ + n
E2
C
pE
] (T
2
T
1
)
[ n
A1
C
pA
+ n
B1
C
pB
+ + n
E1
C
pE
] (T
1
T
1
)
(reference temperature taken as T
1
)
ORearrange the equation, solving for T
3
:


1 2
3 3 3 3 3
2 2 2 2 2
1 3
T T
C n C n C n C n C n
C n C n C n C n C n
T T
pE E pD D pC C pB B pA A
pE E pD D pC C pB B pA A




= 0
(Felder & Rousseau, 2000)
H82CYS - Computer System Intro to Process Simulation 10
Sequential-modular
Equation-oriented
H82CYS - Computer System Intro to Process Simulation 13
Tutorial 2 (continue from Tutorial 1)
Mixing
n
A3
(mol A/s)
n
B3
(mol B/s)
n
C3
(mol C/s)
n
D3
(mol D/s)
n
E3
(mol E/s)
T
3
(C)
n
A2
(mol A/s)
n
B2
(mol B/s)
n
C2
(mol C/s)
n
D2
(mol D/s)
n
E2
(mol E/s)
T
2
(C)
n
A1
(mol A/s)
n
B1
(mol B/s)
n
C1
(mol C/s)
n
D1
(mol D/s)
n
E1
(mol E/s)
T
1
(C)
n
A4
(mol A/s)
n
B4
(mol B/s)
n
C4
(mol C/s)
n
D4
(mol D/s)
n
E4
(mol E/s)
T
4
= ?
S
1
S
2
S
3
S
4
Heater, Q =
100,000 J

H82CYS - Computer System Intro to Process Simulation 14
OSolution is obtained by solving simultaneously all
the modelling equations.
OAdvantages:
-Flexible environment for specifications, which may be
inputs, outputs, or internal unit (block) variables.
-Better treatment of recycles, and no need for tear streams.
-Note that an object oriented modelling approach is well
suited for the EO architecture.
ODisadvantages:
-More programming effort.
-Need of substantial computing resources (but this is less
and less a problem with new PCs).
-Difficulties in handling large differential algebraic
equations systems.
-Difficult convergence follow-up and debugging.
H82CYS - Computer System Intro to Process Simulation 15
OSolve matrix equation: A X = B
where,
A = a known (i x i) coefficient matrix;
B = a know solution vector (i x 1);
X = an unknown vector (i x 1)
OExample matrix with i = 3:
A (3x3) X (3x1) = B (3x1) X = A
-1
B
x
y
z
a
1
b
1
c
1
a
2
b
2
c
2
a
3
b
3
c
3
=
d
1
d
2
d
3
x
y
z
=
d
1
d
2
d
3
-1
a
1
b
1
c
1
a
2
b
2
c
2
a
3
b
3
c
3
H82CYS - Computer System Intro to Process Simulation 16
OSolve for the following simultaneous
equations:
x + y + z = 1
2x - 2y + 5z = 1
2.5 y + z = 1
OSet up matrix equation:
A X = B
x
y
z
1 1 1

2 -2 5

0 2.5 1
=
1

1

1

H82CYS - Computer System Intro to Process Simulation 17
H82CYS - Computer System Intro to Process Simulation 18
C1 C2
35 kg B
50 kg T
15 kg X
n
1
(kg)
0.673 kg B/kg
0.306 kg T/kg
0.021 kg X/kg
n
2
(kg B)
n
3
(kg T)
n
4
(kg X)
n
5
(kg)
0.059 kg B/kg
0.926 kg T/kg
0.015 kg X/kg
n
6
(kg B)
n
7
(kg T): 10% of T in feed to C1
n
8
(kg X): 90% of X in feed to C1
C1: 4 variables (n
1
, , n
5
)
3 material balances
= 1 local n
df
C2: 7 variables (n
1
, , n
5
)
3 material balances
= 4 local n
df
Process: 5 local n
df

3 ties (n
2
, n
3
, n
4
)
2 relations (recovery of T & X in C2 bottoms)
= 0 degrees of freedom
H82CYS - Computer System Intro to Process Simulation 19
C1 C2
35 kg B
50 kg T
15 kg X
n
1
(kg)
0.673 kg B/kg
0.306 kg T/kg
0.021 kg X/kg
n
2
(kg B)
n
3
(kg T)
n
4
(kg X)
n
5
(kg)
0.059 kg B/kg
0.926 kg T/kg
0.015 kg X/kg
n
6
(kg B)
n
7
(kg T): 10% of T in feed to C1
n
8
(kg X): 90% of X in feed to C1
C1 balances:
B: 35 = 0.673n
1
+ n
2
T: 50 = 0.306n
1
+ n
3
X: 15 = 0.021n
1
+ n
4
C2 balances:

B: n
2
= 0.059n
5
+ n
6
T: n
3
= 0.926n
5
+ n
7
X: n
4
= 0.015n
5
+ n
8

10% T recovery: n
7
= 0.1 (50) = 5.0

90% X recovery: n
8
= 0.9 (15) = 13.5

H82CYS - Computer System Intro to Process Simulation 20
OSolve the mass balance equation using MS
Excel spreadsheet:
-0.673n
1
+ n
2
= 35 (1)
-0.306n
1
+ n
3
= 50 (2)
-0.021n
1
+ n
4
= 15 (3)
-0.059n
5
+ n
6
n
2
= 0 (4)
-0.926n
5
+ n
7
n
3
= 0 (5)
-0.015n
5
+ n
8
n
4
= 0 (6)
-n
7
= 5.0 (7)
-n
8
= 13.5 (8)
H82CYS - Computer System Simulation of Recycle Streams 21
Reactor
Separation &
recycle
Heat exchange
network
Utilities
(Linnhoff et al., 1982;
Smith 1995, 2005)
H82CYS - Computer System Simulation of Recycle Streams 22
Material recycle
Heat recycle
H82CYS - Computer System Simulation of Recycle Streams 23
Simulation of recycling system with SM
A B C D E F
Recycle stream
Unit operation
in simulator
Tear recycle stream
r
1
r
2
(Turton et al., 1998)
H82CYS - Computer System Simulation of Recycle Streams 24
Simulation of recycling system with SM
OBasic algorithms in handling a recycle
stream:
-Before the Equipment C is solved, some
estimation of stream r must be made a tear
stream occurs.
-Provided information is supplied about Stream
r
2
, we can solve the flowsheet all the way to
Stream r
1
by using sequential modular approach.
-Compare Streams r
1
and r
2
.
-If r
1
& r
2
agree within some specified tolerance
we have a converge solution
-Or else, r
2
is modified & simulation is repeated
until convergence is obtained.

H82CYS - Computer System Simulation of Recycle Streams 25
O In an isomerisation process, component A is converted to
component B.
O The mixture from the reactor is separated into relatively
pure A (which is recycled) & relatively pure product B.
O No by-products are formed and the reactor performance can
be characterised by its conversion.
O The performance of the separator is characterised by the
recovery of A to the recycled stream (r
A
) and recovery of B
to the product (r
B
).
(Smith, 2005)
H82CYS - Computer System Simulation of Recycle Streams 26
O Given the following variables:
- m
i ,j
= molar flowrate of Component i in Stream j
- X = reactor conversion
- r
i
= fractional recovery of Component i
O Mass balance equations for each unit may be written as:
- Mixer:


- Reactor:


- Separator:




m
A,2
= m
A,1
+ m
A,5
m
B,2
= m
B,1
+ m
B,5
m
A,3
= m
A,2
(1 X)
m
B,3
= m
B,2
+ Xm
A,2
m
A,4
= m
A,3
(1 r
A
)
m
A,5
= r
A
m
A,3

m
B,4
= r
B
m
B,3

m
B,5
= m
B,3
(1 r
B
)
H82CYS - Computer System Simulation of Recycle Streams 27
O Calculation sequence in SM: CCCCC.
O However, problem is encountered at the mixer, as the
flowrate & composition of the recycle are unknown.
O Strategy using SM approach:
- Tear the recycle streams
- Add a recycle convergence unit/solver in the tear stream.
- Estimate the component molar flowrates of the tear stream. This
allows the material balance in the reactor and separator to be solved,
& provide the molar flowrates for the recycle stream.
- The calculated and estimated values of the tear stream are compared
to test whether errors are within a specified tolerance.
(Smith, 2005)
H82CYS - Computer System Simulation of Recycle Streams 28
O Given the following values:
- m
A,1
= 100 kmol; m
B,1
= 0 kmol
- X = 0.7
- r
A
= 0.95; r
B
= 0.95
O Assume the flowrate of component A and B in the recycled
stream (stream 5) as follow:
- m
A,5
= 50 kmol
- m
B,5
= 5 kmol
O Setting at the recycle convergence unit/solver iteration
stops when the scaled residue is smaller than a specified
tolerance (1 x 10
-5
for this case). Scaled residue is given as:
(Smith, 2005)
value Estimated
value estimated - value Calculated
residue Scaled
H82CYS - Computer System Simulation of Recycle Streams 29

You might also like