I'm a newbie at Hysys and I'm trying to write an extension (using VB6) to model membrane flow. Most of the program is running but for some values my output streams don't seem to be updating, so while the values calculated in the model display (flowrate and composition), the extra values (such as heat flow, vapour fraction, etc) which hysys would normally calculate, aren't being displayed.
For some inputs it will work but for others it doesn't. For those which don't work, the stream conditions are still valid. There seems to be enough information for Hysys to perform the balance calculation.
I've noticed that when it fails, the property .IsUpToDate is false for the product streams, whereas when it succeeds, this is true. I'm not sure if this is a cause or an effect.
I'm using the following bit of code to perform the balance, but from my debugging it seems like this isn't where my problem lies. I think that when it works it's Hysys filling in the gaps for a fully specified stream as it usually does.
hyContainer.Balance btTotalBalance, 1, hyStrmarray
I checked the manuals and it mentioned the need for a forgetting pass and two calculation passes, but it seems to be doing that ok.
I seem to have been going round in circles for a couple of days now, any suggestions either for solutions or how I can debug it would be greatly appreciated. Hope that makes sense, I'm a little tired
