lib/openstudio-standards/hvac_sizing/Siz.HeatingCoolingFuels.rb in openstudio-standards-0.2.14 vs lib/openstudio-standards/hvac_sizing/Siz.HeatingCoolingFuels.rb in openstudio-standards-0.2.15.pre.rc1
- old
+ new
@@ -9,11 +9,11 @@
###### IMPORTANT NOTE ######
class OpenStudio::Model::Model
# Get the heating fuel type of a plant loop
- # @Todo: If no heating equipment is found, check if there's a heat exchanger,
+ # @todo If no heating equipment is found, check if there's a heat exchanger,
# or a WaterHeater:Mixed or stratified that is connected to a heating source on the demand side
def plant_loop_heating_fuels(plant_loop)
fuels = []
# Get the heating fuels for all supply components
# on this plant loop.
@@ -44,11 +44,12 @@
# Check if the heater actually has a capacity (otherwise it's simply a Storage Tank)
if component.heaterMaximumCapacity.empty? || component.heaterMaximumCapacity.get != 0
# If it does, we add the heater Fuel Type
fuels << component.heaterFuelType
- end # @Todo: not sure about whether it should be an elsif or not
+ end
+ # @todo not sure about whether it should be an elsif or not
# Check the plant loop connection on the source side
if component.secondaryPlantLoop.is_initialized
fuels += self.plant_loop_heating_fuels(component.secondaryPlantLoop.get)
end
when 'OS_WaterHeater_Stratified'
@@ -56,11 +57,12 @@
# Check if the heater actually has a capacity (otherwise it's simply a Storage Tank)
if component.heaterMaximumCapacity.empty? || component.heaterMaximumCapacity.get != 0
# If it does, we add the heater Fuel Type
fuels << component.heaterFuelType
- end # @Todo: not sure about whether it should be an elsif or not
+ end
+ # @todo not sure about whether it should be an elsif or not
# Check the plant loop connection on the source side
if component.secondaryPlantLoop.is_initialized
fuels += self.plant_loop_heating_fuels(component.secondaryPlantLoop.get)
end
@@ -266,11 +268,11 @@
fuels += self.coil_heating_fuels(equipment.heatingCoil)
when 'OS_AirTerminal_SingleDuct_ConstantVolume_Reheat'
equipment = equipment.to_AirTerminalSingleDuctConstantVolumeReheat.get
fuels += self.coil_heating_fuels(equipment.reheatCoil)
when 'OS_AirTerminal_SingleDuct_InletSideMixer'
- # TODO
+ # @todo complete method
when 'OS_AirTerminal_SingleDuct_ParallelPIUReheat'
equipment = equipment.to_AirTerminalSingleDuctParallelPIUReheat.get
fuels += self.coil_heating_fuels(equipment.reheatCoil)
when 'OS_AirTerminal_SingleDuct_SeriesPIUReheat'
equipment = equipment.to_AirTerminalSingleDuctSeriesPIUReheat.get
@@ -293,11 +295,17 @@
when 'OS_ZoneHVAC_LowTemperatureRadiant_ConstantFlow'
equipment = equipment.to_ZoneHVACLowTempRadiantConstFlow.get
fuels += self.coil_heating_fuels(equipment.heatingCoil)
when 'OS_ZoneHVAC_LowTemperatureRadiant_VariableFlow'
equipment = equipment.to_ZoneHVACLowTempRadiantVarFlow.get
- fuels += self.coil_heating_fuels(equipment.heatingCoil)
+ if equipment.model.version < OpenStudio::VersionString.new('3.2.0')
+ fuels += self.coil_heating_fuels(equipment.heatingCoil)
+ else
+ if equipment.heatingCoil.is_initialized
+ fuels += self.coil_heating_fuels(equipment.heatingCoil.get)
+ end
+ end
when 'OS_ZoneHVAC_UnitHeater'
equipment = equipment.to_ZoneHVACUnitHeater.get
fuels += self.coil_heating_fuels(equipment.heatingCoil)
when 'OS_ZoneHVAC_UnitVentilator'
equipment = equipment.to_ZoneHVACUnitVentilator.get
@@ -357,10 +365,16 @@
when 'OS_ZoneHVAC_LowTemperatureRadiant_ConstantFlow'
equipment = equipment.to_ZoneHVACLowTempRadiantConstFlow.get
fuels += self.coil_cooling_fuels(equipment.coolingCoil)
when 'OS_ZoneHVAC_LowTemperatureRadiant_VariableFlow'
equipment = equipment.to_ZoneHVACLowTempRadiantVarFlow.get
- fuels += self.coil_cooling_fuels(equipment.coolingCoil)
+ if equipment.model.version < OpenStudio::VersionString.new('3.2.0')
+ fuels += self.coil_cooling_fuels(equipment.coolingCoil)
+ else
+ if equipment.coolingCoil.is_initialized
+ fuels += self.coil_cooling_fuels(equipment.coolingCoil.get)
+ end
+ end
when 'OS_Refrigeration_AirChiller'
fuels << 'Electricity'
when 'OS_ZoneHVAC_IdealLoadsAirSystem'
fuels << 'DistrictCooling'
when 'OS_ZoneHVAC_PackagedTerminalAirConditioner'