optimization of process flowsheets s,s&l chapter 24 t&s chapter 12 terry a. ring chen 5253

26
Optimization of Process Flowsheets S,S&L Chapter 24 T&S Chapter 12 Terry A. Ring CHEN 5253

Upload: anis-hill

Post on 12-Jan-2016

217 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Optimization of Process Flowsheets S,S&L Chapter 24 T&S Chapter 12 Terry A. Ring CHEN 5253

Optimization of Process Flowsheets

S,S&L Chapter 24

T&S Chapter 12

Terry A. Ring

CHEN 5253

Page 2: Optimization of Process Flowsheets S,S&L Chapter 24 T&S Chapter 12 Terry A. Ring CHEN 5253

OBJECTIVES

On completion of this course unit, you are expected to be able to:– Formulate and solve a linear program (LP) – Formulate a nonlinear program (NLP) to optimize a

process using equality and inequality constraints– Be able to optimize a process using Aspen/ProMax

beginning with the results of a steady-state simulation

• Data/ModelAnalysisTools/Optimization• Calculators/SimpleSolver or Advanced Solver/

Page 3: Optimization of Process Flowsheets S,S&L Chapter 24 T&S Chapter 12 Terry A. Ring CHEN 5253

Degrees of Freedom

• Over Specified Problem – Fitting Data– Nvariables>>Nequations

• Equally Specified Problem – Units in Flow sheet– Nvariables=Nequations

• Under Specified Problem– Optimization– Nvariables<<Nequations

Page 4: Optimization of Process Flowsheets S,S&L Chapter 24 T&S Chapter 12 Terry A. Ring CHEN 5253

Optimization

• Number of Decision Variables– ND=Nvariables-Nequations

• Objective Function is optimized with respect to ND

Variables– Minimize Cost– Maximize Investor Rate of Return

• Subject To Constraints– Equality Constraints

• Mole fractions add to 1

– Inequality Constraints• Reflux ratio is larger than Rmin

– Upper and Lower Bounds• Mole fraction is larger than zero and smaller than 1

Page 5: Optimization of Process Flowsheets S,S&L Chapter 24 T&S Chapter 12 Terry A. Ring CHEN 5253

PRACTICAL ASPECTS• Design variables, need to be identified and kept

free for manipulation by optimizer – e.g., in a distillation column, reflux ratio specification

and distillate flow specification are degrees of freedom, rather than their actual values themselves

• Design variables should be selected AFTER ensuring that the objective function is sensitive to their values– e.g., the capital cost of a given column may be

insensitive to the column feed temperature

• Do not use discrete-valued variables in gradient-based optimization as they lead to discontinuities in f(d)

Page 6: Optimization of Process Flowsheets S,S&L Chapter 24 T&S Chapter 12 Terry A. Ring CHEN 5253

Optimization

• Feasible Region– Unconstrained Optimization

• No constraints– Uni-modal– Multi-modal

– Constrained Optimization• Constraints

– Slack– Binding

Page 7: Optimization of Process Flowsheets S,S&L Chapter 24 T&S Chapter 12 Terry A. Ring CHEN 5253

Modality

• Multimodal

• Unimodal – (X1& X2<0)

Page 8: Optimization of Process Flowsheets S,S&L Chapter 24 T&S Chapter 12 Terry A. Ring CHEN 5253

Stationary Points

• Maximum number of solutions– Ns= πNDegree of partial differential Equation

• Local Extrema– Maxima– Minima

• Saddle points• Extrema at infinity

– Example• df/dx1= 3rd order polynomial• df/dx2= 2nd order polynomial• df/dx3= 4th order polynomial• Ns=24

Page 9: Optimization of Process Flowsheets S,S&L Chapter 24 T&S Chapter 12 Terry A. Ring CHEN 5253

v

v

v

N

i ii=1

i V

N

ij j i Ej=1

N

ij j i Ij=1

MinimizeJ x f xd

Subject to (s.t.) x 0,i 1, ,N

a x b,i 1, ,N

c x d,i 1, ,N

LINEAR PROGRAMING (LP)

equality constraints

inequality constraints

objective function

w.r.t. design variables

The ND design variables, d, are adjusted to minimize f{x} while satisfying the constraints

Page 10: Optimization of Process Flowsheets S,S&L Chapter 24 T&S Chapter 12 Terry A. Ring CHEN 5253

EXAMPLE LP – GRAPHICAL SOLUTION

A refinery uses two crude oils, with yields as below.

Volumetric Yields Max. Production

Crude #1 Crude #2 (bbl/day)

Gasoline 70 31 6,000

Kerosene 6 9 2,400

Fuel Oil 24 60 12,000The profit on processing each crude is:

$2/bbl for Crude #1 and $1.4/bbl for Crude #2.

a) What is the optimum daily processing rate for each grade?

b) What is the optimum if 6,000 bbl/day of gasoline is needed?

Page 11: Optimization of Process Flowsheets S,S&L Chapter 24 T&S Chapter 12 Terry A. Ring CHEN 5253

EXAMPLE LP –SOLUTION (Cont’d)Step 1. Identify the variables. Let x1 and x2 be the daily production rates of Crude #1 and Crude #2.

Step 2. Select objective function. We need to maximizemaximize profit: 1 2J x 2.00x 1.40x

Step 3. Develop models for process and constraints. Only constraints on the three products are given:

Step 4. Simplification of model and objective function. Equality constraints are used to reduce the number of independent variables (ND = NV – NE). Here NE = 0.

1 2

1 2

1 2

0.70x 0.31x 6,000

0.06x 0.09x 2,400

0.24x 0.60x 12,000

Page 12: Optimization of Process Flowsheets S,S&L Chapter 24 T&S Chapter 12 Terry A. Ring CHEN 5253

EXAMPLE LP –SOLUTION (Cont’d)

Step 5. Compute optimum. a) Inequality constraints define feasible space.

1 20.70x 0.31x 6,000

1 20.06x 0.09x 2,400

1 20.24x 0.60x 12,000Feasible

Space

Page 13: Optimization of Process Flowsheets S,S&L Chapter 24 T&S Chapter 12 Terry A. Ring CHEN 5253

EXAMPLE LP –SOLUTION (Cont’d)Step 5. Compute optimum. b) Constant J contours are positioned to find

optimum.

J = 10,000

J = 20,000

J = 27,097

x1 = 0, x2 = 19,355 bbl/day

1 20.70x 0.31x 6,000

Page 14: Optimization of Process Flowsheets S,S&L Chapter 24 T&S Chapter 12 Terry A. Ring CHEN 5253

EXAMPLE LP – GRAPHICAL SOLUTION

A refinery uses two crude oils, with yields as below.

Volumetric Yields Max. Production

Crude #1 Crude #2 (bbl/day)

Gasoline 70 31 6,000

Kerosene 6 9 2,400

Fuel Oil 24 60 12,000The profit on processing each crude is:

$2/bbl for Crude #1 and $1.4/bbl for Crude #2.

a) What is the optimum daily processing rate for each grade? 19,355 bbl/d

b) What is the optimum if 6,000 bbl/day of gasoline is needed?

0.7*x1+0.31*x2=6,000, equality constraint added 0.31*19,355=6,000

Page 15: Optimization of Process Flowsheets S,S&L Chapter 24 T&S Chapter 12 Terry A. Ring CHEN 5253

Solving for a Recycle Loop

• Newton-Raphson– Solving for a root

– F(xi)=0

• Optimization– Minimize/Maximize w.r.t. ND variables (d) s.t.

constraints

– F(xi) = 0, G(xi) < 0, H(xi) > 0

Page 16: Optimization of Process Flowsheets S,S&L Chapter 24 T&S Chapter 12 Terry A. Ring CHEN 5253

Minimize f{x} w.r.t d Subject to: c{x} = 0 g{x} 0 xL x xU

SUCCESSIVE QUADRATIC PROGRAMMING

The NLP to be solved is:

1. Definition of slack variables: mizxg ii ,,1,02

2. Formation of Lagrangian: 2,,, zxgxcxfzxL TT

Lagrange multipliers

Kuhn-Tucker multipliers

Page 17: Optimization of Process Flowsheets S,S&L Chapter 24 T&S Chapter 12 Terry A. Ring CHEN 5253

SUCCESSIVE QUADRATIC PROGRAMMING

2. Formation of Lagrangian: 2,,, zxgxcxfzxL TT

3. At the minimum: 0L

0

,,1,002

n)(definitio 0

0

0

2

migzL

zxgL

xcL

xgxcxfL

iiiiz

XT

XT

XX

i

Complementary slackness equations: either gi = 0 (constraint active) or i = 0 (gi < 0, constraint slack)

Jacobian matrices

department
Zi moves slack contraints to binding constrints
Page 18: Optimization of Process Flowsheets S,S&L Chapter 24 T&S Chapter 12 Terry A. Ring CHEN 5253

OPTIMIZATION ALGORITHM x* w{d, x*}

Tear equations: h{d , x*} = x* - w{d , x*} = 0, w(d,x*) is a Tear Stream

Page 19: Optimization of Process Flowsheets S,S&L Chapter 24 T&S Chapter 12 Terry A. Ring CHEN 5253

Minimize f{x, d} w.r.t d

Subject to: h{x*, d} = x* - w{x*, d} = 0

c{x, d} = 0

g{x} 0

xL x xU

OPTIMIZATION ALGORITHM

equality constraints

inequality constraints

objective function

design variables

tear equations

inequality constraints

Page 20: Optimization of Process Flowsheets S,S&L Chapter 24 T&S Chapter 12 Terry A. Ring CHEN 5253

REPEATED SIMULATION Minimize f{x, d} w.r.t d S.t. h{x*, d} = x* - w{x*, d} = 0 c{x, d} = 0 g{x} 0 xL x xU

Sequential iteration of w and d (tear equations are converged each master iteration).

Page 21: Optimization of Process Flowsheets S,S&L Chapter 24 T&S Chapter 12 Terry A. Ring CHEN 5253

INFEASIBLE PATH APPROACH (SQP)

Minimize f{x, d} w.r.t. d S.t. h{x*, d} = x* - w{x*, d} = 0 c{x, d} = 0 g{x} 0 xL x xU

Both w and d are adjusted simultaneously, with normally only one iteration of the tear equations.

Page 22: Optimization of Process Flowsheets S,S&L Chapter 24 T&S Chapter 12 Terry A. Ring CHEN 5253

COMPROMISE APPROACH (SQP)

Minimize f{x, d} w.r.t. d S.t. h{x*, d} = x* - w{x*, d} = 0 c{x, d} = 0 g{x} 0 xL x xU

Tear equations converged loosely for each master iteration

Wegstein’s method

Page 23: Optimization of Process Flowsheets S,S&L Chapter 24 T&S Chapter 12 Terry A. Ring CHEN 5253

Simple Methods of Flow Sheet Optimization

• Golden Section Method• τ=0.61803

Page 24: Optimization of Process Flowsheets S,S&L Chapter 24 T&S Chapter 12 Terry A. Ring CHEN 5253

Golden Section Problem

• Replace CW HX and Fired Heater

• 1 Heat Exchanger

• Optimize w.r.t TLGO,out

• PV=(S-C)+i*CTCI

• S=0, C=$3.00/MMBTU in Fired Heater

• CTCI= f(HX Area)

XCHG-101

XCHG-102

1 2-Light Gas Oil

3

4-CW

5-CW

DVDR-1

1-Light Gas Oil

Q-1

6-Crude Oil

7-Crude Oil

4-Light Gas Oil

Fired Heater2

Page 25: Optimization of Process Flowsheets S,S&L Chapter 24 T&S Chapter 12 Terry A. Ring CHEN 5253

Golden Section Result

• Min Annual Cost of HX– CA=Cs(Q)+imCTCI(A(ΔTapp))

Page 26: Optimization of Process Flowsheets S,S&L Chapter 24 T&S Chapter 12 Terry A. Ring CHEN 5253

Aspen Optimization

• Use Design I Aspen File

• MeOH Distillation-4.bkp

• Optimize DSTWU column

• V=D*(R+1)

• Minimize V

• w.r.t. R

• s.t. R≥Rmin