lib/openstudio-standards/standards/necb/ECMS/ecms.rb in openstudio-standards-0.6.3 vs lib/openstudio-standards/standards/necb/ECMS/ecms.rb in openstudio-standards-0.7.0.rc1
- old
+ new
@@ -41,15 +41,16 @@
def apply_system_ecm(model:,
ecm_system_name: nil,
template_standard:,
runner: nil,
- primary_heating_fuel: nil,
- swh_fuel: nil,
ecm_system_zones_map_option: 'NECB_Default')
# Do nothing if nil or other usual suspects.. covering all bases for now.
return if ecm_system_name.nil? || ecm_system_name == 'none' || ecm_system_name == 'NECB_Default'
+ # Verify the heating fuel
+ primary_heating_fuel = template_standard.fuel_type_set.ecm_fueltype
+ raise("Heating fuel for ECM #{ecm_system_name} is neither Electricity nor NaturalGas") if ((primary_heating_fuel != 'Electricity') && (primary_heating_fuel != 'NaturalGas'))
ecm_system_zones_map_option = 'NECB_Default' if ecm_system_zones_map_option.nil? || ecm_system_zones_map_option == 'none'
ecm_std = Standard.build('ECMS')
systems = model.getAirLoopHVACs
map_system_to_zones, system_doas_flags = ecm_std.get_map_systems_to_zones(systems)
@@ -67,11 +68,10 @@
ecm_std.send(ecm_add_method_name,
model: model,
system_zones_map: map_system_to_zones,
system_doas_flags: system_doas_flags,
ecm_system_zones_map_option: ecm_system_zones_map_option,
- standard: template_standard,
- heating_fuel: primary_heating_fuel)
+ standard: template_standard)
end
def apply_system_efficiencies_ecm(model:, ecm_system_name: nil, template_standard:)
# Do nothing if nil.
return if ecm_system_name.nil? || ecm_system_name == 'none' || ecm_system_name == 'NECB_Default' || ecm_system_name.to_s.downcase == 'remove_airloops_add_zone_baseboards'