Anybody know the VBA syntax for importing KValues from HYSYS /UNISIM to Excell.
Edited by Ravinder Samudrala, 08 July 2017 - 09:54 AM.
|
Posted 08 July 2017 - 07:33 AM
Edited by Ravinder Samudrala, 08 July 2017 - 09:54 AM.
Posted 08 July 2017 - 09:00 AM
You might find what you need at the AspenTech support site. Or search with the object browser. The values are likely held in an array as compositions are.
Bobby
Posted 09 July 2017 - 12:20 AM
Posted 09 July 2017 - 03:25 AM
do you need K values or fugacities ?
at equilibrium xi*fli=yi*fgi=.... and Ki = yi/xi so you need only X, Y compositions and the compositions of the different phases are exported by almost all simulators...
of course it depends from your application,
for phase equilibria you need fugacities and, in many cases, also derivatives (vs. t, p, z) ),
for solving those problems in Excel I prefer a thermodynamic library (Prode Properties which exports Fg, H, S, V plus derivatives)
but for K values you can simply use X , Y compositions
Edited by serra, 09 July 2017 - 03:57 AM.
Posted 09 July 2017 - 09:31 AM
You can do as Serra suggests and derive K from compositions, or from flows. It should be easy to find the syntax for compositions. Or, go to the support site where there are lots of examples. I haven't used the object browser in a long time, so I can't give you any guidance. I did look briefly, but could not easily locate the property. Are you looking for values for a single stream? Or for each tray in a distillation? There is an Excel property dump for HYSYS called Stream Reporter which should be at the site. You can look for relevant code in the workbook VBA. Search the project for KValue, and you will find how to access it via a backdoor variable. Or the Workbook Dump workbook.
You can find a Unisim customization guide here http://d.scribd.com/...nr9y9xsr3ef.pdf. HYSYS should be the same. You can probably glean your answer with this guide.
Since you found it with the object browser, then it must be exposed to automation. But it is a property associated with either light or heavy liquid phases, or a mix. So you need to explore properties of those phases. If you are looking to extract values from a distillation operation, then it is different. But this is covered in the customization guide. Let us know when you get it right.
Bobby
Edited by Bobby Strain, 10 July 2017 - 12:58 PM.
How To Find K-Values Of A Hydrocarbon Mixture On Aspen Hysys?Started by Guest_Alexis Azamar_* , 08 Apr 2024 |
|
|
||
Extension Reaction Kinetic In HysysStarted by Guest_Ulbert Zsolt_* , 29 Mar 2024 |
|
|
||
Aspen Custom Model Won't Load Into HysysStarted by Guest_SaintLazarus_* , 21 Mar 2024 |
|
|
||
Aspen Hysys SimulationStarted by Guest_amazingspidermean_* , 18 Mar 2024 |
|
|
||
Unisim Dynamics Tech SupportStarted by Guest_Sam161_* , 16 Mar 2024 |
|
|