Aspen Plus & Aspen Dynamic Workshop D ri riven ven by by Innova Innovatti on
By: Dinie Muhammad
Presentation Outline • Part 1: Introduction to Aspen Plus • Introduction to AspenONE • Introduction to Flowsheet simulation • What is Aspen Plus? • What Aspen Plus can do? • Aspen Plus extension- Aspen Dynamic • Steady state and Dynamic model dilemma • How Aspen can help me with my research?
• Part 2: Before starting with Aspen Plus • Process “know how” • Process Analysis • Property Method
Presentation Outline • Part 1: Introduction to Aspen Plus • Introduction to AspenONE • Introduction to Flowsheet simulation • What is Aspen Plus? • What Aspen Plus can do? • Aspen Plus extension- Aspen Dynamic • Steady state and Dynamic model dilemma • How Aspen can help me with my research?
• Part 2: Before starting with Aspen Plus • Process “know how” • Process Analysis • Property Method
Presentation Outline • Part 3: Getting Started with Aspen Plus • Distillation column design • Aspen Analysis Binary
Analysis Azeotrope Analysis Design Specs Sensitivity Analysis Optimization • Part 4: From Aspen Plus to Aspen Dynamic • Part 5: Aspen Dynamic with Matlab
PART 1: INTRODUCTION TO ASPEN
Introduction to AspenONE • Developed by AspenTech Inc. • Integrated simulation software to implement best practices for: Process
design and modelling
Optimization Production Supply
engineering
management
chain operation
Advanced
process control
General Simulation Problem What is the composition of stream PRODUCT? RECYCLE REACTOR COOL FEED REAC-OUT
To solve this problem, we need:
COOL-OUT
SEP
PRODUCT
• Material balances • Energy balances D. Muhammad & AspenTech, 2013
6
Flowsheet Simulation What is flowsheet simulation? Use of a computer program to quantitatively model the characteristic equations of a chemical process Uses underlying physical relationships • Mass and energy balance • Equilibrium relationships • Rate correlations (reaction and mass/heat transfer)
Predicts • Stream flowrate, compositions, and properties • Operating conditions • Equipment sizes
D. Muhammad & AspenTech, 2013
7
Flowsheet simulation
Approaches to Flowsheet Simulation Sequential Modular • Each unit operation block is solved in a certain sequence • Aspen Plus is a sequential modular simulation program
Equation Oriented • All equations are solved simultaneously • Aspen Custom Modeler (formerly SPEEDUP) is an equation oriented
simulation program
Combination • Aspen
Dynamics (formerly DynaPLUS) uses the Aspen Plus sequential modular approach to initialize the steady state simulation and the Aspen Custom Modeler (formerly SPEEDUP) equation oriented approach to solve the dynamic simulation
Sequential-Modular Approach
Equation Oriented Approach
Advantage of Simulation Reduces plant design time • Allows designer to quickly test various plant configurations
Helps improve current process • Answers “what if” questions • Determines optimal process conditions within given constraints • Assists in locating the constraining parts of a process
(debottlenecking)
Good Flowsheeting Practice • Build large flowsheets a few blocks at a time. This
facilitates troubleshooting if errors occur.
• Ensure flowsheet inputs are reasonable. • Check that results are consistent and realistic.
What is Aspen Plus? • Steady state computer-aided chemical process simulation tool
Aspen Plus Inputs Choose Thermodynamic Models Specify Chemical Components
Process Flowsheet Design
Specify Feed Conditions
Aspen Plus Process Simulation Model Inputs
Specify Operating Conditions
What Aspen Plus can do? • Flowsheet (default): process simulation (SA and optimization) • Data Regression: fitting data to existing models in Aspen • Property Display: show properties of a components in Aspen Plus’s database • Property Analysis: estimating physical and thermodynamic properties • Assay Data Analysis: analyze assay data (petroleum application) • Property Plus: prepare property package for Aspen Custom Modeler
Aspen Plus in Process Design & Development
Aspen Plus Extension: Aspen Dynamic • Dynamic modeling tool for plant operations and process design • Enables users to study and understand the dynamics of real plant operations • Exported from Aspen Plus steady state model
Aspen Dynamic Overview
Adding Dynamic Data Data is required to calculate the following: • Vessel geometry (required for vessel volume) • Vessel initial filling (used for starting liquid holdup) • Process heat-transfer method • Equipment heat transfer options Equipment
heat capacity
Environmental
heat transfer
Steady state vs. Dynamic dilemma Steady state
Dynamic
• All properties are steady (not changing over time).
• Ability to model the time varying behaviour of a system (changing over time)
• Can be used to study different steady state conditions for a specific range of properties either at operating conditions or offdesign conditions.
• Used to analyse the dynamic behaviour (response) of complex systems.
Advantages of Steady State Simulation • Immediate answers to system condition variation • Determine results at specific conditions • Quick what if in design, sensitivity and optimization studies
Advantages of Dynamic Simulation • Determine behaviour of plant/system over complete operating range: start up, shut down, accident scenarios, transition between different states and disturbances occurrence ( what if –behaviour ) • Can identify in advance if the operating problems occurred • Facilitate the design for control and optimization of process components to ensure optimum system behaviour, even during off design and transient behaviour • Design and commission control systems using simulations and just fine tune during actual installations • Dynamic integrated simulations can help to identify bottlenecks, inefficiencies and safety risks that are not identifiable with steady-state or segregated simulation
Application for SS and Dynamic Simulation
Mcmillan, G. K. (2006). Modeling and Simulation of Processes. In "Process Control And Optimization" (B. G. Lipták, ed.), Vol. 2. CRC Press, Boca Raton, FL.
How Aspen can help me with my research? • Another option for first principle model (FPM) • Simulation and validation of complex chemical process •Sensitivity analysis and optimization study of process • Study nonlinearity and multiplicity behavior in process • Using Aspen Dynamic & Matlab Simulink for control scheme design
PART 2: BEFORE STARTING WITH ASPEN PLUS
Process “know how”
• Aspen Plus is not a magic box • All the process inputs (e.g. sizing and process condition) must based on facts or heuristic justification • A preliminary study of process design in recommended
Process Analysis • Used to generate simple property diagrams to validate physical property models and data • Understand the behavior of the process • Diagram Types: Pure
component, e.g. Vapor pressure vs. temperature
Binary,
e.g. TXY, PXY
Ternary
residue maps
• Select Analysis from the Tools menu to start Analysis
Aspen Property Method • A collection of thermodynamic models and methods used to calculate physical properties. • Choice of model types depends on degree of non-ideal behavior and operating conditions • Users can modify existing Property Methods or create new ones
Case Study - Acetone Recovery • Correct choice of physical property models and accurate physical property parameters are essential for obtaining accurate simulation results.
Ideal vs. Non-Ideal Behavior What do we mean by ideal behavior? • Ideal Gas law and Raoult’s law
Which systems behave as ideal? • Non-polar components of similar size and shape
What controls degree of non-ideality? • Molecular interactions
e.g. Polarity, size and shape of the molecules How can we study the degree of non-ideality of a system? • Property plots (e.g. TXY & XY)
Comparison of EOS and Activity Models
Common Property Methods Equation of State Property Methods • PENG-ROB • RK-SOAVE
Activity Coefficient Property Methods • NRTL • UNIFAC • UNIQUAC • WILSON
Choosing a Property Method - Review
References: Aspen Plus User Guide, Chapter 7, Physical Property Methods, gives similar, more detailed guidelines for choosing a property Method.
PART 3: GETTING STARTED WITH ASPEN PLUS
Aspen User Interface Run ID
Title Bar Menu Bar
Next Button Tool Bar
Select Mode button
Model Library
Model Menu Tabs
Status Area Process Flowsheet
Case Study Design a distillation process to separate isobutane and propane so that the impurity target in distillate is 2 wt% and in bottom is 1 wt%
Feed: Propane (40%) Isobutane (60%) Flowrate: 100 kg/h Temperature: 322 K (48.85’C) Pressure: ? Feed at Stage 16 Reflux ratio = 2 Number of Stages = 32 (reboiler + sump) Number of Trays = 30
Overview of case study C3 0.98 wt% iC4 0.02 wt% C3 0.4 wt% iC4 0.6 wt%
C3 0.01 wt% iC4 0.99 wt%
How to begin? Develop the distillation column system Specify the C3 and iC4 in component selection Choose a suitable property method
Define feed condition
Specify a reasonable operating condition Run and check the results
Columns - Shortcut
Columns - Rigorous
Develop the distillation column system Valve (pressure changer library)
Pump (pressure changer library) Distillation column – RadFrac (separator library)
Connect all the blocks
Connect all the red input and output (primary stream) Select material stream to insert stream in the flowsheet
A complete distillation system P12 FEED
V12
DIST
C1 V1 Rename all the blocks and streams
Click the NEXT button and this dialog menu will appeared. Click OK to proceed.
P11 BOTM
V11
Fill the specification menu
Select unit measurement
Note: You can also use your own set of unit by using Unit-Sets option under the
Edit Report Options
Click the NEXT button
Specify the component
Click the NEXT button
Use the Find button to search the components
Select the property method
Select Chao-Seader property method
Click the NEXT button
Define the FEED stream
How to calculate the pressure in FEED? • Cooling water at condenser is expected to be at 305 K (31.85’C) • Heuristic temperature different for heat transfer in condenser is 20 K • Therefore, the reflux drum temperature is ~ 325 K • Vapor pressure for C3 at 325 K is ~ 14 atm • Assume the pressure drop in the V1 is 5 atm • So, FEED stream pressure > 19 atm • In this case, FEED pressure is selected at 20 atm
Distillation column setup (Configuration)
Distillation column setup (Stream)
Distillation column setup (Condenser)
Heuristic pressure drop in column = 0.0068 atm
Click the NEXT button
Pump 11 and Pump 12 Setup
Click the NEXT button
Use pressure increase 6 atm for all pump
V1 Setup
Use outlet pressure option = 14.2 atm
Choose Liquid-Only
Click the NEXT button
V12 and V13 Setup
Use Pressure drop option = 3 atm
Choose Liquid-Only
Click the NEXT button
Run the simulation
Click OK to run the simulation
The simulation run complete
Result completed normally
Status Indicators
Check the results (Stream summary>>Streams) Select the wanted streams
The overall result is still not achieve target
Adjust to STREAMS
Redesign: RR = 3 • Operating condition for RR is changed from 2 to 3 • Reinitialize the simulation and Run again
Reinitialize button
Check the results (Stream summary>>Streams)
Separation target achieved
Analysis Using Aspen Plus • Binary Analysis – This tool will examine and plot the binary interaction between components. • Azeotrope Analysis – To determine whether the mixture is azeotrope mixture or not • Design Spec - This tool will help the user to achieve the production target by varying the specified operating condition. • Sensitivity Tool – This tool will help the user to analysis the effect of specified operating condition over a certain region towards the production target. • Optimization – This tool will produce the optimized value for the operating condition in order to achieve the desired production target. This tool will automatically change the selected operating value to an optimized value after Run.
ANALYSIS: BINARY ANALYSIS
Find Binary Analysis Menu
Access the Binary Analysis Menu under Tools Menu
Click OK to continue
Binary Analysis Menu
Select type of analysis
Select Unit and list/range for Pressure variation
Select basis component
Property Method
Click GO to start analysis
Analysis Result Txy Graph
Use Plot Wizard to plot other type of graphs e.g. xy
Full results
ANALYSIS: AZEOTROPE ANALYSIS
D. Muhammad & AspenTech, 2013
67
Azeotrope Analysis Menu
Select the menu
In this case, consider a feed of water and isopropane mixture to be analyzed. Here, the property method selected is SRK
Mixture Block
Menu Click the desired component
Select the Pressure basis
Finally, click the Report option to get the analysis
Select Property method and mixture phase
Azeotrope Report
Azeotrope exist!
The xy graph
azeotrope point
xy graph of water and isopropane mixture (from Binary Analysis)
ANALYSIS: DESIGN-SPEC
Choose the Design-Spec Menu
Design Spec and Vary (below) menu in the explorer
Create new ID
Design Spec Tab Information • Specification – define the target to be achieve in the simulation e.g. 99% composition in distillate stream • Components – specify the target component • Feed/Product Streams - specify the target component’s stream
Specification Tab Select type of target
Specify target value
In this case, a mass purity target of 0.99% is desired
Click the NEXT button
Components Tab
Select the target component from available components
Propone is selected as the target component
Click the NEXT button
Feed/Product Streams Tab
Specify the target stream from the available streams
Since the C3 product stream is at the top, thus the distillate stream is selected
Click the NEXT button
Vary Menu: To specify the varying variable for Design-Spec
Vary Menu Create new ID
Specification Tab Select the varying variable to be used. Must be a variable from the specified operating conditions
Select a reasonable lower and upper bound
Click the NEXT button
Run the simulation
Click OK to start the simulation
Check result in Vary Menu Select the Results Tab
The final value of RR to achieve 99%C3 purity is 2.87
ANALYSIS: SENSITIVITY STUDY
Select: Sensitivity Study
Select the Sensitivity option from Model Analysis Tool Tool
Sensitivity Study Tab Information • Define: The user need to define the variable to be used as the production/simulation target. • Vary: Choose the a variable from the specified operating conditions to be varied over selected region. • Tabulated: Choose how the data will be tabulated. Usually, varied operating conditions vs. target value responses
D. Muhammad & AspenTech, 2013
84
Insert new variable
Click New and enter a name for the target variable
Select the target variable
In this case, we want to specify the C3 mass concentration in the distillate stream as the Target variable
Click the NEXT button
Select the Vary Variable
Use search option to find the RR
In this case, the Reflux ratio (RR) is selected to be the Vary variable. The RR variable can be selected by specify C1 (the column) under Block-Var (Block variables).
Specify range: Lower and Upper boundary. Specify the number of point to be plotted
Tabulate the variables Click Fill variables button as Aspen will automatically tabulated all the variables.
Click the NEXT button and OK
Check result
Choose Results. Make sure all the result is completed and converged (blue tick on the explorer)
Results summary for C3 composition by varying RR
Full results is available here under S-1 label
How to plot results in Aspen
Select the RR column in results summary
Click Plot from menu bar. Specify as X-axis. Repeat the same procedure for C3 result. Finally, click the Display Plot under the same Plot menu
The Sensitivity analysis results
The figure show the effects of varying the RR towards C3 composition. Based on the figure, the best RR value to achieve the highest C3 purity would be around RR=4
ANALYSIS: OPTIMIZATION
Select Optimization Menu
Optimization menu
Click New to create a new ID
Define Tab
Click New to define a New optimization value
Enter the target variable name and Click OK
Define the Target variable
Specify the Target variable The optimization target variable is C3 mass purity in the distillate stream
Click the NEXT button
Objective & Constraints Tab Specify the previously defined variable name in the Define Tab
Select max or min
Constraint can also be specified in the Constraint Menu
C3 composition is optimized to find the max purity
Vary Tab Specify number of varying variable
Select and specify the varying variable
Specify lower and upper boundary
RR is varied from 0.5 to 5 to find the max mass purity for C3 distillate product
Click the NEXT button
Run the simulation
Click OK to start the simulation
Check the results: Final C3 composition
Final value shows the max C3 distillate product composition can be achieved within the specified boundary
Check the results: New optimized RR value
The optimized RR value in the C1 Results Summary
PART 4: FROM ASPEN PLUS TO ASPEN DYNAMIC Steady State to Dynamic Simulation
Using the same example: A commonly used heuristic is to set these holdups to allow for 5 min of liquid holdup when the vessel is 50% full, based on the total liquid entering or leaving the vessel (Luyben, 2006) • 100% full = 10 minutes of volume flowrate • From Hydraulic Tab: Reflux
drum volume = 0.00800586 m 3/min (10min) = 0.0801 m 3
Sump
volume = 0.00216335 m 3/min(10min) = 0.0216 m 3
*Please refer to slide18 &19 for explanation on dynamic properties Luyben, W. L. (2006). "Distillation Design and Control using Asp en Simulation," Wiley, New York.
From Hydraulic Tab: Stage 1 => Reflux drum volume i.e. sum of Reflux and distillate flowrate
From Hydraulic Tab: Stage 32 => sump level i.e. liquid entering reboiler from bottom tray
Calculate the vessel geometry
Reflux drum: L = 0.9718m; D = 0.3239 m Sump: L = 0.6279 m; D = 0.2093 m L=length; D=diameter
Vessel Geometry
Entering the dynamic properties
Click this button to enter the dynamic properties
Click the NEXT button
Enter the dynamic properties in the column configuration: Reflux drum and Sump Sizing
Enter the calculated Length and Diameter for Reflux Drum and Sump
Click the NEXT button
Entering the properties for Hydraulic calculation inside the column
Choose Rigorous Tray Calculation
Click the NEXT button
Additional Info • Simple Tray: Using simple tray hydraulics equation relates the liquid flow rate from a tray to the amount of liquid on the tray. Here, the Francis weir equation for a single pass tray is used. • Rigorous: The pressure drop across the tray is calculated by the same rigorous methods used for the steady-state simulation. The Francis weir equation is used to model the hydraulics based on the number of passes and tray geometry specified in the steady-state simulation.
Tray Rating
Since we are using Rigorous Tray Calculation, we need to specify the Tray Rating (so that Aspen Plus can perform the pressure drop calculation along the trays)
Specify Tray Rating
Click New and enter any ID number
Select Tray Rating menu under the C1
Specify Tray Rating Enter the starting stage = 2 and End stage = 31 (In Aspen Plus; Stage1 = Condenser and Stage 32 = Reboiler) Enter the tray diameter, Tray type, Tray spacing and weir heights
Note: Default value for Tray spacing = 0.6069 m weir heights = 0.05 m
Pressure Drop profile
In order for the Aspen Plus to calculate and update the Pressure Drop profile inside the column, this box must be tick
Click the NEXT button and RUN the simulation
Export to Dynamic (Flow Driven)
Click this icon for export our model into dynamic state (flow driven). A menu will pop up to rename and save the model. Just click OK.
Additional Note: Aspen provide two type of dynamic simulation i.e. flow driven and pressure driven. The icon for pressure driven simulation is just next to the flow driven in the menu. In the author experience, flow driven simulation is much simpler to develop compared to the pressure driven. Once the simulation is completed with no error, the simulation is ready to be export to the dynamic states in flow driven. However, for pressure driven, all the pressure inside the streams in steady state model must be control by using pump or valve and its pressure must appropriate. There are also problem (depends) with irregular pressure drop inside the column and inconsistence pressure in feed and recycle stream. Use the Pressure checker icon to check the pressure within the SS model. Refer Process Simulation and Control Using Aspen by AK Jana. Pressure Checker
Find the saved file .dyn file Click the saved file from previous menu. Generally, the file is saved in the same folder as the SS simulation file
Entering Aspen Dynamic (or Custom Modeler)
Choose the state of simulation: Dynamic or Steady-state. Run Initialization at before starting dynamic simulation
If all goes right, you should get this figure. Notice that in Aspen Dynamic, the basic controller is already implemented. These control loops are important to operate the column properly. Click this set of icons to run/pause/rewind (or restart) the simulation
Additional Info: • For distillation system, there are 3 major control loop that are essential to operate the column:1.
Top / Condenser Pressure control loop –control energy balance
2.
Reflux drum Level control loop –control mass balance (top)
3.
Sump Level control loop –control mass balance (bottom)
See simulation result Run the simulation. Right click top product stream. Select Forms and click TPFmPlot
During running the simulation, this panel will show the latest calculation step
Results in real time form
This panel display the mass flowrate, pressure and temperature for the top product stream in real time. Use Zoom Full option for clearer plot.
Although the graph is not steady, notice that the difference (in each parameter) is very small.
Specify custom parameter (e.g. Propane purity in top product stream)
#2 Name form and choose Plot option
#1 Select Tool in the top menu. Click New Form
#3 The plot figure with no Y axis value
Specify parameter (e.g. Propane purity in top Specifycustom specific parameter product stream) #4 Right click top stream and choose Results in the Forms option
#5 From Results Table, drag the highlighted row (Propane purity) into the Y axis of the plot. The final figure should be like the one on the left. Run the simulation in dynamic mode.
Specify custom parameter (e.g. Propane purity in top product stream) #6 We can now know the Propane composition in Distillate Stream in real time
PART 5: ASPEN DYNAMIC WITH MATLAB SIMULINK
Getting Started with Aspen-Matlab • Basically, AspenTech had made a collaboration with Mathworks to develop the AMS simulation system to connect Aspen Dynamic with Matlab Simulink • However, there might be some compatibility issues regarding Aspen and Matlab version. Please refer to Aspen Help. Based on the author experiences: Aspen
V7.2 compatible with Matlab 2009
Aspen
V7.3 compatible with Matlab 2010
Use Aspen Dynamic Examples • As an example, we are using the Simulink file in the Aspen Dynamic Examples • Find the Aspen Dynamic instillation folder. Inside the folder, find the Examples folder. Inside the example folder, click the Simulink folder; C:\Program Click
Files\AspenTech\Aspen Plus Dynamics V7.2\Examples
the MCH file (Simulink) as shown below:
Note: MCH is a simulation of extractive distillation of methylcyclohexane and toluene using phenol as an entrainer.
D. Muhammad & AspenTech, 2013
127
The MCH simulation in Simulink
AM-Simulation Block Notice that there are 4 control loops that are controlling the MCH column. Now, input s form the Aspen Dynamic (via AMS Block) is supplied to the controller block. Then, the controller action is computed in Simulink and returned back to the Aspen Dynamic for further action. D. Muhammad & AspenTech, 2013
A step input block act as the disturbance
128
Configure AMSimulation Block Click the AMSimulation Block to open this menu
Use Browse to find the .dynf (Aspen Dynamic) file Click Connect to link with Aspen Dynamic
Input & Output represent the variables that being used in the AMS Block. Input refer to the input that is supplied to the Aspen Dynamic model (e.g. MV or DV). Output refer to the process variable (i.e. PV) that is produced from the model.
MCH Model in Aspen Dynamic
AMSimulation file Follow the link
Before begin the Aspen-Matlab simulation, it is advised that we copy the AMSimulation file (mfile format) into the current working folder (in Matlab) . The file is generally located inside the AMSystem folder in the Aspen installation folder.
Running the simulation Scope Aspen Dynamic
Simulink
Click RUN button in the Simulink to run the simulation
How they work?
AM-Simulation
Compute and provide controller action (decide the MV)
Matlab Simulink
Provide simulation data and result (present the PV)
Aspen Dynamic
What happen? • Based on the previous figure (after running the simulation), Matlab Simulink had provided the initial Input (SS or initial value) for the Aspen Dynamic Model. Then, the input is processed (or calculated) by Aspen Dynamic to provide the current process variable (PV) values. The process variables is send back to Simulink environment via AMS Output. • Based on the output that we had selected (in the AMS box), the output will provide the latest PV for Simulink Matlab to calculate its next MV. The new MV is then supplied back to the Aspen Dynamic via AMS Input and so on. • One of the ways to set the initial value for the Aspen Dynamic is by using the unit delay box in Matlab Simulink.
Simulation Time • In the author opinion, it is important to synchronize the Aspen Dynamic and Matlab Simulink simulation time. • This can be done via RUN (in the menu bar) >> Run Option or select F9.
Adjust the time units to match both simulation time
Simulation model vs. predictive model
u(k)
Simulation Model (Aspen Dynamic)
y(k)
u(k)
Predictive Model
y(k+1)
Special Thanks • Assoc. Prof Dr. Norashid Bin Aziz (USM) • Assoc. Prof Dr. Zainal Bin Ahmad (USM) • Imam Mujahidin Iqbal, Msc (USM) • Process Control Research Group (PCRG) USM