Class: OpenStudio::Model::BoilerHotWater
- Inherits:
-
Object
- Object
- OpenStudio::Model::BoilerHotWater
- Defined in:
- lib/openstudio-standards/hvac_sizing/HVACSizing.BoilerHotWater.rb,
lib/openstudio-standards/standards/Standards.BoilerHotWater.rb
Overview
Reopen the OpenStudio class to add methods to apply standards to this object
Instance Method Summary collapse
-
#applySizingValues ⇒ Object
Takes the values calculated by the EnergyPlus sizing routines and puts them into this object model in place of the autosized fields.
-
#autosize ⇒ Object
Sets all auto-sizeable fields to autosize.
-
#autosizedDesignWaterFlowRate ⇒ Object
returns the autosized design water flow rate as an optional double.
-
#autosizedNominalCapacity ⇒ Object
returns the autosized nominal capacity as an optional double.
-
#find_capacity ⇒ Double
find capacity.
-
#find_search_criteria(template) ⇒ Hash
find search criteria.
-
#setStandardEfficiencyAndCurves(template) ⇒ Bool
Applies the standard efficiency ratings and typical performance curves to this object.
-
#standard_minimum_thermal_efficiency(template, standards) ⇒ Double
Finds lookup object in standards and return minimum thermal efficiency.
Instance Method Details
#applySizingValues ⇒ Object
Takes the values calculated by the EnergyPlus sizing routines and puts them into this object model in place of the autosized fields. Must have previously completed a run with sql output for this to work.
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/openstudio-standards/hvac_sizing/HVACSizing.BoilerHotWater.rb', line 13 def applySizingValues nominal_capacity = self.autosizedNominalCapacity if nominal_capacity.is_initialized self.setNominalCapacity(nominal_capacity.get) end design_water_flow_rate = self.autosizedDesignWaterFlowRate if design_water_flow_rate.is_initialized self.setDesignWaterFlowRate(design_water_flow_rate.get) end end |
#autosize ⇒ Object
Sets all auto-sizeable fields to autosize
6 7 8 |
# File 'lib/openstudio-standards/hvac_sizing/HVACSizing.BoilerHotWater.rb', line 6 def autosize OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.BoilerHotWater", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") end |
#autosizedDesignWaterFlowRate ⇒ Object
returns the autosized design water flow rate as an optional double
35 36 37 38 39 |
# File 'lib/openstudio-standards/hvac_sizing/HVACSizing.BoilerHotWater.rb', line 35 def autosizedDesignWaterFlowRate return self.model.getAutosizedValue(self, 'Design Size Design Water Flow Rate', 'm3/s') end |
#autosizedNominalCapacity ⇒ Object
returns the autosized nominal capacity as an optional double
28 29 30 31 32 |
# File 'lib/openstudio-standards/hvac_sizing/HVACSizing.BoilerHotWater.rb', line 28 def autosizedNominalCapacity return self.model.getAutosizedValue(self, 'Design Size Nominal Capacity', 'W') end |
#find_capacity ⇒ Double
find capacity
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/openstudio-standards/standards/Standards.BoilerHotWater.rb', line 43 def find_capacity() # Get the capacity capacity_w = nil capacity_btu_per_hr = nil if self.nominalCapacity.is_initialized capacity_w = self.nominalCapacity.get elsif self.autosizedNominalCapacity.is_initialized capacity_w = self.autosizedNominalCapacity.get else OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.BoilerHotWater', "For #{self.name} capacity is not available, cannot apply efficiency standard.") successfully_set_all_properties = false return successfully_set_all_properties end # Convert capacity to Btu/hr capacity_btu_per_hr = OpenStudio.convert(capacity_w, "W", "Btu/hr").get return capacity_btu_per_hr end |
#find_search_criteria(template) ⇒ Hash
find search criteria
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/openstudio-standards/standards/Standards.BoilerHotWater.rb', line 9 def find_search_criteria(template) # Define the criteria to find the boiler properties # in the hvac standards data set. search_criteria = {} search_criteria['template'] = template # Get fuel type fuel_type = nil case self.fuelType when 'NaturalGas' fuel_type = 'Gas' when 'Electricity' fuel_type = 'Electric' when 'FuelOil#1', 'FuelOil#2' fuel_type = 'Oil' else OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.BoilerHotWater', "For #{self.name}, a fuel type of #{self.fuelType} is not yet supported. Assuming 'Gas.'") fuel_type = 'Gas' end search_criteria['fuel_type'] = fuel_type # Get the fluid type fluid_type = 'Hot Water' search_criteria['fluid_type'] = fluid_type return search_criteria end |
#setStandardEfficiencyAndCurves(template) ⇒ Bool
Applies the standard efficiency ratings and typical performance curves to this object.
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 |
# File 'lib/openstudio-standards/standards/Standards.BoilerHotWater.rb', line 116 def setStandardEfficiencyAndCurves(template) successfully_set_all_properties = false boilers = $os_standards['boilers'] # Define the criteria to find the boiler properties # in the hvac standards data set. search_criteria = {} search_criteria['template'] = template # Get fuel type fuel_type = nil case self.fuelType when 'NaturalGas' fuel_type = 'Gas' when 'Electricity' fuel_type = 'Electric' when 'FuelOil#1', 'FuelOil#2' fuel_type = 'Oil' else OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.BoilerHotWater', "For #{self.name}, a fuel type of #{self.fuelType} is not yet supported. Assuming 'Gas.'") fuel_type = 'Gas' end search_criteria['fuel_type'] = fuel_type # Get the fluid type fluid_type = 'Hot Water' search_criteria['fluid_type'] = fluid_type # Get the capacity capacity_w = nil if self.nominalCapacity.is_initialized capacity_w = self.nominalCapacity.get elsif self.autosizedNominalCapacity.is_initialized capacity_w = self.autosizedNominalCapacity.get else OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.BoilerHotWater', "For #{self.name} capacity is not available, cannot apply efficiency standard.") successfully_set_all_properties = false return successfully_set_all_properties end # Convert capacity to Btu/hr capacity_btu_per_hr = OpenStudio.convert(capacity_w, "W", "Btu/hr").get capacity_kbtu_per_hr = OpenStudio.convert(capacity_w, "W", "kBtu/hr").get # Get the boiler properties blr_props = self.model.find_object(boilers, search_criteria, capacity_btu_per_hr) unless blr_props OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.BoilerHotWater', "For #{self.name}, cannot find boiler properties, cannot apply efficiency standard.") successfully_set_all_properties = false return successfully_set_all_properties end # Make the EFFFPLR curve eff_fplr = self.model.add_curve(blr_props['efffplr']) if eff_fplr self.setNormalizedBoilerEfficiencyCurve(eff_fplr) else OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.BoilerHotWater', "For #{self.name}, cannot find eff_fplr curve, will not be set.") successfully_set_all_properties = false end # Get the minimum efficiency standards thermal_eff = nil # If specified as AFUE unless blr_props['minimum_annual_fuel_utilization_efficiency'].nil? min_afue = blr_props['minimum_annual_fuel_utilization_efficiency'] thermal_eff = afue_to_thermal_eff(min_afue) self.setName("#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_afue} AFUE") OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.BoilerHotWater', "For #{template}: #{self.name}: #{fuel_type} #{fluid_type} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; AFUE = #{min_afue}") end # If specified as thermal efficiency unless blr_props['minimum_thermal_efficiency'].nil? thermal_eff = blr_props['minimum_thermal_efficiency'] self.setName("#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{thermal_eff} Thermal Eff") OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.BoilerHotWater', "For #{template}: #{self.name}: #{fuel_type} #{fluid_type} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; Thermal Efficiency = #{thermal_eff}") end # If specified as combustion efficiency unless blr_props['minimum_combustion_efficiency'].nil? min_comb_eff = blr_props['minimum_combustion_efficiency'] thermal_eff = combustion_eff_to_thermal_eff(min_comb_eff) self.setName("#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_comb_eff} Combustion Eff") OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.BoilerHotWater', "For #{template}: #{self.name}: #{fuel_type} #{fluid_type} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; Combustion Efficiency = #{min_comb_eff}") end # Set the efficiency values unless thermal_eff.nil? self.setNominalThermalEfficiency(thermal_eff) end #puts "capacity_w = #{capacity_w}" # for NECB, check if modulating boiler required # TO DO: logic for 2 stage boilers when heating cap > 176 kW and < 352 kW if template == 'NECB 2011' if capacity_w >= 352000 self.setBoilerFlowMode('LeavingSetpointModulated') self.setMinimumPartLoadRatio(0.25) end end # NECB 2011 return successfully_set_all_properties end |
#standard_minimum_thermal_efficiency(template, standards) ⇒ Double
Finds lookup object in standards and return minimum thermal efficiency
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/openstudio-standards/standards/Standards.BoilerHotWater.rb', line 70 def standard_minimum_thermal_efficiency(template,standards) # Get the boiler properties search_criteria = self.find_search_criteria(template) capacity_kbtu_per_hr = self.find_capacity blr_props = self.model.find_object(standards['boilers'], search_criteria, capacity_kbtu_per_hr) fuel_type = blr_props["fuel_type"] fluid_type = blr_props["fluid_type"] # Get the minimum efficiency standards thermal_eff = nil # If specified as AFUE unless blr_props['minimum_annual_fuel_utilization_efficiency'].nil? min_afue = blr_props['minimum_annual_fuel_utilization_efficiency'] thermal_eff = afue_to_thermal_eff(min_afue) self.setName("#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_afue} AFUE") OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.BoilerHotWater', "For #{template}: #{self.name}: #{fuel_type} #{fluid_type} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; AFUE = #{min_afue}") end # If specified as thermal efficiency unless blr_props['minimum_thermal_efficiency'].nil? thermal_eff = blr_props['minimum_thermal_efficiency'] self.setName("#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{thermal_eff} Thermal Eff") OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.BoilerHotWater', "For #{template}: #{self.name}: #{fuel_type} #{fluid_type} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; Thermal Efficiency = #{thermal_eff}") end # If specified as combustion efficiency unless blr_props['minimum_combustion_efficiency'].nil? min_comb_eff = blr_props['minimum_combustion_efficiency'] thermal_eff = combustion_eff_to_thermal_eff(min_comb_eff) self.setName("#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_comb_eff} Combustion Eff") OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.BoilerHotWater', "For #{template}: #{self.name}: #{fuel_type} #{fluid_type} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; Combustion Efficiency = #{min_comb_eff}") end return thermal_eff end |