Skip to content

Commit

Permalink
Merge branch 'master' into AppendixG_Dev
Browse files Browse the repository at this point in the history
  • Loading branch information
dmaddoxwhite authored Sep 24, 2022
2 parents b05c447 + 78295c7 commit 7a77cda
Show file tree
Hide file tree
Showing 198 changed files with 1,370,578 additions and 1,371,313 deletions.
2 changes: 1 addition & 1 deletion lib/openstudio-standards/btap/geometry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3752,7 +3752,7 @@ def self.line_segment_overlap_x_coord(y_check:, point_b1:, point_b2:)
if point_b1[:x] == point_b2[:x]
xcross = point_b2[:x]
# If the line is horizontal you cannot find the y intercept
elsif point_b1[:y] == point_b2[:x]
elsif (point_b1[:y] == point_b2[:y])
raise("This line is horizontal so no y intercept can be found.")
# Otherwise determine the line coefficients and get the intercept
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@
{
"name": "NECB2015_ASHP",
"minimum_capacity": 238840.0,
"maximum_capacity": 9999999.0,
"maximum_capacity": 9999999999.0,
"minimum_seasonal_efficiency": null,
"minimum_full_load_efficiency": 9.5,
"minimum_iplv": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@
{
"name": "NECB2015_ASHP",
"minimum_capacity": 238840.0,
"maximum_capacity": 9999999.0,
"maximum_capacity": 9999999999.0,
"minimum_heating_seasonal_performance_factor": null,
"minimum_coefficient_of_performance_heating": null,
"minimum_energy_efficiency_ratio": 9.2,
Expand Down
35 changes: 24 additions & 11 deletions lib/openstudio-standards/standards/necb/ECMS/data/unitary_acs.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,43 +8,56 @@
{
"name": "Carrier WeatherExpert",
"minimum_capacity": 0.0,
"maximum_capacity": 19044.8,
"minimum_energy_efficiency_ratio": null,
"minimum_seasonal_energy_efficiency_ratio": 17.3,
"maximum_capacity": 17418.7,
"minimum_energy_efficiency_ratio": 12.9,
"minimum_seasonal_energy_efficiency_ratio": null,
"cool_cap_ft": null,
"cool_cap_fflow": null,
"cool_eir_ft": null,
"cool_eir_fflow": null,
"cool_plf_fplr": null,
"notes": "Carrier WeatherExpert 3-5 Nominal Tons average"
"notes": "Carrier WeatherExpert 3-5 Nominal Tons units average EIR (capacities in Watts)"
},
{
"name": "Carrier WeatherExpert",
"minimum_capacity": 19044.8,
"maximum_capacity": 77960.0,
"minimum_capacity": 17418.7,
"maximum_capacity": 34601.5,
"minimum_energy_efficiency_ratio": 13.1,
"minimum_seasonal_energy_efficiency_ratio": null,
"cool_cap_ft": null,
"cool_cap_fflow": null,
"cool_eir_ft": null,
"cool_eir_fflow": null,
"cool_plf_fplr": null,
"notes": "Carrier WeatherExpert 6-10 Nominal Tons average"
"notes": "Carrier WeatherExpert 6-10 Nominal Tons units average EIR (Capacities in Watts)"
},
{
"name": "Carrier WeatherExpert",
"minimum_capacity": 34601.5,
"maximum_capacity": 68904.8,
"minimum_energy_efficiency_ratio": 12.2,
"minimum_seasonal_energy_efficiency_ratio": null,
"cool_cap_ft": null,
"cool_cap_fflow": null,
"cool_eir_ft": null,
"cool_eir_fflow": null,
"cool_plf_fplr": null,
"notes": "Carrier WeatherExpert 12.5-20 Tons units average (Capacities in Watts)"
},
{
"name": "Carrier WeatherExpert",
"minimum_capacity": 77960.0,
"minimum_capacity": 68904.8,
"maximum_capacity": 9999999.0,
"minimum_energy_efficiency_ratio": 12.0,
"minimum_energy_efficiency_ratio": 11.1,
"minimum_seasonal_energy_efficiency_ratio": null,
"cool_cap_ft": null,
"cool_cap_fflow": null,
"cool_eir_ft": null,
"cool_eir_fflow": null,
"cool_plf_fplr": null,
"notes": "Carrier WeatherExpert 12.5-23 Tons average"
"notes": "Carrier WeatherExpert 23 Ton unit (Capacities in Watts)"
}
]
}
}
}
}
28 changes: 13 additions & 15 deletions lib/openstudio-standards/standards/necb/ECMS/erv.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
class ECMS
# This method will add a skeleton erv to all air loops if requested.
def apply_erv_ecm(model:, erv_package: nil)
# This method will set the properties of the ERV. Must be run after the standard efficiency is complete as this will overwrite
# those values. See data/erv.json to view/add different erv packages available.
def apply_erv_ecm_efficiency(model:, erv_package: nil)
# If erv is nil.. do nothing.
return if erv_package.nil? || erv_package == 'none' || erv_package == 'NECB_Default'

Expand All @@ -13,20 +14,17 @@ def apply_erv_ecm(model:, erv_package: nil)
raise("ERV package name #{erv_package} does not exist. must be #{valid} /n Stopping.")
end

# remove all existing ERVs
model.getHeatExchangerAirToAirSensibleAndLatents.each(&:remove) if erv_info['application'] == 'Add_ERVs_To_All_Airloops'
# add ervs
# Adds default erv to all air_loops. This will be changed in the set efficiency methods.
model.getAirLoopHVACs.each { |air_loop| air_loop_hvac_apply_energy_recovery_ventilator(air_loop, nil) } if erv_info['application'] == 'Add_ERVs_To_All_Airloops'
end

# This method will set the properties of the ERV that was added above. Must be run after the standard efficiency is complete as this will overwrite
# those values. See data/erv.json to view/add different erv packages.
def apply_erv_ecm_efficiency(model:, erv_package: nil)
# If erv is nil.. do nothing.
return if erv_package.nil? || erv_package == 'none' || erv_package == 'NECB_Default'
# add ervs if required
model.getAirLoopHVACs.sort.each do |air_loop|
if air_loop.airLoopHVACOutdoorAirSystem.is_initialized
erv = air_loop.airLoopHVACOutdoorAirSystem.get.components.select{|comp| comp.to_HeatExchangerAirToAirSensibleAndLatent.is_initialized}
if (erv.empty? && (erv_info['application'] == 'Add_ERVs_To_All_Airloops'))
air_loop_hvac_apply_energy_recovery_ventilator(air_loop, nil)
end
end
end

# This calls the NECB2011 implementation of the method.
# Apply ecm effectiveness values
model.getHeatExchangerAirToAirSensibleAndLatents.each { |erv| heat_exchanger_air_to_air_sensible_and_latent_apply_effectiveness(erv, erv_package) }
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"province_map": {
"QC": "Quebec",
"NL": "Newfoundland and Labrador",
"NS": "Nova Scotia",
"PE": "Prince Edward Island",
"ON": "Ontario",
"MB": "Manitoba",
"SK": "Saskatchewan",
"AB": "Alberta",
"BC": "British Columbia",
"YT": "Yukon",
"NT": "Northwest Territories",
"NB": "New Brunswick",
"NU": "Nunavut"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ def add_sys3and8_single_zone_packaged_rooftop_unit_with_baseboard_heating_multi_
return true
else
zones.each do |zone|
air_loop = add_system_3_and_8_airloop_multi_speed(heating_coil_type, model, system_data, zone)
add_sys3_and_8_zone_equip(air_loop,
baseboard_type,
hw_loop,
model,
zone)
air_loop = add_system_3_and_8_airloop_multi_speed(heating_coil_type, model, system_data, zone)
end
return true
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ def add_sys3_and_8_zone_equip(air_loop,
hw_loop, model,
zone)
always_on = model.alwaysOnDiscreteSchedule
add_zone_baseboards(baseboard_type: baseboard_type, hw_loop: hw_loop, model: model, zone: zone)
diffuser = OpenStudio::Model::AirTerminalSingleDuctUncontrolled.new(model, always_on)
air_loop.addBranchForZone(zone, diffuser.to_StraightComponent)
add_zone_baseboards(baseboard_type: baseboard_type, hw_loop: hw_loop, model: model, zone: zone)
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,12 @@ def add_sys4_single_zone_make_up_air_unit_with_baseboard_heating(model:,
sizing_zone.setZoneHeatingSizingFactor(system_data[:ZoneHeatingSizingFactor])
# Create a diffuser and attach the zone/diffuser pair to the air loop
# diffuser = OpenStudio::Model::AirTerminalSingleDuctUncontrolled.new(model,always_on)
diffuser = OpenStudio::Model::AirTerminalSingleDuctUncontrolled.new(model, always_on)
air_loop.addBranchForZone(zone, diffuser.to_StraightComponent)
add_zone_baseboards(baseboard_type: baseboard_type,
hw_loop: hw_loop,
model: model,
zone: zone)
diffuser = OpenStudio::Model::AirTerminalSingleDuctUncontrolled.new(model, always_on)
air_loop.addBranchForZone(zone, diffuser.to_StraightComponent)
# zone loop
end
sys_name_pars = {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,19 @@ def add_sys6_multi_zone_built_up_system_with_baseboard_heating(model:,
reheat_coil = OpenStudio::Model::CoilHeatingElectric.new(model, always_on)
end

# Set zone baseboards
add_zone_baseboards(model: model,
zone: zone,
baseboard_type: baseboard_type,
hw_loop: hw_loop)

vav_terminal = OpenStudio::Model::AirTerminalSingleDuctVAVReheat.new(model, always_on, reheat_coil)
air_loop.addBranchForZone(zone, vav_terminal.to_StraightComponent)
# NECB2011 minimum zone airflow setting
vav_terminal.setFixedMinimumAirFlowRate(system_data[:ZoneVAVMinFlowFactorPerFloorArea] * zone.floorArea)
vav_terminal.setMaximumReheatAirTemperature(system_data[:ZoneVAVMaxReheatTemp])
vav_terminal.setDamperHeatingAction(system_data[:ZoneVAVDamperAction])

# Set zone baseboards
add_zone_baseboards(model: model,
zone: zone,
baseboard_type: baseboard_type,
hw_loop: hw_loop)
end
sys_name_pars = {}
sys_name_pars['sys_hr'] = 'none'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ def air_loop_hvac_apply_multizone_vav_outdoor_air_sizing(air_loop_hvac)
# @return [Bool] returns true if an economizer is required, false if not
def air_loop_hvac_economizer_required?(air_loop_hvac)
economizer_required = false

# need a better way to determine if an economizer is needed.
return economizer_required if air_loop_hvac.name.to_s.include? 'Outpatient F1'
return economizer_required if ((air_loop_hvac.name.to_s.include? 'Outpatient F1' ) ||
(air_loop_hvac.sizingSystem.typeofLoadtoSizeOn.to_s == "VentilationRequirement"))

# A big number of btu per hr as the minimum requirement
infinity_btu_per_hr = 999_999_999_999
Expand Down
5 changes: 2 additions & 3 deletions lib/openstudio-standards/standards/necb/NECB2011/necb_2011.rb
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,8 @@ def model_apply_standard(model:,
shw_scale: nil,
output_meters: nil,
airloop_economizer_type: nil,
baseline_system_zones_map_option: nil)
baseline_system_zones_map_option: nil
)

clean_and_scale_model(model: model, rotation_degrees: rotation_degrees, scale_x: scale_x, scale_y: scale_y, scale_z: scale_z)
fdwr_set = convert_arg_to_f(variable: fdwr_set, default: -1)
Expand Down Expand Up @@ -500,8 +501,6 @@ def apply_systems_and_efficiencies(model:,
ecm.apply_system_ecm(model: model, ecm_system_name: ecm_system_name, template_standard: self, primary_heating_fuel: primary_heating_fuel,
ecm_system_zones_map_option: ecm_system_zones_map_option)

# Apply ERV equipment as required.
ecm.apply_erv_ecm(model: model, erv_package: erv_package)
# -------- Performace, Efficiencies, Controls and Sensors ------------
#
# Set code standard equipment charecteristics.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@
"compressor_type": "Centrifugal",
"absorption_type": null,
"variable_speed_drive": null,
"minimum_capacity": 399.99,
"minimum_capacity": 400.0,
"maximum_capacity": 9999.0,
"start_date": "9/9/1919",
"end_date": "2999-09-09T00:00:00+00:00",
Expand All @@ -332,4 +332,4 @@
]
}
}
}
}
Loading

0 comments on commit 7a77cda

Please sign in to comment.