Download - Spreadsheet for Mass Balance
-
8/12/2019 Spreadsheet for Mass Balance
1/29
Process flowsheeting withSpreadsheet
-
8/12/2019 Spreadsheet for Mass Balance
2/29
H82CYS - Computer System Intro to Process Simulation 2
Degree of freedom revisitedDegree of freedom (ndf) of a system:
ndf= nvnewhere, nv= variables; ne= independent eq
If ndf= 0 (e.g. 3 unknowns & 3 independenteq), the unknown variables can be
calculated.If ndf> 0 (e.g. 5 unknowns & 3 independent
eqndf= 2), specify the design variables&calculate the state variables.
If ndf< 0 (independent eq > unknowns)process is over-specified.
(Felder & Rousseau, 2000)
-
8/12/2019 Spreadsheet for Mass Balance
3/29
H82CYS - Computer System Intro to Process Simulation 3
Degree of freedom revisitedUnknown variablesfor a single unit:
Unknown component amounts / flowrate for all inlet &outlet streams
Unknown stream T& P
Unknown rate of energy transfer (as heat & power)
Equationto determine these unknowns:
Material balances for each independent species
Energy balance
Phase & chemical equilibrium relations
Additional specified relationship among process
variables
-
8/12/2019 Spreadsheet for Mass Balance
4/29
H82CYS - Computer System Intro to Process Simulation 4
Example : A heated mixerHeated mixer
n2(kg O2)
n3(kg N2)
25C
n4(kg O2)
n5(kg N2)
50C
n1(kg O2)
40C
Q (kJ)
ndf analysis:
6 variables (n1, , n5, Q)
3 eq (2 material balances & 1 energy balances)= 3 degrees of freedom
Specify 3 design variables& solve the rest.
-
8/12/2019 Spreadsheet for Mass Balance
5/29
H82CYS - Computer System Intro to Process Simulation 5
Degree of freedom revisited Given the following equations:
x1+ 2x2x3
2
= 05x1x23+ 4 = 0
i. What is the ndf for this system?ii. Which design variable to be chosen for an easier
solution?
-
8/12/2019 Spreadsheet for Mass Balance
6/29
H82CYS - Computer System Intro to Process Simulation 6
Tutorial 1: Mass energy balances
Determine the ndffor the system
What are the design variables& state variables?
Mixing
nA3(mol A/s)
nB3(mol B/s)
nC3(mol C/s)
nD3(mol D/s)nE3(mol E/s)
T3(C)
nA2(mol A/s)nB2(mol B/s)
nC2(mol C/s)
nD2(mol D/s)
nE2(mol E/s)
T2
(C)
nA1(mol A/s)
nB1(mol B/s)
nC1(mol C/s)nD1(mol D/s)
nE1(mol E/s)
T1(C)
S1
S2
S3
(Felder & Rousseau, 2000)
-
8/12/2019 Spreadsheet for Mass Balance
7/29H82CYS - Computer System Intro to Process Simulation 7
Tutorial 1: Mass energy balancesMass balance equations:
nA3 = nA1+ nA2nB3 = nB1+ nB2nC3 = nC1+ nC2nD3 = nD1+ nD2
nE3 = nE1+ nE2Energy balance equation:
DH = SnoutHoutSninHin
(assumption: P= 1 atm; temp = T1H1= 0; no
phase change; constant Cp)ndf= 18 variables (6 on each streams) 6 equations
= 12 degrees of freedom
-
8/12/2019 Spreadsheet for Mass Balance
8/29
H82CYS - Computer System Intro to Process Simulation 8
Tutorial 1: Mass energy balances Specify the design variables:
Stream 1:nA1= 23.5 mol A/s
nB1= 16.2 mol B/s
nC1= 8.5 mol C/s
nD1= 5.6 mol D/s
nE1= 2.2 mol E/s
T1= 135.0C
Stream 2:nA2= 0.0 mol A/snB2= 57.0 mol B/snC2= 29.0 mol C/snD2= 15.6 mol D/snE2= 0.0 mol E/s
T2= 23.0
Other info [constant heat capacity inJ/(mol.C)]:CpA= 77.3; CpB= 135.0; CpC= 159.1; CpD= 173.2; CpE=188.7
Determine the component flowrate & Tfor stream 3.
-
8/12/2019 Spreadsheet for Mass Balance
9/29
H82CYS - Computer System Intro to Process Simulation 9
Tutorial 1: Mass energy balancesEnergy balance equation (cont.):
DH = SnoutHoutSninHin = 00 = [ nA3CpA+ nB3CpB+ + nE3CpE] (T3T1)
[ nA2CpA+ nB2CpB+ + nE2CpE] (T2T1)
[ nA1CpA+ nB1CpB+ + nE1CpE] (T1T1)
(reference temperature taken as T1)
Rearrange the equation, solving for T3:
12
33333
22222
13 TT
CnCnCnCnCn
CnCnCnCnCnTT
pEEpDDpCCpBBpAA
pEEpDDpCCpBBpAA
= 0
(Felder & Rousseau, 2000)
-
8/12/2019 Spreadsheet for Mass Balance
10/29
H82CYS - Computer System Intro to Process Simulation 10
Tutorial 1 in spreadsheet solution
-
8/12/2019 Spreadsheet for Mass Balance
11/29
ime for exercise
-
8/12/2019 Spreadsheet for Mass Balance
12/29
Approaches for processflowsheetingSequential-modular
Equation-oriented
-
8/12/2019 Spreadsheet for Mass Balance
13/29
H82CYS - Computer System Intro to Process Simulation 13
Tutorial 2 (continue from Tutorial 1)
MixingnA3(mol A/s)
nB3(mol B/s)
nC3(mol C/s)
nD3
(mol D/s)
nE3(mol E/s)
T3(C)
nA2(mol A/s)
nB2(mol B/s)
nC2(mol C/s)
nD2(mol D/s)nE2(mol E/s)
T2(C)
nA1(mol A/s)
nB1(mol B/s)
nC1(mol C/s)
nD1(mol D/s)
nE1(mol E/s)
T1(C)
nA4(mol A/s)
nB4(mol B/s)
nC4(mol C/s)
nD4(mol D/s)
nE4(mol E/s)
T4= ?
S1
S2
S3 S4
Heater, Q =
100,000 J
-
8/12/2019 Spreadsheet for Mass Balance
14/29
H82CYS - Computer System Intro to Process Simulation 14
Equation-oriented (EO) Solution is obtained by solving simultaneously all
the modelling equations.Advantages: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 wellsuited for the EO architecture.
Disadvantages: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.
-
8/12/2019 Spreadsheet for Mass Balance
15/29
H82CYS - Computer System Intro to Process Simulation 15
Equation solving by matrix Solve matrix equation: A X= B
where,A= a known (ix i) coefficient matrix;B= a know solution vector (ix 1);X= an unknown vector (ix 1)
Example matrix with i= 3:
A(3x3) X(3x1) = B(3x1) X = A-1 B
xyz
a1 b1 c1a2 b2 c2a3 b3 c3
= d1d2
d3
xyz
= d1d2
d3
-1
a1 b1 c1a2 b2 c2a3 b3 c3
-
8/12/2019 Spreadsheet for Mass Balance
16/29
H82CYS - Computer System Intro to Process Simulation 16
Tutorial 3Solve for the following simultaneous
equations:x + y + z = 1
2x - 2y + 5z = 1
2.5 y + z = 1Set up matrix equation:
A X = B
xyz
1 1 12 -2 50 2.5 1
=111
-
8/12/2019 Spreadsheet for Mass Balance
17/29
H82CYS - Computer System Intro to Process Simulation 17
Matrix solving by Excel spreadsheet
-
8/12/2019 Spreadsheet for Mass Balance
18/29
H82CYS - Computer System Intro to Process Simulation 18
Tutorial 4: BTX separation problem
C1 C235 kg B
50 kg T15 kg X
n1(kg)
0.673 kg B/kg
0.306 kg T/kg
0.021 kg X/kg
n2(kg B)n3(kg T)n4(kg X)
n5(kg)
0.059 kg B/kg
0.926 kg T/kg
0.015 kg X/kg
n6(kg B)n7(kg T): 10% of T in feed to C1n8(kg X): 90% of X in feed to C1
C1: 4 variables (n1, , n5)3 material balances
= 1 local ndf
C2: 7 variables (n1, , n5)3 material balances
= 4 local ndf
Process: 5 local ndf3 ties (n2, n3 , n4)2 relations (recovery of T & X in C2 bottoms)= 0 degrees of freedom
-
8/12/2019 Spreadsheet for Mass Balance
19/29
H82CYS - Computer System Intro to Process Simulation 19
Tutorial 4: BTX separation problem
C1 C235 kg B
50 kg T15 kg X
n1(kg)
0.673 kg B/kg
0.306 kg T/kg
0.021 kg X/kg
n2(kg B)n3(kg T)n4(kg X)
n5(kg)
0.059 kg B/kg
0.926 kg T/kg
0.015 kg X/kg
n6(kg B)n7(kg T): 10% of T in feed to C1n8(kg X): 90% of X in feed to C1
C1 balances:
B: 35 = 0.673n1+ n2T: 50 = 0.306n1+ n3X: 15 = 0.021n1+ n4
C2 balances:
B: n2= 0.059n5+ n6T: n3= 0.926n5+ n7X: n4= 0.015n5+ n810% T recovery: n7= 0.1 (50) = 5.090% X recovery: n8= 0.9 (15) = 13.5
-
8/12/2019 Spreadsheet for Mass Balance
20/29
H82CYS - Computer System Intro to Process Simulation 20
Tutorial 4: BTX separation problemSolve the mass balance equation using MS
Excel spreadsheet:0.673n1+ n2= 35 (1)
0.306n1+ n3= 50 (2)
0.021n1+ n4= 15 (3)
0.059n5+ n6n2= 0 (4)
0.926n5+ n7n3= 0 (5)
0.015n5+ n8n4= 0 (6)
n7= 5.0 (7)n8= 13.5 (8)
-
8/12/2019 Spreadsheet for Mass Balance
21/29
H82CYS - Computer System Simulation of Recycle Streams 21
The Onion model
Reactor
Separation &
recycle
Heat exchange
network
Utilities (Linnhoff et al., 1982;
Smith 1995, 2005)
-
8/12/2019 Spreadsheet for Mass Balance
22/29
H82CYS - Computer System Simulation of Recycle Streams 22
Types of recycle streamsMaterial recycle
Heat recycle
-
8/12/2019 Spreadsheet for Mass Balance
23/29
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
Tearrecycle stream
r1 r2
(Turton et al., 1998)
-
8/12/2019 Spreadsheet for Mass Balance
24/29
H82CYS - Computer System Simulation of Recycle Streams 24
Simulation of recycling system with SMBasic algorithms in handling a recycle
stream:Before the Equipment C is solved, some
estimationof stream rmust be madea tearstream occurs.Provided information is supplied about Stream
r2, we can solve the flowsheet all the way toStream r1 by using sequential modular approach.Compare Streams r1 and r2.If r1 & r2 agree within some specified tolerance
we have a converge solutionOr else, r2 is modified & simulation is repeated
until convergence is obtained.
-
8/12/2019 Spreadsheet for Mass Balance
25/29
H82CYS - Computer System Simulation of Recycle Streams 25
Tutorial 5 isomerisation process
In an isomerisation process, component Ais converted tocomponent B.
The mixture from the reactor is separated into relativelypureA(which is recycled) & relatively pure product B.
No by-products are formed and the reactor performance canbe characterised by its conversion.
The performance of the separator is characterised by therecovery ofAto the recycled stream (rA) and recovery of Bto the product (rB). (Smith, 2005)
-
8/12/2019 Spreadsheet for Mass Balance
26/29
H82CYS - Computer System Simulation of Recycle Streams 26
Mass balance equations Given the following variables: mi ,j= molar flowrate of Component i in Streamj
X = reactor conversion ri= fractional recovery of Component i
Mass balance equationsfor each unit may be written as: Mixer:
Reactor:
Separator:
mA,2
= mA,1
+ mA,5
mB,2= mB,1+ mB,5
mA,3= mA,2(1 X)
mB,3= mB,2+ XmA,2
mA,4= mA,3(1 rA)
mA,5 = rAmA,3
mB,4= rBmB,3
mB,5= mB,3(1 rB)
-
8/12/2019 Spreadsheet for Mass Balance
27/29
H82CYS - Computer System Simulation of Recycle Streams 27
Strategy with SM approach
Calculation sequencein SM:. However, problem is encountered at the mixer, as the
flowrate & composition of the recycle are unknown. Strategy using SM approach: Tearthe recycle streams
Add a recycle convergenceunit/solver in the tear stream. Estimate the component molar flowrates of the tear stream. Thisallows 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 comparedto test whether errors are within a specified tolerance.
(Smith, 2005)
-
8/12/2019 Spreadsheet for Mass Balance
28/29
H82CYS - Computer System Simulation of Recycle Streams 28
Data given Given the following values: mA,1= 100 kmol; mB,1= 0 kmol
X = 0.7 rA= 0.95; rB = 0.95
Assume the flowrate of componentAand Bin the recycledstream(stream 5) as follow:
mA,5= 50 kmol mB,5= 5 kmol
Setting at the recycle convergence unit/solveriterationstops when the scaled residueis smaller than a specifiedtolerance (1 x 10-5for this case). Scaled residue is given as:
(Smith, 2005)
valueEstimated
valueestimated-valueCalculatedresidueScaled
-
8/12/2019 Spreadsheet for Mass Balance
29/29
H82CYS - Computer System Simulation of Recycle Streams 29
Recycle simulation with spreadsheet