First time here? Check out the Help page!
1 | initial version |
It's possible to write a measure to import IDF objects (HVAC, etc) that OpenStudio currently doesn't import natively. If your workflow is dependent on migrating lots of existing IDF to OSMs, this is the route I would take. This answer includes a link to a measure that creates OpenStudio chiller objects from an IDF library of chiller objects, which you could easily extrapolate to other objects. The key parts of that measure are loading the idf into a Workspace with:
library = OpenStudio::Workspace::load("#{File.dirname(__FILE__)}/resources/chiller_library.idf").get
then getting the correct WorkspaceObject with the getObjectByTypeAndName
method. Other 'get' methods that the Workspace class supports are listed here. Finally, the getString
and getDouble
methods take the index of the object input field and return the corresponding string or double value for that field. These are used with the OS 'set' methods to apply the IDF input values to the corresponding OpenStudio model object that you create.