lib/openstudio-standards/standards/Standards.Pump.rb in openstudio-standards-0.3.1.rc1 vs lib/openstudio-standards/standards/Standards.Pump.rb in openstudio-standards-0.3.1.rc2
- old
+ new
@@ -20,20 +20,20 @@
impeller_efficiency = 0.78
# Get flow rate (whether autosized or hard-sized)
flow_m3_per_s = 0
flow_m3_per_s = if pump.to_PumpVariableSpeed.is_initialized || pump.to_PumpConstantSpeed.is_initialized
- if pump.autosizedRatedFlowRate.is_initialized
- pump.autosizedRatedFlowRate.get
- else
+ if pump.ratedFlowRate.is_initialized
pump.ratedFlowRate.get
+ elsif pump.autosizedRatedFlowRate.is_initialized
+ pump.autosizedRatedFlowRate.get
end
elsif pump.to_HeaderedPumpsVariableSpeed.is_initialized || pump.to_HeaderedPumpsConstantSpeed.is_initialized
- if pump.autosizedTotalRatedFlowRate.is_initialized
- pump.autosizedTotalRatedFlowRate.get / pump.numberofPumpsinBank
- else
+ if pump.totalRatedFlowRate.is_initialized
pump.totalRatedFlowRate.get / pump.numberofPumpsinBank
+ elsif pump.autosizedTotalRatedFlowRate.is_initialized
+ pump.autosizedTotalRatedFlowRate.get / pump.numberofPumpsinBank
end
end
flow_gpm = OpenStudio.convert(flow_m3_per_s, 'm^3/s', 'gal/min').get
@@ -176,20 +176,22 @@
# @return [Double] pump power in watts
def pump_pumppower(pump)
# Get flow rate (whether autosized or hard-sized)
flow_m3_per_s = 0
flow_m3_per_s = if pump.to_PumpVariableSpeed.is_initialized || pump.to_PumpConstantSpeed.is_initialized
- if pump.autosizedRatedFlowRate.is_initialized
+ if pump.ratedFlowRate.is_initialized
+ pump.ratedFlowRate.get
+ elsif pump.autosizedRatedFlowRate.is_initialized
pump.autosizedRatedFlowRate.get
else
pump.ratedFlowRate.get
end
elsif pump.to_HeaderedPumpsVariableSpeed.is_initialized || pump.to_HeaderedPumpsConstantSpeed.is_initialized
- if pump.autosizedTotalRatedFlowRate.is_initialized
- pump.autosizedTotalRatedFlowRate.get
- else
+ if pump.totalRatedFlowRate.is_initialized
pump.totalRatedFlowRate.get
+ elsif pump.autosizedTotalRatedFlowRate.is_initialized
+ pump.autosizedTotalRatedFlowRate.get
end
end
# E+ default impeller efficiency
# http://bigladdersoftware.com/epx/docs/8-4/engineering-reference/component-sizing.html#pump-sizing
@@ -221,20 +223,20 @@
def pump_brake_horsepower(pump)
# Get flow rate (whether autosized or hard-sized)
# Get flow rate (whether autosized or hard-sized)
flow_m3_per_s = 0
flow_m3_per_s = if pump.to_PumpVariableSpeed.is_initialized || pump.to_PumpConstantSpeed.is_initialized
- if pump.autosizedRatedFlowRate.is_initialized
- pump.autosizedRatedFlowRate.get
- else
+ if pump.ratedFlowRate.is_initialized
pump.ratedFlowRate.get
+ elsif pump.autosizedRatedFlowRate.is_initialized
+ pump.autosizedRatedFlowRate.get
end
elsif pump.to_HeaderedPumpsVariableSpeed.is_initialized || pump.to_HeaderedPumpsConstantSpeed.is_initialized
- if pump.autosizedTotalRatedFlowRate.is_initialized
- pump.autosizedTotalRatedFlowRate.get
- else
+ if pump.totalRatedFlowRate.is_initialized
pump.totalRatedFlowRate.get
+ elsif pump.autosizedTotalRatedFlowRate.is_initialized
+ pump.autosizedTotalRatedFlowRate.get
end
end
# E+ default impeller efficiency
# http://bigladdersoftware.com/epx/docs/8-4/engineering-reference/component-sizing.html#pump-sizing
@@ -273,13 +275,13 @@
# PumpConstantSpeed, PumpVariableSpeed
# @return [Double] rated power consumption per flow in watts per gpm, W*min/gal
def pump_rated_w_per_gpm(pump)
# Get design power (whether autosized or hard-sized)
rated_power_w = 0
- if pump.autosizedRatedPowerConsumption.is_initialized
- rated_power_w = pump.autosizedRatedPowerConsumption.get
- elsif pump.ratedPowerConsumption.is_initialized
+ if pump.ratedPowerConsumption.is_initialized
rated_power_w = pump.ratedPowerConsumption.get
+ elsif pump.autosizedRatedPowerConsumption.is_initialized
+ rated_power_w = pump.autosizedRatedPowerConsumption.get
else
OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Pump', "For #{pump.name}, could not find rated pump power consumption, cannot determine w per gpm correctly.")
return 0.0
end