NatLabRockies / NatLabRockies/OpenStudio
Support running EnergyPlus simulations as part of measure test
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 646
- Forks
- 237
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 10
Description
Enhancement Request
I want to be able to run the IDF file that comes out of an EnergyPlus measure through EnergyPlus. Currently we don't do this and have many situations where measure tests pass, we release, and then later realize the IDF files being made won't run successfully.
Here is one example
https://github.com/NREL/openstudio-load-flexibility-measures-gem/issues/52
Detailed Description
This is already done for OpenStudio models in model measures using a method in the standard gems.
https://github.com/NREL/openstudio-standards/blob/a61ba54ead336dbbd5376a8b0c3f1fb139aaebaa/lib/openstudio-standards/utilities/simulation.rb#L9
Possible Implementation
Code location:
There are a few approaches two this, and they are a few possible places for the code to go. First I'll talk about code placement
- We could update the existing method in standards or make a similar method just for IDF files.
- We can have duplicate code to do this in every measure's test directory and/or test.rb (I really don't like this)
- We can update the OpenStudio CLI to run IDF files, or to support an OSW file with no OSM, and an IDF as starting point
- This could go in the extension gem.
Code approaches:
- Run an OSW through the CLI using WorkflowJSON. This is what the standards method does now (https://github.com/NREL/openstudio-standards/blob/a61ba54ead336dbbd5376a8b0c3f1fb139aaebaa/lib/openstudio-standards/utilities/simulation.rb#L89). Currently to use this approach I need to access a measure that replaces the OSM generate IDF with a custom IDF, and then runs EnergyPlus measures and then EnergyPlus. This is an old "Bring your own IDF" workflow I setup for people who wanted to use OSAF but not OSM models. It is shown here https://github.com/NREL/BESTEST-GSR/blob/main/integration_testing/workflow/600EN_from_idf/workflow.osw#L14-L22
- We can run the EnergyPlus CLI to run an IDF. I used this. for my current use, but it had a few issues. One is that while I could check if SQL file was made I didn't figure out how to confirm if the simulation was successful (I expect that is easy to solve) Another issue is what this didn't run well on the CLI. Not sure if EnergyPlus CLI didn't run, or if it just put the SQL file in unexpected location. I can provide a link to that later, but I modified a copy of the standards method I put into the measure test.rb.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the referenced openstudio-standards utilities/simulation.rb method and the BESTEST-GSR workflow.osw example. Compare the proposed WorkflowJSON and EnergyPlus CLI approaches, including the existing measure test.rb experiment. Done means selecting and implementing a supported way for measure tests to run generated IDF files and verify simulation success.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli, testing-qa, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100