Class: BTAPPRE1980

Inherits:
NECB2011 show all
Defined in:
lib/openstudio-standards/standards/necb/BTAPPRE1980/btap_pre1980.rb,
lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_systems.rb,
lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_4.rb,
lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_6.rb,
lib/openstudio-standards/standards/necb/BTAPPRE1980/building_envelope.rb,
lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_3_and_8_single_speed.rb

Overview

This class holds methods that apply NECB2011 rules.

Direct Known Subclasses

BTAP1980TO2010

Constant Summary

Constants inherited from Standard

Standard::STANDARDS_LIST

Instance Attribute Summary

Attributes inherited from NECB2011

#fuel_type_set, #qaqc_data, #space_multiplier_map, #space_type_map, #standards_data, #tbd, #template

Attributes inherited from Standard

#space_multiplier_map, #standards_data, #template

Instance Method Summary collapse

Methods inherited from NECB2011

#add_all_spacetypes_to_model, #add_onespeed_DX_coil, #add_onespeed_htg_DX_coil, #add_ptac_dx_cooling, #add_sys1_unitary_ac_baseboard_heating, #add_sys1_unitary_ac_baseboard_heating_multi_speed, #add_sys1_unitary_ac_baseboard_heating_single_speed, #add_sys2_FPFC_sys5_TPFC, #add_sys3and8_single_zone_packaged_rooftop_unit_with_baseboard_heating, #add_sys3and8_single_zone_packaged_rooftop_unit_with_baseboard_heating_multi_speed, #add_sys6_multi_zone_reference_hp_with_baseboard_heating, #add_system_3_and_8_airloop_multi_speed, #add_zone_baseboards, #adjust_wildcard_spacetype_schedule, #air_loop_hvac_apply_economizer_integration, #air_loop_hvac_apply_energy_recovery_ventilator, #air_loop_hvac_apply_multizone_vav_outdoor_air_sizing, #air_loop_hvac_apply_single_zone_controls, #air_loop_hvac_apply_vav_damper_action, #air_loop_hvac_demand_control_ventilation_required?, #air_loop_hvac_economizer_required?, #air_loop_hvac_enable_unoccupied_fan_shutoff, #air_loop_hvac_motorized_oa_damper_limits, #air_loop_hvac_static_pressure_reset_required?, #air_terminal_single_duct_vav_reheat_set_heating_cap, #apply_auto_zoning, #apply_building_default_constructionset, #apply_default_constructionsets_to_spacetypes, #apply_economizers, #apply_envelope, #apply_kiva_foundation, #apply_limit_fdwr, #apply_loads, #apply_loop_pump_power, #apply_max_fdwr_nrcan, #apply_max_srr_nrcan, #apply_standard_lights, #apply_systems, #apply_systems_and_efficiencies, #apply_thermal_bridging, #apply_weather_data, #are_space_loads_similar?, #are_zone_loads_similar?, #assign_base_sys_name, #assign_contruction_to_adiabatic_surfaces, #auto_size_shw_capacity, #auto_size_shw_pump_head, #auto_system_all_other_spaces, #auto_system_dwelling_units, #auto_system_storage_spaces, #auto_system_wet_spaces, #auto_system_wild_spaces, #auto_zone_all_other_spaces, #auto_zone_dwelling_units, #auto_zone_wet_spaces, #auto_zone_wild_spaces, #boiler_hot_water_apply_efficiency_and_curves, #boiler_hot_water_find_search_criteria, #check_boolean_value, #check_datapoint_weather_folder, #clean_and_scale_model, #coil_cooling_dx_multi_speed_apply_efficiency_and_curves, #coil_dx_heating_type, #coil_heating_dx_single_speed_find_capacity, #coil_heating_gas_apply_efficiency_and_curves, #coil_heating_gas_find_capacity, #coil_heating_gas_find_search_criteria, #coil_heating_gas_multi_stage_apply_efficiency_and_curves, #coil_heating_gas_standard_minimum_thermal_efficiency, #common_air_loop, #convert_arg_to_bool, #convert_arg_to_f, #convert_arg_to_string, #corrupt_standards_database, #create_base_data, #create_ems_to_turn_on_AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed_for_night_cycle, #create_heating_cooling_on_off_availability_schedule, #create_hw_loop_if_required, #create_necb_system, #determine_control_zone, #determine_dominant_necb_schedule_type, #determine_dominant_schedule, #determine_necb_schedule_type, #determine_spacetype_vintage, #distance, #download_and_save_file, #extract_weather_data, #fan_baseline_impeller_efficiency, #fan_constant_volume_apply_prototype_fan_pressure_rise, #fan_standard_minimum_motor_efficiency_and_size, #fan_variable_volume_apply_prototype_fan_pressure_rise, #fan_variable_volume_part_load_fan_power_limitation?, #find_mech_room, #friction_factor, #get_all_spacetype_names, #get_any_number_ppm, #get_climate_zone_index, #get_climate_zone_name, #get_max_space_height_for_space_type, #get_necb_hdd18, #get_necb_spacetype_system_selection, #get_necb_thermal_zone_system_selection, #get_parameters_sidelighting, #get_parameters_skylight, #get_qaqc_table, #get_sql_table_to_json, #get_sql_tables_to_json, #get_standard_constant_value, #get_standards_constant, #get_standards_formula, #get_standards_table, #get_surface_exp_per, #get_weather_file_from_repo, #group_similar_zones_together, #heat_exchanger_air_to_air_sensible_and_latent_apply_effectiveness, #init_qaqc, #is_a_necb_dwelling_unit?, #is_an_necb_storage_space?, #is_an_necb_wet_space?, #is_an_necb_wildcard_space?, #load_building_type_from_library, #load_qaqc_database_new, #look_up_csv_data, #max_fwdr, #merge_recursively, #model_add_construction_set_from_osm, #model_add_constructions, #model_add_daylighting_controls, #model_add_hvac, #model_add_loads, #model_add_schedule, #model_add_swh, #model_apply_sizing_parameters, #model_apply_standard, #model_create_prototype_model, #model_create_thermal_zones, #model_enable_demand_controlled_ventilation, #model_find_climate_zone_set, #necb_design_supply_temp_compliance, #necb_economizer_compliance, #necb_envelope_compliance, #necb_exterior_fenestration_compliance, #necb_exterior_ground_surfaces_compliance, #necb_exterior_opaque_compliance, #necb_hrv_compliance, #necb_hrv_compliance_for_single_airloop, #necb_hrv_compliance_inc_murb, #necb_infiltration_compliance, #necb_plantloop_sanity, #necb_qaqc, #necb_section_test, #necb_space_compliance, #necb_vav_fan_power_compliance, #necb_zone_sizing_compliance, #percentage_difference, #pump_variable_speed_control_type, #qaqc_only, #replace_massless_material_with_std_material, #sanity_check, #scale_model_geometry, #set_boiler_cap_ratios, #set_lighting_per_area, #set_lighting_per_area_led_lighting, #set_necb_external_subsurface_conductance, #set_necb_external_surface_conductance, #set_output_meters, #set_output_variables, #set_random_rendering_color, #set_wildcard_schedules_to_dominant_building_schedule, #set_zones_thermostat_schedule_based_on_space_type_schedules, #setup_chw_loop_with_components, #setup_cw_loop_with_components, #setup_hw_loop_with_components, #space_apply_infiltration_rate, #space_surface_report, #space_type_apply_internal_loads, #store_space_sizing_loads, #stored_space_cooling_load, #stored_space_heating_load, #stored_zone_cooling_load, #stored_zone_heating_load, #surfaces_are_in_contact?, #thermal_zone_demand_control_ventilation_required?, #thermal_zone_get_centroid_per_floor, #three_vertices_same_line_and_dir?, #update_sys_name, #validate_and_upate_space_types, #water_heater_mixed_apply_efficiency, #zone_hvac_component_occupancy_ventilation_control

Methods inherited from Standard

#adjust_sizing_system, #afue_to_thermal_eff, #air_loop_hvac_add_motorized_oa_damper, #air_loop_hvac_adjust_minimum_vav_damper_positions, #air_loop_hvac_adjust_minimum_vav_damper_positions_outpatient, #air_loop_hvac_allowable_system_brake_horsepower, #air_loop_hvac_apply_baseline_fan_pressure_rise, #air_loop_hvac_apply_economizer_integration, #air_loop_hvac_apply_economizer_limits, #air_loop_hvac_apply_energy_recovery_ventilator, #air_loop_hvac_apply_energy_recovery_ventilator_efficiency, #air_loop_hvac_apply_maximum_reheat_temperature, #air_loop_hvac_apply_minimum_vav_damper_positions, #air_loop_hvac_apply_multizone_vav_outdoor_air_sizing, #air_loop_hvac_apply_prm_baseline_controls, #air_loop_hvac_apply_prm_baseline_economizer, #air_loop_hvac_apply_prm_baseline_fan_power, #air_loop_hvac_apply_prm_sizing_temperatures, #air_loop_hvac_apply_single_zone_controls, #air_loop_hvac_apply_standard_controls, #air_loop_hvac_apply_vav_damper_action, #air_loop_hvac_data_center_area_served, #air_loop_hvac_dcv_required_when_erv, #air_loop_hvac_demand_control_ventilation_limits, #air_loop_hvac_demand_control_ventilation_required?, #air_loop_hvac_disable_multizone_vav_optimization, #air_loop_hvac_dx_cooling?, #air_loop_hvac_economizer?, #air_loop_hvac_economizer_limits, #air_loop_hvac_economizer_required?, #air_loop_hvac_economizer_type_allowable?, #air_loop_hvac_enable_demand_control_ventilation, #air_loop_hvac_enable_multizone_vav_optimization, #air_loop_hvac_enable_optimum_start, #air_loop_hvac_enable_supply_air_temperature_reset_delta, #air_loop_hvac_enable_supply_air_temperature_reset_outdoor_temperature, #air_loop_hvac_enable_supply_air_temperature_reset_warmest_zone, #air_loop_hvac_enable_unoccupied_fan_shutoff, #air_loop_hvac_energy_recovery?, #air_loop_hvac_energy_recovery_ventilator_flow_limit, #air_loop_hvac_energy_recovery_ventilator_heat_exchanger_type, #air_loop_hvac_energy_recovery_ventilator_type, #air_loop_hvac_fan_power_limitation_pressure_drop_adjustment_brake_horsepower, #air_loop_hvac_find_design_supply_air_flow_rate, #air_loop_hvac_floor_area_served, #air_loop_hvac_floor_area_served_exterior_zones, #air_loop_hvac_floor_area_served_interior_zones, #air_loop_hvac_get_occupancy_schedule, #air_loop_hvac_get_relief_fan_power, #air_loop_hvac_get_return_fan_power, #air_loop_hvac_get_supply_fan, #air_loop_hvac_get_supply_fan_power, #air_loop_hvac_has_parallel_piu_air_terminals?, #air_loop_hvac_has_simple_transfer_air?, #air_loop_hvac_humidifier_count, #air_loop_hvac_include_cooling_coil?, #air_loop_hvac_include_economizer?, #air_loop_hvac_include_evaporative_cooler?, #air_loop_hvac_include_hydronic_cooling_coil?, #air_loop_hvac_include_unitary_system?, #air_loop_hvac_include_wshp?, #air_loop_hvac_integrated_economizer_required?, #air_loop_hvac_minimum_zone_ventilation_efficiency, #air_loop_hvac_motorized_oa_damper_limits, #air_loop_hvac_motorized_oa_damper_required?, #air_loop_hvac_multi_stage_dx_cooling?, #air_loop_hvac_multizone_vav_optimization_required?, #air_loop_hvac_multizone_vav_system?, #air_loop_hvac_optimum_start_required?, #air_loop_hvac_prm_baseline_economizer_required?, #air_loop_hvac_prm_economizer_type_and_limits, #air_loop_hvac_remove_erv, #air_loop_hvac_remove_motorized_oa_damper, #air_loop_hvac_residential_area_served, #air_loop_hvac_return_air_plenum, #air_loop_hvac_set_minimum_damper_position, #air_loop_hvac_set_vsd_curve_type, #air_loop_hvac_single_zone_controls_num_stages, #air_loop_hvac_standby_mode_occupancy_control, #air_loop_hvac_static_pressure_reset_required?, #air_loop_hvac_supply_air_temperature_reset_required?, #air_loop_hvac_supply_return_exhaust_relief_fans, #air_loop_hvac_system_fan_brake_horsepower, #air_loop_hvac_system_multiplier, #air_loop_hvac_terminal_reheat?, #air_loop_hvac_total_cooling_capacity, #air_loop_hvac_unitary_system?, #air_loop_hvac_unoccupied_fan_shutoff_required?, #air_loop_hvac_unoccupied_threshold, #air_loop_hvac_vav_damper_action, #air_loop_hvac_vav_system?, #air_terminal_single_duct_parallel_piu_reheat_apply_minimum_primary_airflow_fraction, #air_terminal_single_duct_parallel_piu_reheat_apply_prm_baseline_fan_power, #air_terminal_single_duct_parallel_piu_reheat_fan_on_flow_fraction, #air_terminal_single_duct_parallel_reheat_piu_minimum_primary_airflow_fraction, #air_terminal_single_duct_vav_reheat_apply_initial_prototype_damper_position, #air_terminal_single_duct_vav_reheat_apply_minimum_damper_position, #air_terminal_single_duct_vav_reheat_minimum_damper_position, #air_terminal_single_duct_vav_reheat_reheat_type, #air_terminal_single_duct_vav_reheat_set_heating_cap, #apply_lighting_schedule, #apply_limit_to_subsurface_ratio, #boiler_get_eff_fplr, #boiler_hot_water_apply_efficiency_and_curves, #boiler_hot_water_find_capacity, #boiler_hot_water_find_design_water_flow_rate, #boiler_hot_water_find_search_criteria, #boiler_hot_water_standard_minimum_thermal_efficiency, build, #chiller_electric_eir_find_capacity, #chiller_electric_eir_find_search_criteria, #chiller_electric_eir_get_cap_f_t_curve_name, #chiller_electric_eir_get_eir_f_plr_curve_name, #chiller_electric_eir_get_eir_f_t_curve_name, #chiller_electric_eir_standard_minimum_full_load_efficiency, #chw_sizing_control, #coil_cooling_dx_multi_speed_apply_efficiency_and_curves, #coil_cooling_dx_multi_speed_find_capacity, #coil_cooling_dx_multi_speed_standard_minimum_cop, #coil_cooling_dx_single_speed_apply_efficiency_and_curves, #coil_cooling_dx_single_speed_find_capacity, #coil_cooling_dx_single_speed_standard_minimum_cop, #coil_cooling_dx_two_speed_apply_efficiency_and_curves, #coil_cooling_dx_two_speed_find_capacity, #coil_cooling_dx_two_speed_standard_minimum_cop, #coil_cooling_water_to_air_heat_pump_apply_efficiency_and_curves, #coil_cooling_water_to_air_heat_pump_find_capacity, #coil_cooling_water_to_air_heat_pump_standard_minimum_cop, #coil_heating_dx_multi_speed_apply_efficiency_and_curves, #coil_heating_dx_single_speed_apply_defrost_eir_curve_limits, #coil_heating_dx_single_speed_apply_efficiency_and_curves, #coil_heating_dx_single_speed_find_capacity, #coil_heating_dx_single_speed_standard_minimum_cop, #coil_heating_gas_additional_search_criteria, #coil_heating_gas_apply_efficiency_and_curves, #coil_heating_gas_apply_prototype_efficiency, #coil_heating_gas_find_capacity, #coil_heating_gas_multi_stage_apply_efficiency_and_curves, #coil_heating_gas_multi_stage_find_capacity, #coil_heating_gas_multi_stage_find_search_criteria, #coil_heating_water_to_air_heat_pump_apply_efficiency_and_curves, #coil_heating_water_to_air_heat_pump_find_capacity, #coil_heating_water_to_air_heat_pump_standard_minimum_cop, #combustion_eff_to_thermal_eff, #controller_water_coil_set_convergence_limits, #convert_curve_biquadratic, #cooling_tower_single_speed_apply_efficiency_and_curves, #cooling_tower_two_speed_apply_efficiency_and_curves, #cooling_tower_variable_speed_apply_efficiency_and_curves, #cop_heating_to_cop_heating_no_fan, #cop_no_fan_to_eer, #cop_no_fan_to_seer, #cop_to_eer, #cop_to_kw_per_ton, #cop_to_seer, #create_air_conditioner_variable_refrigerant_flow, #create_boiler_hot_water, #create_central_air_source_heat_pump, #create_coil_cooling_dx_single_speed, #create_coil_cooling_dx_two_speed, #create_coil_cooling_water, #create_coil_cooling_water_to_air_heat_pump_equation_fit, #create_coil_heating_dx_single_speed, #create_coil_heating_electric, #create_coil_heating_gas, #create_coil_heating_water, #create_coil_heating_water_to_air_heat_pump_equation_fit, #create_curve_bicubic, #create_curve_biquadratic, #create_curve_cubic, #create_curve_exponent, #create_curve_quadratic, #create_fan_constant_volume, #create_fan_constant_volume_from_json, #create_fan_on_off, #create_fan_on_off_from_json, #create_fan_variable_volume, #create_fan_variable_volume_from_json, #create_fan_zone_exhaust, #create_fan_zone_exhaust_from_json, #define_space_multiplier, #eer_to_cop, #eer_to_cop_no_fan, #ems_friendly_name, #enthalpy_recovery_ratio_design_to_typical_adjustment, #fan_constant_volume_airloop_fan_pressure_rise, #fan_constant_volume_apply_prototype_fan_pressure_rise, #fan_on_off_airloop_or_unitary_fan_pressure_rise, #fan_on_off_apply_prototype_fan_pressure_rise, #fan_variable_volume_airloop_fan_pressure_rise, #fan_variable_volume_apply_prototype_fan_pressure_rise, #fan_variable_volume_cooling_system_type, #fan_variable_volume_part_load_fan_power_limitation?, #fan_variable_volume_part_load_fan_power_limitation_capacity_limit, #fan_variable_volume_part_load_fan_power_limitation_hp_limit, #fan_variable_volume_set_control_type, #fan_zone_exhaust_apply_prototype_fan_pressure_rise, #find_exposed_conditioned_roof_surfaces, #find_exposed_conditioned_vertical_surfaces, #find_highest_roof_centre, #fluid_cooler_apply_minimum_power_per_flow, #get_avg_of_other_zones, #get_default_surface_cons_from_surface_type, #get_fan_object_for_airloop, #get_fan_schedule_for_each_zone, #get_group_heat_types, #get_outdoor_subsurface_ratio, #get_weekday_values_from_8760, #get_wtd_avg_of_other_zones, #headered_pumps_variable_speed_set_control_type, #heat_exchanger_air_to_air_sensible_and_latent_apply_effectiveness, #heat_exchanger_air_to_air_sensible_and_latent_apply_prototype_efficiency, #heat_exchanger_air_to_air_sensible_and_latent_apply_prototype_efficiency_enthalpy_recovery_ratio, #heat_exchanger_air_to_air_sensible_and_latent_apply_prototype_nominal_electric_power, #heat_exchanger_air_to_air_sensible_and_latent_enthalpy_recovery_ratio_to_effectiveness, #heat_exchanger_air_to_air_sensible_and_latent_minimum_effectiveness, #heat_exchanger_air_to_air_sensible_and_latent_prototype_default_fan_efficiency, #hspf_to_cop, #hspf_to_cop_no_fan, #interior_lighting_get_prm_data, #kw_per_ton_to_cop, #load_hvac_map, #load_initial_osm, #load_standards_database, #make_ruleset_sched_from_8760, #make_week_ruleset_sched_from_168, #model_add_baseboard, #model_add_cav, #model_add_central_air_source_heat_pump, #model_add_chw_loop, #model_add_construction, #model_add_construction_set, #model_add_crac, #model_add_crah, #model_add_curve, #model_add_cw_loop, #model_add_data_center_hvac, #model_add_data_center_load, #model_add_daylighting_controls, #model_add_district_ambient_loop, #model_add_doas, #model_add_doas_cold_supply, #model_add_elevator, #model_add_elevators, #model_add_evap_cooler, #model_add_exhaust_fan, #model_add_four_pipe_fan_coil, #model_add_furnace_central_ac, #model_add_ground_hx_loop, #model_add_high_temp_radiant, #model_add_hp_loop, #model_add_hvac, #model_add_hvac_system, #model_add_hw_loop, #model_add_ideal_air_loads, #model_add_low_temp_radiant, #model_add_material, #model_add_minisplit_hp, #model_add_plant_supply_water_temperature_control, #model_add_prm_baseline_system, #model_add_prm_elevators, #model_add_psz_ac, #model_add_psz_vav, #model_add_ptac, #model_add_pthp, #model_add_pvav, #model_add_pvav_pfp_boxes, #model_add_radiant_basic_controls, #model_add_radiant_proportional_controls, #model_add_refrigeration_case, #model_add_refrigeration_compressor, #model_add_refrigeration_system, #model_add_refrigeration_walkin, #model_add_residential_erv, #model_add_residential_ventilator, #model_add_schedule, #model_add_split_ac, #model_add_swh, #model_add_swh_end_uses_by_space, #model_add_transformer, #model_add_typical_exterior_lights, #model_add_typical_refrigeration, #model_add_typical_swh, #model_add_unitheater, #model_add_vav_pfp_boxes, #model_add_vav_reheat, #model_add_vrf, #model_add_water_source_hp, #model_add_waterside_economizer, #model_add_window_ac, #model_add_zone_erv, #model_add_zone_heat_cool_request_count_program, #model_add_zone_ventilation, #model_apply_baseline_exterior_lighting, #model_apply_hvac_efficiency_standard, #model_apply_infiltration_standard, #model_apply_multizone_vav_outdoor_air_sizing, #model_apply_prm_baseline_sizing_schedule, #model_apply_prm_baseline_skylight_to_roof_ratio, #model_apply_prm_baseline_window_to_wall_ratio, #model_apply_prm_construction_types, #model_apply_prm_sizing_parameters, #model_apply_standard_constructions, #model_apply_standard_infiltration, #model_baseline_system_vav_fan_type, #model_create_exterior_lighting_area_length_count_hash, #model_create_multizone_fan_schedule, #model_create_prm_any_baseline_building, #model_create_prm_baseline_building, #model_create_prm_baseline_building_requires_proposed_model_sizing_run, #model_create_prm_baseline_building_requires_vlt_sizing_run, #model_create_prm_proposed_building, #model_create_prm_stable_baseline_building, #model_create_space_type_hash, #model_create_story_hash, #model_cw_loop_cooling_tower_fan_type, #model_differentiate_primary_secondary_thermal_zones, #model_effective_num_stories, #model_elevator_fan_pwr, #model_elevator_lift_power, #model_elevator_lighting_pct_incandescent, #model_eliminate_outlier_zones, #model_find_and_add_construction, #model_find_ashrae_hot_water_demand, #model_find_climate_zone_set, #model_find_icc_iecc_2015_hot_water_demand, #model_find_icc_iecc_2015_internal_loads, #model_find_object, #model_find_objects, #model_find_prototype_floor_area, #model_find_target_eui, #model_find_target_eui_by_end_use, #model_find_water_heater_capacity_volume_and_parasitic, #model_get_baseline_system_type_by_zone, #model_get_building_properties, #model_get_climate_zone_set_from_list, #model_get_construction_properties, #model_get_construction_set, #model_get_district_heating_zones, #model_get_lookup_name, #model_get_or_add_ambient_water_loop, #model_get_or_add_chilled_water_loop, #model_get_or_add_ground_hx_loop, #model_get_or_add_heat_pump_loop, #model_get_or_add_hot_water_loop, #model_is_hvac_autosized, #model_legacy_results_by_end_use_and_fuel_type, #model_make_name, #model_prm_baseline_system_change_fuel_type, #model_prm_baseline_system_groups, #model_prm_baseline_system_number, #model_prm_baseline_system_type, #model_prm_skylight_to_roof_ratio_limit, #model_process_results_for_datapoint, #model_remap_office, #model_remove_external_shading_devices, #model_remove_prm_ems_objects, #model_remove_prm_hvac, #model_remove_unused_resource_objects, #model_set_vav_terminals_to_control_for_outdoor_air, #model_system_outdoor_air_sizing_vrp_method, #model_two_pipe_loop, #model_typical_display_case_zone, #model_typical_hvac_system_type, #model_typical_walkin_zone, #model_validate_standards_spacetypes_in_model, #model_ventilation_method, #model_walkin_freezer_latent_case_credit_curve, #model_zones_with_occ_and_fuel_type, #planar_surface_apply_standard_construction, #plant_loop_adiabatic_pipes_only, #plant_loop_apply_prm_baseline_chilled_water_pumping_type, #plant_loop_apply_prm_baseline_chilled_water_temperatures, #plant_loop_apply_prm_baseline_condenser_water_pumping_type, #plant_loop_apply_prm_baseline_condenser_water_temperatures, #plant_loop_apply_prm_baseline_hot_water_pumping_type, #plant_loop_apply_prm_baseline_hot_water_temperatures, #plant_loop_apply_prm_baseline_pump_power, #plant_loop_apply_prm_baseline_pumping_type, #plant_loop_apply_prm_baseline_temperatures, #plant_loop_apply_prm_number_of_boilers, #plant_loop_apply_prm_number_of_chillers, #plant_loop_apply_prm_number_of_cooling_towers, #plant_loop_apply_standard_controls, #plant_loop_capacity_w_by_maxflow_and_delta_t_forwater, #plant_loop_enable_supply_water_temperature_reset, #plant_loop_find_maximum_loop_flow_rate, #plant_loop_prm_baseline_condenser_water_temperatures, #plant_loop_set_chw_pri_sec_configuration, #plant_loop_supply_water_temperature_reset_required?, #plant_loop_swh_loop?, #plant_loop_swh_system_type, #plant_loop_total_cooling_capacity, #plant_loop_total_floor_area_served, #plant_loop_total_heating_capacity, #plant_loop_total_rated_w_per_gpm, #plant_loop_variable_flow_system?, #prototype_apply_condenser_water_temperatures, #prototype_condenser_water_temperatures, #pump_variable_speed_control_type, #pump_variable_speed_get_control_type, #pump_variable_speed_set_control_type, register_standard, #remove_air_loops, #remove_all_hvac, #remove_all_plant_loops, #remove_all_zone_equipment, #remove_hvac, #remove_plant_loops, #remove_unused_curves, #remove_vrf, #remove_zone_equipment, #rename_air_loop_nodes, #rename_plant_loop_nodes, #safe_load_model, #seer_to_cop, #seer_to_cop_no_fan, #set_maximum_fraction_outdoor_air_schedule, #space_add_daylighting_controls, #space_apply_infiltration_rate, #space_conditioning_category, #space_daylighted_area_window_width, #space_daylighted_areas, #space_daylighting_control_required?, #space_daylighting_fractions_and_windows, #space_get_equip_annual_array, #space_get_loads_for_all_equips, #space_infiltration_rate_75_pa, #space_internal_load_annual_array, #space_occupancy_annual_array, #space_remove_daylighting_controls, #space_set_baseline_daylighting_controls, #space_sidelighting_effective_aperture, #space_skylight_effective_aperture, #space_type_apply_int_loads_prm, #space_type_apply_internal_load_schedules, #space_type_apply_internal_loads, #space_type_apply_rendering_color, #space_type_get_construction_properties, #space_type_get_standards_data, #space_type_light_sch_change, #standard_design_sizing_temperatures, #standards_lookup_table_first, #standards_lookup_table_many, #strip_model, #sub_surface_create_centered_subsurface_from_scaled_surface, #sub_surface_create_scaled_subsurfaces_from_surface, #surface_adjust_fenestration_in_a_surface, #surface_subsurface_ua, #thermal_eff_to_afue, #thermal_eff_to_comb_eff, #thermal_zone_add_exhaust, #thermal_zone_add_exhaust_fan_dcv, #thermal_zone_apply_prm_baseline_supply_temperatures, #thermal_zone_conditioning_category, #thermal_zone_demand_control_ventilation_limits, #thermal_zone_demand_control_ventilation_required?, #thermal_zone_exhaust_fan_dcv_required?, #thermal_zone_fossil_or_electric_type, #thermal_zone_get_annual_operating_hours, #thermal_zone_get_zone_fuels_for_occ_and_fuel_type, #thermal_zone_infer_system_type, #thermal_zone_occupancy_eflh, #thermal_zone_occupancy_type, #thermal_zone_peak_internal_load, #thermal_zone_prm_baseline_cooling_design_supply_temperature, #thermal_zone_prm_baseline_heating_design_supply_temperature, #thermal_zone_prm_lab_delta_t, #thermal_zone_prm_unitheater_design_supply_temperature, #true?, #validate_initial_model, #water_heater_convert_energy_factor_to_thermal_efficiency_and_ua, #water_heater_convert_uniform_energy_factor_to_energy_factor, #water_heater_determine_sub_type, #water_heater_mixed_additional_search_criteria, #water_heater_mixed_apply_efficiency, #water_heater_mixed_apply_prm_baseline_fuel_type, #water_heater_mixed_find_capacity, #water_heater_mixed_get_efficiency_requirement, #zone_hvac_component_apply_prm_baseline_fan_power, #zone_hvac_component_apply_standard_controls, #zone_hvac_component_apply_vestibule_heating_control, #zone_hvac_component_occupancy_ventilation_control, #zone_hvac_component_prm_baseline_fan_efficacy, #zone_hvac_component_vestibule_heating_control_required?, #zone_hvac_get_fan_object, #zone_hvac_model_standby_mode_occupancy_control, #zone_hvac_unoccupied_threshold

Methods included from PrototypeFan

apply_base_fan_variables, #create_fan_by_name, #get_fan_from_standards, #lookup_fan_curve_coefficients_from_json, #prototype_fan_apply_prototype_fan_efficiency

Methods included from CoilDX

#coil_dx_find_search_criteria, #coil_dx_heat_pump?, #coil_dx_heating_type, #coil_dx_subcategory

Methods included from CoolingTower

#cooling_tower_apply_minimum_power_per_flow, #cooling_tower_apply_minimum_power_per_flow_gpm_limit

Methods included from Pump

#pump_apply_prm_pressure_rise_and_motor_efficiency, #pump_apply_standard_minimum_motor_efficiency, #pump_brake_horsepower, #pump_motor_horsepower, #pump_pumppower, #pump_rated_w_per_gpm

Methods included from Fan

#fan_adjust_pressure_rise_to_meet_fan_power, #fan_apply_standard_minimum_motor_efficiency, #fan_baseline_impeller_efficiency, #fan_brake_horsepower, #fan_change_impeller_efficiency, #fan_change_motor_efficiency, #fan_design_air_flow, #fan_fanpower, #fan_motor_horsepower, #fan_rated_w_per_cfm, #fan_small_fan?, #fan_standard_minimum_motor_efficiency_and_size

Constructor Details

#initializeBTAPPRE1980

Returns a new instance of BTAPPRE1980.



7
8
9
10
11
# File 'lib/openstudio-standards/standards/necb/BTAPPRE1980/btap_pre1980.rb', line 7

def initialize
  super()
  @standards_data = load_standards_database_new
  corrupt_standards_database
end

Instance Method Details

#add_exhaust_fan(zone:, model:, name:) ⇒ Object

This adds a zone exhaust fan to the zone passed to it. The flow rate for the exhaust fan is set to the sum of the outdoor air requirements for the spaces in the zone. If the exhaust fan is set to run whenever the supply fan runs.



310
311
312
313
314
315
316
317
318
319
320
321
322
# File 'lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_systems.rb', line 310

def add_exhaust_fan(zone:, model:, name:)
  outdoor_air = 0.0
  zone.spaces.sort.each do |space|
    outdoor_air_rate = space.designSpecificationOutdoorAir.get.outdoorAirFlowperFloorArea
    floor_area = space.floorArea
    outdoor_air += (outdoor_air_rate * floor_area)
  end
  exhaust_fan = OpenStudio::Model::FanZoneExhaust.new(model)
  exhaust_fan.setName(name)
  exhaust_fan.setSystemAvailabilityManagerCouplingMode('Coupled')
  exhaust_fan.setMaximumFlowRate(outdoor_air.to_f)
  exhaust_fan.addToThermalZone(zone)
end

#add_sys3_and_8_zone_equip(air_loop, baseboard_type, hw_loop, model, zone) ⇒ Object



193
194
195
196
197
198
199
200
201
# File 'lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_3_and_8_single_speed.rb', line 193

def add_sys3_and_8_zone_equip(air_loop,
                              baseboard_type,
                              hw_loop, model,
                              zone)
  always_on = model.alwaysOnDiscreteSchedule
  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

#add_sys3and8_single_zone_packaged_rooftop_unit_with_baseboard_heating_single_speed(model:, zones:, heating_coil_type:, baseboard_type:, hw_loop:, new_auto_zoner: true, necb_reference_hp: false, necb_reference_hp_supp_fuel: 'DefaultFuel') ⇒ Object

Some tests still require a simple way to set up a system without sizing.. so we are keeping the auto_zoner flag for this method.



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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# File 'lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_3_and_8_single_speed.rb', line 4

def add_sys3and8_single_zone_packaged_rooftop_unit_with_baseboard_heating_single_speed(model:,
                                                                                       zones:,
                                                                                       heating_coil_type:,
                                                                                       baseboard_type:,
                                                                                       hw_loop:,
                                                                                       new_auto_zoner: true,
                                                                                       necb_reference_hp: false,
                                                                                       necb_reference_hp_supp_fuel: 'DefaultFuel')

  system_data = {}
  system_data[:name] = 'Sys_3_PSZ'
  system_data[:CentralCoolingDesignSupplyAirTemperature] = 13.0
  system_data[:CentralHeatingDesignSupplyAirTemperature] = 43.0
  system_data[:AllOutdoorAirinCooling] = false
  system_data[:AllOutdoorAirinHeating] = false
  system_data[:TypeofLoadtoSizeOn] = 'Sensible'
  system_data[:MinimumSystemAirFlowRatio] = 1.0

  system_data[:PreheatDesignTemperature] = 7.0
  system_data[:PreheatDesignHumidityRatio] = 0.008
  system_data[:PrecoolDesignTemperature] = 13.0
  system_data[:PrecoolDesignHumidityRatio] = 0.008
  system_data[:SizingOption] = 'NonCoincident'
  system_data[:CoolingDesignAirFlowMethod] = 'DesignDay'
  system_data[:CoolingDesignAirFlowRate] = 0.0
  system_data[:HeatingDesignAirFlowMethod] = 'DesignDay'
  system_data[:HeatingDesignAirFlowRate] = 0.0
  system_data[:SystemOutdoorAirMethod] = 'ZoneSum'
  system_data[:CentralCoolingDesignSupplyAirHumidityRatio] = 0.0085
  system_data[:CentralHeatingDesignSupplyAirHumidityRatio] = 0.0080

  # System 3 Zone data
  system_data[:ZoneCoolingDesignSupplyAirTemperatureInputMethod] = 'TemperatureDifference'
  system_data[:ZoneCoolingDesignSupplyAirTemperatureDifference] = 11.0
  system_data[:ZoneHeatingDesignSupplyAirTemperatureInputMethod] = 'TemperatureDifference'
  system_data[:ZoneHeatingDesignSupplyAirTemperatureDifference] = 21.0
  system_data[:SetpointManagerSingleZoneReheatSupplyTempMin] = 13.0
  system_data[:SetpointManagerSingleZoneReheatSupplyTempMax] = 43.0
  system_data[:ZoneDXCoolingSizingFactor] = 1.0
  system_data[:ZoneDXHeatingSizingFactor] = 1.3
  system_data[:ZoneCoolingSizingFactor] = 1.1
  system_data[:ZoneHeatingSizingFactor] = 1.3
  system_data[:MinimumOutdoorDryBulbTemperatureforCompressorOperation] = -10.0

  if new_auto_zoner == true
    # Create system airloop

    # Add Air Loop
    air_loop = add_system_3_and_8_airloop(heating_coil_type,
                                          model,
                                          system_data,
                                          determine_control_zone(zones))
    # Add Zone equipment
    zones.each do |zone| # Zone sizing temperature
      sizing_zone = zone.sizingZone
      sizing_zone.setZoneCoolingDesignSupplyAirTemperatureInputMethod(system_data[:ZoneCoolingDesignSupplyAirTemperatureInputMethod])
      sizing_zone.setZoneCoolingDesignSupplyAirTemperatureDifference(system_data[:ZoneCoolingDesignSupplyAirTemperatureDifference])
      sizing_zone.setZoneHeatingDesignSupplyAirTemperatureInputMethod(system_data[:ZoneHeatingDesignSupplyAirTemperatureInputMethod])
      sizing_zone.setZoneHeatingDesignSupplyAirTemperatureDifference(system_data[:ZoneHeatingDesignSupplyAirTemperatureDifference])
      sizing_zone.setZoneCoolingSizingFactor(system_data[:ZoneCoolingSizingFactor])
      sizing_zone.setZoneHeatingSizingFactor(system_data[:ZoneHeatingSizingFactor])
      add_sys3_and_8_zone_equip(air_loop,
                                baseboard_type,
                                hw_loop,
                                model,
                                zone)
    end
  else
    zones.each do |zone|
      air_loop = add_system_3_and_8_airloop(heating_coil_type, model, system_data, zone)
      add_sys3_and_8_zone_equip(air_loop,
                                baseboard_type,
                                hw_loop,
                                model,
                                zone)
    end
  end

  # Modifying airloop name.
  sys_name_pars = {}
  sys_name_pars['sys_hr'] = 'none'
  sys_name_pars['sys_clg'] = 'dx'
  sys_name_pars['sys_htg'] = heating_coil_type
  sys_name_pars['sys_sf'] = 'cv'
  sys_name_pars['zone_htg'] = baseboard_type
  sys_name_pars['zone_clg'] = 'none'
  sys_name_pars['sys_rf'] = 'none'
  assign_base_sys_name(air_loop,
                       sys_abbr: 'sys_3',
                       sys_oa: 'mixed',
                       sys_name_pars: sys_name_pars)
  return true
end

#add_sys4_single_zone_make_up_air_unit_with_baseboard_heating(model:, zones:, heating_coil_type:, baseboard_type:, hw_loop:, necb_reference_hp: false, necb_reference_hp_supp_fuel: 'DefaultFuel') ⇒ Object



2
3
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
# File 'lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_4.rb', line 2

def add_sys4_single_zone_make_up_air_unit_with_baseboard_heating(model:,
                                                                 zones:,
                                                                 heating_coil_type:,
                                                                 baseboard_type:,
                                                                 hw_loop:,
                                                                 necb_reference_hp:false,
                                                                 necb_reference_hp_supp_fuel:'DefaultFuel')
  system_data = {}
  system_data[:name] = 'Sys_4_PSZ'
  system_data[:CentralCoolingDesignSupplyAirTemperature] = 13.0
  system_data[:CentralHeatingDesignSupplyAirTemperature] = 43.0
  system_data[:AllOutdoorAirinCooling] = false
  system_data[:AllOutdoorAirinHeating] = false
  # Setting system 4 airloops in BTAPPRE1980 and BTAP1980TO2010 buildings to size by ventilation requirement rather
  # than cooling or heating load.
  system_data[:TypeofLoadtoSizeOn] = 'VentilationRequirement'
  system_data[:MinimumSystemAirFlowRatio] = 1.0

  system_data[:PreheatDesignTemperature] = 7.0
  system_data[:PreheatDesignHumidityRatio] = 0.008
  system_data[:PrecoolDesignTemperature] = 13.0
  system_data[:PrecoolDesignHumidityRatio] = 0.008
  system_data[:SizingOption] = 'NonCoincident'
  system_data[:CoolingDesignAirFlowMethod] = 'DesignDay'
  system_data[:CoolingDesignAirFlowRate] = 0.0
  system_data[:HeatingDesignAirFlowMethod] = 'DesignDay'
  system_data[:HeatingDesignAirFlowRate] = 0.0
  system_data[:SystemOutdoorAirMethod] = 'ZoneSum'
  system_data[:CentralCoolingDesignSupplyAirHumidityRatio] = 0.0085
  system_data[:CentralHeatingDesignSupplyAirHumidityRatio] = 0.0080

  # zone
  system_data[:SetpointManagerSingleZoneReheatSupplyTempMax] = 43.0
  system_data[:SetpointManagerSingleZoneReheatSupplyTempMin] = 13.0
  system_data[:ZoneCoolingDesignSupplyAirTemperatureInputMethod] = 'TemperatureDifference'
  system_data[:ZoneCoolingDesignSupplyAirTemperatureDifference] = 11.0
  system_data[:ZoneHeatingDesignSupplyAirTemperatureInputMethod] = 'TemperatureDifference'
  system_data[:ZoneHeatingDesignSupplyAirTemperatureDifference] = 21.0
  system_data[:ZoneCoolingSizingFactor] = 1.1
  system_data[:ZoneHeatingSizingFactor] = 1.3

  # System Type 4: PSZ-AC
  # This measure creates:
  # -a constant volume packaged single-zone A/C unit
  # for each zone in the building; DX cooling with
  # heating coil: fuel-fired or electric, depending on argument heating_coil_type
  # heating_coil_type choices are "Electric", "Gas"
  # zone baseboards: hot water or electric, depending on argument baseboard_type
  # baseboard_type choices are "Hot Water" or "Electric"
  # boiler_fueltype choices match OS choices for Boiler component fuel type, i.e.
  # "NaturalGas","Electricity","PropaneGas","FuelOilNo1","FuelOilNo2","Coal","Diesel","Gasoline","OtherFuel1"
  # NOTE: This is the same as system type 3 (single zone make-up air unit and single zone rooftop unit are both PSZ systems)
  # SHOULD WE COMBINE sys3 and sys4 into one script?
  #
  # control_zone = determine_control_zone(zones)
  # Todo change this when control zone method is working.
  control_zone = zones.first

  always_on = model.alwaysOnDiscreteSchedule

  # Create a PSZ for each zone
  # TO DO: need to apply this system to space types:
  # (1) automotive area: repair/parking garage, fire engine room, indoor truck bay
  # (2) supermarket/food service: food preparation with kitchen hood/vented appliance
  # (3) warehouse area (non-refrigerated spaces)

  air_loop = common_air_loop(model: model, system_data: system_data)
  air_loop.setName("#{system_data[:name]}_#{control_zone.name}")

  # Zone sizing temperature
  sizing_zone = control_zone.sizingZone
  sizing_zone.setZoneCoolingDesignSupplyAirTemperatureInputMethod(system_data[:ZoneCoolingDesignSupplyAirTemperatureInputMethod])
  sizing_zone.setZoneCoolingDesignSupplyAirTemperatureDifference(system_data[:ZoneCoolingDesignSupplyAirTemperatureDifference])
  sizing_zone.setZoneHeatingDesignSupplyAirTemperatureInputMethod(system_data[:ZoneHeatingDesignSupplyAirTemperatureInputMethod])
  sizing_zone.setZoneHeatingDesignSupplyAirTemperatureDifference(system_data[:ZoneHeatingDesignSupplyAirTemperatureDifference])
  sizing_zone.setZoneCoolingSizingFactor(system_data[:ZoneCoolingSizingFactor])
  sizing_zone.setZoneHeatingSizingFactor(system_data[:ZoneHeatingSizingFactor])

  fan = OpenStudio::Model::FanConstantVolume.new(model, always_on)

  if heating_coil_type == 'Electric' # electric coil
    htg_coil = OpenStudio::Model::CoilHeatingElectric.new(model, always_on)
  end

  if heating_coil_type == 'Gas'
    htg_coil = OpenStudio::Model::CoilHeatingGas.new(model, always_on)
  end

  # TO DO: other fuel-fired heating coil types? (not available in OpenStudio/E+ - may need to play with efficiency to mimic other fuel types)

  # Set up DX coil with NECB performance curve characteristics;

  clg_coil = add_onespeed_DX_coil(model, always_on)
  clg_coil.setName('CoilCoolingDXSingleSpeed_dx')

  # oa_controller
  oa_controller = OpenStudio::Model::ControllerOutdoorAir.new(model)
  oa_controller.autosizeMinimumOutdoorAirFlowRate

  # Set mechanical ventilation controller outdoor air to ZoneSum (used to be defaulted to ZoneSum but now should be
  # set explicitly)
  oa_controller.controllerMechanicalVentilation.setSystemOutdoorAirMethod('ZoneSum')

  # oa_system
  oa_system = OpenStudio::Model::AirLoopHVACOutdoorAirSystem.new(model, oa_controller)

  # Add the components to the air loop
  # in order from closest to zone to furthest from zone
  supply_inlet_node = air_loop.supplyInletNode
  fan.addToNode(supply_inlet_node)
  htg_coil.addToNode(supply_inlet_node)
  clg_coil.addToNode(supply_inlet_node)
  oa_system.addToNode(supply_inlet_node)

  # Add a setpoint manager single zone reheat to control the
  # supply air temperature based on the needs of this zone
  setpoint_mgr_single_zone_reheat = OpenStudio::Model::SetpointManagerSingleZoneReheat.new(model)
  setpoint_mgr_single_zone_reheat.setControlZone(control_zone)
  setpoint_mgr_single_zone_reheat.setMinimumSupplyAirTemperature(system_data[:SetpointManagerSingleZoneReheatSupplyTempMin])
  setpoint_mgr_single_zone_reheat.setMaximumSupplyAirTemperature(system_data[:SetpointManagerSingleZoneReheatSupplyTempMax])
  setpoint_mgr_single_zone_reheat.addToNode(air_loop.supplyOutletNode)

  # Create sensible heat exchanger
  #              heat_exchanger = BTAP::Resources::HVAC::Plant::add_hrv(model)
  #              heat_exchanger.setSensibleEffectivenessat100HeatingAirFlow(0.5)
  #              heat_exchanger.setSensibleEffectivenessat75HeatingAirFlow(0.5)
  #              heat_exchanger.setSensibleEffectivenessat100CoolingAirFlow(0.5)
  #              heat_exchanger.setSensibleEffectivenessat75CoolingAirFlow(0.5)
  #              heat_exchanger.setLatentEffectivenessat100HeatingAirFlow(0.0)
  #              heat_exchanger.setLatentEffectivenessat75HeatingAirFlow(0.0)
  #              heat_exchanger.setLatentEffectivenessat100CoolingAirFlow(0.0)
  #              heat_exchanger.setLatentEffectivenessat75CoolingAirFlow(0.0)
  #              heat_exchanger.setSupplyAirOutletTemperatureControl(false)
  #
  #              Connect heat exchanger
  #              oa_node = oa_system.outboardOANode
  #              heat_exchanger.addToNode(oa_node.get)

  exhaust_fan_name = 'Sys_4_zone_exhaust_fan'
  zones.each do |zone|
    sizing_zone = zone.sizingZone
    sizing_zone.setZoneCoolingDesignSupplyAirTemperatureInputMethod(system_data[:ZoneCoolingDesignSupplyAirTemperatureInputMethod])
    sizing_zone.setZoneCoolingDesignSupplyAirTemperatureDifference(system_data[:ZoneCoolingDesignSupplyAirTemperatureDifference])
    sizing_zone.setZoneHeatingDesignSupplyAirTemperatureInputMethod(system_data[:ZoneHeatingDesignSupplyAirTemperatureInputMethod])
    sizing_zone.setZoneHeatingDesignSupplyAirTemperatureDifference(system_data[:ZoneHeatingDesignSupplyAirTemperatureDifference])
    sizing_zone.setZoneCoolingSizingFactor(system_data[:ZoneCoolingSizingFactor])
    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)
    add_exhaust_fan(zone: zone, model: model, name: exhaust_fan_name)
  end
  # zone loop

  # Modifying airloop name
  sys_name_pars = {}
  sys_name_pars['sys_hr'] = 'none'
  sys_name_pars['sys_clg'] = 'dx'
  sys_name_pars['sys_htg'] = heating_coil_type
  sys_name_pars['sys_sf'] = 'cv'
  sys_name_pars['zone_htg'] = baseboard_type
  sys_name_pars['zone_clg'] = 'none'
  sys_name_pars['sys_rf'] = 'none'
  assign_base_sys_name(air_loop,
                       sys_abbr: 'sys_4',
                       sys_oa: 'mixed',
                       sys_name_pars: sys_name_pars)

  return true
end

#add_sys6_multi_zone_built_up_system_with_baseboard_heating(model:, zones:, heating_coil_type:, baseboard_type:, chiller_type:, fan_type:, hw_loop:) ⇒ Object

end add_sys4_single_zone_make_up_air_unit_with_baseboard_heating



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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# File 'lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_6.rb', line 4

def add_sys6_multi_zone_built_up_system_with_baseboard_heating(model:,
                                                               zones:,
                                                               heating_coil_type:,
                                                               baseboard_type:,
                                                               chiller_type:,
                                                               fan_type:,
                                                               hw_loop:)
  # System Type 6: VAV w/ Reheat
  # This measure creates:
  # a single hot water loop with a natural gas or electric boiler or for the building
  # a single chilled water loop with water cooled chiller for the building
  # a single condenser water loop for heat rejection from the chiller
  # a VAV system w/ hot water or electric heating, chilled water cooling, and
  # hot water or electric reheat for each story of the building
  # Arguments:
  # "boiler_fueltype" choices match OS choices for boiler fuel type:
  # "NaturalGas","Electricity","PropaneGas","FuelOilNo1","FuelOilNO2","Coal","Diesel","Gasoline","OtherFuel1"
  # "heating_coil_type": "Electric" or "Hot Water"
  # "baseboard_type": "Electric" and "Hot Water"
  # "chiller_type": "Scroll";"Centrifugal";""Screw";"Reciprocating"
  # "fan_type": "AF_or_BI_rdg_fancurve";"AF_or_BI_inletvanes";"fc_inletvanes";"var_speed_drive"
  #
  system_data = {}
  system_data[:name] = 'Sys_6_VAV with Reheat'
  system_data[:CentralCoolingDesignSupplyAirTemperature] = 13.0
  system_data[:CentralHeatingDesignSupplyAirTemperature] = 20.0
  system_data[:AllOutdoorAirinCooling] = false
  system_data[:AllOutdoorAirinHeating] = false
  system_data[:MinimumSystemAirFlowRatio] = 0.3

  # zone data
  system_data[:max_system_supply_air_temperature] = 43.0
  system_data[:min_system_supply_air_temperature] = 13.0
  system_data[:ZoneCoolingDesignSupplyAirTemperatureInputMethod] = 'TemperatureDifference'
  system_data[:ZoneCoolingDesignSupplyAirTemperatureDifference] = 11.0
  system_data[:ZoneHeatingDesignSupplyAirTemperatureInputMethod] = 'TemperatureDifference'
  system_data[:ZoneHeatingDesignSupplyAirTemperatureDifference] = 21.0
  system_data[:ZoneCoolingSizingFactor] = 1.1
  system_data[:ZoneHeatingSizingFactor] = 1.3
  system_data[:ZoneVAVMinFlowFactorPerFloorArea] = 0.002
  system_data[:ZoneVAVMaxReheatTemp] = 43.0
  system_data[:ZoneVAVDamperAction] = 'Normal'

  always_on = model.alwaysOnDiscreteSchedule

  # Chilled Water Plant

  chw_loop = OpenStudio::Model::PlantLoop.new(model)
  chiller1, chiller2 = setup_chw_loop_with_components(model, chw_loop, chiller_type)

  # Condenser System

  cw_loop = OpenStudio::Model::PlantLoop.new(model)
  ctower = setup_cw_loop_with_components(model, cw_loop, chiller1, chiller2)

  # Make a Packaged VAV w/ PFP Boxes for each story of the building
  model.getBuildingStorys.sort.each do |story|
    unless (OpenstudioStandards::Geometry.building_story_get_thermal_zones(story) & zones).empty?

      air_loop = common_air_loop(model: model, system_data: system_data)
      air_loop.setName('Sys_6_VAV with Reheat')

      supply_fan = OpenStudio::Model::FanVariableVolume.new(model, always_on)
      supply_fan.setName('Sys6 Supply Fan')
      return_fan = OpenStudio::Model::FanVariableVolume.new(model, always_on)
      return_fan.setName('Sys6 Return Fan')

      if heating_coil_type == 'Hot Water'
        htg_coil = OpenStudio::Model::CoilHeatingWater.new(model, always_on)
        hw_loop.addDemandBranchForComponent(htg_coil)
      end
      if heating_coil_type == 'Electric'
        htg_coil = OpenStudio::Model::CoilHeatingElectric.new(model, always_on)
      end

      clg_coil = OpenStudio::Model::CoilCoolingWater.new(model, always_on)
      chw_loop.addDemandBranchForComponent(clg_coil)

      oa_controller = OpenStudio::Model::ControllerOutdoorAir.new(model)
      oa_controller.autosizeMinimumOutdoorAirFlowRate

      # Set mechanical ventilation controller outdoor air to ZoneSum (used to be defaulted to ZoneSum but now should be
      # set explicitly)
      oa_controller.controllerMechanicalVentilation.setSystemOutdoorAirMethod('ZoneSum')

      oa_system = OpenStudio::Model::AirLoopHVACOutdoorAirSystem.new(model, oa_controller)

      # Add the components to the air loop
      # in order from closest to zone to furthest from zone
      supply_inlet_node = air_loop.supplyInletNode
      supply_outlet_node = air_loop.supplyOutletNode
      supply_fan.addToNode(supply_inlet_node)
      htg_coil.addToNode(supply_inlet_node)
      clg_coil.addToNode(supply_inlet_node)
      oa_system.addToNode(supply_inlet_node)
      returnAirNode = oa_system.returnAirModelObject.get.to_Node.get
      return_fan.addToNode(returnAirNode)

      # Add a setpoint manager to control the supply air.  The controller will set the supply air to be the warmest
      # that can still meet the cooling load of the warmest thermal zone it services.  This differs from the NECB
      # which uses a constant 13 C supply air temperature.
      # sat_sch = OpenStudio::Model::ScheduleRuleset.new(model)
      # sat_sch.setName('Supply Air Temp')
      # sat_sch.defaultDaySchedule.setName('Supply Air Temp Default')
      # sat_sch.defaultDaySchedule.addValue(OpenStudio::Time.new(0, 24, 0, 0), system_data[:system_supply_air_temperature])
      # sat_stpt_manager = OpenStudio::Model::SetpointManagerScheduled.new(model, sat_sch)
      sat_stpt_manager = OpenStudio::Model::SetpointManagerWarmest.new(model)
      sat_stpt_manager.setMaximumSetpointTemperature(system_data[:max_system_supply_air_temperature])
      sat_stpt_manager.setMinimumSetpointTemperature(system_data[:min_system_supply_air_temperature])
      sat_stpt_manager.addToNode(supply_outlet_node)

      # Make a VAV terminal with HW reheat for each zone on this story that is in intersection with the zones array.
      # and hook the reheat coil to the HW loop
      (OpenstudioStandards::Geometry.building_story_get_thermal_zones(story) & zones).each do |zone|
        # Zone sizing parameters
        sizing_zone = zone.sizingZone
        sizing_zone.setZoneCoolingDesignSupplyAirTemperatureInputMethod(system_data[:ZoneCoolingDesignSupplyAirTemperatureInputMethod])
        sizing_zone.setZoneCoolingDesignSupplyAirTemperatureDifference(system_data[:ZoneCoolingDesignSupplyAirTemperatureDifference])
        sizing_zone.setZoneHeatingDesignSupplyAirTemperatureInputMethod(system_data[:ZoneHeatingDesignSupplyAirTemperatureInputMethod])
        sizing_zone.setZoneHeatingDesignSupplyAirTemperatureDifference(system_data[:ZoneHeatingDesignSupplyAirTemperatureDifference])
        sizing_zone.setZoneCoolingSizingFactor(system_data[:ZoneCoolingSizingFactor])
        sizing_zone.setZoneHeatingSizingFactor(system_data[:ZoneHeatingSizingFactor])

        if heating_coil_type == 'Hot Water'
          reheat_coil = OpenStudio::Model::CoilHeatingWater.new(model, always_on)
          hw_loop.addDemandBranchForComponent(reheat_coil)
        elsif heating_coil_type == 'Electric'
          reheat_coil = OpenStudio::Model::CoilHeatingElectric.new(model, always_on)
        end

        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

      # Modifying airloop name.
      sys_name_pars = {}
      sys_name_pars['sys_hr'] = 'none'
      sys_name_pars['sys_htg'] = heating_coil_type
      sys_name_pars['sys_clg'] = 'Chilled Water'
      sys_name_pars['sys_sf'] = 'vv'
      sys_name_pars['zone_htg'] = baseboard_type
      sys_name_pars['zone_clg'] = 'none'
      sys_name_pars['sys_rf'] = 'vv'
      assign_base_sys_name(air_loop,
                           sys_abbr: 'sys_6',
                           sys_oa: 'mixed',
                           sys_name_pars: sys_name_pars)
    end
  end
  # next story

  # for debugging
  # puts "end add_sys6_multi_zone_built_up_with_baseboard_heating"

  return true
end

#add_system_3_and_8_airloop(heating_coil_type, model, system_data, control_zone) ⇒ Object



98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
# File 'lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_3_and_8_single_speed.rb', line 98

def add_system_3_and_8_airloop(heating_coil_type, model, system_data, control_zone)
  # System Type 3: PSZ-AC
  # This measure creates:
  # -a constant volume packaged single-zone A/C unit
  # for each zone in the building; DX cooling with
  # heating coil: fuel-fired or electric, depending on argument heating_coil_type
  # heating_coil_type choices are "Electric", "Gas", "DX"
  # zone baseboards: hot water or electric, depending on argument baseboard_type
  # baseboard_type choices are "Hot Water" or "Electric"
  # boiler_fueltype choices match OS choices for Boiler component fuel type, i.e.
  # "NaturalGas","Electricity","PropaneGas","FuelOilNo1","FuelOilNo2","Coal","Diesel","Gasoline","OtherFuel1"
  # For BTAPPRE1980 (and BTAP1980TO2010 which is created from BTAPPRE1980) add a constant speed return fan

  always_on = model.alwaysOnDiscreteSchedule
  air_loop = common_air_loop(model: model, system_data: system_data)
  air_loop.setName("#{system_data[:name]} #{control_zone.name}")

  # Zone sizing temperature
  sizing_zone = control_zone.sizingZone
  sizing_zone.setZoneCoolingDesignSupplyAirTemperatureInputMethod(system_data[:ZoneCoolingDesignSupplyAirTemperatureInputMethod])
  sizing_zone.setZoneCoolingDesignSupplyAirTemperatureDifference(system_data[:ZoneCoolingDesignSupplyAirTemperatureDifference])
  sizing_zone.setZoneHeatingDesignSupplyAirTemperatureInputMethod(system_data[:ZoneHeatingDesignSupplyAirTemperatureInputMethod])
  sizing_zone.setZoneHeatingDesignSupplyAirTemperatureDifference(system_data[:ZoneHeatingDesignSupplyAirTemperatureDifference])
  sizing_zone.setZoneCoolingSizingFactor(system_data[:ZoneCoolingSizingFactor])
  sizing_zone.setZoneHeatingSizingFactor(system_data[:ZoneHeatingSizingFactor])

  fan = OpenStudio::Model::FanConstantVolume.new(model, always_on)

  # Create a return fan for BTAPPRE1980 system 3 systems
  return_fan = OpenStudio::Model::FanConstantVolume.new(model, always_on)
  return_fan.setName('Sys3 Return Fan')
  return_fan.setEndUseSubcategory('Return_Fan')

  case heating_coil_type
  when 'Electric' # electric coil
    htg_coil = OpenStudio::Model::CoilHeatingElectric.new(model, always_on)
  when 'Gas'
    htg_coil = OpenStudio::Model::CoilHeatingGas.new(model, always_on)
  when 'DX'
    htg_coil = OpenStudio::Model::CoilHeatingDXSingleSpeed.new(model)
    supplemental_htg_coil = OpenStudio::Model::CoilHeatingElectric.new(model, always_on)
    htg_coil.setMinimumOutdoorDryBulbTemperatureforCompressorOperation(system_data[:MinimumOutdoorDryBulbTemperatureforCompressorOperation])
    sizing_zone.setZoneHeatingSizingFactor(system_data[:ZoneDXHeatingSizingFactor])
    sizing_zone.setZoneCoolingSizingFactor(system_data[:ZoneDXCoolingSizingFactor])
  else
    raise("#{heating_coil_type} is not a valid heating coil type.)")
  end

  # TO DO: other fuel-fired heating coil types? (not available in OpenStudio/E+ - may need to play with efficiency to mimic other fuel types)

  # Set up DX coil with NECB performance curve characteristics;
  clg_coil = OpenStudio::Model::CoilCoolingDXSingleSpeed.new(model)
  clg_coil.setName('CoilCoolingDXSingleSpeed_dx')

  # oa_controller
  oa_controller = OpenStudio::Model::ControllerOutdoorAir.new(model)
  oa_controller.autosizeMinimumOutdoorAirFlowRate

  # Set mechanical ventilation controller outdoor air to ZoneSum (used to be defaulted to ZoneSum but now should be
  # set explicitly)
  oa_controller.controllerMechanicalVentilation.setSystemOutdoorAirMethod('ZoneSum')

  # oa_system
  oa_system = OpenStudio::Model::AirLoopHVACOutdoorAirSystem.new(model, oa_controller)

  # Add the components to the air loop
  # in order from closest to zone to furthest from zone
  supply_inlet_node = air_loop.supplyInletNode
  if heating_coil_type == 'DX'
    air_to_air_heatpump = OpenStudio::Model::AirLoopHVACUnitaryHeatPumpAirToAir.new(model, always_on, fan, htg_coil, clg_coil, supplemental_htg_coil)
    air_to_air_heatpump.setName("#{control_zone.name} ASHP")
    air_to_air_heatpump.setControllingZone(control_zone)
    air_to_air_heatpump.setSupplyAirFanOperatingModeSchedule(always_on)
    air_to_air_heatpump.addToNode(supply_inlet_node)
  else
    fan.addToNode(supply_inlet_node)
    htg_coil.addToNode(supply_inlet_node)
    clg_coil.addToNode(supply_inlet_node)
  end
  oa_system.addToNode(supply_inlet_node)

  # Find return air node and add a return air fan to it for BTAPPRE1980 system 3 airloops.
  returnAirNode = oa_system.returnAirModelObject.get.to_Node.get
  return_fan.addToNode(returnAirNode)

  # Add a setpoint manager single zone reheat to control the
  # supply air temperature based on the needs of this zone
  setpoint_mgr_single_zone_reheat = OpenStudio::Model::SetpointManagerSingleZoneReheat.new(model)
  setpoint_mgr_single_zone_reheat.setControlZone(control_zone)
  setpoint_mgr_single_zone_reheat.setMinimumSupplyAirTemperature(system_data[:SetpointManagerSingleZoneReheatSupplyTempMin])
  setpoint_mgr_single_zone_reheat.setMaximumSupplyAirTemperature(system_data[:SetpointManagerSingleZoneReheatSupplyTempMax])
  setpoint_mgr_single_zone_reheat.addToNode(air_loop.supplyOutletNode)
  return air_loop
end

#air_loop_hvac_energy_recovery_ventilator_required?(air_loop_hvac, climate_zone) ⇒ Boolean

Check if ERV is required on this airloop.

Returns:

  • (Boolean)

    Returns true if required, false if not.



6
7
8
9
10
# File 'lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_systems.rb', line 6

def air_loop_hvac_energy_recovery_ventilator_required?(air_loop_hvac, climate_zone)
  # Do not apply ERV to BTAPPRE1980 buildings.
  erv_required = false
  return erv_required
end

#apply_fdwr_srr_daylighting(model:, fdwr_set: -2.0,, srr_set: -2.0,, necb_hdd: true) ⇒ Object

Thermal zones need to be set to determine conditioned spaces when applying fdwr and srr limits.

# fdwr_set/srr_set settings:
# 0-1:  Remove all windows/skylights and add windows/skylights to match this fdwr/srr
# -1:  Remove all windows/skylights and add windows/skylights to match max fdwr/srr from NECB
# -2:  Do not apply any fdwr/srr changes, leave windows/skylights alone (also works for fdwr/srr > 1)
# -3:  Use old method which reduces existing window/skylight size (if necessary) to meet maximum NECB fdwr/srr
# limit
# <-3.1:  Remove all the windows/skylights
# > 1:  Do nothing


56
57
58
59
60
61
62
63
64
# File 'lib/openstudio-standards/standards/necb/BTAPPRE1980/btap_pre1980.rb', line 56

def apply_fdwr_srr_daylighting(model:, fdwr_set: -2.0, srr_set: -2.0, necb_hdd: true)
  fdwr_set = -2.0 if (fdwr_set == 'NECB_default') || fdwr_set.nil? || (fdwr_set.to_f.round(0) == -1.0)
  srr_set = -2.0 if (srr_set == 'NECB_default') || srr_set.nil? || (srr_set.to_f.round(0) == -1.0)
  fdwr_set = fdwr_set.to_f
  srr_set = srr_set.to_f
  apply_standard_window_to_wall_ratio(model: model, fdwr_set: fdwr_set, necb_hdd: true)
  apply_standard_skylight_to_roof_ratio(model: model, srr_set: srr_set)
  # model_add_daylighting_controls(model) # to be removed after refactor.
end

#apply_pump_impeller_efficiency(pump:, motor_eff:) ⇒ Object

Set the pump design shaft power per unit flow rate per unit head to incorporate total pump efficiency (adjusted for motor efficiency).



220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
# File 'lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_systems.rb', line 220

def apply_pump_impeller_efficiency(pump:, motor_eff:)
  # Get the pump efficiency table from the pump_efficiencies.json
  pump_data = @standards_data['pump_combined_eff']
  pump_info = nil
  # Go through the components of the plant loop the plant is attached to.  Find the type of plant loop based on the
  # equipment in it (e.g. it is a hot water loop if the loop contains a boiler supply component).  Once we know the
  # type of plant loop get the combined pump efficiency from pump_data
  pump.plantLoop.get.supplyComponents.each do |comp|
    obj_type = comp.iddObjectType.valueName.to_s
    break if pump_info == pump_data.find { |plant_pump| plant_pump['components'].find { |component| component.include?(obj_type) } }
  end

  return if pump_info.nil?

  # DesignShaftPowerPerUnitFlowRatePerUnitHead seems to be the inverse of an efficiency so get the inverse efficiency
  # by dividing the motor efficiency from the total pump efficiency.
  inv_impeller_eff = motor_eff / pump_info['comb_eff'].to_f
  pump.setDesignShaftPowerPerUnitFlowRatePerUnitHead(inv_impeller_eff)
end

#apply_standard_construction_properties(model:, runner: nil, ext_wall_cond: nil, ext_floor_cond: nil, ext_roof_cond: nil, ground_wall_cond: nil, ground_floor_cond: nil, ground_roof_cond: nil, door_construction_cond: nil, fixed_window_cond: nil, glass_door_cond: nil, overhead_door_cond: nil, skylight_cond: nil, glass_door_solar_trans: nil, fixed_wind_solar_trans: nil, skylight_solar_trans: nil, necb_hdd: true) ⇒ Boolean

Go through the default construction sets and hard-assigned constructions. Clone the existing constructions and set their intended surface type and standards construction type per the PRM. For some standards, this will involve making modifications. For others, it will not.

90.1-2007, 90.1-2010, 90.1-2013

Returns:

  • (Boolean)

    returns true if successful, false if not



161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
# File 'lib/openstudio-standards/standards/necb/BTAPPRE1980/building_envelope.rb', line 161

def apply_standard_construction_properties(
  model:,
  runner: nil,
  ext_wall_cond: nil,
  ext_floor_cond: nil,
  ext_roof_cond: nil,
  ground_wall_cond: nil,
  ground_floor_cond: nil,
  ground_roof_cond: nil,
  door_construction_cond: nil,
  fixed_window_cond: nil,
  glass_door_cond: nil,
  overhead_door_cond: nil,
  skylight_cond: nil,
  glass_door_solar_trans: nil,
  fixed_wind_solar_trans: nil,
  skylight_solar_trans: nil,
  necb_hdd: true
)
  # this call should be removed for a more general application.
  model.getDefaultConstructionSets.sort.each do |set|
    # Set the SHGC of the default glazing material before making new constructions based on it and changing U-values.
    assign_SHGC_to_windows(model: model, default_construction_set: set, necb_hdd: necb_hdd)
  end
  super(model: model,
        runner: runner,
        ext_wall_cond: ext_wall_cond,
        ext_floor_cond: ext_floor_cond,
        ext_roof_cond: ext_roof_cond,
        ground_wall_cond: ground_wall_cond,
        ground_floor_cond: ground_floor_cond,
        ground_roof_cond: ground_roof_cond,
        door_construction_cond: door_construction_cond,
        fixed_window_cond: fixed_window_cond,
        glass_door_cond: glass_door_cond,
        overhead_door_cond: overhead_door_cond,
        skylight_cond: skylight_cond,
        glass_door_solar_trans: glass_door_solar_trans,
        fixed_wind_solar_trans: fixed_wind_solar_trans,
        skylight_solar_trans: skylight_solar_trans,
        necb_hdd: necb_hdd)
end

#apply_standard_efficiencies(model:, sizing_run_dir:, dcv_type: 'NECB_Default', necb_reference_hp: false) ⇒ Object



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/openstudio-standards/standards/necb/BTAPPRE1980/btap_pre1980.rb', line 66

def apply_standard_efficiencies(model:, sizing_run_dir:, dcv_type: 'NECB_Default', necb_reference_hp:false)
  raise('validation of model failed.') unless validate_initial_model(model)

  climate_zone = 'NECB HDD Method'
  raise("sizing run 1 failed! check #{sizing_run_dir}") if model_run_sizing_run(model, "#{sizing_run_dir}/plant_loops") == false

  # This is needed for NECB2011 as a workaround for sizing the reheat boxes
  model.getAirTerminalSingleDuctVAVReheats.each { |iobj| air_terminal_single_duct_vav_reheat_set_heating_cap(iobj) }
  # Apply the prototype HVAC assumptions
  model_apply_prototype_hvac_assumptions(model, nil, climate_zone)
  # Apply the HVAC efficiency standard
  sql_db_vars_map = {}
  model_apply_hvac_efficiency_standard(model, climate_zone, sql_db_vars_map: sql_db_vars_map)
  model_enable_demand_controlled_ventilation(model, dcv_type)
  model_apply_existing_building_fan_performance(model: model)
  return sql_db_vars_map
end

#apply_standard_skylight_to_roof_ratio(model:, srr_set: -1.0)) ⇒ Object

Reduces the SRR to the values specified by the PRM. SRR reduction will be done by shrinking vertices toward the centroid.



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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# File 'lib/openstudio-standards/standards/necb/BTAPPRE1980/building_envelope.rb', line 28

def apply_standard_skylight_to_roof_ratio(model:, srr_set: -1.0)
  # If srr_set is between 1.0 and 1.2 set it to the maximum allowed by the NECB.  If srr_set is between 0.0 and 1.0
  # apply whatever was passed.  If srr_set >= 1.2 then set the existing srr of the building to be the necb maximum
  # only if the the srr exceeds this maximum (otherwise leave it to be whatever was modeled).

  # srr_set settings:
  # 0-1:  Remove all skylights and add skylights to match this srr
  # -1:  Remove all skylights and add skylights to match max srr from NECB
  # -2:  Do not apply any srr changes, leave skylights alone (also works for srr > 1)
  # -3:  Use old method which reduces existing skylight size (if necessary) to meet maximum NECB skylight limit
  # <-3.1:  Remove all the skylights
  # > 1:  Do nothing

  return if srr_set.to_f > 1.0
  return apply_max_srr_nrcan(model: model, srr_lim: srr_set.to_f) if srr_set.to_f >= 0.0 && srr_set <= 1.0

  # No skylights set for BTAPPRE1980 buildings.
  return if srr_set.to_f >= -1.1 && srr_set <= -0.9
  return if srr_set.to_f >= -2.1 && srr_set <= -1.9
  return apply_max_srr_nrcan(model: model, srr_lim: srr_set.to_f) if srr_set < -3.1

  # Continue with the rest of this method, use old method which reduces existing skylight size (if necessary) to
  # meet maximum srr limit
  return unless srr_set.to_f >= -3.1 && srr_set <= -2.9

  # SRR limit
  srr_lim = get_standards_constant('skylight_to_roof_ratio_max_value') * 100.0

  # Loop through all spaces in the model, and
  # per the PNNL PRM Reference Manual, find the areas
  # of each space conditioning category (res, nonres, semi-heated)
  # separately.  Include space multipliers.
  nr_wall_m2 = 0.001 # Avoids divide by zero errors later
  nr_sky_m2 = 0
  res_wall_m2 = 0.001
  res_sky_m2 = 0
  sh_wall_m2 = 0.001
  sh_sky_m2 = 0
  total_roof_m2 = 0.001
  total_subsurface_m2 = 0
  model.getSpaces.sort.each do |space|
    # Loop through all surfaces in this space
    wall_area_m2 = 0
    sky_area_m2 = 0
    space.surfaces.sort.each do |surface|
      # Skip non-outdoor surfaces
      next unless surface.outsideBoundaryCondition == 'Outdoors'

      # Skip non-walls
      next unless surface.surfaceType == 'RoofCeiling'

      # This wall's gross area (including skylight area)
      wall_area_m2 += surface.grossArea * space.multiplier
      # Subsurfaces in this surface
      surface.subSurfaces.sort.each do |ss|
        sky_area_m2 += ss.netArea * space.multiplier
      end
    end

    # Determine the space category
    cat = 'NonRes'
    if OpenstudioStandards::Space.space_residential?(space)
      cat = 'Res'
    end
    # if space.is_semiheated
    # cat = 'Semiheated'
    # end

    # Add to the correct category
    case cat
    when 'NonRes'
      nr_wall_m2 += wall_area_m2
      nr_sky_m2 += sky_area_m2
    when 'Res'
      res_wall_m2 += wall_area_m2
      res_sky_m2 += sky_area_m2
    when 'Semiheated'
      sh_wall_m2 += wall_area_m2
      sh_sky_m2 += sky_area_m2
    end
    total_roof_m2 += wall_area_m2
    total_subsurface_m2 += sky_area_m2
  end

  # Calculate the SRR of each category
  srr_nr = ((nr_sky_m2 / nr_wall_m2) * 100).round(1)
  srr_res = ((res_sky_m2 / res_wall_m2) * 100).round(1)
  srr_sh = ((sh_sky_m2 / sh_wall_m2) * 100).round(1)
  srr = ((total_subsurface_m2 / total_roof_m2) * 100.0).round(1)
  OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.Model', "The skylight to roof ratios (SRRs) are: NonRes: #{srr_nr.round}%, Res: #{srr_res.round}%.")

  # Check against SRR limit
  red_nr = srr_nr > srr_lim
  red_res = srr_res > srr_lim
  red_sh = srr_sh > srr_lim

  # Stop here unless windows need reducing
  return true unless srr > srr_lim

  OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.Model', "Reducing the size of all windows (by raising sill height) to reduce window area down to the limit of #{srr_lim.round}%.")
  # Determine the factors by which to reduce the window / door area
  mult = srr_lim / srr

  # Reduce the subsurface areas
  model.getSpaces.sort.each do |space|
    # Loop through all surfaces in this space
    space.surfaces.sort.each do |surface|
      # Skip non-outdoor surfaces
      next unless surface.outsideBoundaryCondition == 'Outdoors'
      # Skip non-walls
      next unless surface.surfaceType == 'RoofCeiling'

      # Subsurfaces in this surface
      surface.subSurfaces.sort.each do |ss|
        # Reduce the size of the subsurface
        red = 1.0 - mult
        OpenstudioStandards::Geometry.sub_surface_reduce_area_by_percent_by_shrinking_toward_centroid(ss, red)
      end
    end
  end

  return true
end

#apply_standard_window_to_wall_ratio(model:, fdwr_set: -1.0,, necb_hdd: true) ⇒ Object

Reduces the WWR to the values specified by the NECB NECB 3.2.1.4



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/openstudio-standards/standards/necb/BTAPPRE1980/building_envelope.rb', line 4

def apply_standard_window_to_wall_ratio(model:, fdwr_set: -1.0, necb_hdd: true)
  # NECB FDWR limit
  hdd = get_necb_hdd18(model: model, necb_hdd: necb_hdd)

  # Get the maximum NECB fdwr
  # fdwr_set settings:
  # 0-1:  Remove all windows and add windows to match this fdwr
  # -1:  Remove all windows and add windows to match max fdwr from NECB
  # -2:  Do not apply any fdwr changes, leave windows alone (also works for fdwr > 1)
  # -3:  Use old method which reduces existing window size (if necessary) to meet maximum NECB fdwr limit
  # <-3.1:  Remove all the windows
  # > 1:  Do nothing

  return if fdwr_set.to_f > 1.0
  return apply_max_fdwr_nrcan(model: model, fdwr_lim: fdwr_set.to_f) if fdwr_set.to_f >= 0.0 && fdwr_set <= 1.0
  return if fdwr_set.to_f >= -1.1 && fdwr_set <= -0.9
  return if fdwr_set.to_f >= -2.1 && fdwr_set <= -1.9
  return apply_limit_fdwr(model: model, fdwr_lim: (max_fwdr(hdd) * 100.0).to_f.round(1)) if fdwr_set.to_f >= -3.1 && fdwr_set <= -2.9
  return apply_max_fdwr_nrcan(model: model, fdwr_lim: fdwr_set.to_f) if fdwr_set < -3.1
end

#assign_SHGC_to_windows(model:, default_construction_set:, necb_hdd: true) ⇒ Object



204
205
206
207
208
209
210
211
212
213
214
215
216
217
# File 'lib/openstudio-standards/standards/necb/BTAPPRE1980/building_envelope.rb', line 204

def assign_SHGC_to_windows(model:, default_construction_set:, necb_hdd: true)
  # Get HDD to determine which SHGC to use
  hdd = get_necb_hdd18(model: model, necb_hdd: necb_hdd)
  # Determine the solar heat gain coefficient from the standards data
  shgc_table = @standards_data['SHGC']
  shgc = eval(shgc_table[0]['formula'])
  # Find the default window construction material
  sub_surf_consts = default_construction_set.defaultExteriorSubSurfaceConstructions.get
  fixed_window_material = OpenStudio::Model.getConstructionByName(model, sub_surf_consts.fixedWindowConstruction.get.name.to_s).get.getLayer(0).to_SimpleGlazing.get
  # Reset the SHGC for the window material.  When I wrote this all of the windows, doors etc. used the same window
  # material.  So I set the SHGC for that material expecting it will be modified for all of the other constructions
  # too.
  fixed_window_material.setSolarHeatGainCoefficient(shgc.to_f)
end

#chiller_electric_eir_apply_efficiency_and_curves(chiller_electric_eir, clg_tower_objs) ⇒ Boolean

Applies the standard efficiency ratings and typical performance curves to this object from MNECB Supplement 5.4.8.3.

Returns:

  • (Boolean)

    true if successful, false if not



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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# File 'lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_systems.rb', line 15

def chiller_electric_eir_apply_efficiency_and_curves(chiller_electric_eir, clg_tower_objs)
  chillers = standards_data['chillers']

  # Define the criteria to find the chiller properties
  # in the hvac standards data set.
  search_criteria = chiller_electric_eir_find_search_criteria(chiller_electric_eir)
  cooling_type = search_criteria['cooling_type']
  condenser_type = search_criteria['condenser_type']
  compressor_type = search_criteria['compressor_type']

  # Get the chiller capacity
  capacity_w = chiller_electric_eir_find_capacity(chiller_electric_eir)

  # All chillers must be modulating down to 25% of their capacity
  chiller_electric_eir.setChillerFlowMode('LeavingSetpointModulated')
  chiller_electric_eir.setMinimumPartLoadRatio(0.25)
  chiller_electric_eir.setMinimumUnloadingRatio(0.25)

  chiller_capacity = capacity_w
  if (capacity_w / 1000.0) <= 700.0
    # As per MNECB if chiller capacity <= 700 kW the compressor should be reciprocating so change the type here in
    # the name, compressor_type and search_criteria which is where the compressor type is used.
    search_criteria['compressor_type'] = 'Reciprocating'
    compressor_type = search_criteria['compressor_type']
    chiller_electric_eir = replace_compressor_name(chiller: chiller_electric_eir, comp_type: compressor_type, chillers: chillers)
    if chiller_electric_eir.name.to_s.include? 'Primary Chiller'
      chiller_capacity = capacity_w
    elsif chiller_electric_eir.name.to_s.include? 'Secondary Chiller'
      chiller_capacity = 0.001
    end
  elsif ((capacity_w / 1000.0) > 700.0) && ((capacity_w / 1000.0) <= 2100.0)
    # As per MNECB if chiller capacity > 700 kW the compressor should be centrifugal so change the type here in
    # the name, compressor_type and search_criteria which is where the compressor type is used.
    search_criteria['compressor_type'] = 'Centrifugal'
    compressor_type = search_criteria['compressor_type']
    chiller_electric_eir = replace_compressor_name(chiller: chiller_electric_eir, comp_type: compressor_type, chillers: chillers)
    if chiller_electric_eir.name.to_s.include? 'Primary Chiller'
      chiller_capacity = capacity_w
    elsif chiller_electric_eir.name.to_s.include? 'Secondary Chiller'
      chiller_capacity = 0.001
    end
  else
    search_criteria['compressor_type'] = 'Centrifugal'
    compressor_type = search_criteria['compressor_type']
    chiller_electric_eir = replace_compressor_name(chiller: chiller_electric_eir, comp_type: compressor_type, chillers: chillers)
    chiller_capacity = capacity_w / 2.0
  end
  chiller_electric_eir.setReferenceCapacity(chiller_capacity)

  # Convert capacity to tons
  capacity_tons = OpenStudio.convert(chiller_capacity, 'W', 'ton').get

  # Get the chiller properties
  chlr_table = @standards_data['chillers']
  chlr_props = model_find_object(chlr_table, search_criteria, capacity_tons, Date.today)
  unless chlr_props
    OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.ChillerElectricEIR', "For #{chiller_electric_eir.name}, cannot find chiller properties, cannot apply standard efficiencies or curves.")
    successfully_set_all_properties = false
    return successfully_set_all_properties
  end

  # Make the CAPFT curve
  cool_cap_ft = model_add_curve(chiller_electric_eir.model, chlr_props['capft'])
  if cool_cap_ft
    chiller_electric_eir.setCoolingCapacityFunctionOfTemperature(cool_cap_ft)
  else
    OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.ChillerElectricEIR', "For #{chiller_electric_eir.name}, cannot find cool_cap_ft curve, will not be set.")
    successfully_set_all_properties = false
  end

  # Make the EIRFT curve
  cool_eir_ft = model_add_curve(chiller_electric_eir.model, chlr_props['eirft'])
  if cool_eir_ft
    chiller_electric_eir.setElectricInputToCoolingOutputRatioFunctionOfTemperature(cool_eir_ft)
  else
    OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.ChillerElectricEIR', "For #{chiller_electric_eir.name}, cannot find cool_eir_ft curve, will not be set.")
    successfully_set_all_properties = false
  end

  # Make the EIRFPLR curve
  # which may be either a CurveBicubic or a CurveQuadratic based on chiller type
  cool_plf_fplr = model_add_curve(chiller_electric_eir.model, chlr_props['eirfplr'])
  if cool_plf_fplr
    chiller_electric_eir.setElectricInputToCoolingOutputRatioFunctionOfPLR(cool_plf_fplr)
  else
    OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.ChillerElectricEIR', "For #{chiller_electric_eir.name}, cannot find cool_plf_fplr curve, will not be set.")
    successfully_set_all_properties = false
  end

  # Set the efficiency value
  kw_per_ton = nil
  cop = nil
  if chlr_props['cop']
    cop = chlr_props['cop']
    kw_per_ton = cop_to_kw_per_ton(cop)
    chiller_electric_eir.setReferenceCOP(cop)
  elsif !chlr_props['cop'] && chlr_props['minimum_full_load_efficiency']
    kw_per_ton = chlr_props['minimum_full_load_efficiency']
    cop = kw_per_ton_to_cop(kw_per_ton)
    chiller_electric_eir.setReferenceCOP(cop)
  else
    OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.ChillerElectricEIR', "For #{chiller_electric_eir.name}, cannot find minimum full load efficiency, will not be set.")
    successfully_set_all_properties = false
  end

  # Set cooling tower properties now that the new COP of the chiller is set
  if chiller_electric_eir.name.to_s.include? 'Primary Chiller'
    # Single speed tower model assumes 25% extra for compressor power
    tower_cap = capacity_w * (1.0 + 1.0 / chiller_electric_eir.referenceCOP)
    if (tower_cap / 1000.0) < 1750
      clg_tower_objs[0].setNumberofCells(1)
    else
      clg_tower_objs[0].setNumberofCells((tower_cap / (1000 * 1750) + 0.5).round)
    end
    clg_tower_objs[0].setFanPoweratDesignAirFlowRate(0.015 * tower_cap)
  end

  # Append the name with size and kw/ton
  chiller_electric_eir.setName("#{chiller_electric_eir.name} #{capacity_tons.round}tons #{kw_per_ton.round(1)}kW/ton")
  OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.ChillerElectricEIR', "For #{template}: #{chiller_electric_eir.name}: #{cooling_type} #{condenser_type} #{compressor_type} Capacity = #{capacity_tons.round}tons; COP = #{cop.round(1)} (#{kw_per_ton.round(1)}kW/ton)")

  return successfully_set_all_properties
end

#get_fan_chars(fan_type:, motor_type: nil, press_rise:) ⇒ Object

This method gets the required fan performance characteristics. It would probably be better to change the appropriate methods in standards or prototype or create another class but I did this here for expediency. The method looks for: -the total fan efficiency in fans.json (a custom json just for BTAP vintage files) -the motor efficiency (if applicable) in moters.json -the pressure rise in constants.json If the above cannot be found it defaults values (this should not happen). The method return a hash containing the total fan efficiency, motor efficiency and pressure rise.



278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
# File 'lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_systems.rb', line 278

def get_fan_chars(fan_type:, motor_type: nil, press_rise:)
  standards_fan_total_efficiency = @standards_data['fans'].select { |standards_fan| standards_fan['fan_type'] == fan_type }
  if standards_fan_total_efficiency.empty?
    fan_total_efficiency = 0.25
    OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.model_apply_existing_building_fan_characteristics', "Cannot find fan data in standards fans data.  Defaulting total fan efficiency to #{fan_total_efficiency}.")
  else
    fan_total_efficiency = standards_fan_total_efficiency[0]['fan_total_efficiency']
  end
  fan_motor_efficiency = nil
  unless motor_type.nil?
    standards_fan_motor_efficiency = @standards_data['motors'].select { |standards_motor| (standards_motor['motor_use'] == 'FAN' && standards_motor['motor_type'] == motor_type) }
    if standards_fan_motor_efficiency.empty?
      fan_motor_efficiency = 0.385
      OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.model_apply_existing_building_fan_characteristics', "Cannot find fan motor data in standards fans data.  Defaulting fan moter efficinecy to #{fan_motor_efficiency}.")
    else
      fan_motor_efficiency = standards_fan_motor_efficiency[0]['nominal_full_load_efficiency']
    end
  end
  fan_pressure_rise = @standards_data['constants'][press_rise]['value']
  if fan_pressure_rise.nil?
    fan_pressure_rise = 150.0
    OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.model_apply_existing_building_fan_characteristics', "Cannot find fan pressure data in constants data.  Defaulting total fan pressure rise to #{fan_pressure_rise}.")
  end
  return {
    total_eff: fan_total_efficiency,
    motor_eff: fan_motor_efficiency,
    press_rise: fan_pressure_rise
  }
end

#load_standards_database_newObject



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
# File 'lib/openstudio-standards/standards/necb/BTAPPRE1980/btap_pre1980.rb', line 13

def load_standards_database_new
  # load NECB2011 data
  super()

  if __dir__[0] == ':' # Running from OpenStudio CLI
    embedded_files_relative('data/', /.*\.json/).each do |file|
      data = JSON.parse(EmbeddedScripting.getFileAsString(file))
      if !data['tables'].nil?
        @standards_data['tables'] = [*@standards_data['tables'], *data['tables']].to_h
      elsif !data['constants'].nil?
        @standards_data['constants'] = [*@standards_data['constants'], *data['constants']].to_h
      elsif !data['constants'].nil?
        @standards_data['formulas'] = [*@standards_data['formulas'], *data['formulas']].to_h
      end
    end
  else
    files = Dir.glob("#{File.dirname(__FILE__)}/data/*.json").select { |e| File.file? e }
    files.each do |file|
      data = JSON.parse(File.read(file))
      if !data['tables'].nil?
        @standards_data['tables'] = [*@standards_data['tables'], *data['tables']].to_h
      elsif !data['constants'].nil?
        @standards_data['constants'] = [*@standards_data['constants'], *data['constants']].to_h
      elsif !data['formulas'].nil?
        @standards_data['formulas'] = [*@standards_data['formulas'], *data['formulas']].to_h
      end
    end
  end
  # Write database to file.
  # File.open(File.join(File.dirname(__FILE__), '..', 'NECB2017.json'), 'w') {|f| f.write(JSON.pretty_generate(@standards_data))}

  return @standards_data
end

#model_apply_existing_building_fan_performance(model:) ⇒ Object

Adjust the total efficiency, motor efficiency (if applicable), and pressure rise for fans used in BTAPPRE1980 and BTAP1980TO2010. This probably should be implemented a different way but rather than truly understanding the code I wrote this. So far it applies fan performance to system 3 return fans and to zone exhaust fans which were added to BTAPPRE1980 and BTAP1980TO2010 since they are not used in NECB2011, NECB2015, or NECB2017.



244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
# File 'lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_systems.rb', line 244

def model_apply_existing_building_fan_performance(model:)
  ret_fans = model.getFanConstantVolumes.select { |ret_fan| ret_fan.endUseSubcategory.to_s == 'Return_Fan' }
  return if ret_fans.empty?

  fan_type = 'CONSTANT-RETURN'
  motor_type = 'CONSTANT-RETURN'
  pressure_rise = 'return_fan_constant_volume_pressure_rise_value'
  fan_hash = get_fan_chars(fan_type: fan_type, motor_type: motor_type, press_rise: pressure_rise)
  ret_fans.each do |ret_fan|
    ret_fan.setPressureRise(fan_hash[:press_rise].to_f)
    ret_fan.setFanTotalEfficiency(fan_hash[:total_eff].to_f)
    ret_fan.setMotorEfficiency(fan_hash[:motor_eff].to_f)
  end
  exhaust_fans = model.getFanZoneExhausts

  return if exhaust_fans.empty?

  fan_type = 'EXHAUST'
  pressure_rise = 'exhaust_fan_pressure_rise_value'
  fan_hash = get_fan_chars(fan_type: fan_type, press_rise: pressure_rise)
  exhaust_fans.sort.each do |exhaust_fan|
    exhaust_fan.setFanTotalEfficiency(fan_hash[:total_eff])
    exhaust_fan.setPressureRise(fan_hash[:press_rise])
  end
end

#new_add_sys6_multi_zone_built_up_system_with_baseboard_heating(model:, zones:, heating_coil_type:, baseboard_type:, chiller_type:, fan_type:, hw_loop:) ⇒ Object



171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
# File 'lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_6.rb', line 171

def new_add_sys6_multi_zone_built_up_system_with_baseboard_heating(
  model:,
  zones:,
  heating_coil_type:,
  baseboard_type:,
  chiller_type:,
  fan_type:,
  hw_loop:
)
  # System Type 6: VAV w/ Reheat
  # This measure creates:
  # a single hot water loop with a natural gas or electric boiler or for the building
  # a single chilled water loop with water cooled chiller for the building
  # a single condenser water loop for heat rejection from the chiller
  # a VAV system w/ hot water or electric heating, chilled water cooling, and
  # hot water or electric reheat for each story of the building
  # Arguments:
  # "boiler_fueltype" choices match OS choices for boiler fuel type:
  # "NaturalGas","Electricity","PropaneGas","FuelOilNo1","FuelOilNo2","Coal","Diesel","Gasoline","OtherFuel1"
  # "heating_coil_type": "Electric" or "Hot Water"
  # "baseboard_type": "Electric" and "Hot Water"
  # "chiller_type": "Scroll";"Centrifugal";""Screw";"Reciprocating"
  # "fan_type": "AF_or_BI_rdg_fancurve";"AF_or_BI_inletvanes";"fc_inletvanes";"var_speed_drive"
  system_6_data = {}
  system_6_data[:name] = 'Sys_6_VAV with Reheat'
  system_6_data[:CentralCoolingDesignSupplyAirTemperature] = 13.0
  system_6_data[:CentralHeatingDesignSupplyAirTemperature] = 20.0
  system_6_data[:AllOutdoorAirinCooling] = false
  system_6_data[:AllOutdoorAirinHeating] = false
  system_6_data[:MinimumSystemAirFlowRatio] = 0.03
  # zone data
  system_6_data[:max_system_supply_air_temperature] = 43.0
  system_6_data[:min_system_supply_air_temperature] = 13.0
  system_6_data[:ZoneCoolingDesignSupplyAirTemperatureInputMethod] = 'TemperatureDifference'
  system_6_data[:ZoneCoolingDesignSupplyAirTemperatureDifference] = 11.0
  system_6_data[:ZoneHeatingDesignSupplyAirTemperatureInputMethod] = 'TemperatureDifference'
  system_6_data[:ZoneHeatingDesignSupplyAirTemperatureDifference] = 21.0
  system_6_data[:ZoneCoolingSizingFactor] = 1.1
  system_6_data[:ZoneHeatingSizingFactor] = 1.3
  system_6_data[:ZoneVAVMinFlowFactorPerFloorArea] = 0.002
  system_6_data[:ZoneVAVMaxReheatTemp] = 43.0
  system_6_data[:ZoneVAVDamperAction] = 'Normal'
  system_data = system_6_data

  always_on = model.alwaysOnDiscreteSchedule

  # Chilled Water Plant

  chw_loop = OpenStudio::Model::PlantLoop.new(model)
  chiller1, chiller2 = setup_chw_loop_with_components(model, chw_loop, chiller_type)

  # Condenser System

  cw_loop = OpenStudio::Model::PlantLoop.new(model)
  ctower = setup_cw_loop_with_components(model, cw_loop, chiller1, chiller2)

  # Make a Packaged VAV w/ PFP Boxes for each story of the building
  model.getBuildingStorys.sort.each do |story|
    unless (OpenstudioStandards::Geometry.building_story_get_thermal_zones(story) & zones).empty?

      air_loop = common_air_loop(model: model, system_data: system_data)
      air_loop.setName(system_data[:name])
      air_loop_sizing = air_loop.sizingSystem
      air_loop_sizing.setCentralCoolingDesignSupplyAirTemperature(system_data[:CentralCoolingDesignSupplyAirTemperature])
      air_loop_sizing.setCentralHeatingDesignSupplyAirTemperature(system_data[:CentralHeatingDesignSupplyAirTemperature])
      air_loop_sizing.setAllOutdoorAirinCooling(system_data[:AllOutdoorAirinCooling])
      air_loop_sizing.setAllOutdoorAirinHeating(system_data[:AllOutdoorAirinHeating])
      if model.version < OpenStudio::VersionString.new('2.7.0')
        air_loop_sizing.setMinimumSystemAirFlowRatio(system_data[:MinimumSystemAirFlowRatio]) unless system_data[:MinimumSystemAirFlowRatio].nil?
      else
        air_loop_sizing.setCentralHeatingMaximumSystemAirFlowRatio(system_data[:MinimumSystemAirFlowRatio]) unless system_data[:MinimumSystemAirFlowRatio].nil?
      end

      supply_fan = OpenStudio::Model::FanVariableVolume.new(model, always_on)
      supply_fan.setName('Sys6 Supply Fan')
      return_fan = OpenStudio::Model::FanVariableVolume.new(model, always_on)
      return_fan.setName('Sys6 Return Fan')

      if heating_coil_type == 'Hot Water'
        htg_coil = OpenStudio::Model::CoilHeatingWater.new(model, always_on)
        hw_loop.addDemandBranchForComponent(htg_coil)
      end
      if heating_coil_type == 'Electric'
        htg_coil = OpenStudio::Model::CoilHeatingElectric.new(model, always_on)
      end

      clg_coil = OpenStudio::Model::CoilCoolingWater.new(model, always_on)
      chw_loop.addDemandBranchForComponent(clg_coil)

      oa_controller = OpenStudio::Model::ControllerOutdoorAir.new(model)
      oa_controller.autosizeMinimumOutdoorAirFlowRate

      # Set mechanical ventilation controller outdoor air to ZoneSum (used to be defaulted to ZoneSum but now should be
      # set explicitly)
      oa_controller.controllerMechanicalVentilation.setSystemOutdoorAirMethod('ZoneSum')

      oa_system = OpenStudio::Model::AirLoopHVACOutdoorAirSystem.new(model, oa_controller)

      # Add the components to the air loop
      # in order from closest to zone to furthest from zone
      supply_inlet_node = air_loop.supplyInletNode
      supply_outlet_node = air_loop.supplyOutletNode
      supply_fan.addToNode(supply_inlet_node)
      htg_coil.addToNode(supply_inlet_node)
      clg_coil.addToNode(supply_inlet_node)
      oa_system.addToNode(supply_inlet_node)
      returnAirNode = oa_system.returnAirModelObject.get.to_Node.get
      return_fan.addToNode(returnAirNode)

      # Add a setpoint manager to control the supply air.  The controller will set the supply air to be the warmest
      # that can still meet the cooling load of the warmest thermal zone it services.  This differs from the NECB
      # which uses a constant 13 C supply air temperature.

      # sat_sch = OpenStudio::Model::ScheduleRuleset.new(model)
      # sat_sch.setName('Supply Air Temp')
      # sat_sch.defaultDaySchedule.setName('Supply Air Temp Default')
      # sat_sch.defaultDaySchedule.addValue(OpenStudio::Time.new(0, 24, 0, 0), system_data[:system_supply_air_temperature])
      sat_stpt_manager = OpenStudio::Model::SetpointManagerWarmest.new(model)
      sat_stpt_manager.setMaximumSetpointTemperature(system_data[:max_system_supply_air_temperature])
      sat_stpt_manager.setMinimumSetpointTemperature(system_data[:min_system_supply_air_temperature])
      sat_stpt_manager.addToNode(supply_outlet_node)

      # Make a VAV terminal with HW reheat for each zone on this story that is in intersection with the zones array.
      # and hook the reheat coil to the HW loop
      (OpenstudioStandards::Geometry.building_story_get_thermal_zones(story) & zones).each do |zone|
        # Zone sizing parameters
        sizing_zone = zone.sizingZone
        sizing_zone.setZoneCoolingDesignSupplyAirTemperatureInputMethod(system_data[:ZoneCoolingDesignSupplyAirTemperatureInputMethod])
        sizing_zone.setZoneCoolingDesignSupplyAirTemperatureDifference(system_data[:ZoneCoolingDesignSupplyAirTemperatureDifference])
        sizing_zone.setZoneHeatingDesignSupplyAirTemperatureInputMethod(system_data[:ZoneHeatingDesignSupplyAirTemperatureInputMethod])
        sizing_zone.setZoneHeatingDesignSupplyAirTemperatureDifference(system_data[:ZoneHeatingDesignSupplyAirTemperatureDifference])
        sizing_zone.setZoneCoolingSizingFactor(system_data[:ZoneCoolingSizingFactor])
        sizing_zone.setZoneHeatingSizingFactor(system_data[:ZoneHeatingSizingFactor])

        if heating_coil_type == 'Hot Water'
          reheat_coil = OpenStudio::Model::CoilHeatingWater.new(model, always_on)
          hw_loop.addDemandBranchForComponent(reheat_coil)
        elsif heating_coil_type == 'Electric'
          reheat_coil = OpenStudio::Model::CoilHeatingElectric.new(model, always_on)
        end

        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
    end
  end
  # next story

  # for debugging
  # puts "end add_sys6_multi_zone_built_up_with_baseboard_heating"

  return true
end

#pump_standard_minimum_motor_efficiency_and_size(pump, motor_bhp) ⇒ Array<Double>

Determines the minimum pump motor efficiency and nominal size for a given motor bhp. This should be the total brake horsepower with any desired safety factor already included. This method picks the next nominal motor catgory larger than the required brake horsepower, and the efficiency is based on that size. For example, if the bhp = 6.3, the nominal size will be 7.5HP and the efficiency for 90.1-2010 will be 91.7% from Table 10.8B. This method assumes 4-pole, 1800rpm totally-enclosed fan-cooled motors.

Parameters:

  • motor_bhp (Double)

    motor brake horsepower (hp)

Returns:

  • (Array<Double>)

    minimum motor efficiency (0.0 to 1.0), nominal horsepower



150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
# File 'lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_systems.rb', line 150

def pump_standard_minimum_motor_efficiency_and_size(pump, motor_bhp)
  motor_eff = 0.85
  nominal_hp = motor_bhp

  # Don't attempt to look up motor efficiency
  # for zero-hp pumps (required for circulation-pump-free
  # service water heating systems).
  return [1.0, 0] if motor_bhp == 0.0

  # Lookup the minimum motor efficiency
  motors = @standards_data['motors']

  # Assuming all pump motors are 4-pole ODP
  search_criteria = {
    'motor_use' => 'PUMP',
    'number_of_poles' => 4.0,
    'type' => 'Enclosed'
  }

  motor_properties = model_find_object(motors, search_criteria, motor_bhp)
  if motor_properties.nil?
    OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Pump', "For #{pump.name}, could not find motor properties using search criteria: #{search_criteria}, motor_bhp = #{motor_bhp} hp.")
    return [motor_eff, nominal_hp]
  end

  motor_eff = motor_properties['nominal_full_load_efficiency']
  nominal_hp = motor_properties['maximum_capacity'].to_f.round(1)
  # Round to nearest whole HP for niceness
  if nominal_hp >= 2
    nominal_hp = nominal_hp.round
  end

  # Get the efficiency based on the nominal horsepower
  # Add 0.01 hp to avoid search errors.
  motor_properties = model_find_object(motors, search_criteria, nominal_hp + 0.01)
  if motor_properties.nil?
    OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Fan', "For #{pump.name}, could not find nominal motor properties using search criteria: #{search_criteria}, motor_hp = #{nominal_hp} hp.")
    return [motor_eff, nominal_hp]
  end
  motor_eff = motor_properties['nominal_full_load_efficiency']

  # Change the pump design shaft power per unit flow rate per unit head to use MNECB combined efficiency values
  apply_pump_impeller_efficiency(pump: pump, motor_eff: motor_eff)
  return [motor_eff, nominal_hp]
end

#replace_compressor_name(chiller:, comp_type:, chillers:) ⇒ Object

Replace the chiller compressor type in the chiller name.



197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
# File 'lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_systems.rb', line 197

def replace_compressor_name(chiller:, comp_type:, chillers:)
  # Get the current name.
  chiller_name = chiller.name.to_s
  # Get the unique compressor types from the chiller table (from the chillers.json file.)
  chiller_types = chillers.uniq { |chill_param| chill_param['compressor_type'] }
  new_name = chiller_name
  # Go through each chiller compressor type from the chiller table and see if it is in the chiller name.  If it is,
  # then replace the old compressor type in the name with the new one.
  chlr_name_updated = false
  chiller_types.each do |chill_type|
    if chiller_name.include? chill_type['compressor_type']
      new_name = chiller_name.sub(chill_type['compressor_type'], comp_type)
      chlr_name_updated = true
      break
    end
  end
  new_name = chiller_name + ' ' + comp_type if !chlr_name_updated
  chiller.setName(new_name)
  return chiller
end

#set_occ_sensor_spacetypes(model, space_type_map) ⇒ Object

occupancy sensor control applied using lighting schedule, see apply_lighting_schedule method



85
86
87
# File 'lib/openstudio-standards/standards/necb/BTAPPRE1980/btap_pre1980.rb', line 85

def set_occ_sensor_spacetypes(model, space_type_map)
  return true
end

#validate_primary_heating_fuel(primary_heating_fuel:) ⇒ Object

This method sets the primary heating fuel to either NaturalGas or Electricity if a HP fuel type is set.



90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/openstudio-standards/standards/necb/BTAPPRE1980/btap_pre1980.rb', line 90

def validate_primary_heating_fuel(primary_heating_fuel:)
  return primary_heating_fuel unless primary_heating_fuel == 'NaturalGasHPGasBackup' || primary_heating_fuel == 'NaturalGasHPElecBackupMixed' || primary_heating_fuel == 'ElectricityHPElecBackup' || primary_heating_fuel == 'ElectricityHPGasBackupMixed'
  case primary_heating_fuel
  when "NaturalGasHPGasBackup"
    primary_heating_fuel = 'NaturalGas'
  when "NaturalGasHPElecBackupMixed"
    primary_heating_fuel = 'NaturalGas'
  when "ElectricityHPElecBackup"
    primary_heating_fuel = 'Electricity'
  when "ElectricityHPGasBackupMixed"
    primary_heating_fuel = 'Electricity'
  end
  OpenStudio.logFree(OpenStudio::Info, 'openstudio.Standards.Model', "Attemted to apply an NECB HP primary_heating_fuel to a vintage building type.  Replacing the selected primary_heating_fuel with #{primary_heating_fuel}.")
  return primary_heating_fuel
end