Sie sind auf Seite 1von 29
Process flowsheeting with Spreadsheet
Process flowsheeting with Spreadsheet
Process flowsheeting with
Spreadsheet
Degree of freedom revisited
Degree of freedom revisited

Degree of freedom (n df ) of a system:

n df = n v n e

where, n v = variables; n e = independent eq

If n

= 0 (e.g. 3 unknowns & 3 independent

df

eq), the unknown variables can be

calculated.

If n

> 0 (e.g. 5 unknowns & 3 independent

df

df

eq n

calculate the state variables.

= 2), specify the design variables &

If n

< 0 (independent eq > unknowns)

df

process is over-specified.

(Felder & Rousseau, 2000)

df process is over-specified. (Felder & Rousseau, 2000) H82CYS - Computer System Intro to Process Simulation
Degree of freedom revisited
Degree of freedom revisited

Unknown 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)

Equation to determine these unknowns:

Material balances for each independent species

Energy balance

Phase & chemical equilibrium relations

Additional specified relationship among process variables

 Additional specified relationship among process variables H82CYS - Computer System Intro to Process Simulation 3
Example : A heated mixer
Example : A heated mixer

n 1 (kg O 2 )

40ºC

Example : A heated mixer n 1 (kg O 2 ) 40ºC Heated mixer n 2

Heated mixer

: A heated mixer n 1 (kg O 2 ) 40ºC Heated mixer n 2 (kg

n 2 (kg O 2 ) n 3 (kg N 2 )

25ºC

Q (kJ)

n df analysis:

3 (kg N 2 ) 25ºC Q (kJ)  n d f analysis: n 4 (kg

n 4 (kg O 2 ) n 5 (kg N 2 )

50ºC

6 variables (n 1 , …, n 5 , Q)

3 eq (2 material balances & 1 energy balances)

= 3 degrees of freedom Specify 3 design variables & solve the rest.

 Specify 3 design variables & solve the rest. H82CYS - Computer System Intro to Process
Degree of freedom revisited
Degree of freedom revisited

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?

ii. Which design variable to be chosen for an easier solution? H82CYS - Computer System Intro
Tutorial 1: Mass & energy balances
Tutorial 1: Mass & energy balances

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 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)

S 1

D 2 (mol D/s) n E 2 (mol E/s) T 2 (ºC) S 1 Mixing S

Mixing

(mol D/s) n E 2 (mol E/s) T 2 (ºC) S 1 Mixing S 2 S

S 2

S 3

n E 2 (mol E/s) T 2 (ºC) S 1 Mixing S 2 S 3 n

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)

Determine the n df for the system What are the design variables & state variables?

(Felder & Rousseau, 2000)

& state variables ? (Felder & Rousseau, 2000) H82CYS - Computer System Intro to Process Simulation
Tutorial 1: Mass & energy balances
Tutorial 1: Mass & energy balances

Mass balance equations:

n A3

n B3

n C3

n D3

n E3

=

=

=

=

=

n A1 + n A2 n B1 + n B2 n C1 + n C2 n D1 + n D2 n E1 + n E2

Energy 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 ) n df = 18 variables (6 on each streams) 6 equations = 12 degrees of freedom

(6 on each streams) – 6 equations = 12 degrees of freedom H82CYS - Computer System
Tutorial 1: Mass & energy balances
Tutorial 1: Mass & energy balances

Specify the design variables:

Stream 1:

Stream 2:

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.0ºC

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º

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

Determine the component flowrate & T for stream 3.

 Determine the component flowrate & T for stream 3. H82CYS - Computer System Intro to
Tutorial 1: Mass & energy balances
Tutorial 1: Mass & energy balances

Energy balance equation (cont.):

DH = Sn out H out Sn in H in = 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 )

0

=

T 1 ) (reference temperature taken as T 1 ) 0 = = 0  Rearrange

= 0

Rearrange the equation, solving for T 3 :

T

3

T

1

n

A

2

C

pA

n

B

2

C

pB

n

C

2

C

pC

n

D

2

C

pD

n

E

2

C

pE

n

A

3

C

pA

n

B

3

C

pB

n

C

3

C

pC

n

D

3

C

pD

n

E

3

C

pE

T

2

T

1

(Felder & Rousseau, 2000)

3 C pE  T 2  T 1  (Felder & Rousseau, 2000) H82CYS -
Tutorial 1 in spreadsheet solution
Tutorial 1 in spreadsheet solution
Tutorial 1 in spreadsheet solution H82CYS - Computer System Intro to Process Simulation 10
Tutorial 1 in spreadsheet solution H82CYS - Computer System Intro to Process Simulation 10
Time for exercise…
Time for exercise…
Time for exercise…
Approaches for process flowsheeting • Sequential-modular • Equation-oriented
Approaches for process flowsheeting
Approaches for process
flowsheeting

Sequential-modular Equation-oriented

Tutorial 2 (continue from Tutorial 1)
Tutorial 2 (continue from Tutorial 1)

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 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)

S 1

D 2 (mol D/s) n E 2 (mol E/s) T 2 (ºC) S 1 Heater, Q

Heater, Q = 100,000 J

Mixing

S 3 S 4
S 3
S 4

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 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 = ?

C/s) n D 4 (mol D/s) n E 4 (mol E/s) T 4 = ? S

S 2

n D 4 (mol D/s) n E 4 (mol E/s) T 4 = ? S 2
Equation-oriented (EO)
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 well suited 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.

systems.  Difficult convergence follow-up and debugging. H82CYS - Computer System Intro to Process Simulation 14
Equation solving by matrix
Equation solving by matrix

Solve 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)

Example matrix with i = 3:

A (3x3) X (3x1) = B (3x1) X

=

a b c x 1 1 1 a b c y 2 2 2 a
a
b
c
x
1
1
1
a
b
c
y
2
2
2
a
b
c
z
3
3
3
d x 1 = d y = 2 d z 3
d
x
1
=
d
y
=
2
d
z
3
A -1 B -1 a b c d 1 1 1 1 a b c
A -1
B
-1
a
b
c
d
1
1
1
1
a
b
c
d
2
2
2
2
a
b
c
d
3
3
3
3
d 1 1 1 1 a b c d 2 2 2 2 a b c
Tutorial 3
Tutorial 3

Solve for the following simultaneous equations:

x + y + z = 1

2x - 2y + 5z = 1 2.5 y + z = 1

Set up matrix equation:

A X = B 1 1 1 x 1 2 -2 5 y = 1
A X
=
B
1
1
1
x
1
2
-2
5
y
=
1
0
2.5
1
z
1
A X = B 1 1 1 x 1 2 -2 5 y = 1 0
Matrix solving by Excel spreadsheet
Matrix solving by Excel spreadsheet
Matrix solving by Excel spreadsheet H82CYS - Computer System Intro to Process Simulation 17
Tutorial 4: BTX separation problem
Tutorial 4: BTX separation problem
Tutorial 4: BTX separation problem n 5 (kg) n 1 (kg) 0.059 kg B/kg 0.673 kg
n 5 (kg) n 1 (kg) 0.059 kg B/kg 0.673 kg B/kg 0.926 kg T/kg
n 5 (kg)
n 1 (kg)
0.059 kg B/kg
0.673
kg B/kg
0.926 kg T/kg
0.306
kg T/kg
C1
C2
0.015 kg X/kg
35
kg B
0.021
kg X/kg
50
kg T
15 kg X
n 2 (kg B)
n 3 (kg T)
n 4 (kg X)

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

of T & X in C2 bottoms) = 0 degrees of freedom – H82CYS - Computer
Tutorial 4: BTX separation problem
Tutorial 4: BTX separation problem
Tutorial 4: BTX separation problem n 5 (kg) n 1 (kg) 0.059 kg B/kg 0.673 kg
n 5 (kg) n 1 (kg) 0.059 kg B/kg 0.673 kg B/kg 0.926 kg T/kg
n 5 (kg)
n 1 (kg)
0.059
kg B/kg
0.673
kg B/kg
0.926
kg T/kg
0.306
kg T/kg
C1
C2
0.015
kg X/kg
35 kg B
0.021
kg X/kg
50 kg T
15 kg X
n 2 (kg B)
n 3 (kg T)
n 4 (kg X)

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:

C2 balances:

B:

35 = 0.673n 1 + n 2

B:

n 2 = 0.059n 5 + n 6

T:

50 = 0.306n 1 + n 3

T:

n 3 = 0.926n 5 + n 7

X:

15 = 0.021n 1 + n 4

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

= 0.1 (50) = 5.0 90% X recovery: n 8 = 0.9 (15) = 13.5 H82CYS
Tutorial 4: BTX separation problem
Tutorial 4: BTX separation problem

Solve 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)

(6)  n 7 = 5.0 (7)  n 8 = 13.5 (8) H82CYS - Computer
The Onion model
The Onion model
Reactor Separation & recycle Heat exchange network Utilities
Reactor
Separation &
recycle
Heat exchange
network
Utilities

(Linnhoff et al., 1982; Smith 1995, 2005)

Utilities (Linnhoff et al. , 1982; Smith 1995, 2005) H82CYS - Computer System Simulation of Recycle
Types of recycle streams
Types of recycle streams
Material recycle
Material recycle
Heat recycle
Heat recycle
Types of recycle streams Material recycle Heat recycle H82CYS - Computer System Simulation of Recycle Streams
Simulation of recycling system with SM
Simulation of recycling system with SM

Tear recycle stream

r 1 r 2 Recycle stream A B C D E F
r 1
r 2
Recycle stream
A
B
C
D
E
F

Unit operation

in simulator

Recycle stream A B C D E F Unit operation in simulator (Turton et al. ,
Recycle stream A B C D E F Unit operation in simulator (Turton et al. ,

(Turton et al., 1998)

D E F Unit operation in simulator (Turton et al. , 1998) H82CYS - Computer System
Simulation of recycling system with SM
Simulation of recycling system with SM

Basic 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 , we can solve the flowsheet all the way to

2

Stream r 1 by using sequential modular approach. Compare Streams r 1 and r 2 . If r & r agree within some specified tolerance we have a converge solution Or else, r is modified & simulation is repeated until convergence is obtained.

1

2

2

simulation is repeated until convergence is obtained. 1 2 2 H82CYS - Computer System Simulation of
Tutorial 5 – isomerisation process
Tutorial 5 – isomerisation process
Tutorial 5 – isomerisation process  In an isomerisation process , component A is converted to

In an isomerisation process, component A is converted to component B.

The mixture from the reactor is separated into relatively pure A (which is recycled) & relatively pure product B.

No by-products are formed and the reactor performance can be characterised by its conversion.

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)

product ( r B ). ( S m i t h , 2 0 0 5
Mass balance equations
Mass balance equations

Given the following variables:

Mass balance equations  Given the following variables:  m i , j = molar flowrate

m i ,j = molar flowrate of Component i in Stream j

X = reactor conversion

r i = fractional recovery of Component i

Mass balance equations for each unit may be written as:

Mixer:

m A,2 = m A,1 + m A,5 m B,2 = m B,1 + m B,5

Reactor:

m A,3 = m A,2 (1 X)

m B,3 = m B,2 + Xm A,2

Separator:

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 )

B, 3 • m B , 5 = m B , 3 ( 1 – r
B, 3 • m B , 5 = m B , 3 ( 1 – r
Strategy with SM approach
Strategy with SM approach

Calculation sequence in SM: . However, problem is encountered at the mixer, as the flowrate & composition of the recycle are unknown. 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)

a specified tolerance. ( S m i t h , 2 0 0 5 ) H82CYS
Data given
Data given

Given the following values:

Data given  Given the following values:  m A , 1 = 100 kmol; m

m A,1 = 100 kmol; m B,1 = 0 kmol

X = 0.7

r A = 0.95; r B = 0.95

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

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:

Scaled residue

Calculated value - estimated value

Estimated value

(Smith, 2005)

value - estimated value Estimated value (Smith, 2005) H82CYS - Computer System Simulation of Recycle Streams
Recycle simulation with spreadsheet
Recycle simulation with spreadsheet
Recycle simulation with spreadsheet H82CYS - Computer System Simulation of Recycle Streams 29