Sei sulla pagina 1di 64

Optimization module

Process Engineering Course


Juan Carlos Serrato B
jcserratob@unal.edu.co
Office 320 Building 453
Optimization module

1. Optimization problem formulation (2,5 weeks)


2. Solution methods (2,5 weeks)
– Metaheuristic methods (1 week)
– Deterministic methods (1 week)
– Applications (Aspen, other apps 0,5 week)
3. Evaluation (Saturday, June 22th)
OPTIMIZATION OF CHEMICAL PROCESSES
T.F. Edgar, D.M. Himmelblau, and L.S. Lasdon
University of Texas
McGraw Hill – 2004 (2nd ed.)

PART I – PROBLEM FORMULATION


II – OPTIMIZATION THEORY AND METHODS
III – APPLICATIONS OF OPTIMIZATION
APPENDICES (MATRIX OPERATIONS)

• Optimización. Algoritmos programados en Matlab Cuevas E,


et al
• Técnicas meta heurísticas de optimización Gallego R. et al
• Optimization of unit operations, Liptak, B.
• 519.3 CyT Library
•Most undergraduates learn by seeing how a method is
applied

•Practicing professionals need to be able to recognize


when optimization should be applied (Problem
formulation)

•Optimization algorithms for reasonably sized problems


are now fairly mature

•Focus on a few good techniques rather than


encyclopedic coverage of algorithms
Why Optimize?

1. Improved yields, reduced pollutants

2. Reduced energy consumption

3. Higher processing rates

4. Reduced maintenance, fewer shutdowns

5. Better understanding of process (simulation)

But there are always positive and negative factors to be


weighed (advantages and disadvantages).
Optimization software
• GAMS
• BARON
• SIMPLEX
• DUPLEX
• Davison
• Powell
• Lp_solve
• CPLEX
• ………………..
Optimization methods
Deterministic methods
• Branch and bound
• Bender´s decomposition
• Outer approximation
• Conjugate gradient (Fletcher Reeves)
• Interval analysis (Box)
• SLP
• SQP
• …………….
Optimization methods
Metaheuristic methods
• Genetic algorithms
• Neural networks
• Simulated annealing
• Ant colony
• Particle swarm
• Tabu search
• ……………….
The Nature and Organization of
Optimization Problems
Optimization

Interdisciplinary Field
Max Profit
Min Cost
Max Efficiency

Requires

1. Critical analysis of process


2. Definition of performance objective
3. Prior experience (engr. judgment)
Material Balance Reconciliation
Least squares solution:

P
min  (m A  mCi  mBi ) 2

i 1

opt. mA is the “average” value

any constraints on mA?


Optimization problem
formulation

Why is very important to formulate adequately an


optimization problem?
Optimization problem
formulation

• How to formulate an optimization problem


• How to define an objective function
• How to choose optimization variables
Three Ingredients In Optimization Problem
1. Objective function economic model
2. Equality Constraints 
 Process model
3. Inequality Constraints 

1. min f(x) xnx1


2. subject to h( x )  0 (m1)
3. g( x )  0 (m 2 )

2
(feasible region  :)
3

dependent variables 
 relate to m1 and perhaps m2
independent variables 
Ammonia Plant

1-compresor; 2-precalentador; 3- reactor hidrogenación; 4-adsorbedor; 5-horno; 6- convertidor; 7-caldera; 8-convertidores de CO; 9-absorbedor de CO2; 10-rehervidor; 11-regenerador de
monoetanolamina; 12-bomba; 13- hidrogenador de CO y CO2 residual; 14- intercambiadores de calor enfriados por aire; 15-columna de condensación; 16-evaporador of NH3 liquido; 17-
convertidor de amoniaco; 18-calentador de agua; 19- intercambiador de calor; 20-separador.
Objetive function characteristics

• No obvious answer
• Quantitative
• Smooth,
• Derivable,
• Continuous
• It must integrate all problem
The Six Steps Used To Solve
Optimization Problems

1.Analyze the process itself so that the process


variables and specific characteristics of interest are
defined, i.e., make a list of all of the variables.

2.Determine the criterion for optimization and specify


the objective function in terms of the above variables
together with coefficients. This step provides the
performance model (sometimes called the economic
model when appropriate).
The Six Steps Used To Solve
Optimization Problems

3. Develop via mathematical expressions a valid


process or equipment model that relates the input-
output variables of the process and associated
coefficients. Include both equality and inequality
constraints. Use well-known physical principles (mass
balances, energy balances), empirical relations,
implicit concepts, and external restrictions. Identify the
independent and dependent variables (number of
degrees of freedom).
The Six Steps Used To Solve
Optimization Problems
4. If the problem formulation is too large in scope:
(A)Break it up into manageable parts and/or
(B)Simplify the objective function

5. Apply a suitable optimization technique to the


mathematical statement of the problem.

6. Check the answers and examine the sensitivity of


the result to changes in the coefficients in the
problem and the assumptions.
Example 1.7 Six Steps Of Optimization

Specialty chemical
100,000 bbl/yr.
2 costs inventory (carrying) or storage, production cost >

How many bbl produced per run?


Step 1

define variables

Q = total # bbl produced/yr (100,000)


D = # bbl produced per run
n = # runs/yr
Step 2

develop objective function

inventory, storage cost = k1D

production cost = k2 + k3 D
per run (set up operating
cost) cost per unit
(could be nonlinear)

C  k1 D  n(k 2  k3 D )
Q
n
D
Q
C  k1 D  k 2  k3Q
D
Step 3

evaluate constraints
integer
n
continuous
D>0

Step 4

simplification – none necessary


Step 5
computation of the optimum

analytical vs. numerical solution


dC k 2Q
 k1  2  0
dD D
kQ
D opt  2
k1
k1  1.0 k 2  10,000 k3  4.0
Q  105
D opt  31,622 flat optimum
30,000  D  70,000
 good answer
check if minimum?
d 2 C 2k 2 Q
2
 3
0
dD D
suppose cost per run  k 2  k 4 D1/ 2
dC kQ kQ
  k1  2 2  4 3 / 2  0
dD D 2D
analytical solution?

Step 6
Sensitivity of the optimum
subst Dopt into C
C opt  2 k1k 2Q  k3Q
C opt k 2Q
 31,620
k1 k1
C opt kQ
 1 3.162
k 2 k2
C opt
Q 100,000
k3
C opt kk
 1 2  k3 4.316
Q Q
k 2Q
D opt

k1
D opt k 2Q  1
  15,810
k1 k1 2k1
D opt k 2Q 1
 1.581
k 2 k1 2k 2
D opt
0 0
k3
D opt k 2Q 1
 0.158
Q k1 2Q
k1  1.0 k 2  10,000 k 3  4 .0 Q  100,000
Relative Sensitivity (Percentage Change)
C opt
/ C opt
 ln C opt
S kC1  
k1 / k1  ln k1
C opt  463, 240 k1  1.0
C opt k 2Q
  31,620
k1 k1
S kC1  0.0683 S kD1  0.5
S kC2  0.0683 S kD2  0.5
S kC3  0.863 SQD  0.5
SQC  0.932 S kD3  0
C opt k1 31620(1.0)
S 
C
  0.0683
k1 C
k1 opt
463,240
abs. sens. on D k1  k 2  Q  k3
abs. sens. on C k3  k1  Q  k 2
Problem 4.10 Edgar
Reactor + tower distillation process

Feed A is pure
Reaction A → B, first order, isothermal
Tower operational conditions are constant: P, T, R,
Production rate is constant (Qb, mol/h)
Objetive function
Analyzing reactor

Isothermal, k = constant

Integrating

Defining conversion
Reactor cost
Analyzing tower
Other operational cost
Defining problem
Pipeline Problem
variables parameters

V 
p 
f L
Re 
m
D pipe cost
electricity cost
# open days/yr
pump efficiency
Equality Constraints

 D2
 v m
4
Re  Dv  / 
L
p  2 v 2
f
D
0.2
f  .046 Re
min (Coper + Cinv.)

subject to equality constraints


L 2
p  2 f v
D
need analytical formula for f
f  .046 Re0.2 smooth tubes
p
pump power cost  Co m

 D2
m  mass flow rate  v
4
substituting for ∆p,
 4.8 0.2  2.8 2.0
Coper  Co D  m 

Cinv  C1 D1.5 (annualized )



Total cost  TC  Co  0.2  2 m 2.8 D 4.8  C1 D1.5
(constraint eliminated by substitution)
d (TC )
0 necessary condition for a minimum
dD
solving,
Co 0.2 2 2.8
(D opt )6.3    m
C1

0.16
 C
(D opt )   o   .32m.45  .03
 C1 
 
m
opt velocity V opt 
 2
Dopt 
4
(sensitivity analysis)
optimum velocity

non-viscous liquids 3 to 6 ft/sec.


gases (effect of ρ) 30 to 60 ft/sec.

at higher pressure lower need to use different


constraint (isothermal)
   p1   
  fL ln p   
.323   2
2 p1   S1V12 
p 
p1  p2  D 24  
   
   
S1  gV1  upstream velocity
or Weymout h equation
for large L, ln ( ) can be neglected
exceptions: elevation changes, slurries (settling),
extremely viscous oils (laminar flow,
f different)
Heat Exchanger Variables

1. heat transfer area (given flow rate of one


2. heat duty fluid, inlet
3. flow rates (shell, tube) temperatures, one
4. no. passes (shell, tube) outlet temp., phys.
5. baffle spacing props.)
6. length
7. diam. of shell, tubes
8. approach temperature
9. fluid A (shell or tube, co-current or countercurrent)
10.tube pitch, no. tubes
11.velocity (shell, tube)
12.∆p (shell, tube)
13.heat transfer coeffs (shell, tube)
14.exchanger type (fins?)
15.material of construction
we have to supplement blast furnace gas with fuel oil,
but we want to minimize the purchase of fuel oil.
define: X1 = amount of fuel oil used in generator 1
X2 = amount of fuel oil used in generator 2
X3 = amount of BFG used in generator 1
X4 = amount of BFG used in generator 2
P1 = mw output of generator 1
P2 = mw output of generator 2

range of operation of generator 1 and generator 2


18 ≤ P1 ≤ 30
14 ≤ P2 ≤ 25

Fuel effects in the generators are additive (can operate


on either BFG or fuel oil)
10 units of BFG are available (on the average):

1 unit BFG = Btu equivalent of 1 ton/hr. fuel oil.

We need 50 mw power at all times.


P1  P2  50

Experimental data needed?


Mathematical Statement

Min C  x  x
1 2
fuel oil to gen 1 fuel oil to gen 2

a. operating ranges 18 ≤ P1 ≤ 30
& requirements 14 ≤ P2 ≤ 25
P1 + P2 = 50

b. availability of x3 + x4
blast furnace gas

c. operating P11 (x1) fuel oil


gen 1
characteristics P12 (x3) BFG

P21 (x2) fuel oil


gen 2
P22 (x4) BFG
P1  P11  P12 P2  P21  P22
P11  1.4609  .15186 X 1  .00145 X 12
this equation is not sufficient since we
may add BFG

P12  BFG ( X 3 ) reqt. in generator 1


P1  P11  P12
P21 ( X 2 ) fuel oil
P22 ( X 4 ) BFG
P2  P21  P22
fcn of burners, heat transfer characteristics (convex
functions) e.g.
P11  1.4609  .15186 X 1  .00145 X 12
Solution

NLP 4 ineq. const.


piece-wise LP 6 eq. const.

Copt  3.05 No fuel oil is used in generator 1.


P1  30 In generator 2, fuel oil provides 58%
of the power (rest is BFG).
P2  20

heat transfer characteristics may change, or BFG may


vary w.r.t. time (on-line solution)

Potrebbero piacerti anche