EnergyPlus crashes while the IDF file is generated in MATLAB

2 views (last 30 days)
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 Comment
Jiri Dostal
Jiri Dostal on 20 Apr 2022
Dear Mohammad, is this related to the EnergyPlus Co-simulation Toolbox (https://www.mathworks.com/matlabcentral/fileexchange/69074-energyplus-co-simulation-toolbox) ?
BR, Jiri

Sign in to comment.

Answers (1)

Samuel de Vries
Samuel de Vries on 10 Apr 2022
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

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Tags

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!