Need to get stream data from your Aspen Hysys simulation into another format; say Microsoft Excel? It could be for a heat and material balance table, an equipment datasheet, or just data for a calculation. Try one of the following approaches to copy out the Hysys data.
Note: The program UniSim Design by Honeywell is, at the time of writing, almost identical to Hysys. Except for tip #5, most of these approaches should work just as well for UniSim.
- For small amounts of data you can copy and paste directly out of Hysys windows. Use the “copy with labels” command (shortcut Crtl-Shift-C) to copy both the data and the row/column heading names
- Go to Tools>Workbooks or hit Crtl-W. Create a workbook customized to show the data you want. Copy and paste into Excel. Crtl-shift-C works again
- Print the workbook instead of copying. When printing, select the Hysys workbook checkboxes “text-to-file” and “delimited.” When selected, instead of sending a report to the printer, Hysys will instead create a delimited text file that you can open in MS Excel. (In Excel, use Data>Text to columns to interpret the delimited data, and select commas to create new cells)
- Go to Tools>Reports or hit Crtl-R. and create a report displaying the data you need. Again use delimited text files to create a “report” you can read with spreadsheet programs
- Download the “Hysys Stream Reporter (HSR).” This is a sample Excel Macro, that uses Visual Basic coding to reach into the Hysys file and extract stream data. It is very easy to use and has instructions built right into the file. At time of writing you would use HSR 1.6 but you should search the Aspentech Support database for the latest version. You should note that as a “demo file” HSR is not subject to the same quality controls as normal Hysys features, and there is no technically no guarantee it will be available in future versions of Hysys. (Although unofficially, I have been told it is so popular they will likely be built for future versions of Hysys). I find it very convenient, but there is a risk that for very large files or simulations you have to upgrade to new versions that something will go wrong. I wouldn’t rely on HSR for major projects that will last several years. Also, be aware that the program can be slow if you have a lot of stream data, and that it ties up both Excel and Hysys. You may want to test it by first writing a report with only a single stream property for all the streams of interest, to make sure that the connection to each stream is working correctly, before trying to get your full report out.
- You can use the Spreadsheet unit operation. Using the” Add Import” button in the “Connections” of your spreadsheet tab, you can pull in any variables (including stream or equipment properties) into a spreadsheet in any cells that you choose. Shortcut: You can also add variables to the spreadsheet by opening a Hysys window (say a stream or unit operation’s window), holding control, and using the right mouse button to drag the variable from the Hysys window and dropping it into your spreadsheet. Either way you add the variables, it is a little time consuming, but you can bring key data together in the orientation/order you like, and then copy and paste it to other programs. (Also, sometimes it is good to get an “executive summary” or “dashboard” of key data immediately within your simulation, as you try to tune the simulation).
- Create your own custom solution with Visual Basic programming to get data out of Hysys. You can also use it to pull data in, if you need to have Hysys interface to an external spreadsheet or program
- See if Aspen Simulation Workbook, which helps you create linkages between Hysys and Excel, can help you
Personally, I find Option #5 is the easiest, quite flexible and powerful. Option #5 also makes it very easy to mix and match streams from multiple simulation files or sub-flowsheets (like a column’s streams) into a single report.
Option #2 is also very flexible, takes a little longer to set up but you’ll get the reports faster and it’s less buggy. So I’d prefer option #5 for one-off problems and option #2 for lengthy problems where I can set up the Hysys file properly and keep developing the file going forward.
Option #6 is a good choice if you only need a tiny handful of variables, but many different types of variables from different places in the simulation. Note that you could also use the spreadsheet approach to bring together the variables that you might want to change as you tune a program, as well as the variables you want to copy and paste to an outside program.
Option #7 is the most powerful but requires programming knowledge and work.
P.S. The techniques in this post have been used with Hysys 2004-V7.1 and UniSim 2004-2006, and may not work with older or newer versions.
Edits:
2011-03-23 – Added option #8, Aspen Simulation Workbook