EnergyPlus crashes while the IDF file is generated in MATLAB

1 次查看(过去 30 天)
Hi there,
I was wondering if anyone could help with this question- which would be greatly appreciated.
I'm generating an idf file using MATLAB (by reading an exisiting template.IDF file, modifying that file, and then saving it as a new test.IDF file). However, the new IDF file crashes, as it is an emty text file! In other words, nothing is copied/saved as the new idf file.
I was suspicious on the Windows 10 Environment pathes. But both MATLAB and EnergyPlus are added to the path and still crashes.
Any ideas would be GREATLY appreciated @Jiri Dostal @Samuel de Vries @Edric Ellis @Behzad Salimian
idfPath = 'C:\EnergyPlusV9-1-0\IDFOffice\Precooling\July\';
idfFileName = 'template';
idfFilePath = strcat(idfPath, idfFileName, '.idf'); %Concatenate strings horizontally
%% Running the template, repacing the template stuctures, and saving it as the new idf file called test.idf
copiedIDFileName = 'test';
copiedIDFFilePath = strcat(idfPath, copiedIDFileName, '.idf');
  1 个评论
Jiri Dostal
Jiri Dostal 2022-4-20
Dear Mohammad, is this related to the EnergyPlus Co-simulation Toolbox (https://www.mathworks.com/matlabcentral/fileexchange/69074-energyplus-co-simulation-toolbox) ?
BR, Jiri

请先登录,再进行评论。

回答(1 个)

Samuel de Vries
Samuel de Vries 2022-4-10
Hi Mohammad,
I don't have enough information on your specific problem to tell you what is going wrong in your script. The part of the code you shared will just make two strings for the two file paths.
I can share the scripts that I use myself to edit energyplus idf's and run them from Matlab scripts. Maybe that helps. See the models you find in this link. Particularly the study in the folder '20200420_TUe_EnergyPlus_ForModelDatabase'. The script 'editMultipleIdfEntries.m' does specifically what you want.
In the overall strudy I start from a template file, make a design space for a large variety of glazing properties, make an IDF for each variant of the design space and simulate all either in series or parallel. Running in parallel might require you to also copy some files from your energyplus install folder into the template directory if you don't work with the exact same version of EP as I was using here. Running in series should work with any version of EP.
The models were made for the IEA SHC Task-56 project. On the project page you also find some information about these models, including a facsheet that shows the overall workflow using Matlab and EnergyPlus.
Gr,
Samuel

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

标签

产品


版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by