HCBBS Forum (English)
Submit Chemical Projects / Find Solutions
Amplify Your Requirements on a Broader Chemical Platform *Engineering · Technology · Equipment · Solutions*
Submit Request

Issues with C# calling multiple HYSYS programs and Case Collaboration

2012-12-31 View Original

Thread Content

I have recently created several HYSYS dynamic models, but calculating them all in one file is too slow; therefore, I thought of using a separate HYSYS file for each model (so that multiple HYSYS processes will appear in the task manager during calculation), and then using C# or MATLAB to facilitate real-time data exchange. However, in practice, it turned out that C# can only call these files from within one HYSYS window (only one HYSYS process appears in the task manager), and as a result, the calculation speed was not improved. However, Excel’s ASW can connect to multiple HYSYS programs. Since their principles are likely similar, I would like to ask how C#/Matlab can be used to call multiple HYSYS programs. I’ve attached a snippet of MATLAB code used to call HYSYS; please help identify what’s wrong with it Hysys = actxserver(‘Hysys.Application’)
case1 = invoke(Hysys.SimulationCases, ‘open’, ‘D:\My Documents\1.HSC’)
case2 = invoke(Hysys.SimulationCases, ‘open’, ‘D:\My Documents\2.HSC’)
While studying this issue, I found that the “Case Collaboration” feature in Hysys can achieve this purpose. The documentation states that to use this module, it is necessary to install the “RTI Server software”, a server-based application. Since I don’t have much knowledge in this area, I would like to ask those who have used this feature or who are familiar with RTI how to utilize it. Thank you!
Reply #2 2012-12-31
I remember that HYSYS has a tool that allows for the exchange of pressure and flow boundary data between several dynamic models. Personally, I think running a model in separate instances can lead to confusion over time; it’s better to run them all together and process the calculations gradually. I’ve seen models with 50 million elements still run perfectly well. Adjusting the dynamic settings or the way the devices are configured might help improve the calculation speed.
Reply #3 2012-12-31
Do you still remember which tool it was? I tried using a single file, but it kept crashing; simplifying the model made it less accurate, which is why I thought of processing several models together
Reply #4 2012-12-31
Which transmission module is being referred to on the 2nd floor? To speed up model calculations, I think there are only two ways: 1. Upgrade the hardware by using more powerful and faster computers for the computations ; 2 Simplify the model, for example by minimizing adjustment modules such as trial and error
Reply #5 2012-12-31
The transfer model can only be used in one file. The issue with multiple model executions has been resolved; a ‘singlesue’ command can be used for this purpose, and now calculations are carried out on the server, with one core handling each file, which improves the speed. However, there’s now a problem of asynchronous calculation times for different models – since the calculation speed varies from model to model, it’s necessary to perform a few calculations, exchange data, and then proceed with further calculations, which prevents reaching the original speed. Is there any better solution?
Reply #6 2013-05-27
Does it mean that if HYSYS is not the genuine version, it cannot be called from MATLAB? ? Because I used the ActiveX module of the MATLAB GUI to call HYSYS, and it showed that HYSYS was not authorized
Reply #7 2013-05-27
It is a tool that can support multiple dynamic models running simultaneously; pressure and flow data are transmitted between them through p-f SPEC. I’ll look into it later
Reply #8 2017-01-03
May I ask how many HYSYS programs can be called simultaneously from MATLAB, and how is this achieved?

Submit a Project

**Looking for Chemical Technology, Equipment & Solutions?** No Registration Required Broader Platform Exposure | Global Chemical Service Provider Connections

Submit Request — Free Consultation

Disclaimer

This is an automated machine translation of the original thread. Some technical terms may have inaccuracies; the original text shall prevail. Click "View Original" at the top right to access the source page, which supports IP-based automatic real-time language translation. Please watch out for contact details and sales inducements to prevent fraud. All content and translations are for reference only, representing solely the poster's personal views. For enquiries, email service@hcbbs.com.