Você está na página 1de 172

Introduction to Aspen Dynamics Introduction

Introduction to Aspen Dynamics

ES102.111.03

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. Introduction-1 Aspen Technology, Inc.


Introduction to Aspen Dynamics Introduction

Agenda Day 1

Course introduction Aspen Dynamics demonstration


Adding dynamic data in Aspen Plus
Running simulations in Aspen Dynamics
Background information on resolution method used by
Aspen Dynamics
Components and Streams
Distillation with RADFRAC

2002 AspenTech. All Rights Reserved.

Agenda Day 2

Heat Exchanger models


Reactor models
Task language
Pressure changers
Pressure driven simulations
Reverse flow
Physical properties

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. Introduction-2 Aspen Technology, Inc.


Introduction to Aspen Dynamics Introduction

Agenda Day 3

Process Control Models


Application 1: control of a distillation column
Application 2: control of a compressor

Pressure relief
Scripts
Troubleshooting (Hints and Tips)

2002 AspenTech. All Rights Reserved.

Optional Lessons

More information about Aspen Dynamics models


Model customization
Kinetic model estimation

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. Introduction-3 Aspen Technology, Inc.


Introduction to Aspen Dynamics Introduction

Introduction

Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

Introduction to Aspen Dynamics

Aspen Dynamics is a tool in the Aspen Engineering Suite


for dynamic simulation of flowsheets
You build and converge the steady state flowsheet in
Aspen Plus
You export from Aspen Plus a simulation for Aspen
Dynamics
Starts from the same steady state, same properties, same
components, etc.
This course is for Aspen Dynamics 11.1
Significant differences are flagged with New

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. Introduction-4 Aspen Technology, Inc.


Introduction to Aspen Dynamics Introduction

Overview of Aspen Dynamics


Build steady state
flowsheet in Aspen Plus
Prepare flowsheet for
dynamic simulation
Add Dynamic data
Export simulation

Simulation in
Aspen Dynamics
Change control system,
apply disturbances...
2002 AspenTech. All Rights Reserved.

FAQ: What is the difference between Aspen


Custom Modeler and Aspen Dynamics?
These products are for two different types of situations:
Aspen Dynamics:
Running "off the shelf" models based on Aspen Plus
simulation flowsheet
Aspen Custom Modeler:
Create and run your own "custom" models

You can use the Custom Modeling feature simply by


activating the "Custom Modeling" option in Aspen
Dynamics (if you have both licenses)

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. Introduction-5 Aspen Technology, Inc.


Introduction to Aspen Dynamics Introduction

Aspen Custom Modeler and Dynamics

Feature ACM AD ACM+AD

9 9 9
Run GUI and
calculations

Create new models 9 9


9 9
Use the Dynamics
library

Call Properties Plus yes yes yes

2002 AspenTech. All Rights Reserved.

A Simple Example: Quick Tour of


Aspen Dynamics
Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. Introduction-6 Aspen Technology, Inc.


Introduction to Aspen Dynamics Introduction

Example: Applying Aspen Dynamics


What happens if operating conditions change?
VAP

FEED FLASH

Flowrate 100 kmol/hr


Temperature 50 C LIQ
Pressure 2 Bar
Mole-Fractions: Vapor fraction 0.5
Water 0.5 Pressure drop 0.0 bar
Methanol 0.5 Vertical Vessel
files
Length 3.0 m
Diameter 2.0 m
Constant duty heat transfer
Initial liquid fillage fraction 0.5

2002 AspenTech. All Rights Reserved.

Simple Example

1: Create the simulation flowsheet in Aspen Plus


Properties, components, streams, blocks, ...
Develop the flowsheet

2: Enter the dynamic information in Aspen Plus


3: Export the simulation to Aspen Dynamics
4: We have a dynamic model for our flowsheet
Apply disturbances
Change control system
etc...

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. Introduction-7 Aspen Technology, Inc.


Introduction to Aspen Dynamics Dynamic Data in Aspen Plus

Dynamic Data in Aspen Plus

Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

Lesson Objectives

Describe the data required to create a dynamic


simulation input from an Aspen Plus flowsheet
Complete Workshop 102-dynamic-data

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 1-1 Aspen Technology, Inc.


Introduction to Aspen Dynamics Dynamic Data in Aspen Plus

Topics

Accessing the dynamic data forms in Aspen Plus


Adding the data required for the dynamic simulation in
Aspen Plus
Creating the Aspen Dynamics simulation files

2002 AspenTech. All Rights Reserved.

Accessing the Dynamic Data Forms (1)

To view Dynamic Toolbar make sure Dynamic check box


is selected from Toolbars dialog window under View
menu

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 1-2 Aspen Technology, Inc.


Introduction to Aspen Dynamics Dynamic Data in Aspen Plus

Accessing the Dynamic Data Forms (2)

On the Dynamic Toolbar, press dynamic button to


access dynamic data forms

Lets you specify the data for the dynamic simulation file
to be exported to Aspen Dynamics
It does not affect the steady state results

Tip: Enter the data as you build your flowsheet


Do not assume that default values apply to your case!

2002 AspenTech. All Rights Reserved.

Adding Dynamic Data

Data is required to calculate the following:


Vessel geometry (required for vessel volume)
Vessel initial fillage (used for starting liquid holdup)
Process heat-transfer method
Equipment heat transfer options
Equipment heat capacity
Environmental heat transfer

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 1-3 Aspen Technology, Inc.


Introduction to Aspen Dynamics Dynamic Data in Aspen Plus

Vessel Geometry Dynamic Data

Vessel type
Instantaneous
Default vessel type for most vessels - requires no input for vessel geometry
Vertical
Horizontal

Vessel geometry
Head Type
Elliptical
Hemispherical
Flat
Length
Diameter

2002 AspenTech. All Rights Reserved.

Vessel Geometry: Cylinders


FLAT ELLIPTICAL HEMISPHERICAL
VERTICAL

Length L L
Level Level Level
Diameter
D
D
HORIZONTAL

D
Diameter D
Level Level
Level
Length L L
2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 1-4 Aspen Technology, Inc.


Introduction to Aspen Dynamics Dynamic Data in Aspen Plus

Vessel Initial Condition Sheet

Specify the fraction of the total vessel volume that is


occupied by the liquid phase at time 0 (initial condition)

vapor

liquid

Liquid Volume
Fraction

2002 AspenTech. All Rights Reserved.

Process Heat Transfer Option

Constant Duty
Default (requires no further data addition)

Constant Medium Temperature


Heat duty is dependent on the temperature difference between
process fluid and the heating/cooling medium
Defaults to constant duty option when steady state duty, Q is
zero

LMTD (log mean temperature difference)


Heat duty is dependent on the log mean temperature difference
between the process fluid and the heating/cooling medium

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 1-5 Aspen Technology, Inc.


Introduction to Aspen Dynamics Dynamic Data in Aspen Plus

Process Heat Transfer Option Sheet

2002 AspenTech. All Rights Reserved.

Constant Heat Duty Option

Duty is a fixed variable in the dynamic simulation


Set to the steady state Aspen Plus simulation results value

Duty can be manipulated in the dynamic simulation


Manipulate directly by manually changing the value
Manipulate with a PID controller

Example for Constant Heat Duty option application


A fired heater

Duty can be supplied by an inlet heat stream

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 1-6 Aspen Technology, Inc.


Introduction to Aspen Dynamics Dynamic Data in Aspen Plus

Constant Temperature Option

Specify T_medium value on dynamic input form


Vary value of T_medium in the dynamic simulation
directly or with a controller
Equation is: Q = UA . (T_process T_medium)
Where:
Q = Heat duty
UA = Product of the overall heat transfer coefficient and
the heat transfer area
T_process = Temperature of the process fluid
T_medium = Heating/cooling medium temperature

2002 AspenTech. All Rights Reserved.

Log Mean Temperature Difference Option (1)

[1] Q = UA . LMTD
[2] Q = Fmmed . Cpmed . (Tmed_Out Tmed_In)
Variable Description

LMTD Log mean temperature difference


Fmmed Mass flow rate of the heating/cooling medium
Tmed_In Inlet temperature of heating/cooling medium
Tmed_Out Outlet temperature of the heating/cooling medium
Cpmed Specific heat capacity of the heating/cooling medium
UA Product of the OHTC and the heat transfer

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 1-7 Aspen Technology, Inc.


Introduction to Aspen Dynamics Dynamic Data in Aspen Plus

Log Mean Temperature Difference Option (2)

When you export the simulation to Aspen Dynamics:


Tmed_out is calculated from the specified temperature
approach
Fmmed is calculated from the heat duty
LMTD and UA are calculated

In Aspen Dynamics simulation:


Fmmed and UA are specified (fixed) to the values found above
When process temperature changes, Q will vary
Fmmed can be manipulated by the user or a temperature
controller

2002 AspenTech. All Rights Reserved.

Comparison of the Heat Transfer Options

Example Constant duty heats up


Results
100
90 95 100 105 110

the vapor after all the


T (Constant Medium Temperature)

liquid has been vaporized


Feed Flowrate kmol/hr
75

Feed flow closed


T (Constant Duty)

T (LMTD option)

LMTD (example : T = 90 C)
50
75 80 85

Constant medium temperature (ex: T = 80 C)


25
70

0 0.25 0.5 0.75 1 1.25 1.5 1.75 2


Time Hours

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 1-8 Aspen Technology, Inc.


Introduction to Aspen Dynamics Dynamic Data in Aspen Plus

Equipment Heat Transfer

Equipment heat capacity can be important when there


are large changes in the equipment temperature -
possible scenarios include startup, shutdown and
pressure relief
Data required
Equipment mass
Equipment heat capacity

Environmental heat transfer


Environmental heat transfer is important when the process is
sensitive to changes in the global ambient temperature
Wall heat transfer (new in 11.1)

2002 AspenTech. All Rights Reserved.

Equipment Heat Transfer Sheet

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 1-9 Aspen Technology, Inc.


Introduction to Aspen Dynamics Dynamic Data in Aspen Plus

Setup Specifications Global Sheet

To specify Ambient temperature

2002 AspenTech. All Rights Reserved.

Advice When Preparing a Dynamic Simulation

Break down the flowsheet into smaller sections to work


out the details of the dynamic simulation before you
attempt to the export a complex flowsheet
Review carefully your flowsheet block by block
Check the default settings in the Dynamic forms
Check for missing blocks (i.e., storage tanks to be modeled
with MIXER, FLASH2, FLASH3)
Check for missing streams (i.e., bypass streams, N2 streams,
etc.)
Remove unused components
Selection of Valid Phases in blocks and feed streams

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 1-10 Aspen Technology, Inc.


Introduction to Aspen Dynamics Dynamic Data in Aspen Plus

Create the Aspen Dynamics Files

Export
Creates and saves the Aspen Dynamics problem file
runid.dynf
Creates and saves the Aspen Plus Properties Definition File
(APPDF) required for the properties calculations
runiddyn.appdf

Send To
Exports then automatically starts Aspen Dynamics and loads
the exported problem files
runid#.dynf
runiddyn#.appdf

2002 AspenTech. All Rights Reserved.

Types of Dynamic Simulations

Flow driven
Feed flowrate and pressures are specified
Flowrate is not controlled by pressure differences
Useful for a first approach of the dynamic behavior of the process
Good for liquid processes (usually good flow controllability)

Pressure driven
Feed and product pressures are specified
Flowrate results from pressure difference
A bit more complex to specify (because you need to balance the
pressures in Aspen Plus with valves, pumps, ...) but more rigorous
Differences will be discussed in detail in "Pressure driven
simulations" lesson

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 1-11 Aspen Technology, Inc.


Introduction to Aspen Dynamics Dynamic Data in Aspen Plus

Problems During Export

Some models and options are not supported by Aspen


Dynamics
These are detected when entering the dynamic data or
when exporting the dynamic simulation

2002 AspenTech. All Rights Reserved.

Messages While Exporting the Simulation

Always analyze the messages while exporting the


simulation as they are really important
Warning: something you should really check!
Examples:
Zero flow in a stream: no results to initialize composition
Flash vessel full of liquid: will be at bubble pressure in dynamic
simulation (can cause flows to change)

(Fatal) Error: The simulation cannot be exported or used


without corrective action
Pressure checker

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 1-12 Aspen Technology, Inc.


Introduction to Aspen Dynamics Dynamic Data in Aspen Plus

Types of Messages During Export (1)

FATAL ERROR:
Use of any Aspen Plus feature, which is not supported in Aspen
Dynamics
Any results, which are inconsistent with a dynamic simulation, e.g.,
problems with RadFrac pressure profile.
ERROR:
A block that is not supported
Note: If a flowsheet includes an unsupported block, it will still be
exported but a message will be output about the unsupported block
WARNING
Anything which could cause a problem in the dynamic simulation.
This includes things like negative or zero pressure drops etc. in
valves

2002 AspenTech. All Rights Reserved.

Types of Messages During Export (2)

INFORMATION:
Information about the dynamic simulation. Often used to output
information before fatal error message

Note that problems are detected only when you try to


export the simulation (using File/Export or File/Send to)
For pressure driven simulations
Pressure checker tool can be used to detect specific pressure
driven problems that need to be addressed, without trying to
export the file
This will be reviewed later in the course (Day 2)

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 1-13 Aspen Technology, Inc.


Introduction to Aspen Dynamics Dynamic Data in Aspen Plus

Objects Exported

The following objects are exported:


Components
Properties
Streams and blocks (supported models only)

The following are not exported:


Specifications (Design-Specs, Balance blocks, ...)
Calculator blocks
However, the dynamic simulation starts from the results of
these blocks

2002 AspenTech. All Rights Reserved.

Aspen Dynamics RATING Simulation

In Aspen Plus, you have many options for the


specification of blocks, for design or rating simulations
Example to illustrate the difference in specifications
between Aspen Plus and Aspen Dynamics
Aspen Plus: A Flash2 block with temperature and pressure
specification, or vapor fraction and pressure, or...
In Aspen Dynamics: the heat duty is "fixed" to the Aspen Plus
calculated duty, so the temperature will vary
In Aspen Dynamics: the pressure is controlled (no longer fixed)

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 1-14 Aspen Technology, Inc.


Introduction to Aspen Dynamics Dynamic Data in Aspen Plus

Stream Specifications

Feed stream specifications


Same specifications as in Aspen Plus for the temperature,
pressure or vapor fraction
Same specifications as in Aspen Plus for the composition and
flowrate specification
For Flow driven simulations:
Flowrate and pressure of feed streams are fixed
Pressure of product streams are calculated
For Pressure driven simulations:
Pressure of feed and product streams are fixed
Flows are calculated from pressure difference and resistance to flow
(i.e., valves, ...)

2002 AspenTech. All Rights Reserved.

Default Control System

When the flowsheet is exported, level, pressure and, in


some cases, temperature controllers are automatically
added to the vessels
Flow driven simulation: manipulate the flowrates
Pressure driven simulation: manipulate the valve position

These controllers are added automatically because


otherwise the flowsheet would be unstable
You should check that the default settings for the
controllers are suitable for your application and modify
them if needed

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 1-15 Aspen Technology, Inc.


Introduction to Aspen Dynamics Dynamic Data in Aspen Plus

Workshop 102-dynamic-data files

Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 1-16 Aspen Technology, Inc.


Introduction to Aspen Dynamics Running Simulations in Aspen Dynamics

Running Simulations in
Aspen Dynamics
Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

Lesson Overview

Review the basic concepts in running the simulation


Explain how to run and pause the simulation
Show how to display the results
Complete Workshop 103-dynamic-run

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 2-1 Aspen Technology, Inc.


Introduction to Aspen Dynamics Running Simulations in Aspen Dynamics

Starting Aspen Dynamics

Double-click on the file (extension dynf)


You usually start Aspen Dynamics with a file

Can be started from Aspen Plus when exporting the file


It is a good idea to keep a copy of the simulation that you
have exported from Aspen Plus
Note: Aspen Dynamics simulation consists of:
<name>.dynf: dynamic file
<name>DYN.appdf: physical properties
<name>.bkp: Aspen Plus simulation file

2002 AspenTech. All Rights Reserved.

Aspen Dynamics Graphical Interface

A table
A plot

Flowsheet window

Simulation
Explorer

Simulation messages window

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 2-2 Aspen Technology, Inc.


Introduction to Aspen Dynamics Running Simulations in Aspen Dynamics

Simulation Explorer

Display the content of the simulation


Flowsheet: blocks and streams on the
flowsheet
Custom Modeling: (only if licensed)
customized models
Dynamics: library of models
System Library: library of fundamental
types
ComponentList: components and physical
properties
Diagnostics: information on resolution

2002 AspenTech. All Rights Reserved.

Run Mode

Selects the type of simulation


Aspen Dynamics is typically used with "Dynamic" and
"Initialization" run modes
Initialization run:
Solves the system's equations at time zero to find the values of
the free variables
Dynamic run:
First it does an initialization run at time 0
Then integrate step by step the system's equations
Report results at each communication interval

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 2-3 Aspen Technology, Inc.


Introduction to Aspen Dynamics Running Simulations in Aspen Dynamics

Run Controls

To start the simulation: click on the Run button


To pause the simulation: click on the Pause button
Continue the simulation: click on Run button again
To go back to time 0: click on Restart button
To go back to a previous step: click on Rewind button
To interrupt the simulation: Run menu, Interrupt
Stops before the completion of the communication interval
To run step-by-step

2002 AspenTech. All Rights Reserved.

Menu Run, Run Options

Selection of the communication interval

Communication
interval

Time units for


display (plots)
New

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 2-4 Aspen Technology, Inc.


Introduction to Aspen Dynamics Running Simulations in Aspen Dynamics

Menu Run, Solver Options

Selects the parameters for the numerical resolution


methods
This will be reviewed later in the course
Important settings on Integrator
sheet:
Initial Integration Step
Minimum Integration Step
Default values are appropriate
for the other settings

2002 AspenTech. All Rights Reserved.

Simulation Messages (View, Messages)

Shows messages while running the simulation


Task execution
Vessels being full of liquid, or empty
etc.

Can be selected from the View menu

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 2-5 Aspen Technology, Inc.


Introduction to Aspen Dynamics Running Simulations in Aspen Dynamics

Display the Variables

Predefined tables
Results: to display key results
Manipulate: to display key variables that can be manipulated (if
they are "fixed")
Many other tables (specific to models)
AllVariables: to show all variables

Predefined plots
You can create your own tables and plots

2002 AspenTech. All Rights Reserved.

Example of a Table

Stream "Manipulate" table

Variable units
Variable name

Variable specification mode


Current value

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 2-6 Aspen Technology, Inc.


Introduction to Aspen Dynamics Running Simulations in Aspen Dynamics

Specifications and Values of Variables

Fixed: You give the value of the variable for the


calculations
Free: Value is calculated by Aspen Dynamics
(i.e., it is a result)
Initial: You give the value of the variable at time 0
(i.e. it is the starting point for the simulation)
Original values are from the Aspen Plus simulation,
exported file
You can save new starting points in "Kept Results"
sections or in "Snapshots"

2002 AspenTech. All Rights Reserved.

Units of Measurement

Select from Tools menu, Units of Measurement


Can be changed on tables for individual variables
Predefined units of measurement sets consistent with
Aspen Plus simulation
Advanced users can create their own sets if required

Aspen Dynamics does its internal calculations with the


"Metric" unit set
Example: convergence messages

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 2-7 Aspen Technology, Inc.


Introduction to Aspen Dynamics Running Simulations in Aspen Dynamics

You can Create Your own Plots and Tables

Drag and Drop


User-created plots and tables
definitions are stored in the "Flowsheet"

profile table
plot
history table

profile plot table

2002 AspenTech. All Rights Reserved.

Steps to Create a Plot

1. Click on the Plot button and give it a name


2. Open a table that displays the variable
3. Click on the name of the variable
4. Hold down the left mouse button to drag it and drop it
on the Plot form
5. Do a right mouse click on the Plot to change its
properties (i.e., to remove variables, display grid, ...)
6. The Plot is defined in the Flowsheet folder

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 2-8 Aspen Technology, Inc.


Introduction to Aspen Dynamics Running Simulations in Aspen Dynamics

Interacting with the Simulation

You can change the value of fixed variables while the


dynamic simulation is running
Example: Manipulate table

You can change the settings of the controllers


FacePlate form CompactFacePlate New

Configure form

Task language will be presented on Day 2

2002 AspenTech. All Rights Reserved.

Simulation Files (Graphical Interface Side)

Aspen Plus simulation file process.bkp

process.dynf
Aspen Dynamics simulation file
Can include "kept results" to save starting point

Physical properties file processDYN.appdf

This file can be recreated from the bkp file

It is important that you keep these files!

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 2-9 Aspen Technology, Inc.


Introduction to Aspen Dynamics Running Simulations in Aspen Dynamics

Simulation Files (Client and Server Sides)

Graphical User Interface (client) side:

process.bkp process.dynf processDYN.appdf

Simulation server "Working Folder"


snapshot.snp
Snapshot and results (binary files)
snplnnnn.snp
Plot data PlotData.cpd

Physical properties files


SAI.rep SAI.his

2002 AspenTech. All Rights Reserved.

Usage Suggestions

Make a backup copy of the dynf file before opening it in


Aspen Dynamics
Create "Kept results" to save important starting points
Clean up the Working Folder to avoid running out of disk
space
When working on long projects, it is a good idea to
create an archive file every day with the bkp, the dynf
and the appdf file (consistent set) so that you can easily
track back if needed

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 2-10 Aspen Technology, Inc.


Introduction to Aspen Dynamics Running Simulations in Aspen Dynamics

Workshop 103-dynamic-run files

Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 2-11 Aspen Technology, Inc.


Introduction to Aspen Dynamics Aspen Dynamics Resolution

Aspen Dynamics Resolution

Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

Lesson Objectives

Explain how Aspen Dynamics is solving the simulation


Equation oriented: specifications
Dynamic system: initial conditions
Illustrate this with an example, using flowsheet constraints
(adding one equation) and changing specifications

Demonstrate the equation oriented approach using


Aspen Plus

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 3-1 Aspen Technology, Inc.


Introduction to Aspen Dynamics Aspen Dynamics Resolution

Calculations Done by Aspen Dynamics

Basis of the models


Dynamic Material and Energy balances
Thermodynamic equilibrium
Geometry constraints (to relate volume and level)
etc.

Implementation: algebraic and differential equations


Models in the Dynamics library
Written in Aspen Custom Modeler Language

Run is possible only if the simulation has the correct


number of specifications ("no degree of freedom")

2002 AspenTech. All Rights Reserved.

Aspen Dynamics Models Equations

Expand Dynamics library from Simulation Explorer


Double-click on the "equation" icon to see the model's code

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 3-2 Aspen Technology, Inc.


Introduction to Aspen Dynamics Aspen Dynamics Resolution

Specifications

Every variable has a "Spec" property, which selects its


specification mode
Valid values:
Spec Description
Fixed The variable value is specified by the user (A variable
whose value is not being solved for)
Initial A variable whose value is known at time zero for an
initialization or dynamic run
RateInitial A state variable whose time derivative is known at time
zero for an initialization or dynamic run
Free A variable whose value is being solved for (default)

2002 AspenTech. All Rights Reserved.

Initialization Run

Solve the system's equations at time 0


Known
Fixed variables
Initial variables
Unknown
Free variables
Derivative of state variables

The value of variable time derivative gives an idea of the


direction of change and how fast the system will move in
the dynamic run

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 3-3 Aspen Technology, Inc.


Introduction to Aspen Dynamics Aspen Dynamics Resolution

Dynamic Run

Numerical integration proceeds step by step


Time step is automatically adjusted to maintain integration
accuracy
Increase step size when nothing happens
Cut step size when fast events are taking place
Settings in Run/Solver Options
Aspen Dynamics can use VSIE or ImpEuler only

Results are available at every communication interval


Tables, plots, etc.
Settings in Run/Run Options

2002 AspenTech. All Rights Reserved.

Variables Values from Aspen Plus Results

The results from Aspen Plus are used to specify the


initial values of variables
Fixed variables: Feed streams, characteristics of the
equipments, controller settings, ...
Initial variables: Content of the vessels (holdup of mass and
energy), ...
Free variables: Given values close to the solution to ensure
convergence

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 3-4 Aspen Technology, Inc.


Introduction to Aspen Dynamics Aspen Dynamics Resolution

Note

Fixed variables can be manipulated during a dynamic


run
Manipulate the value in tables
Define and activate tasks to implement ramps

FIXED FIXED

time time

Change in a table or with a task Ramp


2002 AspenTech. All Rights Reserved.

Initial Conditions

Initial conditions: the starting point for the dynamic


simulation
So don't confuse INITIAL and FIXED as they are
different things!

FIXED INITIAL

time 0 time

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 3-5 Aspen Technology, Inc.


Introduction to Aspen Dynamics Aspen Dynamics Resolution

System Specification

Simulations exported from Aspen Plus are correctly


specified
Consequence: you need to free a variable to fix another

Status indication
Incomplete
Under-specified
Complete
Over-specified
Initial state under-specified
Initial state over-specified
Singular

2002 AspenTech. All Rights Reserved.

View Status Window

Double-click on Status check button for the full message

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 3-6 Aspen Technology, Inc.


Introduction to Aspen Dynamics Aspen Dynamics Resolution

Variable Find

Very useful to find variables in the simulation


Can be used to create tables and plots (drag and drop)

2002 AspenTech. All Rights Reserved.

Snapshot and Results

To restart a simulation
To time 0 for dynamic simulation (snapshot 'Dynamic
Initialization')

To rewind the simulation


To any timed snapshot

To keep, export, import and copy results

Snapshot Management

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 3-7 Aspen Technology, Inc.


Introduction to Aspen Dynamics Aspen Dynamics Resolution

Rewind and Restart

Rewind lets you select the snapshot to which you want to


go
Restart is a short cut to Rewind: returns the dynamic
simulation to its solved initial state
Uses the 'Dynamic Initialization' snapshot
Restart Rewind

Run Step Pause

2002 AspenTech. All Rights Reserved.

How to Enable Rewind?

Go to Snapshot management tool, select "Take regular


snapshots"

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 3-8 Aspen Technology, Inc.


Introduction to Aspen Dynamics Aspen Dynamics Resolution

Snapshot Management Tool

Snapshots can be:


Used for rewind and copy
Marked as "kept" so that the data will be saved in acmf

Results
"Old" snapshots

Snapshots

Results

2002 AspenTech. All Rights Reserved.

Export, Import, Keep

Export: Export the snapshot or result to a text file (asnp)


(*)
Import: Import a file into a result (*)
Keep: Mark the snapshot or result to be saved in the
dynf file
Settings: Access options controlling snapshot handling
Compress: Removes deleted snapshots from .snp files
in working directory (*)

(*) New
2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 3-9 Aspen Technology, Inc.


Introduction to Aspen Dynamics Aspen Dynamics Resolution

Demonstration 104-resolution files

Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 3-10 Aspen Technology, Inc.


Introduction to Aspen Dynamics Components and Streams

Components and Streams

Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

Lesson Objectives

Review important information on streams and


components
Complete Workshop 105-streams

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 4-1 Aspen Technology, Inc.


Introduction to Aspen Dynamics Components and Streams

Aspen Dynamics Library of Models

Review stream and components


Show how to create a controller on the flowsheet

2002 AspenTech. All Rights Reserved.

Simulation Explorer

Flowsheet: Shows the streams and blocks


Dynamics library: Models
Specific details will be reviewed later
Stream types:
ControlSignal: to connect controllers

ComponentList: Components and physical properties


referring to Aspen Plus physical properties

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 4-2 Aspen Technology, Inc.


Introduction to Aspen Dynamics Components and Streams

Components

Aspen Dynamics supports:


Conventional components
Pseudocomponents, assays and blends

Simulation with electrolytes:


Apparent component approach only
Solid components if defined in salt reactions in the chemistry

Polymers: See documentation


Usage tip: Remove unused components from Aspen
Plus before exporting the simulation to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

Stream Types

Stream types to match Aspen Plus streams


MaterialStream: Only CONVEN stream class is supported
WorkStream
HeatStream

Stream type to connect controllers to the other objects


ControlSignal

Pseudo streams are not supported

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 4-3 Aspen Technology, Inc.


Introduction to Aspen Dynamics Components and Streams

Stream Specifications

Feed streams are specified following the values entered


in Aspen Plus
Can be modified using the Stream Configure form

New

Note: In versions before 11,


Configure is simply a table

2002 AspenTech. All Rights Reserved.

ConfigureSensor

Access to switch for calculation of additional stream


properties
Phase fractions
Phase compositions
Phase densities
Volumetric flow rate
pH
Petroleum properties

Calculated properties are displayed in Results form

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 4-4 Aspen Technology, Inc.


Introduction to Aspen Dynamics Components and Streams

ConfigureSensor Form

Check Sensor
On

2002 AspenTech. All Rights Reserved.

Petroleum Properties

Properties calculated using the Stream Sensor


ASTM D86 and D1160 temperature
Cetane number
Reid Vapor Pressure (same as RVP-ASTM in Aspen Plus)
Specific gravity (60/60F)
Watson UOP K-Factor

Free water is not supported: Use liquid-liquid-vapor


instead

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 4-5 Aspen Technology, Inc.


Introduction to Aspen Dynamics Components and Streams

Workshop 105-streams files

Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

Operation of the PID Faceplate

A description of the PID faceplate operation follows

Manual mode switch Cascade mode switch Configure form

Auto mode switch Plot forms

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 4-6 Aspen Technology, Inc.


Introduction to Aspen Dynamics Components and Streams

PID Initialize Values Button

PID Initialize Values Button


Uses the current values of the measured variable and manipulated
variable to initialize controller parameters
The value for the operator set point changes to the value of the
measured variable
The value for bias changes to the value of the manipulated variable
Process variable and output ranges changed to 0 and 2 times the
value
Exception: For valve position, the range is specified to 0 and 100%

Typically, you use this only once, when you create the PID block

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 4-7 Aspen Technology, Inc.


Introduction to Aspen Dynamics Distillation with RADFRAC

Distillation with RADFRAC

Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

Lesson Objectives

Overview of RADFRAC capabilities


Dynamic forms in Aspen Plus
Model and specifications of exported simulation to:
Show how Aspen Plus data and results are used
Review some specific details of Aspen Dynamics assumptions

Pressure profile
Control
Complete Workshop 106-radfrac

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 5-1 Aspen Technology, Inc.


Introduction to Aspen Dynamics Distillation with RADFRAC

RADFRAC Capabilities

Dynamic RadFrac may be used in the same applications as the


steady-state model
In dynamic mode, RadFrac models the pressure drop across each
stage due to the head of liquid and vapor flow resistance
Stage hydraulics are also modeled
Reactive distillation: only React-Dist reaction type
Equilibrium reactions are not supported

Unsupported
User-KLL, polynomial KLL
VL1/LL prop-sections
Different VL1 and VL2 efficiencies
Thermosyphon reboilers with above-stage return convention

2002 AspenTech. All Rights Reserved.

RADFRAC Dynamic Forms in Aspen Plus

Condenser: Heat transfer option for the condenser duty


Reboiler: Heat transfer option for the reboiler
Reflux drum: Size and initial condition for the reflux drum
Sump: Size and initial condition for the column sump
Decanter: Size and initial conditions for the decanters
Hydraulics: Selection of the pressure drop and holdup
calculation for the stages
Dynamic equipment HT: Pption to model thermal inertia

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 5-2 Aspen Technology, Inc.


Introduction to Aspen Dynamics Distillation with RADFRAC

Simple Distillation
Condenser(1)

Reflux.FmR
Stage(2)
Stage(1): Reflux drum

Stage(nstage): Sump and reboiler

2002 AspenTech. All Rights Reserved.

Overhead System

Condenser: Condenser(1)
Assumes instantaneous operation

Reflux drum: Stage(1)


Both liquid and vapor holdup are modeled
There is no hydraulic equation for reflux flow
Liquid reflux mass flow rate is fixed
Variable name: Reflux.FmR

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 5-3 Aspen Technology, Inc.


Introduction to Aspen Dynamics Distillation with RADFRAC

Bottoms System

Reboiler: Stage(nstage)
For thermosyphon option:
Relation between duty and flowrate
- Reboiler recirculation mole flowrate FR
- Reboiler duty QR
QR = K_thermo*FR^3
where :
K_thermo constant from steady state results

2002 AspenTech. All Rights Reserved.

Stage

Material and energy balance


Include liquid and vapor holdup, reactions, feed above and on-
stage, heat duty, feed, sidedraw, etc.

Liquid-vapor equilibrium
Hydraulics
Relation with liquid and vapor flowrates to give liquid holdup
Relation with liquid level and vapor flowrate to pressure drop
More details in online help "RADFRAC Hydraulics and
pressure drop equations"

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 5-4 Aspen Technology, Inc.


Introduction to Aspen Dynamics Distillation with RADFRAC

Options for Hydraulics

Simple Trays: Uses simple correlation for trays


Simple Packing: Uses simple correlations for packing
Rigorous: Uses the same correlations as Tray
Rating or Packing Rating
Model includes weeping for trays if vapor flowrate
becomes too low

2002 AspenTech. All Rights Reserved.

Simple Stage Hydraulics

Ql_out = K1*L_weir*Ht_Crest2/3
Vl = StageArea*Level
P V = Vl + Vv
P_diff = K2*Fv_inp^2 + K3*Level
P_diff

Ht_Crest
Level
Ht_Weir

P'
Fv_inp = Note: Simple tray model accounts for
liquid in downcomer as if level was
Stage(i+1).vapout.F same as on stage (stagearea*level)
2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 5-5 Aspen Technology, Inc.


Introduction to Aspen Dynamics Distillation with RADFRAC

Simple Tray Hydraulics

Required input from Aspen Plus


Diameter
Tray spacing
Ratio of weir length to column diameter (Lw/D) New

The % active area

Adjust these to model a wide range of tray configurations, including


multipass trays
The value of the constants K1, K2 and K3 are calculated from
flowrate and pressure profile specified or calculated in Aspen Plus
Note: You need to define a realistic pressure profile in Aspen Plus

2002 AspenTech. All Rights Reserved.

Usage Note in Aspen Plus Hydraulics Sheet

May need to scroll to the right to make Lw/D and


%Active area visible

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 5-6 Aspen Technology, Inc.


Introduction to Aspen Dynamics Distillation with RADFRAC

Simple Packing Hydraulics

Same principle as for simple tray option


Liquid holdup proportional to liquid velocity
Pressure drop proportional to square of vapor flowrate

Required specifications
Diameter
HETP
Initial liquid volume fraction

See online help for more information

2002 AspenTech. All Rights Reserved.

Rigorous Tray and Pack Rating Option (1)

Usage note: To complete the form you need to select on


tray rating or pack rating section the option "Update
Pressure Profile"

Why does it say


"incomplete"?

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 5-7 Aspen Technology, Inc.


Introduction to Aspen Dynamics Distillation with RADFRAC

Rigorous Tray and Pack Rating Option (2)

Check "Update section pressure profile"

2002 AspenTech. All Rights Reserved.

Control

Example showing default controllers for a simple column


PC Drum pressure
Condenser duty

LC Drum level

Distillate flowrate

Reflux is fixed

Reboiler duty is fixed


LC Sump level

Bottom flowrate

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 5-8 Aspen Technology, Inc.


Introduction to Aspen Dynamics Distillation with RADFRAC

Condenser and Reflux Drum

Drum level control


Manipulate liquid distillate mass flowrate
Reflux mass flowrate is fixed (Reflux.FmR)
If no liquid distillate stream, then level is controlled by
manipulating reflux mass flowrate
Special case for decanter in condenser: additional level
controller to control interface position
Top stage pressure control
Manipulate vapor distillate stream (if there is a vapor distillate
stream)
Manipulate condenser duty (if there is a condenser)

2002 AspenTech. All Rights Reserved.

RadFrac Reboiler Control

Bottom stream manipulated to control the level in the


sump
Reboiler duty
Fixed if using Constant Duty option
Calculated from medium temperature (with constant medium
temperature option) or medium flowrate (with LMTD option)

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 5-9 Aspen Technology, Inc.


Introduction to Aspen Dynamics Distillation with RADFRAC

RadFrac Decanter

Assumes no vapor in system


Flow rate of the first liquid phase is manipulated to
control the total liquid level
Flow rate of second liquid phase is manipulated to
control the interface level

2002 AspenTech. All Rights Reserved.

Connectivity for the Decanter


VapOut LiqIn
Decanter(n)
Stage(n)

VapIn LiqOut LiqDraw LC


LiqIn
flow = 0 LC

Stage(n+1) Liq1Draw(i>1)
Liq1Draw(1)

Liq2Draw(i>1) Liq2Draw(1)

FmR
FmR If there is only one stream connected
Stage(n+2) to the decanter, then it is connected
to LiqDraw, which is the sum of
Liq1Draw(1) and Liq2Draw(1).

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 5-10 Aspen Technology, Inc.


Introduction to Aspen Dynamics Distillation with RADFRAC

RadFrac Pumparound

Assumes instantaneous operation


Constant duty option for heat transfer

2002 AspenTech. All Rights Reserved.

Stage Sidedraw Streams

Flow-driven simulation: Flow rate is fixed at steady-state


value
Pressure-driven simulation: Flow rate results from
pressure-flow relation in product line

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 5-11 Aspen Technology, Inc.


Introduction to Aspen Dynamics Distillation with RADFRAC

Workshop 106-radfrac files

Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

Workshop Summary

Step 1: Open file in


Aspen Plus

Step 2: Enter
dynamic data Step 4: Change
control system and
test

files
Step 3: Try dynamic
simulation

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 5-12 Aspen Technology, Inc.


Introduction to Aspen Dynamics Heat Exchangers and Reactors

Heat Exchangers

Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

Heat Exchangers

Heater
Instantaneous only

HeatX
Instantaneous or Dynamic

MHeatX
Instantaneous or Dynamic

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 6-1 Aspen Technology, Inc.


Introduction to Aspen Dynamics Heat Exchangers and Reactors

HeatX Heat Exchangers

Dynamic model consists of two perfectly mixed tanks for


each side and heat exchange based on LMTD
dp hot
hot in hot out

Q = U*A*LMTD

cold out cold in

dp cold

You need to adjust the volumes to fit plant data

2002 AspenTech. All Rights Reserved.

MHeatX

Dynamic model similar to HeatX


Dynamic characteristics are modeled using volume holdups on
each side of exchanger
MHeatX Total volume (one for each stream) is split in two, inlet and
outlet
All the pressure drop is assumed to occur between the inlet and outlet
volumes

Product of exchanger area and the overall heat transfer


coefficient (UA) for each zone is automatically Fixed at
the steady-state value

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 6-2 Aspen Technology, Inc.


Introduction to Aspen Dynamics Heat Exchangers and Reactors

Heat Exchangers

The pressure drop is related to the volumetric flow rate


by:

P = K * Rho * Fv 2
Where:
K = Constant determined by fitting to steady-
state conditions
P = Pressure drop
Rho = Mass density at outlet conditions
Fv = Volumetric flow rate (inlet or outlet)

2002 AspenTech. All Rights Reserved.

HeatX vs. Two Heater Blocks Approach

Heat stream Q should be dependent on temperature


difference
Can be implemented using flowsheet constraints
Streams("Q").Q = UA*(Blocks("HOT-SIDE").T - Blocks("CLD-SIDE").T);

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 6-3 Aspen Technology, Inc.


Introduction to Aspen Dynamics Heat Exchangers and Reactors

Reactors

Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

Reactors

RStoic, RYield, RGibbs: Pseudo-dynamic models


RCSTR
RPlug

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 6-4 Aspen Technology, Inc.


Introduction to Aspen Dynamics Heat Exchangers and Reactors

RStoic / RYield / RGibbs


Instantaneous

Simple flow models CSTR


PFR
Instantaneous
Stirred tank geometry
Plug flow geometry
time

Reactions equations are applied at outlet conditions


RGIBBS: advanced specifications can not be accessed
in Aspen Dynamics
Example: Avoid using flowrate - use flow ratio instead

2002 AspenTech. All Rights Reserved.

RCSTR

Perfectly mixed reactor


Only kinetic reactions are supported
You need to convert equilibrium reactions into two kinetic reactions
(forward and reverse)
Handling of outlet streams
Aspen Dynamics model enables the outlet flow of each phase to
be manipulated independently
If you have multiple phases but a single outlet stream, the vapor
and liquid phases are mixed at the outlet of the reactor to match
Aspen Plus configuration (see next slide)
It is possible to reconnect the liquid and the vapor streams in
Aspen Dynamics if required

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 6-5 Aspen Technology, Inc.


Introduction to Aspen Dynamics Heat Exchangers and Reactors

RCSTR Connectivity

Multiple outlet streams supported in both Aspen Plus and Aspen


Dynamics 11.1

Feed flow
Vapor

PC
mixer
LC Product

New Liquid flow


single outlet stream structure
multiple outlets structure (version 10.2)

Right side structure shows what Aspen Dynamics model does for
single outlet multiple phases reactors
Prefer to use separate outlet streams in Aspen Plus!

2002 AspenTech. All Rights Reserved.

Rplug (1)

Plug flow is discretized with a series of reactor elements


Supports liquid, vapor, liquid-vapor and liquid-liquid-
vapor phase options
Only kinetic reactions are supported
You need to convert equilibrium reactions into two kinetic
reactions (forward and reverse)

Heat transfer effect between catalyst and process fluid is


modeled

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 6-6 Aspen Technology, Inc.


Introduction to Aspen Dynamics Heat Exchangers and Reactors

Rplug (2)

The pressure drop is related to the volumetric flow rate


by:
P = K * Rho * Vel 2
Where:
K = Constant determined by fitting to
steady-state conditions
P = Pressure drop
Rho = Mass density
Vel = Fluid Velocity

Coolant pressure drop is fixed

2002 AspenTech. All Rights Reserved.

RPlug Cooling Options

Cooling Type Description

TCOOL_SPEC Reactor with constant cooling temperature


ADIABATIC Adiabatic reactor
CO-COOL Reactor with co-current external coolant
COUNTER-COOL Reactor with counter-current external coolant

Note: T_SPEC option is not supported


(Use high flow rate coolant for constant reactor temperature)

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 6-7 Aspen Technology, Inc.


Introduction to Aspen Dynamics Heat Exchangers and Reactors

RPlug Catalyst Heat Transfer Options


If you choose Specify Description
No heat transfer No additional input No catalyst present, or the effect of
(default) heat transfer between catalyst and
process fluid on the reactor dynamics
is neglected.
Heat transfer at equal Voidage fraction of catalyst There is very fast heat transfer
temperatures between the catalyst and the process
Heat capacity of catalyst fluid, and they are assumed to be
always at the same temperature
Mass density of catalyst
Heat transfer at different Voidage fraction This is the most rigorous option. Heat
temperatures transfer between the catalyst and
Heat capacity of catalyst process fluid is determined by their
temperature differential, contact area,
Mass density of catalyst
and overall heat transfer coefficient
Specific surface area of catalyst
Overall heat transfer coefficient
2002 AspenTech. All Rights Reserved.

RPlug in Dynamic Simulations

Aspen Dynamics uses a one-dimensional, first order


finite difference scheme to solve the partial differential
equations for the RPlug reactor. The finite size of each
element may cause a certain amount of error
Reduce the error by increasing the number of finite
difference elements from the default value of 10
RPlug Block-Options sheet in Aspen Plus

A general rule is to use 5 points for every 10 deg Celsius


change in temperature or 10% change in composition

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 6-8 Aspen Technology, Inc.


Introduction to Aspen Dynamics Heat Exchangers and Reactors

Workshop 201-rplug files

Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 6-9 Aspen Technology, Inc.


Introduction to Aspen Dynamics Task Language

Task Language

Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

Lesson Objectives

Describe the functionality and uses of tasks, including how to:


Create tasks
Activate tasks

Discuss the following topics:


What is a task?
Types of tasks
Uses and examples of tasks
Creating a task
Activating a task

Complete Workshop 202-tasks

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 7-1 Aspen Technology, Inc.


Introduction to Aspen Dynamics Task Language

What is a Task?

A Task is a set of statements (instructions) that defines a


sequence of discrete actions
Disturbances in feed conditions
Changes to controller set points

Tasks can trigger an event or action when a predefined


condition becomes true
Rudimentary control e.g., close/open a valve when the fluid
level falls/rises above/below a value

Task statements are executed in sequence

2002 AspenTech. All Rights Reserved.

Types of Tasks

Event-Driven Tasks
Requires a conditional expression to determine when the task
begins
Events can be:
Explicit - will happen (usually time-specific events)
Implicit - may or may not happen depending on other events or
conditions

Callable Tasks
Called by other tasks, including other callable tasks
Is not triggered by an event
Can pass parameters to the called task
Can call tasks in Parallel

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 7-2 Aspen Technology, Inc.


Introduction to Aspen Dynamics Task Language

Task Manager

Overall picture Graphical User Interface

Create/remove tasks
Activate/deactivate tasks

Tasks
Limit time step
task status action
Query variable tk1 active wait
tk2 active done
Change variable value
...
Simulation server Task manager

2002 AspenTech. All Rights Reserved.

Where to Define Tasks?

Define tasks in the Flowsheet folder


Event-driven tasks need to be "activated" to be
considered by the task manager during the dynamic
simulation
Select the task, then RMB, Activate

Inactive Active Callable Task Incorrect task

Event Driven Tasks

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 7-3 Aspen Technology, Inc.


Introduction to Aspen Dynamics Task Language

Creating and Activating Tasks

Active Task
with checkmark

Add Task Icon


in Flowsheet folder

2002 AspenTech. All Rights Reserved.

Task Language

Task statements are written in Aspen Custom Modeler


language
It is not case sensitive
You need to end statements with a semi colon (;)

Syntax to access a variable within a:


Block: Blocks("block name").<Variable name>
Example: Blocks("C130").Level
Stream: Streams("stream name").<Variable name>
Example: Streams("FEED").FmR

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 7-4 Aspen Technology, Inc.


Introduction to Aspen Dynamics Task Language

Event-Driven Task

Syntax:
TASK TaskName RUNS WHEN Condition
TaskStatements;
END

TASK TaskName RUNS ONCE WHEN Condition


TaskStatements;
END

Condition:
time == value
expression1 >, <, ==, <>, >=, <= expression2

2002 AspenTech. All Rights Reserved.

Task Event

Event-driven task status is checked at communication


intervals
Task executed whenever the condition becomes true
(i.e., changes from false to true)
level

lev_alarm

time

task xmp runs when blocks("M").level > lev_alarm


2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 7-5 Aspen Technology, Inc.


Introduction to Aspen Dynamics Task Language

Tasks

"ONCE" qualifier

p_burst

time

task bursting runs once when streams("V").p > p_burst

2002 AspenTech. All Rights Reserved.

Task Statements

Variable assignment (variable must be fixed!)


Direct
Ramping functions (RAMP and SRAMP)
TASK Task4 RUNS WHEN TIME == 4.0
// Flow changes to 5.0 linearly
// over a period of 2 time units
RAMP (streams("A").FmR, 5.0, 2.0);
// Temperature changes with an S-shaped curve
// to 15.0 over a period of 3 time units
SRAMP (streams("B").T, 15.0, 3.0, discrete);
blocks("HTX").QR : 0;
END

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 7-6 Aspen Technology, Inc.


Introduction to Aspen Dynamics Task Language

Task Statements are Executed in Sequential


Order (Illustrates previous example)

second ramp
(sramp)
step change
(assignment)

first ramp 15
(continuous)
5

0
time
4 6 9
2002 AspenTech. All Rights Reserved.

Ramp Statements syntax

Linear ramp discrete


RAMP (variable, finalvalue, duration, discrete);

Linear ramp continuous

RAMP (variable, finalvalue, duration, continuous);


Sine ramp discrete

SRAMP (variable, finalvalue, duration, discrete);


Sine ramp continuous

SRAMP (variable, finalvalue, duration, continuous);

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 7-7 Aspen Technology, Inc.


Introduction to Aspen Dynamics Task Language

Task Statements

Create a snapshot
TASK Task2 RUNS WHEN Time == 10.0
CREATE SNAPSHOT "Task-Created Snapshot #1";
END

Print a message
Pause the simulation
TASK Test3 RUNS WHEN Time == 1.0
PRINT "Start Task Test3";
RAMP (streams("D").FR, 2.5, 5.0);
PRINT "Task Test3 Finished";
PAUSE;
END
2002 AspenTech. All Rights Reserved.

Task Execution: WAIT FOR and WAIT

WAIT FOR: To hold the task execution until condition is


satisfied:
WAIT FOR condition;

WAIT: To hold task execution for a given period


WAIT duration;
// wait for 2 hours from now
WAIT 2.0;
// start feed
streams("S34").FR : 400;
// wait level to reach desired value
WAIT FOR blocks("V").level > 1.0;
// stop the feed
streams("S34").FR : 0;
2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 7-8 Aspen Technology, Inc.


Introduction to Aspen Dynamics Task Language

Task Execution: RESTART

RESTART makes the task execution jump up to the first


line x

4
3.5
RESTART AFTER duration;

3
2 2.5
B1.y
B1.x
1.5
RESTART WHEN condition;

1
0.5
0 1 2 3 4 5 6 7 8 9 10
Time Hours

Task res runs when time == 1


// step change of flow
streams("F").FR : 4;
// wait 2 units of time
wait 2;
streams("F").FR : 0;
restart when blocks("B1").level < 1;
End
2002 AspenTech. All Rights Reserved.

Conditionals in Tasks

TASK Condition RUNS WHEN Blocks("D101").Level < 0.01


IF Streams("S101").FmR <= 0.1 THEN
Streams("S101").FmR : 10.0;
ELSE
Streams("S101").FmR : 1.0;
ENDIF
END

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 7-9 Aspen Technology, Inc.


Introduction to Aspen Dynamics Task Language

Callable Task

Syntax
TASK TaskName ( ParameterList )
TaskStatements
END

Call
CALL TaskName (ParameterList);

2002 AspenTech. All Rights Reserved.

Callable Task: Example


TASK MainTask RUNS WHEN TIME == 1.0
Streams("FEED").FR: 4;
CALL SubTaskA;
CALL SubTaskB;
End

TASK SubTaskA
// change valve position
RAMP(Blocks("FV101").pos, 10, 3.0);
END

TASK SubTaskB
// change feed mole fraction of water
SRAMP(Streams("FEED").ZR("H2O"),0.5, 2.0);
END

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 7-10 Aspen Technology, Inc.


Introduction to Aspen Dynamics Task Language

Task Execution: PARALLEL

PARALLEL
Each action is executed until it completes
The parallel section completes when all actions in it are
complete
TASK Task1 RUNS WHEN TIME == 1.25
PARALLEL
CALL SubTaskA;
CALL SubTaskB;
ENDPARALLEL;
streams("F4").FmR : 0.0;
END

2002 AspenTech. All Rights Reserved.

Task Notes (1)

Values must be expressed in metric units


Snapshots taken when a ramp is running will be flagged
as "Modified"
Only fixed variables can be ramped or changed with
assignments in tasks

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 7-11 Aspen Technology, Inc.


Introduction to Aspen Dynamics Task Language

Task Notes (2)

Task conditions are checked at communication interval


Don't make it too long! Task action
Event

WAIT FOR x > 3

Communication interval

2002 AspenTech. All Rights Reserved.

Conflicting Tasks

Task RampFlow will override task Stepflow


TASK RampFlow RUNS WHEN TIME == 1.0
Ramp(Streams("FEED").FmR, 4.0, 2.0);
END

TASK StepFlow RUNS WHEN TIME == 2.0


Streams("FEED").FmR: 0.5;
END

FmR Which value do you


really want?

1 2 3 time
2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 7-12 Aspen Technology, Inc.


Introduction to Aspen Dynamics Task Language

Tip: How to Find the Name of Variables?

Variables in conditions:
Check in Results tables
Check AllVariables, with Description

Variables in assignments (actions):


Check in Manipulate tables
Make sure the variable is Fixed

The name to use in the task is:


Blocks("name").variable or Streams("name").variable
Tip: Look at the title of the table from which you found the
variable

2002 AspenTech. All Rights Reserved.

Useful Task Statements with PID Controller

To switch a PID controller to automatic mode


Blocks("PC1").AutoMan : 0; // auto

To change the setpoint of a PID


Blocks("PC1").SPo : 0.123; // setpoint
To switch a PID controller to manual mode
Blocks("LC1").AutoMan : 1; // manual
To change the manipulated variable of a PID
Blocks("LC1").OPman : 3.21; // manual

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 7-13 Aspen Technology, Inc.


Introduction to Aspen Dynamics Task Language

Ramping Variables from Tables (Continuous)


New

You can ramp a fixed variable from tables


Ramped variables are displayed in red

2002 AspenTech. All Rights Reserved.

Workshop 202-tasks files

Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 7-14 Aspen Technology, Inc.


Introduction to Aspen Dynamics Pressure Changers

Pressure Changers

Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

Pressure Changers

Valve
Pipe
Pump
Compr and MCompr

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 8-1 Aspen Technology, Inc.


Introduction to Aspen Dynamics Pressure Changers

Valve

"Simple" valve
Valve coefficient not specified in Aspen Plus
Default position: 50%
Valve coefficient calculated from specified pressure drop

"Rigorous" valve
Valve coefficient (table or characteristic) specified in Aspen
Plus

Options to check choking and cavitation


If required, valves can be resized in Aspen Dynamics
(i.e., evaluate a new value for the valve coefficient)

2002 AspenTech. All Rights Reserved.

Pipe

Supported Solution Methods


Integrate
Constant dP/dL
Outlet flow rate always equal to inlet flow rate

Turbulent flow is assumed


Can calculate sub-critical and critical flow
Continuous momentum balance
Generalized fittings are allowed
Multiple liquid phases are treated as a single homogenous liquid
phase except for flash calculations

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 8-2 Aspen Technology, Inc.


Introduction to Aspen Dynamics Pressure Changers

Pipe for Dynamic Simulations

Aspen Dynamics uses a one-dimensional, first order


finite difference scheme to solve the partial differential
equations for the Pipe model
The finite size of each element may cause a certain amount of
error
Reduce the error by increasing the number of elements from
the default value of 10
Pipe, Advanced, Methods sheet in Aspen Plus

2002 AspenTech. All Rights Reserved.

Pump

Use Pump performance curve entered in Aspen Plus


If no curve entered, it creates one
Head curve

1.4
1.2
Head / nominal head

1
0.8
0.6
0.4
0.2
0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
Flow / nominal flow

Need to change ExtrapolateFanL to "Yes" to have


ActShaftSpeed to have proper effect
Change UseCurves to "False" in Configure form if you do
not wish to use performance curves

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 8-3 Aspen Technology, Inc.


Introduction to Aspen Dynamics Pressure Changers

Compressor and Turbine

COMPR and MCOMPR


Most types of performance curve are supported
Types GPSA polytropic and isentropic with "GPSA basis =
average" are not supported

Compressor inertia can be taken into account

2002 AspenTech. All Rights Reserved.

Note About Performance Curves

Curve data should cover the full range of operating


conditions expected during the dynamic simulation
Tabular data: A cubic spline fit is used to interpolate
between the data points. The cubic spline fit is most
accurate when the:
Data points are evenly spread
Curve is smooth (gradually changing gradient with no
deviations)
Polynomial coefficients: Check that the shape of the
curve is realistic over the full range of operating
conditions expected during the dynamic simulation

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 8-4 Aspen Technology, Inc.


Introduction to Aspen Dynamics Pressure Changers

Example

Make sure you have enough points


20

18
Spline fit
16

14

12
Rp

10

0
42000 43000 44000 45000 46000 47000 48000 49000 50000 51000
Fv (ft3/min)

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 8-5 Aspen Technology, Inc.


Introduction to Aspen Dynamics Pressure Driven Simulations

Pressure Driven Simulations

Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

Lesson Objectives

Discuss the following topics:


What is a Flow Driven Simulation?
What is a Pressure Driven simulation?
Configuring a Pressure Driven Simulation
Use of the Pressure Checker

Complete Workshop 204-pressure-driven

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 9-1 Aspen Technology, Inc.


Introduction to Aspen Dynamics Pressure Driven Simulations

What is a Flow Driven Simulation?

What is a Flow Driven Simulation?


Outlet flow rate from a block is specified or determined from the
material balance
Outlet flow rates are unaffected by downstream pressures
Assumes perfect flow and pressure control

Usually a good approach for liquid systems

2002 AspenTech. All Rights Reserved.

What is a Pressure Driven Simulation?

Downstream pressures influence flowrates


Flowrates are determined by pressure/flow relationship
between upstream and downstream blocks
Line or system resistance forces a pressure drop between units

Note:
Pressure/flow relationship blocks are not necessary in streams
connected to unit operations modeled with a pressure/flow
equation such as Heater, HeatX, MHeatX, RPlug, etc.

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 9-2 Aspen Technology, Inc.


Introduction to Aspen Dynamics Pressure Driven Simulations

Pressure Driven

Example
When flow increases, pressure drop of the system increases
When flow increases, head (pressure increase) of the pump
decreases
pressures
15

System curve
pmp.p1 bar
pro.p1 bar

10 5

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1


Flowrate
Pump curve

2002 AspenTech. All Rights Reserved.

Pressure Driven in Aspen Dynamics

Pressure setting: Where we have a gas/vapor holdup


Pressure = gas holdup = initial condition

Pressure driven node: Where the flow depends on the


pressure difference
Flow = function of pressure difference

Pressure "neutrality"
Pressure of all feed streams to a block must be equal

Fixed pressure
Feed streams, product streams, liquid-only blocks

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 9-3 Aspen Technology, Inc.


Introduction to Aspen Dynamics Pressure Driven Simulations

Pressure Driven

Pressure specification (fixed)


Pressure equality (neutral node)
V-2 V-3
M-1
8 9 11

F-1
V-1
1 2
7

E-1 F-2
3 4
V-4
5 6

2002 AspenTech. All Rights Reserved.

Steps to Prepare a Pressure Driven Simulation

Remove unsupported models


Define a valid pressure/flow network
Add blocks for pressure/flow relationships
Units that determine pressure must not be connected directly together
Ensure block pressures are balanced and consistent
Equal upstream and downstream block pressures
Inlet pressures greater than outlet pressure

"Pressure Checker" tool will assist you in completing


these tasks
Export/Send To P Driven Dyn Simulation file

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 9-4 Aspen Technology, Inc.


Introduction to Aspen Dynamics Pressure Driven Simulations

The Pressure Checker

Checks flowsheet for consistency


Consistency of interconnecting blocks
Consistency of pressures

Advises on required changes to flowsheet


Warns of potential problems in dynamic simulations

This is the "Pressure Checker" button

2002 AspenTech. All Rights Reserved.

Unsupported Models in Pressure Driven Mode

Models not supported in Pressure Driven Mode


Sep / Sep2
Extract
Dupl
Distl

Models not supported in Instantaneous mode of


operation
Flash2 / Flash3

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 9-5 Aspen Technology, Inc.


Introduction to Aspen Dynamics Pressure Driven Simulations

Which Simulation Mode to Use? (1)

It depends on your modeling objectives


If pressure is important for you, then pressure driven mode
may be required

It depends on the type of process


Gas phase will typically require pressure driven mode
Examples: Steam network, gas network, pressure relief (especially
multiple relief in same piping), compressor system
Liquid phase will typically not require pressure driven mode
Example: Liquid-liquid decanter
Counter example: Gravity driven system will require pressure driven,
especially if lines are undersized (poor flow controllability)

2002 AspenTech. All Rights Reserved.

Which Simulation Mode to Use? (2)

Consider the control system


If you know you already have a good pressure and good flow
control, then flow driven simulation may be suitable

Consider the effect of pressure on properties


Effect is large on gas phase (density, kinetics)
Effect is low on liquid phase (actually, liquid compressibility is
not calculated by most density models)

Note that some blocks are internally pressure driven


RADFRAC, PIPE, RPLUG

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 9-6 Aspen Technology, Inc.


Introduction to Aspen Dynamics Pressure Driven Simulations

Problems to Consider

Pressure at flowsheet boundaries


Is the assumption that the pressure is fixed a good
approximation?
Vent to atmosphere: yes
Feed to another process?

Include more blocks upstream and downstream if you


need to have their pressure-flow characteristics

2002 AspenTech. All Rights Reserved.

Typical Modifications

Use a valve on the outlet to get at least some resistance


to the flow (i.e., outlet of a compressor)
Use a block with vapor holdup to avoid "stiffness" of the
system (liquid-only systems...)
Include volume of pipes
Prefer using Mixer blocks instead of Pipe model

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 9-7 Aspen Technology, Inc.


Introduction to Aspen Dynamics Pressure Driven Simulations

Typical Problems with Pressure Checker

Messages during export


Warning for pressure difference around a pressure neutral
node: This will cause a kick in flows at initialization and the
exported simulation will not be at steady state
Flash2/Flash3 with sub-cooled liquid: Exports at bubble
pressure, which causes all sort of trouble

Typically you need to address these warnings


Use design-specs or calculator blocks to ensure pressure
equality
Add padding gas (N2) where appropriate
Model customization (for compressed liquid)

2002 AspenTech. All Rights Reserved.

Valve Model in Aspen Plus (Operation)

Calculation Type:
"Adiabatic..." becomes a "Simple" valve in Aspen Dynamics
"Calculate..." becomes a "Rigorous" valve in Aspen Dynamics

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 9-8 Aspen Technology, Inc.


Introduction to Aspen Dynamics Pressure Driven Simulations

Valve Model in Aspen Plus (Parameters)

Typically you will use the Valve Characteristics option

Tabulated
characteristics

Standard
characteristics

2002 AspenTech. All Rights Reserved.

Valve Model in Aspen Plus (Options)

Calculation options
Choked flow checking
Cavitation

These options can be modified in Aspen Dynamics

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 9-9 Aspen Technology, Inc.


Introduction to Aspen Dynamics Pressure Driven Simulations

Workshop 204-pressure-driven files

Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

Workshop: 204-pressure-driven

Configure a simulation to be pressure driven


Adding valves where required
Using design specs for pressure balance
D101VAPV
D101V
C2PRODV
C2OUT C2PRODV C2PROD
VAPFEED
T101
HCFEED FLASHFD D101

E101
C3PRODV
C3PRODP C3PROD
C2IN LIQFEED

D101LIQV
D101L

Hydraulic option and valve resize in Aspen Dynamics

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 9-10 Aspen Technology, Inc.


Introduction to Aspen Dynamics Reverse Flow

Reverse Flow

Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

Lesson Objectives

Discuss the following topics:


Reverse flow overview
Creating a Reverse Flow Simulation
Modeling Features
Recommendations and Red Flags

Complete Workshop 205-reverse flow

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 10-1 Aspen Technology, Inc.


Introduction to Aspen Dynamics Reverse Flow

Reversible Flow Overview New

Allows flow to reverse direction when the pressure


gradient reverses
May be required for applications such as:
Steam systems
Fuel gas networks
Some pressure relief applications

For use in pressure driven simulation only

2002 AspenTech. All Rights Reserved.

Creating a Reverse Flow Simulation (1)

Create simulation in Aspen Plus


Export as Pressure Driven Dynamic Simulation
Perform Initialization run
Enable reverse flow
Perform Initialization run
Configure product streams and blocks as required
Perform Initialization run (save snapshot)

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 10-2 Aspen Technology, Inc.


Introduction to Aspen Dynamics Reverse Flow

Creating a Reverse Flow Simulation (2)

Enable reverse flow in Global table


Change GlobalRFlow to "True"
Wait for simulation update to be complete

Switch to
enable/disable
Default is
disabled

2002 AspenTech. All Rights Reserved.

Creating a Reverse Flow Simulation (3)

Configure form for product streams show conditions that


will apply if stream flow reverses

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 10-3 Aspen Technology, Inc.


Introduction to Aspen Dynamics Reverse Flow

Modeling Features (1)

Models supporting reverse flow


Pipe, Valve
Flash2, Flash3, Decanter
Heater, HeatX
FSplit, Mixer, Mult
BurstingDisk, Expansion, Orifice, PSV, TValve
RCSTR

Models behavior based on symmetry were applicable -


should give the same results in each direction

2002 AspenTech. All Rights Reserved.

Modeling Features (2)

Valve
CheckValve option to prevent reverse flow

Flash2, Flash3, Decanter and RCSTR


Choose which phase flows out through feed if it reverses with
parameter RFlowPhase in Configure form

BurstingDisk
Specify reverse bursting pressure

Details for each model in online help

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 10-4 Aspen Technology, Inc.


Introduction to Aspen Dynamics Reverse Flow

Modeling Features (3)

If you need to mix reverse flow and non-reverse flow


models in the same simulation:
Non-supported models must be isolated by Valves with
CheckValve=True. Failure to do so will result in under-
specification
Solution speed and robustness may be affected

2002 AspenTech. All Rights Reserved.

Modeling Features (4)

Reverse flow variables in blocks/streams


Trev, hrev, zrev - analogous to forward flow conditions
Passed through streams and blocks but you only see their
effect if flow reverses

For feed streams, T on the Results form is ALWAYS the


forward temperature, regardless of actual flow direction
Use In_F.Trev on AllVariables form to see actual temperature
in all cases

Negative flows/pressure drops indicate reverse flow

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 10-5 Aspen Technology, Inc.


Introduction to Aspen Dynamics Reverse Flow

Recommendations and Red Flags (1)

Reverse flow only supported in pressure driven mode


If you disable pressure driven either globally or locally for a
block, the reverse flow functionality is disabled and you may
encounter specification problems

Avoid discontinuities where possible (use tasks/ramps)


For convergence problems with physical properties
caused by reverse flow, procedure based physical
property sub-models are typically more robust (but
slower)
To use, change GlobalFlashBasis parameter on Globals table

2002 AspenTech. All Rights Reserved.

Recommendations and Red Flags (2)

VSIE Integrator may blur point of flow reversal


Goto Run\Solver Options, and uncheck Use Interpolation on
Integrator tab

By default, Aspen Dynamics allows 10 divergent steps


when solving non-linear blocks before convergence
failure is assumed
Goto Run\Solver Options, and increase Max. Divergent steps
on Non Linear Solver tab for difficult problems

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 10-6 Aspen Technology, Inc.


Introduction to Aspen Dynamics Reverse Flow

Workshop 205-reverse-flow files

Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 10-7 Aspen Technology, Inc.


Introduction to Aspen Dynamics Physical Properties

Physical Properties

Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

Physical Properties Calculations

Aspen Dynamics uses the same physical property


calculation routines as Aspen Plus
Use local models to improve speed of calculation
Selection of how physical properties and equilibrium are
calculated can be changed if required
At global level (in Globals table)
On a block or stream basis (in AllVariable tables)

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 11-1 Aspen Technology, Inc.


Introduction to Aspen Dynamics Physical Properties

Selection of Physical Property Calculations

Global table

2002 AspenTech. All Rights Reserved.

Physical Properties Calculations

"Local" property mode


Properties are modeled on simple functions of temperature and
pressure
Faster to evaluate than full physical properties calculations
Accuracy is comparable to using full physical properties
Local property parameters are updated at every integration
step for accuracy
"Rigorous" property mode
Calls the property routines every time
Slower, but may be required for strongly non-ideal systems

Selected by parameter GlobalPropMode or PropMode

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 11-2 Aspen Technology, Inc.


Introduction to Aspen Dynamics Physical Properties

Example of Local Property for Liquid Enthalpy

nc
hL = xi ( Ai + Bi T)
i=1
Where:
hL = Liquid molar enthalpy
xi = Mole fraction of component i
Ai Bi = Local property parameters for component i
T = Temperature
nc = Number of components

2002 AspenTech. All Rights Reserved.

FlashMode: 2 and 3 Phase Flash Calculation

Selects the flash calculation


"Equation" Equation based LV and LLV equilibrium
"Procedure" More robust (uses Flash algorithm to solve New
equilibrium at given temperature and pressure)
"ProcedurePH More robust (uses Flash algorithm to solve
equilibrium at given enthalpy and pressure)
Equation Procedure
Local properties for single
Local properties, equation- phase, Rigorous properties
Local
based flash (LV, LLV) for LV and LLV, procedure
based flash
Rigorous properties, Rigorous properties and
Rigorous
equation-based flash procedure based flash

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 11-3 Aspen Technology, Inc.


Introduction to Aspen Dynamics Physical Properties

Guidelines for the Selection

First try to run the simulation with default settings!


Tightening the flash, tear and block tolerances in Aspen
Plus can help resolve some initialization problems
In case of convergence difficulties or "noise, try other
combinations
Change PropMode to Rigorous for electrolytes and strongly
non-ideal systems
Change FlashMode Procedure or ProcedurePH for difficult
cases
For example, if in critical region of the mixture
With reverse flow

2002 AspenTech. All Rights Reserved.

Good Practice Advice #1

Select appropriate valid phases in Aspen Plus


Liquid only if there is only a liquid phase
Vapor only if there is only a vapor phase

Reason: The calculations of the properties of the missing


phase can cause problems
Additional benefit: Your simulation will run faster

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 11-4 Aspen Technology, Inc.


Introduction to Aspen Dynamics Physical Properties

Good Practice Advice #2

Remove components that are not required for the


dynamic simulation
This is easier done in Aspen Plus

Reason: The calculation of the properties of these


components (with mole fraction of 0) can lead to
problems
Additional benefit: Your simulation size will decrease,
hence it will run faster

2002 AspenTech. All Rights Reserved.

ComponentLists in Aspen Dynamics

List of components and physical property method

Can be used to remove components

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 11-5 Aspen Technology, Inc.


Introduction to Aspen Dynamics Physical Properties

Note on Liquid-Liquid Calculations

Phase labeling (i.e., Phase 1 and Phase 2) is based on


density
Free water is not supported
Use liquid-liquid-vapor calculation instead

Rigorous properties may fail for liquid-liquid calculation


because this mode does not check for phase stability
Use Procedure flash or leave to Local properties

2002 AspenTech. All Rights Reserved.

Demonstration 206-physical-properties
files

Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 11-6 Aspen Technology, Inc.


Introduction to Aspen Dynamics Process Control

Process Control

Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

Lesson Objectives

Learn about the Aspen Dynamics process control


models
Become familiar with the PID controller
Complete Workshop 301-control

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 12-1 Aspen Technology, Inc.


Introduction to Aspen Dynamics Process Control

Process Control

Comprehensive Control Model Library


Auto-generated PID Controllers
Pressure
Level
Temperature in RCSTR

2002 AspenTech. All Rights Reserved.

Process Control Models


Model Description
Comparator Calculates the difference between two input signals
Dead_time Delays a signal by a specified time
Discretize Discretizes a signal
DMCplus Interface to DMCplus online control (requires license)
FeedForward Feedforward controller
HiLoSelect Selects the higher or lower of two input signals
IAE Calculates the integral of the absolute value
ISE Calculates the integral of the squared error
Lag_1 Models a first order lag between the input and output
Lead_lag Models a lead-lag element
Multiply Calculates the product of two input signals
Noise Gaussian white noise signal
PID A three mode proportional integral derivative controller
PRBS Generates a pseudo-random binary signal
Ratio Calculates the ratio of two input signals
Scale Scales an input signal
SplitRange Models a split range controller
Sum Calculates the sum of two input signals
Transform Performs a loge, square, square root, or power transform
Valve_dyn Models the dynamics of a valve actuator
2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 12-2 Aspen Technology, Inc.


Introduction to Aspen Dynamics Process Control

PID Control Block Predefined Forms

AllVariables
Configure
Faceplate and CompactFacePlate
Set point
Process variable
Controller output
Mode

Results
ResultsPlot and ResultsPlotPercent
Set point
Process variable
Controller output
2002 AspenTech. All Rights Reserved.

PID Controller FacePlate

Cascade Percent
Manual mode toggles display b/w
mode switch process units and %
switch Configure
form
Auto Plot
mode form
switch

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 12-3 Aspen Technology, Inc.


Introduction to Aspen Dynamics Process Control

PID Block Configure Form: Tuning and Ranges

2002 AspenTech. All Rights Reserved.

PID Block Configure Form Tuning (1)

Operator set point


Used when controller is in auto mode

Bias
Constant term added to the controller output
Typically set to value of manipulated variable when process is
in steady state
Gain
Dimensionless units

[gain with units ] = [gain] [rangeOP ]


[range PV ]
2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 12-4 Aspen Technology, Inc.


Introduction to Aspen Dynamics Process Control

PID Block Configure Form Tuning (2)

Integral Time (reset time)


Units of time/repeat
Set to a large value for no integral action

Derivative Time (rate time)


Units of time
Set to 0 for no derivative action

2002 AspenTech. All Rights Reserved.

PID Controller Action

How to select?
When the measured variable increases, the manipulated
variable should be increased: select "Direct"
When the measured variable increases, the manipulated
variable should be decreased: select "Reverse"

DIRECT REVERSE
flow
LC
LC

flow

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 12-5 Aspen Technology, Inc.


Introduction to Aspen Dynamics Process Control

PID Block Configure Form Filtering

Various options for filtering


See online help for details

2002 AspenTech. All Rights Reserved.

PID Block Configure Form Other

Control algorithm
Ideal (default)
Series (interacting or analog algorithm)
Parallel (ideal parallel or
non-interacting algorithm)

Bumpless transfer
Anti-reset windup
Deadband

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 12-6 Aspen Technology, Inc.


Introduction to Aspen Dynamics Process Control

PID Initialize Values Button

Uses the current values of the measured variable and


manipulated variable to initialize controller parameters
The value for the operator set point changes to the value of
the measured variable
The value for bias changes to the value of the manipulated
variable
Process variable and output ranges changed to 0 and 2 times
the value
Exception: For valve position, the range is specified to 0 and 100%

Typically, you use this only once, when you create the
PID block

2002 AspenTech. All Rights Reserved.

PID Gain and Integral Action

You may observe a disturbance when you change the


gain, due to the way integral action is implemented
110.05 110.1 110.15 110.2 110.25 110.3 110.35 110.4 110.45
78.04
78.0278
Controller Output C
Process Variable C
Set Point C
77.96 77.98 77.94
77.92
77.9

0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31
Time Hours

gain changed - disturbance!


set point change

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 12-7 Aspen Technology, Inc.


Introduction to Aspen Dynamics Process Control

Auto-Generated Controllers

PID controllers are automatically added during the export


from Aspen Plus
Pressure
Level
Temperature in RCSTR

More detail can be found in the online help

2002 AspenTech. All Rights Reserved.

Auto-Generated Controllers (Flow driven mode)

Controller When Measured Manipulated


added variable variable

Pressure Vapor holdup Pressure in Vapor outlet


is modeled vessel mole flow rate

Level Liquid holdup Liquid Liquid outlet


is modeled level mass flow rate

Temperature CSTR block Temperature Duty

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 12-8 Aspen Technology, Inc.


Introduction to Aspen Dynamics Process Control

Auto-Generated Controllers (p driven mode)

During the export, it checks for valve connected on liquid


and vapor outlets
If a valve block is present, the controller will manipulate the
valve position
Pressure control with vapor outlet
Liquid level with liquid outlet
If no valve block is present, the controller is still created so that
you can select another appropriate variable to manipulate in
Aspen Dynamics

2002 AspenTech. All Rights Reserved.

Control System

The purpose of the controllers created automatically is to


make sure the simulation will remain at steady state in
Aspen Dynamics
It usually provides a good starting point for the control strategy,
which you can modify in Aspen Dynamics

You can invoke the script "RemoveControl" from


Dynamics library, Scripts to remove all these controllers
if you prefer to define your system from scratch

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 12-9 Aspen Technology, Inc.


Introduction to Aspen Dynamics Process Control

Workshop 301-control files

Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

Workshop 301: Control of a Distillation Column

C4/C5 splitter
Purpose: separate C3, iC4, nC4 in distillate and iC5, nC5 in residue
Control temperature on stage 18
Dead_Time and PID models
Tuning the controller using Ziegler Nichols method

Control of composition (iC5 + nC5) in distillate


Composition analyzer with Sum, Dead_Time and Discretize model,
PID for control
Override control for pressure drop
Compare model for pressure drop calculation
HiLoSelector to override the temperature controller action

Option: pressure compensation for temperature control


Using Flowsheet constraints
2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 12-10 Aspen Technology, Inc.


Introduction to Aspen Dynamics Process Control

Workshop 301: Temperature Control Loop

C-101
DIST

Dead_Time
FEED
PID

BOTM

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 12-11 Aspen Technology, Inc.


Introduction to Aspen Dynamics Compressor Control

Compressor Control

Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

Lesson Objectives

Review some issues with compressor system modeling


Complete Workshop 302-compressor

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 13-1 Aspen Technology, Inc.


Introduction to Aspen Dynamics Compressor Control

Compressor Control

Simple anti-surge control


PID block
Illustrate the Lag_1 block for dynamic response of valve

Speed
Performance curve
Instantaneous vs. dynamic compressor

Flowsheet consideration
Use of simple phase option (vapor only vs. vapor-liquid)
Addition of blocks for dynamic simulation (volume of pipes)

2002 AspenTech. All Rights Reserved.

Workshop 302-compressor
files

Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 13-2 Aspen Technology, Inc.


Introduction to Aspen Dynamics Pressure Relief Capabilities (Optional)

Pressure Relief Capabilities


(Optional)
Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

Pressure Relief Capabilities

The following models are available:


Model Description

BurstingDisk Bursting disk

DeltaP User pressure drop simple


representation of flow resistance
Expansion Pipe expansion/contraction

Orifice Orifice

PSV Pressure safety valve

Tvalve Conventional valve using the same


methods as in PSV

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 14-1 Aspen Technology, Inc.


Introduction to Aspen Dynamics Pressure Relief Capabilities (Optional)

Flow Calculation Models

Calculates sub-critical and critical flow


Models single-phase or two-phase flow
Flow Equations taken from:
Modified omega method (Schmidt /Westphal, 1997)
Frozen or partially frozen flow (Henry-Fauske, 1992)
German standard AD-A2 (Diener/Friedel, 1997)
Ideal nozzle (HEM), (DIERS,1992)
Ideal nozzle (HEM), (Simpson, as per Aspen Plus)
Vapor phase compressible flow (as in API 520)
Simple single-phase relationship (incompressible flow)

2002 AspenTech. All Rights Reserved.

PSV

Conventional or Balanced type


Various valve characteristics can be defined
Hysteresis (different open and close pressures)

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 14-2 Aspen Technology, Inc.


Introduction to Aspen Dynamics Pressure Relief Capabilities (Optional)

PSV Configure Hysteresis

Valve settings
full lift pressure, full lift pressure,
closing opening

reset primary lift

valve position valve position

reset pressure set pressure

2002 AspenTech. All Rights Reserved.

Relief Outlet Port

Vapor phase relief


Flash2
Flash3
Mixer
RadFrac

Single and two phases relief


RCSTR

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 14-3 Aspen Technology, Inc.


Introduction to Aspen Dynamics Pressure Relief Capabilities (Optional)

RCSTR

Allows venting from top or bottom of vessel


Models liquid swelling during relief to predict quality in
the vent line
Disengagement models
Homogeneous
Zero vapor-liquid disengagement
All vapor/All liquid
Total vapor-liquid disengagement
DIERS bubbly/churn-turbulent model
User specified constant vapor fraction

2002 AspenTech. All Rights Reserved.

Additional Features of RCSTR

Models thermal inertia of vessel and/or solid catalyst


Catalyst deactivation

Switch for
Pressure Relief
Calculations

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 14-4 Aspen Technology, Inc.


Introduction to Aspen Dynamics Pressure Relief Capabilities (Optional)

Pipe

Calculates sub-critical and critical flow


Handles single-phase or two-phase flow
Friction models (Beggs-Brill, Darcy, Lockhart-Martinelli)
Holdup models (Beggs-Brill, Darcy, Rouhani)

Models slip between vapor and liquid phases when


modeling multi-phase flow
Dynamic momentum balance predicts velocities and
detects state of critical flow at end of pipe
Includes continuous phase changes along the length

2002 AspenTech. All Rights Reserved.

Creating a Pressure Relief Simulation

Converge the pressure driven simulation in Aspen Plus


Export the simulation as a pressure driven dynamic
simulation
Load the problem in Aspen Dynamics and remove any
unwanted control loops
Add the required relief blocks to the relevant blocks
relief port
Use the relevant block Configure form to switch to
Perform pressure relief vapor/liquid disengagement
calculations

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 14-5 Aspen Technology, Inc.


Introduction to Aspen Dynamics Pressure Relief Capabilities (Optional)

Creation of a PSV Block

Change the run mode to Initialization


Do a run and create a kept result
To create a Pressure Safety Valve block
Drag and drop PSV from Dynamics library, Pressure Relief
Connect the input and output streams using the MaterialStream
type
Check the pressure for the output stream
Defaults to 1 bar

2002 AspenTech. All Rights Reserved.

Setting up the PSV

First specify the options for the hysteresis to make sure


that the valve will be closed
Click on the "Initialize" button
Then you can change the other settings (flow method,
diameter, etc.)
Click on "Initialize" after each change

The purpose of the "Initialize" button is to:


Run the simulation in a specific way first to solve the complex
equations of the PSV
Give good preset values to the variables

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 14-6 Aspen Technology, Inc.


Introduction to Aspen Dynamics Pressure Relief Capabilities (Optional)

Workshop 303-pressure-relief files

Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 14-7 Aspen Technology, Inc.


Introduction to Aspen Dynamics Scripts

Scripts

Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

Lesson Objectives

Introduce Microsoft Visual Basic Scripting Edition


(VBScript) and its applications
Discuss the following topics:
What is a Script?
Uses of Scripts
Creating a Script
Invoking a Script
Examples of Scripts

Complete Workshop 304-scripts

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 15-1 Aspen Technology, Inc.


Introduction to Aspen Dynamics Scripts

What is a Script?

A Script is a set of instructions written in Microsoft Visual


Basic Scripting Edition (VBScript)
Method to automate simulation setup and control
Uses automation methods and properties to control the
simulation

Use VBScript from


Scripts that use Microsoft Visual Basic Scripting
External Microsoft Visual Basic applications
Microsoft Visual Basic
Microsoft Visual Basic for Applications (VBA) as supplied with Microsoft
Office applications, such as Microsoft Excel and Microsoft Word

2002 AspenTech. All Rights Reserved.

Uses of Scripts (1)

Automate and record flowsheet actions


Control sequences of simulation runs
Define variable properties
Automate flowsheet problem specification
Construct or modify flowsheet connectivity
Manipulate tasks
Automate simulation initialization
Access component lists

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 15-2 Aspen Technology, Inc.


Introduction to Aspen Dynamics Scripts

Uses of Scripts (2)

Define custom Units of Measure (UOM) sets


Store and apply different sets of specifications
Call external windows applications
Call scripts within scripts
Call Scripts from other applications
Excel macro
Visual Basic

2002 AspenTech. All Rights Reserved.

Uses of Scripts (3)

Use FOR LOOPS specifications


Print messages in Simulation Messages window
InputBox to request data from user

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 15-3 Aspen Technology, Inc.


Introduction to Aspen Dynamics Scripts

Creating a Script (1)

Auto-generate scripts from:


Status window
Variable Find tool

Add scripts manually


Simulation Explorer

2002 AspenTech. All Rights Reserved.

Creating a Script (2)

Syntax for variable name assignments


BlockName.VariableName.Property = #####
StreamName.VariableName.Property = #####

Example of Script statements, assigning values to


properties
Blocks(B1).Temp.Value= 550.0
Blocks(B1).Temp.spec = Fixed
Blocks(B1).X(CO2).Value = 0.03
Blocks(B1).X(CO2).Upper = 0.1

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 15-4 Aspen Technology, Inc.


Introduction to Aspen Dynamics Scripts

Creating a Script With Variable Find


Script with current values and specification

2.Enter the script name

3. Edit the Script

1. Select the variables to put on the script


2002 AspenTech. All Rights Reserved.

Creating a Script (3)

Add Script icon in


Flowsheet folder

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 15-5 Aspen Technology, Inc.


Introduction to Aspen Dynamics Scripts

Invoking a Script

2002 AspenTech. All Rights Reserved.

Example Controlling a Simulation

Controlling a simulation with automation


B2.V.value = 15
' sets the run mode
Application.Simulation.RunMode = "Dynamic"
' sets the end time
Application.Simulation.EndTime = 13
' starts the simulation
Application.Simulation.Run(true)

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 15-6 Aspen Technology, Inc.


Introduction to Aspen Dynamics Scripts

Example Writing Messages

Write to the Simulation Messages Window


Application.Msg "Hello World"
Application.Msg Application.Simulation.RunMode
Application.Msg "Run Mode is " & _
Application.Simulation.RunMode
Application.Msg "Run complete at time " & Time

2002 AspenTech. All Rights Reserved.

Example Automation Methods (1)

Creating an instance of an application object


Dim ADApp as Object
create an instance of an application object
Set ADApp = CreateObject(AD Application)
make the object visible
ADApp.Visible = True

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 15-7 Aspen Technology, Inc.


Introduction to Aspen Dynamics Scripts

Example Automation Methods (2)

Accessing an application object


Dim ADDocument as Object
Open an existing simulation document
Set ADDocument = ADApp.OpenDocument(C:\Flash.dynf")

Dim ADSimulation as Object


Ask the application for access to the simulation
Set ADSimulation = ADApp.Simulation

2002 AspenTech. All Rights Reserved.

Example Automation Methods (3)

Using a simulation variable to run the simulation


Change the run mode to dynamic
ADSimulation.RunMode = Dynamic
Run the simulation and wait for it to complete
ADSimulation.Run (True)

It is not necessary to explicitly create a new variable


for the simulation
Change the run mode to dynamic
ADApp.Simulation.RunMode = Dynamic
Run the simulation and wait for it to complete
ADApp.Simulation.Run (True)

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 15-8 Aspen Technology, Inc.


Introduction to Aspen Dynamics Scripts

Example Automation Methods (4)

Checking the Simulation for Success

If ADSimulation.Successful Then
MsgBox Simulation Complete
Else
MsgBox Simulation Failed
End If

2002 AspenTech. All Rights Reserved.

Example Automation Methods (5)

Saving changes and quitting the Application


Save the changes and shut down the Aspen Dynamics
application
ADApp.SaveDocument()
ADApp.Quit

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 15-9 Aspen Technology, Inc.


Introduction to Aspen Dynamics Scripts

Scripts References

More information and examples on Scripts and


automation methods and properties can be found in
online help
Under Aspen Custom Modeler, Automation Reference

2002 AspenTech. All Rights Reserved.

Workshop 304-scripts files

Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 15-10 Aspen Technology, Inc.


Introduction to Aspen Dynamics Hints and Tips Using Aspen Dynamics

Hints and Tips Using Aspen Dynamics

Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

Hints and Tips Using Aspen Dynamics

First, always investigate the problem from the


engineering point of view
Diagnostic tools
Solver settings
File management

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 16-1 Aspen Technology, Inc.


Introduction to Aspen Dynamics Hints and Tips Using Aspen Dynamics

Looking at a Problem

It may be useful to study a large flowsheet in smaller


sections
Create tables and plots to help you investigate the
behavior of a simulation
Create tasks to help you repeating actions in a
consistent way
Try changing only one thing at a time
Use "kept results" to store your starting points

2002 AspenTech. All Rights Reserved.

Problems with Initialization

Change the run mode to initialization


Run the simulation
In case of problems:
Tighten tolerances (Flash calculations, design-specs, which are
used to ensure pressure balance, tear streams)
Increase number of segments in RPLUG or PIPE
Consider simplifying phase option and removing components
where applicable
Try rigorous properties
Try to avoid blocks with zero flowrate
Review any warning message displayed during export

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 16-2 Aspen Technology, Inc.


Introduction to Aspen Dynamics Hints and Tips Using Aspen Dynamics

Control System

Always do an initialization run before changing control


structure
Otherwise you may get "default" values in new controllers with
the "initialize" button

Check for control system not operating properly


Add controllers where required
Double check their settings
Suspect saturated controllers
Suspect controllers with high gain, short integral time

2002 AspenTech. All Rights Reserved.

Tasks

Values in task must be in Metrics units


You can only change the value of fixed variables
Consider trying continuous ramps
RAMP (variable, final value, duration, continuous);

Convergence failure after a step change


Try making the initial step smaller
Create plots to investigate what is happening

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 16-3 Aspen Technology, Inc.


Introduction to Aspen Dynamics Hints and Tips Using Aspen Dynamics

Diagnostic Tools

Group decomposition
May give a hint on the location of the problem

Solver reporting level


Solver options
High residual option

Notes:
If you observe numerical noise, consider switching physical
properties to rigorous mode
It may be useful to look at the model equations (in Dynamics
library)

2002 AspenTech. All Rights Reserved.

Group Decomposition

Displays how the system is decomposed for the


resolution
A red cross on a group indicates the non-converged group,
which may give an indication of where the problem is located
Details of equations and variables are displayed

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 16-4 Aspen Technology, Inc.


Introduction to Aspen Dynamics Hints and Tips Using Aspen Dynamics

Simulation Messages (1)

Solver reporting level: Use Medium and High


Message: "Integrating from ..." = communication interval
Message: "Step nnn..." = integration step

2002 AspenTech. All Rights Reserved.

Simulation Messages (2)

Time: Value of time at which it is trying to solve


Step size: Controlled by the integrator for accuracy
Small step size means fast phenomenon taking place, or in
other words, far from steady state

Step factor: Amount by which the step size is increased


Value lower than 1 means that integrator is detecting faster
changes

Accepted/Rejected: Success flag


When a step is rejected, the step size is cut

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 16-5 Aspen Technology, Inc.


Introduction to Aspen Dynamics Hints and Tips Using Aspen Dynamics

Run, Solver Options: Convergence Parameters

Integration parameters
Aspen Dynamics works only with VSIE and Implicit Euler
Minimum integration step
Initial integration step
Maximum integration step
Make them smaller based on the expected process time constants

Reporting the highest residual can give some indication


of the problem
Selected on Non-Linear Solver tab
Bounds may prevent convergence

2002 AspenTech. All Rights Reserved.

Non-Linear Solver Tab

Diagnostics

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 16-6 Aspen Technology, Inc.


Introduction to Aspen Dynamics Hints and Tips Using Aspen Dynamics

File Management

Keep the bkp!


Dynamic simulation:
dynf file
appdf file (physical properties)
Snapshots: use kept results

Working folder:
Keep it tidy
c:\program files\aspentech\working folders\Aspen Dynamics...

2002 AspenTech. All Rights Reserved.

Snapshot Management Tool

Copy Values to copy from a previous run


Keep/Don't keep controls if the results are stored in dynf
file or not

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 16-7 Aspen Technology, Inc.


Introduction to Aspen Dynamics Hints and Tips Using Aspen Dynamics

Create Snapshot to Store Starting Point

Snapshot management tool, Create

2002 AspenTech. All Rights Reserved.

Workshop 305-usage

Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 16-8 Aspen Technology, Inc.


Introduction to Aspen Dynamics Handling Extreme Conditions

Handling Extreme Conditions


(Reference Only)
Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

Features of Aspen Dynamics Models

Handling of extreme temperature


Typical problem with constant duty heat transfer option

Handling of empty and full vessels

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 17-1 Aspen Technology, Inc.


Introduction to Aspen Dynamics Handling Extreme Conditions

Process Heat Transfer Option

Constant Duty
Consider this like a fired heater: the duty is given to the block
regardless of the process stream flowrate
If that flow becomes too low, the temperature trips
Note: the same problem happens with cooling duty

Aspen Dynamic models have a protection feature for


"extreme" temperatures to prevent convergence failure
However, in practice the physical property calculations usually
fail before

Moral: Better avoid constant duty when you can!

2002 AspenTech. All Rights Reserved.

Handling of Temperature Extremes

Example for a cooling duty (Q is negative)


0

Heat duty
Normal: Q = QR
Q

QR
Temperature
T_min T_min + delta_T
T_max as global realparameter; //Max. Temp. limit (1995 C !)
T_min as global realparameter; //Min. Temp. limit (-214 C !)
delta_t as global realparameter; //Temp. diff. (5 C)

call (Q) = pqspec (QR, T, T_min, T_max, delta_T);

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 17-2 Aspen Technology, Inc.


Introduction to Aspen Dynamics Handling Extreme Conditions

Handling of Empty and Full Vessels

Flow driven simulations allow change of flowrate directly


by user or with controller. You can:
Remove liquid from empty vessel flow
Add liquid to full vessel where inlet flowrate is greater than
outlet flowrate

Concept of required liquid outlet flow rate is introduced


in the material balance for the vessel empty case
Overflow liquid flow is introduced in the material
balance for vessel full case

2002 AspenTech. All Rights Reserved.

Handling of Empty Vessels

Fl_outR
Normally: Fl_out = Fl_outR

Liquid
Flow Rate
Fl_out
Flow stops as in reality

0 Liquid Volume
V_min V_low

Fl_outR Required liquid outlet flowrate


Fl_out Actual liquid flowrate
V_low 0.5% of the vessel volume
V_Min Zero volume
2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 17-3 Aspen Technology, Inc.


Introduction to Aspen Dynamics Handling Extreme Conditions

Handling Full Vessel

Fmax

Liquid
Overflow Loss of material!
Rate
(Fl_over)
vapor
0
Liquid Volume V_high V_Max

Fl_over Liquid overflow rate


liquid
Fmax Maximum allowable liquid flow overflow
V_high 99.5% of the vessel volume
V_Max Vessel volume
liquid

2002 AspenTech. All Rights Reserved.

Warning in Simulation Messages

Warning in Simulation Messages when vessel is full or


flow specification cannot be met
pChairX-W-Liquid volume or pressure of ####
approaching maximum of ####
Material is being vented,
vent flow = #### kmol/hr

Liquid overflow and vent stream are not modeled, i.e.,


they are lost in the overall material balance
"Overflow stream goes on the plant floor..."

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 17-4 Aspen Technology, Inc.


Introduction to Aspen Dynamics Handling Extreme Conditions

Selection of Limits

Global table

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 17-5 Aspen Technology, Inc.


Introduction to Aspen Dynamics Model Customization (Optional)

Model Customization (Optional)

Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

Lesson Objectives

Discuss the following topics:


A primer on ACM language (survival kit)
The main steps in customizing a model
Introduction to Aspen Custom Modeler (ACM) course covers all the
details of the language, hence this will not be repeated here

Demonstrate Heater Customization

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 18-1 Aspen Technology, Inc.


Introduction to Aspen Dynamics Model Customization (Optional)

Overview of Modeling Language in 5 Minutes

ACM language is not CaSe SensiTIVE

Mark the end of each statement with ;


Comments :
// comment to the end of the line
/* multi lines
comments */

$Variable : time derivative of the variable

2002 AspenTech. All Rights Reserved.

Simple Customizations

Problem:
Design specifications and FORTRAN blocks are not translated
in Aspen Dynamics

Solution:
Use the flowsheet constraints

Requires
Minimal knowledge of Aspen Custom Modeler language

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 18-2 Aspen Technology, Inc.


Introduction to Aspen Dynamics Model Customization (Optional)

Example of a Simple Customization

Heat transfer function of temperature difference


Furnace: modeled using RGIBBS
Steam/heating: modeled using a HEATER
Aspen Plus: FORTRAN : Q = UA*DT
Aspen Dynamics: FLOWSHEET constraint

2002 AspenTech. All Rights Reserved.

Other Examples

Average of tray temperatures in RADFRAC


Pressure correction of a temperature controller
Calculation of reporting quantities (i.e., efficiency of the
plant, composition in customary units, etc...)

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 18-3 Aspen Technology, Inc.


Introduction to Aspen Dynamics Model Customization (Optional)

Custom Modeling in Aspen Dynamics

Aspen Dynamics Aspen Custom Modeler


Transfer
Aspen Browse Models Create
Plus Export
Models and
and Edit
Modify Custom
Flowsheet Models

Aspen Properties System

2002 AspenTech. All Rights Reserved.

Aspen Custom Modeler and Dynamics

Feature ACM AD ACM+AD

9 9 9
Run GUI and
calculations

Create new models 9 9


9 9
Use the Dynamics
library

Call Properties Plus yes yes yes

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 18-4 Aspen Technology, Inc.


Introduction to Aspen Dynamics Model Customization (Optional)

Steps in Customizing a Model

Enable "Custom Modeling" (Tools, Settings)


Copy the model from the library to "Custom Modeling"
Save the file
Reload
Apply your modifications to the copied model

2002 AspenTech. All Rights Reserved.

Overview of ACM Types


Flowsheet

block
stream
Model Types
submodels Model Types stream Stream Types
Stream Types
Models
block
port
Port Types

Port Types
... is declared by ...
name AS type;
variable or parameter

Parameter Types
Variable Types

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 18-5 Aspen Technology, Inc.


Introduction to Aspen Dynamics Model Customization (Optional)

Basic Elements of a Model


MODEL ModelName
// variable and parameter declarations
VariableName AS VariableTypeName;
ParameterName AS ParameterTypeName;
// port declarations
PortName1 AS INPUT PortTypeName;
PortName2 AS OUTPUT PortTypeName;
// Assignments
VariableName.property : expression;
// Equations
EquationName: expression1 = expression2;
END
2002 AspenTech. All Rights Reserved.

Documentation

Aspen Dynamics physical property submodels


See online documentation for list of available models

Conversion parameters
See online documentation

See models comments for additional information

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 18-6 Aspen Technology, Inc.


Introduction to Aspen Dynamics Model Customization (Optional)

Typical Applications for Customization

Changes for usability


Example to create new variables as input/output for control or
reporting purposes

Changes of equations
Geometry, reactions, other correlations, etc...

Example: heater with calculated heating curve


Illustrate the submodels
Illustrate the use of a script to preset the submodels files

2002 AspenTech. All Rights Reserved.

Demonstration 306-customization-
heater
Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 18-7 Aspen Technology, Inc.


Introduction to Aspen Dynamics Kinetics Estimation with Aspen Dynamics

Kinetics Estimation with


Aspen Dynamics (Optional)
Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

Lesson Objectives

Aspen Dynamics estimation capabilities


KineticsEst model
Complete Workshop 307-kinetic-estimation

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 19-1 Aspen Technology, Inc.


Introduction to Aspen Dynamics Kinetics Estimation with Aspen Dynamics

Estimating Reaction Kinetic Parameters

KineticEst model provides


Power Law and LHHW
Customized reactions possible with Aspen Custom Modeler license
Rigorous or "bulk" physical properties

Estimation of fixed variables using Estimation run mode


Weighted least square estimation
Maximum likelihood

2002 AspenTech. All Rights Reserved.

How to Use the Kinetic Estimation?

Prepare physical properties in Aspen Plus


Use Run Type "PROPERTIES PLUS"

Create a blank simulation in Aspen Dynamics


Change solver options:
General: to use Tearing
Integrator: VSIE or Gear

Create a componentlist with the required components


Drag and drop the KineticEst model from Reactors folder
in Dynamics library

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 19-2 Aspen Technology, Inc.


Introduction to Aspen Dynamics Kinetics Estimation with Aspen Dynamics

Configuration of the Reactor

Use the Configure form:


Specification
Reaction
Estimated Variables
Measured Variables
Dosing
Experiments

2002 AspenTech. All Rights Reserved.

Specification Sheet

Properties ComponentList: selection of the components


(both reactor and doses)
Solvent relevant for some composition basis
Property mode:
Rigorous: using Physical properties from Aspen Plus
Bulk: constant properties given by the user
Local: similar to Rigorous (prefer to use rigorous)

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 19-3 Aspen Technology, Inc.


Introduction to Aspen Dynamics Kinetics Estimation with Aspen Dynamics

Reactions

Specification of the reactions:


Power Law
Langmuir-Hinshelwood-Hougen-Watson (LHHW)
Custom Reaction

2002 AspenTech. All Rights Reserved.

Estimated and Measured Variables

To select the variables for the estimation and the


experiments

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 19-4 Aspen Technology, Inc.


Introduction to Aspen Dynamics Kinetics Estimation with Aspen Dynamics

Dose

Each dose corresponds to a feed stream for which you


can specify the conditions (flowrate)
Flowrate will be specified in the Experiment information

2002 AspenTech. All Rights Reserved.

Experiments

Experiments define:
Values vs. time of the measured variables
Typical example: Q = heat duty
Starting conditions (initial variables)
Typical example: initial holdup in the reactor
Run conditions (fixed variables)
Variables can be ramped, i.e., changed as a function of time
Typical example: flowrate for the dose

You can copy and paste the data from Excel

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 19-5 Aspen Technology, Inc.


Introduction to Aspen Dynamics Kinetics Estimation with Aspen Dynamics

Running the Estimation

Change the run mode to Estimation


Run the simulation
Iterations and results can be seen in the Simulation
Messages window
Results can also be displayed in Tools, Estimation
Experiment data will be saved in the dynf file

2002 AspenTech. All Rights Reserved.

Note

Pay attention to the heat of reaction


Defined via DHFORM parameter in Aspen Plus

Give good initial estimates for the regressed parameters


Do not try to regress too many parameters

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 19-6 Aspen Technology, Inc.


Introduction to Aspen Dynamics Kinetics Estimation with Aspen Dynamics

Workshop 307-kinetic-estimation files

Introduction to Aspen Dynamics

2002 AspenTech. All Rights Reserved.

Workshop Summary

Hydrolysis of acetic anhydride


Estimation: Fixed Variable - KineticEstimation
0.25
0.05 0.1 0.15 0.2
R1.Fm_in(1) kg/hr

dose

R1
0 500 1000 1500200025003000 3500400045005000 550060006500
Time: Seconds

Estimation: Fixed Variable - KineticEstimation Estimation: Measured Variable - KineticEstimation


25.4

30

Observed
25

Predicted
15 20
R1.T C

R1.Q W
25.2

10
5

5500 6000 6500 7000 7500 8000 8500 9000 9500


Time: Seconds 5500 6000 6500 7000 7500 8000 8500 9000 9500
Time: Seconds

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 19-7 Aspen Technology, Inc.


Introduction to Aspen Dynamics Kinetics Estimation with Aspen Dynamics

The End . . . Congratulations!

Please complete
your
Course Evaluation Form

2002 AspenTech. All Rights Reserved.

2002 AspenTech. All Rights Reserved. 19-8 Aspen Technology, Inc.

Você também pode gostar