Borrar filtros
Borrar filtros

How to do Interface between Aspen Hysys and Matlab and perform Hybrid optimization

42 visualizaciones (últimos 30 días)
Hi
Is there anyone who can me help me please. I am doing LNG plant optimization. To perform the optimization I first did the simulation on Hysys and interface HYSYS with Matlab. The model is still now in steady-state condition. When I am using the compressor outlet pressure as the decision variables, The simulation is working and it can minimize the energy consumption.
But, when I am using the refrigerant mass flow rate or outlet pressure of throttle valves as decision variables, the simulation get's unconverged and the simulation stopped.
In addition to this, when I am using refrigerant mass fraction as decision variables and run the optimization it shows the following error "Invoke Error, Dispatch Exception: No such interface supported"
If I the convert the simulation into dynamic mode, the problem will be solved ?
whenever, i am trying to convert the model into dynamic it's showing that notification in this picture.
  14 comentarios
Rasel Ahmed
Rasel Ahmed el 17 de Mayo de 2021
Hi liang,
I am sharing the codes to interface hysys with matlab, and providing another link of the details code. Have you tried to use mixed refrigerant mass fraction / mass flow as decision variables ?. I am facing some problem that I couldn't change the mixed refrigerant mass fraction values.
MyObject=actxserver('Hysys.Application');
global MySimCase;
FileNamePath = 'C3MR7v6';
MySimCase = MyObject.SimulationCases.Open([cd,strcat('\',...
FileNamePath,'.hsc')]);
MySimCase.Visible = true;
MyOperations = MySimCase.Flowsheet.Operations; % Getting data from our simcase operations
MyFlowSheet = MySimCase.get('flowsheet'); %accessing to flowsheet
MyMaterialStreams = MyFlowSheet.get('MaterialStreams'); %accessing to simulated material streams
MyEnergyStreams = MyFlowSheet.get('EnergyStreams'); % Energy streams
Ting Liang
Ting Liang el 19 de Mayo de 2021
Thanks a lot for your sharing.
Sorry, I am not working on mixed refrigerant, but on air, sorry that I cannot help with your problem now, but hope we can communicate with and help each other more later.
Thanks.
Best regards
Ting Liang

Iniciar sesión para comentar.

Respuestas (1)

bilal kazmi
bilal kazmi el 24 de Dic. de 2020
if you provide any help in this please share some file as iam also in search of specific file
  1 comentario
Rasel Ahmed
Rasel Ahmed el 17 de Mayo de 2021
Hi kazmi,
I am sharing the codes to interface hysys with matlab, and providing another link of the details code. Have you tried to use mixed refrigerant mass fraction / mass flow as decision variables ?. I am facing some problem that I couldn't change the mixed refrigerant mass fraction values.
MyObject=actxserver('Hysys.Application');
global MySimCase;
FileNamePath = 'C3MR7v6';
MySimCase = MyObject.SimulationCases.Open([cd,strcat('\',...
FileNamePath,'.hsc')]);
MySimCase.Visible = true;
MyOperations = MySimCase.Flowsheet.Operations; % Getting data from our simcase operations
MyFlowSheet = MySimCase.get('flowsheet'); %accessing to flowsheet
MyMaterialStreams = MyFlowSheet.get('MaterialStreams'); %accessing to simulated material streams
MyEnergyStreams = MyFlowSheet.get('EnergyStreams'); % Energy streams

Iniciar sesión para comentar.

Categorías

Más información sobre Thermal Analysis en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by