Skip to content

Commit

Permalink
update calculate_fan_power_from_curve
Browse files Browse the repository at this point in the history
  • Loading branch information
yzhou601 committed Jan 3, 2025
1 parent f317c36 commit 5bdc554
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
6 changes: 3 additions & 3 deletions HPXMLtoOpenStudio/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<schema_version>3.1</schema_version>
<name>hpxm_lto_openstudio</name>
<uid>b1543b30-9465-45ff-ba04-1d1f85e763bc</uid>
<version_id>a2189a9a-21c5-4d53-a3e8-2a4fc2139304</version_id>
<version_modified>2025-01-03T20:21:37Z</version_modified>
<version_id>7fcc111a-b955-4915-915b-1782dd485bf7</version_id>
<version_modified>2025-01-03T20:32:45Z</version_modified>
<xml_checksum>D8922A73</xml_checksum>
<class_name>HPXMLtoOpenStudio</class_name>
<display_name>HPXML to OpenStudio Translator</display_name>
Expand Down Expand Up @@ -387,7 +387,7 @@
<filename>hvac.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>F5FE260C</checksum>
<checksum>A5094D87</checksum>
</file>
<file>
<filename>hvac_sizing.rb</filename>
Expand Down
14 changes: 9 additions & 5 deletions HPXMLtoOpenStudio/resources/hvac.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2539,13 +2539,17 @@ def self.create_supply_fan(model, obj_name, fan_watts_per_cfm, fan_cfms, hvac_sy
# @param hvac_system [HPXML::HeatingSystem or HPXML::CoolingSystem or HPXML::HeatPump] The HPXML HVAC system of interest
# @return [Double] Fan power at any speed or mode
def self.calculate_fan_power_from_curve(max_fan_power, fan_ratio, hvac_system)
if hvac_system.fan_motor_type == HPXML::HVACFanMotorTypeBPM
if hvac_system.fan_motor_type.nil?
# For system types that fan_motor_type is not specified, the fan_ratio should be 1
fail 'Missing fan motor type for systems where more than one speed is modeled' unless fan_ratio == 1.0

fan_power = max_fan_power
elsif hvac_system.fan_motor_type == HPXML::HVACFanMotorTypeBPM
# BPM fan
index = hvac_system.distribution_system_idref.nil? ? 3 : 2.75
fan_power = max_fan_power * (fan_ratio**index)
pow = hvac_system.distribution_system_idref.nil? ? 3 : 2.75
fan_power = max_fan_power * (fan_ratio**pow)
else
# PSC fan or fan_motor_type = nil
# For system types that fan_motor_type is not specified, the fan_ratio is 1 and either equation is fine.
# PSC fan
fan_power = max_fan_power * fan_ratio * (0.3 * fan_ratio + 0.7)
end
return fan_power
Expand Down

0 comments on commit 5bdc554

Please sign in to comment.