That's great, I really appreciate the time you spent on this video. My question is that, is this linking possible through a calculator block of Aspen as well?
Dear Pedram I really appreciate your tutorial. It was very helpful. one question: What should we do if we want to transfer data to Excel with the desired unit? Thank you
Hi, I have a model coded in matlab as a function file, how can I connect it with ASPEN Plus to get all the results and manipulation. Please respnd if you have any idea on that. Thanks
Thank you so much I find your video really helpful!! I have one question, how can I avoid the excel and matlab from restarting every time I reset the simulation ?
Thank you so much. It helps. But when ever I try to reset and rerun the Aspen after Linking the the software to dynamically exchange data(last step), it close the Excel and the Matlab. And the data from the Matlab code is not sent to Excel. Can you advise me what to do please.
If u have done the first two steps with no problem, u should be able to do the last step without a problem. So try do the first two steps sometime we might something. Make sure that all files (Aspen, excel, and matlab function) are in the same folder and the format of Aspen file which u are using is ".bkp". and If u R receiving any error in Aspen plz share here. After all if we still have the same problem I guess u have to Check your license with Aspen.
Hi! Thank you for detailed tutorial. I am trying to adapt your method to ChemCad and I managed to do it to a certain point. However, I am having difficulties in building that macro in VBA. I would appreciate if you could help me with it :)
stream result in excel or Aspen? Answering your question is difficult since I am not sure which part is not able to transfer data! here is an idea 1. inlet data should be sent from Aspen to Excel 2. Then this inlet information should be sent to MATLAB 3. Results should be sent back to Excel 4. Results should be send from excel to Aspen At the end of the video there is a short explanation how to debug the code buy pausing. You need to find out which part for 1 to 4 is not able to transfer data.
the aim of using custom model is to simulate something which Aspen Plus is not capable of doing that. otherwise using the results for custom modeler would be the same as using built-in models available in Aspen Plus.
my MATLAB code is based on mass calculations. So I want the mass flow (instead of the molar flow) to be transferred from ASPEN to Excel. Also the results (from MATLAB to Excel) are based on mass unit(Kg/hr).
There are a few ways such as changing the visual basic codes in Excel file used for usermodel. A short way is: Get each component’s molecular weight (mw) in a stream as a matrix from Aspen. Then write down the values inside your code in MATLAB. Just do that by hands cuz mw is always constant for each component. Multiply the input of your MATLAB function (which is based on molar flow) with mw matrix. Then you will have mass flow or fraction. You can do the same for changing mass flow to molar flow for the output of MATLAB function before sending that to Excel.
Sorry, because of license issues I cannot upload some of files, such as the excel file for user model, provided by Aspen Plus. and I believe it will be more confusing if I upload only some of the files.
Thank you very much! it helped me a lot🥳
That's great, I really appreciate the time you spent on this video. My question is that, is this linking possible through a calculator block of Aspen as well?
Dear Pedram
I really appreciate your tutorial. It was very helpful.
one question:
What should we do if we want to transfer data to Excel with the desired unit?
Thank you
Thank you so much. I'm trying to integrate concentrate solar power systems with Aspen plus for biomass gasification. How can this be done sir?
Hi, I have a model coded in matlab as a function file, how can I connect it with ASPEN Plus to get all the results and manipulation. Please respnd if you have any idea on that. Thanks
Hi! Is it possible to do this matlab excell connection within an excell calculator in ASPEN??
Hello Pedram
Can this apply to HYSYS also?
Thank you
Thank you so much I find your video really helpful!!
I have one question, how can I avoid the excel and matlab from restarting every time I reset the simulation ?
if you mean closing and re-opening it should not happen! make sure that you are using proper formats like .bkp
Thank you so much. It helps. But when ever I try to reset and rerun the Aspen after Linking the the software to dynamically exchange data(last step), it close the Excel and the Matlab. And the data from the Matlab code is not sent to Excel.
Can you advise me what to do please.
If u have done the first two steps with no problem, u should be able to do the last step without a problem. So try do the first two steps sometime we might something. Make sure that all files (Aspen, excel, and matlab function) are in the same folder and the format of Aspen file which u are using is ".bkp". and If u R receiving any error in Aspen plz share here. After all if we still have the same problem I guess u have to Check your license with Aspen.
Hi!
Thank you for detailed tutorial.
I am trying to adapt your method to ChemCad and I managed to do it to a certain point.
However, I am having difficulties in building that macro in VBA.
I would appreciate if you could help me with it :)
Hey the video was very help ful can you send the code presented in pedram.m file im not able to take back output from the matlab function
Hello, when I run my file, the mass flow and mass fractions do not appear in the stream result? what I should do?
stream result in excel or Aspen?
Answering your question is difficult since I am not sure which part is not able to transfer data!
here is an idea
1. inlet data should be sent from Aspen to Excel
2. Then this inlet information should be sent to MATLAB
3. Results should be sent back to Excel
4. Results should be send from excel to Aspen
At the end of the video there is a short explanation how to debug the code buy pausing. You need to find out which part for 1 to 4 is not able to transfer data.
Will the process be the same if we don't use the custom model
the aim of using custom model is to simulate something which Aspen Plus is not capable of doing that. otherwise using the results for custom modeler would be the same as using built-in models available in Aspen Plus.
Hello sir Can you help me how to connect Aspen with comsol
Sir I'm not able to see developer in my excel sheet what to do?
google "where is developer tab in excel!"
my MATLAB code is based on mass calculations. So I want the mass flow (instead of the molar flow) to be transferred from ASPEN to Excel. Also the results (from MATLAB to Excel) are based on mass unit(Kg/hr).
There are a few ways such as changing the visual basic codes in Excel file used for usermodel. A short way is: Get each component’s molecular weight (mw) in a stream as a matrix from Aspen. Then write down the values inside your code in MATLAB. Just do that by hands cuz mw is always constant for each component. Multiply the input of your MATLAB function (which is based on molar flow) with mw matrix. Then you will have mass flow or fraction. You can do the same for changing mass flow to molar flow for the output of MATLAB function before sending that to Excel.
How to transféré code Fortran to VB or MATLAB
Hello sir Can you do same work with python
Thanks for this tutorial!!! Could you please share the files?
Sorry, because of license issues I cannot upload some of files, such as the excel file for user model, provided by Aspen Plus. and I believe it will be more confusing if I upload only some of the files.