Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

Somewhere in that measure, there's a request to addSupplyBranchForComponent to a PlantLoop; a method which takes a single argument, an object of type HVACComponent. There are 40-odd OpenStudio components that are derived from the general class HVACComponent (e.g. coils, heat pumps), yet Generators (e.g. MicroTurbines) are not one of them.

Somewhere in that measure, there's a request to addSupplyBranchForComponent to a PlantLoop; a method which takes a single argument, an object of type HVACComponent. There are 40-odd OpenStudio components that are derived from the general class HVACComponent (e.g. coils, heat pumps), yet Generators (e.g. MicroTurbinesGeneratorMicroTurbines) are not one of them.

EDIT: Ah! One can instantiate a GeneratorMicroTurbineHeatRecovery by linking it to a previously generated GeneratorMicroTurbine. This (optional) heat recovery component is a type of HVACComponent. So an excerpt of that measure.rb code should look something like:

turbine = OpenStudio::Model::GeneratorMicroTurbine.new(model)
recovery = OpenStudio::Model::GeneratorMicroTurbineHeatRecovery.new(model, turbine)
loop.addSupplyBranchForComponent(recovery)

... or something along those lines.