General purpose Ruby utilities for OpenStudio Measures or other OpenStudio SDK applications. Compatible with SDK v3.0.0 (or newer) and OpenStudio Application releases distributed by the OpenStudio Coalition.
Add:
gem "osut", git: "https://github.com/rd2/osut", branch: "main"
... in a v2.1 bundled Measure development environment "Gemfile" (or instead as a gemspec dependency), and then run:
bundle install (or 'bundle update')
As a Ruby module, one can access osut by extending a Measure module or class:
require osut
module M
extend OSut
...
end
The logger module oslg is an osut dependency: DEBUG, WARN and/or ERROR messages may be logged by osut, usually as a result of invalid method calls or bad OpenStudio input. Measure developers can (optionally) choose to continue logging messages from within an osut-extended module or class, e.g.:
M.log(OSut::WARN, "Calculated material thickness > 1m")
... and then decide (at any given stage in the Measure) what to log to the OpenStudio runner, vs an automatically-generated results report (e.g. for code compliance), vs a bug report.
Roughly half of the osut methods extract useful zoning information from OpenStudio models (.osm files), e.g.:
- is a given space part of a CONDITIONED thermal zone?
- if CONDITIONED, what are its MIN/MAX heating/cooling setpoint temperatures?
- is it instead a plenum? or otherwise UNCONDITIONED?
Most of these zoning queries are adapted from OpenStudio Standards, providing key inputs to Measures (or gems) such as Thermal Bridging & Derating (or TBD).
The remaining methods deal mainly with constructions & materials, or surface geometry, e.g.:
- what is the calculated R-value of a construction?
- are any layered materials in a construction MASSLESS?
- which one of these layered materials is considered the most insulating?
- what is the total thickness of a standard opaque construction?
- any overlaps between 2x windows in a given wall?
Look up the full osut API here.
OpenStudio-related questions can be posted on UnmetHours.