Introduction To Aspen Dynamics
Introduction To Aspen Dynamics
Introduction To Aspen Dynamics
ES102.111.03
Agenda Day 1
Agenda Day 2
Agenda Day 3
Pressure relief
Scripts
Troubleshooting (Hints and Tips)
Optional Lessons
Introduction
Simulation in
Aspen Dynamics
Change control system,
apply disturbances...
2002 AspenTech. All Rights Reserved.
9 9 9
Run GUI and
calculations
FEED FLASH
Simple Example
Lesson Objectives
Topics
Lets you specify the data for the dynamic simulation file
to be exported to Aspen Dynamics
It does not affect the steady state results
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
Length L L
Level Level Level
Diameter
D
D
HORIZONTAL
D
Diameter D
Level Level
Level
Length L L
2002 AspenTech. All Rights Reserved.
vapor
liquid
Liquid Volume
Fraction
Constant Duty
Default (requires no further data addition)
[1] Q = UA . LMTD
[2] Q = Fmmed . Cpmed . (Tmed_Out Tmed_In)
Variable Description
T (LMTD option)
LMTD (example : T = 90 C)
50
75 80 85
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
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
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
INFORMATION:
Information about the dynamic simulation. Often used to output
information before fatal error message
Objects Exported
Stream Specifications
Running Simulations in
Aspen Dynamics
Introduction to Aspen Dynamics
Lesson Overview
A table
A plot
Flowsheet window
Simulation
Explorer
Simulation Explorer
Run Mode
Run Controls
Communication
interval
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
Example of a Table
Variable units
Variable name
Units of Measurement
profile table
plot
history table
Configure form
process.dynf
Aspen Dynamics simulation file
Can include "kept results" to save starting point
Usage Suggestions
Lesson Objectives
Specifications
Initialization Run
Dynamic Run
Note
FIXED FIXED
time time
Initial Conditions
FIXED INITIAL
time 0 time
System Specification
Status indication
Incomplete
Under-specified
Complete
Over-specified
Initial state under-specified
Initial state over-specified
Singular
Variable Find
To restart a simulation
To time 0 for dynamic simulation (snapshot 'Dynamic
Initialization')
Snapshot Management
Results
"Old" snapshots
Snapshots
Results
(*) New
2002 AspenTech. All Rights Reserved.
Lesson Objectives
Simulation Explorer
Components
Stream Types
Stream Specifications
New
ConfigureSensor
ConfigureSensor Form
Check Sensor
On
Petroleum Properties
Typically, you use this only once, when you create the PID block
Lesson Objectives
Pressure profile
Control
Complete Workshop 106-radfrac
RADFRAC Capabilities
Unsupported
User-KLL, polynomial KLL
VL1/LL prop-sections
Different VL1 and VL2 efficiencies
Thermosyphon reboilers with above-stage return convention
Simple Distillation
Condenser(1)
Reflux.FmR
Stage(2)
Stage(1): Reflux drum
Overhead System
Condenser: Condenser(1)
Assumes instantaneous operation
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
Stage
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"
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.
Required specifications
Diameter
HETP
Initial liquid volume fraction
Control
LC Drum level
Distillate flowrate
Reflux is fixed
Bottom flowrate
RadFrac Decanter
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).
RadFrac Pumparound
Workshop Summary
Step 2: Enter
dynamic data Step 4: Change
control system and
test
files
Step 3: Try dynamic
simulation
Heat Exchangers
Heat Exchangers
Heater
Instantaneous only
HeatX
Instantaneous or Dynamic
MHeatX
Instantaneous or Dynamic
Q = U*A*LMTD
dp cold
MHeatX
Heat Exchangers
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)
Reactors
Reactors
RCSTR
RCSTR Connectivity
Feed flow
Vapor
PC
mixer
LC Product
Right side structure shows what Aspen Dynamics model does for
single outlet multiple phases reactors
Prefer to use separate outlet streams in Aspen Plus!
Rplug (1)
Rplug (2)
Task Language
Lesson Objectives
What is a Task?
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
Task Manager
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
Active Task
with checkmark
Task Language
Event-Driven Task
Syntax:
TASK TaskName RUNS WHEN Condition
TaskStatements;
END
Condition:
time == value
expression1 >, <, ==, <>, >=, <= expression2
Task Event
lev_alarm
time
Tasks
"ONCE" qualifier
p_burst
time
Task Statements
second ramp
(sramp)
step change
(assignment)
first ramp 15
(continuous)
5
0
time
4 6 9
2002 AspenTech. All Rights Reserved.
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.
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
Conditionals in Tasks
Callable Task
Syntax
TASK TaskName ( ParameterList )
TaskStatements
END
Call
CALL TaskName (ParameterList);
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
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
Communication interval
Conflicting Tasks
1 2 3 time
2002 AspenTech. All Rights Reserved.
Variables in conditions:
Check in Results tables
Check AllVariables, with Description
Pressure Changers
Pressure Changers
Valve
Pipe
Pump
Compr and MCompr
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
Pipe
Pump
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
Example
18
Spline fit
16
14
12
Rp
10
0
42000 43000 44000 45000 46000 47000 48000 49000 50000 51000
Fv (ft3/min)
Lesson Objectives
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.
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
Pressure "neutrality"
Pressure of all feed streams to a block must be equal
Fixed pressure
Feed streams, product streams, liquid-only blocks
Pressure Driven
F-1
V-1
1 2
7
E-1 F-2
3 4
V-4
5 6
Problems to Consider
Typical Modifications
Calculation Type:
"Adiabatic..." becomes a "Simple" valve in Aspen Dynamics
"Calculate..." becomes a "Rigorous" valve in Aspen Dynamics
Tabulated
characteristics
Standard
characteristics
Calculation options
Choked flow checking
Cavitation
Workshop: 204-pressure-driven
E101
C3PRODV
C3PRODP C3PROD
C2IN LIQFEED
D101LIQV
D101L
Reverse Flow
Lesson Objectives
Switch to
enable/disable
Default is
disabled
Valve
CheckValve option to prevent reverse flow
BurstingDisk
Specify reverse bursting pressure
Physical Properties
Global table
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
Demonstration 206-physical-properties
files
Process Control
Lesson Objectives
Process Control
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.
Cascade Percent
Manual mode toggles display b/w
mode switch process units and %
switch Configure
form
Auto Plot
mode form
switch
Bias
Constant term added to the controller output
Typically set to value of manipulated variable when process is
in steady state
Gain
Dimensionless units
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
Control algorithm
Ideal (default)
Series (interacting or analog algorithm)
Parallel (ideal parallel or
non-interacting algorithm)
Bumpless transfer
Anti-reset windup
Deadband
Typically, you use this only once, when you create the
PID block
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
Auto-Generated Controllers
Control System
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
C-101
DIST
Dead_Time
FEED
PID
BOTM
Compressor Control
Lesson Objectives
Compressor Control
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)
Workshop 302-compressor
files
Orifice Orifice
PSV
Valve settings
full lift pressure, full lift pressure,
closing opening
RCSTR
Switch for
Pressure Relief
Calculations
Pipe
Scripts
Lesson Objectives
What is a Script?
Invoking a Script
If ADSimulation.Successful Then
MsgBox Simulation Complete
Else
MsgBox Simulation Failed
End If
Scripts References
Looking at a Problem
Control System
Tasks
Diagnostic Tools
Group decomposition
May give a hint on the location of the problem
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)
Group Decomposition
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
Diagnostics
File Management
Working folder:
Keep it tidy
c:\program files\aspentech\working folders\Aspen Dynamics...
Workshop 305-usage
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
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)
Fl_outR
Normally: Fl_out = Fl_outR
Liquid
Flow Rate
Fl_out
Flow stops as in reality
0 Liquid Volume
V_min V_low
Fmax
Liquid
Overflow Loss of material!
Rate
(Fl_over)
vapor
0
Liquid Volume V_high V_Max
Selection of Limits
Global table
Lesson Objectives
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
Other Examples
9 9 9
Run GUI and
calculations
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
Documentation
Conversion parameters
See online documentation
Changes of equations
Geometry, reactions, other correlations, etc...
Demonstration 306-customization-
heater
Introduction to Aspen Dynamics
Lesson Objectives
Specification Sheet
Reactions
Dose
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
Note
Workshop Summary
dose
R1
0 500 1000 1500200025003000 3500400045005000 550060006500
Time: Seconds
30
Observed
25
Predicted
15 20
R1.T C
R1.Q W
25.2
10
5
Please complete
your
Course Evaluation Form