Professional Documents
Culture Documents
Saeed Eini
Department of Chemical and Petroleum Engineering
Sharif University of Technology
1401 پاییز
http://che.sharif.edu/~ProSET
Saeed Eini
Dep. of Chem. and Petrol. Eng.
Sharif Uni. of Technology
Process optimization
Process optimization
Saeed Eini
Dep. of Chem. and Petrol. Eng.
Sharif Uni. of Technology
• Once the basic performance of the design has been evaluated, changes can be made to improve
the performance; the process is optimized
Process Model
(3) Restrictions/Limitations/Constraints
Process optimization
Saeed Eini
Dep. of Chem. and Petrol. Eng.
Sharif Uni. of Technology
• It is usually not necessary for a designer to construct an optimization algorithm in order to carry
out an optimization, as general-purpose software is usually available for this
• However, it is necessary for the designer to have some understanding of how optimization works
in order to avoid the pitfalls that can occur
• Optimization problems in process design are usually concerned with maximizing or minimizing an
objective function (Performance Indicator)
• The objective function is a measure of the quality of the solution and might typically cause
economic potential to be maximized or cost to be minimized.
• Consider a process with two streams (cold and hot) having the opportunity of heat integration
mC,CP,C
TC,in TC,out
cold stream
• Consider a process with two streams (cold and hot) having the opportunity of heat integration
mC,CP,C
TC,in TC,out
cold stream
Process optimization
Saeed Eini
Dep. of Chem. and Petrol. Eng.
Sharif Uni. of Technology
• Consider a process with two streams (cold and hot) having the opportunity of heat integration
mC,CP,C
TC,in TC,out
cold stream
mH,CP,H
TH,in TH,out
Hot stream
• Consider a process with two streams (cold and hot) having the opportunity of heat integration
mC,CP,C
TC,in TC,out
cold stream
mH,CP,H
TH,in TH,out
Hot stream
cold stream
Hot stream
• Consider a process with two streams (cold and hot) having the opportunity of heat integration
mC,CP,C
TC,in TC,out
cold stream
mH,CP,H
TH,in TH,out
Hot stream
cold stream
Hot stream
• Consider a process with two streams (cold and hot) having the opportunity of heat integration
mC,CP,C
TC,in TC,out
cold stream
mH,CP,H
TH,in TH,out
Hot stream
cold stream
Hot stream
• Consider a process with two streams (cold and hot) having the opportunity of heat integration
mC,CP,C
TC,in TC,out
cold stream
mH,CP,H
TH,in TH,out
Hot stream
cold stream
Hot stream
(1)
(2)
(3) 19 equality equations
(4)
(5)
(6)
(7) to
(19)
(1)
(2)
(3) 19 equality equations
(4) 20 variables
(5)
(6)
(7) to
(19)
(1)
(2)
(3) 19 equality equations
(4) 20 variables
(5)
Degree of freedom = 1
The system is underspecified and
(6) cannot be solved
(7) to
(19)
Design variable
𝑑𝑓
=0
𝑑𝑥
• Equality constraints
• The modeling equations associated with processing equipment
• Inequality constraints
• Usually the operational constraints, feasibility constraints, …
• Discontinuity
• Multimodal functions
• Convexity
o Convex region
o Convex functions
Convex Concave
Chemical Process: Design and Integration, 2nd edition, Smith, 2016.
Process optimization
Saeed Eini
Dep. of Chem. and Petrol. Eng.
Sharif Uni. of Technology
Saddle points
Chemical
Product and Process Design Principles, Process:
Analysis, Design
Synthesis and Integration,
and Evaluation, 2nd Seider
4th edition, edition, Smith,
et al., 2016.2016.
Process optimization
Saeed Eini
Dep. of Chem. and Petrol. Eng.
Sharif Uni. of Technology
• Optimization problems
o Linear programming (LP)
o Nonlinear programming (NLP)
o Mixed-integer programming (MIP)
o Mixed-integer nonlinear programming (MINLP)
o LP problems: objective function, equality constraints and inequality constraints are all linear
o Some of the common applications of LP methods are for (1) assignment, (2) blending, (3)
distribution, (4) determining network flows, (5) scheduling, and (6) transportation
Process optimization
Saeed Eini
Dep. of Chem. and Petrol. Eng.
Sharif Uni. of Technology
Determine the operation of the plant to obtain the maximum annual revenue
Determine the operation of the plant to obtain the maximum annual revenue
o Constraints?
Determine the operation of the plant to obtain the maximum annual revenue
o Constraints?
• The maximum operating time of Step I
• The maximum operating time of Step II
• n1 and n2 are positives
o Constraints?
• The maximum operating time of Step I
• The maximum operating time of Step II
• n1 and n2 are positives
o Objective function?
o Constraints?
• The maximum operating time of Step I 25𝑛1 + 10𝑛2 ≤ 5000
• The maximum operating time of Step II 10𝑛1 + 20𝑛2 ≤ 6000
• n1 and n2 are positives 𝑛1 ≥ 0 𝑛2 ≥ 0
𝑛1 ≥ 0 (𝑛1 = 0)
600
𝑛2 ≥ 0 (𝑛2 = 0) 500
400
300
200
100
n1
200
100
300
400
500
600
Chemical Process: Design and Integration, 2nd edition, Smith, 2016.
Process optimization
Saeed Eini
Dep. of Chem. and Petrol. Eng.
Sharif Uni. of Technology
𝑛1 ≥ 0 (𝑛1 = 0)
600
𝑛2 ≥ 0 (𝑛2 = 0) 500
300
200
100
n1
200
100
300
400
500
600
𝑛2 = 500 − 2.5𝑛1
Chemical Process: Design and Integration, 2nd edition, Smith, 2016.
Process optimization
Saeed Eini
Dep. of Chem. and Petrol. Eng.
Sharif Uni. of Technology
𝑛1 ≥ 0 (𝑛1 = 0)
600
𝑛2 ≥ 0 (𝑛2 = 0) 500
300
10𝑛1 + 20𝑛2 ≤ 6000 (𝑛2 ≤ 300 − 0.5𝑛1 )
200
100
n1
200
100
300
400
500
600
𝑛2 = 300 − 0.5𝑛1
𝑛2 = 500 − 2.5𝑛1
Chemical Process: Design and Integration, 2nd edition, Smith, 2016.
Process optimization
Saeed Eini
Dep. of Chem. and Petrol. Eng.
Sharif Uni. of Technology
𝑛1 ≥ 0 (𝑛1 = 0)
600
𝑛2 ≥ 0 (𝑛2 = 0) 500
300
10𝑛1 + 20𝑛2 ≤ 6000 (𝑛2 ≤ 300 − 0.5𝑛1 )
200
𝐴
𝐴 = 3000𝑛1 + 2000𝑛2 (𝑛2 = −1.5𝑛1 + ) 100
2000
n1
200
100
300
400
500
600
𝑛2 = 300 − 0.5𝑛1
A=1,000,000 $
A=600,000 $
𝑛2 = 500 − 2.5𝑛1
Chemical Process: Design and Integration, 2nd edition, Smith, 2016.
Process optimization
Saeed Eini
Dep. of Chem. and Petrol. Eng.
Sharif Uni. of Technology
𝑛1 ≥ 0 (𝑛1 = 0)
600
𝑛2 ≥ 0 (𝑛2 = 0) 500
n1
200
100
300
400
500
600
𝑛2 = 300 − 0.5𝑛1
A=1,000,000 $
A=600,000 $
𝑛2 = 500 − 2.5𝑛1
Chemical Process: Design and Integration, 2nd edition, Smith, 2016.
Process optimization
Saeed Eini
Dep. of Chem. and Petrol. Eng.
Sharif Uni. of Technology
o The solution space is convex and a global optimum solution can be obtained
o The optimum cannot occur inside the feasible region; it must always be at the boundary
o Unlike the linear optimization problem, for the nonlinear optimization problem the optimum
may or may not lie on the edge of the feasible region and can, in principle, be anywhere within
the feasible region
o Solution strategy: Successive linear programming, successive (or sequential) quadratic
programming, …
o Deterministic methods (Direct search methods, Indirect search methods) and Stochastic search
methods (Simulated annealing, Genetic algorithms, …)
Process optimization
Saeed Eini
Dep. of Chem. and Petrol. Eng.
Sharif Uni. of Technology
A
1 3
o Example B
2
N3 8
N4 N5
S N1 N2
5 6 7 N6
A B P rA k1C A
S P R rS k2CS
Process optimization
Saeed Eini
Dep. of Chem. and Petrol. Eng.
Sharif Uni. of Technology
A
1 3
o Example B
2
N3 8
N4 N5
Mass balance S N1 N2
N1 (Mixer)
5 6 7 N6
F2 F1 F9
F2 zi , 2 F1 zi ,1 F9 zi ,9 9
N2 (Cooler)
F3 F2 N4 (Reactor) A B P rA k1C A
F3 zi ,3 F21 zi , 2 FA, 6 FA,5 exp( k1 ) S P R rS k2CS
N6 (2 phase separator)
N3 (2 phase separator) 1 FA, 6 FA,5 F7 F8 F9
F3 F4 F5
FB , 6 FB ,5 1 F7 zi , 7 F8 yi ,8 F9 xi ,9
F3 zi ,3 F4 yi , 4 F5 xi ,5
FS , 6 FS ,5 exp( k 2 ) yi ,8 K i , N 6 xi ,9
yi , 4 K i , N 3 xi ,5
2 FS , 6 FS ,5 i8
4
K i, N6 9
K i, N3 i
FP , 6 FP ,5 1 2 i
i
5
i
yi , 4 i xi ,5 0 FR , 6 FR ,5 2 i
yi ,8 i xi ,9 0
ln( i ) f ( z , P, T , composition) N5 (Cooler) ln(i ) f ( z , P, T , composition)
f ( z) 0 Fi , 7 Fi , 6 f ( z) 0
Process optimization
Saeed Eini
Dep. of Chem. and Petrol. Eng.
Sharif Uni. of Technology
A
1 3
o Example B
2
N3 8
Energy balances S N1 N2 N4 N5
5 6 7 N6
N2 (Cooler)
9
H 2 H 3 QN 2
H H ig H res A B P rA k1C A
N5(Cooler) S P R rS k2CS
H res f ( z , P, T , composition)
H 6 H 7 QN 5
N4 (Reactor)
H H ig H res
H 6 H 5 Qreaction
H res f ( z , P, T , composition)
Qreaction ( H r1 1 ) ( H r 2 2 )
H H ig H res
f ( z) 0
H res f ( z , P, T , composition)
f ( z) 0
Process optimization
Saeed Eini
Dep. of Chem. and Petrol. Eng.
Sharif Uni. of Technology
A
1 3
o Example B
2
N3 8
Other constraints S N1 N2 N4 N5
5 6 7 N6
Pj cons. 9
T1 T2 T9
A B P rA k1C A
T3 35 C o
S P R rS k2CS
T3 T4 T5
T7 35o C
T7 T8 T9
yi , j ....
xi , j ....
F j ....
Process optimization
Saeed Eini
Dep. of Chem. and Petrol. Eng.
Sharif Uni. of Technology
Process model S N1 N2 N4 N5
• Optimization strategy
o Process synthesis (determine the structure of the process)
o Process modeling/formulation
• Determine the nodes (where changes occur)
• Number the streams
• Determine the variables
• Balance the mass/molar flow for each node
• Balance the energy/enthalpy flow for each node
• Determine the range of the variables (upper and lower bounds)
• Consider other operational or design-related constraints
• Simplify the model
o Determine the objective function
o Apply an optimization algorithm or Implement the problem in an optimization package
o Tune the problem/solver
o Solve the problem
o Post optimization studies and evaluations
Process optimization
Saeed Eini
Dep. of Chem. and Petrol. Eng.
Sharif Uni. of Technology
o Almost always, a binary variable represents a choice. For example this can be a direct choice
(build factory or not) or a logical choice (and/or).
Process optimization
Saeed Eini
Dep. of Chem. and Petrol. Eng.
Sharif Uni. of Technology
???????
???????
A
0 𝑖𝑓 𝑒𝑞𝑢𝑖𝑝𝑚𝑒𝑛𝑡 𝐴 𝑑𝑜𝑒𝑠𝑛𝑡 𝑒𝑥𝑖𝑠𝑡
𝑦𝐴 = ቊ
1 𝑖𝑓𝑒𝑞𝑢𝑖𝑝𝑚𝑒𝑛𝑡 𝐴 𝑒𝑥𝑖𝑠𝑡𝑠
???????
A
0 𝑖𝑓 𝑒𝑞𝑢𝑖𝑝𝑚𝑒𝑛𝑡 𝐴 𝑑𝑜𝑒𝑠𝑛𝑡 𝑒𝑥𝑖𝑠𝑡
𝑦𝐴 = ቊ
1 𝑖𝑓𝑒𝑞𝑢𝑖𝑝𝑚𝑒𝑛𝑡 𝐴 𝑒𝑥𝑖𝑠𝑡𝑠
𝑦𝐴 + 𝑦𝐵 = 1
A
0 𝑖𝑓 𝑒𝑞𝑢𝑖𝑝𝑚𝑒𝑛𝑡 𝐴 𝑑𝑜𝑒𝑠𝑛𝑡 𝑒𝑥𝑖𝑠𝑡
𝑦𝐴 = ቊ
1 𝑖𝑓𝑒𝑞𝑢𝑖𝑝𝑚𝑒𝑛𝑡 𝐴 𝑒𝑥𝑖𝑠𝑡𝑠
A
C
B
??????????
??????????
𝑦𝐵 − 𝑦𝐶 ≤ 0
FD
0 𝑖𝑓 𝑒𝑞𝑢𝑖𝑝𝑚𝑒𝑛𝑡 𝐴 𝑑𝑜𝑒𝑠𝑛𝑡 𝑒𝑥𝑖𝑠𝑡
𝑦𝐴 = ቊ
1 𝑖𝑓𝑒𝑞𝑢𝑖𝑝𝑚𝑒𝑛𝑡 𝐴 𝑒𝑥𝑖𝑠𝑡𝑠
???????
F
0 𝑖𝑓 𝑒𝑞𝑢𝑖𝑝𝑚𝑒𝑛𝑡 𝐴 𝑑𝑜𝑒𝑠𝑛𝑡 𝑒𝑥𝑖𝑠𝑡
𝑦𝐴 = ቊ
1 𝑖𝑓𝑒𝑞𝑢𝑖𝑝𝑚𝑒𝑛𝑡 𝐴 𝑒𝑥𝑖𝑠𝑡𝑠
F
0 𝑖𝑓 𝑒𝑞𝑢𝑖𝑝𝑚𝑒𝑛𝑡 𝐴 𝑑𝑜𝑒𝑠𝑛𝑡 𝑒𝑥𝑖𝑠𝑡
𝑦𝐴 = ቊ
1 𝑖𝑓𝑒𝑞𝑢𝑖𝑝𝑚𝑒𝑛𝑡 𝐴 𝑒𝑥𝑖𝑠𝑡𝑠
𝐹 ≤ 𝑈𝑦𝐶
o Pre-optimization
Problem statement
Modeling
Optimization formulation
Optimization algorithm
o Optimization
Initialization
Solution
o Post-optimization
Feasibility
Optimality
Sensitivity
Uncertainty
….
Process optimization
Saeed Eini
Dep. of Chem. and Petrol. Eng.
Sharif Uni. of Technology
o Feasible initialization
o Variables
o Scaling
o Solver
Process optimization
Saeed Eini
Dep. of Chem. and Petrol. Eng.
Sharif Uni. of Technology
Saeed Eini
Dep. of Chem. and Petrol. Eng.
Sharif Uni. of Technology
Process Optimization
Workshop: GAMS
Saeed Eini
Dep. of Chem. and Petrol. Eng.
Sharif Uni. of Technology
saeed.eini@sharif.edu
http://che.sharif.edu/~ProSET