Jump to content



Featured Articles

Check out the latest featured articles.

File Library

Check out the latest downloads available in the File Library.

New Article

Product Viscosity vs. Shear

Featured File

Vertical Tank Selection

New Blog Entry

Low Flow in Pipes- posted in Ankur's blog

0

Import Kvalues From Hysys/unisim To Excel


4 replies to this topic
Share this topic:
| More

#1 Ravinder Samudrala

Ravinder Samudrala

    Junior Member

  • Members
  • 17 posts

Posted 08 July 2017 - 07:33 AM

Good evening All,

Anybody know the VBA syntax for importing KValues from HYSYS /UNISIM to Excell.

Edited by Ravinder Samudrala, 08 July 2017 - 09:54 AM.


#2 Bobby Strain

Bobby Strain

    Gold Member

  • Members
  • 3,529 posts

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



#3 Ravinder Samudrala

Ravinder Samudrala

    Junior Member

  • Members
  • 17 posts

Posted 09 July 2017 - 12:20 AM

Hi Sir, Thank you for your fast response,I found the object in object browser, but unable to make an executable syntax.

#4 serra

serra

    Gold Member

  • Members
  • 310 posts

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.


#5 Bobby Strain

Bobby Strain

    Gold Member

  • Members
  • 3,529 posts

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.





Similar Topics