SlideShare a Scribd company logo
1 of 20
Download to read offline
CHEM2002 -Ahmed Al-Dallal - 2013-2014 1
CHAPTER FIVE
SIMULATION TO ASSIST IN
PROCESS CREATION
1
Contents
1. Analysis of Degrees of Freedom
2. Sequential Modular Flowsheeting
3. Partitioning and Precedence
Ordering
2
5.1 Analysis of Degrees of Freedom
3
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
CHEM2002 -Ahmed Al-Dallal - 2013-2014 2
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
Important process variables
 Temperature
 Pressure
 Mass (mole) component flow rates concentration and total
flow rates
 Specific enthalpies
 Heat flow
 Work
 Flow ratios (e.g. recycle, feed/product, reflux)
6
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
Constraints and balances
1. Independent material balances for each species or a total
flow balance and (Nsp-1) species balances
2. Energy
3. Phase equilibrium relationships that link the
compositions between phases
4. Chemical equilibrium relationships
5. Implicit constraints, e.g. a species concentration is zero
6. Explicit constraints, e.g. a given stream fraction is
condensing
8
CHEM2002 -Ahmed Al-Dallal - 2013-2014 3
Example - water heater
9
DOF- Water heater
10
Stream Splitter (adiabatic)
11
Mixer (not adiabatic)
12
CHEM2002 -Ahmed Al-Dallal - 2013-2014 4
Heat exchanger (not adiabatic) 1/2
13
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?
14
Pump
15
Flash tank (single phase streams)
16
1
3
2
3
={3( Nsp + 4
CHEM2002 -Ahmed Al-Dallal - 2013-2014 5
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)
17
Reactions 2/2
18
14
25
Nd = 29 - 25 = 4
Combinations of units: mixer and flash 1/2
19
3
4
Combinations of units: mixer and flash 2/2
20
10
+10} 2} = 2Nsp + 8-
CHEM2002 -Ahmed Al-Dallal - 2013-2014 6
Example: Ammonia Plant1/4
21
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 atm
Stream 3: P=100 atm
Stream 4: T=-50 C, P=100 atm, pure NH3 (N2, H2,
Ar=0)
Stream 6: T=-50 C, P=100 atm, NH3=0
Adiabatic reactor conversion= 25%
22
Mixer
23
Reactor
24
Re
CHEM2002 -Ahmed Al-Dallal - 2013-2014 7
Separator
25
Splitter
26
Redundant variables and constrains
27
3(Nsp+2) +1 19
Redundant variables and constrains
28
CHEM2002 -Ahmed Al-Dallal - 2013-2014 8
Example: Ammonia Plant4/4
Overall view
Nv: 3(Nsp+2) +1 19
Nc:
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 29
5.2 Sequential Modular Flowsheeting
30
Sequential Modular Flowsheeting
 Unit models are written to calculate output stream values,
given input stream values and unit parameters.
31
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. 32
CHEM2002 -Ahmed Al-Dallal - 2013-2014 9
Tear the recycle
33
Follow the information flow
Tear stream 7, x, by guessing values for that
stream – mixer unit can be calculated
Calculate the reactor, separator, purge units
Check 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. 34
Notation – recycle iteration
For each iteration, k, use notation xk and F(xk).
We are really solving the explicit equation
X=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 stream
should be teared (i.e. the values guessed)?
35
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?
36
CHEM2002 -Ahmed Al-Dallal - 2013-2014 10
Ammonia reactor loop
Stream 1 is the process feed.
Stream 4 is the desired product.
Define a stream vector Xj
i 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 Ar
37
Write the Material balances
38
Write the Material balances
39
Degree of freedom analysis
Stream variables 7(4) = 28 (neglect T,P)
Reactor 1
Flash 4
Purge split 1
Total 34
Mixer equations 4
Reactor equations 4
Separator equations 8
Purge split equations 8
Total equations 24
10 degrees of freedom- which ones should we specify?
40
CHEM2002 -Ahmed Al-Dallal - 2013-2014 11
Example specifications for ammonia plant
X1 = {300, 100, 0, 1.2}
S = 0.012
χ = 0.2
K = {1, 1, 0, 1}
41
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
42
Successive substitution spreadsheet
43
Convergence Block Schemes –
Wegstein acceleration1/3
44
CHEM2002 -Ahmed Al-Dallal - 2013-2014 12
Convergence Block Schemes –
Wegstein acceleration2/3
45
Convergence Block Schemes –
Wegstein acceleration3/3
46
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
47
5.3 Partitioning and Precedence Ordering
48
CHEM2002 -Ahmed Al-Dallal - 2013-2014 13
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.
49
Consider the imaginary flowsheet
50
Stream tables
Generally topology information in process
flowsheets is tracked through stream tables –
linkage of units by streams
e.g.
Unit MIX Streams IN: 1,7
Streams OUT: 2
STREAM 7 From: PURGE To: MIX
51
By inspection …. Recycle Groups
H
Partition and precedence order: ABCDE
FG
I
Can we automate the selection?
52
CHEM2002 -Ahmed Al-Dallal - 2013-2014 14
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.
53
Example Problem 1/9
54
Example Problem 2/9
55
Example Problem 3/9
56
CHEM2002 -Ahmed Al-Dallal - 2013-2014 15
Example Problem 4/9
57
Example Problem 5/9
58
Example Problem 6/9
59
Example Problem 7/9
60
CHEM2002 -Ahmed Al-Dallal - 2013-2014 16
Example Problem 8/9
61
Example Problem 9/9
String 1: ABCDE-FG-I no output from I
Delete I
String 1: ABCDE-FG no output from FG
String 1: ABCDE no output from ABCDE
String 2: H no output from H
No units left
Precedence Order List:
H
ABCDE
FG
I
62
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.
63
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. 64
CHEM2002 -Ahmed Al-Dallal - 2013-2014 17
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
65
Equation Based Approaches2/2
 Tearing:
Find the minimum number of variables that need to be
guessed and iterate to find the rest of the variables and
group the equations to solve them in the right order –
e.g. a flash calculation.
 Requires pre-analysis and does not generalize
 Linearization:
Linearize the nonlinear set of equations using Newton-
Raphson - preferred method.
66
Problems with equation based strategy1/2
1. Difficult to use equations from existing sequential
modular packages
2. Equation management is complex
3. Large computer storage is required
4. Numerical problems include obtaining derivatives
and singularity
5. Need starting values
6. Interface to thermodynamics packages must
provide derivative information
67
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 for
convergence and control blocks and allow for more flexible
problem formulation Basis for all new simulators
currently being developed.
68
CHEM2002 -Ahmed Al-Dallal - 2013-2014 18
Simple Example 1 1/2
69
Simple Example 1 2/2
70
Simple Example 2
A B C D E
F
S1
• 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
71
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.
72
CHEM2002 -Ahmed Al-Dallal - 2013-2014 19
Partitioning Algorithm 2/2
Algorithm:
1. Select a unit/group
2. 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! 73
Example of S & W’s Partitioning
Algorithm 1/4
A B C M E
I
F G H D L
JK
1. Start with unit A
A B C M E I J K
Delete K and Delete J, since no output List
K
J 74
Example of S & W’s Partitioning
Algorithm 2/4
2. Start with unit A again
A B C M E I L E
Loop => EIL is a group
A B C M E
I
D L
JK
F G H
75
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
List
K
J
EILD
M
C
B
A
B C M EIL D EIL
5. A
Delete M
6. A B C
Delete C, B, and then A 76
CHEM2002 -Ahmed Al-Dallal - 2013-2014 20
Example of S & W’s Partitioning
Algorithm 4/4
Delete GH, and then delete F
List
K
J
EILD
M
C
B
A
GH
F
7. F G H G
F G H
Computational sequence is:
F GH A B C M EILD
K J 77

More Related Content

What's hot

Full report gas absorption
Full report gas  absorptionFull report gas  absorption
Full report gas absorption
Erra Zulkifli
 
Lecture # 6 cost estimation ii
Lecture # 6 cost estimation iiLecture # 6 cost estimation ii
Lecture # 6 cost estimation ii
Bich Lien Pham
 

What's hot (20)

Full report gas absorption
Full report gas  absorptionFull report gas  absorption
Full report gas absorption
 
Single phase flow line sizing
Single phase flow line sizingSingle phase flow line sizing
Single phase flow line sizing
 
Flow assurance using AspenHYSYS Hydraulics
Flow assurance using AspenHYSYS HydraulicsFlow assurance using AspenHYSYS Hydraulics
Flow assurance using AspenHYSYS Hydraulics
 
Adsorption regeneration_Vivek Kumar_NEERI
Adsorption regeneration_Vivek Kumar_NEERIAdsorption regeneration_Vivek Kumar_NEERI
Adsorption regeneration_Vivek Kumar_NEERI
 
Psv scenario-and-calculation
Psv scenario-and-calculationPsv scenario-and-calculation
Psv scenario-and-calculation
 
gas absorption
gas absorptiongas absorption
gas absorption
 
Distillation Column-Pohnchon savrit method.pptx
Distillation Column-Pohnchon savrit method.pptxDistillation Column-Pohnchon savrit method.pptx
Distillation Column-Pohnchon savrit method.pptx
 
Vertical vapor liquid separator
Vertical vapor liquid separatorVertical vapor liquid separator
Vertical vapor liquid separator
 
Material & Energy Balance for Distillation
Material & Energy Balance for DistillationMaterial & Energy Balance for Distillation
Material & Energy Balance for Distillation
 
Aspen Plus - Physical Properties (1 of 2) (Slideshare)
Aspen Plus - Physical Properties (1 of 2) (Slideshare)Aspen Plus - Physical Properties (1 of 2) (Slideshare)
Aspen Plus - Physical Properties (1 of 2) (Slideshare)
 
Lecture # 6 cost estimation ii
Lecture # 6 cost estimation iiLecture # 6 cost estimation ii
Lecture # 6 cost estimation ii
 
PSV Calculation and Philosophy.pdf
PSV Calculation and Philosophy.pdfPSV Calculation and Philosophy.pdf
PSV Calculation and Philosophy.pdf
 
Design of packed columns
Design of packed columnsDesign of packed columns
Design of packed columns
 
Reactor and Catalyst Design
Reactor and Catalyst DesignReactor and Catalyst Design
Reactor and Catalyst Design
 
Module 3 - Basic Equipment
Module 3 - Basic EquipmentModule 3 - Basic Equipment
Module 3 - Basic Equipment
 
Basics of two phase flow (gas-liquid) line sizing
Basics of two phase flow (gas-liquid) line sizingBasics of two phase flow (gas-liquid) line sizing
Basics of two phase flow (gas-liquid) line sizing
 
Flooding of a distillation column
Flooding of a distillation columnFlooding of a distillation column
Flooding of a distillation column
 
Designing of liquid liquid extraction columns
Designing of liquid liquid extraction columnsDesigning of liquid liquid extraction columns
Designing of liquid liquid extraction columns
 
Tank in series model
Tank in series modelTank in series model
Tank in series model
 
MB4 Mass Balance in Transient State
MB4 Mass Balance in Transient StateMB4 Mass Balance in Transient State
MB4 Mass Balance in Transient State
 

Similar to Lecture notes chem2002-lecture-5-2013-2014

Lecture+2+MB+and+degrees+of+freedom++calculations (5).pdf
Lecture+2+MB+and+degrees+of+freedom++calculations (5).pdfLecture+2+MB+and+degrees+of+freedom++calculations (5).pdf
Lecture+2+MB+and+degrees+of+freedom++calculations (5).pdf
mudassar60
 
Development of Dynamic Models and AAAA Systematic Approach for Developing Dy...
Development of Dynamic Models and AAAA Systematic Approach for  Developing Dy...Development of Dynamic Models and AAAA Systematic Approach for  Developing Dy...
Development of Dynamic Models and AAAA Systematic Approach for Developing Dy...
NizarMousa1
 
session 2 Process modelling and dynamics (5).pptx
session 2 Process modelling and dynamics (5).pptxsession 2 Process modelling and dynamics (5).pptx
session 2 Process modelling and dynamics (5).pptx
KadiriIbrahim2
 
Microsoft PowerPoint - Ch91092.PDF
Microsoft PowerPoint - Ch91092.PDFMicrosoft PowerPoint - Ch91092.PDF
Microsoft PowerPoint - Ch91092.PDF
hesam ahmadian
 
ENG3104 Engineering Simulations and Computations Semester 2, 2.docx
ENG3104 Engineering Simulations and Computations Semester 2, 2.docxENG3104 Engineering Simulations and Computations Semester 2, 2.docx
ENG3104 Engineering Simulations and Computations Semester 2, 2.docx
YASHU40
 

Similar to Lecture notes chem2002-lecture-5-2013-2014 (20)

Lecture+2+MB+and+degrees+of+freedom++calculations (5).pdf
Lecture+2+MB+and+degrees+of+freedom++calculations (5).pdfLecture+2+MB+and+degrees+of+freedom++calculations (5).pdf
Lecture+2+MB+and+degrees+of+freedom++calculations (5).pdf
 
Episode 48 : Computer Aided Process Engineering Simulation Problem
Episode 48 :  Computer Aided Process Engineering Simulation Problem Episode 48 :  Computer Aided Process Engineering Simulation Problem
Episode 48 : Computer Aided Process Engineering Simulation Problem
 
New calculation of thetray numbers for Debutanizer Tower in BIPC
New calculation of thetray numbers for Debutanizer Tower in BIPCNew calculation of thetray numbers for Debutanizer Tower in BIPC
New calculation of thetray numbers for Debutanizer Tower in BIPC
 
New calculation of thetray numbers for Debutanizer Tower in BIPC
New calculation of thetray numbers for Debutanizer Tower in BIPCNew calculation of thetray numbers for Debutanizer Tower in BIPC
New calculation of thetray numbers for Debutanizer Tower in BIPC
 
1_Introduction.pdf
1_Introduction.pdf1_Introduction.pdf
1_Introduction.pdf
 
1_Introduction.pdf
1_Introduction.pdf1_Introduction.pdf
1_Introduction.pdf
 
Pad semesteraufgabe finalreport
Pad semesteraufgabe finalreportPad semesteraufgabe finalreport
Pad semesteraufgabe finalreport
 
1D Simulation of intake manifolds in single-cylinder reciprocating engine
1D Simulation of intake manifolds in single-cylinder reciprocating engine1D Simulation of intake manifolds in single-cylinder reciprocating engine
1D Simulation of intake manifolds in single-cylinder reciprocating engine
 
Shortcut Design Method for Multistage Binary Distillation via MS-Exce
Shortcut Design Method for Multistage Binary Distillation via MS-ExceShortcut Design Method for Multistage Binary Distillation via MS-Exce
Shortcut Design Method for Multistage Binary Distillation via MS-Exce
 
Development of Dynamic Models and AAAA Systematic Approach for Developing Dy...
Development of Dynamic Models and AAAA Systematic Approach for  Developing Dy...Development of Dynamic Models and AAAA Systematic Approach for  Developing Dy...
Development of Dynamic Models and AAAA Systematic Approach for Developing Dy...
 
session 2 Process modelling and dynamics (5).pptx
session 2 Process modelling and dynamics (5).pptxsession 2 Process modelling and dynamics (5).pptx
session 2 Process modelling and dynamics (5).pptx
 
LCE-UNIT 2 PPT.pdf
LCE-UNIT 2 PPT.pdfLCE-UNIT 2 PPT.pdf
LCE-UNIT 2 PPT.pdf
 
K03401065070
K03401065070K03401065070
K03401065070
 
Analysis of Variance 3
Analysis of Variance 3Analysis of Variance 3
Analysis of Variance 3
 
Industrial plant optimization in reduced dimensional spaces
Industrial plant optimization in reduced dimensional spacesIndustrial plant optimization in reduced dimensional spaces
Industrial plant optimization in reduced dimensional spaces
 
Shell tube design
Shell tube designShell tube design
Shell tube design
 
Microsoft PowerPoint - Ch91092.PDF
Microsoft PowerPoint - Ch91092.PDFMicrosoft PowerPoint - Ch91092.PDF
Microsoft PowerPoint - Ch91092.PDF
 
ENG3104 Engineering Simulations and Computations Semester 2, 2.docx
ENG3104 Engineering Simulations and Computations Semester 2, 2.docxENG3104 Engineering Simulations and Computations Semester 2, 2.docx
ENG3104 Engineering Simulations and Computations Semester 2, 2.docx
 
Ep 5512 lecture-02
Ep 5512 lecture-02Ep 5512 lecture-02
Ep 5512 lecture-02
 
Process Dynamics Exercises and their solutions
Process Dynamics Exercises and their solutionsProcess Dynamics Exercises and their solutions
Process Dynamics Exercises and their solutions
 

Recently uploaded

DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
MayuraD1
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
pritamlangde
 

Recently uploaded (20)

DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech Civil
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Introduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdfIntroduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdf
 

Lecture notes chem2002-lecture-5-2013-2014

  • 1. CHEM2002 -Ahmed Al-Dallal - 2013-2014 1 CHAPTER FIVE SIMULATION TO ASSIST IN PROCESS CREATION 1 Contents 1. Analysis of Degrees of Freedom 2. Sequential Modular Flowsheeting 3. Partitioning and Precedence Ordering 2 5.1 Analysis of Degrees of Freedom 3 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
  • 2. CHEM2002 -Ahmed Al-Dallal - 2013-2014 2 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 Important process variables  Temperature  Pressure  Mass (mole) component flow rates concentration and total flow rates  Specific enthalpies  Heat flow  Work  Flow ratios (e.g. recycle, feed/product, reflux) 6 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 Constraints and balances 1. Independent material balances for each species or a total flow balance and (Nsp-1) species balances 2. Energy 3. Phase equilibrium relationships that link the compositions between phases 4. Chemical equilibrium relationships 5. Implicit constraints, e.g. a species concentration is zero 6. Explicit constraints, e.g. a given stream fraction is condensing 8
  • 3. CHEM2002 -Ahmed Al-Dallal - 2013-2014 3 Example - water heater 9 DOF- Water heater 10 Stream Splitter (adiabatic) 11 Mixer (not adiabatic) 12
  • 4. CHEM2002 -Ahmed Al-Dallal - 2013-2014 4 Heat exchanger (not adiabatic) 1/2 13 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? 14 Pump 15 Flash tank (single phase streams) 16 1 3 2 3 ={3( Nsp + 4
  • 5. CHEM2002 -Ahmed Al-Dallal - 2013-2014 5 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) 17 Reactions 2/2 18 14 25 Nd = 29 - 25 = 4 Combinations of units: mixer and flash 1/2 19 3 4 Combinations of units: mixer and flash 2/2 20 10 +10} 2} = 2Nsp + 8-
  • 6. CHEM2002 -Ahmed Al-Dallal - 2013-2014 6 Example: Ammonia Plant1/4 21 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 atm Stream 3: P=100 atm Stream 4: T=-50 C, P=100 atm, pure NH3 (N2, H2, Ar=0) Stream 6: T=-50 C, P=100 atm, NH3=0 Adiabatic reactor conversion= 25% 22 Mixer 23 Reactor 24 Re
  • 7. CHEM2002 -Ahmed Al-Dallal - 2013-2014 7 Separator 25 Splitter 26 Redundant variables and constrains 27 3(Nsp+2) +1 19 Redundant variables and constrains 28
  • 8. CHEM2002 -Ahmed Al-Dallal - 2013-2014 8 Example: Ammonia Plant4/4 Overall view Nv: 3(Nsp+2) +1 19 Nc: 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 29 5.2 Sequential Modular Flowsheeting 30 Sequential Modular Flowsheeting  Unit models are written to calculate output stream values, given input stream values and unit parameters. 31 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. 32
  • 9. CHEM2002 -Ahmed Al-Dallal - 2013-2014 9 Tear the recycle 33 Follow the information flow Tear stream 7, x, by guessing values for that stream – mixer unit can be calculated Calculate the reactor, separator, purge units Check 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. 34 Notation – recycle iteration For each iteration, k, use notation xk and F(xk). We are really solving the explicit equation X=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 stream should be teared (i.e. the values guessed)? 35 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? 36
  • 10. CHEM2002 -Ahmed Al-Dallal - 2013-2014 10 Ammonia reactor loop Stream 1 is the process feed. Stream 4 is the desired product. Define a stream vector Xj i 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 Ar 37 Write the Material balances 38 Write the Material balances 39 Degree of freedom analysis Stream variables 7(4) = 28 (neglect T,P) Reactor 1 Flash 4 Purge split 1 Total 34 Mixer equations 4 Reactor equations 4 Separator equations 8 Purge split equations 8 Total equations 24 10 degrees of freedom- which ones should we specify? 40
  • 11. CHEM2002 -Ahmed Al-Dallal - 2013-2014 11 Example specifications for ammonia plant X1 = {300, 100, 0, 1.2} S = 0.012 χ = 0.2 K = {1, 1, 0, 1} 41 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 42 Successive substitution spreadsheet 43 Convergence Block Schemes – Wegstein acceleration1/3 44
  • 12. CHEM2002 -Ahmed Al-Dallal - 2013-2014 12 Convergence Block Schemes – Wegstein acceleration2/3 45 Convergence Block Schemes – Wegstein acceleration3/3 46 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 47 5.3 Partitioning and Precedence Ordering 48
  • 13. CHEM2002 -Ahmed Al-Dallal - 2013-2014 13 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. 49 Consider the imaginary flowsheet 50 Stream tables Generally topology information in process flowsheets is tracked through stream tables – linkage of units by streams e.g. Unit MIX Streams IN: 1,7 Streams OUT: 2 STREAM 7 From: PURGE To: MIX 51 By inspection …. Recycle Groups H Partition and precedence order: ABCDE FG I Can we automate the selection? 52
  • 14. CHEM2002 -Ahmed Al-Dallal - 2013-2014 14 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. 53 Example Problem 1/9 54 Example Problem 2/9 55 Example Problem 3/9 56
  • 15. CHEM2002 -Ahmed Al-Dallal - 2013-2014 15 Example Problem 4/9 57 Example Problem 5/9 58 Example Problem 6/9 59 Example Problem 7/9 60
  • 16. CHEM2002 -Ahmed Al-Dallal - 2013-2014 16 Example Problem 8/9 61 Example Problem 9/9 String 1: ABCDE-FG-I no output from I Delete I String 1: ABCDE-FG no output from FG String 1: ABCDE no output from ABCDE String 2: H no output from H No units left Precedence Order List: H ABCDE FG I 62 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. 63 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. 64
  • 17. CHEM2002 -Ahmed Al-Dallal - 2013-2014 17 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 65 Equation Based Approaches2/2  Tearing: Find the minimum number of variables that need to be guessed and iterate to find the rest of the variables and group the equations to solve them in the right order – e.g. a flash calculation.  Requires pre-analysis and does not generalize  Linearization: Linearize the nonlinear set of equations using Newton- Raphson - preferred method. 66 Problems with equation based strategy1/2 1. Difficult to use equations from existing sequential modular packages 2. Equation management is complex 3. Large computer storage is required 4. Numerical problems include obtaining derivatives and singularity 5. Need starting values 6. Interface to thermodynamics packages must provide derivative information 67 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 for convergence and control blocks and allow for more flexible problem formulation Basis for all new simulators currently being developed. 68
  • 18. CHEM2002 -Ahmed Al-Dallal - 2013-2014 18 Simple Example 1 1/2 69 Simple Example 1 2/2 70 Simple Example 2 A B C D E F S1 • 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 71 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. 72
  • 19. CHEM2002 -Ahmed Al-Dallal - 2013-2014 19 Partitioning Algorithm 2/2 Algorithm: 1. Select a unit/group 2. 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! 73 Example of S & W’s Partitioning Algorithm 1/4 A B C M E I F G H D L JK 1. Start with unit A A B C M E I J K Delete K and Delete J, since no output List K J 74 Example of S & W’s Partitioning Algorithm 2/4 2. Start with unit A again A B C M E I L E Loop => EIL is a group A B C M E I D L JK F G H 75 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 List K J EILD M C B A B C M EIL D EIL 5. A Delete M 6. A B C Delete C, B, and then A 76
  • 20. CHEM2002 -Ahmed Al-Dallal - 2013-2014 20 Example of S & W’s Partitioning Algorithm 4/4 Delete GH, and then delete F List K J EILD M C B A GH F 7. F G H G F G H Computational sequence is: F GH A B C M EILD K J 77