lecture notes chem2002 lecture 5 2013 2014
DESCRIPTION
degrees of freedom, partitioning and precedence orderingTRANSCRIPT
![Page 1: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/1.jpg)
CHAPTER FIVESIMULATION TO ASSIST IN
PROCESS CREATION
1
![Page 2: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/2.jpg)
Contents
1. Analysis of Degrees of Freedom2. Sequential Modular Flowsheeting3. Partitioning and Precedence
Ordering
2
![Page 3: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/3.jpg)
5.1 Analysis of Degrees of Freedom
3
![Page 4: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/4.jpg)
Objectives:
1. Identify stream variables entering and leaving a unit; identify variables that describe the unit.
2. Determine the number of independent equations for each unit.
3. Calculate the degrees of freedom or number of decision variables.
4. Specify the values of variables equal to the number of degrees of freedom.
4
![Page 5: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/5.jpg)
Posing the Problem
To obtain a solution to a process model, we need to formulate a well-posed problem.
The degrees of freedom (DOF) are the variables in a set of independent equations which must have their values assigned.
DOF = # variables - # equations Nd = Nv - Nc
Equations include material and energy balances, unit constraints, composition constraints.
5
![Page 6: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/6.jpg)
Important process variables
TemperaturePressureMass (mole) component flow rates concentration and total
flow ratesSpecific enthalpiesHeat flowWorkFlow ratios (e.g. recycle, feed/product, reflux)
6
![Page 7: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/7.jpg)
Defining Stream Variables
To define the state of a stream with Nsp species:
The number of variables to describe a stream is given by:
Nv = Nsp +2
7
![Page 8: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/8.jpg)
Constraints and balances
1. Independent material balances for each species or a total flow balance and (Nsp-1) species balances
2. Energy3. Phase equilibrium relationships that link the
compositions between phases4. Chemical equilibrium relationships5. Implicit constraints, e.g. a species concentration is zero6. Explicit constraints, e.g. a given stream fraction is
condensing8
![Page 9: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/9.jpg)
Example - water heater
9
![Page 10: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/10.jpg)
DOF- Water heater
10
Balance
![Page 11: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/11.jpg)
Stream Splitter (adiabatic)
11
(Total)
![Page 12: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/12.jpg)
Stream Splitter (adiabatic) (another sol)
12
NspSplitter Restriction =(m-1)(Nsp-1) Nsp-1
m=number of splitts
![Page 13: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/13.jpg)
Mixer (not adiabatic)
13
![Page 14: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/14.jpg)
Heat exchanger (not adiabatic) 1/2
14
![Page 15: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/15.jpg)
Heat exchanger (not adiabatic) 2/2
Give example specification for a well-posed problem for Nsp = 2.
• What would change in the model if the number of components in each stream is not the same?
• Heat exchangers do have hydraulic pressure losses on the shell and tube sides. How would we incorporate this information into the model?
15
![Page 16: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/16.jpg)
Pump
16
![Page 17: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/17.jpg)
Flash tank (single phase streams)
17
1
3
2
3
={3( Nsp + 4
![Page 18: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/18.jpg)
Reactions 1/2 If reactions are present, the number of variables stays the same, but
the number of material balances depends on the number of independent material balances, not species.
(Assume Isothermal and isobar conditions)
18
![Page 19: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/19.jpg)
Reactions 2/2
19
14 25Nd = 29 - 25 = 4
![Page 20: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/20.jpg)
Combinations of units: mixer and flash 1/2
20
34
![Page 21: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/21.jpg)
Combinations of units: mixer and flash 2/2
21
10
+10} 2} = 2Nsp + 8-
![Page 22: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/22.jpg)
Example: Ammonia Plant1/4
22
Flash
![Page 23: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/23.jpg)
Example: Ammonia Plant2/4
Species: N2, H2, Ar, NH3
Specifications:Stream 1: T= 50 C, P = 100 atm, NH3 =0 (counted in mixer)Stream 2: no NH3, P=100 atmStream 3: P=100 atmStream 4: T=-50 C, P=100 atm, pure NH3 (N2, H2, Ar=0)Stream 5: T=-50 C, P=100 atm, NH3=0Stream 6: T=-50 C, P=100 atm, NH3=0Stream 7: T=-50 C, P=100 atm, NH3=0Adiabatic reactor conversion= 25%
23
Flash
![Page 24: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/24.jpg)
Mixer
24
(stream 1,2,3)
(stream 1)
Stream 1: T= 50 C, P = 100 atm, NH3 =0 Stream 2: no NH3, P=100 atmStream 7: T=-50 C, P=100 atm, NH3=0
Flash
P1 =P2 = P7= 100 atm
(stream 7)
![Page 25: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/25.jpg)
Reactor
25
(stream 2)
(stream 2,3)
4
Stream 2: no NH3, P=100 atmStream 3: P=100 atm
Flash
![Page 26: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/26.jpg)
Separator
26
Stream 3: P=100 atmStream 4: T=-50 C, P=100 atm, pure NH3 (N2, H2, Ar=0)Stream 5: T=-50 C, P=100 atm, NH3=0
Nv = 3(Nsp+2) + 1 = 19Nc; Material Balance 4 Energy Balance 1 Specifications T5 = - 50 C 1 Ammonia =0 in stream 5 1 T4 = - 50 C 1 P3 = 100 atm, P4 = 100 atm P5 = 100 atm 3 Composition; N2 = 0, H2= 0, Ar=0 in(4) 3 14Nd = Nv - Nc = 19 – 15 = 5
Flash
![Page 27: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/27.jpg)
Splitter
27
(P5=P6=P7=100)
(Stream 6)
Stream 6: T=-50 C, P=100 atm, NH3=0Stream 5: T=-50 C, P=100 atm, NH3=0Stream 6: T=-50 C, P=100 atm, NH3=0
Flash
![Page 28: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/28.jpg)
Redundant variables and constrains
28
Total Nd = 6 + 4 + 5 + 4 = 19
![Page 29: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/29.jpg)
Redundant variables and constrains
29
![Page 30: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/30.jpg)
Example: Ammonia Plant4/4
Overall viewNv: 3(Nsp+2) +1 19Nc: Material balance (N, H, Ar) 3 (Atomic Species) Energy balance 1 Feed stream (stream 1) 3 (T=50 C,P =100 atm, NH3=0) Ammonia product (Stream 4) 5 (T=-50 C,P =100 atm, H2=0, Ar=0, N2=0) Purge stream (Stream 6) 3 (T=-50 C,P =100 atm, NH3 =0) Nd = 4
30
![Page 31: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/31.jpg)
Degrees of FreedomExample-09
![Page 32: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/32.jpg)
Splitter (adiabatic)
32
Stream 1: P=1 atm, T=30 C, Flow = 10000lb/h, xs =0.12Stream 3: F2/F1 = 0.1Stream 4: xs =0, P= 0.5 atm gauge, T= 50 CStream 5: xs =0.8
Nv = 3(Nsp+2) = 12Nc; Total Material Balance 1 composition specifications [2(Nsp -1) ] 2 Specifications T1 = T2 =T3 2 P1 = P2 =P3 2 Stream 1: P=1 atm, T=30 C, Flow = 10000lb/h, xs =0.12 4 Stream 3: F2/F1 = 0.1 1 12 Nd = Nv - Nc = 12 – 12 = 0
![Page 33: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/33.jpg)
Flash evaporator
33
Stream 2: F2/F1 = 0.9Stream 4: xs =0, P= 0.5 atm gauge, T= 50 CStream 5: xs =0.8
Nv = 3(Nsp+2) + 1 = 13Nc; Material Balance 2 Energy Balance 1 Phase Equilibrium (water only) 1Specifications T4 = T5 1 P4 = P5 1 Stream 2: F2/F1 = 0.1 1 Stream 4: xs =0, P= 0.5 atm gauge, T= 50 C 3 Stream 5: xs =0.8 1 11 Nd = Nv - Nc = 13 – 11 = 2
![Page 34: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/34.jpg)
Mixer (Adiabatic)
34
Stream 5: xs =0.8
Nv = 3(Nsp+2) = 12Nc; Material Balance 2 Energy Balance 1 Specifications Stream 5: xs =0.8 1 4 Nd = Nv - Nc = 12 – 4 = 8
![Page 35: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/35.jpg)
Redundant variables and constrains
Total Nd = 0 + 2 + 8 = 10Redundant variable in intercomming streams= 3(Nsp+2) = 12Redundant constrains being eliminated = 2Stream 2: F2/F1 = 0.1Stream 5: xs =0.8Overall degrees of freedom = 10 -12+2=0
![Page 36: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/36.jpg)
Overall
Nv = 3(Nsp+2) = 12
Nc; EQUATIONS: Material Balance 2 Energy Balance 1 The overall conversion of B in the process is 95% 1 Specifications Stream 3, C = 100 mole/h 1 Stream 1: P=1 atm, T=30 C, Flow = 10000lb/h, xs =0.12 4 Stream 4: xs =0, P= 0.5 atm gauge, T= 50 C 3 12Nd = Nv - Nc = 12 – 12 = 0
![Page 37: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/37.jpg)
Example-09
![Page 38: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/38.jpg)
Example-10
1- Conversion of B in reactor = 60%2- Most of the unreacted B is recovered in a flash separator and recycled to reactor3- The fresh feed to reactor consists of A and B 4- fresh A in feed being 30% in excess of the stoichiometric amount to required to react with the fresh B5- The overall conversion of B in the process is 95%6- The required production rate of C = 100 mole/h
![Page 39: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/39.jpg)
Reactor
Nv = 3(Nsp+2) + 1(Q) + 1() = 20Nc; Material Balance 4 Energy Balance 1EQUATIONS: Conversion of B in reactor = 60% 1 Specifications Q=0 1 Stream 1, P = 1 atm, T= 25 C, A (30% excess) C =D=0(Composition) 5 Stream 4, COMP : A, C, D =0 3 15Nd = Nv - Nc = 20 – 15 = 5
![Page 40: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/40.jpg)
Flash Separator
Nv = 3(Nsp+2) + 1(Q) = 19Nc;EQUATIONS: Material Balance 4 Energy Balance 1 The overall conversion of B in the process is 95% 1 equilibrium (B only) 1 T3 = T4 1 P3=P4 1 Specifications Q=0 1 Stream 3, C = 100 mole/h 2 Stream 4, COMP : A, C, D =0 3 15
Nd = Nv - Nc = 19 – 15 = 4
![Page 41: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/41.jpg)
Redundant variables and constrains
Total Nd = 5 + 4= 9Redundant variable in intercomming streams= 2(Nsp+2) = 12Redundant constrains being eliminated = 3Stream 4, Composition : A, C, D =0 Overall degrees of freedom = 9 -12+3=0
![Page 42: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/42.jpg)
Overall
Nv = 2(Nsp+2) = 12Nc;EQUATIONS: Material Balance 4 Energy Balance 1 The overall conversion of B in the process is 95% 1 Specifications Stream 3: C = 100 mole/h 1 Stream 1: P = 1 atm, T= 25 C, A (30% excess) C =D=0(Composition) 5 12 Nd = Nv - Nc = 12 – 12 = 0
![Page 43: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/43.jpg)
Example-11
![Page 44: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/44.jpg)
+
Nv = 3(Nsp+2) + 1 = 28Nc; Material Balance (species) 4 Energy Balance 1 Specifications Q=0 1 excess air 1 Stream 1, P = 1 atm, T= 25 C, F=100 mole/h 3 Stream 2, P = 1 atm, T= 25 C 2 Stream 3, P = 1 atm 1 composition Stream 1, 6 Stream 2, CH4, H2, CO, CO2,H2O =0 6 Stream 3, CH4, H2, CO, =0 3 Nd = Nv - Nc = 28 – 28 = 0
Example-11
![Page 45: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/45.jpg)
5.2 Sequential Modular Flowsheeting
45
![Page 46: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/46.jpg)
Sequential Modular Flowsheeting
Unit models are written to calculate output stream values, given input stream values and unit parameters.
46
![Page 47: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/47.jpg)
Defining features
Need to specify all incoming streams (Stream 1)To calculate the outlet of the mixer - need to guess
the stream variable values for the recycle streams.The recycle stream values are then calculated and
checked against the values guessed for that iteration – if they agree within a tolerance, then the flowsheet is converged.
This procedure is called tearing a recycle stream.47
![Page 48: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/48.jpg)
Tear the recycle
48
![Page 49: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/49.jpg)
Follow the information flow
Tear stream 7, x, by guessing values for that stream – mixer unit can be calculated
Calculate the reactor, separator, purge unitsCheck the calculated stream 7, |F(x) – x| <
tolerance, then converged.If not, then use some combination of the guess (x)
and the calculated result (F(x)) to start another iteration. 49
![Page 50: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/50.jpg)
Notation – recycle iteration
For each iteration, k, use notation xk and F(xk).We are really solving the explicit equationX=F(X)By iteration:X k+1 = F(Xk)Note that we could tear stream 7, 2, 3 or 5.Q? What criteria would you use to decide which streamshould be teared (i.e. the values guessed)?
50
![Page 51: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/51.jpg)
Important questions:
1. How do we analyze a process flowsheet to determine whether there are recycles and which stream to tear (guess)?
2. How do we handle many recycles, which may be nested?3. How are calculated values for the recycle stream used for
subsequent iterations?4. What solution procedure should be used if not all the
inputs to the process are known, but some outputs are specified?
51
![Page 52: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/52.jpg)
Ammonia reactor loop
Stream 1 is the process feed.Stream 4 is the desired product.
Define a stream vector Xji where j is the stream number and i is the
component. We take Xj to mean the vector of all the stream variables in stream j.
We have 4 components: i=1 H2
i=2 N2
i=3 NH3
i=4 Ar52
![Page 53: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/53.jpg)
Write the Material balances
53
![Page 54: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/54.jpg)
Write the Material balances
54
![Page 55: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/55.jpg)
Degree of freedom analysis
Stream variables 7(4) = 28 (neglect T,P)Reactor 1Flash 4Purge split 1Total 34
Mixer equations 4Reactor equations 4Separator equations 8Purge split equations 8Total equations 24
10 degrees of freedom- which ones should we specify?55
![Page 56: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/56.jpg)
Example specifications for ammonia plant
X1 = {300, 100, 0, 1.2}S = 0.012χ = 0.2K = {1, 1, 0, 1}
56
![Page 57: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/57.jpg)
Convergence Block Schemes – Successive Substitution
Let Xk be the guess for the tear stream variables at the kth iteration.
Let F(Xk) be the calculated result for that tear stream’s values.The simplest iteration scheme is successive substitution, or
fixed point iteration. X k+1 = F(Xk)The next guess on the tear stream is the newly calculated
variable values.A more general, weighted form is: X k+1 = a F(Xk) + (1-a) Xk
Which is useful if the iterations start to oscillate, e.g. a=0.5
57
![Page 58: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/58.jpg)
Successive substitution spreadsheet
58
![Page 59: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/59.jpg)
Convergence Block Schemes –Wegstein acceleration1/3
59
![Page 60: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/60.jpg)
Convergence Block Schemes –Wegstein acceleration2/3
60
![Page 61: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/61.jpg)
Convergence Block Schemes –Wegstein acceleration3/3
61
![Page 62: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/62.jpg)
Summary
Sequential modular models – require all inputs and unit parameters, then calculate outputs
Problems with recycles – we do not know one of the inputs
Concept of tear stream allows us to guess stream value to allow unit computation
Convergence blocks use previous and current iterations to predict next guess:
– Successive substitution – Wegstein acceleration
62
![Page 63: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/63.jpg)
5.3 Partitioning and Precedence Ordering
63
![Page 64: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/64.jpg)
Partitioning and Precedence Ordering
Partitioning: locate groups of units that must be solved together
Precedence ordering: solve these groups of units within a process in the proper computational order
A partition is unique, but the precedence ordering is not
Partitions may exist where the order of the solution may have groups of units calculated in serial or parallel order.
64
![Page 65: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/65.jpg)
Consider the imaginary flowsheet
65
![Page 66: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/66.jpg)
By inspection …. Recycle Groups
HPartition and precedence order: ABCDE FG I
Can we automate the selection?
66
![Page 67: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/67.jpg)
Sargent and Westerberg algorithm
1. Trace from an arbitrary starting unit to the next unit, through a connecting stream, to form a string of units.
2. Continue, until:a) A unit in the string reappears. Then all the units between the
repeated unit occurrences, including the repeat unit, is a group. A group is treated as single unit.
b) A unit has no more outputs – place it at the top of a list of groups/units and delete from the problem
The list will contain the groups in the correct precedence order.
67
![Page 68: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/68.jpg)
Example Problem 1/9
68
![Page 69: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/69.jpg)
Example Problem 2/9
69
![Page 70: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/70.jpg)
Example Problem 3/9
70
![Page 71: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/71.jpg)
Example Problem 4/9
71
![Page 72: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/72.jpg)
Example Problem 5/9
72
![Page 73: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/73.jpg)
Example Problem 6/9
73
![Page 74: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/74.jpg)
Example Problem 7/9
74
![Page 75: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/75.jpg)
Example Problem 8/9
75
![Page 76: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/76.jpg)
Example Problem 9/9
String 1: ABCDE-FG-I no output from IDelete IString 1: ABCDE-FG no output from FGString 1: ABCDE no output from ABCDEString 2: H no output from HNo units left
Precedence Order List:H
ABCDEFGI
76
![Page 77: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/77.jpg)
Tearing
There are a number of approaches to develop better tearing strategies. However they require the analysis of the number of components and recycles.
Generally, try to minimize the number of tear streams and the number of variables in the tear streams.
77
![Page 78: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/78.jpg)
Equation solving approaches
Model equations are written in the open form,F(x,u) = 0
Where x are the stream variables and u are the unit parameters.
All the nonlinear equations are assembled and solved simultaneously. This can create a huge nonlinear equation set: typically at least 103 to 105 equations.
The solution methodology is complicated because each equation includes relatively few variables – the variables in the unit and adjacent units. This is called a sparse set of equations.
78
![Page 79: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/79.jpg)
Equation-based Approach1/2
Advantage is that any parameter or stream variable can be specified, if:
– The number of equations equals the number of
variables – The equations are linearly independent The problem must be nonsingular
79
![Page 80: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/80.jpg)
Equation Based Approaches2/2
Tearing:Find the minimum number of variables that need to beguessed and iterate to find the rest of the variables andgroup the equations to solve them in the right order –e.g. a flash calculation.
Requires pre-analysis and does not generalizeLinearization:Linearize the nonlinear set of equations using Newton-Raphson - preferred method.
80
![Page 81: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/81.jpg)
Problems with equation based strategy1/2
1. Difficult to use equations from existing sequential modular packages
2. Equation management is complex3. Large computer storage is required4. Numerical problems include obtaining derivatives
and singularity5. Need starting values6. Interface to thermodynamics packages must
provide derivative information81
![Page 82: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/82.jpg)
Problems with equation based strategy2/2
7. Need to have backup plan in case solution fails to converge
8. Need input data verification to prevent singular problems ( structural or numerical singularity)
9. Ordering of the equations affects the equation solution time
BUT, equation based strategies remove the need forconvergence and control blocks and allow for more flexible
problem formulation Basis for all new simulators currently being developed.
82
![Page 83: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/83.jpg)
Simple Example 1 1/2
83
![Page 84: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/84.jpg)
Simple Example 1 2/2
84
![Page 85: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/85.jpg)
Simple Example 2
A B C D E
FS1
• Partitioning: 3 unit groups, namely ABCD, E, and F• Procedence Ordering: ABCD, then E, then F• Actual computational sequence: Tear S1 --> C --> D --> A --> B --> Update S1 --> E --> F
85
![Page 86: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/86.jpg)
Partitioning Algorithm 1/2
Path Tracing algorithm by Sargent and Westerberg (1964) - A simple algorithm for tracing unit outputs - Basically, one traces from one unit to the next through the unit output streams, forming a “string” of units. This tracing continues until (a) A unit in the string reappears. All units between the repeated unit, together with the repeated unit, become a group, which is collapsed together and treated as a single unit, and the tracing continues from it. (b) A unit or group of units with no more outputs is encountered. The unit or group of units is placed at the top of a list of groups and is deleted entirely from the problem.
86
![Page 87: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/87.jpg)
Partitioning Algorithm 2/2
Algorithm:1. Select a unit/group2. Trace outputs downstream until (a) a unit or a group on the path reappears. Go to step 3. (b) a unit or a group is reached with no external outputs. Go to step 4.3. Label all units into a group. Go to step 2.4. Delete the unit or group. Record it in
a list. Go to step 2. Sequence is from bottom to top of list!
87
![Page 88: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/88.jpg)
Example of S & W’s Partitioning Algorithm 1/4
A B C M E
IF G H D L
JK1. Start with unit AA B C M E I J K
Delete K and Delete J, since no output
ListKJ 88
![Page 89: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/89.jpg)
Example of S & W’s Partitioning Algorithm 2/4
2. Start with unit A againA B C M E I L E
Loop => EIL is a group
A B C M E
I
D LJK
F G H
89
![Page 90: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/90.jpg)
Example of S & W’s Partitioning Algorithm 3/4
EILD will be a group
3. A
B C M
4. Delete EILD since it has no more outputs
ListKJ
EILDMCBA
B C M EIL D EIL
5. A
Delete M
6. A B C
Delete C, B, and then A
90
![Page 91: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/91.jpg)
Example of S & W’s Partitioning Algorithm 4/4
Delete GH, and then delete F
ListKJ
EILDMCBA
GHF
7. F G H G
F G H
Computational sequence is:F GH A B C M EILD
K J 91
![Page 92: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/92.jpg)
Example-1
![Page 93: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/93.jpg)
Example-2
![Page 94: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/94.jpg)
Example-3
![Page 95: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/95.jpg)
Example-4
![Page 96: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/96.jpg)
Example-5
![Page 97: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/97.jpg)
Example-6
![Page 98: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/98.jpg)
Example-7
![Page 99: Lecture Notes CHEM2002 Lecture 5 2013 2014](https://reader030.vdocuments.site/reader030/viewer/2022033103/55cf9430550346f57ba03732/html5/thumbnails/99.jpg)
Example-8