Class: OpenStudio::Model::AirTerminalSingleDuctParallelPIUReheat
- Inherits:
-
Object
- Object
- OpenStudio::Model::AirTerminalSingleDuctParallelPIUReheat
- Defined in:
- lib/openstudio-standards/hvac_sizing/HVACSizing.AirTerminalSingleDuctParallelPIUReheat.rb,
lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctParallelPIUReheat.rb
Overview
open the class to add methods to apply HVAC efficiency standards
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.
-
#autosizedFanOnFlowFraction ⇒ Object
returns the autosized fan on flow fraction as an optional double.
-
#autosizedMaximumPrimaryAirFlowRate ⇒ Object
returns the autosized maximum primary air flow rate as an optional double.
-
#autosizedMaximumSecondaryAirFlowRate ⇒ Object
returns the autosized maximum secondary air flow rate as an optional double.
-
#autosizedMinimumPrimaryAirFlowFraction ⇒ Object
returns the autosized minimum primary air flow fraction as an optional double.
-
#set_performance_rating_method_baseline_fan_power(template) ⇒ Bool
Sets the fan power of a PIU fan based on the W/cfm specified in the standard.
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 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/openstudio-standards/hvac_sizing/HVACSizing.AirTerminalSingleDuctParallelPIUReheat.rb', line 13 def applySizingValues maximum_primary_air_flow_rate = self.autosizedMaximumPrimaryAirFlowRate if maximum_primary_air_flow_rate.is_initialized self.setMaximumPrimaryAirFlowRate(maximum_primary_air_flow_rate.get) end maximum_secondary_air_flow_rate = self.autosizedMaximumSecondaryAirFlowRate if maximum_secondary_air_flow_rate.is_initialized self.setMaximumSecondaryAirFlowRate(maximum_secondary_air_flow_rate.get) end minimum_primary_air_flow_fraction = self.autosizedMinimumPrimaryAirFlowFraction if minimum_primary_air_flow_fraction.is_initialized self.setMinimumPrimaryAirFlowFraction(minimum_primary_air_flow_fraction.get) end fan_on_flow_fraction = self.autosizedFanOnFlowFraction if fan_on_flow_fraction.is_initialized self.setFanOnFlowFraction(fan_on_flow_fraction.get) end end |
#autosize ⇒ Object
Sets all auto-sizeable fields to autosize
6 7 8 |
# File 'lib/openstudio-standards/hvac_sizing/HVACSizing.AirTerminalSingleDuctParallelPIUReheat.rb', line 6 def autosize OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.AirTerminalSingleDuctParallelPIUReheat", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") end |
#autosizedFanOnFlowFraction ⇒ Object
returns the autosized fan on flow fraction as an optional double
60 61 62 63 64 |
# File 'lib/openstudio-standards/hvac_sizing/HVACSizing.AirTerminalSingleDuctParallelPIUReheat.rb', line 60 def autosizedFanOnFlowFraction return self.model.getAutosizedValue(self, 'Design Size Fan On Flow Fraction', '') end |
#autosizedMaximumPrimaryAirFlowRate ⇒ Object
returns the autosized maximum primary air flow rate as an optional double
39 40 41 42 43 |
# File 'lib/openstudio-standards/hvac_sizing/HVACSizing.AirTerminalSingleDuctParallelPIUReheat.rb', line 39 def autosizedMaximumPrimaryAirFlowRate return self.model.getAutosizedValue(self, 'Design Size Maximum Primary Air Flow Rate', 'm3/s') end |
#autosizedMaximumSecondaryAirFlowRate ⇒ Object
returns the autosized maximum secondary air flow rate as an optional double
46 47 48 49 50 |
# File 'lib/openstudio-standards/hvac_sizing/HVACSizing.AirTerminalSingleDuctParallelPIUReheat.rb', line 46 def autosizedMaximumSecondaryAirFlowRate return self.model.getAutosizedValue(self, 'Design Size Maximum Secondary Air Flow Rate', 'm3/s') end |
#autosizedMinimumPrimaryAirFlowFraction ⇒ Object
returns the autosized minimum primary air flow fraction as an optional double
53 54 55 56 57 |
# File 'lib/openstudio-standards/hvac_sizing/HVACSizing.AirTerminalSingleDuctParallelPIUReheat.rb', line 53 def autosizedMinimumPrimaryAirFlowFraction return self.model.getAutosizedValue(self, 'Design Size Minimum Primary Air Flow Fraction', '') end |
#set_performance_rating_method_baseline_fan_power(template) ⇒ Bool
Sets the fan power of a PIU fan based on the W/cfm specified in the standard.
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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctParallelPIUReheat.rb', line 10 def (template) OpenStudio::logFree(OpenStudio::Debug, 'openstudio.model.AirTerminalSingleDuctParallelPIUReheat', "Setting PIU fan power for #{self.name}.") # Determine the fan sizing flow rate, min flow rate, # and W/cfm sec_flow_frac = 0.5 min_flow_frac = 0.3 fan_efficacy_w_per_cfm = 0.35 # case template # when # else # end # Get the maximum flow rate through the terminal max_primary_air_flow_rate = nil if self.autosizedMaximumPrimaryAirFlowRate.is_initialized max_primary_air_flow_rate = self.autosizedMaximumPrimaryAirFlowRate.get elsif self.maximumPrimaryAirFlowRate.is_initialized max_primary_air_flow_rate = self.maximumPrimaryAirFlowRate.get end # Set the max secondary air flow rate max_sec_flow_rate_m3_per_s = max_primary_air_flow_rate * sec_flow_frac self.setMaximumSecondaryAirFlowRate(max_sec_flow_rate_m3_per_s) # Set the minimum flow fraction #TODO Also compare to min OA requirement self.setMinimumPrimaryAirFlowFraction(min_flow_frac) # Set the fan efficacy fan = self.fan.to_FanConstantVolume.get fan_rise_pa = fan.pressureRise fan_rise_in_wc = OpenStudio.convert(fan_rise_pa, "Pa", "inH_{2}O") OpenStudio::logFree(OpenStudio::Debug, 'openstudio.model.AirTerminalSingleDuctParallelPIUReheat', "=> Pressure Rise = #{fan_rise_pa} Pa") max_sec_flow_rate_cfm = OpenStudio.convert(max_sec_flow_rate_m3_per_s, "m^3/s", "ft^3/min").get OpenStudio::logFree(OpenStudio::Debug, 'openstudio.model.AirTerminalSingleDuctParallelPIUReheat', "=> Maximum Fan Flow Rate = #{max_sec_flow_rate_cfm} m3/s") OpenStudio::logFree(OpenStudio::Debug, 'openstudio.model.AirTerminalSingleDuctParallelPIUReheat', "=> Maximum Secondary Air Flow Rate = #{self.maximumSecondaryAirFlowRate.get} m3/s") fan_efficiency = fan.fanEfficiency OpenStudio::logFree(OpenStudio::Debug, 'openstudio.model.AirTerminalSingleDuctParallelPIUReheat', "=> Fan Total Efficiency = #{fan_efficiency}") fan_power_w = fan_rise_pa * max_sec_flow_rate_m3_per_s / fan_efficiency fan_efficacy_calc = fan_power_w / max_sec_flow_rate_m3_per_s OpenStudio::logFree(OpenStudio::Debug, 'openstudio.model.AirTerminalSingleDuctParallelPIUReheat', "=> fan efficacy calculated = #{fan_efficacy_calc} W-s/m3") fan_efficacy_w_per_m3_per_s = fan_efficacy_w_per_cfm * OpenStudio.convert(1, 'm^3/s', 'cfm').get fan_rise_new_pa = fan_efficacy_w_per_m3_per_s * fan_efficiency OpenStudio::logFree(OpenStudio::Debug, 'openstudio.model.AirTerminalSingleDuctParallelPIUReheat', "=> fan pressure rise new = #{fan_rise_new_pa} Pa") fan.setPressureRise(fan_rise_new_pa) fan_power_new_w = fan_rise_new_pa * max_sec_flow_rate_cfm / fan_efficiency fan_efficacy_new_w_per_cfm = fan_power_new_w / max_sec_flow_rate_cfm OpenStudio::logFree(OpenStudio::Debug, 'openstudio.model.AirTerminalSingleDuctParallelPIUReheat', "For #{self.name}: fan efficacy set to #{fan_efficacy_new_w_per_cfm.round(2)} W/cfm, fan bhp = #{fan.brakeHorsepower} hp, motor efficiency = #{fan.motorEfficiency}.") return true end |