Computer Applications to Chemical Engineering. Process Design and Simulation 9780841205499, 9780841206915, 0-8412-0549-3

Content: Steady state chemical process simulation : a state-of-the-art review / E.M. Rosen -- A review of optimization m

1,256 114 6MB

English Pages 499 Year 1980

Report DMCA / Copyright

DOWNLOAD FILE

Polecaj historie

Computer Applications to Chemical Engineering. Process Design and Simulation
 9780841205499, 9780841206915, 0-8412-0549-3

Citation preview

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.fw001

Computer Applications to Chemical Engineering

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.fw001

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Computer Applications to Chemical Engineering Process Design and Simulation Robert G . Squires, EDITOR Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.fw001

Purdue University G. V . Reklaitis, EDITOR Purdue University Based on a symposium sponsored by the Division of Industrial and Engineering Chemistry at the 178th Meeting of the American Chemical Society, Washington, D. C., September 11-13, 1979.

ACS

SYMPOSIUM

AMERICAN

SERIES

CHEMICAL

SOCIETY

WASHINGTON, D. C. 1980

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

124

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.fw001

Library of Congress CIP Data Computer applications to chemical engineering process design and simulation. (ACS symposium series; 124 ISSN 0097-6156) Includes bibliographies and index. 1. Chemical process control—Congresses. I. Squires, Robert G . , 1935. II. Reklaitis, G . V . , 1942. III. American Chemical Society. Division of Industrial and Engineering Chemistry. IV. Series. American Chemical Society. ACS symposium series; 124. TP155.75.C65 ISBN 0-8412-0549-3

Copyright ©

660.2'81 ACSMC8

79-27719 124 1-511 1980

1980

American Chemical Society A l l Rights Reserved. The appearance of the code at the bottom of the first page of each article in this volume indicates the copyright owner's consent that reprographic copies of the article may be made for personal or internal use or for the personal or internal use of specific clients. This consent is given on the condition, however, that the copier pay the stated per copy fee through the Copyright Clearance Center, Inc. for copying beyond that permitted by Sections 107 or 108 of the U.S. Copyright Law. This consent does not extend to copying or transmission by any means—graphic or electronic—for any other purpose, such as for general distribution, for advertising or promotional purposes, for creating new collective works, for resale, or for information storage and retrieval systems. The citation of trade names and/or names of manufacturers i n this publication is not to be construed as an endorsement or as approval by ACS of the commercial products or services referenced herein; nor should the mere reference herein to any drawing, specification, chemical process, or other data be regarded as a license or as a conveyance of any right or permission, to the holder, reader, or any other person or corporation, to manufacture, reproduce, use, or sell any patented invention or copyrighted work that may i n any way be related thereto. PRINTED

IN

THE

UNITED

STATES

OF

AMERICA

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.fw001

ACS Symposium Series M . Joan Comstock, Series Editor

Advisory Board David L. Allara

W . Jeffrey Howe

Kenneth B. Bischoff

James D . Idol, Jr.

Donald G . Crosby

James P. Lodge

Donald D . Dollberg

Leon Petrakis

Robert E. Feeney

F. Sherwood Rowland

Jack Halpern

Alan C. Sartorelli

Brian M . Harney

Raymond B. Seymour

Robert A . Hofstader

Gunter Zweig

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.fw001

FOREWORD The ACS SYMPOSIUM SERIES was founded in 1974 to provide

a medium for publishing symposia quickly in book form. The format of the Series parallels that of the continuing ADVANCES IN CHEMISTRY SERIES except that in order to save time the papers are not typeset but are reproduced as they are submitted by the authors in camera-ready form. Papers are reviewed under the supervision of the Editors with the assistance of the Series Advisory Board and are selected to maintain the integrity of the symposia; however, verbatim reproductions of previously published papers are not accepted. Both reviews and reports of research are acceptable since symposia may embrace both types of presentation.

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

PREFACE his volume contains selected papers from a five-session symposium on "Computer Applications to Chemical Engineering Process Design and Simulation" sponsored by the I&EC Division of ACS held in Wash­ ington, D.C. in September of 1979. Although shorter symposia on special topics in chemical engineering computation have been held under the auspices of the AIChE, this was the first symposium devoted to the entire field to be held in the United States. The European Federation of Chemical Engineers has held regular symposia on Computer Applications in Chemical Engineering but the proceedings of these meetings have enjoyed only limited circulation in the United States. This volume thus represents the only collection of works on computer applications to appear in the United States since the C.E.P. Symposium Series volumes on computational topics which appeared in the middle sixties. The papers comprising this volume are subdivided into four cate­ gories: reviews of four major areas of computation research, reviews of several key computational topics within these areas, papers discussing specific new advances in methodology, and papers demonstrating the effective use of computation in modeling, design, and control covering a broad range of applications. The first of the broad computational area reviews discusses the general direction of research in steady-state process simulation and sum­ marizes the new ideas in computational architecture to have emerged since 1975. This is followed with a review of the main thrusts in control theory and on evaluation of the relevance to chemical engineering applications. Next the significant developments in numerical methods for minimizing nonlinear constrained and unconstrained functions are traced. The new developments in recursive quadratic programming methods for general nonlinear programs should be of particular interest to chemical engineers since they appear to offer a significant advance over the generalized reduced gradient techniques that have dominated the field for some ten years. Finally, research in computer-aided synthesis is appraised, and a summary is given of the significant results in six problem areas: heat exchanger networks, separation systems with and without heat integration, reaction paths, total flowsheets, and control systems.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.pr001

Α

xi

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.pr001

These wide-ranging reviews are followed by analyses of progress in several specialized problem categories: chemical and physical equilibrium computations; vapor-liquid equilibrium computations including single and multistage V L E separations, multiliquid phase systems, and V L E systems with reaction and electrolytes; treatment of measurement errors in process networks and computations of choking flows in gas pipe networks. Next follows a series of reports on important developments in computational methods or program packages incorporating novel computational features. Finally, the volume is capped with papers discussing computer applications involving modeling, design, and control spanning a wide range from microbial conversion to industrial reactor modeling to drug therapy control. The scope and quality of these contributions have made the symposium a milestone in chemical engineering computation and ensure that this volume will be of permanent significance to those involved or interested in this area. Both the papers and the symposium as a whole have benefitted substantially from the anonymous contributions of a large number of conscientious referees for whose efforts we are indebted. Finally, the organization and smooth functioning of the symposium as well as the successful assembly of this volume are in large part due to the commendable work of the following session chairmen: D . A. Mellichamp and R. G. Rinker of the University of California-Santa Barbara, G. Blau of Dow Chemical USA, and J. Zemaitis of OLI Systems, Inc. School of Chemical Engineering Purdue University West Lafayette, IN 47907 October, 1979

G. V. REKLAITIS R . G. SQUIRES

xii

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

1 Steady State Chemical Process Simulation: A State-of-the-Art Review Ε. M . R O S E N

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch001

Monsanto Company, 800 North Lindbergh, St. Louis, M O 63166

Perspective. The use of a mathematical model on a computer to simulate a chemical process is now approx­ imately two decades old. The field, which has been referred to as steady state chemical process simulation, flowsheeting or computer aided chemical process design to emphasize various shadings and meanings has had a major impact on moving chemical process design from essentially an art form of the 1950's to an accepted engineering science today. The field, which of necessity has always attempted to merge the areas of chemical engineering, physical chemistry, thermodynamics and the various disciplines of computer science, has been especially dynamic the last several years. This is no doubt due in part to the increasing pressure to make better use of energy, minimize operating costs and increase the productivity of the chemical processes studied as well as the chem­ ical engineer himself. A determination of the state-of-the-art in a par­ ticular field can probably best be viewed by understand­ ing the motivation of the contributors. Academic work is motivated by a desire to explain nature, a desire to solve unsolved problems and, for pragmatic reasons, a desire to attract funding. Academic work is usually found in the literature. Industrial work is motivated by profit, which in turn leads to a desire to increase productivity and a desire to increase robustness of solutions. Industrial organizations judiciously choose among competing ideas and programs. The implementations carried out to solve their problems are not generally found in the literature.

0-8412-0549-3/80/47-124-003$08.50/0 © 1980 American Chemical Society In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

4

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch001

Reviews, Books and P r o j e c t s . The g e n e r a l f i e l d was r e v i e w e d m 1975 by Motard, Shacham, and Rosen (1) and i n a comprehensive f a s h i o n i n 1977 by Hlavacek (2^) . A f i r s t book on the s u b j e c t i s scheduled t o be r e l e a s e d i n t h e l a t t e r h a l f o f 1979 ( 3 ) . An i n d e p t h e v a l u a t i o n of t h e field was a f f o r d e d by t h e ASPEN p r o j e c t a t MIT sponsored by t h e U. S. Department o f Energy. The p r o j e c t was s t a r t e d June 1, 1976 and i s e n t i t l e d , "Computer-Aided I n d u s t r i a l Process Modeling". I t s q u a r t e r l y and a n n u a l r e p o r t s are a v a i l a b l e from t h e N a t i o n a l T e c h n i c a l Information Service (£). The User I n t e r f a c e . A wide v a r i e t y o f stand a l o n e steady s t a t e s i m u l a t i o n programs and f l o w s h e e t systems are a v a i l a b l e t o t h e p r o c e s s e n g i n e e r . These have been r e p o r t e d i n a s e r i e s o f a r t i c l e s by P e t e r s o n , Chen and Evans i n 1978 (5) and by Chen and Evans i n 1979 (6) . Some p r a c t i c a l a d v i c e on the use o f the computer Tn d e s i g n i s r e p o r t e d by Weismantel (])· A c o u r s e i n the use o f s e v e r a l c o m m e r c i a l l y a v a i l a b l e systems i s g i v e n i n t h e AIChE Today S e r i e s (8). A r e p o r t on t h e use o f networks t o share c h e m i c a l e n g i n e e r i n g programs among e d u c a t o r s was r e c e n t l y i s s u e d (9). The use o f o n - l i n e systems t o e d i t the i n p u t data f o r s i m u l a t i o n systems i s w i d e l y used. However, i n t e r a c t i n g w i t h t h e program d u r i n g i t s e x e c u t i o n i s now b e i n g c a r r i e d o u t i n d u s t r i a l l y . I t s advantages (or d i s a d v a n t a g e s ) have n o t y e t been d i s cussed i n the l i t e r a t u r e . The c o n t i n u i n g d e c l i n e i n c o s t s o f g r a p h i c a l d e v i c e s and t h e broadening a v a i l a b i l i t y o f e a s y - t o - u s e g r a p h i c a l s o f t w a r e has made computer g r a p h i c s a f e a s i b l e t o o l i n f l o w s h e e t i n g p r e s e n t a t i o n s and a n a l y s i s (10). G e n e r a l D i r e c t i o n o f the F i e l d . The c h a r a c t e r i s t i c s o f e a r l y f l o w s h e e t i n g systems and t h e i r l i m i t a t i o n s were d e f i n e d by Evans and S e i d e r i n 1976 ( 1 1 ) . They a l s o attempted t o d e f i n e t h e c r i t e r i a f o r an a d vanced computing system. S e v e r a l t r e n d s have been noted, however, i n t h i s f i e l d over t h e l a s t few y e a r s : 1.

Use o f f l o w s h e e t i n g systems has become w i d e s p r e a d . Many have been d e v e l o p e d t o meet the p a r t i c u l a r needs o f t h e i r environments (12, 13, 14) and o f t e n serve as a r e p o s i t o r y o f t h e company's or d e v e l o p er's expertise.

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch001

1.

ROSEN

5

Steady State Simulation

2.

There has been a t r e n d toward i n t e g r a t i n g f l o w ­ s h e e t i n g systems i n t o much l a r g e r systems f o r p r o j e c t e n g i n e e r i n g (15, 16_, 17_, 18_) . The same p h y s i c a l p r o p e r t y d a t a used i n f l o w s h e e t s i m u l a ­ t i o n s i s being i n c r e a s i n g l y a p p l i e d to other pro­ j e c t e n g i n e e r i n g programs.

3.

There has been a broadening acceptance o f the UNIFAC program f o r the d e t e r m i n a t i o n o f a c t i v i t y c o e f f i c i e n t s from m o l e c u l a r s t r u c t u r e when no d a t a i s a v a i l a b l e (19, 2 0 ) . Systems i n c r e a s ­ i n g l y a r e s t o r i n g both pure component and mixture data.

4.

The c a p a b i l i t y t o handle d i f f e r e n t p h y s i c a l p r o p ­ e r t y c o r r e l a t i o n s f o r d i f f e r e n t pieces of equip­ ment a r e b e i n g added (4_) .

5.

An e f f o r t t o develop new a l g o r i t h m s f o r d i f f i c u l t o r complex c a l c u l a t i o n s , o f t e n n o t attempted be­ f o r e , were undertaken.

6.

A major academic e f f o r t has been mounted t o r e e v a l u a t e system a r c h i t e c t u r e s . T h i s has been m o t i v a t e d by t h e l i m i t a t i o n s o f t h e s e q u e n t i a l modular method f o r d e s i g n and o p t i m i z a t i o n {21) · T h i s i n t u r n has l e d t o a s t r o n g r e s e a r c h e f f o r t i n e q u a t i o n s o l v i n g methods t a i l o r e d t o meet t h e needs o f p r o c e s s s i m u l a t i o n .

Trends 5 and 6 w i l l be e x p l o r e d f u r t h e r a f t e r n o t i n g p r o g r e s s i n some o f the s c i e n t i f i c and t e c h n o l o g i c a l foundations of t h i s subject. Scientific

and T e c h n o l o g i c a l

Foundations

Sparse M a t r i x Methods. I n o r d e r t o g e t around the l i m i t a t i o n s o f the s e q u e n t i a l modular a r c h i t e c ­ t u r e f o r use i n d e s i g n and o p t i m i z a t i o n , a l t e r n a t e approaches t o s o l v i n g f l o w s h e e t i n g problems have been investigated. Attempts t o s o l v e a l l o r many of the n o n l i n e a r e q u a t i o n s s i m u l t a n e o u s l y has l e d t o c o n s i d e r ­ a b l e i n t e r e s t i n sparse m a t r i x methods g e n e r a l l y as a r e s u l t o f u s i n g the Newton-Raphson method o r Broyden's method (Z2, 23, 2Λ) . The f i e l d was c o m p r e h e n s i v e l y reviewed by Duff (25) i n 1977. The d e s i g n f e a t u r e s o f sparse m a t r i x codes a r e d i s c u s s e d by Duff and R e i d (21. r*2. 3. 1—4. 5. 6.

Estimate Τ i n u n i t 2 E s t i m a t e S4 C a l c u l a t e u n i t s 1, 2, and 3 t o get new e s t i m a t e o f S4 Compare c a l c u l a t e d S4 w i t h e s t i m a t e d S4 E v a l u a t e component f l o w i n S5 Compare d e s i g n s p e c i f i c a t i o n w i t h observed value

Other l o o p w i t h i n loop o r d e r i n g s a r e p o s s i b l e . M e t c a l f e and P e r k i n s (74) and P e r k i n s (75) com­ b i n e d the r e c y c l e c a l c u l a t i o n s w i t h the d e s i g n s p e c i ­ f i c a t i o n s t o s o l v e s i m u l t a n e o u s l y e q u a t i o n s of the form F(X,P) = Φ(Χ,Ρ) - X (3) G(X,P) = H(X,P) - D where Ρ are the system parameters, D are d e s i g n s p e c i ­ f i c a t i o n s and X are the r e c y c l e loop v a r i a b l e s . Broy­ den's method was used on the e q u a t i o n s w i t h the modi­ f i c a t i o n t h a t i f a newly p r e d i c t e d p o i n t l e d to a much worse (order of magnitude) f u n c t i o n a l e v a l u a t i o n (sum o f squares r e s i d u a l s ) then a s t e p l e n g t h f a c t o r would be reduced by 10 u n t i l a s t e p l e n g t h would be found

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch001

ROSEN

Steady State Simulation

S4

SI

S5

S2

s 3

—> 1

>

2

*

1 1

U -

3

t 1 1 1

-A CONTROL

Figure 8. Control with recycle loop

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch001

20

t h a t l e d to a l e s s than o r d e r of magnitude f u n c t i o n a l increase. T h i s new p o i n t o n l y then would be used to update the J a c o b i a n i n v e r s e . M e t c a l f e and P e r k i n s showed i f a ( g r e a t e r than o r d e r of magnitude) poor p o i n t i s used to update the m a t r i x , then i t would l e a d to a nearly s i n g u l a r matrix. In a d d i t i o n , a near s i n g u l a r m a t r i x , the a u t h o r s i n d i c a t e , i s an i n d i c a t i o n o f a b a d l y posed problem. I t may be commented t h a t the loop i d e n t i f i c a t i o n methodology and t e a r i n g c r i t e r i o n does not i n c l u d e c o n t r o l loops. With c o n t r o l l o o p s p r e s e n t , one o r d e r ­ i n g deduced from a minimum loop t e a r may be v a s t l y more e f f i c i e n t than an e q u i v a l e n t s o l u t i o n o r d e r i n g . Just how t o i n c o r p o r a t e c o n t r o l loops i n the t e a r i n g c r i t e r i o n s does not appear to be a d d r e s s e d i n the l i t ­ erature. Linear. S i n c e mass and energy are l i n e a r l y r e ­ l a t e d between modules, p u r e l y l i n e a r f l o w s h e e t c a l c u l a ­ t i o n s can be f o r m u l a t e d as a s o l u t i o n to a s e t of l i n e a r e q u a t i o n s once l i n e a r models f o r the modules can be constructed. L i n e a r systems, e s p e c i a l l y f o r m a t e r i a l b a l a n c e c a l c u l a t i o n s can be v e r y u s e f u l (16) . Two g e n e r a l systems, based on l i n e a r models, SYMBOL (77) and MPB I I (78_) are i n d i c a t e d i n T a b l e 1. MPB I I i s based on a t h e s i s by K n i e l e (79). I f Y i s the v e c t o r o f stream o u t p u t s and the module stream i n p u t s are X, then as d i s c u s s e d by Mahalec, K l u z i k and Evans (80) Y = A X + Β

(4)

can r e p r e s e n t a r e l a t i o n s h i p between a l l i n p u t and o u t ­ put streams i n a f l o w s h e e t . In a d d i t i o n , i f C i s a c o n n e c t i o n m a t r i x which i n d i c a t e s how output streams are c o n n e c t e d t o i n p u t streams then X = CY + F

(5)

where F i s a v e c t o r o f e x t e r n a l f e e d streams. Knowing the C m a t r i x from the f l o w s h e e t , the A m a t r i x , the Β and F v e c t o r s E q u a t i o n s (4) and (5) may be s o l v e d s i m u l t a n e o u s l y t o f i n d the X and Y v e c t o r s . A l t e r n n a t e l y , E q u a t i o n s (4) and (5) can be combined to g i v e either CA]

-1

X =

[I -

Y =

[I - AC]""

(CB +

F)

(6)

(AF +

B)

(7)

or 1

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

1.

Steady State Simuhtion

ROSEN

T a b l e 2 g i v e s a s i m p l e f l o w s h e e t and c a l c u l a t i o n s i n d i c a t i n g how these e q u a t i o n s a r e used. Generally, simple modules such as s p l i t modules, add modules and f i x e d e x t e n t o f r e a c t i o n modules may be u t i l i z e d w i t h ­ i n t h i s approach. Note t h a t f o r f i x e d e x t e n t o f r e a c t i o n modules Y = X + Β

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch001

where Β i s a v e c t o r o f component r e a c t i o n p r o d u c t i o n s . T h i s i s o f t h e form η Σ i=l

α.

j = 1,2...number o f r e a c t i o n s , m

and t h e a., i s t h e s t o i c h i o m e t r i c c o e f f i c i e n t f o r component -*\ i n r e a c t i o n j . The e x t e n t o f r e a c t i o n j i s e.. C e r t a i n types o f d e s i g n s p e c i f i c a t i o n s can o f t e n be i n c l u d e d d i r e c t l y i n t o l i n e a r systems. I f any i n p u t o r o u t p u t stream i s f i x e d then a system parameter would have t o be a d j u s t e d ( i . e . , become a variable). F o r example i n t h e T a b l e 2 example i f Y were f i x e d then t h e Β v e c t o r ( r e a c t o r p r o d u c t i o n ) c o u l d become t h e independent v a r i a b l e . H u t c h i s o n (81), Sood, R e k l a i t i s , and Woods (1B2) and Sood and R e k l a i t i s (83) d i s c u s s l i n e a r systems. Simultaneous. In order to circumvent the i n e f f i c i e n c i e s a s s o c i a t e d w i t h loop w i t h i n l o o p s t r u c t t u r e s f o r c e d by the module d e s i g n and s e q u e n t i a l mod­ u l a r approach, t h e r e has been c o n s i d e r a b l e academic e f f o r t t o i n v e s t i g a t e how t o p e r f o r m a l l computations simultaneously. The p o t e n t i a l advantages o f t h i s g l o b a l (or " e q u a t i o n o r i e n t e d " ) approach a r e g e n e r a l l y r e c o g n i z e d but acceptance o f the approach has been slow due t o a number o f r e a s o n s : 1.

The c o m p l e x i t y o f t h e e x e c u t i v e i n s e t t i n g up the e q u a t i o n s t o be s o l v e d .

2.

The p o t e n t i a l space r e q u i r e d f o r such a s o l u t i o n i s l a r g e , though t h i s problem i s d i s a p p e a r i n g .

3.

The n u m e r i c a l problems a s s o c i a t e d w i t h t h e methods.

4.

I f t h e s o l u t i o n f a i l s the u s e r may be l e f t l i t t l e useful information.

with

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

22

COMPUTER APPLICATIONS TO CHEMICAL

TABLE LINEAR

SYSTEM

WITH

ENGINEERING

II

FIXED

EXTENT

REACTOR

* * 3

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch001

Y

X

l

2

STOICHIOMETRIC COEFFICIENTS No. 1

COMPONENT CH

F

-1

15

-1

-1

CO

4

1

-1

4

H

4

3

1

5

co

1

2

SUM

13

3



-e

Ί

2

3

1

e

e

l

+

e

2

CO

UNIT 2 Y

4

+ H 0 + H 0

< c

2

—-

2

C0

+ H

2

e

2

e

2

2

1

= 1 = 2

Splitter 2

= 0.3 X

2

5

2

* — : CO + 3 H

2

-3

2

Reactor

CH

l

-1

31

UNIT 1

B

-1

3

2

α. . e. =

j=l

2

1

7

4

2

l

2 Σ

Y

3

= 0.5 X

2

Y

4

= 0.2

X

2

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

1.

ROSEN

Steady State Simulation

23

TABLE III SOLUTION TO LINEAR SYSTEM OF TABLE 2 VECTOR/MATRIX

x

i'

V

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch001

S x

F

i 1

B

SIZES

i

Β

A

20 χ 15

15 χ 20

15 χ 1

20 χ 1

SOLUTION

11 " 23 6 10 3

x

53

SUM =

2

= *20" 40 10 30 10 110

x

=

10 20 5 15 5

SUM =

55

3

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

24

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch001

D e s p i t e t h e s e p o t e n t i a l d i f f i c u l t i e s , e f f o r t s to a t t a c k t h i s problem have been u n d e r t a k e n and some p r o g r e s s has been made. The n o n l i n e a r e q u a t i o n s are g e n e r a l l y a t t a c k e d by methods (e.g. Newton-Raphson) which r e q u i r e p e r i o d i c s o l u t i o n of l i n e a r e q u a t i o n s . Equation Solvers. T h i s approach may be implemented i n a number o f ways. One approach i s t o pass the r e ­ s i d u a l s of the e q u a t i o n s and the independent v a r i a b l e s t o the e x e c u t i v e f o r s o l u t i o n . In t h i s way the n a t u r e o f the modules can be p r e s e r v e d . JUSE-L-GIFS (8£, 85) appears t o use t h i s type o f a r c h i t e c t u r e . Kubicek, Hlavacek and Prochaska (82) a p p l i e d the Newton-Raphson method to the e q u a t i o n s r e s u l t i n g from i n t e r c o n n e c t e d d i s t i l l a t i o n columns. The a u t h o r s r e p o r t e d nonconvergence when n o n i d e a l vapor l i q u i d e q u i l i b r i a was used, slow convergence a t o t h e r times and n o n - f e a s i b i l i t y f o r more than two "controlled simulation" loops. Berna and Westerberg (8^7) i n d i c a t e how some o f the m u l t i p l e r o o t problems encountered i n e q u a t i o n s o l v i n g approaches i n p r o c e s s s i m u l a t i o n s can be overcome.

put

Quasi L i n e a r i z a t i o n . T h i s approach attempts t o the n o n l i n e a r e q u a t i o n s i n the form A(X) X = B(X)

(8)

The A m a t r i x and Β v e c t o r i s g e n e r a l l y a f u n c t i o n o f X. Once X i s s o l v e d from E q u a t i o n (8) i t i s used t o r e g e n e r a t e a new v a l u e o f A. This i s repeated u n t i l convergence. E q u a t i o n (8) i s of the form of the Newton-Raphson method. The A(X) m a t r i x , however, i s not n e c e s s a r i l y the J a c o b i a n , J ( X ) . J u s t how the A(X) i s s e t up de­ pends on the a p p l i c a t i o n . Bending and H u t c h i s o n (88) d e v e l o p e d the method f o r p i p e f l o w networks. Hutchi­ son and Shewchuk (8_9) a p p l i e d the method t o m u l t i p l e d i s t i l l a t i o n towers. G o r c z y n s k i and H u t c h i s o n (90) d e t a i l the method f o r f l o w s h e e t i n g systems. Quasilin (91) i s a f l o w s h e e t i n g system based on t h i s approach. MULTICOL (92) appears t o s o l v e i n t e r c o n n e c t e d columns by means o f t h i s approach as w e l l .

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

1.

ROSEN

Steady State Simulation

25

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch001

Simultaneous Modular. There has been an almost continuum of a r c h i t e c t u r e s suggested to take advantage o f the b e t t e r f e a t u r e s of s e q u e n t i a l modular, l i n e a r and s i m u l t a n e o u s a r c h i t e c t u r e s . Most of these sugges­ t i o n s seek t o r e t a i n the c a l c u l a t i o n modules ( s i n c e m i l l i o n s o f d o l l a r s have been i n v e s t e d i n s e q u e n t i a l modular s o f t w a r e ) and thus the name s i m u l t a n e o u s modular has been a p p l i e d . FLOWPACK I I (93) apparently has some s i m u l t a n e o u s modular f e a t u r e s . Simultaneous modular a r c h i t e c t u r e can p r o b a b l y be f u r t h e r broken down i n t o two c a t e g o r i e s . 1.

Those a r c h i t e c t u r e s which attempt to s o l v e and c o n t r o l l o o p s simultaneously.

recycle

2.

Those a r c h i t e c t u r e s which use a "two t i e r e d " approach ( F i g u r e 9) u s i n g a f u l l y l i n e a r i z e d system a l t e r n a t e l y w i t h a r i g o r o u s modular c a l ­ culation.

Rosen (94) suggested t h i s l a t t e r approach a l t e r ­ n a t i n g between a s p l i t f r a c t i o n model o f the system and r i g o r o u s f l o w s h e e t modules t o r e g e n e r a t e new split fractions. The s p l i t f r a c t i o n s were i n i t i a l l y e s t i ­ mated t o b e g i n the i t e r a t i o n s and the system converged when the s p l i t f r a c t i o n s changed by a s m a l l amount. W e i s e n f e l d e r and O l s e n (95) r e p o r t e d s u c c e s s w i t h t h i s method f o r i n t e r l i n k e d d i s t i l l a t i o n columns but Mahal e c , K l u z i k and Evans (00) indicated s p l i t fraction models tend t o be u n s t a b l e . A number o f v a r i a t i o n s are p o s s i b l e w i t h such two t i e r e d sytems. T e a r i n g can take p l a c e i n the conven­ t i o n a l way and the t o r n streams can be e s t i m a t e d . Each module i n t u r n can be c a l c u l a t e d as i n the s e q u e n t i a l modular systems. A l i n e a r i z e d model of each module can then be g e n e r a t e d which i n t u r n can be used i n the l i n e a r i z e d f l o w s h e e t model. From E q u a t i o n (1) F(X) Residual

=

Φ(Χ) Calculated from linearized models

-

X Estimated

(9)

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch001

COMPUTER APPLICATIONS TO C H E M I C A L ENGINEERING

NEW VALUES FOR LINEAR MODELS OF THE MODULES

>

\

f LINEARIZED FLOWSHEET SYSTEM WITH LINEARIZED MODULES

RIGOROUS MODULES

II

< GENERATE INPUT FLOWS TO A L L UNITS

Figure 9.

Two-tier approach

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch001

1.

ROSEN

Steady State Simulation

27

Here X i s the i n i t i a l e s t i m a t e of the t e a r stream and Φ (X) i s c a l c u l a t e d from the l i n e a r i z e d model. A l ­ t e r n a t e l y a l l streams can be t o r n and then be r e e s t i mated from the l i n e a r i z e d model. Kehat and Shacham (96) used s p l i t f r a c t i o n models t o e s t i m a t e the J a c o b i a n when the Newton-Raphson method i s used t o s o l v e E q u a t i o n ( 1 ) . The a u t h o r s concluded t h a t t h e i r method i s v e r y e f f i c i e n t f o r systems w i t h more than one t e a r stream and when t h e r e i s o n l y a weak i n t e r a c t i o n between v a r i a b l e s i n the t e a r stream. Sood, Khanna and R e k a l i t i s (9T) and McLane, Sood and R e k l a i t i s (98) d i s c u s s m u l t i p l e t i e r systems and s t r a t e g i e s t o use f o r t h e i r s o l u t i o n . Umeda and N i s h i o (99) using f u l l y l i n e a r i z e d models compared the s e q u e n t i a l modular and simultaneous modular approaches and c o n c l u d e d each a r c h i t e c t u r e had i t s area of a p p l i c a b i l i t y . L i n (100) suggested b r e a k i n g the p r o c e s s f l o w s h e e t i n t o one o r more b l o c k s of modules. Each b l o c k of mod­ u l e s c o n t a i n s one or more modules and a l l of the mod­ u l e s i n the same b l o c k a r e s o l v e d s i m u l t a n e o u s l y . The whole p r o c e s s f l o w s h e e t i s then s o l v e d by c o n v e n t i o n a l s e q u e n t i a l modular approach by t r e a t i n g each b l o c k as a module. The

Future

F l o w s h e e t i n g systems have become and w i l l remain a r o u t i n e t o o l used i n the d e s i g n and a n a l y s i s o f chemi­ cal processes. The s p u r t i n new a l g o r i t h m s and a r c h i ­ t e c t u r e s over the l a s t t h r e e y e a r s w i l l p r o b a b l y r e s u l t i n a p e r i o d o f d i g e s t i o n and e v a l u a t i o n over the next several years. C u r r e n t systems w i l l p r o b a b l y remain i n p l a c e as l o n g as they a r e p r o v i d i n g u s e f u l r e s u l t s for t h e i r users. N e v e r t h e l e s s , there w i l l continue to be p r e s s u r e s t o generate more r o b u s t a l g o r i t h m s , im­ provements t o speed up the c a l c u l a t i o n and i n t e g r a t e f l o w s h e e t i n g systems i n more comprehensive systems f o r project engineering. Literature

Cited

1.

Motard, R. L.; Shacham, M.; Rosen, Ε. M., State Chemical Process Simulation", AIChE 21 No. 3; 417-436.

2.

Hlavacek, V., "Analysis of Complex Plant - Steady State and Transient Behavior", Comp. & Chem. Eng. (1977) 1, No. 1; 75-100.

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

"Steady J(1975)

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch001

28

COMPUTER APPLICATIONS T O CHEMICAL ENGINEERING

3.

Westerberg, A. W.; Hutchison, H. P.; Motard, R. L.; R. L.; Winter, P., "Process Flowsheeting", Cambbridge University Press, Cambridge, England (In Press).

4.

ASPEN Project - 1st Annual Report-MIT-2295T9-4 June 15, 1977; 2nd Annual Report-MIT-2295T9-9 June 15, 1978; Available from: Contract Ε(49-18)2295 Task No. 9, National Technical Information Service, U. S. Dept. of Commerce, 5225 Port Royal Road, Springfield, VA 22161.

5.

Peterson, J. N.; Chen, C. C.; Evans, L. Β., "Com­ puter Programs for Chemical Engineers: 1978 Part 1" Chem. Eng. June 5, 1978; Part 2 - July 3, 1978; Part 3 - July 31, 1978.

6.

Chen, C. C.; Evans, L. Β., "More Computer Programs for Chemical Engineers", Chem. Eng., May 21, 1979.

7.

Weismantel, G. E., "Smoothing Out Wrinkles in Computer-Aided Design", Chem. Eng., July 17, 1978.

8.

AIChE Today Series, "Computer Aided Process and Simulation", 345 E. 47th St., New York.

9.

EDUCOM/CACHE - "Utilization of Networks for the Sharing of Computer Based Resources Within Chemi­ cal Engineering", Report to National Science Foun­ dation Workshop, September 28-29, 1978, Washington, D.C., Grant No. MCS78-18288.

10.

Carnahan, B.; Mah, R. S. H.; Fogler, H. S., "Computer Graphics in Chemical Engineering Educa­ tion", CACHE Corporation Report, Cambridge, Mass. (1978).

11.

Evans, L. B.; Seider, W. D., "The Requirements of an Advanced Computing System", (1976) Chem. Eng. Prog. 72, No. 6; 80-83.

12.

de Leeuw den Bouter, J. Α.; Swenker, A. G., "TISFLO, a Flowsheet Simulation Program Based on New Prin­ ciples", Paper to EFCE Conference, "Computer Appli­ cation in Process Development", April 1974, Erlangen, Germany.

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Design

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch001

1.

ROSEN

Steady State Simulation

29

13.

Klemes, J.; Lutcha, J.; Vasek, V., "Recent Exten­ sion and Development of Design Integrated SystemDIS" CACE '79 EFCE Montreux, April 1979.

14.

Maejima, T.; Shindo, Α.; Umeda, Τ., "Computer Aided Process Engineering System - CAPES", Chem. Economy and Eng. Review (1973) 5, No. 2 (No. 58); 34-41.

15.

Niida, K.; Yagi, H.; Umeda, T., "An Application Data Base Management System (DBMS) to Process Design", Comp. & Chem. Eng. (1977) 1, No. 1; 33-40.

of

16.

Rodriguez-Miaja, F. E.; Leesley, M. E., "Computer Aided Project Evaluation for Chemical Process Plants", Computer Aided Design (1979) 11, No. 1; 5-11. 17.

Tsubaki, M.; Motard, R. L., "Data Based Process Simulation", CACE '79, EFCE Montreux, April 1979.

18.

Waligura, C. L.; Motard, R. L., "Requirements for Data Management in Engineering and Construction", Paper presented at AIChE Meeting, Houston, March 1977.

19.

Fredenslund, Α.; Gmehling, J.; Rasmussen, P., Vapor-Liquid Equilibria Using UNIFAC, Elsevier Scientific Publishing Co., New York (1977).

20.

Fredenslund, Α.; Gmehling, J.; Michelsen, M. L.; Rasmussen, P.; Prausnitz, J. M., "Computerized Design of Multicomponent Distillation Column Using the UNIFAC Group Contribution Method for Calculation of Activity Coefficients", I&EC Process Des. Dev. (1977) 16, No. 4; 450.

21.

Parker, A. L., "Chemical Process Optimization by Flowsheet Simulation and Quadratic Approximation Programming", Ph.D. Thesis in Chemical Engineer­ ing, U. of Wisconsin, 1979.

22.

Broyden, C. G., "A Class of Methods for Solving Nonlinear Simultaneous Equations", Math. Comp. (1965) 19, No. 92; 577-593.

23.

Broyden, C. G., "The Convergence of an Algorithm for Solving Sparse Nonlinear Systems", Math. Comp. (1971) 25, No. 114; 285-294.

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch001

30 24.

Schubert, L. K., "Modification Method for Nonlinear Equations Math. Comp. (1970) 24; 27-30.

of a Quasi-Newton with Sparse Jacobian",

25.

Duff, Proc.

26.

Duff, I. S.; Reid, J. Κ., "Some Design Features of a Sparse Matrix Code", ACM Trans. on Math Software (1979) 5, No. 1; 18-35.

27.

George, Α.; Lui, J. W. Η., "The Design of a User Interface for a Sparse Matrix Package", ACM Trans. on Math Software, (1979) 5, No. 2; 139-162.

28.

Stadherr, Μ. Α., "A New Sparse Matrix Method for Process Design", Paper presented at Miami AIChE Meeting, November 1978.

29.

Westerberg, A. W.; Berna, T. J., "Decomposition of Very Large Scale Newton-Raphson Based Flow­ sheeting Problems", Comp. & Chem. Eng., (1978) 2, No. 1; 61-63.

30.

Hildalgo, R. S.; Correa, Α. V.; Gomez, A. M.; Seader, J. D., "An Optimal Arrangement of Simul­ taneous, Linearized Equations for General Systems of Interlinked, Multistaged Separators", Paper presented at Houston AIChE Meeting, April 1979.

31.

Lin, T. D.; Mah, R. S. H., "A Sparse Computation System for Process Design and Simulation: Part I. Data Structures and Processing Techniques; Part II. A Performance Evaluation Based on the Simu­ lation of a Natural Gas Liquification Process", AIChE (1978) 24, No. 5; 830-848.

32.

Hernandez, R.; Sargent, R. W. Η., "A New Algorithm for Process Flowsheeting", CACE '79, EFCE, Montreux, April 1979.

33.

Storvick, T. S.; Sandler, S. I., Ed., "Phase Equilibria and Fluid Properties in the Chemical Industry", ACS Symposium Series (1977) 60, American Chemical Society, Wash. D. C.

34.

Motard, R. L.; Winter, P., "Physical Property Needs in Computer-Aided Process Design", Pro­ ceedings of the Fifth Biennial International CODATA Conference, (1977) Pergamon Press, Oxford.

I. S., "A Survey of Sparse Matrix Research", of the IEEE (1977) 65, No. 4; 500-535.

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch001

1.

ROSEN

31

Steady State Simulation

35.

Evans, L. B.; Joseph, B.; Seider, W. D., "System Structures for Process Simulation", AIChE J (1977) 23, No. 5; 658-666.

36.

Seider, W. D.; Evans, L. B.; Joseph, B.; Wong, E.; Jirapongphan, S., "Routing of Calculations in Process Simulation", Ind. Eng. Chem. Process Design Dev. (1979) 18, No. 2; 292-297.

37.

Kaijaluoto, S., "Experiences of the Use of Plex Data Structure in Flowsheeting Simulation", CACE '79, EFCE, Montreux, April 8-11, 1979.

38.

Leesley, M. E.; Heyen, G., "The Dynamic Approxima­ tion Method of Handling Vapor-Liquid Equilibrium Data in Computer Calculations for Chemical Processes", Comp. & Chem. Eng. (1977) 1, No. 2; 109-112.

39.

Barrett, Α.; Walsh, J. J., "Improved Chemical Process Simulation Using Local Thermodynamic Approximations", CACE '79, EFCE, Montreux, April 8-11, 1979.

40.

Mah, R. S. Η., "Effects of Thermophysical Property Estimation on Process Design", Comp. & Chem. Eng. (1977) 1, No. 3; 183-189.

41.

Cruz, J. L.; Renon, H., "A New Thermodynamic Representation of Binary Electrolyte Solutions Nonideality in the Whole Range of Concentrations", AIChE J (1978) 24, No. 5; 817-829.

42.

Gautam, R.; Seider, W. D., "Computation on Equil­ ibrium in Electrolyte Solutions" CACE '79 EFCE, Montreux, April 8-11, 1979.

43.

Ottmers, D. M. Jr., "A Description of the Radian Chemical Equilibrium Program", Technical Note 200-403-69, Radian Corporation.

44.

Zemaitis, J. F., Jr.; Rafal, Μ., "Automatic Program Generation Applied to Chemical Equilibria and Reactions in a Fractionation Tower Design FRACHEM", Paper presented to AIChE Meeting in Chicago, November 1976.

45.

Chem. & Eng. News, "AIChE Forms Group for Property Data", November 27, 1978; 23-24.

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Physical

COMPUTER APPLICATIONS T O C HE M IC AL ENGINEERING

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch001

32 46.

Boston, J. F.; Britt, Η. I., "A Radically Formulation and Solution of the Single-Stage Problem", Comp. & Chem. Eng. (1978) 2, No. 109-122.

Different Flash 2/3;

47.

Henley, Balance

48.

Tinoco-Garcia, L.; Cano-Dominquez, J. L., "A New Technique for Solving Multi-Phase Equilibria", Paper presented at Houston AIChE Meeting, April 1979.

49.

Gautam, R.; Seider, W. D., "Multiphase Equilibrium in Process Design", Paper at Houston AIChE Meeting, April 1979.

50.

Boston, J. F.; Fournier, R. L., "A Quasi-Newton Algorithm for Solving Multiphase Equilibrium Flash Problems", Paper presented at Miami AIChE Meeting, November 1978.

51.

Holland, C. D.; Gallun, S. E., "Modifications of Broyden's Method for the Solution of Distillation Problems Involving Highly Non-Ideal Solutions", Paper presented at Houston AIChE meeting, April 1979.

52.

Shah, V. B.; Boston, J. F., "An Algorithm for Rigorous Distillation Calculations with Two Liquid Phases", Paper presented at Houston AIChE meeting, April 1979.

53.

Ross, Β. Α.; Seider, W. D., "Simulation of Three Phase Distillation Towers", Paper presented at Houston AIChE Meeting, April 1979.

54.

Brannock, V. F.; Vernevil, V. S.; Wong, Y. L., "Rigorous Distillation Simulation with Equality and Inequality Process Specifications", Paper presented at AIChE Meeting in Chicago, November 1976.

55.

Boston, J. F., "Algorithms for Distillation Cal­ culations with Bounded-Variable Design Constraints and Equality-or Inequality-Constrained Optimiza­ tion", Paper presented at Houston AIChE Meeting, April 1979.

E. J.; Rosen, Ε. Μ., "Material and Energy Computations", John Wiley, New York, (1969).

Chemical presented

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch001

1.

ROSEN

Steady State Simulation

33

56.

Bentzen, G. W.; Izarraraz, A.; Anthony, R. G.; Holland, C. D., "Algorithm for Simultaneous Dis­ tillation and Reaction", paper presented at Houston AIChE Meeting, April 1979.

57.

Tierney, J. W., "Calculation tion Systems with Reaction", Houston AIChE Meeting, April

58.

Motard, Process letter,

59.

Rosen, Ε. M.; Pauls, A. C., "Computer Aided Chem­ ical Process Design: The FLOWTRAN System", Comp. & Chem. Eng. (1977) 1, No. 1; 11-21.

60.

ChemShare Corporation, "Distill, Design, Refine", 2500 Transco Tower, Houston, Texas 77027.

Method for Distilla­ Paper presented at 1979.

R. L., "Computational Architectures in Simulation", AIChE CAST Division News­ 1978.

61. Brannock, N. F.; Vernevil, V. S.; Wang, Y. L., "Process™ Simulation Program - An Advanced Flow­ sheeting Tool for Chemical Engineers", CACE '79, EFCE, Montreux, April 8-11, 1979. 62.

CONCEPT Mark III, Computer Madingley Road, Cambridge,

Aided Design Centre, CB10HB, England.

63.

McDonnell Simulation

64.

Kehat, E.; Shacham, M., "Chemical Progress Simula­ tion Programs 2", Process Technology International (1973) 18, No. 3; 115-118.

65.

Henley, E. J.; Williams, R. Α., "Graph Theory in Modern Engineering", Academic Press, New York (1973).

66.

Gros, H.; Kaijaluoto, S., Mattsson, I., "Some New Aspects on Partitioning and Tearing in SteadyState Process Simulation" in Computer Applications in the Analysis of Chemical Data and Plants, Science Press, Princeton (1977).

67.

Venkatesh, C. Κ., "Computational ing in Modular Cascade Systems", Chemical Engineering, University August 1978.

Douglas Automation Co., "General Process Program"; Box 516, St. Louis, MO 63166.

Precedence Order­ M. S. Thesis in of Houston,

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch001

34

COMPUTER

APPLICATIONS

TO CHEMICAL

ENGINEERING

68.

Pho, T. K.; Lapidus, L., "Topics in Computer Aided Design. Part I - An Optimum Tearing Algorithm for Recycle Streams", AIChE J(1973) 19, No. 6; 1170.

69.

Upadhye, R. S.; Grens, Α. Ε., II, "Solution of Decompositions for Chemical Process Simulation", AIChE J (1975) 21 No. 1; 136.

70.

Barchers, D., "Optimal Convergence of Complex Recycle Process Systems", Ph.D. Thesis in Chemical Engineering, Oregon State University, 1975.

71.

Orbach, O.; Crowe, C. Μ., "Convergence Promotion in the Simulation of Chemical Processes with Re­ cycle - The Dominant Eigenvalue Method", Can. J. of Chem. Eng. (1971) 49; 503-513.

72.

Kliesch, H. C., "An Analysis of Steady State Process Simulation: Formulation and Convergence", PhD Thesis in Chemical Engineering, Tulane Univer­ sity, 1967.

73.

Kluzik, Η. Α., "A Study of the Simultaneous Modu­ lar Convergence of Chemical Process Flowsheets", M. S. Thesis in Chemical Engineering, MIT, Cambridge (January 1979).

74.

Metcalfe, S. R.; Perkins, J. D., "Information Flow in Modular Flowsheeting Systems" Trans I. Chem. E. (1978) 56; 210-213.

75.

Perkins, J. D., "Efficient Solution of Design Prob­ lems Using a Sequential Modular Flowsheeting Programme", CACE '79, EFCE Montreux, April 1979.

76.

Agarwal, J. C.; Klumpar, I. V.; Zybert, F. D., "A Simple Material Balance Model", Chem. Eng. Prog. (1978) 74; 68.

77.

SYMBOL-Computer Aided Design Centre, Road, Cambridge CB10HB, England.

78.

Sood, M. K.; Reklaitis, G. V., "Material Balance Program - II", School of Chemical Eng., West Lafayette, Indiana (December 1977).

79.

Kneile, R. G., "Solution of Material Balance Prob­ lems for Process Design", Ph.D. Thesis in Chemical Engineering (December 1975).

Madingly

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch001

1.

ROSEN

Steady State Simulation 35

80.

Mahalec, V.; Kluzik, H.; Evans, L. B., "Simultan­ eous Modular Algorithm for Steady State Flowsheet Simulation and Design", CACE '79, EFCE Montreux, April 8-11, 1979.

81.

Hutchison, Methods", 287-290.

82.

Sood, M. K.; Reklaitis, G. V.; Woods, J. Μ., "Solution of Material Balances for Flowsheets Modelled With Elementary Modules: The Uncon­ strained Case" AIChE J (1979) 25, No. 2; 209.

83.

Sood, M. K.; Reklaitis, G. V., "Solution of Material Balances for Flowsheets Modelled with Elementary Modules: The Constrained Case" AIChE J (1979) 25, No. 2; 220.

84.

JUSE-L-GIFS - Generalized Interrelated Flow Simu­ lation Program. Technical Brief - Paper presented at JAPAN/U.S. Joint Seminar, June 23-27, 1975, Kyoto, Japan.

85.

IRI, M.; Tsunekawa, J.; Yajima, Κ., "The Graphical Techniques Used for A Chemical Process Simulator JUSE GIFS", Information Processing 71 - North Holland Publishing Company (1972).

86.

Kubicek, M.; Hlavacek, V.; Prochaska, F., "Global Modular Newton-Raphson Technique for Simulation of an Interconnected Plant Applied to Complex Rectification Columns" Chem. Eng. Science (1976) 31; 277-284.

87.

Berna, T. J.; Westerberg, A. W., "Polynomial, Chao-Seader and Newton Raphson - The Use of Partially Ordered Pivot Sequences" DEC-06-1-79 Dept. of Chem. Eng., Carnegie-Mellon University, Pittsburgh, Penn. 15213 (January 1979).

88.

Bending, M. J.; Hutchison, H. P., "The Calculation of Steady State Incompressible Flow in Large Net­ works of Pipes", Chem. Eng. Sci. (1973) 28; 1957.

89.

Hutchison, H. P.; Shewchuk, C. F., "A Computational Method for Multiple Distillation Towers", Trans. I Chem Ε (1974) 52; 325.

H. P., "Plant Simulation by Linear Trans. Instr. Chem. Engrs. (1974) 52;

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

COMPUTER APPLICATIONS

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch001

36

TO CHEMICAL

ENGINEERING

90.

Gorczynski, E. W.; Hutchison, H. P., "Towards a Quasi-Linear Process Simulator - I. Fundamental Ideas", Comp. & Chem. Eng. (1978) 2, No. 4; 189-196.

91.

Gorczynski, E. W.; Hutchison, H. P.; Wajih, A. R. M., "Development of a Modularly Organized Equation - Oriented Process Simulator". CACE '79, EFCE, Montreux, April 1979.

92.

MULTICØL, Computer Aided Design Centre, Road, Cambridge CB10HB, England.

93.

Bluck, D.; Hughes, P.; Mallin-Jones, A. K.; Perris, F. Α.; Sheppard, A. J., "FLOWPACK II - A Third Generation Flowsheeting System", Paper B-6 to EFCE Conference "Design Congress '76", Aston, England, September 1976.

94.

Rosen, Ε. Μ., "A Machine Computation Method for Performing Material Balances", Chem. Eng. Prog. (1962) 58, No. 10; 69-73.

95.

Weisenfelder, A. J.; Olson, R. E., "Solution of Recycle Streams in Multicolumn Distillation", Paper presented at AIChe Meeting-in Houston, April 1979.

96.

Shacham, M.; Kehat, E., "The Fraction Method I-For Calculation of Process Dept. of Chem. Eng., Technion, Haifa, Report CE-73/74.

97.

Sood, M.; Khanna, R.; Reklaitis, G. V., "A Two Level Approach Exploiting Sparsity in Flowsheeting Material Balancing", Paper presented at AIChE Meeting in Houston, April 1979.

98.

McLane, M.; Sood, M. K.; Reklaitis, G. V., "A Hierarchial Strategy for Large Scale Process Cal­ culations", CACE '79, EFCE, Montreux, April 1979.

99.

Umeda, T.; Nishio, Μ., "Comparison Between Sequen­ tial and Simultaneous Approaches in Process Simu­ lation", Ind. Eng. Chem. Proc. Design & Dev. (1972) 11; 153.

100.

Lin, T. D., "A Simultaneous Modular Simulator and A Sequential Block - Modular Simulator for Process Design or Simulations", Paper presented at AIChe Meeting, Houston, April 1979.

RECEIVED

Madingly

Separation Flowsheets", Israel,

November 5, 1979. In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

2 A Review of Optimization Methods for Nonlinear Problems R. W. H . SARGENT

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch002

Department of Chemical Engineering and Chemical Technology, Imperial College of Science and Technology, London SW7, England

The f i e l d of optimization is vast and all-embracing. Relevant papers are published at a rate of more than 200 per month, spread over more than 30 journals, without counting the numerous volumes of conference proceedings and special collections of papers. The Tenth International Symposium on Mathematical Programming held in August this year has alone added 450 papers to the list. Applications are equally varied and widespread. This review cannot therefore hope to be comprehensive and its scope is firmly restricted to general methods for dealing with nonlinear problems, both with and without constraints, since these are the most common i n chemical engineering applications. Integer programming methods are not reviewed, since most of the mathematical developments are concerned with mixed integer-linear problems which are of limited interest to chemi c a l engineers. Branch-and-bound techniques are still the basic tools for nonlinear integer problems, and since heuristics play such an important role the techniques can only be considered in relation to specific applications. Many specialized techniques exploiting particular problem structures are ignored, and fields which involve considerations outside the question of the optimization techniques themselves are also excluded. Thus for example the whole f i e l d of function approximation and model parameter f i t t i n g has been l e f t out. Although there have been significant theoretical advances in recent years, particularly in connection with s t a b i l i t y , sensitivity and convergence analysis, these also are largely ignored. The emphasis is on algorithmic developments because to the user the theoretical advances are of no account u n t i l they are embodied i n implementable algorithms.

0-8412-0549-3/80/47-124-037$05.00/0 © 1980 American Chemical Society In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

38

Unconstrained Minimization. The quasi-Newton or variable-metric methods introduced by Davidon {1} have now become the standard methods for finding an unconstrained minimum of a differentiable function f(x), and an excellent review of the basic theory has been given by Dennis and More {2}. These are iterative methods of the form V i

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch002

S

\ " \

=

k 1 " +

S ( S

\

g

k

k' k l' W p

+

'

)

'

)

where χ is an η - v e c t o r , i ^} k=0,l,2, . . . is a sequence of iterates with an arbitrary starting point χ , g^ is the gradient of the function f(x) at x ^ p = - xj, q = 3

f e + 1

fc+1

and is a local approximation to the inverse of the Hessian matrix of f(x). Classically, the scalar is chosen to minimize the function f(x^ " ~ ^ δ ^ with respect to a. The methods differ i n the formula used to generate the sequence S , k=0,l,2, and after Fletcher and Powell's {3} analysis o ï Davidon s method a whole spate of formulae were i n vented i n the sixties. Broyden {4} introduced some rationalization by identifying a one-parameter family, and recommended a particular member, now commonly referred to as the BFGS (BroydenFletcher-Goldfarb-Shanno) formula. Huang {5} widened the family, but by the end of the sixties numerical experience was producing a consensus that the BFGS formula was the most robust of the formulae available. The formula is α

1

s

k i +

=

\

{ p

k i "

kVi

s

+

)

p

k i +

+

Pk i Vi k rVW +

(

p

+

},

(2.2) where S^S^,

^

+

1

=Ρ*

+

Λ

+

1

,

^

= Pk iq +

k +

l k l k k l . / q

+

S

q

+

A turning point dame with a theorem of Dixon {6}, ed that a l l quasi-Newton formulae (those for which

who show­

p^ ^) i n Huang's family generate identical steps even for general functions, and this directed attention to a choice based on numerical s t a b i l i t y rather than on theoretical properties, such as maintenance of positive-definiteness of the S^ {7}. In fact Broyden {4}, Fletcher {8} and Shanno {9} a l l arrived at the choice of the BFGS formula from consideration of conditioning of the resulting matrices. Shanno and Kettler {10} specifically considered a quantitative criterion for optimal conditioning, while Fletcher {8} was the f i r s t to suggest varying the update formula from step to step in the light of such a c r i t e r i o n . The idea was further developed by Davidon {11} and by Oren and +

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

2. SARGENT

Optimization Methods

39

Spedicato {12}, but later Spedicato {13} noted that the c r i t e r i a used by these authors were identical. Clearly i s related to the function f ( x ) , and in partic­ ular i t must be scaled i n inverse proportion to any scaling of f ( x ) . This led Oren and Luenberger {14} to investigate the sym­ metric members of Huang s family for which ^^i^+^^^+lP^+l > with the scalar Ρ^..^ chosen to adjust the scaling ofS, ^. This "self-scaling idea was further developed by Spedicato {15} who considered formulae which were invariant to a scalar non­ linear transformation of f ( x ) , and this also generalizes other attempts to approximate f(x) using more general classes than quadratic functions {16,17,18,19}. Numerical comparisons of the optimal conditioning and selfscaling ideas with the classical formulae have been published by Spedicato {15,20}, Brodlie {21}, Shanno and Phua {22}, Zang {23} and Schnabel {24}. The evidence i s not conclusive, but i t seems that the classical BFGS formula i s hard to beat. Optimal con­ ditioning involves more arithmetic at each iteration, which pays off only on seriously ill-conditioned problems. There seem to be special types of functions for which self-scaling gives a marked improvement but i n general i t s performance i s inferior, and the same seems to be true of the methods based on nonlinear trans­ formations. The early analysis of Fletcher and Powell {3} interpreted Davidon's method as one which generates conjugate directions, which naturally gives rise to the idea of minimization along these directions. However i t was soon realized that minimiza­ tion to high precision is an unnecessary expense, and indeed i s not implied i f the formulae are interpreted as secant approxi­ mations to the inverse of the Hessian matrix. In fact true mini­ mization must be abandoned i n favour of a "descent test" to guarantee convergence i n a practical algorithm {25}, and various step-length rules are given by Sargent and Sebastian {7} who showed how algorithms can be designed to ensure global converg­ ence to a stationary point. Numerical experience also shows that the simple Armijo rule {26,25} coupled with a descent test i s more efficient than minimization, provided that step-length expansion i s also used i f the test i s satisfied immediately. For years everyone has been content with algorithms which produce a descent path to a stationary point, which can of course be a saddle-point rather than the desired local minimum. However McCormick {27} has put forward an idea, later developed by More and Sorensen {28}, for the use of directions of nega­ tive curvature coupled with descent directions to ensure con­ vergence to a local minimum. The goal of achieving the global minimum rather than just a local minimum s t i l l has i t s attractions. Various approaches are given i n the collections of papers edited by Dixon and S z ë g o { 2 9 } , 1

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch002

+

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

40

while the recent "tunnelling algorithm of Levy and Montalvo {30} seems to be an effective version of the function-modifica­ tion approach to the problem. An excellent discussion of the issues and the different approaches is given by Griewank {31}. As computers become more powerful the problems tackled be­ come ever larger, and inevitably storage problems arise. This has revived interest in the conjugate gradient methods, which require storage of only a few η - v e c t o r s rather than an nxn matrix, Powell {32} gives an interesting analysis yielding new insight into the working of these methods. He extends the work of Beale {33} and Calvert {34}, giving evidence for favouring a particular conjugate-gradient formula and providing an automatic test for restarting. Even so, conjugate-gradient methods remain less efficient and less robust than quasi-Newton methods, providing an incentive to apply sparse-matrix techniques to the l a t t e r . Now i f the Hessian matrix i s sparse i t s inverse is likely to be dense, so instead of (2.1), we use

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch002

11

V i

=

\ \ -

\*i "

\ ~W

,

)

-«k

,

)

.

)

H (

V*WW

(

2

'

3

)

where H^ is an approximation to the Hessian matrix i t s e l f , and in order to solve for s, we store and update the triangular factors of H^. The techniques for updating sparse triangular factors are given by Toint {35}. There has been l i t t l e recent work on methods for differentiable functions which avoid e x p l i c i t evaluation of derivatives. Powell's conjugate direction method {36} i s s t i l l used, but the generally accepted approach is now to use standard quasi-Newton methods with finite-difference approximations to the derivatives. On the other hand there has been considerable interest i n methods for nondifferentiable functions, as shown by the collection of papers edited by Balinski and Wolfe {37}, i n which the technique described by Lemarechal is of particular interest. Other con­ tributions i n this d i f f i c u l t f i e l d are due to Shor {38}, Goldstein {39}, Clarke {40}, Mifflin {41,42, Auslender"{43} and Watson{44}. In general these problems are much more d i f f i c u l t to solve than those involving differentiable functions, but they are becoming increasingly relevant to optimum design problems involving tolerances {45,46}. Nonlinear Programming. The general nonlinear programming problem i s Minimize subject to

f(x) φ(χ) > 0 ψ(χ) = 0 A

, , ,

) ) )

(3.1)

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch002

2. SARGENT

41

Optimization Methods

where f(x) is a scalar function of the η - v e c t o r χ , φ(χ) is an m-vector and ψ ( χ ) is a q-vector. The state of the art in 1974 in dealing with such problems is admirably summarized i n the collection of papers edited by G i l l and Murray {47}. At that time the middle ground was held by feasible-point projection or reduced-gradient methods, with a strong challenge from augmented Lagrangian methods. Fletcher himself was disenchanted with his "exact penalty-function" method and tended to favour the augmented Lagrangian approach, and there were s t i l l strong protagonists for the original penalty-function approach. The classical penalty-function methods have now finally be­ come part of history, the early promise of the augmented Lagrang­ ian approach has faded, and there has been a coalescence of the approach used in the projection methods with the exact penaltyfunction approach. The classical penalty-function idea was to convert the o r i g ­ inal constrained problem into an unconstrained one by increasing the objective function a r t i f i c i a l l y i f the constraints were violated, adding a penalty term reflecting the magnitude of the constraint violations. The method originated with Frisch {48} and Carroll {49} but was mainly developed by Fiacco and McCormick {50}. Good reviews are given by Lootsma {51} and Ryan {47,ppl75-190}. The difficulty with the approach is that i t is by definition approximate, and to obtain good approximations the constraint violations must be heavily weighted in relation to the objective function, yielding an ill-conditioned unconstrained problem. The practical solution was to solve a sequence of un­ constrained problems with steadily increasing weight of the con­ straint violations, and methods were devized for extrapolating the sequence to infinite weight. In 1968, Powell {52} likened the process to shooting at a target i n a strong wind and suggest­ ed i t was better to "aim off" rather than wheel up heavier and heavier guns; he therefore introduced a shifting parameter for each constraint, adjusted so that the minimum of the penalty function actually satisfied the constraint. A sequence of mini­ mizations is s t i l l necessary to adjust the shifting parameters, but these subproblems are much easier to solve. The exact penalty-function" idea was to devize a penalty function which has an unconstrained local minimum exactly coin­ ciding with the constrained minimum of the original problem (3.1). This goal seems to have been consciously sought independently by Fletcher {53} and Pietrzykowski {54}, but the idea was already implicit i n the work of Arrow and Solow {55} and Zangwill {56}. The Zangwill-Pietrzykowski penalty function for problem (3.1) is q . m P(c,x)=f(x)+c{ Σ I ψ ( χ ) I + Σ max (0, - φ ( χ ) ) }. (3.2) j-l 3-1 !

3

3

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch002

42

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

This function is indeed an exact penalty function for a l l values of the scalar c above a certain finite threshold value. However i t is nondifferentiable, and hence i t s minimization presents even more severe d i f f i c u l t i e s than that of the classical penalty func­ tions. The general methods for nondifferentiable functions ref­ erred to i n Section 2 could be used, but specific methods for (3.2) have been proposed by Conn and his coworkers {57,58,59}, Bertsekas {60} and Chung {61}. More recently Charambalous {62,63} has proposed the use of the more general 1 -norm for the penalty term instead of the 1^-norm used i n (3.2),^and points out some advantages for a choice l < p « » , but the penalty function is s t i l l nondifferentiable. It is well known that when (3.1) contains no inequality con­ straints the Lagrangian function

L(x,y) = f(x) - Σ yV(x)

(3.3)

j=l has an unconstrained stationary point with respect to χ and μ at the constrained minimum. Unfortunately however, i f the functions ψ"^ (x) are nonlinear there is no guarantee that this stationary point is a local minimum - i t could be a saddle-point or even a maximum. Hence Arrow and Solow {55} suggested "convexifying" L(x,y) i n the neighbourhood of the stationary point to make this a local minimum by adding a quadratic penalty term: L(c,x,y) = f(x) - μ ψ ( χ ) + |c φ ( χ ) .(}.ψ(χ) , (3.4) where c is a scalar and Q a positive definite matrix. For a given Q this function has a local minimum for a l l values of c above a certain threshold, and hence is a differentiable exact penalty function. Moreover since c is finite the unconstrained problem is not usually ill-conditioned. In fact Arrow and Solow considered only Q=I, and they proposed a continuous descent method for the minimization; they also showed that inequality constr­ aints could be dealt with by the use of slack variables. Independently of this work, Fletcher {53} started with (3.4) and sought to make μ and Q continuous functions of χ which would converge to the required values at the stationary point. Later {64}he generalized the approach to deal with inequality constr­ aints, and showed that the Lagrangian function for (3.1): Τ

Τ

L ( x , X , ) = f(x) - λ φ ( χ ) Τ

y

μ ψ(χ)

(3.5)

Τ

is i t s e l f an exact penalty function i f the multipliers λ , μ are obtained at each iteration by solving the quadratic programme: Τ

Minimize f (x).n+l, thus the total number of inputs and outputs are considerably larger than the minimum con­ dition rxm>n. Here the minimum condition means that when rxrn^ri, i t is l i k e l y that a solution exists for the resulting set of nonlinear equations. (4) Usually the algorithm returns a feedback matrix with very large components. This may be unacceptable for a control system with constrained inputs. Finding a feedback matrix with smaller entries by t r i a l and error can be very tedious. (5) The close loop response depends not only on the closed loop eigenvalues but also on eigenvectors. Intuitive specification of closed loop eigenvalues may be d i f f i ­ cult. (6) Time delays are not readily treated. It i s well known that there are closed loop locations which can not be reached by constant proportional control using less than f u l l state feedback. The common approach in the case where proportional output feedback cannot yield a satisfactory design is to add an observer to the system. A similar but somewhat different approach is to use a dynamic controller. As an example, consider the control of a second order SISO plant by an ideal PID controller cascaded with a f i r s t order f i l t e r , which is

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

98

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

basically ture.

a second order dynamic controller of restricted struc­

3

K(s)

+ β s + β s-

o 1 a^s + s

2

(6)

Let the second order plant be G(s) =

b,s + b 1 ο

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch004

s

(7)

+ a, s + a 1 ο

Then the closed loop transfer function becomes G(s) 1+K(s) G(s) 3 2 a b s + (a b + a . b ) s + 2 1 2 ο 11

L(s)

(8) OLb s

Ι ο

0

0

s +(a +a +b 3Js +(a a +a +b β,+b 3 )s +(a α +3 b +Rb )s+3 b 1 1 1 2 l l o l l o z ο 1 ο 1 1ο oo 4

1

3

1

1

1

1

2

0

Ί

The closed loop poles are specified to be p.. , p , p This implies 1 + K(s)G(s) = π (s-p.) i=l 4 2 2 = s +C s +C s +C s+C 3 2 1 ο

and p . . 4

1

0

0

(9)

1

Comparing equation (9) with the denominator of equation (8), the controller parameters 3 > 3^> ΐ ^ ^ ^ f solving the simultaneous equations: α

Q

b

ο l 0

b

0

0

0

0

b

0 a ο ο b i i ο 1 0 l

b

a

b

h h α

. ι

3

C ο i C -a

Γ

[c -a 3

\

e t e r m

n e c

r o m

(10)

c

2

Θ

o J

Note that a set of linear algebraic equations results. Moré details on pole placement with a dynamic controller have been reported by Brasch and Pearson (41). Pole and zero placement using a dynamic compensator for an SISO system can be accomplished by specifying analytically the closed loop servo response (e.g., f i r s t or second order with deadtime). Suppose that the specified response is defined by P(s); solving the closed loop equation (5) yields an analytical

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

4.

EDGAR

99

Advanced Control Strategies

form f o r the feedback c o n t r o l l e r :

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch004

K

(

S

)

=

G(S) !P(S)G(S) (

This design may y i e l d c o n t r o l l e r s which are q u i t e s e n s i t i v e to model e r r o r s and r e q u i r e high order d e r i v a t i v e a c t i o n . I f the dead time i n P(s) i s the same as the dead time i n G ( s ) , the con­ t r o l l e r contains dead time compensation, as i n the Smith p r e d i c ­ tor. B r i s t o l (42) has extended t h i s idea to apply to m u l t i v a r i a ­ ble systems, although he t r e a t s the c o n t r o l l e r i n a more general form, a l l o w i n g a pre-compensation b l o c k before Q(s) and a postcompensation b l o c k a f t e r G(s) i n the d i r e c t path between r ( s ) and y ( s ) . A r e l a t e d approach which has been used s u c c e s s f u l l y i n indus­ t r i a l a p p l i c a t i o n s occurs i n d i s c r e t e - t i m e c o n t r o l . Both D a h l i n (43) and Higham (44) have developed a d i g i t a l c o n t r o l algorithm which i n essence s p e c i f i e s the c l o s e d loop response to be f i r s t order plus dead time. The e f f e c t i v e time constant of the c l o s e d loop response i s a tuning parameter. I f z-transforms are used i n p l a c e of s-transforms i n equation (11), we a r r i v e a t a d i g i t a l feedback c o n t r o l l e r which i n c l u d e s dead time compensation. This dead time p r e d i c t o r , however, i s s e n s i t i v e to e r r o r s i n the assumed dead time. Note that i n the d i g i t a l approach the closed loop response i s e x p l i c i t l y s p e c i f i e d , which removes some of the u n c e r t a i n t i e s o c c u r r i n g i n the t r a d i t i o n a l root locus technique. Optimal C o n t r o l . Optimal c o n t r o l i s extension of the p r i n c i ­ p l e s of parameter o p t i m i z a t i o n to dynamic systems. In t h i s case one wishes to optimize a s c a l a r o b j e c t i v e f u n c t i o n , which may be a d e f i n i t e i n t e g r a l of some f u n c t i o n of the s t a t e and c o n t r o l v a r i a b l e s , subject to a c o n s t r a i n t , namely a dynamic equation, such as Equation (1). The s o l u t i o n to t h i s problem r e q u i r e s the use of time-varying Lagrange m u l t i p l i e r s ; f o r a general o b j e c t i v e f u n c t i o n and s t a t e equation, an a n a l y t i c a l s o l u t i o n i s r a r e l y forthcoming. However, a s p e c i f i c case of the o p t i m a l c o n t r o l problem does lend i t s e l f to a n a l y t i c a l s o l u t i o n , namely a s t a t e equation described by Equation (1) and a quadratic o b j e c t i v e f u n c t i o n given by J(u)

= / ο

T

T

(x Qx + u Ru)dt

(12)

where t ^ i s the f i n a l time. This problem i s known as the l i n e a r quadratic problem (LQP). J(u) i s to be minimized when (J. pos­ i t i v e s e m i - d e f i n i t e and R i s p o s i t i v e d e f i n i t e . As demonstrated i n standard t e x t s on optimal c o n t r o l , e.g., Athans and Falb (45) and Lapidus and Luus (46), the optimal c o n t r o l f o r the servo problem (d = o) i s u(t) = K ( t ) x ( t ) , or l i n e a r p r o p o r t i o n a l feed­ back. This m u l t i v a r i a b l e design method has been the subject of i n t e n s i v e research e f f o r t s over the l a s t f i f t e e n years. For a l l i

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

s

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch004

100

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

feedback matrices designed by the LQP, the c l o s e d loop system i s asymptotically stable. The LQP i s the only general optimal c o n t r o l problem f o r which there e x i s t s an a n a l y t i c a l r e p r e s e n t a t i o n f o r the optimal c o n t r o l i n closed-loop or feedback form. For the LQP, the optimal con­ t r o l l e r gain matrix Κ becomes a constant matrix f o r tf>°°. Κ i s independent of the i n i t i a l c o n d i t i o n s , so i t can be used f o r any i n i t i a l c o n d i t i o n displacement, except those which,- due to model n o n l i n e a r i t i e s , i n v a l i d a t e the computed s t a t e matrices. There i s a s u b s t a n t i a l amount of m a t e r i a l developed f o r the LQP and i t s extensions: the December, 1971, i s s u e of IEEE Trans­ a c t i o n s on Automatic C o n t r o l and a review a r t i c l e by Edgar et a l . (47) provide a f a i r l y complete e x p o s i t i o n on the e f f e c t s of n o n - l i n e a r i t i e s i n the s t a t e equations, parameter v a r i a t i o n s , c o n s t r a i n t s , disturbances, incomplete measurement, and system n o i s e . There are s e v e r a l general purpose computer programs f o r s o l v i n g the LQP, as d i s c u s s e d by Edgar et a l (47). Edgar (22) has a l s o d i s c u s s e d the q u a d r a t i c o b j e c t i v e func­ t i o n i s s u e , i . e . , whether i t i n c o r p o r a t e s economic r e a l i t i e s , and he concluded that i t i s not wholly s a t i s f a c t o r y i n t h i s r e ­ gard. At the present time the LQP appears to be a method which can u s u a l l y y i e l d r e s u l t s more or l e s s e q u i v a l e n t to other design techniques, although p o s s i b l y with l a r g e r e f f o r t . Other f e a t u r e s of the LQP c o n t r o l l e r s y n t h e s i s approach are as f o l l o w s : (1) P h y s i c a l s t a t e space models are more a t t r a c t i v e f o r use with the LQP ( e s p e c i a l l y when s t a t e v a r i a b l e s are d i r e c t l y measurable), w h i l e m u l t i v a r i a b l e b l a c k box models are probably b e t t e r t r e a t e d by frequency response methods (22) or minimum v a r i a n c e c o n t r o l (discussed l a t e r i n t h i s s e c t i o n ) . (2) The equivalence of tuned PID c o n t r o l l e r s and optimal c o n t r o l l e r s can be demonstrated by augmentation of the s t a t e v e c t o r and j u d i c i o u s s e l e c t i o n of the o b j e c t i v e f u n c t i o n (47), (48); o r d i n a r i l y an optimal feedback c o n t r o l l e r contains higher order d e r i v a t i v e terms, y i e l d i n g s i g n i f i c a n t phase advance (which can cause n o i s e a m p l i f i c a t i o n and c o n t r o l l e r s a t u r a t i o n ) . (3) Optimal feedforward c o n t r o l s t r a t e g i e s can be t r e a t e d w i t h i n the framework of the LQP (49). (4) Time delays can a l s o be handled with the LQP, although the d i s c r e t e - t i m e f o r m u l a t i o n (46) of the LQP i s b e t t e r s u i t e d to the time delay problem ( e s p e c i a l l y when there are only a few such elements i n the d i f f e r e n t i a l equa­ tions). (5) The optimal f i l t e r i n g problem (the Kalman-Bucy f i l t e r ) can be solved independent of the optimal c o n t r o l f o r the LQP and provides a means f o r e s t i m a t i n g unmeasured s t a t e v a r i a b l e s which may be corrupted by process and instrument n o i s e . (6) The major d e f i c i e n c i e s of the LQP feedback c o n t r o l

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch004

4. EDGAR

101

Advanced Control Strategies

technique l i e in on-line tuning (or de-tuning), sensi­ t i v i t y calculations, noise effects and interpreting the frequency response, although Safonov and Athans (50) have obtained some results on the gain and phase margin characteristics of the LQP. These authors claim that the optimal controller is surprisingly robust, and they have derived conditions for the effects of model errors and nonlinearities on asymptotic s t a b i l i t y . Recently there has been great interest in discrete-time optimal control based on a one-step ahead optimization criterion, also known as minimum variance control. A number of different approaches for minimum variance control has been developed in the last decade. MacGregor (51) and Palmor and Shinnar (52) have provided overviews of these minimum variance controller design techniques. A generalized linear discrete model (SISO) is

ζ

Σ

-i

i=o V

y 1 -

-d Σ θ . ζ

.

Σ δ.ζ 1=1

„ 1^=0^

.

+

1 - Σ Φ ζ 1=1

1

1

( 1 3 )

1

1

Another form used in the literature is y

t

- G (B) u

t

+ G (B) a n

(14)

t

In equation (13) b and d represent the time delays i n the system, (p, q) is the order of the noise model, (r, s) is the order of the deterministic model, and ζ and b are shift operators defined as z~iyt = Biyt = y t - i - The component et or a represents uncor­ r e c t e d white noise which is passed through a transfer function to describe the noise or disturbance model. u i s the input and y i s the output. Gp and Gn are discrete transfer functions. Both Astrom (53) and Box and Jenkins (54) have developed modeling approaches for equation (13), which involve obtaining maximum likelihood estimates of the parameters in the postulated model followed by diagnostic checking of the sum of the residuals. The Box and Jenkins method also develops a detailed model for the pro­ cess disturbance. Both of the above references include deriva­ tions of the minimum variance control. The minimum variance control for an SISO system finds the unrestricted minimum of the expected value of a quadratic objec­ tive function: t

t

t

m i

*

Ε [y + À ( V u ) ] 2

d

t

2

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

(15)

102

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

Note that λ is a tuning parameter which can be selected to mini­ mize controller saturation, represents a differencing oper­ ator (d can be zero). In some cases λ = 0 is allowable i f the sampling time is large enough (spreading out the control effort). As shown in the above works, an optimal feedback/feedforward controller can be derived as an analytical function of the numer­ ator and denominator polynomials of Gp(B) and G (B). No i t e r a ­ tion or integration is required to generate the feedback law, as a consequence of the one step ahead criterion. Shinnar and Palmor (52) have also clearly demonstrated how dead time com­ pensation (discrete time Smith predictor) arises naturally out of the minimum variance controller. These minimum variance techniques can also be extended to multi-variable systems, as shown by MacGregor (51). Finally, i t should be noted that many existing d i g i t a l con­ t r o l l e r design techniques (Kuo (55) ) yield an optimal or "perfect" control; in deadbeat or minimal prototype controller designs, the exact form of the response is pre-specified, rather than minimiz­ ing the integral of the squared error.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch004

n

On-Line Optimization and Control As discussed in previous sections, the design of optimization and control schemes for systems described by linear differential equations with constant coefficients has evolved to a satisfac­ tory level for reasonable size models. Many techniques are available, giving a control engineer much f l e x i b i l i t y in the choice of techniques. However, the chief f a i l i n g in this type of control/optimization structure is the assumption that the para­ meters of the process remain constant. In most actual processes, the parameters are either poorly known (usually due to measure­ ment and/or modeling deficiencies) or are time-varying in nature. One solution to this problem i s to design a worst case controller; however, this solution is definitely inferior to an adaptive controller, where on-line state and parameter identification of the process is incorporated into the controller action. A "gain-adaptive" controller is presently commercially available, but this is only a f i r s t step towards more powerful adaptive control methods which could be implemented in industry. An adaptive controller normally w i l l incorporate the highly successful feedback structure. In the f i e l d of adaptive control, three general approaches have been developed (56): (1) design an "insensitive" or robust controller (2) adjust the controller parameters in response to output performance characteristics (3) measure on-line the plant parameters and adjust the con­ t r o l law based on prior analysis The f i r s t two approaches appear to be the most suitable for chemical process applications; the robust controller is particu­ larly attractive for microprocessor-based control. The second

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch004

4.

EDGAR

Advanced Control Strategies

103

approach is usually superior to the third because parameter measurement delays can negate the adaptive control advantages. The development of an insensitive controller can of course be accomplished by repetitive simulations, but this by i t s e l f is an inefficient and usually impractical approach. The design of such a controller using standard linear optimal control methods has not proven to be f r u i t f u l as yet, since inclusion of sensitiv­ ity measures in the performance index does not yield to a closed form solution (57), (58). There i s a need for improved methods which can realize desired sensitivity characteristics as well as high performance without resorting to extensive interactive calculations; Davison (59) has recently suggested one such approach. Many of the successful adaptive control applications have been based on feedback control, e . g . , minimum variance control or the self-tuning regulator (60), (61), model reference adaptive control (57), and hyperstability methods (62). The minimum variance controller developed by Astrom has been extended for the purposes of adaptive control. This self-tuning regulator requires that the model parameters in equation (14) be estimated using a least squares method. These estimates are then used in the minimum variance control law. Astrom and Wittenmark (61) have shown that i f the parameter estimates converge, the regulator w i l l converge to the minimum variance regulator that could be obtained i f the order and the parameters of the system were known, although this proof is based on weak optimality conditions. Model reference adaptive control is based on a Lyapunov s t a b i l i t y approach, while the hyperstability method uses Popov s t a b i l i t y analysis. A l l of the above methods have been tested on experi­ mental systems, both SISO and ΜΙΜΟ (53), (54), (55). The selftuning regulator is now available as a commercial software pack­ age, although this method is not satisfactory for variable time delays, an important industrial problem. Other recent developments in the f i e l d of adaptive control of interest to the processing industries include the use of pat­ tern recognition in l i e u of explicit models (Bristol (66)), para­ meter estimation with closed-loop operating data (67), model algorithmic control (68), and dynamic matrix control (69). It is clear that discrete-time adaptive control (vs. continuous time systems) offers many exciting p o s s i b i l i t i e s for new theoretical and practical contributions to system identification and control. Control with Limited Measurements One of the major questions in control system design is the selection of process measurements. An important deficiency of state variable control is that measurements or estimates of a l l state variables are required. Usually only a few of the states can be monitored instantaneously, because of sensor cost or time delays caused by the need for chemical analysis. D i s t i l l a t i o n

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch004

104

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

columns with many components and large numbers of trays would create special d i f f i c u l t i e s . The multivariable frequency domain methods require output information only; linear optimal control, on the other hand, does require complete state measurement or state estimates. Observer theory or f i l t e r i n g theory can be used to provide estimates of the unmeasured state variables from input/output data. These estimates can then be used with the computed optimal control law; the combination of the Kalman-Bucy f i l t e r with the optimal feedback matric is optimal for the stochastic LQP. The f i l t e r approach reduces the phase advance and reduces the system sensitivity to high frequency noise, but at the expense of extra on-line computation and system performance. An observer has the opposite effect, increasing phase advance of the system even more. An approach called inferential control has been developed by Brosilow and coworkers (70), (71) to address the measurement limitation problem, especially when unmeasured disturbances are present. These disturbances, when persistent, are problematic for the Kalman f i l t e r approach. Weber and Brosilow (70), i n their research with d i s t i l l a t i o n columns, have developed a static estimator which predicts the product quality based on readily available measurements; measurements can be selected so that the estimator i s relatively insensitive to modeling errors and measurement noise. Their approach also avoids the need for observers or dynamic state estimators. This inferential control approach has an extra advantage in that composition measurement loop and sampling delays can be eliminated. The net result i s a tremendous reduction in number of state variables and measurements (although not necessarily yielding a single input-single output coupling). The number of measurements i s selected so the control system is insensitive to modeling errors. The control system uses the inferred measurements to adjust the control effort and counteract the unmeasurable disturbances. A dynamic compensation scheme for the static estimator/controller based on simple lead-lag elements has been developed by Brosilow and Tong (71). A related idea in process control which has received much interest recently i s the analysis of interactions among states, outputs, and controls. The analytical technique used i n many commercial applications is the relative gain array (Bristol, (72)). Rather than being e x p l i c i t l y based on system dynamics, i t yields a measure of the steady state gain between a given input/ output pairing. By using the most sensitive SISO connections, control magnitudes can be minimized. The relative gain array can be obtained analytically, computationally, or experimentally, and the basis for computing the relative gain matrix, of dimension mxm (m = number of outputs and the number of controls) is

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

4.

EDGAR

105

Advanced Control Strategies

(16)

is a measure of the sensitivity of output i to controller j ; i t is computed by varying the jth controller output while holding a l l other controller outputs constant. Interaction is quantitatively measured by

v Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch004

±i

=

£. (4V

1

1 7

As shown by B r i s t o l (72) for controllers with heavy reset action, this measure has very interesting properties. Input/output pairs are selected for those y^j approaching 1. A negative element in Pij indicates i n s t a b i l i t y or non-minimum phase behavior, so a glimpse of the dynamics can be obtained from B r i s t o l s method. McAvoy (73) has explored the use of this index and a dynamic version of the index to analyze two-point composition control in d i s t i l l a t i o n columns. Input-output pairing using equation (16) can often lead to poor control, while the opposite pairings can actually yield better results. This is especially true for time delay and non-minimum phase processes. Tung and Edgar (74) have developed a comprehensive theory of control-output dynamic interactions for linear systems which includes the steady state relative gain index as a special case. They have applied this dynamic interaction index to analysis of a d i s t i l l a t i o n column and a fluid catalytic cracker. Gagnepain and Seborg (75) have also proposed an interaction measure based on open loop step responses and have provided some interesting comparisons with McAvoy's results. The subject of the interaction index employed as a process design tool i s also addressed i n the following section. 1

Integration of System Design and Control Considerations In the practice of engineering the synthesis of control systems is normally performed after the system design, i . e . , after selection of steady state parameters i s completed. Thus a system which may appear attractive based on steady state analysis may have very undesirable dynamic properties, making successful control system design a d i f f i c u l t task. When energy costs were low, the decoupling of the design and control steps usually did not lead to uncontrollable systems; however, with increasing fuel prices energy integration has been introduced to greater degrees in order to reduce energy requirements, and the design and control steps have become more strongly related.

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch004

106

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

The problem of s a t i s f y i n g both steady s t a t e and dynamic obj e c t i v e s transcends the problem of c o n t r o l o f i n d i v i d u a l processes. Design procedures f o r s i n g l e pieces of equipment are w e l l e s t a b l i s h e d , although f o r reasonably complicated processes (such as r e a c t o r s and d i s t i l l a t i o n columns), there are s t i l l some quest i o n s to be r e s o l v e d . The more c h a l l e n g i n g research problems f a l l under the heading of p l a n t c o n t r o l , where s e v e r a l u n i t s are i n t e grated, f o r example, to conserve energy. Simple decomposition of the o v e r a l l process i n t o d i s c r e t e blocks i s u s u a l l y very difficult. In heat recovery a p p l i c a t i o n s there can be a l a r g e number of f e a s i b l e p l a n t c o n f i g u r a t i o n s . A f t e r the c o n f i g u r a t i o n i s optimized based on steady s t a t e c o n s i d e r a t i o n s (which may not be an easy problem) , the e v a l u a t i o n of the e f f e c t i v e n e s s of various c o n t r o l schemes can be performed. The dynamic p l a n t operation must be evaluated i n terms of economics, r e g u l a t i o n , r e l i a b i l i t y , and s a f e t y over a broad range of operating regimes. On the other hand, the c o n t r o l e v a l u a t i o n could be performed i n tandem with the design study, thus r u l i n g out candidate design c o n f i g u r a t i o n s r a t h e r e a r l y because of c o n t r o l d i f f i c u l t i e s . It would be advantageous to have quick and uncomplicated screening methods to evaluate p o t e n t i a l c o n t r o l s t r u c t u r e s i n the design phase; a l t e r n a t i v e l y , the c o n t r o l s t r u c t u r e o p t i m i z a t i o n could be incorporated as part of the steady s t a t e design o p t i m i z a t i o n . This would avoid the n e c e s s i t y of a c t u a l c o n t r o l l e r s y n t h e s i s , which i s obviously u n a t t r a c t i v e and could be q u i t e time-consuming. One approach f o r c o n t r o l e v a l u a t i o n discussed e a r l i e r i s the r e l a t i v e gain array (72), (74). No a c t u a l synthesis of the c o n t r o l l e r i s r e q u i r e d i n these algorithms. The development of such screening t o o l s i s s t i l l i n i t s infancy but appears to be q u i t e promising f o r concurrent d e s i g n / c o n t r o l e v a l u a t i o n . Such techniques, i f simple to use, would be immediately acceptable f o r use by major engineering firms and the process i n d u s t r i e s . The o v e r a l l p l a n t c o n t r o l concept and i n c o r p o r a t i o n of more d e t a i l e d c o n t r o l design with p l a n t design r e q u i r e s the s e l e c t i o n of the f o l l o w i n g elements: (1) control objectives (2) output v a r i a b l e s (3) measurements (4) manipulated v a r i a b l e s (5) control structure There are a number of a v a i l a b l e techniques f o r e v a l u a t i n g the cont r o l system, which can be c l a s s i f i e d as f o l l o w s : (1) a n a l y s i s of c o n t r o l c o n s t r a i n t s (rather than dynamics) (76) (2) generating a l t e r n a t i v e c o n t r o l s t r u c t u r e s f o r each u n i t and minimizing c o n f l i c t s among the v a r i o u s s t r u c t u r e s , using a m u l t i l e v e l a n a l y t i c a l approach (77) (3) s a t i s f y i n g product q u a l i t y and c o n t r o l l i n g the m a t e r i a l balance as primary o b j e c t i v e s (steady s t a t e c o n t r o l ) ,

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

4.

EDGAR

Advanced Control Strategies

107

followed by dynamic a n a l y s i s (78), (79) aggregation of u n i t s that have common f u n c t i o n a l goals i n terms of c o n t r o l and economics (80) While these techniques have been a p p l i e d to energy-related processes such as h e a t - i n t e g r a t e d d i s t i l l a t i o n columns and f l u i d c a t a l y t i c cracking r e a c t o r s , there i s s t i l l extensive research required before the concept of plant d e s i g n / c o n t r o l i s reduced to p r a c t i c e . The operation of energy-integrated p l a n t s w i l l make i t necessary to design c o n t r o l systems which are d e c e n t r a l i z e d but which a l s o respond to o v e r a l l plant o b j e c t i v e s . E x i s t i n g modern c o n t r o l theory i s r e a l l y not adequate f o r these l a r g e s c a l e problems, since there may be over 50 s t a t e v a r i a b l e s . These systems are o f t e n made up of interconnected and o f t e n s i m i l a r elements and must be c o n t r o l l e d by an h i e r a r c h y of computers micro, mini, and macro. The questions of system s t r u c t u r e , repr e s e n t a t i o n , and modeling and c o n t r o l , measurement, and o p t i m i z a t i o n s t r a t e g i e s are f e r t i l e ones. A recent i s s u e of the IEEE Transactions on Automatic C o n t r o l ( A p r i l , 1978) was devoted ent i r e l y to t h i s s u b j e c t . There have been only a few a p p l i c a t i o n s of m u l t i - l e v e l or d i s t r i b u t e d c o n t r o l reported i n the l i t e r a t u r e (81), (82), (83), but during the next decade t h i s area promises to be one of great a c t i v i t y .

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch004

(4)

Literature

Cited

1.

Foss, A. S.; and Denn, M.M., Ed., "Chemical Process Control," AIChE Symp. Ser., 1976, 72, No. 159. 2. Seborg, D. E., "A Survey of Process Control Education in the U.S. and Canada," Annual AIChE Meeting, Miami, Florida, November, 1978. 3. Coughanowr, D. R.; and Koppel, L. B., Process Systems Analysis and Control, McGraw-Hill, New York, 1965. 4. Edgar, T. F., "Assessment of the Use of Process Dynamics and Control for Influencing Energy Utilization in Industrial Processes," paper presented at Department of Energy Workshop on Process Dynamics and Control, Denver, Colorado, June, 1979. 5. Robnett, J.D., "Engineering Approaches to Energy Conservation," Chem. Engr. Prog., 1979, 75 (3), 59. 6. Kenney, W. F., "Reducing the Energy Demand of Separation Processes," Chem. Engr. Prog., 1979, 75 (3), 68. 7. Smith, O.J.M., "Closer Control of Loops with Dead Time," Chem. Engr. Prog., 1957, 53, 217. 8. Smith, C. L., Digital Computer Process Control, In text, Scranton, Pa., 1972. 9. Edgar, T. F.; and Schwanke, C. O., "A Review of the Application of Modern Control Theory to Distillation Columns," Proc. Joint Automatic Control Conference, 1977, 1370. 10. Tung, L.S.; and Edgar, T. F., "Development and Reduction of a Multivariable Distillation Column Model with Tray Hydraulics,"

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

108

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

AIChe National Meeting, Houston, Texas, April, 1979. Rijnsdorp, J. E.; and Seborg, D. Ε., "A Survey of Experimen­ tal Applications of Multivariable Control to Process Control Problems," AIChE Symp. Ser., 1976, 72 (159), 112. 12. Buckley, P. B., "Distillation Column Design Using Multivar­ iable Control," Inst. Tech., 1978, 25(3), 115. 13. Padmanabhan, L.; and Lapidus, L., "Control of Chemical Reactors" in Chemical Reactor Theory: A Review, Ed. by L. Lapidus and N. R. Amundson, Prentice-Hall, Englewood Cliffs, N. J., 1977. 14. Wallman, P. H.; and Foss, A. S., "Multivariable Integral Controls for Fixed Bed Reactors," AIChE Annual Meeting, Miami, Florida, November, 1978. 15. Kurihara, H., Optimal Control of Fluid Catalytic Cracker, Report ESL-R-309, M.I.T., June, 1967. 16. Schuldt, S. B.; and Smith, F. B., "An Application of Quad­ ratic Performance Synthesis Techniques to a Fluid Catalytic Cracker," Proc. Joint Automatic Control Conference, 1971, 270. 17. Olsson, G., "State of the Art in Sewage Treatment Plant Control, "AIChE Symp. Ser., 1976, 72 (159), 52. 18. Church, D. F., "Cement and Projected Pulp and Paper Industry Problems in Process Control and Process Modeling," AIChE Symp. Ser., 1976, 72 (159), 19. 19. Clelland, P. J., "Recent Furnace Draft Control Considera­ tions," Proc. IEEE Conf. on Dec. and Cont., 1977, 1101. 20. Fisher, D. G.; and Seborg, D. Ε., Multivariable Computer Control-Α Case Study, North-Holland Publishing Co., Amster­ dam, 1976. 21. MacFarlane, A. G. J., "A Survey of Some Recent Results in Linear Multivariable Feedback Theory," Automatica, 1972, 8, 455. 22. Edgar, T. F., "Status of Design Methods for Multivariable Control," AIChE Symp. Ser., 1976, 72, (159) 99. 23. Munro, N.; Broland, B. J.; and Brown, L. S., "The UMIST Computer-Aided Control System Design Suite," National Research Development Corporation, Great Britain, 1973. 24. Rosenbrock, Η. Η., Computer-Aided Control System Design, Academic Press, New York, 1974. 25. Shinskey, F. G., "The Stability of Interacting Control Loops with and without Decoupling," Proc. Fourth IFAC Multivaria­ ble Technological Systems Conference, 1977, 21. 26. Jafarey, Α.; and McAvoy , T. J., "Degeneracy of Decoupling in Distillation Columns," IECPDD, 1978, 17, 485. 27. McAvoy, T. J., "Steady State Decoupling Sensitivity with Application to Distillation Control," AIChE National Meeting Houston, Texas, April, 1979. 28. Toijala (Waller), Κ. V.; and Fagervik, K. C., "A Digital Simulation Study of Two Point Feedback Control of Distill­ ation Columns," Kem. Teollisuus, 1972, 29, 5.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch004

11.

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

4.

EDGAR

Advanced Control Strategies

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch004

29.

109

Rosenbrock, Η. Η., "Design of Multivariable Control Systems Using the Inverse Nyquist Array," Proc. IEEE, 1969, 116, 1929. 30. MacFarlane, A. G. J.; and Belletrutti, J. J., "The Charac­ teristic Locus Method," Automatica, 1973, 9, 575. 31. MacFarlane, A. G. J., "Commutative Controller: A New Technique for the Design of Multivariable Control Systems," Electron Letters, 1970, 6, 121. 32. Mayne, D. Q., "The Design of Linear Multivariable Systems," Automatica, 1973, 9, 201. 33. Kuon, J. F., "Multivariable Frequency Domain Design Tech­ niques," Ph.D. dissertation, University of Alberta, Edmonton, Canada, 1975. 34. Bilec, R.; and Wood, R. Κ., "Multivariable Frequency Domain Controller Design for a Binary Distillation Column," AIChE National Meeting, Houston, Texas, April, 1979. 35. Schwanke, C. O.; Edgar, T. F.; and Hougen, J. O., "Develop­ ment of Multivariable Control Strategies for Distillation Columns," ISA Trans., 1977, 16 (4), 69. 36. Foss, A. S.; Edmunds, J. M.; and Kouvaritakis, Β., "Multivariable Control System for Two-Bed Reactors by the Char­ acteristic Locus Method," IEC Fund., 1980, in press. 37. Ogunnaike, Β. Α.; and Ray, W. Η., "Multivariable Controller Design for Linear Systems Having Multiple Time Delays," AIChE J., 1979, in press. 38. Simon, J. D., and Mitter, S. Κ., "A Theory of Model Con­ trol," Inf. Control, 1968, 13, 316. 39. Davison, Ε., "On Pole Placement in Linear Systems with Incomplete State Feedback," IEEE Trans. Auto. Cont., 1970, AC-15, 348. 40. Vardulakis, A. I., "Generalized Root Locus Assignment of All Poles of a Multivariable System by Output Feedback," Int. J. Cont., 1976, 23, 39. 41. Brasch, F. M.; and Pearson, J. B., "Pole Placement Using Dynamic Compensators," IEEE Trans. Auto. Cont., 1970, AC-15, 34. 42. Bristol, Ε. Η., "Recent Results in Interaction in Multivar­ iable Process Control," AIChE Annual Meeting, Miami, Flor­ ida, November, 1978. 43. Dahlin, Ε. B., "Designing and Tuning Digital Controllers," Inst. Cont. Syst., 1968, 41 (6), 77. 44. Higham, J. D., "Single-Term Control of First and Second Order Processes with Dead Time," Control, 1968, February, p. 136. 45. Athans, M.; and Falb, P. L., Optimal Control, McGraw-Hill, New York, 1966 46. Lapidus, L; and Luus, R., Optimal Control of Engineering Processes, Blaisdell, Waltham, Mass., 1967. 47. Edgar, T. F.; Vermeychuk, J. G.; and Lapidus, L., "The Linear-quadratic Control Problem: A Review of Theory and

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

110

48. 49. 50. 51.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch004

52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63.

64.

65.

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

Practice," Chem. Engr. Comm., 1973, 1, 57. O'Connor, G. Ε.; and Denn, M. M., "Three Mode Control as an Optimal Control," Chem. Engr. Sci., 1972, 27, 121. Balchen, J. G.; Endresen, T.; Fjeld, M.; and Olsen, T. O., "Multivariable ΡID Estimation and Control in Systems with Biased Disturbances," Automatica, 1973, 9, 295. Safonov, M. G.; and Athans, M., "Gain and Phase Margin for Multiloop LQP Regulators," IEEE Trans. Auto. Cont., 1977, AC-22, 173. MacGregor, J. F., "Optimal Discrete Stochastic Control Theory for Process Application," Can. J. Chem. Engr., 1973, 51, 468. Palmor, Z. J.; and Shinnar, R., "Design of Sampled Data Controllers," IEC PDD, 1979, 18 (1), 8. Astrom, K. J., Introduction Stochastic Control Theory, Academic Press, New York, 1970. Box, G. E. P.; and Jenkins, G. Μ., Time Series Analysis, Forecasting, and Control, Holden-Day, San Francisco, 1970. Kuo, B. C., Digital Control Systems, SRI Publishing Com­ pany, Champaign, IL., 1977. Landau, Y. D., Adaptive Control, Marcel Dekker, New York, 1978. Newman, Μ. Μ., "On Attempts to Reduce the Sensitivity of the Optimal Linear Regulator to a Parameter Change,", Int. J. Cont., 1970, 11, 1079. Sannuti, P.; and Cruz, J. Β., "A Note on Trajectory Sensi­ tivity of Optimal Control Systems," IEEE Trans. Auto. Cont., 1968, AC-13, 111. Davison, E. J., "Decentralized Robust Control of Unknown Systems Using Tuning Regulators," IEEE Trans. Auto. Cont., 1978, AC-23, 276. Wittenmark, B., "Stochastic Adaptive Control Methods-a Survey," Int. J. Cont., 1975, 21, 705. Astrom, K. J.; and Wittenmark, Β., "On Self-Tuning Regu­ lators," Automatica, 1973, 9, 185. Popov, V. Μ., "The Solution of a New Stability Problem for Controlled-Subsystems," Automation and Rem. Cont., 1963, 24, 1. Borisson, U.; and Wittenmark, B., "An Industrial Applica­ tion of a Self-Tuning Regulator," 4th IFAC Conference on Digital Computer Applications to Process Control, Zurich, Switzerland, 1974. Shah, S. L., Fisher, D. G.; and Karim, Ν. Μ., "Hyperstab­ ility Adaptive Control-Α Direct Input-Output Approach with­ out Explicit Model Identification," Proc. Joint Automatic Control Conference, 1979, 481. Oliver, W. K.; Seborg, D. E.; and Fisher, D.G., "Model Reference Adaptive Control Based on Lyapunov's Direct Method," Chem. Engr. Comm., 1973, 1, 125.

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

4.

EDGAR

Advanced Control Strategies

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch004

66.

111

Bristol, Ε. Η., "Pattern Recognition: an Alternative to Parameter Identification in Adaptive Control," Automatica, 1977, 13, 197. 67. Box, G. E. P.; and MacGregor, J. F., "Parameter Estimation with Closed Loop Operating Data," Technometrics, 1976, 18, 371. 68. Richalet, J.; Rault, Α.; Testud, J. L.; and Papon, J., "Model Predictive Heuristic Control: Applications to Industrial Processes," Automatica, 1978, 14, 413. 69. Cutler, C. R.; and Ramaker, B. L., "Dynamic Matrix ControlA Computer Control Algorithm," AIChE National Meeting, Houston, Texas, April, 1979. 70. Weber, R.; and Brosilow, C.B., "The Use of Secondary Measure­ ments to Improve Control," AICHE J., 1972, 18, 614. 71. Brosilow, C. B.; and Tong, Μ., " The Structure and Dynamics of Inferential Control Systems," AIChE J., 1978, 24, 492. 72. Bristol, Ε. Η., "On a New Measure of Interaction for Multivariable Process Control," IEEE Trans. Auto. Cont., 1966, AC-11, 133. 73. McAvoy, T. J., "Interacting Control Systems: Steady State and Dynamic Measurement of Interaction," ISA Trans., 1978, 16 (3), 35. 74. Tung, L. S.; and Edgar, T. F., "Analysis of Control-Output Interactions in Dynamic Systems," AIChE Meeting, Miami, Florida, November, 1978. 75. Gagnepain, J. P.; and Seborg, D. E., "An Analysis of Process Interactions with Applications to Multi-Loop Control System Design," AIChE Annual Meeting, San Francisco, Nov., 1979. 76. Govind, R.; and Powers, G. J., "Synthesis of Process Control Systems," IEEE Trans. Sys. Man. Cyb., 1978, FMC-8, 792. 77. Umeda, T.; and Kuriyama, T., "A Logical Structure for Process Control System Synthesis," Proc. IFAC Congress, Helsinki, Finland, 1978. 78. Buckley, P. S., Techniques of Process Control, Wiley, New York, 1964. 79. Douglas, J. Μ., "Quick Estimates of Control Economics," AIChE Annual Meeting, New York, 1977. 80. Morari, M.; Arkun, Y.; and Stephanopoulos, G.,"An Integrated Approach to the Synthesis of Process Control Structures," Proc. Joint Automatic Control Conference, 1977, 243. 81. Ray, W. H.; and Lainiotis, D. G., Distributed Parameter Systems, Marcel Dekker, New York, 1978. 82. Kociuba, T.; and Ponstingl, J. C., "Energy Management Sys­ tems for Industry," Proc. Fourth Annual Advanced Control Conference, Purdue University, April, 1977. 83. Al-Shaikh, Α.; and Leffler, N., "Application of Multi-Level Control of Calenders in the Tire Industry," Automatica , 1978, 14, 1. RECEIVED November 14, 1979.

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

5 Computation of Phase and Chemical Equilibrium: A Review WARREN D. SEIDER, RAJEEV

GAUTAM , 1

and CHARLES W. WHITE, III

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch005

Department of Chemical and Biochemical Engineering, University of Pennsylvania, Philadelphia, PA 19104

Figure 1 i l l u s t r a t e s the p h y s i c a l s i t u a t i o n i n which a mix­ ture o f chemicals i s allowed t o reach e q u i l i b r i u m . The number o f phases, P, and t h e i r compositions are unknown a t e q u i l i b r i u m . U s u a l l y the s t a t e o f the feed and temperature and pressure of the products are known, and the Gibbs f r e e energy i s minimized

G =

S Σ

C P G?n° + Σ Σ j-1 3 3 j-S+1 *=i

G. n 0

3

(1)

%

subject t o mass balance c o n s t r a i n t s , where C i s the number o f chemical s p e c i e s , Ρ i s the number o f mixed phases (vapor, l i q u i d , s o l i d ) , S i s the number o f condensed species (which appear i n only one pure phase, are normally s o l i d , and do not d i s t r i b u t e amongst other phases), n j i s the number o f moles o f compound j i n phase H, G-£ i s the chemical p o t e n t i a l o f compound j i n phase I, given by

G,. = G °

p

f

o

e

+ RT In - i

r

and o f t e n , fj£ = y j j vapor and = X j Y j f j for liquid phases. When the number o f independent chemical r e a c t i o n s equals C - p, where p i s the rank o f the atom matrix (m-j) , Gibbs f r e e energy i s minimized subject t o atom balance c o n s t r a i n t s :

1

Current address: West V i r g i n i a

Union Carbide Corporation, South Charleston,

0-8412-0549-3/80/47-124-115$05.00/0 © 1980 American Chemical Society In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch005

116

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

PHASE 1

' PHASE 2 F

'f z

LP

Q PHASE Ρ Figure 1.

Physical situation. Mixture reaches equilibrium at Τ and P. The num­ ber of phases, P, and their compositions are unknown.

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

5.

b. = k

117

Phase and Chemical Equilibrium

SEIDER ET AL.

S C P Σ m. n ? + Σ Σ m.,n.„ j=l * j = S l Λ-1 * 3*

k=l,...,E

(2)

3

+

where b i s the number of gram-atoms o f element k, mj i s the number of atoms o f element k i n compound j , and Ε i s the number of elements. A f t e r computing product compositions, the energy balance gives heat duty. Other s p e c i f i c a t i o n s f o r the product, such as pressure and heat duty (e.g., a d i a b a t i c processes) or pressure and entropy (e.g., i s e n t r o p i c processes) a l s o i n v o l v e f i n d i n g the extremum o f a thermodynamic f u n c t i o n . Given pressure and heat duty, the entropy i s maximized

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch005

k

S Σ

G°n 3

j=l

C

C Σ

+

D

P Σ

j = s + 1

£ = 1

G

n

] j

(3)

J* DM

subject t o mass balance c o n s t r a i n t s and the energy balance S Q + Η

Ρ h%

Σ

= F

+

C

Σ

j=i

h η

£=i

36

(4)

36

A l t e r n a t i v e l y , Gibbs f r e e energy (1) i s minimized subject t o these c o n s t r a i n t s . Given p r e s s u r e and entropy, the enthalpy i s minimized S Σ

Η =

C G°n 3

j-i

C

Σ

+

3

P Σ

j-s+i £=i

G. n.. ft

3 1

(5)

3 1

subject t o mass balance c o n s t r a i n t s and the entropy balance, which f o r i s e n t r o p i c systems i s S Σ

=

S F

j

=

1

C

s n ] ]

C

Ρ Σ

+ A

s

l

s η

(6)

A A

This i s e q u i v a l e n t t o minimizing Gibbs f r e e energy. Less common s p e c i f i c a t i o n s such as temperature and heat duty o r temperature and entropy are t r e a t e d s i m i l a r l y . S o l u t i o n of the o p t i m i z a t i o n problem r e q u i r e s algorithms t h a t l o c a t e the phase d i s t r i b u t i o n corresponding t o the g l o b a l optimum. C a s t i l l o and Grossmann (1) term t h i s a mixed-integer programming problem and suggest a t r e e to enumerate the p o s s i b l e combinations of phases at e q u i l i b r i u m . Some computational problems are s p e c i f i c t o chemical e q u i l i b -

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

118

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

rium, while others are s p e c i f i c t o phase e q u i l i b r i u m . Hence, we consider techniques f o r chemical e q u i l i b r i u m i n a s i n g l e phase and f o r phase e q u i l i b r i u m without r e a c t i o n p r i o r t o those f o r chemical and phase e q u i l i b r i u m . Before proceeding, two reviews are worthy o f mention. Z e l e z n i k and Gordon (2) and VanZeggeren and Storey {3) concen­ t r a t e on thermodynamic fundamentals and numerical methods. T h e i r c o n c l u s i o n s should be reassessed i n view o f r e c e n t developments i n numerical a l g o r i t h m s . Chemical

Equilibrium

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch005

,

U n t i l the e a r l y 1940 s, with temperature and pressure g i v e n , compositions i n chemical e q u i l i b r i u m were computed manually by s o l v i n g a s e t o f n o n l i n e a r equations:

j

C Σ l

v..G. = 0 D

=

i=l,...,R

(7)

s u b j e c t t o the atom balances i n Equation (2). Equation (7) was w r i t t e n f o r each o f R independent r e a c t i o n s and was obtained by d i f f e r e n t i a t i n g Equation (1): d T7-

where

G = 0

.

1=1,...,R

i s the extent o f r e a c t i o n i and: R Σ

n. = n? + J 3

i

=

1

v..ξ. 13

j=l,...,C

(8)

nj i s the moles o f compound j i n the feed mixture and v j are the s t o i c h i o m e t r i c c o e f f i c i e n t s o f compound j i n r e a c t i o n i given by the atom balances M v = 0. B r i n k l e y ( 4 p o s t u l a t e d c s p e c i e s at e q u i l i b r i u m , p s p e c i e s , r e f e r r e d t o as "components," were s e l e c t e d t o have l i n e a r l y i n ­ dependent formula v e c t o r s , where p i s the rank o f the atom matrix, ( m j ) , and Yj i s the formula v e c t o r f o r the j t h s p e c i e s , [ m j mj2,...mj ]. Given the choice o f components, the s t o i c h i o m e t r i c c o e f f i c i e n t s f o r an independent s e t o f chemical r e a c t i o n s are computed: T

T

k

lf

E

Ρ Σ V..Y. = Y. j=l 3 1

3

where the number o f independent

i=p+l,...,C

(9)

1

r e a c t i o n s , R = C - p, and the

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

5.

SEiDER ET AL.

119

Phase and Chemical Equilibrium

species on the right-hand-side are r e f e r r e d t o as "derived s p e c i e s . " Compositions a t e q u i l i b r i u m are c a l c u l a t e d using Equa­ t i o n (7) and conservation of mass f o r each component

G. 1

Ρ Σ v..G. j=l 3 0

= 0

i=p+l,...,C

(10)

,p

(11)

1

C η. +

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch005

3

Σ ν..n. = q. i-p+l 1

j=l,

3

where the feed mixture i s d i s t r i b u t e d amongst components, j = the d e r i v e d s p e c i e s , n£, and solved Equation (11) f o r the moles of components, η j . Equations (10) were solved f o r n and con­ vergence c r i t e r i a checked. For convergence, components need be s e l e c t e d as those species present i n the highest concentration a t e q u i l i b r i u m . When t h i s i s not the case, Equation (11) frequently gives negative values f o r η j . Browne, e t a l . (Ί) suggested the "optimum component" proce­ dure i n which components are s e l e c t e d as those species expected to be i n the highest concentration a t e q u i l i b r i u m . C r u i s e (8) a l t e r e d the components during i t e r a t i v e c a l c u l a t i o n t o r e f l e c t changes i n composition. Cruise (8) solved Equations (10) and (11) by a d j u s t i n g extents of r e a c t i o n . To prevent divergence, Smith and Missen (9) a l s o improved i n i t i a l estimates by using a l i n e a r programming procedure which neglects the l o g a r i t h m i c terms i n Equation (1). Because o f these problems, most recent methods avoid the d i s t i n c t i o n between components and d e r i v e d species and take the moles of a l l species as i t e r a t i o n v a r i a b l e s . N a p h t a l i (10) solved Equations (7) by o b t a i n i n g c o r r e c t i o n s to extents o f r e a c t i o n from: άζ.

ι

= -AG.dX ι

i=l,...,R

(12)

where dX i s the s t e p - s i z e and C AG. = 1

Σ V..G. j=l

1 D

3

He showed t h a t p o s i t i v e dX give d£ t h a t reduce Gibbs f r e e energy. This method i s analogous t o t h a t of steepest descent, a f i r s t order method f o r minimization o f Gibbs f r e e energy. Ma and Shipman (11) used N a p h t a l i s method t o estimate compositions a t e q u i ­ l i b r i u m and the Newton-Raphson method t o achieve convergence. Several n o n l i n e a r programming methods have been a p p l i e d t o 1

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

120

COMPUTER

APPLICATIONS T O C H E M I C A L

ENGINEERING

minimize Gibbs f r e e energy. But these are normally formulated t o determine compositions i n chemical and phase e q u i l i b r i u m and are presented i n the s e c t i o n "Chemical and Phase E q u i l i b r i u m . " Heidemann (12) observes t h a t "the chemical r e a c t i o n e q u i l i b ­ rium problem i n a homogeneous phase i s known t o have an unique s o l u t i o n except when the thermodynamic model o f the phase can e x h i b i t d i f f u s i o n a l i n s t a b i l i t y . " Hence, f o r chemical e q u i l i b r i u m i n a s i n g l e phase, l o c a l minima i n Gibbs f r e e energy do not occur and the search i s s i m p l i f i e d .

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch005

Phase E q u i l i b r i u m Algorithms f o r computation o f compositions i n vapor and l i q u i d phases a t e q u i l i b r i u m u s u a l l y solve the n o n l i n e a r a l g e b r a i c equations G. 3

= G. 3-

V

j=l,...,C

(13)

j=l,...,C

(14)

i n the form y. = k.{T,p,x,y}x.

together with mass balances and the energy balance. Equations (13) are obtained by d i f f e r e n t i a t i n g Equation (1) f o r S = 0 and £ = 2 with d n j = -dnjL. With temperature and pressure given, the f l a s h equation: V

C

ζ. (1 - k.) -, ττ- = 0 . . 1 + o(k. - 1) 3=1 3 Σ

3

1

(15)



can be solved f o r α (moles o f vapor/moles o f feed) using simple r o o t - f i n d i n g procedures. For non-ideal s o l u t i o n s k j i s a f u n c t i o n o f l i q u i d composi­ t i o n and a. Hence, Equation (15) must be s o l v e d i t e r a t i v e l y with m a t e r i a l balance equations and computation times i n c r e a s e . Boston and B r i t t (13) present an algorithm, given the s t a t e of the feed and s i x p r a c t i c a l sets o f s p e c i f i c a t i o n s shown i n F i g u r e 2. They d e f i n e v o l a t i l i t y parameters

u. = I n b 3

where k

1

j=l,...,C

(16)

K

i s the "reference e q u i l i b r i u m r a t i o " d e f i n e d by: C In k b

=

Σ

j=l

w. In k. 3

3

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

(17)

Phase and Chemical Equilibrium

SEIDER ET AL.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch005

5.

Specified

Calculated

II

α, P ο,τ

y, Ρ

III

Q,V

IV

ν, τ

I

Figure 2.

121

V

V, Ρ

VI

Τ, Ρ

τ,ν LP P,Q Tj Q

ν, ο

Specification by Boston and Britt (13) for vapor-liquid equilibrium

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

COMPUTER

122

APPLICATIONS

TO CHEMICAL

ENGINEERING

Wj are weighting f u n c t i o n s computed as a f u n c t i o n o f V/L, y, and k, as d e s c r i b e d i n t h e i r paper. Furthermore, a second r e l a t i o n f o r the reference e q u i l i b r i u m r a t i o i s d e f i n e d as:

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch005

in

- A + B as a weighted average of the form:

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch006

b

lnK

=

b

ÇwilnKi

(4)

The w's are weighting factors, expressions for which have been derived elsewhere (Z) to make dlnK /dT an appropriate weighted average of the individual dlnKj/dT values. The dependence of K on Τ is then represented by the simple model: b

b

lnK

= A + B(l/T-1/T*)

b

(5)

where T* is a reference temperature. Just as the K's are strongly dependent on T, and for a highly nonideal system, on χ and y as well, K will also exhibit a strong dependence on these primitive variables. However, the coefficients A and Β will be only weakly dependent on T. Furthermore, since the Τ dependence of the K's is usually not strongly affected by composition, Β will also be only weakly dependent on χ and y. As a result of these weak dependencies, A and Β are excellent iteration variables. The values of A and Β may be determined by evaluating the K's at two temperature levels, while holding χ and y constant. The simple K-value model is completed by defining a set of relative v o l a t i l i t i e s : b

a

i

=

Ki/K

b

(6)

which are much less sensitive to Τ than the individual K's because a weighted average temperature dependence i s included in K . The (3) Calculate p, K , T, x, y using eqs. (20), (21), b

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch006

(5),

(22), (23), respectively.

(4)

Calculate M

(5)

Calculate hJ,

L>

My, H

IG

H°, àH

y9

àH

Hy, H

L

using eqs. (9), (10), (11), (12), (7), (8), respectively.

(6)

Calculate L and Ψ using eqs. (24), (25), respectively. |ψ| < ε

(7)

Assume new R and return to (3) until

(8)

Calculate Κ, H , Hy using actual models.

(9)

Calculate a, A,C.,Ê (and B, D, F f i r s t iteration

L

only).

(10) Assume new values of a, A,C.,Ε (and B, D, F f i r s t iteration only) and return to (2) until calculated values match assumed values.

Use

Broyden quasi-Newton method after f i r s t iteration.

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

co ro Μ -Ό Η-Η CO Φ 3

2

-S Ο

outs ide 360/ 168.

C

ο. —I.

φ Ο Χ 3 r+ r+ -··

-ι. CO

—'· ~*S

CL

—» $U Φ —Ό 0>

Ο ί Γ+ — ' Γ+ —
Ό 3 Φ Τ3

φ

ΖΓ 3

-«·

a

r+

ro

r

t

—r- — ο ο

CL -< ο

ο ο

CO 3 3 t Q CQ CQ ~σ~σ Φ Φ Φ Φ Τ3 I —»ί —t —* CO 3 TD Ο Φ Φ —•3 Φ 3 C+

3

c

(Λ CU ^

-h

—J. Q_ Φ

3 Φ

>nen1

iden:

ο ο



pue

φ

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980. CO

m

K-value model

en

en

^1

H—I I—I

C

rt

ι

CO rt O) IQ

rations

ro

CO

^ Ο -S _J. r+ Ξ Γ

3 m χ

c+ Φ

00

Ο —· ·

Dop

ro

ο

vo

0>

3

•σ Φ

~s ο cr

φ

3

to



"!·

^1

en

)utside

co

ro

en

No. stages.

oo

ο

CO

Enthalpy models

Vapor enthalpy depar­ ture by Redlich-Kwong equation. Liquid enthalpy by corresponding states correlation. ro en

CO

en

ro

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch006

xriler when present,

•H > CD Γ "

to

Activity coeffi cients Activity coefficients by Wilson equat ion. by Scatchard-Hildebrand equation. Vapor pressures by Liquid fugacity coef­ Antoine equatic η. Vapor phase ass umed f i cents by Chao Seader equation. ideal. Vapor fugacity coef­ f i cents by RedlichKwong equation.

Φ

Vapor phase assumed ideal. Liquid enthalpy by polynomial in temp­ erature. ro

ο

cr>

Φ -S 0i C+

CO CQ _i. . CL Φ 3

-ι. Ο Ο —* · 3 Ο CO ο Γ\χσ ^

Ο

c+

CO —'· Ο

ro

3

Φ Ο

en

εηιψμο^ιγ

9fl

Φ

cr

CO

inQ-dpisui

Noxsoa

9

146

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

elements well enough in relatively few iterations. Therefore, not including composition effects in the simple K-value model actually represents a trade-off between the effects that the simple models ought to account for and the effects that the convergence procedure ought to account for. In multi-stage systems, on the other hand, strong nonidea l i t y is a more serious problem. In the f i r s t place, i t is not feasible to use Broyden's quasi-Newton method for convergence of the outer loop because there are too many parameters (N(N +3)), and the Jacobian is in general not sparse. The outer loop is therefore converged by either the bounded Wegstein method (27.), or by direct substitution with moderate damping. Secondly, because interactions among the parameters tend to propagate over several stages, strong nonidealities frequently lead to poor convergence behavior or even failure to converge. The d i f f i c u l t i e s associated with highly nonideal multi-stage systems have been overcome by introducing a simple model for the composition dependence of K-values. In keeping with the s p i r i t of the inside-out concept, the parameters of the simple model become outside-loop iteration variables, and are determined by applying the actual models only in the outer loop. Further, they are as independent as possible of the primitive variables. The basis of this approach is the representation of the K-value in terms of three factors as follows:

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch006

c

Ki

=

K

a

b

i Y i

*

(26)

where γ .* is a new quantity introduced to account for the composition dependence. For simplicity, the most frequent case is considered, where most of the nonideality arises from the liquid phase, and is represented by an activity coefficient model. In this case, Ύ .* is a pseudo-activity coefficient which is obtained from the actual activity coefficent model at a reference temperature T*: Ί

Ί

V

=

Ύ .(Τ*,χ) Ί

The objective is to substantially reduce the composition depend­ ence of the a's by using a simple model for Ύ .* in terms of parameters that will be well-behaved iteration variables. The treatment of Kb is the same as before, therefore δ 2 . . . » δ errors. Let ΔΙ = { δ . | j = 1 , 2 , . . . , Κ and δ . i s in the i - t h balance}

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

7.

STEPHANOPOULOS

AND

ROMAGNOLi

Operational Parameters

169

β

Then i f ε 0, i t i s c l e a r that the o r i g i n of the gross e r r o r f o r the i - t h balance i s not i n the s e t

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch007

The precedure continues u n t i l the source of the gross e r r o r has been uniquely i d e n t i f i e d . The method f a i l s to i d e n t i f y u n i q u e l y the source of the gross e r r o r when the source o f gross e r r o r i s s t r u c t u r a l l y n o n - a c c e s s i b l e or i t i s p a r t of s e t s o f balances with s t r u c t u r a l s i n g u l a r i t i e s . Both c o n d i t i o n s r e s u l t to the l a c k of s t r u c t u r a l o b s e r v a b i l i t y f o r the source o f gross e r r o r . The complete s t r a t e g y and i t s implementation can be found i n Romagnoli [16]. Numerical Examples Example 1: Multicomponent Mass and Enthalpy Balances a t steadystate. In t h i s example we w i l l apply the method to a process con­ s i d e r i n g multicomponent mass and heat balances. In F i g u r e 4 the system under d i s c u s s i o n i s shown, which c o n s i s t s o f 12 u n i t s w i t h 28 streams and two components. The system equations are Σ j-i J Σ

a 3

Μ. = 0

M k

T o t a l mass balance f o r u n i t k

j

a , M. x.. = 0 #

Component mass balance f o r u n i t k

J Σ a M. Η. = 0 T o t a l heat balance f o r u n i t k j=l The s t r u c t u r a l matrix and the b l o c k d i a g o n a l form D a r e given i n F i g u r e From the c l a s s i f i c a t i o n a l g o r i t h m we o b t a i n the subsets M , M , t L , U o f parameters g i v e n i n t a b l e 1. # 1

3

J

3

2

3

K

M

l

M

2

ÏÏ

1

2

χ

3

l,3,4,7,15,25,3(i31 32,33,34,35,36,37

1,3,4,7,15,25

1,3,4,7,15,25

10,20,24,13

9,18,24,13

11,16,19,22,29,13,24

2,6,8,9,11,14,16 18,19,22,23

2,8,6,10,11,14 16,19,20,22,23

2,8,6,9,10,14,18,20 23

ÏÏ

2 Table 1.

The c l a s s i f i c a t i o n o f measured and unmeasured parameters f o r example 1.

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch007

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

30

35 -Θ-CHCOND 9[-θ-0 34

-Θ-CH COND 4

10

DIST

DIST

3

20

8

22

N—H3

2

,

DVDR 10

33

36

REB 6 |-θ->

T23

φ 14 DVDR7

REB II hë-t>

15

Mj

Xj

Mj

Xj

Mj Hj

Hj

HEXR 2W—ι

MEASURED

24

"WDVDR 12

Xj

MEASURED MEASURED

MEASURED MEASURED

FRESH J HXER I

NONE

MEASURED

MEASURED

Figure 4.

Flow diagram for Example 1

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

FEED

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

17

40

34

31

29

36

33

30

28

41

38

43

42

37

35 '

27

25

19

20

13

10

12

24

23

26

21

?

2

8

X

X X XXX

2

a

X X X

X X X X X

X X

M

Figure 5.

X XX X

M

B

g

6

|0

XXX χ χ

9

χ XX

X X X XX

χ XX

χ χ

XX

χ

X

}

4

4

?

7

XX

τ

χ

5

χ

5

XX

Χ

χ χ

χ χ χ XXX

5

Χ

χ

X X

X

X X

X

X

X

XX

X„ H„ Ν Μ Η

XX

X„

W N M , ,

Modified occurrence matrix (block diagonal form) for the system in Example 1

X X X X X X

M

X H Mj M X X, M„ M, X„ MH, M X X,« H X H H H M, H» M M M , , H„ X„ X M , X, H, M, X H, M, X H M Χ H X, 1 H„ M, X, H,

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch007

}

H, M 3 2

g

M

M H M 3 5

H 3 S

j 7

5 T

ο

ο

I

ο

>

I

s ζ ο

M H

172

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

The subsets Ε

Ί 1

E , E ,E

o f not assigned equations a r e

2

= 2,5,45 46,47,48

E

= 19,25,27,31 34,40,44

9

L

Ei = φ

Ε

= i i C l a s s i f i c a t i o n of the parameters y i e l d s the f o l l o w i n g s e t s X

K

±

= {1,3,4,15,24,22,20,19,10}

M

2

=

{6,8,12,17,26}

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

STEPHANOPOULOS A N D

*H

Operational Parameters

ROMAGNOLi

11

3,

2

—K-W

4

15

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch007

13

Ρ

16

26

i "7

ί

27

d si

11 -

C

Ο

»

•κ»

§ if ο

s s

•2

s

*£ ce

w

00

182

COMPUTER

APPLICATIONS TO

CHEMICAL

ENGINEERING

Intxoducing the general correlation for the f r i c t i o n factor suggested by Churchill (11), figure 2 shows how the choking con­ ditions now depend on the pipe length for isothermal conditions and variable f r i c t i o n factor. As i t i s seen, the effect of the variable f r i c t i o n factor i s negligible. c. Adiabatic conditions, variable f r i c t i o n factor. Under adiabatic conditions, the relationship between the linear gas velo­ c i t y and the temperature may be expressed by the enthalpy (12) : 2

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch008

ν

2 = v

+ 2c (T -T);

Q

p

Q

v

Q

=

— c y ; y = w\£F/E>

o

(18)

provided the specific heat capacity at constant pressure i s constant and c i s the isothermal speed of sound at the i n l e t of the pipe. Introducing the dimensionless temperature u, gives: 2 2 u + 2a ~ u - (x + 2a \ = 0 ; u = T/T (19) 2 2 Ο y y and the conditions for maximum mass flux i s : 2

2

y 2( f - In z

1

(x/u))

- / ζάζ/η(ζ) = 0 ?

ζ = P/P

Q

(20)

χ η (ξ) = [1 + A

a = 2

Cp

+ ν (2α+ν )/ξ ]α/(2α + y ) 2

2

2

2

/R

y u - x

2

- x 8u/3x = 0

(21)

Eqns (20) and (21) are solved simultaneously by the NewtonRaphson iteration with respect to the two unknown variab­ les y and x. The results are shown i n figure 2 where the choking pressure drop and the temperature are shown as functions of the pipe length. The deviation between the isothermal and adiabatic mass flux at zero pipe length reflects the ratio between the adiabatic and isothermal speed of pressure propagation. Further­ more, at a pipe length of about 100 diameters, the discrepancy between the various models to predict the mass flux i s not very significant. d. Isothermal flows with a series of restrictions. A series of restrictions may be a l i n e segment (between two nodes) with valves, o r i f i c e s , pipes with different lengths and diameters etc. If the pressure drop across this line segment i s below c r i t i c a l , the flow i n this l i n e segment w i l l be everywhere sub-

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

8.

Choked Flow in Gas Pipe Networks

ASBJ0RNSEN

183

sonic. According to eqn (20) the mass flux through element number i under isothermal conditions i s : x., y

2 i

/

=

dC/tf. + ln(x

/x ))

(22)

x. ι

Then the intermediate pressures are given by the set of equations expressing constant mass flow at steady state: 9 ο

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch008

A

y

i i

=

? A

?

WD.

L.

y

i+l i+l '

D

i

( 2 3 )

*

leading to: 2

2

2

X. τ — X. , φ

l - l

n

ι

" l W

χ

ο

ι

0

1 " f!+ 1η(χ./χ.) =

1

'.

* χ

η

=

B

Ρ

2 — X., τ

X.

if !

l+l + 1

n

+ ln(x./x

Λ'

β

1

= Α

Ιΐ

/ Α

i+1

) "

f 0 A

0

y

( 2 4 )

1

Eqn (23) i s a second order nonlinear difference equation the Jacobian of which i s easily established as a regular tridiagonal matrix with a dcminating diagonal, similar to system matrices found i n the simulation of d i s t i l l a t i o n columns. The analytical derivation of the Jacobian and the Newton-Raphson iteration i s t r i v i a l . In figure 3 i s shown an example vfaere the intermediate pressures are plotted as functions o f the total pressure drop across the l i n e segment. The example i s a r t i f i c i a l l y chosen such that a l l ε-parameters are the same, i.e. : = constant = 1 . 0 ;

2 i . e . [LA /D]

= constant

(25)

and a l l the γ-parameters are the same, i . e . the pipe cross sec­ t i o n increase as geometric progression: = constant = 1.2;

i.e. A

= 1.2 A -

(26)

Notice the approach to maximum mass flux. I f the t o t a l pressure drop increases, choked flow w i l l occur i n one of the restrictions along the line, usually the last. The normalized mass flowrate i s then: y

2

= (Ι-χ/ίε.+γηίχ./χ); y = W/(P A ) Q

2

ε.= f».β.; γ. = Α /Α ι ιι Ί ι+1'

o

2

1

where choking conditions s a t i s f i e s the c r i t e r i o n :

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

(27)

o

1 Ι Figure 3. Subsonicflowin a series of expanding pipes

Ρ ι

W g

Ω

3

2;

CO

0

I

1

H «

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch008

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Choked Flow in Gas Pipe Networks

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch008

ASBJ0RNSEN

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Figure 5. Sonicflowin a series of expanding pipes, rear pipe extension

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch008

3

I

i

CO

î

C

ι



8

H »

8.

ASBJJZJRNSEN

187

Choked Flow in Gas Pipe Networks

(28)

or equivalently:

At this stage one may continue with an analytical derivation of the mass flux with respect to the pressure drop: η n-1 , dx γ Σ (ε.+γ.ΐηίχ./χ.)) - (l-x ) ( Σ ( y , (29) i=l i=l i n n ±

2

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch008

where the n-1 derivatives i n the l a s t sum are computed from the n-1 equations specified by eqn (23) : 3x 3x

λ =

J

η

3φ ~lx

(30) ιη

Eqn (29) may be included into the Newton-Raphson iteration as the n-th equation to determine a l l the intermediate as well as the f i n a l pressure. This however, requires subsequent deriva­ t i o n of the extra row i n the Jacobian by the differentiation of eqn (29) with respect to the vector χ of a l l pressures. This leads to f a i r l y involved algebraic expression, so the quickest and safest method of calculating the choked flow conditions i n the l i n e segment i s by a simple single variable optimization of y from eqn (27) with respect to the f i n a l pressure. The vector χ i s computed from eqn (24) by the straight forward Newton-Raphson iteration for each step i n the single variable hillclimbing. In figure 4 and 5 i s shown the effect of inserting a longer pipeline i n a l i n e segment subject to choked flow. The configu­ ration of the expanding pipes i s the same as given by eqn (25) and (26), but the length of the front pipe i s changed frcm zero to ten times i t s o r i g i n a l value i n figure 4. In figure 5 the length of the rear pipe i s changed over the same range. As i t i s seen, the effects of the extra pipeline on the t o t a l mass flew i s not the same, and t h i s may be of v i t a l importance f o r safety valve and f l a r e installations as well as for the limiting choking capacity of pipelines i n general.

Conclusion By the use of extremely simple models for the gas flow i n pipelines, i t has been demonstrated how important the acceleration term becomes when sonic conditions are approached i n a gas network. This term i s usually neglected i n most design computations, t u t the simple examples i n this paper show that this may not be j u s t i ­ fied. The numerical approach and the computational algorithms may be further developed along the lines suggested i n this paper, and the problem of choking i s found to be a very significant one i n

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

188

COMPUTER

A P P L I C A T I O N S TO C H E M I C A L

ENGINEERING

f l a r e gas systems, safety r e l i e f systems and purge systems for emergency. Further experimental results may be reported at a l a t e r date. Acknowledgement. The author wishes to acknowledge the valuable comments made by T. Fannelop and 0. Jakobsen at the Institute of Aero and Gas Dynamics a t the university of Trondheim.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch008

L i s t of symbols A cross-section o f flow c speed of propagation of pressure transients c specific heat capacity a t constant pressure cj " " " " " volume D pipe diameter f f r i c t i o n factor i,j,k,m,o indices η number of elements i n a l i n e segment Ρ pressure R gas constant Re Reynolds number Τ temperature u dimensionless temperature ν linear gas velocity w mass flux W mass flowrate χ dimensionless pressure y dimensionsless mass flux, isothermal Mach number 3,γ,ε l i n e segment parameters as explained i n text 6 Kronecker variable, 0 or 1. μ gas viscosity p density Φ residual function ξ dimensionless pipe length coordinate ζ dimensionless pressure Literature 1.

2.

3.

Cited

Mach, R.S.H.: "Pipeline Network Calculations using Sparse Computation Technique." Chem. Engg Sci. (1974),29, pp 16291638. Gay, B. and P.E. Preece: "Matrix Methods for the Solution of Fluid Network Problems: Part I - Mesh Methods." Trans. Instn. Chem. Engrs, (1975), 53, pp 12-15. Gay, Β and P.E. Preece: "Matrix Methods for the Solution of Fluid Network Problems: Part II - Diakoptic Methods." Ibidum (1977) 55, pp 38-45.

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

8. ASBJØRNSEN

Choked Flow in Gas Pipe Networks

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch008

4.

189

Carnahan, B. and J.O. Wilkes: "Simulation of a General Piping and Pumping Network." CACHE Problem VI-4, pp 71-89. 5. Peterson, J.N., C.-C. Cheu and L.B. Evans: "Computer Programs for Chemical Engineers: 1978 - Part 4." Chem. Engg. (1978), Aug. 28, pp 107-115. 6. Abramson, B.: "A Guide to Network Analysis Programs." British Gas Corporation, LRS Τ 177, (1974) 7. INTERCOMP Resource Development and Engineering, Inc.: "SSTRAN, Steady-State Gas Transmission/Gathering System Model." (1974). 8. Bird, R.B., W.E. Stewart and E.N. Lightfoot: "Transport Phe­ nomena" John Wiley, New York, 1960. 9. Moody, Trans. ASME, (1944), 66, pp 671-684. 10. Perry, R.H. (ed): "Chemical Engineers' Handbook." Fourth Ed. McGraw-Hill, New York, (1963). 11. Churchill, S.W.: "Friction-factor Equation Spans All Fluidflow Regimes. " Chem. Engg, (1977), Nov. 7, pp 91-92. 12. Schmidt, E.: "Einführung in die Technische Termodynamik." Springer-Verlag, Berlin (1953).

RECEIVED November 5, 1979.

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

9 Reaction Path Synthesis in Industrial Chemistry R. B. AGNIHOTRI AAA Technology, Houston, TX 77036

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch009

R. L. MOTARD Department of Chemical Engineering, Washington University, St. Louis, MO 63130

Many industrial researchers would like to have the capability of outlining the various alternative routes a process could take. Some would like to predict all the products or byproducts formed in a process while others might be interested in exploring the different ways to synthesize a particular compound. In recent years the field of computer-aided organic synthesis has become increasingly sophisticated. Chemists, in conjunction with computer scientists, are trying to construct synthetic steps leading to the formation of complex molecules from simple starting reactants. These attempts fall more or less into two broad categories (1, 2) i) the direct-associative and ii) the logic centered approach. In the direct-associative approach the chemist has available a number of subunits which he can bring together using standard laboratory reactions with which he is already familiar. This empirical approach is obviously limited to known reactions and subunits. The logic-centered approach on the other hand consists of the generation of sets of intermediates which form a synthetic tree which is used to lead to the target molecule. The different branches of this tree are the alternative routes one would choose or reject. In practice, most chemists use an approach which is a mixture of both. A number of different systems have been developed to conduct computer-aided organic synthesis. Of these, one of the most extensive projects is LHASA (3 - 11). The method starts from a target molecule and derives a set of precursor molecules which can be expected to be converted to the target by one synthetic reaction or a simple sequence of reactions. Each precursor molecule so generated serves as the next target and the procedure is repeated, thus generating a tree of synthetic intermediates. Each precursor is somewhat simpler than its parent target molecule. The analysis terminates when those precursors are found which are considered to be relatively simple or readily available. This analysis is termed "retrosynthetic" or "antithetic" because it runs counter to the laboratory route which is termed 0-8412-0549-3/80/47-124-193$05.00/0 © 1980 American Chemical Society In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch009

194

COMPUTER

APPLICATIONS T O C H E M I C A L ENGINEERING

"synthetic." A process in the antithetic direction is called a "transform" while a process in the forward synthetic direction is a "reaction." The chemical transforms are the heart and soul (11) of LHASA which has a database of over 600 common chemical reactions. This feature, i r o n i c a l l y , shows i t s limitations. The empirical information about known chemical reactions limits the generation of synthetic pathways. The value of LHASA, however, is i n i t s a b i l i t y to investigate a l l possible known synthetic routes, a task which a chemist would find exceedingly tedious. Gelernter et a l (12, 13) developed a program SYNCHEM to produce reasonable problem-solving trees containing a high density of complete and satisfactory synthesis. Like LHASA, this also depends a lot on empirical chemical transforms. Hendrickson's (14, 15, 16, 17, 18) approach is much more systematic. An organic molecular structure is viewed as a collection of functional sites arranged on a skeletal l a t t i c e . The most important step in synthesis is skeletal construction. Creating functionality by attaching or replacing functional groups, i . e . functionalization steps, are primarily necessary to prepare the next construction step. Ideal synthesis would eliminate discrete refunctionalization steps altogether since each construction step would leave just the right functional groups on the skeleton for the next construction step. Hendrickson has invented a complete library of generalized reaction paths, independent of empirical named organic chemistry, to be executed without computer assistance. With his notation and strategy he can teach organic synthesis methods. SECS(19, 20) was developed by Wipke and coworkers to focus on stereochemical features originally missing i n LHASA, however stereochemical features were introduced into both programs at the same time. REACT (21) uses LHASA chemical transformations to generate complete reaction paths which are constrained to use industrially available intermediates whose prices appear in the Chemical Marketing Report. A basic difficulty that we find with the LHASA - SECS - REACT strategies is that the reaction paths are more typical of a d i s crete step-wise laboratory procedure. The use of named organic chemical transforms leads to a bench scale procedure. Reactions of industrial interest on the other hand are generally carried on in one to three continuous steps, with a minimal use of reagents and purification steps. Solid catalyzed vapor or liquid phase reactions are favored. Intermediates and raw materials are far more limited i n variety on the scale of industrial production. We are also dealing with simple molecules. Frequently, the issue is simply how can one produce a desired set of products from limited available set of raw materials. Reaction paths should be short and highly selective otherwise the purification steps destroy the economics of the process. Separations, principally d i s t i l l a t i o n , already consume 50% of the energy used in the petrochemical industry.

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch009

9. AGNiHOTRi

Reaction Path Synthesis

AND MOTARD

195

Our goal i s to identify, on the basis of thermodynamic f e a s i b i l i t y , the most effective paths between specific reactants and specific products. Side reactions which are equally or more feasible than the desired reaction steps are candidates for inhibition either through an appropriate choice of operating conditions or the design of a catalyst or other reaction technol­ ogy. Since we do not wish to be hampered in the search for reaction paths by an allusion to laboratory-based organic chemistry we are attracted to the work of Ugi and co-workers (22 - 28) as the most powerful general representation for reac­ tion synthesis. Since the CICLOPS, EROS and MATCHEM programs were not available we developed our own building block package based on Ugi's work, called CHIRP, as the inner core routine for the ultimate total system that we envision. This paper is a report on the f i r s t phase of the project. Connectivity Matrix Approach to Organic Synthesis Ugi et a l (22, 23, 24) perceived an underlying mathematical model of constitutional chemistry (24) in that there was some order i n the relations between chemical systems. They extended the concept of isomerism (of molecules) to isomerism of ensembles of molecules (EM). The left and right sides of chemical equa­ tions refer to individual EM belonging to the same family of isomeric ensembles of molecules (FIEM) i . e . a l l chemical reac­ tions occur within the same pertinent FIEM. The atoms in a FIEM remain the same, the relationships between them may change to give different isomeric EM. A multistep synthesis can be looked upon as a sequence of isomeric ensembles of molecules which begins with the set of starting materials EM and ends with the target molecule and a l l byproducts which are formed, EM£. The chemical constitution of an EM is represented by a "be matrix ["bond-electron" matrix]. A be-matrix Β representing an EM(B) consisting of η atoms is an nXn matrix with integral entries where the off-diagonal entries b-j represent covalent bonds between the atoms A and A j , and the diagonal entries correspond to the numbers of free unshared valence electrons on the atom A - . It is easy to see that Β is symmetric, that the row/column sums, b i = T.b±A = Σb are the numbers of valence j j electrons belonging to the atom A and the cross sums c = 2b - b u are the overall numbers of electrons in the valence shell of the atom A . Two be-matrices represent the same EM if" they are interconvertible by permuting the atom indices i . e . permuting the rows/columns. If Β is the be-matrix for the starting materials, and Ε the be-matrix for the end products in a chemical reaction, the chemi­ cal reaction B->E is represented by a reaction matrix R = Ε - B. Since R is the difference of two symmetric matrices, i t is also 11

λ

J

J

1

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

196

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch009

symmetric. The entries r j = r j of an R-matrix indicate which bonds are made and broken as well as the changes in the distribu­ tion of free electrons. The off-diagonal entries r-jj ( i φ j) indicate how many bonds between A- and Aj are made (+) or broken (-). The diagonal entry r indicates how many free electrons A-£ gains (+) or loses (-). Each reaction matrix represents a class of chemical reactions with the same electron redistribution pattern i . e . an R matrix is an "electron-pushing" device. Each reaction matrix represents s type of chemical reaction which i s independent of the individual reaction systems. The application of the be-matrices and R-matrix i s i l l u s ­ trated by the following example (25) of the conversion of α-hydroxy acetonitrile (1) into i t s components (2) and (3): : 0, — H H

6-?3-

C

c

4 =

N

2

:

+

H

6-?3

+

H

5

— 4 = C

N

2

:

"7

Ί

α-hydroxy acetonitrile(1) 1234567

Formaldehyde(2) 1234567

Hydrogen Cyanide(3) 123

4567

Γ

1 2 3 4 5 6 7 Β - E

(

1

)

R

Ε-

E

(

2

)

+

(

3

)

[The zeroes have been omitted from these matrices.] Since an EM cannot have negative integer entries i t i s obvious that only that R matrix can act on the matrix Β in which r-jj has negative integers such that | r y | < b - j . This f i t t i n g requirement for an R matrix can be used in the manufacture of R-matrices. Description of the CHIRP Program As a preliminary step towards computer-aided investigation of reaction paths where reaction conditions could be prescribed to satisfy the needs of a particular process, i t was felt necessary

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch009

9.

AGNiHOTRi AND MOTARD

Reaction Path Synthesis

197

to develop a procedure to generate alternate reaction paths many of which may not be obvious i n non-aided design. CHIRP (Chemical Engineering Investigation of Reaction Paths) is the i n i t i a l outcome of such efforts and serves to find alternate reaction paths, products and byproducts for a given process. Our objective is to look at a l l the possible products or byproducts emanating from a given reactant set and undergoing a given process. Once we have the various paths leading to the different products we can choose to promote some paths and to inhibit others by influencing the reaction conditions. This is essentially a forward search strategy. We did not want our choices to be limited by the data input and bias of the user, because that would detract from the value of the free search. Ugi s (24) R-matrices, therefore, offered us a valuable tool to investigate the tremendous number of reaction paths, each a result of a simple algebraic manipulation of the atoms and bonds contained in a reactant set. In searching for a notation for the representation of chemical compounds we found that both the Wiswesser Line Notation and the IUPAC ( i . e . Dyson) notation were inadequate to the problem of recognizing unknown molecules generated by structural rearrangements. The representation of molecules is thus based on the concept of a connectivity matrix of atoms as described by Ugi (22). This representation allows us to code a given molecule in a unique linear form suitable to computer storage, to apply transformation ( i . e . reactions) on the molecule and then to recognize the product molecules by comparing them against a catalog of compounds. In our system, chemical reactions correspond to the selective manipulation and rearrangement of the bonds between atoms in the reactant set, i . e . reactant matrix. This rearrangement is directed by some preselected R-matrices. The resultant product matrix is f i r s t sorted to yield separate and distinct product molecules that are subsequently checked against the compound catalog. The system is flexible enough to accommodate new molecules that may be formed during a reaction but which do not currently exist in the compound catalog. Concurrent with the process of reaction and product formation are the evaluation and restriction procedures built into CHIRP. These procedures are designed to: i) eliminate those reactions that generate compounds deemed unstable on chemical valence c r i t e r i a , i i ) prevent formation of redundant product sets. Specifically, a) no product sets which contain molecules already present in the reactant set are saved and b) product sets that are identical to previously generated sets are eliminated, i i i ) eliminate those reactions which involve reactant sets (or their equivalent atoms) that have already been reacted. 1

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

COMPUTER

198

APPLICATIONS T O C H E M I C A L ENGINEERING

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch009

iv)

eliminate reactions which involve a) replacement of an atom set by an equivalent atom set b) replacement of a monatomic element by one of the same species As is evident, these restrictions serve to limit the pro­ fusion of unnecessary and redundant computer output. The modular structure of the program permits us to add to or sub­ tract from the current b u i l t - i n limitations depending on new available information. Despite the limited number of R-matrices we have made a v a i l ­ able for reaction and the restriction procedures outlined above, the number of products generated is tremendous. In order to restrict these reactions along f a i r l y identifiable patterns i t was felt necessary to channel reactions along pre-ordered lines. The R-matrices that can act on a reactant matrix Β must contain negative integers r j j such that | r j | < b-jj. The nega­ tive entries in R represent the bonds broken in the reactant set represented by B. We can restrict reactions by specifying which bonds must be broken in any reaction. We can also augment the reactant set by a specified species such as hydrogen or chlorine, etc. These two above requirements are specified by a 'reaction block.' There are 9 reaction blocks currently in the system. These are hydrogénation, cracking, oxygenation, alkylation, hydration, halogenation, dehydrogenation, dehydration and dehydrohalogenation. Every reaction must involve the breakage of the bonds that the applicable reaction block has flagged as breakable. The reaction block restriction is very flexible and new reaction blocks can be added to the system. The system has the capability to carry on the reaction to the desired number of stages. The f i r s t stage is the application of the R-matrices to the starting reactant set. The specified reaction block w i l l cause a certain number of bonds to be flagged as breakable and may add some additional desired reactants. After the reaction is over, we w i l l obtain many product sets, each such set having one or more product molecules. The question now is what constitutes the reactant set for the second stage? In a closed environment many reactions are possible, reactions involving each reactant only, a l l reactants, reactant-product, productproduct, etc. A suitable choice is to isolate those product sets that are thermodynamically the most feasible in terms of least Gibbs free energy of reaction. The user can specify the number of such sets. In each of these sets we select a number of molecules that are the largest in the product set. The assumption here is that size is an indicator of the complexitv of the molecule and that the user is interested in the more complicated molecules to reduce the length of the reaction path. These selected molecules are then stacked in the reactant pile for the next stage. In the next stage, each of these molecules undergoes the same reaction that the parent reactant set underwent, e.g. i f the

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch009

9.

AGNiHOTRi AND MOTARD

Reaction Path Synthesis

199

parent reactant set was one molecule of 1,3 butadiene and the reaction block desired was hydrogénation with the addition of one (user specified) molecule of H 2 , one typical product would be 1-butene. In the next stage, 1-butene would be combined with one molecule of hydrogen to give one molecule of η - b u t a n e . This pro­ cedure is repeated at every level. The program terminates when either i) the specified number of stages are completed or i i ) there are no more available compounds to be placed in the reac­ tant pile for the next succeeding level (stage). The second alternative stems from a situation where either the set of break­ able bonds is empty of when no products were formed at the previous level. Two items are central to the CHIRP system. These are i ) the compound recognition algorithm and i i ) the R-matrices that are applied on reactant sets. These are discussed in turn. Compound Recognition When we 'react the starting molecules and obtain a product set i t is imperative that the product molecules be isolated and numbered in a unique manner so that they can be recognized. Previous researchers (25, 27) have presented algorithms for linear ( i . e . acyclic) molecules and the latter paper (27) gives an example for a simple ring molecule. We have developed an algo­ rithm for a unique representation of molecules. It is divided into two parts, one for acyclic molecules and the other for molecules containing rings. The acyclic part is inspired partly by the Wiswesser Line Notation in that i t isolates the longest chain and partly by the Barkley and Motard (29) technique for finding tear streams in a complex flowsheet in that successive precursors are found for each atom, the last precursor being the center of the longest chain. Details of this method are given in Agnihotri (30). The algorithm for compounds containing rings is extremely versatile. It can uniquely number atoms i n any ring system. There are no restrictions on the number or order ( i . e . number of edges) of the rings. The rings can be simple, fused, spiro, bridged, etc. or they may have linear segments in them. There is also the advantage that we can easily represent, recog­ nize and number resonant aromatic structures without any loss of generality in positioning the double bonds contained therein. Again, details are given in the above reference (30). 1

Classification of R-Matrices Since an R-matrix represents an electron or bond redistribu­ tion pattern, i t can represent not only one specific reaction but a general class of reactions. Because of the properties of R-matrices, they may be grouped in several classes. Brandt, et a l (28) have defined an R-category as an equivalence class of chemi­ cal reactions which have i n common the same electron relocation

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch009

200

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

pattern and certain features of the participating bond systems. An irreducible R-matrix is one that does not have a row/column containing a l l zeroes. Any two chemical reactions which are represented by the same irreducible R-matrix belong to the same R-category. The Brandt categories are characterized by R-matri­ ces which may have up to three off-diagonal pairs of positive and negative entries. We have concentrated on a restricted chemistry (24) and the constraints imposed on the R-matrices involved therein are: 1) The R-matrix is symmetric 2) The diagonal elements = 0 (no unshared electron redistribution 3) The sum of every row/column is zero Since the off-diagonal entries r-jj ( i φ j) represent the change in bonds between atoms A± and A j , the absolute sum of a l l negative entries equals the absolute sum of a l l positive entries, i . e . the number of bonds broken equals the number of bonds made (= M). In restricted chemistry, no atom carries a net charge. Hence any diagonal entry for an atom in a BE matrix w i l l be the free pair of electrons the atom possesses. Thus, the diagonal entry for Nitrogen could be 2 whereas for Hydrogen, Chlorine and Carbon, etc. i t is zero. As a consequence, a reaction matrix in restricted chemistry w i l l have a l l diagonal entries zero and each row sum equal to zero. Dugundji and Ugi (24) came to the following conclusions about R-matrices in restricted chemistry. If LR(n) be the set of a l l η χ η symmetric integral matrices with a l l diagonal entries zero and each row sum equal to zero, then LR(n)

is a free Abelian group of rank ( ~-*). n

This means that there are — —

n

distinct basic reactions in

the restricted chemistry of an η-atom FIEM, a l l others follow by linear combination. This criterion leads to another obvious theorem that there is no nontrivial restricted reaction matrix for η < 3. Hence, the lowest order possible is for η = 4. Using these conclusions, we have classified irreducible R-matrices in restricted chemistry into R-categories. The termi­ nology is so chosen as to conform with that of Brandt, et. a l . (28). The nomenclature for describing an R-category is given by RMMNi, where M: Number of bonds broken/made. N: Number of atoms involved in the reaction. i : An integer denoting a sub-category i f more than one exist. In the following discussion, (we w i l l develop R-categories by a process of logical deduction). Henceforth, we w i l l refer to an irreducible R-matrix simply as an R-matrix. A l l R-matrices that can be obtained by a simple row/column transposition f a l l into the same R-category. There are some general conditions governing the composition of an R-category. The designated bond associated with

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch009

9.

AGNiHOTRi

201

Reaction Path Synthesis

AND MOTARD

each participating atom has to be broken. If not, that bond is redundant because i t w i l l not contribute to the R-matrix, Also, since any atom has to have bonds broken i t w i l l have to have the same number of new bonds made, or else the sum for the row/ column corresponding to that atom w i l l not equal zero. A l l desig­ nated atoms have to participate in the R-matrix otherwise the R-matrix is reducible by eliminating n u l l columns and n u l l rows. There are certain existence requirements for an atom set of an R-category. We w i l l refer to valency of an atom.as the number of i t s designated bonds participating in the R-matrix. Other bonds associated with the atom but not taking part in the reaction are of no concern to us. In an R-category RMMN, let S = number of monovalent atoms S 2 = number of divalent atoms S = number of r-valent atoms r

S

+ 2 S + 3 S + . . . . + rS 2

1

3

r.

for r < M

2M

r = Σ ±S

(1)

±

i=l Also, Si + S

2

+ . . . .

+ S

r

= Ν for r < M

r or,

Ν= ΣS

(2)

±

i =1 Subtracting (2) from (1)

yields

r 2M - Ν = Σ (i-1) S for R < M (3) i=l Taking into consideration the number of atoms participating in the vast majority of reactions and the fact that higher Rmatrices can be represented as combinations of simpler R-matrices (25), we have limited Ν to 6 and M to 4. Given that the minimum value of Ν can be 4, the minimum value of M has to be 2 since for Ν = 4 four atoms are involved and so the minimum number of bonds that can be broken is 2. We w i l l now investigate the R-category, R224. ±

R224 M =2 Ν=4

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

202

COMPUTER

APPLICATIONS

TO CHEMICAL

ENGINEERING

Using eqn (3), 2M - Ν = (2) (2) - 4 =

0

= S + 2S

+ . . .

?

(r - 1) S

J

•.

S2

=

S

=

. . .

=

=

r < M

0

Only monovalent atoms areinvolved...S

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch009

Γ

1

=Ν=4

Let us say we have four atoms, A, B, C and D. Assume that these four atoms are arranged in a configuration that we w i l l refer to as the reactant set. Then a product set is simply another configuration of these four atoms. The new con­ figuration does not contain any of the relationships (bonds) of the old one but has an entirely different bond structure. Thus, the transformation from one configuration to another is actually the R-matrix which has broken 2 bonds and formed 2 new ones in an atom set involving 4 monovalent atoms. This R-matrix obviously belongs to the category R224. If we have a reactant set that cannot be arranged in another configuration, no R-matrix is possible. An interchange of the rows/columns of an atom set creates a situation where new configurations are possible. We also have the p o s s i b i l i t y of the same atom set arranged i n different struc­ tures. Given an atom set for a given RMMN we can easily find the various possible structures by using a simple enumeration tech­ nique. Actually these structures cause the various sub­ categories within a given R-category. Structure Generation for the R224 category is illustrated below: R224: We have 4 atoms, A, B, C and D, a l l monovalent. We w i l l l i s t their bonds in linear order such that 1 represents a single bond between the 2 neighboring atoms, 2 represents a dou­ ble bond, 0 for no bond and so on. The valency of an atom is thus the simple addition of the bonds adjacent to i t For R224, since we have 4 atoms, i) No two adjacent entries can have a sum greater than 1 since a l l atoms are monovalent ii) The number of such bonds can at best be 3 i . e . N-1 iii) The extreme positions have to be nonzero iv) No two adjacent entries can be zero. For a given ordering of the atoms, the p o s s i b i l i t i e s for bond positions P- are: A B C D * PI ' P2 * P3 • ....1. 0 . 1

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

9.

AGNiHOTRi

AND

203

Reaction Path Synthesis

MOTARD

This is the only structure possibility that meets the condi­ tions set above. This translates to A

Β

C

D

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch009

This is the only structure possible. Can we obtain other configurations by reordering the various atoms involved? The problem is one of selecting distinct 2tuples from a set of 4 elements which lead to 6 ways of selecting 2 distinct elements from 4. Since by selecting 2 elements we automatically select the remaining 2 elements, the number of distinct sets is 3. The 3 distinct configurations are (1) (2) (3)

A- Β A- C C- Β

C-D Β-D A-D

The bonds i n each of these sets are distinct from the other two. We can now safely say that R224 exists.

In the transforma­

tion A - B + C - D -> A - D + B - C the R-matrix is given by: A V Β

A

B C D -1 +1

-i\

C D

+1 -1

+1 +1

-1

If we enterchange columns and rows C with D but not the labels we w i l l get another product set and hence another R-matrix. Both of these R-matrices, however, belong to the same R-category R224. There can be no cases where Ν can be greater than 4 in R22N because i f we had 5 atoms, one would be redundant and would be deleted to yield a matrix of order 4. Similar considerations lead to the generation of the follow­ ing additional R-categories: R335, R336, R444, R4451, R4452, R4461, R4462, and R4463. Typical reaction patterns are: R335: R336: R444: R4451: R4452:

I I I I I

= = =

J J J J J

+X +κ +X +X +X

- Y - χ + = Y -> - Y - Y -

ζ I - Y I Y - ζ I = Y +J ζ -ν Y = J ζ χ - I

- J + - K + = X + X- Y -

X - ζ J - Y I - ζ J - ζ

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

204

COMPUTER

R4461: R4462: R4463:

APPLICATIONS

TO CHEMICAL

ENGINEERING

I - J - K +X- Y- Z->I-Y-K +X- J - Z I =J +K- X+ Y - Z->K-I-X +Y - J - Z I - J - K + X - Y - Z + X - J - Y - I + K - Z

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch009

Example A typical result of the current program involves the oxygenation of propylene at 400K. R224, R335 and R336 are not applicable. Using R444 the product set is formaldehyde and acetaldehyde with a reaction free energy of -74 Kcal. Using R4451, there are 7 product sets of which two have the most negative free energy: vinyl alcohol and formaldehyde (-199 Kcal); acrolein and water (-85 Kcal). This completes the f i r s t stage reaction steps. At the second stage, the oxidation of vinyl alcohol yields formaldehyde and formic acid (48. Kcal) using R444 and five product sets using R4451 of which only ketene and hydrogen peroxide (118 Kcal) maintains an overall reaction free energy that is negative. The oxidation of acrolein yields 9 product sets, only two of which are of interest: vinyl alcohol and carbon dioxide (-237 Kcal); ketene and formic acid (-83 Kcal). The thermodynamically favored reaction paths for one- or twostage oxidation of propene are: °2 1.

propene

• vinyl alcohol + formaldehyde (-199Kcal)

2.

propene

• acrolein + water • vinyl alcohol + carbon dioxide (-322 Kcal)

3.

propene — - — • acrolein + water — • ketene + formic acid (-168 Kcal)

Conclusion In CHIRP, we have essentially used a forward breadth-first search. This is necessary i f our goal is to look at the various product alternatives, any of which could be promoted (or inhibited) by a proper choice of reaction conditions. Today we can vary only the temperature to guage the effect on the free energy of reaction. We hope, however, that CHIRP when completed should be able to suggest other reaction conditions, including catalysts, for a process that converts some known starting materials to some desired products. Care must be taken to ensure that a proper b a l ance is maintained between the empirical constraints inserted to make the system more accurate and the a b i l i t y to search for a wide range of alternatives.

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

9. AGNIHOTRI AND MOTARD

Reaction Path Synthesis

205

Acknowledgement This work was supported i n part by NSF Grant ENG 75-21544. The authors are grateful for the collaboration of Professor James F. Richardson at the University of Houston, Department of Chemical Engineering. Literature

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch009

1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12.

13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27.

Cited

Thakkar, A.J., Topics Curr. Chem., 1973, 39, 3. Corey, E.J., Wipke, W.T., Science, 1969, 166, 178. Corey, E.J., Quart Rev. (London), 1971, 25, 455. Corey, E.J., Wipke, W.T. Cramer, R.D., Howe, W.J., J. Amer. Chem. Soc., 1972, 94, 421. Corey, E.J., Wipke, W.T. et al, Ibid, 1972, 94, 431. Corey, E.J., Cramer, R.D., Howe, W.J., Ibid, 1972, 94, 440. Corey, E.J., Petersson, G.A., Ibid, 1972, 94, 460. Corey, E.J., Howe, W.J., Pensak, D.A., Ibid, 1974, 96, 7724. Corey, E.J., Howe, W.J., et al, Ibid, 1975, 97, 6116. Corey, E.J., Jorgensen, W.L., Ibid, 1976, 98, 189. Pensak, D.A., Corey, E.J., Compter-Assisted Organic Synthesis, ACS Symposium Series, 1977, 61, 1. Galernter, H., Sridharan, N.S., Hart, A.J., Fowler, F.W., Shue, H.J., "A application of artificial intelligence to the problem of organic synthesis discovery", Technical Report, Depts. of Computer Science and Chemistry, SUNY at Stony Brook, August, 1971. Galernter, H. et al, Topics Curr. Chem., 1973, 41, 113. Hendrickson, J.B., J. Amer. Chem. Soc., 1971, 93, 6847. Hendrickson, J.B., Ibid, 1971, 93, 6854. Hendrickson, J.B., Ibid, 1975, 97. 5763. Hendrickson, J.B., Ibid, 1975, 97, 5784. Hendrickson, J.B., Topics Curr. Chem., 1976, 62, 49. Wipke, W.T., Computer Representation and Manipulation of Chemical Information, ed. W. T. Wipke, et al, Wiley, 1974, p. 147-174. Wipke, W.T., Braun, Η., Smith, G., Choplin, F., Sieber, W., Computer Assisted Organic Synthesis, ACS Symposium Series, 1977, 61, p. 97. Govind, R., Powers, G., Ibid, 1977, p. 81. Ugi, I., Gillespie, P., Angew. Chem. Intern. Ed., 1971, 10, 914, 915. Ugi, I., Gillespie, P., Gillespie, C., Trans. N.Y. Acad. Sci., 1972, 34, 416. Dugundji, J., Ugi, I., Topics Curr. Chem., 1973, 39, 19. Blair, J. Gasteiger, J., Gillespie, C., Gillespie, P., Ugi, I., Tetrahedron, 1974, 30, 1845. -, Computer Representation and Manipulation of Chemical Information, Ed., W.T. Wipke et al, Wiley, NY, 1974. Gasteiger, J., Gillespie, P., Marquarding, D., Ugi, I., Topics Curr. Chem., 1974, 48, 1.

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

206 28.

29. 30.

COMPUTER

APPLICATIONS T O C H E M I C A L

ENGINEERING

Brandt, J., Friedrich, J., Gasteiger, J., Jochum., Schubert, W., Ugi, I., Computer Assisted Organic Synthesis, Ed. W.T. Wipke and W.J. Howe, ACS Symposium Series, 1977, 61, 33. Barkley, E.W., Motard, R.L., The Chem. Eng. Jour., 1972, 3, 265. Agnihotri, R.B., PhD Dissertation, 'Computer-aided Investigation of Reaction Path Synthesis', University of Houston, 1978. November 5, 1979.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch009

RECEIVED

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

10 Design of Optimizing Control Structures for Chemical Plants GEORGE STEPHANOPOULOS—Department of Chemical Engineering and Materials Science, University of Minnesota, Minneapolis, ΜΝ 55455 YAMAN ARKUN—Department of Chemical and Environmental Engineering, Rennselaer Polytechnic Institute, Troy, NY 12181

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch010

MANFRED MORARI—Department of Chemical Engineering, University of Wisconsin, Madison, WI 53706 Control objectives for a chemical process originate from certain regulation tasks (i.e. product quality control, material balance control, safety, environmental regulations, etc.) and economic objectives (i.e. optimizing the economic performance). Such a classification of control objectives automatically for­ mulates the different design activities for the regulatory and optimizing control structures. In the previous process control structure synthesis methods (1,2,3,4), the distinction between the different classes of control objectives and its impact on the design of the plant control structure have not been addressed. Articles representing the industrial views have recently indicated that the steady­ -state optimizing control constitutes the most fruitful control practice in the chemical process industry (5,6,7,8), whereas regulation of the chemical process units is accomplished by the practicing engineers with satisfactory degree of acceptance. Nevertheless, there has been no systematic approach towards the design and implementation of optimizing control structures. In the absence of any theoretical foundations and practical ramifi­ cations, the designer relies on his operating experience and intuition to select an optimizing control policy without exploring all the viable alternatives. In the present paper, we will lay down the theoretical foundations for the synthesis and design of steady-state optimizing control structures for chemical processes. The implementational problems will be also addressed to develop practical control strategies for the on-line application of the optimizing controllers. Optimum design of chemical processes dictates that the optimal operating point of a well-designed plant lies at the intersection of operating constraints (8-15). Furthermore, current industrial practice indicates that the optimal operating point switches from the intersection of one set of active constraints to another as process disturbances change with time (8-18). Such a dynamic evolution of the process operation

0-8412-0549-3/80/47-124-207$05.00/0 © 1980 American Chemical Society In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

208

COMPUTER

APPLICATIONS

TO CHEMICAL

ENGINEERING

constitutes the major thrust for the successful implementation of an optimizing control strategy. Formulating the Optimizing Control Problem for a Single Unit The optimization problem for the single unit considered as a self-standing plant is to determine the optimal operating point when the values of a set of external disturbances change.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch010

The Steady State Optimization Problem. For a set of slowly varying external disturbances, we assume that the process is at pseudo-steady state. Then, the following static optimization problem can be formulated: Min m

Objective function

(x,m,d)

subject to (Pl)

h(x,m,d) g(x,m,d) r(x,m,d) -d + d*

=0 £b = r =0

System's State equations Process Design Constraints Regulatory Control Tasks Disturbance Specifications

d

where χ is the vector of states, m i s the vector of manipulated variables, and d is the vector of "slow" disturbances with major economic impact on the optimal process operation. Selection of Process Controlled and Manipulated Variables. At the calculated optimum X* = (x*,m*,d*) of the above problem (Ρχ), some of the inequality constraints w i l l be active. The regulatory control objectives and the active design constraints ( i . e . g ) at the current optimum w i l l constitute the class of primary controlled variables denoted by c , i . e . p

r (x,m,d)

p c (x,m,d)

g (x,m,d) A

'Ρ c reg c „ opt P

Some manipulated variables, m , w i l l be selected by the algorithm in (19) to control c , which w i l l partition the vector of the ~T\ manipulated variables: m ] with dim(m ) = dim c D D

p

D

[m

The available extra degrees of freedom at the optimum are: dim (in) = dim(m) - dim(c ) P

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

10.

STEPHANOPOULOS E T A L .

Optimizing Control Structures

Let us now define;

209

h(x,m)

χ d

f

and

c (x,m) -

=

- d + d* The Lagrangian Formulation and the Kuhn-Tucker Conditions. Formulate the Lagrangian function for the problem ( Ρ χ ) , L(x,m,X) = φ(χ,ίη) - À f(x,m) T

g (x,m) IA

is the vector of Lagrange multipliers for the equality constraints f(x,in) = 0, is the vector of Kuhn-Tucker multipliers for the IA inactive design constraints g (x,m) < 0.

where;

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch010

A

IA

The Kuhn-Tucker conditions for the minimum are: IA m

dm

am

dm

W

V

λ

ΙΑ "

0

χ

" 3x

IA IA" IA (8

b

)

λ

3x

ΙΑ=°

r(x,in)-r = 0 -d + d* = 0 h(x,m) = 0 d

* 0; X

λ

g(x,m) S b

°

=

3x

IA

Hence at the design optimum X*:

8

= b A

A

>

g

IA IA'

C

J

) + T.(t ) 2

N

J

"V

N

(

2

6

)

gives -At/a.(t )

y

( 2 5 )

A

) + Τ (t ) 2

F

T (t ) = p

C

J

ν

" y v i j

η

)

e

3

ι

"ι V V l Σ

n

+

-At/a.(t ) w

3

J

1

1

+

2ΓΤΓ7 3 η



e

J

n

)

π -At/a (t ) 1

( 2 ? )

With these finite difference approximations the solution can­ not be achieved in one step but the complete temperature and de­ v o l a t i l i z a t i o n profiles must be calculated repetitively. As indi­ cated in Eqs. (22), (23) and (27) the right hand sides have varia­ bles which must be evaluated at the same time mode as the left hand side. Instead of a simultaneous solution an iterative approach was taken where the right hand sides can be evaluated by the values obtained in the most recent iteration. The complete calculation procedure can be summarized as follows:

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

11.

Iterative Approach

KAYIHAN

Step 1.

227

Divide total time into NP equal increments, guess a temperature profile for each particle size, and set v.. =0.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch011

A good i n i t i a l guess is the temperature profile that would occur i f there were no devolatilization reactions, but only heat transfer effects on p a r t i cles. Step 2.

Evaluate Eqs. (11), crements.

(12) and (13)

for a l l time i n -

Step 3.

Evaluate Eq. (23) for a l l particle sizes, reactions and time increments.

Step 4.

Update temperature profiles through Eq. (27).

Step 5.

Stop i f convergence is achieved; otherwise, go to Step 2.

This procedure had converged in 4 or 5 iterations to four significant figures for a l l cases tried in this study. The accuracy of the calculations depends on the time increment At because the finite difference approximations become more accurate as At gets smaller. A summary of some iteration results and a comparison between this technique and the numerical integration with Gear's method w i l l be presented after the following discussion on the s t a b i l i t y of the temperature equation. Stability of the Temperature Equation. Consider Eq. (27) where T j ( t ) is dependent on T j ( t i ) and T j ( t ) computed by the previous iteration through the f i r s t term on the right and through bj(t ). The latter can cause i n s t a b i l i t y in the explicit iterative calculations for some choices of At. F i r s t , consider an idealized case where c = C and Ah = 0. Then b j ( t ) = 0 and Eq. (27) takes the form -At/a.(t ) T.(t ) - T.(t J e -At/a.(t ) T (t )(l - e ) (28) n

n

n

n

R

3

3

n

3

+

n

p

n

n

X

3

n

n

For this ideal case the iterations for T j ( t ) w i l l be stable for a l l choices of At. Therefore, this approximation is a good start for exploratory reactor design calculations because of its simp l i c i t y and s t a b i l i t y . Usually, however, the above assumptions w i l l not hold. To establish a safe At for stable calculations observe that b j ( t ) in Eq. (27) is on the order of pr. h [c - C)T.(t - ihl 3k j n-r R n

n

2

v

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

228

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

Substituting this into Eq. (27)

T.(t ) * T . ( t . ) j

η

3

n-1 2

3 - Σ v..

{e-

η

(t

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch011

p

j V

A t / a

J(l

(

J

ι

* T (t )(l - e

gives

j η -At/a (t ) 1>

J

- - Γ Τ

+

-At/a

n

J

(t )

pr ) - -gjL- Α Η [ Σ ν . . ( κ

-At/a -Σν..(ΐ

ij' n-l

i

JK

2a

L—)

j(V

e

ν (

1-

(t ) 3

n

(29)

A safe choice for At w i l l be At * 2a.(t

3

η

)

(30)

This would be restricted by the smallest particle size, j = 1, and by the extent of devolatilization. Usually, the volatile matter of coal is not more than 50% by weight. Therefore, choose cpr 2

With physical properties given in Table I, this becomes At = 1944 Γ and for r

χ

2

= 10 pm

At = 0.0019 sec or NP = 514 peints for 1 second integration time. While, for r

= 5 ym -4

At = 4.9 χ 10

sec

and NP = 2058 points. Because i t is necessary to adjust the time increment according to the smallest particle size the number of discrete points, NP, may be unnecessarily high. This would increase the computation time without significantly improving the accuracy. In this study, instead of adopting the above s t a b i l i t y criterion, i t was ob­ served that the smaller particles w i l l respond to temperature

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Iterative Approach

11. KAYiHAN

229

changes in their environment much faster than the large particles. Therefore, i t was assumed that for an arbitrary At i f a j ( t ) , the i n i t i a l temperature time constant of the particle, is smaller than At, then i t w i l l respond to changes in Tp instantaneously, i . e . , T . ( t ) = T ( t ) i f a j ( t ) * At. This allows At to be adjusted un­ t i l desired accuracy is achieved in the converged iterative results. The procedure described here has provided a stable and an accurate iterative technique without unnecessarily large number of time i n ­ crements. 0

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch011

n

F

n

0

Comparison of the Computation Results. As indicated above, Gear's method was used to solve the model equations only for a fraction of the total residence time in the reactor which took 8.59 minutes of machine computation time. The same set of equa­ tions was solved by the approximate iterative technique for the same time interval in 5.8 seconds of computer time. As a com­ parison of the accuracy overall devolatilization v = Σ Σ v-jj as predicted by the two techniques are plotted on a dimensionless scale in Figure 1. The definitions for the dimensionless quanti­ ties used are: T

Dimensionless time = t/t Dimensionless devolatilization = v / v * where t is the time constant for the temperature transient of nondevolatilizing average size particle and v * is the mass fraction of total volatile matter in coal. Typical reactor calculations would take about five times the average particle time constant t. For these cases the approximate relations were used to predict some of the reactor conditions as a function of time. To give an idea of the dependence of the com­ putation time and accuracy on the time increment, At, three dif­ ferent cases are compared in Table III. These results show that the proposed technique provides a fast and reliable method for the solution of s t i f f ODE models of reacting polydispersed particles. Recently, Turton (9) applied this method successfully to the modeling of wood char combustion in a transport reactor. T

CONCLUSIONS Models for the reacting polydispersed particles contain s t i f f ordinary differential equations. The stiffness is due partly to the wide range of thermal time constants of the particles and part­ ly to the high temperature dependence of reactions like combustion and devolatilization. As an alternative to the established solu­ tion techniques based on Gear's method an iterative approach is developed which uses the f i n i t e difference representations of the differential equations. The finite differences are obtained by

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Figure 1.

0.00

— Ω? -

.08

".01

Δ

Δ

DIFFERENCE

'.02 ".03 DIMENSIONLESS

Δ

FINITE

COAL

TIME

'.04

SOLUTION

POLYDISPERED

(IMSL)

OF

Δ

D

'.05

•Δ

PARTICLES

'.06

Comparison of the iterative finite difference solution of this work to Gear's method

Δ

ITERATIVE

Δ

METHOD

GEAR'S



DEVOLATILIZATION

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch011

11. KAYiHAN

Iterative Approach

231

Table III. Sample calculations for particle temperatures and for total devolatilization showing the effect of At on accuracy and execution time. Number of Points =100

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch011

Number of Points = 50 Time 0.0000 0. 5000 1. 0000 1. 5000 2. 0000 2. 5000 3. 0000 3. 5000 4. 0000 4. 5000 5. 0000

T4 .3333 .8113 .9076 .9105 .9077 .9056 .9041 .9032 .9024 .9018 .9014

T7 .3333 .5563 .7063 .8044 .8579 .8834 .8947 .8994 .9011 .9016 .9015

VT .0000 .3173 .4808 .5832 .6600 .7096 .7536 .7794 .8060 .8369 .8564

11.879 CP seconds execution time

Time 0. 0000 0. 5000 1. 0000 1. 5000 2. 0000 2. 5000 3. 0000 3. 5000 4. 0000 4. 5000 5. 0000

T4 .3333 .8252 .9085 .9104 .9075 .9055 .9041 .9031 .9024 .9018 .9014

T7 .3333 .5660 .7123 .8083 .8598 .8843 .8951 .8996 .9012 .9016 .9015

23.787 CP seconds execution time

Number of Points = 150 Time 0.0000 0.5000 1.0000 1.5000 2.0000 2.5000 3.0000 3.5000 4.0000 4.5000 5.0000

T4 .3333 .8292 .9087 .9103 .9075 .9055 .9041 .9031 .9024 .9018 .9013

T7 .3333 .5692 .7143 .8095 .8604 .8845 .8952 .8996 .9012 .9016 .9014

VT .0000 .3156 .4814 .5838 .6604 .7116 .7541 .7800 .8072 .8382 .8566

VT .0000 .3173 .4816 .5838 .6605 .7112 .7541 .7799 .8069 .8380 .8566

Time = t/t T4 T7 VT

V Go T

=

V Go T

VV

37.150 CP seconds execution time

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

232

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch011

approximate analytical integrations through small time increments. This technique allows successive iterations on the complete solu­ tion through sequential evaluations of the equations rather than a simultaneous approach. Application to the modeling of polydis­ persed coal pyrolysis at low pressures gives encouraging results. For this case the direct solution of the model equations with a s t i f f solver like DVOGER in the IMSL Library is expected to take more than 10 hours on a CDC Cyber 73. Other s t i f f ODE solvers that can handle particular Jacobian structures are not applicable to this problem. The method proposed here reduces the computation time to less than 30 seconds with three digit accuracy in the com­ puted variables. This iterative technique would be practical for reactor design and optimization studies. NOMENCLATURE 2

a. S3 c

surface area of particle, cm

C

specific heat of gas, cal/gm°K

E

activation energy of i t h reaction, cal/gmol

F

mass flowrate of mixed gas, gm/sec

v

specific heat of coal, cal/gm°K

F

Q

i n i t i a l mass flowrate of coal carrier gas, gm/sec

G

Q

i n i t i a l mass flowrate of hot gas, gm/sec

k k

thermal conductivity of gas, cal/gm sec °K Q

Κ

pre-exponential factor of ith reaction,

1/sec

number of discrete particle size cuts

m

coal mass flow rate at reactor entrance, gm/sec

ΐϊκ

mass flowrate of char particles in the jth size cut, gm/sec

Ν

number of gas-solid reactions

p. J r r

mass fraction of m that is in size cut j ο particle radius of size cut j , cm root-mean-square average radius of particle size distribution, cm

Q

F

v

R

gas constant, cal/gmol °K

t t

time, sec time constant for the temperature transient of size r , fined in Eq. (17), sec

Tp

temperature of gas stream F , °K

Tp ο

temperature of gas stream F , °K

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

de­

11.

KAYIHAN

T

Iterative Approach

233

temperature of gas stream G , °K

b

O

T\ v.*

temperature of particles of size j , °K maximum v o l a t i l i z a t i o n due to reaction i , gm of volatiles/gm of original coal

vj

volatiles produced in size j through reaction i , gm/gm

w

Rosin-Rammler mass fraction size distribution function

χ

particle diameter in w(x), cm

Ah

R

heat of reaction, cal/gm

At

time increment for discrete solution, sec

p

density of coal, gm/cm



characteristic mixing time of hot and cold gas streams, sec

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch011

3

ACKNOWLEDGEMENT The computer time was provided by the Oregon State University Milne Computer Center. LITERATURE CITED 1.

Hindmarsh, A.C., "GEARB: Solution of Ordinary Differential Equations Having Banded Jacobians," Lawrence Livermore Laboratory Report UCID-30059, June 1977, Rev. 2.

2.

Hindmarsh, A.C., "Preliminary Documentation of GEARBI: Solution of ODE Systems with Block Iterative Treatment of the Jacobian," Lawrence Livermore Laboratory Report UCID-30149, December 1976.

3.

The IMSL Library, International Mathematical and Libraries, Inc., July 1977, 6th Ed.

4.

Levenspiel, O., "Chemical Reaction Engineering," 1972, Second Edition, Wiley.

5.

Anthony, D.B., Howard, J.B.,

6.

Suuberg, E.M., Peters, W.A., Howard, J.B., and Development, 1978, 17, 37.

7.

Suuberg, E.M., Sc.D. Thesis, Dept. of Chemical Engineering, Massachusetts Institute of Technology, Cambridge, MA, 1977.

8.

Kayihan, F., Reklaitis, G.V., "Modelling of Staged Fluidized Bed Coal Pyrolysis Reactors," Paper presented at 85th National AIChE Meeting, June 1978.

9.

Turton, R., "Combustion of Wood Char in a Transport Reactor," M.S. Thesis, Dept. of Chemical Engineering, Oregon State University, Corvallis, OR, 1979.

AIChE J.,

Statistical

1976, 22, 625. I&EC Process Design

In Computer5,Applications to Chemical Engineering; Squires, R., el al.; November 1979. ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

RECEIVED

12 Reaction Rate Equations from Integral Reactor Experiments CHARLES H . WARE, JR.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch012

Commercialization Insights, 33 Sandi Drive, Poughkeepsie, NY 12603

A general method is presented for the development of chemical reaction rate equations from integral reactor and single-sample batch reactor data such as are obtained in process development studies. Following the scope of the method, three earlier foundation stones upon which the method rests, the method itself, and a simple illustration are presented. Scope The methodology of this paper is intended for use in chemical process research and development studies. It is applicable when the experimenter wishes to develop a set of reaction rate equations which represents the system performance. The objective may be to gain sufficient understanding of how the various rates are affected by reaction conditions so that innovative approaches are triggered. For example, an immediate question might be whether the loss in selectivity that is observed at high conversions is due to chemical (differences in intrinsic reaction rates) or physical (diffusional or distributional) phenomena. Alternatively, the objective might be to predict the reaction rates at a variety of reaction conditions with sufficient precision to permit a reliable process design optimization. Before the methodology can be implemented, some data must be available. There must be replicate data sets from which experimental errors may be estimated. If the reactions are catalytic, i t is highly recommended that the data include at least three different batches of catalyst (not 3 samples of the same batch). If the catalyst is experimental (either proprietary or from a vendor), i t is also highly recommended that the reference data set include six different batches of catalyst. This is to identify unacceptably large variations in the catalyst and to reduce the possibility of formulating a set of rate equations which do not represent the catalyst batches which can be reproduced. The reference data set must also include results at two or more temperatures. 0-8412-0549-3/80/47-124-235$05.00/0 © 1980 American Chemical Society

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

236

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

The data will be used to formulate a tentative model to be used in the design of the experiment. It will consist of a simple power-law expression for each step with each of the parameters es­ timated from the reference data. For the reaction scheme: A + Β —* C C + Β —• D Β + Β —• Ε the tentative model might be:

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch012

r

(

i *W b

r

2

*kCC

r

3

- k/,

2

b

1

)

(2)

c

(3)

k = k. exp(-E /R(l/T-T7T)) ο k = k exp(-E /R(l/T-T7T)) ο k = k exp(-E /R(l/T-17T)) 1

1

1

where

2

2

2

3

3

3

k. - 0.1 liter/g-mole-hr ο k = 0.1 liter/g-mole-hr ο k~ - 0.02 liter/g-mole-hr o 2

J

Ej - 12000 cal/g-mole E = 12000 cal/g-mole 2

E = 21000 cal/g-mole 3

R = 1.987 cal/g-mole-°K Τ = temperature, °K C « concentration, g-mole/liter c

denotes average value to be used in experiment For each reaction, r is the rate of formation of product, g-moles/ liter-hr. The numerical values of the parameters would be obtained by fitting the tentative model to the existing data.

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

12.

WARE

Reaction Rate Equations

237

Fitting Reaction Rate Models to Rate Data When reaction rate data can be obtained, results from factor­ ial experiments may be analyzed to deduce acceptable forms of the chemical reaction.(1) Consider the following single-step reaction: A+Β— C Suppose that reaction rates are measured in a factorial exper­ iment at each of the conditions shown in Figure 1 . The data are then correlated by means of the following equation: In r = ΤΤΓΤ + al/T-T/T) + a (ln C -Tn~Cp + a (ln C -TfTcp Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch012

2

a

3

b

+ a (l/T-T7T)(ln C T Ï T c p + a (l/T-T7T)(ln C -TÏTcp 12

13

b

+ a ( l n C -TiTC)(ln C - T r T Ç ) 23

a

(4)

b

By virtue of the fact that a factorial design has been used to generate the data, the estimates of the a's are uncorrected. This means that the numerical values of the estimates of the a terms will not change i f one or more of the other terms is deleted from the correlating equation. The analysis uses the fact that equation 4 is the Taylor expansion of In r as a function i f 1/T, In C and In C . The values and the 95% confidence intervals of the a terms have been estimated. The true reaction rate equation, the form which is not yet known, also has a Taylor expansion of In r as a function of these three variables. We will never know the true equation, but we can deduce the approximate correct form of the equation and estimate its parameters as follows: a

1. 2. 3. 4. 5.

b

Propose a tentative model Infer the permissible range for each value of a Compare those required by the true model with the ranges estimated from the data If all the requirements of the true model are met, accept the tentative model and propose alternatives If one or more of the requirements of the true model are not met, reject the tentative model and propose alternatives.

Continue proposing alternative models until all the alternatives of a given level of complexity (all 3-parameter models, for example) have been explored. If one or more of these is acceptable, quit. If none i s , consider all the alternatives of the next higher degree of complexity. For simple models, the use of the Taylor expansion of In r provides the following physical interpretation for a values:

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch012

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

Figure 1.

Factorial experiment

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

12.

Reaction Rate Equations

WARE

239

aj = -E/R a

2

= a , the order of reaction with respect to C

a

a

3

= β, the order of reaction with respect to C

b

3 - E/R

. a

12 ~ a In C

a n d

.

α

.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch012

a

. 8 - E/R

a

.

13 " 3 In\

23 " 3

In

3 6

FT7T

a n d



9 α

FT7T

ι t

a

n

d

3 8 3

1n

C.,

b

a

If the parameter is not constant, this is true only at the cen­ ter of expansion: where 1/T = T/T; In C - l n C ; and In C a

a

b

s

TrTTT

For example, suppose a » 0.8 ± 0 . 1 2

*

1 2

= -1000 ±500 and a

2 3

s

0.20 ± 0 . 1 0 . The hypothesis that ο = 1.0 must be rejected be­ cause the 95% confidence interval is 0.7 to 0.9 and i t is unlikely 0 8

that i t is really equal to 1 . 0 . A power law model r~C * must alα

so be rejected because i t would mean that α = a constant and a and a must be zero. But the results are that they are both non­ zero. We must now propose some more complex model. Depending up­ on the system, i t might be based upon a free-radical mechanism, Langmuir Hinshelwood rate equations, or other. In any case, the numerical values of the coefficients in equation 4 and their con­ fidence intervals are available to test every model which is pro­ posed. Model-building in batch reactors 2

2 3

Box and Hunter described a method which applies to batch reac­ tors with intermittent sampling — product concentrations are re­ quired at several reaction times.(2) Their analysis is as follows: 1.

write tentative reaction rate equations for the system with unknown rate constants, k

2.

integrate the equations, and for each experimental run, f i t the equations to the data by estimating best values of the rate constants; there will be one set of rate

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

240

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

3. 4.

5.

constants for each run 1f the rate constants do not vary from run to run, con­ clude that the rate equations are adequate i f the rate equations do vary, fit In kj to experimental conditions - temperature, initial concentrations, cata­ lyst dosage, etc. - to determine how they vary with the independent variables modify the rate equations to eliminate the functional dependence of the k.s. 2

Suppose, for example, the true model is kjC but the tentative model is kJC . Then, when the initial concentration of A (C ) a

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch012

a

a

is varied, ki will vary with C : Ο

ο

k\ = k, C , approximately. 0

0

From this the experimenter will infer that the tentative model is incorrect and some higher-order dependence is indicated. He might choose to test the hypotheses r=kjC or determine the or­ a

der by the direct estimation of this non-linear parameter. The Box-Hunter method permits the experimental observations of the product concentrations to be transformed into a set of "obser­ vations" of the k.s. Then these k s or In k.s can be expanded in a Taylor series as functions of experimental conditions. This is exactly analogous to the analysis of In r described previously ex­ cept that, by means of a tentative model, the primary reaction rate dependence on concentrations, temperature, and other experimental factors has been eliminated. This permits the rate equations to be integrated approximately correctly. Modifications to the Box-Hunter method To extend their analysis to integral reactors and singlesample batch reactors, three modifications are appropriate. First, use a more appropriate reactor concentration to analyze the data than the initial concentration. The simplest, and an effective one is t u

a

=

1

/

1

I a C

d t

(

5

)

The C ( t ) can be obtained from the tentative model with the preα

liminary estimate of the parameters. Second, to improve precision of the estimates of the k.s and therefore overcome the shortcoming of single samples, use all reactor concentrations to estimate the k.s, not just one as the authors did. Finally, use optimum conver sion levels to minimize the variance of (In k)s that are estimated

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

12.

Reaction Rate Equations

WARE

241

from the data.(3,4) For single step reactions, the reaction time which will minimize the variance is

and the optimum outlet concentration is 1

< a>opt Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch012

C

where α

=

V

s

reaction order with respect to C

(

opt

1

1

0.368 C

2

1/C

0.5 C

a

ο

)

α

Some typical results for k * 1 *opt

?

o

ο

The values of k for each run are estimated from the preliminary data. For multi-step reactions, the method of Box and Lucas(3) may be used. Alternatively, we can make use of the fact that the mo­ del, its parameters, and the experimental error are "known". Then we may calculate the standard errors of In k, s , for any ex­ perimental design we propose. l p

k

Design of integral reactor experiments A difficulty which we have just created by using In (T in the a

α

Taylor expansion is that of obtaining an efficient experimental de­ sign. The classical factorial designs depend upon the experimen­ ter's ability to choose levels of his independent variables to hold them at these prescribed values. By defining the independent var­ iables to be In U. with the intention of calculating from Z- from the data after the experiment is over, we have sacrificed our abil­ ity to satisfy the requirements of the factorial designs. How can we get around this difficulty? We have already hypothesized a mathematical model for the process under study in order to define some reaction rate constants into which we will transform the ob­ servations. If this model is correct then the only additional in­ formation we need in order to predict the values of HTj in the ex­ periment about to be run is the numerical values of the reaction rate constants. With them we would be able to formulate a grand null hypothesis comprised of the mathematical model and the numeri-

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

242

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

cal values of the parameters. With this we could calculatethe outcome of every planned experiment, and in particular the C.s. These effective average concentrations would necessarily be functions of the initial concentrations. As the latter were varied, the calculated values of the former would change and by adjusting the initial concentrations we could obtain the desired levels of the averages. Then i f the null hypothesis were true, the ÎL would α

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch012

correspond to the factorial design. To the extent that the null hypothesis is incorrect, when the experimental values of and In ÏÏ. are calculated they will be found not to coincide with the exact levels of the factorial design. In this case, however, linear regression will s t i l l yield the desired values of the coefficients in the Taylor expansion of In k and the analysis may proceed. If we employ optimum conversion levels in all of the runs, we may calculate in advance of the experiment. Using the results α

shown above, we obtain, for optimal experiments: o =l

U /C

a

= 1 - 1/e = 0.632

(8a)

« =2

U /C a

a

= In 2 = 0.693

(8b)

α

α

= (*

(8c)

a

α Μ , « / 2

Ïï/C a

ταΖτΤ

-1)/(α - 2)

a.

We will correlate the data using a Taylor expansion of In k as a function of In IT -In u where the overbar denotes the grand average a a of all the In C . For any given initial conditions for the high a level of concentration, what are the lower initial concentrations to be? It is known that as the levels of the independent variables are made more widely separated, the precision of the estimate of the coefficients in the regression equation increases. It can also be shown, from propagation of error analysis that as the lower con­ centration level is reduced, the precision of In k that is extrac­ ted from the experimental result is reduced. a

a

s

ln k " V

K

"

F|£J

a

\a

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

>

(9

Reaction Rate Equations

WARE

12.

a""

1

243

/C a o

S„ c

1

(10a)

α= 1

(10b)

2

(11)

Selecting the number o f runs. The design of the experiment consists o f determining the number o f runs to be made at the low level o f C f o r each run made at high o level (as i n any f a c t o r i a l design). Let n* and n" denote the num­ ber o f runs a t the high and low levels of C , respectively. Beo cause the standard deviation of the average value of a set of "ob­ servations", In k i n this case, i s inversely proportional to ΛΓ, in order to obtain equal values of s a t the high and low levels of C : o a

a

a

1 nk

a

—i /n C' ο

=

7

S. ΖΓ αο

o r

=

Ϊ T f r C" ο

(12)

=/ n /S-

(13) 1

For example, i f C\ = 0.5 C , then η" * 4 η w i l l produce equal α. Ο

a

α Ο

standard deviations.

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

244

COMPUTER

In Γ

=

Ί

APPLICATIONS

"g *

Ί

TO CHEMICAL

ENGINEERING

" ?a

(

1

4

)

For optimum conversions, equation 8 yields In Γ a

= In Constant + In C o

(15)

a

a

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch012

Substituting this into equation 14 and simplifying

l

-

n

l

*a

n

n V

"

{

l

n

C

â

-

l

ο

n

C

a

(

}

1

6

ο

ln ζ ; - ln Γ = (In Ci - In C" } a a π +π 9 a

ο

(17)

ο

Λ

)

Σ(1η ϋ . -In ÏÏJ

2

Equation 18 permits the calculation of the factor by which s multiplied to yield s .

l n

k

is

It is obviously a function of n* and n".

a

For fixed n , the factor is simply a function of sign of experiment can be broken into two steps: 1

n'Vn* and the de-

choose n for the desired design 1

2.

a.

for a 2 factorial, η' = 2~*

b.

for a 2 "

n

n

η

p

fractional factorial, η' = Z '

1

.

for the fixed value of n , choose n'Vn to obtain the de­ sired precision for a range for ln U"; typically n" = 2 1

2

1

a

The table below provides the basis for step 2. It is reasonable to wonder whether i t might not be better to use addition runs at the high level of C before reaching such high values of n'Vn1. o (s depends on the standard deviation of ln k at the high levels 2 of C and that can be reduced by increasing η ' ) . This can be deo termined for a fixed value of n* + n" by differentiating equation 15 with respect to n", setting the result equal to zero, and a

a

a

a

a

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

12.

n

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch012

245

Reaction Rate Equations

WARE

" ' / n

/

/ it

-ss - in υ /

1

8

ΣΟη Ζ

1 2 3 4 5 6 7 8 9 10

C

a

/ c

â

0

» 3.54 2.10 1.61 1.36 1.20 1.09 1.02 0.96 0.91

0

1 0.71 0.58 0.50 0.45 0.41 0.38 0.35 0.33 0.32

solving for n"/n'. The optimum ratio is 11:1. This means that for all practical cases the design will consist of η' runs at the high level of C. (step 1, previous page) and n"/n' runs at the o low level of C which corresponds to a factor in the above table ο which is small enough to produce the desired precision in ag. a

The factors shown there are being reduced more rapidly than {(η'+η")/(η'+η"+1)} which is the rate expected for replication. Suppose we wish to design a factorial experiment in three variables with 1 ΐί

/

Σ(1η Γ - In Γ ) ν ν η' = 4 η7η' = 3

2

=

3

The design will be as shown in Figure 2 with each dot representing one run. Illustration The reaction i s : A —• Β A —• C At 127°C., the following results have been obtained. Reaction time, 0.5 hr, C = 1.0, C = 0.0, C = 0.0 C = 0.286 C = 0.428 a

0

C = 0.286.

b

0

Q

a

fa

0

First order rate constants were calculated:

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

kj =

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch012

246

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

Figure 2. Factorial experiment. Each dot represents one run.

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

12.

Reaction Rate Equations

WARE

1.5 hr" ; k = 1.0 hr" . 1

From similar data at higher temperatures

1

2

247

the activation energies were calculated:

Ej - 17.6 kcal/g-mole and

E = 26.7 kcal/g-mole.

From previous data, s „ , s , equal 0.01. a b We wish to design an experiment to obtain data and fit an equation like Equation 4 to them, except using ln k and ln k. We wish to achieve the following precision levels: s • 500 cal/g-mole; 9

ά

c

a

s a

- s a

2

- 0.1.

c

l

3

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch012

The ks are given by:

Ί " *

1

" * a C

1 « l mi n

*2 ~ t

k

1

( 1 9 )

a a C -C Q

Ο ο

0ο

C C -C a a a

(

2

0

)

For optimum conversion of A (In C /C « 1) and equal standard deo viations for the C's, the propagation of error formula yields: a

S

l " iι k

= (G

V a»«ο * C

)I(

)2 + {

a

)

2

]

ι

Η

1=1

'

2 (21)

The term in brackets is the factor by which the errors are inflated due to the fact that the ks must be calculated from two measure­ ments. For kj this factor is 2.30 while for k it is 2.96; they 2

vary at most 10% over the planned temperature range. The experiment will be designed to match the precision re­ quirements for In k ; for ln kj, they will be exceeded. We will 2

use a two-level factorial design in 3 variables; from Equation 12 s

in

1n

κ

v

« 0.0805/C . a

For n « 4, s 1

Q

a

a

2

- 0.0402/C £(ln IT -ln Γ ) a a a Q

with the summation over n'Vn'+l terms.

y

2

y

If C =1, and the reciproo cal of the denominator is no greater than 2.48, the precision re­ quirements will be met. For n"/n 3, the factor will be 2.1 which is acceptable and C" fZ =0.58. The values for Γ. are given by: ο ο a

a

lss

%

American Chemical

Society Library 1155 16th St. N. W. In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Washington, DC, 1980. Washington, D. C. Society: 20036

248

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

,



C

+

b

Since (T = 0.632C a

ο

Q

k

C

f

à k T \

C

*b ,

-(k,+k )t

f t

ο"

1 ζ

a

0

+ 0 - 3 6 8

9

V

C

< > 22

k

k

a l l

+ l c

2*

F o r a n y

0

0

values of C , kj and kg, C may be chosen to achieve a required ο ο level of T . Since i t w i l l be calculated by difference, i t i s possible that C w i l l be negative i n which case i t w i l l be nec­ a

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch012

t l a

b

b

b

essary to r a i s e the design level f o r C . b

We are s t i l l free to

choose C at the lower level of Î* . Two p o s s i b i l i t i e s are : C\ = 0.0 (for convenience or at the level anticipated to be the ο mixed feed concentration during recycle, say 0.1. For i l l u s t r a ­ t i o n , we w i l l choose C. • 0.1 to correspond with the lower level ο of u . At this lower level C w i l l be at two l e v e l s (as in any ο f a c t o r i a l design). In order to calculate the actual values, the ks must be known and, therefore, we must determine the temperature l e v e l s . From the design s p e c i f i c a t i o n : b

b

b

fi

s

= 500 -/T = - *out

=

°

(

1

2

)

(

1

3

)

q, D, L) - θ = 0

± n

=

L

D

in>

- θ (P ,

3

7 can be r e w r i t t e n as f o l l o w s .

< in> (37)

Χ

r

4

= k gX X

9

(38)

k

5

- k gX X

9

(39)

r

6 r

2

3

=

7

f

2

3

r

3 5 - k gX X 4

4

( 4 0

> (41)

9

H

where/ g = 10" R fi - 2 exp (-[B x

f

2

- 2 exp ( - [ E

f

3

- exp ( - [ E

2 6

and

(42)

0

- Ε ]/RT)

(43)

m

- E ]/RT)

(44)

- E ]/RT)

(45)

p

2 4

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

23.

MURTHY

Heterogeneous

Nitration

419

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch023

S o l u t i o n o f Equations I t is n o t p o s s i b l e t o a n a l y t i c a l l y s o l v e t h e s e t o f e q u a t i o n s f o r m u l a t e d in t h e above s e c t i o n s . However, it is p o s s i b l e t o o b t a i n a n u m e r i c a l s o l u t i o n corresponding t o a s p e c i f i c set of r e a c t o r conditions. The model d e s c r i b e d here c a n be used t o s i m u l a t e any one s t a g e o f t h e n i t r a t i o n r e a c t o r s . A l l i e d Chemical's p r o c e s s f o r DNT p r o d u c t i o n c o n s i s t s o f s e v e r a l i n t e r c o n n e c t e d n i t r a t o r s and phase s e p a r a t o r s . The o v e r a l l p r o c e s s s i m u l t i o n was accomplished u s i n g the s o - c a l l e d " b u i l d i n g b l o c k " approach. T h i s approach c o n s i s t s o f d e v e l o p i n g subroutines f o r c a l c u l a t i n g the output o f process v e s s e l s , g i v e n t h e o p e r a t i n g c o n d i t i o n s and t h e i n p u t streams, and then d e v e l o p i n g a main program which c a l l s t h e s e subprograms in a c e r t a i n sequence d e t e r mined by t h e p r o c e s s t o p o l o g y (flow scheme) and converge on t h e r e c y c l e streams. A f t e r convergence/ an energy b a l a n c e is performed around each s t a g e t o permit quick e v a l u a t i o n o f t e m p e r a t u r e - c o n t r o l a b i l i t y . V e r i f i c a t i o n o f t h e Model A development p r o j e c t was undertaken t o v e r i f y the model d e v e l o p e d here and t o s t u d y t h e mass t r a n s f e r parameter k a as a f u n c t i o n o f phase r a t i o ( o r g a n i c / a c i d v o l u m e t r i c r a t i o ) in t h e r e a c t o r , agitation, i n t e r n a l configuration of the reactor, etc. R e s u l t s o f l a b o r a t o r y runs c o u l d be e x p l a i n e d by t h e model u s i n g k a as t h e o n l y a d j u s t a b l e p a r a meter. T a b l e 1 shows an example o f t h e e x c e l l e n t agreement between model p r e d i c t i o n s and l a b o r a t o r y data. I n each r u n , at a d i f f e r e n t a g i t a t o r speed, k a was determined by matching t o l u e n e c o n t e n t o f t h e reactor effluent. The c l o s e agreement between t h e m o n o n i t r o t o l u e n e and d i n i t r o t o l u e n e isomer c o n t e n t o f t h e a c t u a l r e a c t o r e f f l u e n t w i t h t h o s e p r e d i c t e d by the model v e r i f i e s t h e a c c u r a c y and t h e adequacy o f the model. A d m i t t e d l y , in t h e s t r i c t l y t h e o r e t i c a l sense, such a v e r i f i c a t i o n is a n e c e s s a r y b u t n o t s u f f i c i e n t requirement f o r t h e model t o be t h e t r u e model. I t s h o u l d be o b v i o u s t o r e a d e r s f a m i l i a r w i t h c u r r e n t r e s e a r c h work on t h e n i t r a t i o n o f a r o m a t i c compounds t h a t t h e assumptions and mechanisms on w h i c h this model is based a r e under debate, a l b e i t g e n e r a l l y accepted. E x h a u s t i v e t e s t i n g and v e r i f i c a t i o n o f a model is u s u a l l y n o t j u s t i f i a b l e in a b u s i n e s s

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Toluene p-MNT o-MNT m-MNT 2,4-DNT 2,6-DNT O t h e r DNT

Compound 0.345 30.48 39.81 4.77 18.44 5.53 0.63

0.35 30.71 40.38 3.37 19.35 5.42 0.42

0.49 30.52 39.92 4.77 18.21 5.46 0.62

0.49 30.61 39.89 2.86 20.11 5.59 0.45

Calculated

Measured

Measured

1500 RPM

Calculated

=

Agitation

0.28 32.16 42.24 3.07 17.04 4.86 0.36

Measured

NITRATION

0.28 32.22 43.35 4.97 24.36 4.35 0.47

Calculated

= 2300 RPM

Basis)

Agitation

(Acid-Free

1900 RPM

Reactor E f f l u e n t

DATA FOR L A B C F S T R

=

P e r c e n t in

VS EXPERIMENTAL

I

Agitation

Weight

COMPARISON OF MODEL PREDICTIONS

Table

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch023

23.

MURTHY

Heterogeneous

Nitration

421

environment where t h e model is used p r i m a r i l y t o p r o v i d e d i r e c t i o n in o p t i m i z i n g a m u l t i v a r i a b l e process.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch023

Remarks The s i m u l a t i o n program has been e x t e n s i v e l y used f o r p r o c e s s o p t i m i z a t i o n s t u d i e s as it p e r m i t s a c c u r a t e p r e d i c t i o n o f isomer d i s t r i b u t i o n and h e a t r e l e a s e . I t o f f e r s t h e o r e t i c a l e x p l a n a t i o n s f o r isomer c o n t r o l p r a c t i c e s a r r i v e d at t h r o u g h s e v e r a l y e a r s o f p l a n t o p e r a t i n g e x p e r i e n c e . The model was used in de­ s i g n i n g l a b o r a t o r y experiments t o study mass t r a n s f e r under v a r i o u s p r o c e s s c o n d i t i o n s and r e a c t o r con­ f i g u r a t i o n . S i n c e mass t r a n s f e r and c h e m i c a l k i n e t i c s a r e s i m u l t a n e o u s l y i m p o r t a n t in this p r o c e s s , a model is n e c e s s a r y t o " f i l t e r o u t " t h e k i n e t i c s e f f e c t s f o r mass t r a n s f e r c o r r e l a t i o n s . The r e s u l t s o f o u r l a b o r a t o r y s t u d i e s will be p r e s e n t e d in f u t u r e p a p e r s . NOMENCLATURE a = a c t i v i t y o r i n t e r f a c i a l a r e a as e x p l a i n e d in t e x t A = frequency f a c t o r c = concentration e = extent o f r e a c t i o n Ε = A c t i v a t i o n energy G = O r g a n i c molar f l o w r a t e H R = A c i d i t y f u n c t i o n , d e f i n e d by eqn (10) J i = I n t e r p h a s e mass t r a n s f e r r a t e f o r t h e i - t h species k = c h e m i c a l v e l o c i t y o r t r a n s p o r t parameter Κ = E q u i l i b r i u m constant P^ = r a t e o f p r o d u c t i o n o f i - t h s p e c i e s / u n i t volume o f a c i d phase Q = molar f l o w r a t e f o r i n o r g a n i c s p e c i e s r ^ = r a t e o f i - t h r e a c t i o n , l b mol/hr f t R = gas law c o n s t a n t Τ = absolute temperature A volume o f a c i d phase W = weight p e r c e n t s u l f u r i c on n i t r i c f r e e b a s i s X = m o l e f r a c t i o n in t h e a c i d phase y = m o l e f r a c t i o n in t h e o r g a n i c phase ( a c i d f r e e ) V

=

GREEK LETTERS r-

activity

coefficient

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

C O M P U T E R APPLICATIONS T O C H E M I C A L ENGINEERING

422

SUBSCRIPT FOR SPECIES 1 3 5

toluene o-Nitrotoluene 2,4 - Dinitrotoluene

2 4 6

7 9

Qrtho Dinitrotoluenes n i t r i c acid

8 10

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch023

Literature

p-Nitrotoluene m-Nitrotoluene 2,6 - Dinitrotoluene water sulfuric acid

Cited

1.

Norman, R.O.C., Taylor, R., "Electrophilic Substitution in Benzenoid Compounds", Elsevier Publishing Company, Amsterdam, 1965.

2.

De La Mare, P.B.D., Ridd, J.H., "Aromatic Substitution, Nitration and Halogenation", Academic Press, New York, 1959.

3.

Vinrik, M.I., Grabovskaya, Zh.E., Arzamaskova, L.N., Zh. Fiz. Khim., 1967, 41, 1102.

4.

Tillet,

5.

Kobe, K.A., Fortman, 1961, 53, 269.

6.

Hanson, C., Marsland, Ind., 1966, p 675.

7.

McKinley, C., White, 40, 143.

8.

Barduhn, A.J., Kobe, K.A., Ind. Eng. Chem., 1956, 48, 1305.

9.

Miller, R.C., Noyce, D.S., Vermeulen, Eng. Chem., 1964, 56, 43.

J.G., J. Chem. Soc., 1962, p 5142. J.T., Ind. Eng. Chem.,

J.G., Wilson,

R.R., Trans.

G., Chem.

AIChE, 1944,

T., Ind.

10.

Albright,

L.F., Ind. Eng. Chem., 1965, 57, 53.

11.

Giles, J., Hanson, C., Ismail, H.A.M., ACS Symposium Series, 1976, 22, 190.

12.

Cox, P.R., Strachan, 1972, 27, 457.

A.N., Chem. Eng. Sci.,

13.

Cox, P.R., Strachan, 4, 253.

A.N., Chem. Eng. J., 1972,

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

23. MURTHY

Nitration

423

14.

Aris, R., "Introduction to the Analysis of Chemical Reactors", Prentice-Hall, 1965.

15.

Ismail, H.A.M., Ph.D. Thesis, Bradford, U.K., 1973.

16.

Redlich, O., Kister, 1948, 40, 345.

17.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch023

Heterogeneous

Ellis,

University

of

A.T., Ind. Eng. Chem.,

S.R.M., J. Appl.

Chem., 1957, 7, 152.

18.

Renon, H., Prausnitz, 135.

19.

Cerfontain, 545.

20.

Grabovskaya, Ζ.Ε., Vinnik, 1966, 40, 1221.

21.

Bennett, G.M., Brand, J.S.D., James, D.M., Saunders, T.G., Williams, D., J. Chem. Soc., 1947, p 474.

22.

Deno, N.C., Jaruzelski, J.J., Schriesheim, J. Am. Chem. Soc., 1955, 77, 3044.

23.

Gold, V., Hawes, B.W.V., J. Chem. Soc., 1951, p 2102.

24.

Hammett, L.P., "Physical McGraw Hill, 1940.

25.

Arnett, E.M., Bushick, 1964, 86, 1564.

26.

Olah, G.A., Kuhn, S.J., Flood, S.H., Evans, J.C., J. Am. Chem. Soc., 1962, 84, 3687.

27.

Coombes, R.G., Moodie, R.B., Schofield, J. Chem. Soc. (Β), 1968 p 800.

RECEIVED

November

J.M., AIChE J, 1968, 14,

H., Telder,

5,

Α., Recueil,

1965, 84,

M.I., Zh. Fiz. Khim.,

Organic

Α.,

Chemistry",

R.D., J. Am. Chem. Soc.,

Κ.,

1979.

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

24 Modeling, Parameter Identification, and Adaptive Control of Anticoagulant Drug Therapy THOMAS J. McAVOY

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch024

Department of Chemical Engineering, Goessman Laboratory, University of Massachusetts, Amherst, MA 01003

The scope of the medical problems which require the use of anticoagulant drugs cannot be overstated. Arterial thrombosis is a major contributor to the number one (acute myocardial infarction), number three (stroke) and number four (renal) causes of deathinthe United States (1). Venous thromboembolismisthe most common non-surgical cause of deathinpatients hospitalized for major orthopedic procedures, the most frequent non-obstetrical cause of postpartum death, and a major cause of deathinpatients with chronic cardiac and pulmonary disease (1). Venous thrombosis is estimated to lead to the hospitalization of approximately 300,000 patients annuallyinthe United States, of which more than 50,000 die (1). The average hospital stay for the 250,000 survivors is a week to 10 days and the cost of this hospitalization has been estimated as $750 million (1). If a one day reduction in hospital stay could be achieved through optimumdosingof anticoagulants, then the potential savings per year can be estimated as $50 million. It has further been estimated (2) that through improved administration of anticoagulants 8,000 to 12,000 lives could be saved each year in the United States alone. The purpose of this paperisto illustrate how mathematical modeling and control theory can be applied to the problem of optimizing the administration of the anticoagulant drug heparin. The approach presented has the potential of solving some of the economic and life saving problems discussed above. Mechanism of Clot Formation and Drug Action. Blood clotting is an extremely complicated process which involves an enzyme cascade. To date 13 enzymes, called clotting factors, have been identified and these are normally presentinbloodintheir inactive state. Through an injury of some type one of the early enzymesisactivated. This enzymeinturn catalyses the activation of the next enzymeinthe cascade. Throughout the process a large amplification occurs. One molecule of a clotting factoriscapable of activating many molecules of the next enzymeinthe sequence and so forth. The final step in blood clotting involves 0-8412-0549-3/80/47-124-425$05.00/0 © 1980 American Chemical Society In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch024

426

C O M P U T E R APPLICATIONS T O C H E M I C A L ENGINEERING

the polymerization of fibrinogen to fibrin. This reaction is catalysed by the clotting factor thrombin. Obviously the ability of blood to clot is extremely important when one has a wound or cut. However when clots form inside a vein or an artery a serious problem exists. Anticoagulant drugs are given to prevent this latter situation. Recent experimental evidence (3^4.) has demonstrated that heparin's anticoagulant effect results from its ability to catalyse the deactivation of several of the clotting factors. Of particular importance and the primary reason for heparin's anticoagulant effect is the drug's ability to deactivate thrombin by catalysing the reaction between thrombin and its inhibitor antithrombin III (AT-III). Because it acts directly to deactivate clotting factors, heparin has a very fast anticoagulant effect. Laboratory Measurement and Goals of Anticoagulant Therapy. For in-hospital patients receiving heparin, a blood sample is drawn, at least daily. The red cells are centrifuged from the sample leaving only plasma. An agent that activates the clotting cascade is added to a fixed amount of plasma. The time required for a clot to form, called the clotting time, is then measured. In addition to the patient's plasma, normal plasma is also tested. The goal of anticoagulant therapy is to have the patient's clotting time be 2 to 2-1/2 times that for the normal plasma. For heparin the most common clotting test is called the partial thromboplastin time, PTT, Modeling and Optimal Control of Heparin Modeling Heparin Itself. For heparin it is reasonable to use the CSTR model shown in Figure 1, Drug can be inputted to the reactor either by a bolus injection (impulse forcing) or by continuous intravenous infusion, Within the reactor drug is continuously removed from the blood, However, the mechanism of this removal is at present unknown. As discussed by McAvoy (5) there are some interesting dynamic properties associated with "the response of hep^ arin itself. Figure 2 shows a plot of experimental data on heparin together with the response of one model that has been proposed for the drug (j>). To generate the experimental data, three different bolus injections of heparin were given to healthy volunteers. Blood samples were then drawn periodically and heparin concentrations measured. When the logarithm of heparin concentration is plotted versus time, an apparently linear response is obtained. However, the slope of the response changes with each bolus. This change in slope indicates that an unusual nonlinear phenomena takes place when humans eliminate heparin. Stated mathematically, the initial condition inside the CSTR somehow is stored and it affects the entire transient response of the drug. The model response plotted in Figure 2 is based on the following metabolite-inhibition mechanism {§)

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch024

Figure 1.

CSTR model for heparin

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

COMPUTER

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch024

428

APPLICATIONS

T O CHEMICAL

ENGINEERING

.1.08-

.05·

.02-

.01 ~I20

îeÔ

240

300

360

420

TIME-MINUTES

Figure 2. Heparin data and metabolite-inhibition model for three separate injections of drug. ( ) heparin concentration; (O) experimental data; ( ) metabolite concentration, (a) 400 μ/kg bolus; (b) 200 μ/kg bolus; (c) 100 μ,/kg bolus (5).

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

24.

Anticoagulant

MCAVOY

Drug

Therapy

429

H + E £ HE + M-j+E M

1

+ Ε t M

1

(1 )

M-|E

(2)

- M

(3)

2

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch024

Heparin, H, is assumed to be metabolized by enzyme Ε to product M-. which competes with the drug for binding sites on E, In addition, M-. is biotransformed to which is non-competitive. If the mech­ anism given by equations f-3 is assumed and balances on Η and M, are made for the reactor shown in Figure 1, the following model for heparin results (6j 3Έ

I-V.H/iH + K j l + i y K p ) )

=

(4)

dM, +

V

1+

K

dTV P» - ep 1

where I is the rate of drug infusion divided by the reactor volume. Equations 4 and 5 contain four constants, V , Κ , K and k , These constants were fitted to the experimental data shown τη Figure 2 by numerically integrating the differential equations and then using a least square simplex approach on the results (7_). The values obtained are: V = .938, Κ = 15.7, K = ,385, and k = .00187. The responses predicted by equations 4 and 5 are alio shown in Figure 2. Note that 1=0 for these responses. As can be seen, equations 4 and 5 do an excellent job of fitting the ex­ perimental data. The M, response is given as the dashed line in Figure 2. As can be seen, M, builds up very quickly and achieves an almost constant value for most of the Η transient. In fact it is M, which "remembers" the initial condition in the reactor. In effedt M-| blocks an approximately constant number of binding sites on Ε for each response and this produces the apparent first order response. Since the number of blocked sites increases with the initial condition for H, the slope of each of the Η responses is different. In addition to the metabolite-inhibition model, McAvoy also presents an alternative model for heparin involving two non­ linear differential equations and based on a phagocytosis elimina­ tion mechanism (5J. =

k

M

5

p

p

Modeling the Clotting Time. Since the main objective of hep­ arin therapy is to control a patient's clotting time (normally the PTT), it is necessary to have a model for the clotting time. Both the nature of the clotting cascade and published experimental re­ sults (8) indicate that clotting time is not a simple function of heparin concentration alone. Other variables which affect the clotting time include the concentration and degree of activation of the various clotting factors and the concentration of other pro­ teins in the blood, such as antithrombin III. There is a degree

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch024

430

COMPUTER

APPLICATIONS

TO

CHEMICAL

ENGINEERING

of uncertainty at present as to what models will ultimately prove useful in describing heparin's effect on the clotting time because the necessary experimental data have not yet been gathered. The author is involved in a research program to generate these data. To illustrate the type of modeling approach that will be studied as well as the control problem which results, one specific example involving antithrombin III will be discussed in detail. This ex­ ample is typical of the modeling which will be carried out. Rosenberg's data (4) indicate that heparin binds to AT-III, while those of Marciniak (9) show that such binding does not take place. Both authors, however, agree that heparin's main route of action is via the enhancement of the inhibitory reaction which takes place between AT-III and thrombin. Marciniak and Gockerman (10) have also recently published data on AT-III for 24 patients receiving heparin infusions. These authors found that heparin therapy produced an exponential like transient decay in AT-III levels. After 3 days of heparin therapy AT-III levels approached a constant value which was 30% lower than normal. After cessation of heparin, AT-III levels returned to normal in about 3 days. Since AT-III is so important to heparin's action, it is pro­ posed to model its dynamic behavior, and to attempt to incorporate its concentration into an equation for clotting time. Thus, one equation which is proposed for describing clotting time is Ε = g (H, AT-III)

(6)

where Ε, the relative extension of the clotting time, is defined as Ε = (PTT/PTT - 1)

(7)

n

and PTT is the clotting time and PTT is the normal clotting time. The reason for considering an algebraic relationship between E, AT-III,and.Η is that the results of Rosenberg (4) indicate that heparin almost instantaneously catalyses the deactivation of throm­ bin by AT-III. Free thrombin levels in turn affect E. Thus, changes in both heparin level and AT-III level should have a very rapid effect on E. In order to make equation 6 more specific it will be assumed that heparin binds to antithrombin III n

Η + AT-III t

(H-AT-III)

(8)

Further, it will be assumed that Ε is proportional to the concen­ tration of the heparin antithrombin III cofactor Ε = m (H-AT-III)

(9)

If thermodynamic equilibrium is assumed for equation 8, equation 9 can be written as

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

24.

MCAVOY

Anticoagulant

Ε = m K

Drug

Therapy

431

(H)(AT-III)

eq

(10)

where Κ is the equilibrium constant for equation 8, To complete the modër it is necessary to have an equation for antithrombin III. One model which Marciniak and Gockerman's data (10) suggest will be appropriate is (AT-III) = - k (AT-III - AT-III ) - k H

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch024

ft

0

g

(11)

where k. and kg are constants and AT-III is the normal blood concentration of antithrombin III. At steaay state with no heparin present equation 11 forces AT-III to return to its steady state value. From Marciniak and Gockerman's data a value of AT-III can be gotten as 36 mg/d£. To achieve a 3 day transient response for AT-III a reasonable value of k. to use is .001 min. Lastly, if a steady state heparin concentration of .5 units/ml plasma produces the 30% reduction in AT-III levels then k can be calculated as .0216 ((mg/d*)/(units/ml min)) by setting d(AT-III)/dt = 0. R D

Optimal Control of Heparin Therapy. One complete model for a patient's response to heparin is given by equations 4, 5, 10 and 11. All of the parameters in the model have been specified except m Κ in equation 10. A reasonable value for m Κ can be gotten byassuming that Ε is 1,0 when Η is .5 and AT-IIT is 70% of AT-III . This assumption gives m K as .0794. Using this model and modern control theory it is possible to formulate an optimum dosing policy. Prior to heparin being administered the initial conditions in the CSTR are that AT-III equals AT-III and both Η and M, are 0. One clinically reasonable performance index is to choose the heparin infusion, I, to minimize the time that it takes to get from this initial state to an anticoagulated state where the clotting time is twice normal (E = 1). Mathematically one should minimize the performance index q

P.I. = J

e f Q

dt

(12)

subject to E(e ) = 1 = .0794 (H)(AT-III) f

(13)

In addition, I would be constrained to be less than some maximum clinically acceptable value I* I < I*

(14)

A reasonable value for I* is .968 units/hr ml plasma. This value results from a maximum infusion rate of 3000 units/hr into a typ­ ical plasma volume of 3100 ml. The problem posed involves time optimal control to a region. The approach which can be used to

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

432

COMPUTER

TO

CHEMICAL

ENGINEERING

solve this problem has been discussed by Denn (11). By appending 3 adjoint equations to the state equations, one can start at the final time, θ^, and numerically integrate backwards in time to solve for the optimal policy. To carry out the integration it is necessary to estimate H(e ) and M-.(e) and iterate on these values until the initial conditions on M; and AT-III are satisfied. The time optimal policy calls for an initial injection of 1420 units of heparin with no infusion (I = 0) for 5.25 minutes. Once a pa­ tient is brought to an anticoagulated state it is necessary to keep him there and still not violate equation 14, McAvoy {5) has presented an infusion policy which instantaneously brings a patient to an anticoagulated state but which requires subsequent infusion rates about 1.5 times greater than I* = .968. By solving the state equations 4, 5, and 11 subject to equations 13 and 14 it is pos­ sible to calculate the infusion policy necessary to keep a patient anticoagulated after the initial time optimal period. Indeed it is this latter infusion period where Ε = 1 and equation 14 holds which determines the 5.25 minute duration of the time optimal per­ iod. As I* becomes larger the duration of the time optimal period becomes shorter and it eventually becomes 0 (solution given by McAvoy {$)). At 5.25 minutes I jumps to I* and then begins to taper in an exponential-like manner as shown in Figure 3. As can be seen, I tapers over a period of 500 minutes and eventually reaches a steady state value of .257 units/hr ml plasma. Also shown in Figure 3 is the response of Ε to the optimal infusion policy. It is interesting to compare the policy shown in Figure 3 to current clinical practice since reasonable parameter values were used in the heparin model. Very often it is found that a patient's need for heparin is greater during the early stages of therapy than later on. In the medical literature this has been referred to as initial resistance to heparin therapy. Generally heparin infusion rates are lowered over a period of several days. The in­ fusion policy shown in Figure 3 does exhibit a tapering transient but the time involved, 500 minutes, is shorter than that observed clinically. This discrepancy may indicate the necessity to refine the model possibly by having the heparin response tied to the slow­ er response of antithrombin III. f

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch024

APPLICATIONS

f

Clinical Use of the Model In presenting the pharmacokinetic model for heparin some parameters were fitted to data on healthy volunteers while other parameters were arbitrarily chosen. To improve heparin therapy the pharmacokinetic modeling approach discussed here must be used in a prospective, predictive manner. By taking additional blood samples early on in heparin therapy data for each patient can be generated. One would measure such variables as heparin level, AT-III level, PTT, etc. Then, by using the model presented here or a more accurate model, parameters can be fitted (7_) and the

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Figure 3.

Optimum dosing policy and clotting time response for heparin model. ( dosing policy; ( ) relative extension of clotting time

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch024

) optimum

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch024

434

COMPUTER

APPLICATIONS

T O CHEMICAL

ENGINEERING

model tailor-made to each individual patient, The present model contains 8 parameters. For prospective clinical useitwould be impractical to try to adaptively f i t this many parameters. No doubt it would be necessary to set many of the parametersinthe model to average constant values. With a small number of remaining parameters it would be possible to adaptively fit these parameters to a patient's data. In this way a heparin model and an optimum dosing policy can be tailor-made for each patient. As more data become available they can be incorporated to further refine the model and in this fashion allow for adaptive control of dosage regimens. An alternative to simply fitting parameters in the model is to attempt to correlate them with easily measured clinical variables. Such variables include: age, height, sex, hematocrit, serum creatinine, etc. Jelliffe and his co-workers have successfully used such a correlation approach to improve the therapeutic results achieved with a number of drugs. For example, they reported (12) on two groups of patients treatedatCarmel Hospital with the anti-arrythmic drug lidocaine. A group of 68 patients constituted the standard therapy group. Of these patients 8 developed ventricular fibrillation, 5 had a toxic reaction and 33 required additional lidocaine. Of 71 patients who received the drug based on a computerized correlation approach, 2 developed ventricular fibrillation, 1 had a toxic reaction and only 2 required additional lidocaine. Similar success has also been reported for digitalis drugs (13). While the above modeling approach looks promising,itis necessary to put it into perspective. The approach is not aimed at having a computer replace a physicianindeciding dosing policy. Rather the approach is proposed as an additional, useful tool which physicians can use to improve therapy. The final decision on any dosing policy must of necessity rest with the attending physician. One way of viewing a physician's role in giving drugs is that heisa control engineer dealing with dynamic processes. The above approach simply formalizes this concept. Conclusions This paper has treated modeling, parameter identification and control of the administration of heparin. A model has been developed using a single CSTR with a volume equal to a patient's blood volume. By using available laboratory data, parameters in the drug model can be fitted and the model tailor-made to each individual patient. Once an accurate model is available it can be used to predict optimum dosing policies. The methods presented have the potential of greatly increasing the efficacy of heparin administration.

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

24. McAVOY Anticoagulant Drug Therapy

435

Abstract A pharmacokinetic model which describes a patient's response to the widely used anticoagulant drug, heparin, is discussed. The model contains several unknown parameters. A patient's own past data can be used to identify these parameters and thus tailor-make a model for each individual under treatment. Once such a model is available it can be used to calculate optimum dosing policies to achieve a specified therapeutic goal. Literature Cited

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch024

1.

Wessler, S. "Current Dilemmas in the Clinical Use of Heparin," Fed. Proc., 1977, 36, 66-69. 2. Wessler, S. "A Heparin Symposium," Current Ther. Res., 1975, 18, 3-5. 3. Rosenberg, R. "Actions and Interactions of Antithrombin and Heparin," N. Engl. J. Med., 1975, 292, 146-151. 4. Rosenberg, R. "Chemistry of the Hemostatic Mechanism and Its Relationship to the Action of Heparin," Fed. Proc., 1977, 36, 10-19. 5. McAvoy, T. J. "Pharmacokinetic Modeling of Heparin and Its Clinical Implications," J. Pharm. Biopharm., 1979, 7, 331-354. 6. Perrier, D.; Ashley, J.; Levy, G. "Effect of Production Inhibition on Kinetics of Drug Elimination," J. Pharm. Biopharm., 1973, 1, 231-242 7. D'Argenio, D. Z.; Schumitzky, A. "A Program for Simulation and Parameter Estimation in Pharmacokinetic Systems," Comput. Programs in Biomed., 1979, 9, 115-134. 8. Hirsh, J.; VanAken, W. G.; Gallus, S. G.; Dollery, C. T.; Cade, J. F.; Yung, W. L. "Heparin Kinetics in Venous Thrombosis and Pulmonary Embolism," Circulation, 1976,53,691-695, 9. Marciniak, E. "Binding of Heparin in Vitro and In Vivo to Plasma Proteins," J. Lab. Clin. Med., 1974, 84, 344-356. 10. Marciniak, E.; Gockerman, J. "Heparin-Induced Decrease in Circulating Antithrombin III," Lancet, 1977, II, 581-584. 11. Denn, M. "Optimization By Variational Methods"; McGraw-Hill: New York, 1969, pp. 189-191. 12. Jelliffe, R.; Rodman, J.; Kolb, E. "Clinical Studies with Computer-Assisted Lidocaine Infusion Regimens," Circulation, 1976, 54, II-211. 13. Jelliffe, R.; Buell, J.; Kabala, R. "Reduction of Digitalis Toxicity by Computer-Assisted Glycoside Dosage Regimens," Ann. Int. Med., 1972, 77, 891-906. RECEIVED November 5,

1979.

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

25 Linking Process Simulators to a Refinery Linear Programming Model ANDRE W. POLLACK and W. DONALD LIEDER 1

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch025

Suntech, Inc., P.O. Box 1135, Marcus Hook, PA 19061

The use of linear programming to optimize the flow of process streams through a petroleum refinery began in the mid-1950's (Symonds, 1955: Manne, 1956). Now, almost twenty-five years later, it is safe to say that one half of U.S. refining capacity is represented by linear programming or LP models which are routinely optimized to schedule operations, evaluate feedstocks, and study new process configurations. The database for these refinery LP models is a mixture of economic and technical inputs. Economic inputs include the availability and price of refinery raw materials, the variable cost of operating the individual process units, and the demand and price for refinery products. Technical inputs include refinery product specifications as well as the operating constraints, usage of equipment and utilities, product yields, and product properties for each process unit. The economic inputs are of vital concern to a petroleum refining company and various groups within the company are charged with monitoring and forecasting this information. For this reason, economic inputs are probably the easiest values to maintain and update in the refinery LP database. And for the same reason, specifications on refinery products are also easy to maintain and update. Plant operating constraints are readily obtained from design data and operating history. There is usually little need to update these constraints unless the plant is debottlenecked or we want to study some new process configuration. Unfortunately, the remaining technical inputs which characterize plant performance are extremely difficult to maintain and update. For whether we measure the usage of equipment and u t i l i t i e s , the product yields, and the product properties directly from a plant survey or whether we compute these inputs using a process simulator fitted to the plant, one fact is uncomfortably clear. The values are good only for the feed and operating concurrent Address: Sun Petroleum Products Company, Toledo, OH. -1

0-8412-0549-3/80/47-124-437$05.00/0 © 1980 American Chemical Society

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

COMPUTER

438

ditions run.

at

the

That

for

is

the

survey or

TO

CHEMICAL

specified

in

new

sor.

facilitate

automatically generates and stores

and the product properties

processor

are

catalytic

cracker

In

for

s i x process

three already e x i s t i n g process or FCC simulator,

paper,

the

units at Sun

Linked

to

the pre­

simulators: a

fluid

a hydrocracker simulator, and

we describe the preprocessor,

and how we linked

results

in

the product

reformer simulator.

this

ulators,

a

the maintenance and updating of plant p e r f o r ­

This preprocessor

a catalytic

at

we have developed and implemented an LP preproces­

database the usage of equipment and u t i l i t i e s ,

yields,

these

level.

Petroleum Products Company's Toledo Refinery.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch025

inputs

approximate plant performance on a new feed or

operating To

The

the computer,

why the r e f i n e r y LP database often contains

to

mance inputs,

LP

ENGINEERING

more than one plant operation and the LP model "blends"

operations

LP

time of

APPLICATIONS

made possible

them together.

the process

We also

through the use of

the

sim­

discuss some

preprocessor.

Preprocessor The

operation of

Figure 1.

In

There are

the

the preprocessor f i v e basic

is

ο

Select

ο

Build and report

ο

Generate crude data

crude assay

data

input

tables

ο

Generate process

ο

Build and access LP data

first

step,

shown schematically in

steps:

data

the preprocessor

tables accesses

the disc

file

which contains a l l of Sun Petroleum Products Company's crude assays.

The preprocessor

which the user has crude mix or

to be made available to

mental r e f i n e r y feed. any

five In

tables

extracts assay data

The user

those

part

of

the LP model as

can i d e n t i f y

up to

crudes the base

an i n c r e ­

ten crudes

of which can be designated as incremental. the

second step,

the preprocessor builds

showing the extracted

also prints out

in

tabular

has s p e c i f i e d by card input

crude assay data.

form a l l for

Crude

ο

Propane deasphalter

distillation

stored

may

alter

user

units:

FCC

ο

Gas o i l hydrocracker

ο

Motor reformer

ο

BTX reformer

in

information which the

unit

Base operating conditions and unit are

and p r i n t s out The preprocessor

the following process

ο ο

or

for

i d e n t i f i e d by card input as

the preprocessor.

any of

the base values

parameters

The user, to

for

these s i x units

through card

input,

define a new base operation

to add one or more alternate operations. In

the

third

properties of

step,

the preprocessor

generates

the products obtained by crude

the y i e l d s and

distillation

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

and

POLLACK

A N D

LiEDER

Refinery

Linear

Programming

439

CRUDE

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch025

SELECT USER

CRUDE

INPUT

ASSAY

ASSAY

DATABASE

DATA

BUILD/REPORT INPUT

INPUT

TABLES

DATA TABLES

GENERATE CRUDE DATA

PROCESS SIMULATOR

GENERATE

SUBROUTINES

PROCESS DATA

BUILD/ACCESS LP

L P DATA

DATA

TABLES

uO

TOLEDO LP DATABASE

TABLES

Figure 1.

Program flowsheet of LP preprocessor

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

COMPUTER

440 propane deasphalting of refinery and

feed.

into results

asphalting operations In

the

and

for

calls

in

user.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch025

the

For each of

for a l l base and alternate operations the

FCC operations,

the

plus vacuum gas

a l l of

the hydrocracker operations,

For a l l of are

light

cycle

eration.

those of

are

those of

s p e c i f i e d by the

feed properties

are

o i l from the base crude deasphalter the

overhead.

feed properties

are

Finally,

computes

the the

operations,

the

from the base hydrocracker op­

the BTX reformer

hydrocrackate

for

operations,

the

fifth

step,

inputs into stored

in

with a

fixed

the base operation.

the preprocessor

tables

oper­

the process simulator

feed property about

and f i n a l

same time they are

feed prop­

from the base hydrocracker

each process u n i t ,

change in plant performance associated

plant performance

feed prop­

the BTX naphtha from the base crude mix

perturbation of each

which are

assembles

printed out

the

at

the

the Toledo LP database.

FCC Simulator The

original

FCC simulator was a stand-alone

gram purchased from the Pace Company of Houston, gram proceeds

through a set

the performance of ator

sections

three nested

the

cycle

Conversion per pass

ο

Regenerator

o i l which

is

usually

option, cycle

fractionator

Toledo

is

back to

the

fraction-

There are Figure

2):

recycled,

The program offers user

specifies

than gasoline can

the reactor:

a prime hydrocracker

of which must be recycled

unit.

The pro­ predict

heat balance

three FCC products heavier

at

the

to

and product

cracking u n i t .

loops in the program (see

o i l which part

equations

regenerator

catalytic

ο

be recycled from the

oil,

correlating

computer pro­ Texas.

Recycle rate and composition

Part or a l l of cycle

of

reactor,

of a f l u i d convergence

ο

to

the

and product

the motor naphtha from the base crude mix

For a l l of

blended with l i g h t

The

the prepro­

o i l from the base FCC oper­

the motor reformer

blended with heavy hydrocrackate

In

per­

reformer

the heavy naphtha from the base crude mix blended with

a s p e c i f i e d f r a c t i o n of

ation.

motor

product y i e l d s ,

blended with a s p e c i f i e d f r a c t i o n of

erties

generates plant

these process u n i t s ,

For

erties

crude

and de-

the r e f i n e r y .

mix

ation.

laboratory

distillation

the preprocessor

the atmospheric

those of

each incremental

the appropriate process simulator which computes

For a l l of

those of

ENGINEERING

simple correlations

transform the

usage of equipment and u t i l i t i e s , properties

CHEMICAL

the FCC, gas o i l hydrocracker,

BTX reformer.

cessor

to

uses only

applicable to

fourth step,

formance data

TO

the base crude mix and of

The preprocessor

interpolation procedures

assay data

APPLICATIONS

five

six

feed,

and the bottoms to

out of

the

options.

light

the heavy

or s l u r r y

return entrained

recycle

the

catalyst For any

following eight

variables:

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

re­

25.

POLLACK

A N D

LiEDER

Refinery

Linear

Programming

441

SET UP RUN USER INPUT COMPUTE FJ?ESH FEED CRACKABILITY

FCC PROGRAM CONSTANTS

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch025

COMPUTE TOTAL CYCLE OIL PROPERTIES

COMPUTE RECYCLE 8 WITHDRAWAL RATES

ADJUST CYCLE OIL CUTPOINTS - IF NECESSARY RESET REGENERATOR VARIABLE

COMPUTE CAT CIRCULATION RATE COMPUTE NEW CONVERSION PER PASS YES

COMPUTE REGENERATOR HEAT BALANCE

COMPUTE FCC PERFORMANCE

Figure 2. Program of FCC simulator

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

COMPUTER

442

The

the

CHEMICAL

Withdrawal rate of l i g h t cycle o i l

ο

Recycle rate of

l i g h t cycle o i l

ο

I n i t i a l boiling

point of heavy cycle o i l

ο

Withdrawal rate of heavy cycle o i l

ο

Recycle rate of heavy cycle

ο

Final boiling

ο

Withdrawal rate of

ο

Recycle

slurry o i l

slurry o i l are

is

determined by

the p r i n c i p a l

predicting recycle this

oil

variable

is

correlating

and supports

In lected

the

the

In

resolved by computing the

conversion per

and outer

regenerator variable

catalyst

loop, to

catalyst

the reactor heat

pass.

the program adjusts

satisfy

in

the

a user-se­

the heat balance

in

the

regenerator.

The a

third

variable

rate and composition.

c i r c u l a t i o n rate which simultaneously s a t i s f i e s balance

trial-and-error

loop.

Conversion per pass second loop,

ENGINEERING

point of heavy cycle o i l

rate of

inner convergence

the equations

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch025

TO

o

remaining three variables

in

APPLICATIONS

FCC simulator program was converted

few years ago and incorporated

model representing finery.

It

is

a complex of process units

this

to

subroutine form

into a nonlinear programming in

the Toledo

re­

subroutine version which has been linked with

the LP preprocessor. The

Hydrocracker Simulator The

o r i g i n a l hydrocracker

as a stand-alone

fundamental reaction of

The program is based on a

k i n e t i c model and predicts

the

performance

two multi-bed reactors with inter-bed quench zones,

low a

simulator was developed in-house

computer program.

pressure

separators,

simplified

cracker

flowsheet

feed

is

and a product

of

the Toledo hydrocracker.

defined by twenty-six

go hydrocracking, ring

fractionator.

opening,

high and Figure 3

components which can under­

hydrodealkylation, hydrogénation

and

denitrogenation reactions.

Reaction rate expressions

the

dual

catalyst

fects

function nature of

the

is

The hydro-

and the

reflect

inhibiting

ef-

of adsorption. The

program numerically integrates

nent and heat balances

for

the d i f f e r e n t i a l compo-

the combined feed and recycle

through the

i n d i v i d u a l beds of both reactors

addition of

cold quench gas between reactor beds and the

cycling

of

There are

fractionator two nested

bottoms

to

convergence

the

accounting

second reactor

gas for

the

re-

inlet.

loops in the program (see

Figure

4):

In bottoms times

the

ο

Recycle rate and composition

ο

Conversion per pass

inner loop,

recycle

are

the

rate and composition of

determined by successive

accelerated by a secant method.

of recycle

plus makeup gas

routed

to

fractionator

substitution some­

The rate and composition the

reactor

i n l e t s and

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

VIRGIN HEAVY NAPHTHA

Figure 3.

FRACTIONATOR BOTTOMS RECYCLE

Process flowsheet of Toledo hydrocracker

LIGHT HYDROCRACKATE

• GAS + GASOLINE

MAKEUP HYDROGEN

HEAVY HYDROCRACKATE

FRACTIONATION SECTION

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch025

COMPUTER

444

APPLICATIONS

T O CHEMICAL

ENGINEERING

SET UP

USER INPUT

RUN

INTEGRATE

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch025

HYDROCRACKER RATE EQUATIONS

RESET

COMPUTE

RESET

INLET/QUENCH

SEPARATOR

RECYCLE

TEMPERATURES

VAPOR/LIQUID

RATES AND

STREAMS

COMPOSITIONS

IN 2

n d

REACTOR

COMPUTE FRACTIONATION STREAMS

YES

COMPUTE HYDROCRACKER PERFORMANCE

Figure 4.

Program flowsheet of hydrocracker simulator

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch025

25.

POLLACK

A N D

LiEDER

Refinery

Linear

Programming

445

quench zones are a l s o determined in the same inner loop using successive s u b s t i t u t i o n . In the outer loop, bed i n l e t temperatures in the second r e ­ actor are a l l adjusted by equal increments as the program con­ verges on a t a r g e t conversion per pass. The hydrocracker simulator was a l s o converted to subroutine form f o r i n c l u s i o n in the n o n l i n e a r programming model of the Toledo process complex. The subroutine was considerably s i m p l i ­ f i e d , however, to save computer time and memory. The major d i f ­ ferences are: (1) the f r a c t i o n a t i o n s e c t i o n is represented by c o r r e l a t i o n s i n s t e a d of by a multi-stage s e p a r a t i o n model, (2) high pressure f l a s h c a l c u l a t i o n s use f i x e d e q u i l i b r i u m K-values instead of r e - e v a l u a t i n g them as a f u n c t i o n of composition, and (3) the beds in each r e a c t o r are t r e a t e d as one isothermal bed, e l i m i n a t i n g the need f o r heat balance equations. The Reformer Simulator The o r i g i n a l reformer simulator was a stand-alone computer program purchased from the Pace Company o f Houston, Texas. The program is based on a r e a c t i o n k i n e t i c model and p r e d i c t s the performance o f up to f i v e f i x e d bed r e a c t o r s with i n t e r h e a t e r s and a high pressure f l a s h separator. In i t s present v e r s i o n , the stand-alone program handles a feed defined by t h i r t y - n i n e components undergoing dehydrogenation, d e h y d r o c y c l i z a t i o n , hydrocracking, h y d r o d e a l k y l a t i o n , and i s o m e r i z a t i o n r e a c t i o n s . Re­ a c t i o n r a t e expressions r e f l e c t the dual f u n c t i o n nature of the c a t a l y s t , but a d s o r p t i o n e f f e c t s are neglected. The program nu­ m e r i c a l l y i n t e g r a t e s the d i f f e r e n t i a l component and heat balances f o r the combined feed and r e c y c l e gas through the r e a c t o r s , per­ forms the f l a s h c a l c u l a t i o n s in the high pressure separator, and computes the p r o p e r t i e s of the C 5 + p o r t i o n of the reformer prod­ uct. There are two nested loops in the program (see Figure 5 ) : ο Composition of the r e c y c l e gas ο Octane number of the C 5 + reformate In the inner loop, the composition of the hydrogen r e c y c l e gas is determined by successive s u b s t i t u t i o n . I f a target r e f ­ ormate octane is s p e c i f i e d , an outer loop adjusts the i n l e t temp­ eratures to a l l the r e a c t o r s by equal increments u n t i l the t a r g e t is reached. The reformer simulator was converted to subroutine form f o r i n c l u s i o n in n o n l i n e a r programming models of two r e f i n e r y com­ plexes. To save computer time and memory, the subroutine uses a l i n e a r i z e d v e r s i o n of the o r i g i n a l k i n e t i c model, with 28 compo­ nents and 33 r e a c t i o n s . Instead of numerical i n t e g r a t i o n , the l i n e a r i z e d model is solved a n a l y t i c a l l y at constant temperature, pressure, and t o t a l mois using s p e c i a l subroutines to f i n d the eigenvalues and eigenvectors of the r e a c t i o n r a t e constant matrix.

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

446

COMPUTER

APPLICATIONS

USER

S E T UP

INPUT

RUN

T O CHEMICAL

ENGINEERING

D

REFORMER PROGRAM

CONSTANTS

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch025

INTEGRATE REFORMER RATE EQUATIONS

RESET

COMPUTE

RESET

REFORMER

SEPARATOR

RECYCLE

INLET

VAPOR/LIQUID

COMPOSITION

TEMPERATURES

STREAMS

Ï YES

COMPUTE

C + 5

REFORMATE PROPERTIES

COMPUTE REFORMER PERFORMANCE

Figure 5.

Program flowsheet of reformer simulator

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

25.

POLLACK

Linking

FCC simulator

requires

of measured properties

such as

bottom carbon,

as

as

well

surements such as and

in

the

preprocessor adjusting cording gas

in

to

oils

assay

creates

the

the

standard

the

for

of

oils

of

gas

s p e c i f i e d for

in

the

the base mix

atmospheric

unit and (2) according

the properties

done by l i n e a r

tween i n i t i a l

and f i n a l

Properties

are

to

of

points

as

blended according

the

to

surements expressed in weight percent are gravity

to

put

them on a weight

of blending molecular weight, gravity

FCC simulator

operation

operating values

and vacuum the

atmospheric

its

proportion

deasphalter

standard

crude

the midpoint be­

independent

volume so

vari­

that mea­

m u l t i p l i e d by s p e c i f i c

per unit volume b a s i s .

the

(1)

preprocessor

blends

Instead specific

divided by molecular weight.

The its

the

re­

ac­

computing

of

i n t e r p o l a t i o n using

boiling

are The

the base FCC feed by

each crude

from each crude

is

all

of

requires

a description of

equipment dimensions and

and unit parameters.

these are

however,

specifying

also

terms of

variables

for

user,

in

stored

can change the

in

Standard or

the

values

preprocessor of

Seven operating variables bed

ο

any of

e f f i c i e n c y and gasoline

Steam and operating

ο

Maximum regenerator bed temperature

cost

following

FCC simulator was linked

to

the preprocessor

simulator would sometimes

that

the

in either

the

recycle

case

happens, boiling

loop or

the

user

point of

per pass

for

the base or

the

user

in

the

following whenever

selecting

can change the the

fail

to

heavy cycle

initial

of

Values of

the

FCC simulator operation or

when f a i l u r e

puted heavy

converge

o i l and the

preprocessor fails

to

In of

conversion To a s s i s t prints

out

converge:

feed property

change

occurred

a l l operating

time of

and was

estimates

any alternate FCC operation.

the

it

conversion per pass loop.

new estimates,

Identity

the

and feed perturbations, the

re­

factors

discovered

ο

database.

selectivity

ο

ο

default

reactor

Twenty-seven unit parameters including

operations

final

unit and

feed rate

tested on alternate

this

the

including

temperature and fresh

actor

When the

the

constraints,

the base and alternate FCC operations:

ο

the

o i l cuts.

the base FCC feed composed of

Adjustment of

in

carbon in aromatic

the base mix along with a s p e c i f i e d f r a c t i o n

able.

and Rams-

derived from physical mea­

distillation

assay cuts

feed in terms

the necessary properties

properties

crude

the

distillation,

two standard

cuts of

cutpoints

from the

vacuum gas

a description of gravity,

A l l of

crude

overhead.

The

447

molecular weight and percent

blended properties and

Programming

properties

cycloparaffin rings.

ported

Linear

The FCC Simulator To The Preprocessor

The

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch025

Refinery

A N D LiEDER

failure, cycle

and feed variables including

the

at

last-com­

o i l endpoint and conversion

per pass

American Chemical Society Library 1155to Chemical 16th st.Engineering; N. w. Squires, R., el al.; In Computer Applications ACS Symposium Series; American Chemical Washington, DC, 1980. Washington, D. C. Society: 20036

448

To

COMPUTER

avoid convergence

the

FCC simulator,

feed property

problems during

to

all

the values

CHEMICAL

ENGINEERING

feed perturbation runs of

we have made adjustments

change and reset

feed perturbation

APPLICATIONS TO

initial

to

the

size

of

each

estimates before

computed by the

simulator

each

for

the

base FCC operation. Linking

The Hydrocracker Simulator To The Preprocessor

The cut

feed

operation. each

of

the hydrocracker

the

The hydrocracker

these feeds

in Table

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch025

to

consists

from the base crude mix and l i g h t

I.

Since

in

the heavy naphtha

o i l from the base FCC

requires

a description of

the hydrocarbon components shown

these components

crude assay nor are

special

simulator

terms of

of

cycle

are

not

d i r e c t l y measured

in

they predicted by the FCC simulator,

techniques were developed to

estimate

them from available

data. For lowing

the heavy naphtha cut technique

is

From each

1.

from the base crude mix,

used by the

weight, rings

crude assay,

per molecule are o i l cuts

These data are

2.

the

density,

and average aromatic

saturate and aromatic two gas

fol-

obtained for both

linearly

tillation

unit.

and

boiling

molecular

and c y c l o p a r a f f i n

fraction

distilled

heavy naphtha cut final

the

preprocessor:

in

the

of

the

to

the

crude

midpoint between

points

is

the

laboratory.

extrapolated

s p e c i f i e d for Again,

the

from each

disinitial

the independent

variable. 3.

Component mol fractions are

equations.

The equations

cycloparaffin

equations

relating

C o e f f i c i e n t s for

analytical

light

The the

change the

simulator also

operation

in

values

are of

stored any of

a

cor-

based on various carbon as is

in-

aromatic

based on mass

oils. requires

terms of

operating v a r i a b l e s ,

default values

computed for

These properties

and percent

The c o r r e l a t i o n

data on FCC cycle

hydrocracker

constraints, or

FCC simulator.

molecular weight,

unit and i t s

are

from the base mix.

o i l from the base FCC operation,

and c y c l o p a r a f f i n r i n g .

spectrometer

the em-

data on a number of

component mol fractions

computed by the

clude density, ring

cycle the

distribution

feeds.

the heavy naphtha cut predicts

and

as em-

equations were derived from mass

Blended component fractions

4.

properties

ring

cut

of

aromatic

average.

ring

a set

as well

to

spectrometer

the

include

r i n g balances

v i r g i n hydrocracker

For

each heavy naphtha

pirical pirical

relation

in

then determined by solution of

in the

a description of

equipment dimensions and

and unit parameters.

the

preprocessor.

following

in

Standard

The user

specifying

can

the base

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

25.

Refinery

P O L L A C K A N D LiEDER

Linear

TABLE

Programming

I

HYDROCARBON COMPONENTS RECOGNIZED BY HYDROCRACKER SIMULATOR

Hydrogen Methane

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch025

Ethane Propane i/n

Butanes

C /C 5

Paraffins

6

Benzene Methylcyclopentane C

7

-

C

Paraffins

1 2

Single Ring Cycloparaffins Single Ring Aromatics

C

13

+

P

a

r

a

f

f

i

n

s

Double Ring Cycloparaffins Double Ring Aromatic Cycloparaffins Double Ring Aromatics Multi

Ring Cycloparaffins

Multi

Ring Aromatic Cycloparaffins

Multi

Ring Aromatics

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

449

450

COMPUTER

and

alternate

APPLICATIONS TO

CHEMICAL

ENGINEERING

operations:

ο

Eight

operating variables

version per pass ο

Five unit

including

con­

and feed rate

parameters

including

metal and acid a c t i v i t i e s

catalyst

in

both

re­

actors ο No cracker of

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch025

Linking

and feed property

simulator also

Fortunately,

most of

crude assay and are For

(1)

crude,

distillation of

boiling

determines

at

(3)

For

the

tributes

for

overhead for for

the

crude

each naphtha the compo­ initial

and f i n a l

the blended compositions of

the

from the base crude mix. hydrocrackates,

the hydrocracker

a product f r a c t i o n a t i o n subroutine which

components between adjacent

Fenske-type

the

component present

specified

remaining between the

the heavy and l i g h t includes

each

fraction d i s t i l l e d

and ( 4 ) computes

motor and BTX naphthas simulator

from the base crude mix,

the amount of

constructs

the material

points,

the

shown in

these components are measured in

the naphtha cutpoints

unit,

These are

predicted by the hydrocracker simulator.

( 2 ) computes

component

sition

changes.

requires a description of

the motor and BTX naphthas

preprocessor the

the hydro-

and running on a wide range

terms of hydrocarbon components.

Table I I .

in

the preprocessor

operations

reformer

in

each

factors

The Reformer Simulator To The Preprocessor

The

the

steam and operating cost

problems were found in l i n k i n g

simulator to

alternate

feed

Fuel,

convergence

fractionator

cuts

dis­

using a

formulation.

Standard or operations

are

the values

of

default values

stored any of

in

for

the motor and BTX reforming

the preprocessor.

the

following

in

The user

specifying

can change

the base or any

alternate operation: ο

Six operating variables former,

nine

for

cluding

target

for

the motor

the BTX reformer,

reformate

re­ in­

octane and feed

rate ο

Three unit acid

parameters

activities

idealized ο

Fuel,

of

including metal and the

catalyst

in

the

single reactor

steam,

operating cost,

and capacity

factors To loops the

speed the operation of

in

inner

fractions It

the

linked

loop,

after

of

and heavier

was found

C4

that

are

assumed to

the

rate of

of

the

reformer

the

a certain in

number of the

s l i g h t variations

react

in

the

preprocessor,

the

convergence

simulator have been modified. recycle in

iterations, gas

are

In

the mole

held

constant.

these components (which

reforming k i n e t i c

model)

convergence without materially improving

slowed down the

results.

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

accuracy

Refinery

P O L L A C K A N D LiEDER

TABLE

Linear

Programming

II

HYDROCARBON COMPONENTS RECOGNIZED BY

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch025

REFORMER SIMULATOR

Hydrogen

Toluene

Methane

C3

Ethane

Cg Cycloparaffins

Propane

Cg Aromatics

i-Butane

C9

Paraffins

n-Butane

C9

Cycloparaffins

Cg

Aromatics

Pentanes +

Cyclopentane

Hexanes

C"LO

Cyclohexane

c

Me thyIcyclopentane

Paraffins

Paraffins

10

c

C^Q

y

c

l ° P

a

r

a

f

f

i

n

s

Aromatics

Benzene

c

Heptanes

Cn+

Cycloparaf f i n s

Methylcyclohexane

C +

Aromatics

C7

l l

n Ί

+

Paraffins

Cyclopentanes

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

452

COMPUTER

For

the outer

loop,

the preprocessor

erature by secant method to Structure The

satisfy

adjusts

target

ENGINEERING

isothermal temp­

octane.

generates

the

following

activities

in

the

LP matrix: Activities

1.

matrix and

in five

preserve

crude

lation

distillation

incremental crude operations. properties

for downstream

or product blending,

cuts

unit sub-

the base crude mix operation

their

processing enter

the

represent

up to

To

Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch025

the

CHEMICAL

Of The Preprocessor-Generated LP Model preprocessor

refinery

APPLICATIONS TO

from each

the

crude unit

separate and d i s t i n c t

distil­

activity

stream balance

rows. Activities

2.

unit

in

the

propane deasphalting (PDA)

submatrix represent

vacuum tower bottoms and

from the

asphalter enter

incremental crudes.

Each deasphalter

arate row for No. 6 f u e l Activities

3.

and

in

feed

transfers

process

crude

For cients

the

following

enter a sep­

of

motor

represent (1)

the

crude operations

operations,

material

(2)

units

simulating cutpoint, (3) and (4)

changes

feed property.

these a c t i v i t i e s , in

bottoms

o i l blending.

distillation

base and alternate in each

common prop­

units,

between process in

activities

row with

submatrices

streams from each from other

a change

The de-

the FCC, hydrocracker,

BTX reformer

and

operations on

overhead streams from a l l

one stream balance

erties.

the

from the base crude mix

the

preprocessor

computes

coeffi­

refinery LP rows:

ο

Fuel

ο

Operating

and steam balance rows

ο

Equipment usage rows l i m i t i n g

ο

Stream balance rows

ο

Property blending

cost row equipment capacity

rows to meet product

specifi­

cations In

addition,

(FCC,

for

each of

hydrocracker,

generates a set

of

these rows and the that

the unit

distillation To

performance can respond to as well

of

how

this

is

as

changes

process

the

rows.

corresponding feed property

feed from other

see

structure

feed property balance

cutpoint

portion of

the major downstream processing units

motor and BTX reformers),

is

through

change

changes in

preprocessor

It in

activities

crude mix and

properties

or

pro­

units.

accomplished, l e t

a downstream processing unit

us examine submatrix

the

general

(Figure 6 ) .

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

In Computer Applications to Chemical Engineering; Squires, R., el al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

STREAM

ROWS

C O S T OR U S A G E

ROWS

BALANCE

STREAM

ROWS

BALANCE

PROPERTY

ROW

VOLUME

BALANCE

UNIT

ROWS

BALANCE

-P