Anda di halaman 1dari 56

Aspen Dynamics™ 12.

Aspen Dynamics
Examples
Version: 12.1

August 2003
Copyright © 2003 by Aspen Technology, Inc. All rights reserved.

AspenTech product names that are mentioned in this manual, e.g., Aspen Dynamics™, Aspen Custom Modeler®,
Aspen Plus™, Enterprise Optimization and the aspen leaf logo are trademarks or registered
trademarks of Aspen Technology, Inc., Cambridge, MA.

All other brand and product names are trademarks or registered trademarks of their respective companies.
This manual is intended as a guide to using AspenTech's software. This documentation contains AspenTech
proprietary and confidential information and may not be disclosed, used, or copied without the prior consent of
AspenTech or as set forth in the applicable license agreement. Users are solely responsible for the proper use of the
software and the application of the results obtained.

Although AspenTech has tested the software and reviewed the documentation, the sole warranty for the software
may be found in the applicable license agreement between AspenTech and the user. ASPENTECH MAKES NO
WARRANTY OR REPRESENTATION, EITHER EXPRESSED OR IMPLIED, WITH RESPECT TO THIS
DOCUMENTATION, ITS QUALITY, PERFORMANCE, MERCHANTABILITY, OR FITNESS FOR A
PARTICULAR PURPOSE.

Corporate
Aspen Technology, Inc.
Ten Canal Park
Cambridge, MA 02141-2201
USA
Phone: (1) (617) 949-1000
Fax: (1) (617) 949-1030
URL: http://www.aspentech.com/
Contents

Introduction iii
About This Guide............................................................................................................... iii
Associated Guides.............................................................................................................. iii
What You Need To Use This Guide .................................................................................. iv
For More Information ........................................................................................................ iv
Online Help............................................................................................................ iv
Printing the Portable Document Format Files (PDFs).............................................v
World Wide Web .....................................................................................................v
Technical Support ....................................................................................................v

1 Example Simulations 1-1


DyBatch ........................................................................................................................... 1-2
Using Script Automation in the DyBatch Example............................................. 1-3
Using Tasks in the DyBatch Example ................................................................. 1-4
Files Included with the DyBatch Example .......................................................... 1-4
Running the DyBatch Example ........................................................................... 1-4
BatchDistOpt ................................................................................................................... 1-8
Running the BatchDistOpt Example.................................................................... 1-8
Creating the BatchDistOpt Example.................................................................... 1-9
BatchColumn ................................................................................................................. 1-11
The Aspen Plus Simulation................................................................................ 1-11
Setting Up the Dynamic Simulation .................................................................. 1-12
Running the BatchColumn Example ................................................................. 1-12
Initializing the BatchColumn Example in Aspen Dynamics ............................. 1-12
BatchReactor.................................................................................................................. 1-14
The Aspen Plus Simulation................................................................................ 1-14
Setting Up the Dynamic Simulation .................................................................. 1-14
Running the BatchReactor Example.................................................................. 1-15
Initializing the BatchReactor Example in Aspen Dynamics ............................. 1-15
DyC2splt ........................................................................................................................ 1-16
DyEster .......................................................................................................................... 1-17
DyEtoh ........................................................................................................................... 1-19

Aspen Dynamics Examples Guide Contents • i


DyFlash .......................................................................................................................... 1-19
DyMCH.......................................................................................................................... 1-20
DyPfdtut......................................................................................................................... 1-21
DyMTBE........................................................................................................................ 1-22
Pressure Relief Column Example .................................................................................. 1-23
Pressure Relief Reactor Example .................................................................................. 1-25
Running the Completed Relief Simulation ........................................................ 1-25
Creating the Reactor Relief Simulation ............................................................. 1-26
BatchEster ...................................................................................................................... 1-30
BatchEster1 ........................................................................................................ 1-31
BatchEster2 ........................................................................................................ 1-32
BatchEster3 ........................................................................................................ 1-33
Kinetics Estimation from RC1 Calorimeter Results...................................................... 1-34
Assumptions of the Kinetics Example............................................................... 1-34
Defining the Reaction Mechanism .................................................................... 1-34
About the Experimental Data ............................................................................ 1-36
Running the Kinetics Estimation Example ........................................................ 1-37
GasHDPE....................................................................................................................... 1-38
Running the GasHDPE Example ....................................................................... 1-40
Nylon6 ........................................................................................................................... 1-41
Running the Nylon6 Example............................................................................ 1-42
Polystyrene (PS) ............................................................................................................ 1-43
Running the Polystyrene (PS) Example............................................................. 1-44
Reverse Flow Simulation............................................................................................... 1-44
DIERS Benchmark Examples........................................................................................ 1-46

ii • Contents Aspen Dynamics Examples Guide


Introduction

This chapter describes:


• The contents of this guide
• Associated guides
• Where to find further information

About This Guide


This guide takes you through a series of worked simulations that
run in Aspen Dynamics.

Associated Guides
Aspen Dynamics also comes with these other guides:

Guide Title Description


Getting Started Guide Contains three tutorials for you to work
through, to familiarize yourself with Aspen
Dynamics
Using Aspen Dynamics Contains introductory information on Aspen
Dynamics, as well as instructions for
creating, editing and running simulations.
Reference Guide Describes the models, physical property
procedures and global parameters that are
available in Aspen Dynamics

Aspen Dynamics Examples Guide Introduction • iii


What You Need To Use This Guide
To use this guide, you need Aspen Dynamics installed on your PC
or a PC file server running Windows 2000 or Windows XP. For
information on how to do this, read the AES Installation Guide
supplied with the product, or contact your system administrator.

For More Information


You can obtain information on AES products by:
• Accessing the comprehensive online Help system
• Reading the printed guides supplied with your product
• Printing the Portable Document Format (PDF) files supplied
on the installation CD
• Accessing Aspen Technology's web page
If you need more detailed assistance than that provided in the
online Help and the PDF files, you can contact Technical Support.
This section explains how to use the online help, print PDF files,
find Aspen Technology on the web, and contact Technical
Support.
Online Help To access online Help:
• From the Help menu, click Help Topics and then do one of the
following:
To Do this
Display a hierarchy of topics by Click the Contents tab
category
Display an index of all Help topics Click the Index tab and then type
the word you require
Search for words or phrases within Click the Find tab and then type
the Help topics the word or phrase you require

Tip To display Help on buttons, fields, menu commands, and


other screen elements, click the What's This button: or , at
the top of the window, and then click the element.

iv • Introduction Aspen Dynamics Examples Guide


Printing Online Help
To display information on how to print online Help:
1. Open your Aspen Dynamics product and from the Help
menu, click Help Topics.
2. On the Contents tab, double-click Using Help and then
double-click Print Help Topics.

Printing the Portable To print these guides, you must have Adobe Acrobat Reader
Document Format installed on your machine.
Files (PDFs) Tip If you do not have the Adobe Acrobat Reader, you can
download a free copy from the Adobe web site at
http://www.adobe.com.
Note Adobe and Acrobat are trademarks of Adobe Systems,
Incorporated.
After you have installed the Adobe Acrobat Reader, you can open
the files to view and print the guides. To do this:
• From the Start menu, point to Programs, then AspenTech,
Aspen Engineering Suite, Product Name 12.1, Documentation,
and then click the name of the guide you want to access.
World Wide Web For additional information about AspenTech products and
services, check the AspenTech World Wide Web home page on
the Internet at:
http://www.aspentech.com/
Technical Support AspenTech customers with a valid license and software
maintenance agreement can register to access the Online Technical
Support Center at http://support.aspentech.com.
This web support site allows you to:
• Access current product documentation
• Search for tech tips, solutions and frequently asked questions
(FAQs)
• Search for and download application examples
• Search for and download service packs and product updates
• Submit and track technical issues
• Search for and review known limitations
• Send suggestions
Registered users can also subscribe to our Technical Support e-
Bulletins. These e-Bulletins are used to proactively alert users to
important technical support information such as:

Aspen Dynamics Examples Guide Introduction • v


• Technical advisories
• Product updates
• Service Pack announcements
• Product release announcements
Customer support is also available by phone for customers with a
current support contract for this product. The hours listed are in
local time. For the most current contact information, please see the
Online Technical Support Center at http://support.aspentech.com.

vi • Introduction Aspen Dynamics Examples Guide


Operating Hours

North America 8:00 – 20:00 Eastern Time


South America 9:00 – 17:00 Local time
Europe 8:30 – 18:00 Central European time
Asia and Pacific Region 9:00 – 17:30 Local time

Phone Numbers

North America 1-888-996-7100 Toll-free from U.S., Canada,


Mexico
1-281-584-4357 North America Support Center
52-55-5536-2809 Mexico Support Center
South America (54) (11) 4361-7220 Argentina Support Center
(55) (11) 5012-0321 Brazil Support Center
(0800) 100-2410 Toll-free to U.S. from Argentina
(000) (814) 550-4084 Toll-free to U.S. from Brazil
0800 100 2410 Toll-free to U.S. from Venezuela
Europe (32) (2) 701-95-55 European Support Center
Country specific toll-free Austria 0800-111-900
numbers
Belgium (0800) 40-687
Denmark 8088-3652
Finland (0) (800) 1-19127
France (0805) 11-0054
Germany 0800-101-0068
Ireland (1) (800) 930-024
Italy 800-905-826
Netherlands (0800) 023-2511
Norway (800) 13817
South Africa 0800-996-852
Spain (900) 951846
Sweden (0200) 895-284
Switzerland (0800) 111-470
UK (0800) 376-7903
Asia and Pacific Region (65) 6395-39-00 Singapore
(81) (3) 3262-1743 Tokyo

Aspen Dynamics Examples Guide Introduction • vii


Fax Numbers

North America 1-617-949-1724 (Engineering Suite products)


1-281-584-1807 (Houston, Manufacturing Suite products)
1-281-584-5442 (Aspen PIMS and Aspen Retail products)
1-281-584-4329 (Advanced Control products)
1-301-424-4647 (Aspen ICARUS products)
1-908-516-9550 (Aspen MIMI products)
1-425-492-2388 (Seattle, Manufacturing Suite products)
South America (54) (11) 4361-7220 (Argentina)
(55) (11) 5012-4442 (Brazil)
Europe (32) (2) 701-94-45
Asia and Pacific Region (65) 6395-39-50 (Singapore)
(81) (3) 3262-1744 (Tokyo)

E-mail

North America support@aspentech.com (Engineering Suite products)


atmdsupport@aspentech.com (Aspen ICARUS products)
mimi.support@aspentech.com (Aspen MIMI products)
pims.support@aspentech.com (Aspen PIMS products)
aspenretail.support@aspentech.com (Aspen Retail products)
ACS.Support@aspentech.com (Advanced Control products)
AMS.Support@aspentech.com (Manufacturing Suite
products)
Mexico.Support@aspentech.com (Mexico)
South America LAsupport@aspentech.com
Argentina.Support@aspentech.com (Argentina)
Europe atesupport@aspentech.com (Engineering Suite products)
cimview@aspentech.com (CIMVIEW products)
Metals.Support@aspentech.com (Metals products)
AMS.Support@aspentech.com (All other products
Asia and Pacific Region
Singapore:
atasupport@aspentech.com (Engineering Suite
products)
mimi.support@aspentech.com (Aspen MIMI
products)
aspenretail.support@aspentech.com (Aspen Retail
products)
AMS.Support@aspentech.com (All other products)
Tokyo:
atjsupport@aspentech.com (Engineering Suite
products)
TK_Support@aspentech.com (All other products)

viii • Introduction Aspen Dynamics Examples Guide


1 Example Simulations

A number of example simulations are included in your Aspen


Dynamics installation. If you have installed in the default location,
these will be in the folder
C:\Program Files\AspenTech\Aspen Dynamics 12.1\Examples.
Many of the examples are supplied as an Aspen Plus backup
(.bkp) file. To run one of these examples:
1. Copy the backup file and any associated text files to a
convenient working folder.
2. Load it into Aspen Plus and proceed to create and run the
dynamic simulation in the normal way.
Some examples have more associated files. The files for each one
of these examples are supplied in a separate sub-folder. The
example descriptions include details of how to run these examples.
This table summarizes the examples that are supplied:

Example Description
DyBatch A batch distillation column
BatchDistOpt Dynamic optimization of a batch distillation column
BatchReactor A batch reactor initialized using script automation
BatchColumn A batch distillation column initialized using script
automation
DyC2splt A C2 splitter column
DyEster An esterification reactor
DyEtoh Azeotropic distillation of ethanol and water
DyFlash A simple flash drum
DyMCH Extractive distillation of methyl-cyclohexane
DyPfdtut Production of cyclohexane from benzene
DyMTBE Control of an MTBE reactive distillation column
DyMCH Extractive distillation of methyl-cyclohexane but
extended to include pressure relief
continued overleaf…

Aspen Dynamics Examples Guide Example Simulations • 1-1


PRReactor A reactor pressure relief system using an RCSTR
with a simple esterification reaction
BatchEster Batch reactor examples
KineticsEst Estimating kinetic parameters with a dynamic tank
reactor
MchDMC Extractive distillation of methyl-cyclohexane using a
DMCplus controller
Note You need DMCplus Online to follow this
example.
GasHDPE Gas phase high density polyethylene using Polymers
Plus with Ziegler Natta kinetics
Nylon6 Polymerization of caprolactam to Nylon 6 using
Polymers Plus with step growth kinetics
PS Polystyrene bulk polymerization by thermal
initiation using Polymers Plus with free radical
kinetics
Reverse flow How to set up and run the reverse flow simulation
example
DIERS Design Institute for Emergency Relief systems
Benchmark (DIERS) pipe and safety relief valve benchmark
Examples examples.

Each of these examples is described in more detail later in this


chapter.

DyBatch
This is an example of batch distillation and illustrates these
features of Aspen Dynamics:
• Pressure driven flow
• Script automation of a Aspen Dynamics flowsheet
• Use of tasks to start up and operate the batch column
• Use of flowsheet equations to include hydraulics for the reflux
flow
Note If you are using a Simulation Engine installation from a
client machine, you must make sure that you run Aspen Plus using
the same server and the same working folder as you have
configured for Aspen Dynamics.
The solvents to be separated are isopropyl-acetate (IPA), methanol
(MEOH), and tetrahydrofuran (THF). As can be seen by the
residue curve below, this is a low-boiling azeotrope of THF and
MEOH form.

1-2 • Example Simulations Aspen Dynamics Examples Guide


The batch distillation will form the azeotrope in the condenser
accumulator, thus leaving a pure IPA product as the bottom
product.

The simulation starts with this Aspen Plus flowsheet.

Using Script It is very useful to begin a batch distillation by starting with an


Automation in the empty distillation column. No distillation column is truly empty at
DyBatch Example start-up, and the presence of nitrogen is taken into account when
there is no liquid present in the column. A gas purge stream and a
condenser vent are also included in the simulation, since many
start-ups include cycles of nitrogen purge and vacuum.
In order to initialize the distillation column in an empty state, a
script is used to initialize all of the molar hold-ups. Since the
volume for each tray is known from the Aspen Dynamics
simulation, the script easily calculates the molar hold-ups with the

Aspen Dynamics Examples Guide Example Simulations • 1-3


assumption that most of the composition is nitrogen, with only
traces of other components. The script also shuts off all of the feed
and product flows to the column.
Using Tasks in the Aspen Dynamics can simulate batch or semi-batch operations with
DyBatch Example tasks. Time and event-dependent tasks are introduced to vary the
controllers in the simulation just as operators would change the
controllers in a batch distillation plant.
The dynamic simulation starts by filling the distillation column
sump with a charge transferred from the feed tank . This is done
using the Fill task.
After the sump is charged, the Heatup task ramps the reboiler
steam temperature up to the operating value of 130 °C. During the
Heatup operation the controller PC4 manipulates the position of
valve V3 to allow the nitrogen to vent from the column.
When the column reaches operating temperature, the task Pcontrol
closes the vent valve, and activates the pressure controller
REBPID.
When the column reaches total reflux, task Step1 activates the
reflux controller RRPID which manipulates the product valve V7
to maintain the required reflux ratio.
Task Step1 stops the simulation when the distillate IPA mole
fraction rises to 0.004.
Files Included with The example includes these files:
the DyBatch Example
File Name Description
DyBatch.bkp The Aspen Plus backup file
DrumHydraulics.txt The flowsheet equation for the reflux drum
hydraulics
EmptyScript.txt The initialization script
FillTask.txt The fill task
HeatupTask.txt The heatup task
PControlTask.txt The pcontrol task

Step1Task.txt The step1 task


Running the DyBatch To run the DyBatch example:
Example 1. In Aspen Plus, open DyBatch.bkp.
If you installed Aspen Dynamics in the default location,
DyBatch.bkp is in C:\Program Files\AspenTech\Aspen
Dynamics 12.1\Examples\DyBatch.
2. Perform a run.

1-4 • Example Simulations Aspen Dynamics Examples Guide


3. Export it as a pressure-driven dynamic simulation file.
4. Exit Aspen Plus.
Now you are ready to initialize the simulation in Aspen Dynamics.

Initializing the DyBatch Example in Aspen Dynamics


To run the DyBatch example:
1. In Aspen Dynamics, open DyBatch.dynf.
2. Remove the LC6 level controller and its control connections.
3. Remove the LC3 level controller and its control connections.
Add a Ratio control element (RR) and a new PID controller
(RRPID) under stream 9 on the flowsheet.
4. Using a ControlSignal stream, connect:
• Input1 of RR to the total mass reflux flow of the BATCHCOL
column (Reflux.Fm)
• Input2 of RR to the stream 3 total mass flow
(STREAMS("3").Fm)
• Output of RR to the PV input of RRPID
• Controller output (OP) of RRPID to the input of V7
5. Open the RRPID Configure form, and click Initialize Values
to initialize settings for this controller. Change the Gain to 3,
the Integral time to 8 minutes, and on the Ranges tab, change
the process variable range to be from 0 to 50. Close the
Configure form.
6. Add a second PID controller called REBPID and connect the
PV input to the stage 1 pressure (Stage(1).P), and the output
to the reboiler UA (Stage(15).UA).
7. Open the REBPID Configure form and initialize the
controller. Change the gain to 30, the integral time to 12
minutes, and the controller action to Reverse. Close the
Configure form.
After the addition of the controllers, the flowsheet should look
like this:

Aspen Dynamics Examples Guide Example Simulations • 1-5


8. In the All Items pane of the Simulation Explorer, select
Flowsheet.
In the Contents pane, double-click the Flowsheet icon to open
Constraints.
9. In the text editor window, select the commented text, then
click with the right mouse button and from the menu that
appears, point to Insert then click File. Insert
DrumHydraulics.txt.
10. Then click again with the right mouse button, point to Build
then click Compile.
The flowsheet is now over specified by 1. Close the text
editor window.

Running the DyBatch Example in Aspen Dynamics


To finish specifying and run the DyBatch example follow these
steps:
1. Using Variable Find , find the variable Reflux.Fmr.
2. Click with the right mouse button on the variable and click
Properties. Change the specification from Fixed to Free, then
click Apply.
The flowsheet will now be square, and properly specified.
Close the Variable Find window.
3. In the All Items pane of the Simulation Explorer, ensure
Flowsheet is selected. In the Contents pane, double-click Add
Script.
4. Enter a name for the script, for example, Empty.
5. In the text editor window, click the right mouse button and

1-6 • Example Simulations Aspen Dynamics Examples Guide


point to Insert, then click File. Insert Empty Script.txt.
6. Again click the right mouse button and click Invoke Script.
Close the text editor window.
Now create a task called Fill. To do this:
7. In the Contents pane of the Simulation Explorer, double-click
Add Task. Enter the name Fill.
8. In the text editor window, click the right mouse button and
point to Insert, then click File. With the cursor positioned just
above the End statement, insert FillTask.txt.
9. Again click with the right mouse button and click Compile.
Close the text editor window.

10. In the Contents pane of the Simulation Explorer, double-click


the task to activate it.
Repeat steps 7 – 10 to create the Heatup, Pcontrol and Step1
tasks.
11. Change the run mode to Dynamic and perform a dynamic
run.
These steps are automatically performed and the run will stop
on completion:
Time (hrs) Task Action
0.05 – 0.1 Fill Ramp Valve V2 position to 20% (start
filling column)
0.51 – 1.51 Heatup Level in column > 0.5m, ramp-up reboiler
duty
0.58 –0.63 Fill Level in feed tank < 0.3m, ramp Valve V2
position to 0%
1.26 Pcontrol Temperature at top of column > 58 °C,
commission pressure control
1.68 -1.78 Step1 Reboiler on and steady, commission
RefluxRatio control
2.71 - 3.14 Step1 As the IPA molefraction rises at top of
column, increase reflux ratio
3.29 Step1 Step1 IPA molefraction reaches 0.004,
pause run

Aspen Dynamics Examples Guide Example Simulations • 1-7


BatchDistOpt
This example shows how to use Aspen Dynamics for the
optimization of the operation of a batch distillation column. The
column separates a mixture of acetone and iso-propyl alcohol
(IPA). The objective is to find the best profile of reflux ratio
versus time to minimize the time to separate the mixture, subject
to constraints on the purity and yield of the acetone rich distillate.
This example is created by starting with an Aspen Plus simulation,
exporting this to Aspen Dynamics, and then configuring the
simulation within Aspen Dynamics. The configured Aspen
Dynamic file is provided. For details of how to run this see
Running the BatchDistOpt Example.
For detailed instructions on how to create the example from the
Aspen Plus bkp file see Creating the BatchDistOpt Example. The
procedure may help you in creating your own applications.
Running the To run the BatchDistOpt example:
BatchDistOpt 1. Locate the example folder BatchDistOpt. If you installed
Example Aspen Dynamics in the default location, this is in:
C:\Program Files\AspenTech\Aspen Dynamics
12.1\Examples
2. Copy all of the files in the BatchDistOpt folder to a
convenient working folder.
3. Load the backup file BatchDistOpt.bkp into Aspen Plus and
run it.
4. From the File menu, click Save As and save the simulation as
an Aspen Plus Document (.apw file), with name
BatchDistOptdyn, then exit Aspen Plus. This creates the file
BatchDistOptdyn.appdf which contains all of the physical
properties data required for the dynamic simulation. The .apw
file is not required, and you can delete this.
5. Load the file BatchDistOpt.dynf into Aspen Dynamics.
6. Select Snapshots from the Tools menu. Double click on the
result Init to use it to initialize the simulation, and then close
the dialog box.
7. Click the run button to run the simulation.
8. To see the progress of the optimization open the Flowsheet
plot Reflux. This shows the reflux ratio versus time. You can
see how this is manipulated by the optimizer during
successive iterations towards the solution. You can also open
the Flowsheet table OptSummary to see a summary of the

1-8 • Example Simulations Aspen Dynamics Examples Guide


optimization results.

Note. If you want to do repeated optimization runs, after a run


rewind to time zero before starting the next run. You may also
want to load the result Init to be sure to start the run from this
initial condition.

Creating the To create the BatchDistOpt example starting with the Aspen Plus
BatchDistOpt simulation:
Example 1. Locate the example folder BatchDistOpt. If you installed
Aspen Dynamics in the default location, this is in:
C:\Program Files\AspenTech\Aspen Dynamics
12.1\Examples
2. Copy all of the files in the BatchDistOpt folder to a
convenient working folder.
3. Load the simulation in BatchDistOpt.bkp in to Aspen Plus,
and run the simulation.
4. After the run completes, select Export on the File menu, and
export the simulation as a flow driven dynamic simulation.
5. Load the simulation in to Aspen Dynamics.
6. Delete the controllers PC1, LC1 and the control streams
connecting them to the column. To do this go to the
Dynamics folder in Explorer and open Scripts, Double click
the RemoveControl script to run it.
7. Make the following changes to model the condenser as a total
condenser with perfect vent pressure control:
• In stream CONDENS fix the pressure P
• In stream OVHD free the required flow FR
• In block COND fix the vapor fraction vf to a value of 0,
and free the required condenser duty QR
8. Shut off feed and product flows from the flowsheet by
changing the values of
• Streams("FEED").FR to 0
• Streams("BOT").FmR to 0
• Streams("PROD").FmR to 0
9. Initialize the receiver to be empty at known temperature. To
do this:
• Change the value of
BLOCKS("RECEIVER").Mc("ACETONE") and
BLOCKS("RECEIVER").Mc("IPA") to 0
• Change the Spec of BLOCKS("RECEIVER").E to Free
• Change the spec of BLOCKS("RECEIVER").T to Initial

Aspen Dynamics Examples Guide Example Simulations • 1-9


10. For dynamic optimization it is necessary to ensure that the
simulation is solved to a high degree of precision and that any
noise is minimized. To help with this you must change from
using local properties to using rigorous properties. In
Explorer go to Simulation and open the SimulationOptions
table. Change the Global property mode to Rigorous.
11. Perform an initialization run and save the result as “Init” for
future use.
12. The next few steps configure the dynamic optimization
problem. To begin, from the Tools menu select Optimization.
13. On the Setup tab select "Perform Dynamic Optimization".
14. On the Control Variables tab add the variable
BLOCKS("REFSPLIT").sf("REFLUX").
15. On the Control Discretization tab select Free for Final Time,
deselect "Use Default Bounds" and change the lower bound
to 0.2. Change Number of Elements to 5.
16. On the Objective Function tab select "Add final time to
objective function". Close the Optimization window.
17. On the Dynamic Constraints tab add the variable
blocks(“RECEIVER”).Mc(“Acetone”). Leave the Constraint
type at the default of Final time. Click the edit button to edit
the constraint and enter a lower bound of 0.07. Leave the
upper bound at 1000000.
18. On the Dynamic Constraints tab add the variable
blocks(“RECEIVER”).Out_P.Z(“IPA”). Leave the Constraint
type at the default of Final time. Click the edit button to edit
the constraint and enter an upper bound of 0.06. Leave the
lower bound at 0.
19. Create a new Flowsheet Table to display a summary of the
optimization results. Do this by clicking the New Table
button on the Tools toolbar. Call the table OptSummary. Add
the following variables to the table:
BLOCKS("REFSPLIT").sf("REFLUX")
BLOCKS("RECEIVER").z("IPA")
BLOCKS("RECEIVER").Mc("ACETONE")
20. Create a new Flowsheet plot to display how the optimizer
changes reflux versus time. You can do this by clicking the
New Plot button on the Tools toolbar. Call the plot Reflux.
Add the variable BLOCKS("REFSPLIT").sf("REFLUX").
Right mouse click on the time axis and select Edit. Change
the axis range to 0 to 1.
21. For dynamic optimization it is necessary to tighten the solver

1-10 • Example Simulations Aspen Dynamics Examples Guide


tolerances to reduce the noise seen by the optimizer. On the
Run menu go to Solver Options and enter the following
values:
• On the Tolerances tab:
Absolute Variable tolerance = 1e-7
Relative Variable tolerance = 1e-7
• On the Integrator tab:
Minimum Integration step = 1e-5
Absolute Integration error tolerance = 1e-7
• On the Optimizer tab:
Solution Convergence Tolerance = 0.005
22. Change the run mode to Optimization and run the simulation.

Note. If you want to do repeated optimization runs, after a run


rewind to time zero before starting the next run. You may also
want to load the result Init to be sure to start the run from this
initial.

BatchColumn
This is an example of a batch column simulation and illustrates
these features of Aspen Dynamics:
• Use of scripts to automate initialization of an Aspen Dynamics
flowsheet
• Use of tasks to start up and operate the batch reactor
A mixture of methanol, ethanol and water is to be separated using
a batch distillation column. The composition of the charge is 30%
ethanol, 30% methanol and 40% water by weight.
The required product purity is 68% w/w.
The Aspen Plus Aspen Plus has been used to set up the flowsheet for the batch
Simulation column, which will be exported to Aspen Dynamics and initialized
to be full of nitrogen at 20 C and 1 atmosphere. Nitrogen has been
added to the component list in Aspen Plus even though it is not
used in the Aspen Plus simulation.
The column has been modeled using a RadFrac block. Feed
streams for the charge and nitrogen have been specified together
with vapor and liquid distillate streams and a bottoms stream.
The column has been specified with 10 stages, a partial vapor-
liquid condenser and a kettle reboiler. The column dimensions
have been specified on the RadFrac Dynamic form together with
the sump and reflux drum size and geometry. The LMTD heat

Aspen Dynamics Examples Guide Example Simulations • 1-11


transfer option has been selected for the condenser and the cooling
medium temperature specified as 20 C. This represents cooling
water. The Constant temperature heat transfer option has been
selected for the reboiler and the medium temperature has been
specified as 120 C. This represents steam heating.
Setting Up the Script automation is used to set up the dynamic simulation. The
Dynamic Simulation following steps are carried out using 2 scripts. A flowsheet level
script called Setup and a RadFrac model script called Empty.
The Flowsheet level script does the following:
1. Adds a reflux ratio controller
2. Sets the feed flow rates to zero
3. Calls the RadFrac Empty script to initialize the column to be
full of nitrogen at 20 C and 1 atmosphere.
4. Performs an initialization run.
5. Saves a snapshot
Running the To run the BatchColumn example:
BatchColumn 1. In Aspen Plus, open BatchColumn.bkp. If you installed
Example Aspen Dynamics in the default location, BatchColumn.bkp is
in:

C:\Program Files\AspenTech\Aspen Dynamics


12.1\Examples\BatchColumn.

2. Perform a run.
3. Export it as a flow-driven dynamic simulation file.
4. Exit Aspen Plus.
Now you are ready to initialize the simulation in Aspen Dynamics.
Initializing the To initialize the BatchColumn Example in Aspen Dynamics:
BatchColumn 1. In Aspen Dynamics, open BatchColumn.dynf.
Example in Aspen
2. In the All Items pane of the Simulation Explorer, ensure
Dynamics
Flowsheet is selected. In the Contents pane, double-click Add
Script.
3. Enter a name for the script, for example, Setup.
4. In the text editor window, click the right mouse button and
point to Insert, then click File. Insert BatchColumnScript.txt.
5. Again click the right mouse button and click Invoke Script.
Close the text editor window.
6. Now create a task called BatchOperation.

To do this:
7. In the Contents pane of the Simulation Explorer, double-click

1-12 • Example Simulations Aspen Dynamics Examples Guide


Add Task. Enter the name BatchOperation.
8. In the text editor window, select all of the existing text with
the mouse (or use Ctrl-A). Click the right mouse button and
point to Insert, then click File. Insert BatchOperationTask.txt.
9. Again click with the right mouse button and click Compile or
press F8. Close the text editor window.
10. In the Contents pane of the Simulation Explorer, double-click
the task to activate it.
11. Change the run mode to Dynamic and perform a dynamic
run.

Operating Sequence
The operating sequence defined by the tasks is:
At time = 0.5 hours:
1. Ramp the mass flow rate of the Feed stream to 1000 kg/hr
over 0.1 hours.
2. Wait until the cumulative mass flow of stream Feed is >=
1000 kg.
3. Step the mass flow rate of the Feed stream to 0 kg/hr.
4. Wait for 3 minutes.
5. Increase the flow of the Nitrogen feed stream to 0.1 kmol/hr.
This is needed to maintain the pressure in the column.
6. Ramp the reboiler medium temperature to 80 C over 30
minutes.
7. Wait until the reflux drum level >= 0.3 m.
8. Start the reflux flow.
9. Wait for 3 minutes.
10. Start the product draw.
11. Ramp the reboiler medium temperature to 90 over 30
minutes.
12. Wait until the mass fraction of methanol in the distillate
receiver reaches 0.68.
13. Pause the simulation.
14. Use plots and tables to view the results of the simulation
during the dynamic run.
15. If you wish to repeat the simulation, rewind to saved snapshot
Empty_Initial and then run again.

Aspen Dynamics Examples Guide Example Simulations • 1-13


BatchReactor
This is an example of batch reactor simulation and illustrates these
features of Aspen Dynamics:
• Use of scripts to automate initialization of an Aspen Dynamics
flowsheet
• Use of tasks to start up and operate the batch reactor
The reaction modeled is the production of carbon tetrachloride
from tri-chloromethane

CHCl3 + Cl2 ! CCl4 + HCl

Note: The kinetics used are for illustration purposes only.

The Aspen Plus Aspen Plus has been used to set up the flowsheet for the batch
Simulation reactor, which will be exported to Aspen Dynamics and initialized
to be full of nitrogen at 25 C and 5 bar. Nitrogen has been added to
the component list in Aspen Plus even though it is not used in the
Aspen Plus simulation.
The reactor has been modeled using an RCSTR block. Feed
streams for CHCl3 and Cl2 have been specified together with
vapor and liquid product streams.
The reactor volume has been specified together with the diameter
and geometry. The reactor needs to be cooled so the LMTD heat
transfer option has been selected and the cooling medium
temperature specified as 20 C. This represents cooling water in a
jacketed reactor.
The mass and heat capacity of the reactor have been specified so
that the dynamic effects of the equipment heat capacity can be
modeled.
The reactor vapor product stream is sent to a condenser, which has
been modeled using an instantaneous HeatX block with refrigerant
on the cold side. An instantaneous Flash2 block has been used to
separate the liquid from the vapor. The liquid is returned to the
reactor via a Heater block to increase the pressure while the vapor
is sent to a vent stream.
Setting Up the Script automation is used to set up the dynamic simulation. The
Dynamic Simulation following steps are carried out using 3 scripts. A flowsheet level
script called Setup and an RCSTR model script called Empty and a
PID model script called Initialize.
The Flowsheet level script does the following:
1. Sets the feed flow rates to zero.

1-14 • Example Simulations Aspen Dynamics Examples Guide


2. Adds temperature controller TC3 to the flowsheet.
3. Connects TC3.PV to the reactor temperature.
4. Connects TC3.OP to the reactor cooling medium flow rate
5. Calls the PID controller Initialize script to initialize TC3.
6. Calls the RCSTR Empty script to initialize the reactor to be
full of nitrogen at 25 C and 5 bar.
7. Sets the temperature controller to manual, sets it’s output to
100 kg/hr and it’s setpoint to 25 C.
8. Performs an initialization run.
9. Saves a snapshot.
Running the To run the BatchReactor example:
BatchReactor 1. In Aspen Plus, open BatchReactor.bkp. If you installed
Example Aspen Dynamics in the default location, BatchReactor.bkp is
in:

C:\Program Files\AspenTech\Aspen Dynamics


12.1\Examples\BatchReactor.
2. Perform a run.
3. Export it as a flow-driven dynamic simulation file.
4. Exit Aspen Plus.
Now you are ready to initialize the simulation in Aspen Dynamics.
Initializing the
To initialize the BatchReactor Example in Aspen Dynamics
BatchReactor
Example in Aspen 1. In Aspen Dynamics, open BatchReactor.dynf.
Dynamics 2. In the All Items pane of the Simulation Explorer, ensure
Flowsheet is selected. In the Contents pane, double-click Add
Script.
3. Enter a name for the script, for example, Setup.
4. In the text editor window, click the right mouse button and
point to Insert, then click File. Insert SetupScript.txt.
5. Again click the right mouse button and click Invoke Script.
Close the text editor window.
6. Delete level controller LC1 and its control streams
7. Now create a task called ChargeFeed.

To do this:

In the Contents pane of the Simulation Explorer, double-click


Add Task. Enter the name ChargeFeed.
8. In the text editor window, select all of the existing text with

Aspen Dynamics Examples Guide Example Simulations • 1-15


the mouse (or use Ctrl-A). Click the right mouse button and
point to Insert, then click File. Insert ChargeFeedTask.txt.
9. Again click with the right mouse button and click Compile or
press F8. Close the text editor window.
10. In the Contents pane of the Simulation Explorer, double-click
the task to activate it.
11. Repeat steps 6 – 10 to create tasks StartCl2, TempControl
and PauseSim.

Change the run mode to Dynamic and perform a dynamic run


The operating sequence defined by the tasks is:
At time = 0.05 hours:
1. Step the mass flow rate of the CHCl3 feed stream to 5000
kg/hr.
2. Wait for 30 minutes.
3. Step the mass flow rate of the CHCl3 feed stream to 0 kg/hr.
At time = 0.5 hours:
1. Ramp the mass flow rate of the Cl2 feed stream to 200 kg/hr
over 15 minutes
2. Ramp the mass flow of the refrigerant to the condenser to
1000 kg/hr over 15 minutes
When the reactor temperature reaches 60 C:
1. Switch the temperature controller to Auto.
2. Change the set point to 60 C.
3. Wait for 6 minutes and then ramp the set point to 80 C over 5
minutes.
Pause the simulation when the mass holdup of CHCl3 in the
reactor falls to less than 5 kg.
Use plots and tables to view the results of the simulation during
the dynamic run.
If you wish to repeat the simulation, rewind to saved snapshot
Empty_Initial and then run again.

DyC2splt
This example models a C2 splitter distillation column which
separates a mixture of mostly ethane and ethylene into two main
product streams. A third top product stream contains mostly
methane.

1-16 • Example Simulations Aspen Dynamics Examples Guide


The simulation uses the Aspen Plus tray rating capability to
perform rigorous tray calculations. These same methods are used
in the dynamic simulation.
A typical use of dynamic simulation would be to evaluate and tune
alternative control strategies for this distillation column.
Note If you are using a Simulation Engine installation from a
client machine, you must make sure that you run Aspen Plus
using the same server and the same working folder as you have
configured for Aspen Dynamics.

DyEster
This example simulates a process for production of dimethyl-ether
from the esterification reaction between methanol and n-hexanoic
acid. The reaction takes place in a continuous stirred tank reactor.
Attached to this is a separation system for removing water from
the reactor to help promote the esterification reaction.

Aspen Dynamics Examples Guide Example Simulations • 1-17


Although this example is formulated as a continuous process, the
dynamic simulation can be operated in a batch or semi-batch way.
A typical use of dynamic simulation would be to analyze different
operating strategies for this process.
Note If you are using a Simulation Engine installation from a
client machine, you must make sure that you run Aspen Plus
using the same server and the same working folder as you have
configured for Aspen Dynamics.

1-18 • Example Simulations Aspen Dynamics Examples Guide


DyEtoh
This example models the separation of ethanol and water using
azeotropic distillation, using cyclohexane as an entrainer to break
the water-ethanol azeotrope.
Because of the recycles between the columns the dynamics of this
process can be quite complex. A dynamic simulation can be used
to examine the response of this process to feed disturbances, and
to help determine the best control scheme for the process.
Note If you are using a Simulation Engine installation from a
client machine, you must make sure that you run Aspen Plus
using the same server and the same working folder as you have
configured for Aspen Dynamics.

DyFlash
This is a simple example of the separation of water, ethanol and
benzene in a flash drum.

Note If you are using a Simulation Engine installation from a


client machine, you must make sure that you run Aspen Plus
using the same server and the same working folder as you have
configured for Aspen Dynamics.

Aspen Dynamics Examples Guide Example Simulations • 1-19


DyMCH
This example models the extractive distillation of methyl-
cyclohexane and toluene, using phenol as an entrainer. The
dynamic simulation can be used to evaluate and tune alternative
control strategies for controlling the purity of the methyl-
cyclohexane product.

Note If you are using a Simulation Engine installation from a


client machine, you must make sure that you run Aspen Plus
using the same server and the same working folder as you have
configured for Aspen Dynamics.

1-20 • Example Simulations Aspen Dynamics Examples Guide


DyPfdtut
This example models the production of cyclohexane by the
hydrogenation of benzene. The flowsheet includes the main
reactor loop, and a downstream column for product purification.

The dynamic simulation can be used to examine the operability of


this process, and to evaluate alternative control strategies.
Note If you are using a Simulation Engine installation from a
client machine, you must make sure that you run Aspen Plus
using the same server and the same working folder as you have
configured for Aspen Dynamics.

Aspen Dynamics Examples Guide Example Simulations • 1-21


DyMTBE
MTBE (Methyl-tert-Butyl-Ether) is produced to enhance the
octane of gasoline. This chemical is often manufactured from the
reaction of iso-butylene and methanol. This example illustrates
how MTBE can be manufactured in a distillation column with
catalytic packing.

The distillation column exhibits multiple-steady states. At least


three steady states have been shown to occur. In Aspen Plus, a
sensitivity study has been used to move the methanol feed location
from the top of the column to tray 10. Tray 10 is the optimum feed
location, and gives the highest MTBE yield.
It is interesting to study the control of this column, since even
small disturbances in the methanol feed rate can move the column
to a lower yield steady state.
Note If you are using a Simulation Engine installation from a
client machine, you must make sure that you run Aspen Plus
using the same server and the same working folder as you have
configured for Aspen Dynamics.
A Fortran subroutine is used to calculate the kinetics of the
reaction. This is contained in the file RaMTBE.f. Before running
the simulation you must:
1. Copy RaMTBE.f to the same folder as the backup file
DyMTBE.bkp.
2. Open an Aspen Plus Simulation Engine window (MS-DOS).
3. In this window, move to the folder containing RaMTBE.f.
4. Compile RaMTBE.f using the command:
aspcomp ramtbe.f

1-22 • Example Simulations Aspen Dynamics Examples Guide


Pressure Relief Column Example
This example takes an existing Aspen Dynamics example,
DyMch, and extends it to include pressure relief.

Note. If you are using a Simulation Engine installation from a


client machine, you must make sure that you run Aspen Plus
using the same server and the same working folder as you have
configured for Aspen Dynamics.

Follow these steps to set up this example in Aspen Dynamics:


1. In Aspen Plus, open DyMch.bkp and run the simulation.
If you installed Aspen Dynamics in the default location,
DyMch.bkp is in C:\Program Files\AspenTech\Aspen
Dynamics 12.1\Examples.
2. Export the simulation as a Flow Driven Dyn Simulation.
3. In Aspen Dynamics, open the file.
4. On the Run Control toolbar, set the Run Mode to
Initialization.
5. Run the simulation.
6. Add an instance of the PSV model just above the column.
The PSV model is in the PressureRelief folder of the Aspen
Dynamics library.
7. Connect the relief port of the column to the inlet of the PSV
using a stream of type MaterialStream. Also add a
MaterialStream product to the outlet of the PSV.
8. Open the Configure form for the product stream and fix the
pressure in the product stream. Enter your required product
stream pressure.

Aspen Dynamics Examples Guide Example Simulations • 1-23


The flowsheet should look like this:

9. Open the Configure form of the PSV and click Initialize.


When the run has completed, enter this data:

On the Do this
Type Tab Throat Diameter: 0.2 m
Inlet Diameter: 0.22 m
Outlet Diameter: 0.22 m
Flow Calcs Tab Flow calculation method: Ideal HEM
(Simpson)
Hysteresis Tab: Set pressure: 1.2 atm
Full lift pressure, opening: 1.3 atm
Reset pressure: 1.1 atm
10. Click the Initialize button and wait a few moments for the run
to complete.

1-24 • Example Simulations Aspen Dynamics Examples Guide


11. In the Simulation Explorer, ensure Flowsheet is selected and
then add, compile and activate the following task:
Task CondFail runs when time == 0.03
BLOCKS("PC2").automan : 1;
(BLOCKS("PC2").Opman : 0,
End

This task simulates a loss of cooling water to the overhead


condenser by stepping the output of the pressure controller to
zero.
12. On the Integrator tab of Solver Options dialog:
set the initial step size to 0.0001 hours;
set the minimum step size to 1e-8 hours.
13. On the Run Options dialog, set the communication interval to
0.0001 hours.
14. Switch to Dynamic run mode and run the simulation.

Pressure Relief Reactor Example


This is an example of a reactor pressure relief system. The reactor
is an RCSTR with a simple esterification reaction. The relief
system consist of a safety relief valve mounted on top of the
reactor and a pipe attached to the end of the valve. In the example
the contents of the reactor are heated at constant temperature and
the effect this has on the pressure relief system can be observed.
Note If you are using a Simulation Engine installation from a
client machine, you must make sure that you run Aspen Plus
using the same server and the same working folder as you have
configured for Aspen Dynamics.
For this example, you can either follow the instructions to create
the reactor relief simulation example, starting from the Aspen Plus
steady-state simulation, or you can run the completed relief
simulation which is supplied.
Running the To run the completed reactor relief simulation supplied:
Completed Relief 1. In Aspen Plus, open PRReactor.bkp and run the simulation.
Simulation If you installed Aspen Dynamics in the default location,
PRReactor.bkp is in C:\Program Files\AspenTech\Aspen
Dynamics 12.1\Examples\PRReactor.
2. Export the simulation as a P Driven Dyn Simulation (*.dynf
& *dyn.appdf).
3. In Aspen Dynamics, open the file PRReactorA.dynf that is

Aspen Dynamics Examples Guide Example Simulations • 1-25


provided.
4. From the Tools menu, click Snapshots.
This opens the Snapshot Management dialog box, which lists
the available snapshots.
5. Click the DynStart snapshot, to highlight it for copying.
6. Click the Copy Values button.
7. Close the Snapshot Management dialog box.
8. On the Run Control toolbar, set the Run mode to Dynamic.
9. Open the ResultsReliefSummary form for the reactor.
10. Open the ResultsReliefPlot for the reactor and set the time
axis range as 0 to 0.01 hours.
11. Run the simulation.
Note that on the ReactorReliefSummary form, blue indicates the
liquid height, and pink indicates the swell height.
Creating the Reactor Follow these steps to create the reactor relief simulation from an
Relief Simulation Aspen Plus backup file. The reactor is an RCSTR with a simple
esterification reaction.
• Opening and exporting the file
• Configuring the reactor
• Adding a PSV
• Adding a pipe
• Simulating a runaway reaction

Opening and Exporting the Example


Follow these steps to create the reactor relief simulation:
1. In Aspen Plus, open PRReactor.bkp and run the simulation.
If you installed Aspen Dynamics in the default location,
PRReactor.bkp is in C:\Program Files\AspenTech\Aspen
Dynamics 12.1\Examples\PRReactor.
2. Export it as a P Driven Dyn Simulation (*.dynf &
*dyn.appdf).
3. In Aspen Dynamics, open the PRreactor.dynf generated.
4. On the Run Control toolbar, set the Run Mode to
Initialization.
5. From the Tools menu, point to Units of Measurement and
select Metric.
6. Run the simulation.
Now you can configure the reactor.

1-26 • Example Simulations Aspen Dynamics Examples Guide


Configuring the Reactor
Follow these steps to configure the reactor and create a reactor
relief simulation:
1. Remove Temperature controller and its control streams.
2. Remove Level controller and its control streams.
3. Close valves B1 and B2. (To do this, open the Manipulate
table and change the position to 0%.)
4. Open the Configure form for the Reactor and under
Advanced Options, select Perform Pressure Relief
Vapor/Liquid Disengagement Calculations.
5. On the Configure form, click the Setup button.
6. Choose Holdups tab.
7. Select N2 as Inert.
8. Check Specify Pressure and enter 1.2 bar.
9. Click the Setup button.
10. Check specify Temperature and enter 150 Deg C.
11. Click the Setup button.
12. Check Specify Vapor Volume Fraction and enter 0.1 (90%
full of liquid).
13. Click the Setup button.
14. Select the Disengagement tab.
15. Choose DIERS Churn Turbulent as the method for
disengagement.
16. Click the Setup button.
The reactor is configured. Close the Configure form. Now you can
add a PSV.

Aspen Dynamics Examples Guide Example Simulations • 1-27


Adding a PSV
Follow these steps to configure a PSV and create a reactor relief
simulation:
1. From the PressureRelief folder of the Dynamics library, drag
and drop the PSV model to the flowsheet.
2. Using MaterialStream from the Dynamics Library Stream
Types folder, join the Vapor outlet to the Feed of the PSV
and add a product stream from the outlet of the PSV.
3. Open the Configure form for the PSV instance and on the
Type tab, enter 0.15m for the diameter.
4. Click the Initialize button.
5. On the Flow Calculations form, choose Ideal HEM (DIERS)
as the flow method.
6. Click the Initialize button.
7. Choose the Hysteresis tab.
8. Set Valve Type to Balanced.
9. Enter these pressures:
• Set Pressure 2.0 bar
• Full Lift Pressure, Opening 2.5 bar
• Reset Pressure 1.5 bar
The Full Lift Pressure, Closing, will be calculated from these
three parameters.
10. Ensure that the values look reasonable on the Hysteresis
diagram tab.
11. Click the Initialize button and then close the Initialize form.
With the PSV configured, now add a pipe.

Adding a Pipe
Follow these steps to add a pipe and create a reactor relief
simulation:
1. Drag and drop the Pipe2 model from the Dynamics library in
the PressureChangers folder.
2. Connect output from PSV to input of pipe and an outlet
product using MaterialStream.
3. Open the Configure form for the pipe.
4. On the Options form, choose Beggs-Brill as the friction
correlation, and Dynamic as the momentum balance.
5. On the Dimensions form, enter diameter 0.15m and length
20m.
6. Click the Setup button.

1-28 • Example Simulations Aspen Dynamics Examples Guide


The pipe is now configured. Close the Configure form. Now you
can simulate a runaway reaction.

Simulating a Runaway Reaction


Follow these steps to simulate a runaway reaction and create a
reactor relief simulation:
1. Open the Configure form for the reactor.
2. Select the Heat Transfer tab.
3. For the Heating Option, select Constant Temperature.
4. Enter 300 °C for the Medium Temperature.
5. Enter 224 kW/K for the Overall heat transfer * area.
6. Close the Configure form and then change the run mode to
Dynamic.
7. From the Run menu, click Solver Options.
8. On the Integrator tab:
Set this option: To:
Initial Integration Step 1E-5
Minimum Integration Step 1E-6
Maximum Integration Step 1E-3
Absolute Integration Error Tolerance 0.001
Tear Integration Error Tolerance 0.05
9. From the Run menu, click Run Options.
10. Set the run mode to Dynamic.
11. Set the Communication Interval at 1E-4 and Pause at 0.05.
12. Open the ResultsReliefSummary form for the reactor.
13. Open the ResultsReliefPlot for the reactor and set the time
axis range as 0 to 0.01 hours.
14. Run the simulation.
Note that on the ReactorReliefSummary form, blue indicates
the liquid height and pink indicates the swell height.

Aspen Dynamics Examples Guide Example Simulations • 1-29


BatchEster
This is a set of three examples that illustrate how to use Aspen
Dynamics for batch reactor simulations. All three examples model
the esterification of methanol and acetic acid to product methyl
acetate. The three examples are:

Example Description
BatchEster1 Considers only the liquid phase in the reactor.
BatchEster2 Consider vapor and liquid. Includes a condenser.
BatchEster3 Consider vapor and two liquid phases. Includes a
condenser.

These examples are designed to be used as templates that you can


use as a starting point for your own batch reactor simulations.
Note If you are using a Simulation Engine installation from a
client machine, you must make sure that you run Aspen Plus
using the same server and the same working folder as you have
configured for Aspen Dynamics.
To run one of the examples:
1. Copy the Aspen Plus backup file BatchEsterProps.bkp, and
the relevant Aspen Dynamics input file to a convenient
working folder.
2. Load the bkp file into Aspen Plus and run it. Note that this is
a properties only input file, so you will not see a flowsheet
within Aspen Plus.
3. Save the simulation as an Aspen Plus Document (.apw file),
and exit Aspen Plus.
This creates the file batchesterprops.appdf which contains all
of the physical properties data required for the dynamic
simulation. The .apw file is not required, and you can delete
this.
4. Open the Aspen Dynamics simulation and run as required.

1-30 • Example Simulations Aspen Dynamics Examples Guide


BatchEster1 The following picture is the flowsheet for the BatchEster1
example:

This example simulates a fed batch reactor producing methyl


acetate from acetic acid and methanol.
The reactor configuration is entered on the reactor Configure form.
This includes details of the reactor geometry, heating and cooling,
and the reaction kinetics.
The initial charge of the reactor is 20 kmol of acetic acid at 25 °C.
The reactor pressure is fixed to 1 bar. These conditions are entered
on the reactor Initialize form.
A temperature controller measures the reactor temperature, and
sends its output to a split range controller. This controls the
amount of heating and cooling. If the reactor is too hot, cooling is
applied, and if it is too cold, heating is applied. The heating in this
example is provided by steam, and the cooling by cooling water.
The flow of each of these is manipulated by the controller.
A vent line is attached to the reactor. Because of this, the reactor
will perform emissions calculations. As material is charged to the
reactor, the displaced vapor is flashed at the vent condenser
temperature specified on the Configure form. Any vapor that is not
condensed leaves in the vent stream. The cumulative vent flow is
determined and can be viewed on the Results form for the R1Vent
stream. To switch on calculation of cumulative flows the stream
sensor was switched on using the ConfigureSensor form, and the
Cumulative flows option was selected.

Aspen Dynamics Examples Guide Example Simulations • 1-31


The flowsheet section includes four tasks which are used to
specify how the reactor will be operated. These are:

Task Description
R1Charge1Flow Specifies that between 0.2 and 2.2 hours
from the start of the batch, 10 kmol/hr of
methanol is fed to the reactor
R1TCSP Specifies that from 0.1 to 0.4 hours from
the start of the batch the temperature
controller set point is ramped from 20 to
60C.
StopCriterion1 Stops the simulation when the mole
fraction of ester reached 0.45
StopCriterion2 Stops the simulation when the mole
fraction of acid drops to 0.05.
BatchEster2 The following picture is the flowsheet for the BatchEster2
example:

This example is similar to BatchEster1, but also models the reactor


condenser system. Use this modeling approach if boiling takes
place in the reactor.
Note that:
• The pressure calculated in the reactor is the vapor pressure of
the reactor contents.
• The partial pressure of inerts is not modeled.
• If required, a nitrogen blanketing system could be modeled,
but this will not normally have a significant effect on the
results of the simulation.

1-32 • Example Simulations Aspen Dynamics Examples Guide


The vapor line from the reactor is connected through a Valve
model which represents the small resistance to flow in the vapor
line.
A Flash2 model is used to represent the condenser. The Configure
form is used to specify that the model is instantaneous (no
holdup), and is cooled with cooling water at 25 °C. The Condenser
vent pressure is fixed to 1 bar on the Configure form for the
R1Vent stream.
The liquid from the condenser passes to a reflux splitter. The
Configure form is used to specify that all of the liquid is returned
to the reactor.
BatchEster3 The following picture is the flowsheet for the BatchEster3
example:

This example is similar to BatchEster2, but is also capable of


modeling two liquid phases in the overhead system.
The condenser uses the Flash3 model to model both a condenser
and decanter. There are two liquid streams leaving the condenser.
Liquid 1 is less dense.
Each of the two liquid phases leaving the condenser have a
separate reflux splitter so that you can control the amount of each
that is returned to the reactor.

Aspen Dynamics Examples Guide Example Simulations • 1-33


Kinetics Estimation from RC1
Calorimeter Results
The kinetics estimation reactor model (KineticsEst) in Aspen
Dynamics can be used to estimate kinetic parameters using
experimental results from a calorimeter, such as the Mettler-
Toledo RC1e. This example uses the RC1e Tutorial example as
shown in Chapter 5 and 11 of the RC1 Manual, hydrolysis of
acetic anhydride.
Note If you are using a Simulation Engine installation from a
client machine, you must make sure that you run Aspen Plus
using the same server and the same working folder as you have
configured for Aspen Dynamics.
In this example, 52 grams of acetic anhydride are added to 650
grams of water in a 2 liter RC1 calorimeter. The calorimeter
determines the total heat release during the experiment, and also
evaluates the heat released due to the reaction.
Aspen Dynamics can use the Estimation run mode to estimate pre-
exponential factors, activation energies, and other parameters.
Heat evolution data coupled with reaction extent or composition
data can be used to determine the basic kinetic parameters for
most reactions.
Assumptions of the In this example, these assumptions are made:
Kinetics Example • The reaction extent is complete at the end of the experiment.
• Rigorous physical properties from Aspen Plus give an accurate
heat of reaction and heat capacity.
Defining the Reaction The Reactions tab on the Configure form is used to specify the
Mechanism proposed kinetics for the reaction. This form could also be used to
specify multiple reactions as well as Langmuir-Hinshelwood
kinetics.

1-34 • Example Simulations Aspen Dynamics Examples Guide


To see the Configure form:
1. Click the KineticsEst block R1 to select it.
2. Click with the right mouse button on the block.
3. From the menu that appears, point to Forms then click
Configure.
4. Select the Reactions tab:

To edit the reactions:


1. On the Reactions tab, click the Edit button that is next to
Include Power Law Reactions.
The Power Law dialog box appears (see the picture on the
next page):

Aspen Dynamics Examples Guide Example Simulations • 1-35


About the The experimental conditions entered in the Excel data file
Experimental Data Qflow_1M.CVS, are directly obtained from the RC1 run.
The three columns of interest are:
i. Time (in seconds)
ii Temperature, Tr (in degrees C)
iii. Corrected duty, Q (in W)

1-36 • Example Simulations Aspen Dynamics Examples Guide


Running the Kinetics To run this example:
Estimation Example 1. Locate the example folder KineticsEst. If you installed Aspen
Dynamics in the default location, this is in:
C:\Program Files\AspenTech\Aspen Dynamics
12.1\Examples
2. Copy all of the files in the KineticsEst folder to a convenient
working folder.
3. Load the backup file KineticEstProps.bkp into Aspen Plus
and run it.
Note that this is a properties only input file, so you will not
see a flowsheet in Aspen Plus.
4. From the File menu, click Save As and save the simulation as
an Aspen Plus Document (.apw file), then exit Aspen Plus.
This creates the file KineticEstProps.appdf which contains all
of the physical properties data required for the dynamic
simulation. The .apw file is not required, and you can delete
this.
5. In Microsoft Excel, open the datafile Qflow_1M.cvs.
6. In Aspen Dynamics, open the file KineticsEstimation.dynf.
7. Open the Configure form for block R1 on the flowsheet.
8. On the Estimated Variable tab, change the pre exponential
variable Pre_exp(1) from Available to Selected.
9. On the Experiments tab, click Create Experiment and then
click Edit Experiments.
The standard Aspen Custom Modeler Estimation dialog box
is displayed.
10. Change the run mode to Estimation
11. On the Run menu, select Run Options. Change the time units
in which the user interface should display time to seconds.
This is because the experimental data uses times in seconds.
Now click OK to close the Run Options window.
12. Edit the experiment that you just created. To do this, click the
experiment name KineticEstimation, and then click the Edit
button.
13. On the Measured Variables tab, edit the variable Q (duty). To
do this, click the variable R1.Q and then click the Edit button.

Aspen Dynamics Examples Guide Example Simulations • 1-37


14. In the Dynamic Measurement Data window, remove the
single line of existing data. To do this, click on the cell that
contains 0.0 for Time, click the right mouse button and then
click Remove.
15. In Excel, copy all the values for the first six columns
(columns Time to Q) and paste into the first cell in the
Dynamic Measurement Data window. If you are prompted
"Are weights included in the end column?", click No.
16. Click OK to close the Dynamic Measurement Data window.
17. On the Fixed Variable tab, edit the variable R1.T
(temperature).
18. In Excel, copy all the values for the first two columns
(columns Time and Tr) and paste into the first cell in the
Fixed Ramping Data window.
19. Click OK to close the Fixed Ramping Data window.
20. On the Fixed Variable tab, edit the variable R1.Fm_in(1)
(inlet mass flowrate), and enter the following information:
Time Value
0 0
5560 0
5560.1 0.208
6460 0.208
6460.1 0
21. Click OK to close the Fixed Ramping Data window.
22. Click Done to close the Edit Estimation dialog box.
23. Run the simulation.
24. On the Estimation dialog box, go to the Estimated Variables
tab to see the estimated value of the pre-exponential factor,
which is approximately 0.125.
You can also edit R1.Q in the dynamic experiment, and click
the plot button to see the observed versus predicted values.

GasHDPE
This example simulates a gas-phase high density polyethylene
process. The feed stream, GFEED, contains the monomers:
ethylene and butene, hydrogen to control the polymer molecular
weight and nitrogen to control the pressure. Catalyst and co-
catalyst are fed directly to the reactor in stream CFEED. The heat
of reaction is removed in the high flow recycle stream.

1-38 • Example Simulations Aspen Dynamics Examples Guide


This model uses Polymers Plus to capture the polymer
characterization, the polymer thermophysical properties and phase
equilibria and polymer kinetics. The polymerization reaction is
modeled using Ziegler Natta kinetics and the catalyst is
characterized by 1 site type (polydispersity = 2). Multiple site
types must be used to characterize broader molecular weight
distributions.
The following illustration shows the flowsheet.

When the Aspen Plus model is sent to flow-driven Aspen


Dynamics, default controllers are added for level, temperature, and
pressure control. The temperature and pressure controllers need to
be reconfigured to represent a typical gas phase process.

The dynamic model can be used to:


• Evaluate alternative grade transition policies
• Study alternative control schemes for controlling the polymer
properties

Aspen Dynamics Examples Guide Example Simulations • 1-39


Running the To reconfigure the controllers:
GasHDPE Example 1. Click on the output signal and reconnect destination to the
new manipulated variable indicated:
Controlled Variable Default Manipulated New
(Input Signal) Variable Manipulated
Variable
Level Powder mass flow rate(Fml_outr) Do not change
Pressure Recycle gas mole flow rate(Fv_outr) Nitrogen feed
rate
STREAMS("GF
EED").FmcR("N
2")
Temperature Reactor heat duty(Qr) Cooler heat duty
BLOCKS("COO
LER").QR
2. After reconnection, re-initialize the temperature and pressure
controllers. To do this, on the controller Configure form,
click the Initialize button.

3. For the pressure controller, the action must be changed from


Direct to Reverse. This is because in the default scheme,
increasing the manipulated variable (recycle rate) would
decrease the pressure, whereas in the new scheme, increasing
the manipulated variable (nitrogen feed) would increase the
pressure. So the controller has the opposite action.
4. Click the Run button. The dynamic model will start
integrating forward. After a few steps, you may change the
run mode to Steady-State. The open equation model will
converge to the same results as Aspen Plus.
Try increasing the hydrogen feed rate and observe the effect it has
on the polymer chain length. To do this:
1. Start the dynamic simulation.
2. Open the reactor form PolymerPlot and the GFEED
Configure form.
3. Increase the hydrogen feed rate (say by 10%) and note that
the polymer produced has a smaller molecular weight.
Hydrogen is a chain transfer agent causing shorter polymer
chains to be produced.
4. You can immediately view polymer results in tables and plots
for the CSTR reactor.

1-40 • Example Simulations Aspen Dynamics Examples Guide


5. To calculate additional polymer attributes for the product, or
any other stream containing polymer, open the
PolymerResults form, and change the DerivedAttributes
parameter to Yes.
This generates additional equations and variables in the model,
and is Off by default to maximize performance.
6. Run again to calculate the additional attributes.

Nylon6
This model is also included in the Aspen Plus/ Polymers Plus
examples, and it is fully described in the online Help for the
steady-state Polymers Plus examples. It is included here with
dynamic specifications for the column and the reactors.
Briefly, caprolactum is polymerized in the presence of water to
form Nylon6. This multi-stage model uses Polymers Plus to
capture the polymer characterization, the polymer thermophysical
properties and phase equilibria and polymer kinetics. The
polymerization reaction is modeled using step growth kinetics, and
the phase equilibria using PolyNRTL.
The model is used to study the effect of feed flow rate on
caprolactam conversion, degree of polymerization, and extraction
value.

Aspen Dynamics Examples Guide Example Simulations • 1-41


The following illustration shows the flowsheet.

The dynamic model can be used for:


• Operability studies, to look at strategies for changing the
production rate while maintaining product quality.
• Control studies
• Safety studies
• Training for process engineers who want to learn about the
process.
Running the Nylon6 To run the example:
Example 1. When the Aspen Plus model is sent to flow-driven Aspen
Dynamics, click the Run button. The dynamic simulation
starts.
2. After a few steps, change the run mode to Steady-State. The
open equation model converges to the same results as Aspen
Plus.
3. You can immediately view polymer results, plots and DPN
profiles for the CSTR and RPLUG reactors.

1-42 • Example Simulations Aspen Dynamics Examples Guide


4. To calculate additional polymer attributes for the polymer
stream, open the PolymerResults form, and change the
DerivedAttributes parameter to Yes.
This generates additional equations and variables in the model,
and is Off by default to maximize performance.
5. Run again to calculate the additional attributes.

Polystyrene (PS)
This model is also included in the Aspen Plus/ Polymers Plus
examples, and it is fully described in the online Help for the
steady-state Polymers Plus examples. It is included here with
dynamic specifications for the reactors, and counter-current
cooling for the plug flow reactor.
Briefly, bulk polystyrene is produced by the free-radical
polymerization of styrene monomer. The process consists of two
CSTR reactors followed by a plug flow reactor, and the
devolatilization section.
The following illustration shows the flowsheet.

Free radicals are formed by thermal initiation of styrene. Polymer


is formed by initiation and propagation reactions, and the polymer
molecular weight is controlled by termination reactions. This
model uses Polymers Plus to capture the polymer characterization,
the polymer thermophysical properties and phase equilibria and
polymer kinetics. The polymerization reaction is modeled using
Free Radical kinetics, and the phase equilibria using PolyNRTL.
The dynamic model can be used for:

Aspen Dynamics Examples Guide Example Simulations • 1-43


• Operability studies, to look at strategies for changing the
production rate while maintaining product quality, and
ensuring the heating and cooling utilities can handle any
demand peaks.
• Control studies
• Safety studies
• Training for process engineers who want to learn about the
process
Running the To run this example:
Polystyrene (PS) 1. When the Aspen Plus model is sent to flow-driven Aspen
Example Dynamics, click the Run button.
The dynamic simulation starts.
2. After a few steps, change the run mode to steady state.
The open equation model converges to the same results as
Aspen Plus.
3. You can immediately view polymer results, plots, and DPN
profiles for the CSTR and RPLUG reactors.
4. To calculate additional polymer attributes for the product, or
any other stream containing polymer, open the
PolymerResults form and change the DerivedAttributes
parameter to Yes.
This generates additional equations and variables in the model,
and is Off by default to maximize performance.
5. Run again to calculate the additional attributes.
6. Try opening the FEED stream Configure form and increasing
the feed rate from 7000 kg/hr to 7500 kg/hr. Look at the
temperature controller plots to see the peak heating and
cooling demand, and the PolymerPlot in the PRODUCT
stream to see the impact on polymer properties.

Reverse Flow Simulation


This is an example of a pressure driven simulation where changes
that occur dynamically give rise to pressure gradients that lead to
flow reversal. The example uses the Flash2, Valve and Mixer
models. At steady state, Flash F2 is at a higher pressure than Flash
F1. Vapor products from both units are vented through the Mixer
to product stream VA. During dynamic simulation, Valve V3 on
this product line is closed and the pressure gradients between F2
and F1 cause reverse flow of the vapor product line from F1.

1-44 • Example Simulations Aspen Dynamics Examples Guide


This is the reverse flow simulation flowsheet:

Creating and Running the Reverse Flow Simulation Example


Follow these steps to create and run the reverse flow simulation
example, starting from an Aspen Plus backup file:
1. In Aspen Plus, open reverse.bkp and run the simulation.
If you installed Aspen Dynamics in the default location,
reverse.bkp is in C:\Program Files\AspenTech\Aspen Dynamics
12.1\Examples\ReverseFlow.
2. Export the simulation as a P Driven Dyn Simulation (*.dynf
& *dyn.appdf).
3. In Aspen Dynamics, open the file reverse.dynf.
4. On the Run Control toolbar, set the Run Mode to
Initialization.
5. Run the simulation. Save a snapshot.
6. Using the Simulation Explorer, add a flowsheet level task
under Simulation\Flowsheet to change the position of Valve
V3 to 2 %.
An example of a task to do this is provided in the text file
V3Pos.txt, whose default location is:
C:\Program Files\AspenTech\Aspen Dynamics
12.1\Examples\ReverseFlow

Aspen Dynamics Examples Guide Example Simulations • 1-45


7. Open the SimulationOptions table and change the value of
the parameter GlobalRFlow to True. The SimulationOptions
table is found in Simulation Explorer under Simulation.
8. With the Run Mode set to Initialization, rerun the simulation
and save a snapshot.
This serves as a starting point for all simulations with the
reverse flow functionality activated.
9. Switch the pressure controllers PC4 and PC2 to manual, and
activate task V3Pos.
10. Set the Run Mode to Dynamics and run the simulation again.
Observe that, as Valve V3 closes, the pressure gradient between
the two Flash units (via valves V1 and V7 and the Mixer) causes
the flow to divert from F2 to F1, which in turn reverses the flow in
Stream V1A. Reverse flow is indicated by negative flow rates.

DIERS Benchmark Examples


The DIERS benchmark examples are a set of case studies that
serve to validate computer software for rating pressure relief
systems. They particularly focus on two-phase pressure relief.
For a full description of the benchmark examples and details on
how to set up and run each case study, refer to the Aspen
Dynamics DIERS Benchmarks pdf file in the
Examples\DiersBenchMarks folder of your Aspen Dynamics
installation.

1-46 • Example Simulations Aspen Dynamics Examples Guide