Class: OpenStudio::Model::HeatExchangerAirToAirSensibleAndLatent
- Inherits:
-
Object
- Object
- OpenStudio::Model::HeatExchangerAirToAirSensibleAndLatent
- Defined in:
- lib/openstudio-standards/prototypes/Prototype.HeatExchangerAirToAirSensibleAndLatent.rb,
lib/openstudio-standards/hvac_sizing/Siz.HeatExchangerAirToAirSensibleAndLatent.rb,
lib/openstudio-standards/standards/Standards.HeatExchangerSensLat.rb
Overview
Reopen the OpenStudio class to add methods to apply standards to this object
Instance Method Summary collapse
-
#apply_efficiency(template) ⇒ Object
Sets the minimum effectiveness of the heat exchanger per the standard.
- #apply_prototype_nominal_electric_power ⇒ Object
-
#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.
-
#autosizedNominalSupplyAirFlowRate ⇒ Object
returns the autosized nominal supply air flow rate as an optional double.
Instance Method Details
#apply_efficiency(template) ⇒ Object
Sets the minimum effectiveness of the heat exchanger per the standard.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/openstudio-standards/standards/Standards.HeatExchangerSensLat.rb', line 5 def apply_efficiency(template) # Assumed to be sensible and latent at all flow min_effct = 0.5 setSensibleEffectivenessat100HeatingAirFlow(min_effct) setLatentEffectivenessat100HeatingAirFlow(min_effct) setSensibleEffectivenessat75HeatingAirFlow(min_effct) setLatentEffectivenessat75HeatingAirFlow(min_effct) setSensibleEffectivenessat100CoolingAirFlow(min_effct) setLatentEffectivenessat100CoolingAirFlow(min_effct) setSensibleEffectivenessat75CoolingAirFlow(min_effct) setLatentEffectivenessat75CoolingAirFlow(min_effct) OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.HeatExchangerAirToAirSensibleAndLatent', "For #{name}: Set sensible and latent effectiveness to #{(min_effct * 100).round}%.") return true end |
#apply_prototype_nominal_electric_power ⇒ Object
4 5 6 7 8 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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/openstudio-standards/prototypes/Prototype.HeatExchangerAirToAirSensibleAndLatent.rb', line 4 def apply_prototype_nominal_electric_power # Get the nominal supply air flow rate supply_air_flow_m3_per_s = nil if nominalSupplyAirFlowRate.is_initialized supply_air_flow_m3_per_s = nominalSupplyAirFlowRate.get elsif autosizedNominalSupplyAirFlowRate.is_initialized supply_air_flow_m3_per_s = autosizedNominalSupplyAirFlowRate.get else # Get the min OA flow rate from the OA # system if the ERV was not on the system during sizing. # This prevents us from having to perform a second sizing run. controller_oa = nil oa_system = nil # Get the air loop air_loop = airLoopHVAC if air_loop.empty? OpenStudio.logFree(OpenStudio::Info, 'openstudio.prototype.HeatExchangerAirToAirSensibleAndLatent', "For #{name}, cannot get the air loop and therefore cannot get the min OA flow.") return false end air_loop = air_loop.get # Get the OA system if air_loop.airLoopHVACOutdoorAirSystem.is_initialized oa_system = air_loop.airLoopHVACOutdoorAirSystem.get controller_oa = oa_system.getControllerOutdoorAir else OpenStudio.logFree(OpenStudio::Info, 'openstudio.prototype.HeatExchangerAirToAirSensibleAndLatent', "For #{name}, cannot find the min OA flow because it has no OA intake.") return false end # Get the min OA flow rate from the OA if controller_oa.minimumOutdoorAirFlowRate.is_initialized supply_air_flow_m3_per_s = controller_oa.minimumOutdoorAirFlowRate.get elsif controller_oa.autosizedMinimumOutdoorAirFlowRate.is_initialized supply_air_flow_m3_per_s = controller_oa.autosizedMinimumOutdoorAirFlowRate.get else OpenStudio.logFree(OpenStudio::Warn, 'openstudio.prototype.HeatExchangerAirToAirSensibleAndLatent', "For #{name}, ERV minimum OA flow rate is not available, cannot apply prototype nominal power assumption.") return false end end # Convert the flow rate to cfm supply_air_flow_cfm = OpenStudio.convert(supply_air_flow_m3_per_s, 'm^3/s', 'cfm').get # Calculate the motor power for the rotatry wheel per: # Power (W) = (Nominal Supply Air Flow Rate (CFM) * 0.3386) + 49.5 # power = (supply_air_flow_cfm * 0.3386) + 49.5 # Calculate the motor power for the rotatry wheel per: # Power (W) = (Minimum Outdoor Air Flow Rate (m^3/s) * 212.5 / 0.5) + (Minimum Outdoor Air Flow Rate (m^3/s) * 162.5 / 0.5) + 50 power = (supply_air_flow_m3_per_s * 212.5 / 0.5) + (supply_air_flow_m3_per_s * 0.9 * 162.5 / 0.5) + 50 OpenStudio.logFree(OpenStudio::Info, 'openstudio.prototype.HeatExchangerAirToAirSensibleAndLatent', "For #{name}, ERV power is calculated to be #{power.round} W, based on a min OA flow of #{supply_air_flow_cfm.round} cfm.") # Set the power for the HX setNominalElectricPower(power) return true end |
#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 |
# File 'lib/openstudio-standards/hvac_sizing/Siz.HeatExchangerAirToAirSensibleAndLatent.rb', line 13 def applySizingValues nominal_supply_air_flow_rate = self.autosizedNominalSupplyAirFlowRate if nominal_supply_air_flow_rate.is_initialized self.setNominalSupplyAirFlowRate(nominal_supply_air_flow_rate.get) end end |
#autosize ⇒ Object
Sets all auto-sizeable fields to autosize
6 7 8 |
# File 'lib/openstudio-standards/hvac_sizing/Siz.HeatExchangerAirToAirSensibleAndLatent.rb', line 6 def autosize OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.HeatExchangerAirToAirSensibleAndLatent", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") end |
#autosizedNominalSupplyAirFlowRate ⇒ Object
returns the autosized nominal supply air flow rate as an optional double
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/openstudio-standards/hvac_sizing/Siz.HeatExchangerAirToAirSensibleAndLatent.rb', line 23 def autosizedNominalSupplyAirFlowRate # In E+ 8.4, (OS 1.9.3 onward) the variable name changed supply_air_flow_rate_name = nil if self.model.version < OpenStudio::VersionString.new('1.9.3') supply_air_flow_rate_name = 'Nominal Supply Air Flow Rate' else supply_air_flow_rate_name = 'Design Size Nominal Supply Air Flow Rate' end return self.model.getAutosizedValue(self, supply_air_flow_rate_name, 'm3/s') end |