ASPEN: Advanced Capabilities for Modeling and ... - ACS Publications

economic evaluation system named ASPEN (Advanced System for ... 0-8412-0549-3/80/47-124-293$05.00/0 .... In ASPEN the system is capable of complete au...
1 downloads 0 Views 1MB Size
16 ASPEN: Advanced Capabilities for Modeling and Simulation of Industrial Processes P. W. GALLIER, L. B. EVANS, H . I. BRITT, J. F. BOSTON, and P. K. GUPTA 1

Downloaded by UNIV OF ROCHESTER on July 29, 2013 | http://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch016

Massachusetts Institute of Technology, Cambridge, MA 02139 Abstract A major development effort has been underway at M.I.T. from 1976 to 1979 to develop a next-generation process simulator and economic evaluation system named ASPEN (Advanced System for Process ENgineering). The 150,000-line computer program will simulate the flowsheet of a proposed or operating plant. In addition to calculating detailed heat and material balances, ASPEN can also provide preliminary estimates of capital and operating costs and economic viability. The project is funded by the Department of Energy which will use ASPEN to evaluate process alternatives for fossil energy conversion. This paper describes the advanced engineering capabilities of ASPEN and demonstrates their use by means of an example problem. The advanced capabilities include the ability to model unit operations involving solids, the ability to compute the properties of coal and coal-derived materials, and great flexibility for the user to add specialized models or other computations. In addition to handling the conventional vapor/liquid process operations, the ASPEN library of process models includes solids handling and separation units, a set of generalized reactors, improved flash and distillation unit models and process models from the FLOWTRANsimulator. The user can also include his or her own model or key elements of a model, such as the reaction kinetics, in FORTRAN code. ASPEN is supported by a versatile set of physical property correlations representing the current state-of-the-art. Physical property monitors control the property calculations in accordance with methods and models specified by the user. The user is allowed to specify different combinations of physical property calculation methods in different parts of the process. For specialized components such as coal or limestone, a collection of non-conventional property models is available. ASPEN includes data banks from which the required physical property constants and correlation parameters can be retrieved automatically at run 1

Current

address:

Exxon Corporation,

Florham Park, NJ

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

COMPUTER APPLICATIONS

294

TO CHEMICAL

ENGINEERING

time. Comprehensive data on more than one hundred coals, covering a wide range of ranks and geographical parameters, is included. The paper concludes by presenting an example problem showing how ASPEN is used to model a typical industrial process.

Downloaded by UNIV OF ROCHESTER on July 29, 2013 | http://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch016

Introduction In 1976, the U. S. Department of Energy (then called ERDA) realized the need for "a rapid, efficient, and consistent means of performing its process evaluation functions" {]). With the large government expenditures for fossil energy process development, it was found to be important to identify problems as soon as possible, before beginning costly construction of pilot and demonstration plants. ASPEN (Advanced System for Process ENgineering) was funded at that time to provide this technical and economic analysis for the specialized requirements of fossil energy conversion processes. The project was established at the Massachusetts Institute of Technology for $3,285,000 over three years. The software system, to meet the needs of the 1980·s, has wide f l e x i b i l i t y and capabilities. For processes such as coal gasification or coal liquefaction, it can be used to perform steady state material and energy balances, calculate sizes of equipment, and carry out economic evaluations. Its f l e x i b i l i t y can allow for the handling of coal or other solids in streams and equipment, and its capabilities allow for the simulation of many different types of process equipment and the calculations of physical properties under widely different conditions. Included in this is the ability to analyze conventional chemical and petroleum processes. Another valuable feature is a good preliminary cost estimation capability that permits the comparison of alternative processes on an economically consistent basis at an early stage of development. The methodology of ASPEN has been to build upon present technology and to engage the cooperation of the entire profession. The full-time staff at MIT has involved about 15 people over the past two years, many of them on loan from industry. Where possible, proven industrial software was acquired to start with the present state-of-the-art and then to build upon it. An advisory committee with representatives from industry, government, and universities has met regularly to provide reviews of progress and to help make certain that ASPEN meets the needs of the ultimate user. Over f i f t y companies are on the advisory committee representing diverse industries including fossil energy, petroleum, chemicals, construction, pulp and paper, metals, and food. The ASPEN system is on schedule for a working version to be completed October, 1979. The program system will be comprised of about 150,000 lines of FORTRAN code and data for physical

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

16.

GALLIER ET AL.

ASPEN

295

property and cost data banks. Although it will be a working version at that time, ASPEN will need considerable perfecting and user testing before a mature product can be released to the public. A two year testing project has been proposed to the U.S. Department of Energy for these purposes. Some time before the end of that project (October, 1981), ASPEN could be released in source code form for public use.

Downloaded by UNIV OF ROCHESTER on July 29, 2013 | http://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch016

ASPEN Structures ASPEN has been designed with the user in mind. Early in the project the advisory committee was involved with the staff in developing design criteria for the system. These design criteria set the premises for the ASPEN structures which included the executive system, the computational architecture, data for streams and equipment models, physical property monitors, and others. Some of these are discussed in condensed form below. More complete descriptions can be found in the ASPEN project quarterly reports (2). The executive system is a preprocessor type which develops the actual simulation program. An input translator program reads the user input and generates a FORTRAN main program for execution. The executive programs set up the data structures and generate the computing sequence of equipment models. The flow of information in executing an ASPEN calculation is shown in Figure 1. This structure allows: (1) a larger and variable number of model programs to be executed, (2) FORTRAN statements to be inserted for execution, and (3) the need for only a minimum amount of memory for the simulation in executing an ASPEN calculation. The load module thus created is a tailor made simulation for the problem at hand. The computational architecture is a sequential modular approach with advanced features. To model a process, each equipment module is simulated by a program module. The overall process is simulated by connecting the models together in the same way as the equipment in the flow sheet. When the input streams are known then the outputs can be calculated. The entire flowsheet can be calculated "sequentially" in this manner. Advanced features are discussed below in connection with an example. For the data of streams and equipment models, ASPEN utilizes a plex data structure of the type proposed by Evans, et al. {3). Information is stored in blocks of contiguous locations known~as beads. Beads of any length are created dynamically from a pool of free storage which may be thought of as a lengthy FORTRAN array. The combination of the preprocessor approach and the plex data structure has resulted in the absence of dimensional constraints on the system. There are no maximum numbers of streams, components, models, stages in a column, etc. except as limited by the total memory available.

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

Downloaded by UNIV OF ROCHESTER on July 29, 2013 | http://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch016

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

Figure 1.

ASP EN flow of information

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

Downloaded by UNIV OF ROCHESTER on July 29, 2013 | http://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch016

16.

GALLIER E T A L .

ASPEN

297

The Input Translatoriscompletely table driven. This means that all of the information needed to process input statements (such as names of keywords, default values of data items, etc.) is stored in tables in a file called the System Definition File. Therefore,itiseasy to add keywords or change defaults by changing entries in the System Definition File. In addition to the Input Language tables, almost any "changeable" information related to Input Translation is stored in the System Definition File. This includes unit conversion tables, attribute descriptions, physical property option models, data structure, unit operation model data, and stream requirements, etc. Thusitis easy to add new system parameters without changing any code in the Input Translator. Input Language The ASPEN input language is oriented towards process engineers familiar with chemical engineering calculations, but without extensive knowledge of computer programming. The input can be considered to be made up of paragraphs, sentences, and words. A paragraph begins with a primary keyword and may consist of one or more sentences. Each sentence begins with a secondary keyword that indicates the category of data appearinginthe sentence. Tertiary keywords are used to enter data, and their values are the data items. For example, in the following statement: BLOCK Fl PARAM

FLASH2 TEMP = 310 PRES = l(ATM)

the word BLOCK is a primary keyword indicating that the paragraph contains block data. The user-specified block identifier is Fl and the unit operation model (FLASH2)isa two phase flash with specified temperature and pressure. PARAM is a secondary keyword indicating that the sentence contains block parameters. TEMP and PRES are tertiary keywords whose values are the temperature and pressure respectively. The value of a tertiary keyword may consist of a single data item or a vector of values. The internal units for calculation are basic SI units, but the user may specify optional sets of input and output units which include English engineering, metric engineering (a set specific to the company or installation), or SI units. In addition, the user may specify individual units, such as temperature, that override the set. The input is completely free format, except that primary keywords (and nothing else) must begin in column 1. The order of input language is sorted into a standard order before processing. Although every data item or vector of items has a tertiary keyword, the keyword may be omitted to allow positional input. The default principle is fully exercised and wherever it

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

Downloaded by UNIV OF ROCHESTER on July 29, 2013 | http://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch016

298

COMPUTER

APPLICATIONS TO CHEMICAL

ENGINEERING

is meaningful, default values are provided for items the userneed not supply. As an example of using ASPEN, a simplified flowsheet is shown in Figure 2 for making synthetic natural gas (SNG) from a gasifier effluent. Oils, along with the water, are to be dropped out in a quench. Acid gases are to be removed by scrubbing. In the methanation reactor loop, some product gas is recycled back to dilute the reactor feed. Water is removed by cooling and condensation after the reaction. Figure 3 shows the translation to a block diagram for an ASPEN simulation. Note that control units are shown with the flash blocks in this example to determine what flash temperatures are required to meet some design specifications. Figures 4 and 5 give the input language of the problem and Figure 6 gives an example page of output. Notice an outstanding feature of the input language, that it is self-documenting. The key words in a paragraph, sentence and word structure reveal the meaning and the associated numerical values. In this example, the physical property statements are not shown. Figure 5 also shows the advanced features for design specifications. The DES-SPEC paragraphs show how variables in the problem can be defined, in a DEFINE statement, to be FORTRAN variables which can be used in any FORTRAN statements to define any arbitrary function. Then, any other problem variable can be varied, in a VARY statement, to drive the function to zero. This flexibility in design specifications is quite powerful. FORTRAN statements also can be inserted by the user in the paragraph called FORTRAN. Using the DEFINE sentence, as before, any problem variables may be accessed. Using FORTRAN language, any arbitrary transformation of the problem variables may be made and stored. This extremely flexible capability allows the user to (1) modify block calculations, (2) change stream values, (3) insert user FORTRAN blocks, and (4) execute many other powerful, specific functions. A BEFORE or AFTER statement can be used to make the FORTRAN execution before or after any block. For convergence calculations ASPEN employs some advanced features with the well-proven sequential modular architecture. In many process simulations, the user is responsible for structuring all computations and the computational sequence directly. In ASPEN the system is capable of complete automatic determination of the computational sequence. Alternatively, the user can select certain tear streams and can, in fact, easily specify the entire sequence. In addition, convergence calculations may be combined simultaneously with design specifications. The usual methods would be to embed the design in a convergence loop and meet the design specification in each recycle calculation. A quasiNewton method convergence calculation in ASPEN will allow a simultaneous, more efficient solution for the more difficult problems.

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

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

SOUR GAS ABSBR

Figure 2.

Flowsheet of SNG process

Downloaded by UNIV OF ROCHESTER on July 29, 2013 | http://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch016

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

WATER

OIL

FLASH3

QUENCH

GAS 2

CSPLIT

ABSRB

ACIDGAS

^

7

GAS1

GAS 3

\

\

I /

HEATER

HEAT

GAS 5

^

y_ . I

N

[ SECANT

I I I

GAS 6

RECYC

CONDS

I FLASH2

COND

FSPLIT

GAS 7

^CONTR2

RFRAC

REACT

ASPEN block diagram SNG-process example

GAS 4

Figure 3.

y

SECANT

CONTR1 \

MIXER

MIX

RECYCLE

CONV

\ WEGSTEIN.'

^

Downloaded by UNIV OF ROCHESTER on July 29, 2013 | http://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch016

16.

GALLIER E T A L .

301

ASPEN

NEW TITLE COMPONENTS

•ASPFN SNG PROCESS EXAMPLE * H2 H Y D R O G E N / CO C A R B O N - M O N O X I D E C.H4 M E T H A N F / H 2 0 WATER C6H14

C02 CAPRON-DIOXIOE H2S HYOROGEN-SULFIDE

/ /

HEX ANE

DESCRIBE

Downloaded by UNIV OF ROCHESTER on July 29, 2013 | http://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch016

/ /

THE FLOWSHEET

CONNFCTIVITY

FLOWSHFFT IN=GAS1

OUT=GAS?

ABSRR

IN=GAS2

OUT=GAS3

MIX

IN=GAS3

HEAT

IN=GAS4

0UT=GAS5

REACT

IN=GASS

OUT=GASft

COND

IN=GAS6

OUT=GAS7

RECYC

IN=GAS7

OUT=wECYCLE SNG

:

DEFINE

STREAM

GAS 1

THE FEFD

SUPSTREAM MOLF-FLOW

MIXED

T=600

900

1500 / C6H14 500

DEFINE

ALL BLOCKS FLASH3

PAR&M

T=1S0

MIXER

BLOCK

REACT RFRAC BOPT SMLV=^ ΡΑΡΔΜ T=«00 STOICHIOMETRY CONVERSION

HEATER

COND

HISTOPY

STRM=GAS3 1

1

*

1

1

VFRAC=1.0

/

Cu2 H 2 S 0

0

ACIDGAS

VFPAC=1.0

PRES=H20

PFST=0

HEAT

BLOCK

KEY=H?0

GAS3

RLOCK

BLOC*

IN THE FLOWSHEET

C O CH4 H 2 0 CftHl4

1

FLASH-SPECS

HOPT

3 0 0 / CH4 4 0 0 / C 0 2 7 0 0 / H 2 S 15 /

CSPLIT C0MD=H2

MIX

CO

P=980

S U B S =M I X E D FRAC=

RLOCK

/

Ρ=1000

Η2 Η20

OUENCH

ABSRR

CONDS

STREAMS

:

FRAC.

OIL

0UT=GAS4

RECYCLE

BLOCK

BLOCK

WATER ACIDGAS

OUENCH

FLASH?

RECYC

FSPLÎT

FRAC

RECYCLE

MSG-LEV/EL

TEMP=545

P=H?0 NPKOOF=l I H 2 - 3 / CO - 1 1 CO 1 TEMP=?00

KPHA^F=1 H20 1 / CH4 1

PRFS=«0O

NPKODE=2

0 . 2 S / SNG 0 . 7 S

PROP=^

Figure 4.

/

SIM=4

ASPEN

input SNG-process example

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

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

302

DEFINE

I

Downloaded by UNIV OF ROCHESTER on July 29, 2013 | http://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch016

CONVERGENCE

THE CONVERGENCE

CONV

WEGSTEIN

TEAP

RECYCLE

BLOCK

I

DEFINE

THE COMPUTATIONAL

SEQUENCE

SEO

CONTR1 C0NTP2

SEQUENCE

Q U F N C H ( R E T U R N C O N T R 1 ) A 8 S R B CONV I X HEAT COND ( R E T U R N C O N T R ? ) R F C Y C ( R E T U R N CONV) M

REPORT S I M - O P T I O N S RPAS=0 D E S - S P F C CONDENST C C . DESIGN SPEC CONDENST. C . C O N D E N S E O U T 90% O F T H E WATER P E R P A S S T H R O U G H T H F C . C O N D E N S E R BY M A N I P U L A T I N G T H E T E M P E R A T U R E C . B E T W E E N 1 5 0 AND 2 5 n D E G F . C OEFTNF. DEFINE

CFLOW FMOL CONOS M I X E D H 2 0 X FMOL G A S 6 MIXED H ? 0 F X = .9»X S P E C CFLOW TO X TOL-^PEC .00001 V A R Y B V A R COND P A R A M T E M P L I M I T S LOWER=1SO U P P E R = 2 5 0 F DES-SPFC C C . C · C . C . C . C DEFINE C C . C F X DEFINE

C A L L HURRAY OILOUT DESIGN SPEC OILOUT M A K E S U R E Y O U Q U E N C H T H E I N P U T S T R F A M T O A LOW E N O U G H T E M P E R A T U R E SO T H A T Y O U G E T 9 0 * O F T H F O I L S ( I . E . H E X A N E ) OUT I N T H F O I L P H A S E O F T H E T H P F E P H A S F F L A S H . V A R Y Τ B E T W E E N 1 0 0 ΔΝΟ 2 0 0 O F G P . OILIN DROP

FMOL

GAS1 MIXEO

C6H14

O U T 90% O F T H E O I L S

= 0.900 « OILIN O I L FMOL O I L Μ Ι χ Ε Ο

IN

C6H14

S P E C O T L TO X TOL-SPFC .00001 VARY B V A P QUENCH PARAM TEMP L I M I T S LOWER=100 UPPER=200 F C A L L HURRAY CONVERGENCE CONTR1 SECANT SPEC OILOUT ΡARM M A X I T = 1 S S T E P = - 2 CONVERGENCE CONTR2 SECANT S P E C CONDENST PARM M A X I T = 1 0 S T E P = 1

Figure 5.

ASPEN input SNG-process example

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

REACT &

16.

ASPFM

Downloaded by UNIV OF ROCHESTER on July 29, 2013 | http://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch016

ASPEN

GALLIER ET AL.

VERSION

ONE ASPEN

303

SEQUENCE 1 SNG PROCESS EXAMPLE FOR SIMULATION STREAM S E C T I O N

STREAM SUMMARY: RECYCLE STREAM: RECYCLE FROM: RECYC COMP . COMP. NO. ίο H2 1 CO 2 3 co? 4 CH4 S H20 6 H?S 7 C6H14 TOTALS:

LRS/HR

TO:

08/10/79

Mix

MOLES/HR

0.123160*0? 0.0 0.0 0.353440*04 0.138030*03 0.0 0.143630*04 0.512100*04

DATE: COURSE

0.610930*01 0.0 0.0 0.22031D+03 0.766220*01 0.0 0.166660*0? 0.?5075D*03

MOI Ε PC 2.436 0.0 0.0 87.861 3.056 0.0 6.647

223.96 r>EG. F : PS Τ A : «00.00 1000 RTU/HR: - 1 1 4 4 3 .