Skip to content

HVAC Systems and Components

muh182 edited this page Nov 6, 2014 · 11 revisions

This section provides examples on how to create, get, and set HVAC systems and components.

System 1

# add a system type 1 - PTAC to each zone, using the HVAC templates
hvac = OpenStudio::Model::addSystemType1(self, zones)

To modify the inputs, for example, one can get the plant loops:

plantLoops=getPlantLoops

Then, you can get the heating coil

heating_coil = plantLoops.first.components("OS:Coil:Heating:Water".to_IddObjectType)[0]
heating_coil=heating_coil.to_HVACComponent.get
specificPlantLoop=heating_coil.plantLoop.get        
boiler = plantLoops.first.supplyComponents("OS:Boiler:HotWater".to_IddObjectType)[0]
boiler = boiler.to_BoilerHotWater.get
boiler.setFuelType(boiler_fuel_type)
boiler.setNominalThermalEfficiency(boiler_eff)

Get the Components

There are two methods to get the HVAC components such as fans.

  • Method 1: It is preferable to use this method compared to the second method. In this method, API methods are used to call the fan OpenStudio::Model::FanConstantVolume.
supply_fan = hvac.supplyComponents(OpenStudio::Model::FanConstantVolume::iddObjectType())[0]            
  • Method 2:
supply_fan = hvac.supplyComponents("OS:Fan:ConstantVolume".to_IddObjectType)[0]

Then, user needs to get the fan

supply_fan = supply_fan.to_FanConstantVolume.get