Class: NECB2015

Inherits:
NECB2011 show all
Defined in:
lib/openstudio-standards/standards/necb/NECB2015/necb_2015.rb,
lib/openstudio-standards/standards/necb/NECB2015/lighting.rb,
lib/openstudio-standards/standards/necb/NECB2015/hvac_systems.rb,
lib/openstudio-standards/standards/necb/NECB2015/qaqc/necb_2015_qaqc.rb

Overview

This class holds methods that apply NECB2011 rules.

Constant Summary

Constants inherited from Standard

Standard::STANDARDS_LIST

Instance Attribute Summary

Attributes inherited from NECB2011

#qaqc_data, #space_multiplier_map, #space_type_map, #standards_data, #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_ptac_dx_cooling, #add_sys1_unitary_ac_baseboard_heating, #add_sys1_unitary_ac_baseboard_heating_multi_speed, #add_sys2_FPFC_sys5_TPFC, #add_sys3_and_8_zone_equip, #add_sys3and8_single_zone_packaged_rooftop_unit_with_baseboard_heating_multi_speed, #add_sys3and8_single_zone_packaged_rooftop_unit_with_baseboard_heating_single_speed, #add_sys4_single_zone_make_up_air_unit_with_baseboard_heating, #add_sys6_multi_zone_built_up_system_with_baseboard_heating, #add_system_3_and_8_airloop, #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_energy_recovery_ventilator_required?, #air_loop_hvac_motorized_oa_damper_limits, #air_loop_hvac_static_pressure_reset_required?, #apply_building_default_constructionset, #apply_default_constructionsets_to_spacetypes, #apply_economizers, #apply_limit_fdwr, #apply_max_fdwr_nrcan, #apply_max_srr_nrcan, #apply_standard_construction_properties, #apply_standard_lights, #apply_standard_skylight_to_roof_ratio, #apply_standard_window_to_wall_ratio, #are_space_loads_similar?, #are_zone_loads_similar?, #assign_contruction_to_adiabatic_surfaces, #auto_size_shw_capacity, #auto_size_shw_pump_head, #auto_system, #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, #auto_zoning, #boiler_hot_water_apply_efficiency_and_curves, #check_boolean_value, #coil_cooling_dx_multi_speed_apply_efficiency_and_curves, #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, #corrupt_standards_database, #create_base_data, #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, #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_canadian_system_defaults_by_weatherfile_name, #get_necb_hdd18, #get_necb_spacetype_system_selection, #get_necb_thermal_zone_system_selection, #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, #group_similar_zones_together, #init_qaqc, #is_a_necb_dwelling_unit?, #is_an_necb_storage_space?, #is_an_necb_wet_space?, #is_an_necb_wildcard_space?, #look_up_csv_data, #max_fwdr, #merge_recursively, #model_add_construction_set_from_osm, #model_add_constructions, #model_add_hvac, #model_add_schedule, #model_add_swh, #model_apply_sizing_parameters, #model_attach_water_fixtures_to_spaces?, #model_create_prototype_model, #model_create_thermal_zones, #model_find_climate_zone_set, #necb_autozone_and_autosystem, #necb_design_supply_temp_compliance, #necb_economizer_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_section_test, #necb_vav_fan_power_compliance, #necb_zone_sizing_compliance, #new_add_sys6_multi_zone_built_up_system_with_baseboard_heating, #percentage_difference, #qaqc_only, #sanity_check, #scale_model_geometry, #set_construction_set_to_necb!, #set_necb_external_subsurface_conductance, #set_necb_external_surface_conductance, #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, #thermal_zone_demand_control_ventilation_required?, #thermal_zone_get_centroid_per_floor, #validate_space_types, #water_heater_mixed_apply_efficiency

Methods inherited from Standard

#adjust_infiltration_to_lower_pressure, #adjust_infiltration_to_prototype_building_conditions, #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_required?, #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_humidifier_count, #air_loop_hvac_include_hydronic_cooling_coil?, #air_loop_hvac_include_wshp?, #air_loop_hvac_integrated_economizer_required?, #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_motorized_oa_damper, #air_loop_hvac_residential_area_served, #air_loop_hvac_set_minimum_damper_position, #air_loop_hvac_single_zone_controls_num_stages, #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_prm_baseline_fan_power, #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_changes_to_surface_construction, #apply_limit_to_subsurface_ratio, #apply_max_fdwr, #apply_max_srr, #boiler_hot_water_apply_efficiency_and_curves, #boiler_hot_water_find_capacity, #boiler_hot_water_find_search_criteria, #boiler_hot_water_standard_minimum_thermal_efficiency, build, #building_story_floor_multiplier, #building_story_minimum_z_value, #change_construction_properties_in_model, #chiller_electric_eir_find_capacity, #chiller_electric_eir_find_search_criteria, #chiller_electric_eir_standard_minimum_full_load_efficiency, #coil_cooling_dx_multi_speed_apply_efficiency_and_curves, #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_apply_efficiency_and_curves, #coil_heating_gas_apply_prototype_efficiency, #coil_heating_gas_multi_stage_apply_efficiency_and_curves, #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, #construction_calculated_solar_heat_gain_coefficient, #construction_calculated_u_factor, #construction_calculated_visible_transmittance, #construction_deep_copy, #construction_set_glazing_shgc, #construction_set_glazing_tvis, #construction_set_glazing_u_value, #construction_set_slab_f_factor, #construction_set_u_value, #construction_set_underground_wall_c_factor, #construction_simple_glazing?, #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_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, #day_schedule_equivalent_full_load_hrs, #define_space_multiplier, #eer_to_cop, #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, #film_coefficients_r_value, #find_and_set_insulation_layer, #find_exposed_conditioned_roof_surfaces, #find_exposed_conditioned_vertical_surfaces, #find_highest_roof_centre, #fluid_cooler_apply_minimum_power_per_flow, #get_outdoor_subsurface_ratio, #headered_pumps_variable_speed_set_control_type, #heat_exchanger_air_to_air_sensible_and_latent_apply_efficiency, #heat_exchanger_air_to_air_sensible_and_latent_apply_prototype_efficiency, #heat_exchanger_air_to_air_sensible_and_latent_apply_prototype_nominal_electric_power, #heat_exchanger_air_to_air_sensible_and_latent_minimum_efficiency, #heat_exchanger_air_to_air_sensible_and_latent_prototype_default_fan_efficiency, #heating_design_outdoor_temperatures, #hspf_to_cop_heating_no_fan, #hspf_to_cop_heating_with_fan, #intialize, #kw_per_ton_to_cop, #load_hvac_map, #load_initial_osm, #load_standards_database, #model_add_baseboard, #model_add_booster_swh_end_uses, #model_add_cav, #model_add_central_air_source_heat_pump, #model_add_chw_loop, #model_add_constant_schedule_ruleset, #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_design_days_and_weather_file, #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_ground_temperatures, #model_add_heatpump_water_heater, #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_piping_losses_to_swh_system, #model_add_prm_baseline_system, #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_proportional_controls, #model_add_refrigeration_case, #model_add_refrigeration_compressor, #model_add_refrigeration_system, #model_add_refrigeration_walkin, #model_add_schedule, #model_add_schedule_type_limits, #model_add_split_ac, #model_add_swh, #model_add_swh_booster, #model_add_swh_end_uses, #model_add_swh_end_uses_by_space, #model_add_swh_end_uses_by_spaceonly, #model_add_swh_loop, #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_heater, #model_add_water_source_hp, #model_add_waterside_economizer, #model_add_window_ac, #model_add_zone_erv, #model_add_zone_ventilation, #model_apply_hvac_efficiency_standard, #model_apply_infiltration_standard, #model_apply_multizone_vav_outdoor_air_sizing, #model_apply_parametric_schedules, #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_assign_spaces_to_stories, #model_attach_water_fixtures_to_spaces?, #model_baseline_system_vav_fan_type, #model_create_exterior_lighting_area_length_count_hash, #model_create_prm_baseline_building, #model_create_prm_baseline_building_requires_vlt_sizing_run, #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_constructions, #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_climate_zone_and_building_type, #model_get_climate_zone_set_from_list, #model_get_construction_properties, #model_get_full_weather_file_path, #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_get_story_for_nominal_z_coordinate, #model_group_zones_by_story, #model_infer_hours_of_operation_building, #model_legacy_results_by_end_use_and_fuel_type, #model_make_name, #model_num_stories_spanned, #model_prm_baseline_system_change_fuel_type, #model_prm_baseline_system_group_minimum_area, #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_residential_and_nonresidential_floor_areas, #model_set_climate_zone, #model_setup_parametric_schedules, #model_standards_climate_zone, #model_system_outdoor_air_sizing_vrp_method, #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_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_deltaT_forwater, #plant_loop_enable_supply_water_temperature_reset, #plant_loop_find_maximum_loop_flow_rate, #plant_loop_prm_baseline_condenser_water_temperatures, #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?, #pump_variable_speed_set_control_type, register_standard, #remove_All_Subsurfaces, #remove_HVAC, #remove_air_loops, #remove_all_HVAC, #remove_all_plant_loops, #remove_all_zone_equipment, #remove_plant_loops, #remove_unused_curves, #remove_vrf, #remove_zone_equipment, #rename_air_loop_nodes, #rename_plant_loop_nodes, #safe_load_model, #safe_load_sql, #schedule_apply_parametric_inputs, #schedule_compact_annual_min_max_value, #schedule_constant_annual_equivalent_full_load_hrs, #schedule_constant_annual_min_max_value, #schedule_ruleset_annual_equivalent_full_load_hrs, #schedule_ruleset_annual_hourly_values, #schedule_ruleset_annual_hours_above_value, #schedule_ruleset_annual_min_max_value, #schedule_ruleset_cleanup_profiles, #schedule_ruleset_set_hours_of_operation, #seer_to_cop_cooling_no_fan, #seer_to_cop_cooling_with_fan, #set_VAV_terminals_to_control_for_outdoor_air, #set_Window_To_Wall_Ratio_set_name, #space_add_daylighting_controls, #space_apply_infiltration_rate, #space_conditioning_category, #space_cooled?, #space_daylighted_area_window_width, #space_daylighted_areas, #space_daylighting_control_required?, #space_daylighting_fractions_and_windows, #space_design_internal_load, #space_exterior_wall_and_roof_and_subsurface_area, #space_exterior_wall_and_window_area, #space_get_adjacent_space_with_most_shared_wall_area, #space_get_adjacent_spaces_with_shared_wall_areas, #space_heated?, #space_hours_of_operation, #space_infiltration_rate_75_pa, #space_plenum?, #space_residential?, #space_sidelighting_effective_aperture, #space_skylight_effective_aperture, #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, #spaces_get_occupancy_schedule, #spaces_hours_of_operation, #standard_design_sizing_temperatures, #standards_lookup_table_first, #standards_lookup_table_many, #strip_model, #sub_surface_component_infiltration_rate, #sub_surface_create_centered_subsurface_from_scaled_surface, #sub_surface_create_scaled_subsurfaces_from_surface, #sub_surface_reduce_area_by_percent_by_raising_sill, #sub_surface_reduce_area_by_percent_by_shrinking_toward_centroid, #sub_surface_vertical_rectangle?, #surface_component_infiltration_rate, #surface_replace_existing_subsurfaces_with_centered_subsurface, #thermal_eff_to_afue, #thermal_eff_to_comb_eff, #thermal_zone_add_exhaust, #thermal_zone_add_exhaust_fan_dcv, #thermal_zone_add_unconditioned_thermostat, #thermal_zone_apply_prm_baseline_supply_temperatures, #thermal_zone_building_type, #thermal_zone_conditioning_category, #thermal_zone_convert_oa_req_to_per_area, #thermal_zone_cooled?, #thermal_zone_demand_control_ventilation_limits, #thermal_zone_demand_control_ventilation_required?, #thermal_zone_design_internal_load, #thermal_zone_exhaust_fan_dcv_required?, #thermal_zone_floor_area_with_zone_multipliers, #thermal_zone_fossil_hybrid_or_purchased_heat?, #thermal_zone_fossil_or_electric_type, #thermal_zone_get_adjacent_zones_with_shared_wall_areas, #thermal_zone_get_occupancy_schedule, #thermal_zone_heated?, #thermal_zone_infer_system_type, #thermal_zone_majority_space_type, #thermal_zone_mixed_heating_fuel?, #thermal_zone_occupancy_type, #thermal_zone_outdoor_airflow_rate, #thermal_zone_outdoor_airflow_rate_per_area, #thermal_zone_plenum?, #thermal_zone_prm_baseline_cooling_design_supply_temperature, #thermal_zone_prm_baseline_heating_design_supply_temperature, #thermal_zone_residential?, #thermal_zone_vestibule?, #thermal_zones_get_occupancy_schedule, #true?, #validate_initial_model, #water_heater_mixed_apply_efficiency, #water_heater_mixed_apply_prm_baseline_fuel_type, #water_heater_mixed_find_capacity, #zone_hvac_component_apply_prm_baseline_fan_power, #zone_hvac_component_apply_standard_controls, #zone_hvac_component_apply_vestibule_heating_control, #zone_hvac_component_prm_baseline_fan_efficacy, #zone_hvac_component_vestibule_heating_control_required?

Methods included from PrototypeFan

apply_base_fan_variables, #create_fan_by_name, #get_fan_from_standards, #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, #pump_standard_minimum_motor_efficiency_and_size

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_fanpower, #fan_motor_horsepower, #fan_rated_w_per_cfm, #fan_small_fan?, #fan_standard_minimum_motor_efficiency_and_size

Constructor Details

#initializeNECB2015

Returns a new instance of NECB2015.



8
9
10
11
12
13
# File 'lib/openstudio-standards/standards/necb/NECB2015/necb_2015.rb', line 8

def initialize
  super()
  @template = self.class.name
  @standards_data = self.load_standards_database_new()
  self.corrupt_standards_database()
end

Instance Method Details

#apply_lighting_schedule(space_type, space_type_properties, default_sch_set) ⇒ Object



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
177
178
# File 'lib/openstudio-standards/standards/necb/NECB2015/lighting.rb', line 6

def apply_lighting_schedule(space_type, space_type_properties,default_sch_set)
  require 'date'
  lighting_per_area = space_type_properties['lighting_per_area'].to_f
  lights_rel_absence_occ = space_type_properties['rel_absence_occ'].to_f
  lights_personal_control = space_type_properties['personal_control'].to_f
  lights_occ_sense = space_type_properties['occ_sense'].to_f
  occupancy_schedule =space_type_properties['occupancy_schedule'].to_s
  orig_lighting_sch = space_type_properties['lighting_schedule'].to_s

  schedule_table = @standards_data['schedules']

  #checks which rules to apply based on LPD
  if lighting_per_area <= 0.799256505 #8.6 W/m2
    #do not apply occupancy sensor control
    orig_lighting_sch = space_type_properties['lighting_schedule']
    unless orig_lighting_sch.nil?
      default_sch_set.setLightingSchedule(model_add_schedule(space_type.model, orig_lighting_sch))
      OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.SpaceType', "#{space_type.name} set lighting schedule to #{orig_lighting_sch}.")
    end

  else # LPD > 8.6 W/m2

    #apply occupancy sensor control
    #get occupancy schedule's day rules
    rules = model_find_objects(schedule_table, {'name' => occupancy_schedule}) # returns all schedules with schedule name entered
    #check if it exists
    if rules.size.zero? #does not exist -apply default lighting sched
      OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "Cannot find data for schedule: #{occupancy_schedule}. Cannot apply occupancy sensor control for lighting for space: #{space_type.name} ")
      orig_lighting_sch = space_type_properties['lighting_schedule']
      unless orig_lighting_sch.nil?
        default_sch_set.setLightingSchedule(model_add_schedule(space_type.model, orig_lighting_sch))
        OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.SpaceType', "#{space_type.name} set lighting schedule to #{orig_lighting_sch}.")
      end
    else #exists

      #check if schedule exists already . # First check model and return schedule if it already exists
      space_type.model.getSchedules.sort.each do |exisiting_light_ruleset|
        if exisiting_light_ruleset.name.get.to_s == "#{occupancy_schedule}-#{orig_lighting_sch}-#{lights_rel_absence_occ}-#{lights_personal_control}-#{lights_occ_sense}-Light Ruleset"
          OpenStudio.logFree(OpenStudio::Debug, 'openstudio.standards.Model', "Already added schedule: #{exisiting_light_ruleset.name.get.to_s}")
          #set the lighting schedule
          unless exisiting_light_ruleset.nil?
            default_sch_set.setLightingSchedule(exisiting_light_ruleset)
            OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.SpaceType', "#{space_type.name.to_s} set lighting schedule to #{exisiting_light_ruleset}.")
            return true
          end
        end
      end

      #Create new lighting schedule
      lighting_sch_ruleset = OpenStudio::Model::ScheduleRuleset.new(space_type.model)
      lighting_sch_ruleset.setName("#{occupancy_schedule}-#{orig_lighting_sch}-#{lights_rel_absence_occ}-#{lights_personal_control}-#{lights_occ_sense}-Light Ruleset")
      #loop through the number of day types (each occupancy schedule day)
      rules.each do|rule|
        #get day type, hourly values from the occupancy schedule day
        day_types = rule['day_types'] #Default Wkdy, Wknd, Mon, Tue, Wed, Thu, Fri, Sat, Sun, WntrDsn, SmrDsn
        occupancy_value = rule['values']
        sch_type = rule['type'] #should be 'Hourly'
        start_date = DateTime.parse(rule['start_date'])
        end_date = DateTime.parse(rule['end_date'])
        #create new array to hold occ_control values for each day-type/schedule day
        hourly_occ_control = Array.new
        #loop through hourly values to check if occupancy sensor control should apply and store the new lighting day hourly value
        hourly_index = 0
        for hourly_value in occupancy_value do
          #default light schedule hourly value
          lighting_sched_value = 999
          #get the hourly value from the .json schedule
          #get lighting schedule
          orig_lighting_rules = model_find_objects(schedule_table, {'name' => orig_lighting_sch}) # returns all schedules with schedule name
          if orig_lighting_rules.size.zero?
            OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "Cannot find data for schedule: #{orig_lighting_sch}.")
          end
          if hourly_value<lights_rel_absence_occ
            #occupancy sensor control applies for this hour
            occ_control = 1-(lights_rel_absence_occ*lights_occ_sense)-lights_personal_control
            #go through lighitng schedule and adjust the value for the hour
            orig_lighting_rules.each do |orig_lighting_rule|
              if day_types == orig_lighting_rule['day_types'] #if light day schedule type matches occupancy day type
                orig_hourly_values =orig_lighting_rule['values']
                lighting_sched_value = (orig_hourly_values[hourly_index])*occ_control

              end
            end

          else
            #occupancy sensor control does not apply for this hour. Use default schedule value from .json file
            #go through each lighting schedule day  to find the one with the matching day type
            #assuming occupancy schedule day matches lighting schedule day
            orig_lighting_rules.each do |orig_lighting_rule|
              if day_types == orig_lighting_rule['day_types'] #if light day schedule type matches occupancy day type
                orig_hourly_values =orig_lighting_rule['values']
                occ_control =1
                lighting_sched_value = orig_hourly_values[hourly_index] #set the current hourly_index's original lighting schedule day value to lighting_sched_value

              end

            end
          end # if hourly_value<lights_rel_absence_occ
          #store the lighting_sched_value factor for this hour to the array
          hourly_occ_control << lighting_sched_value
          #update index
          hourly_index = hourly_index + 1
        end #for hourly_value in occupancy_value do

        #for each schedule day, create a new day rule with the new hourly schedule values for lighting
        if day_types.include?('Default')
          day_sch = lighting_sch_ruleset.defaultDaySchedule
          day_sch.setName("#{occupancy_schedule}-#{orig_lighting_sch}-#{lights_rel_absence_occ}-#{lights_personal_control}-#{lights_occ_sense}-Light Default")
          model_add_vals_to_sch(space_type.model, day_sch, sch_type, hourly_occ_control)
        end
        if day_types.include?('Wknd') ||
            day_types.include?('Wkdy') ||
            day_types.include?('Sat') ||
            day_types.include?('Sun') ||
            day_types.include?('Mon') ||
            day_types.include?('Tue') ||
            day_types.include?('Wed') ||
            day_types.include?('Thu') ||
            day_types.include?('Fri')
          # Make the Rule
          sch_rule = OpenStudio::Model::ScheduleRule.new(lighting_sch_ruleset)
          day_sch = sch_rule.daySchedule
          day_sch.setName("#{occupancy_schedule}-#{orig_lighting_sch}-#{lights_rel_absence_occ}-#{lights_personal_control}-#{lights_occ_sense}-#{day_types}-Light Day")
          model_add_vals_to_sch(space_type.model, day_sch, sch_type, hourly_occ_control)
          # Set the dates when the rule applies
          sch_rule.setStartDate(OpenStudio::Date.new(OpenStudio::MonthOfYear.new(start_date.month.to_i), start_date.day.to_i))
          sch_rule.setEndDate(OpenStudio::Date.new(OpenStudio::MonthOfYear.new(end_date.month.to_i), end_date.day.to_i))
          # Set the days when the rule applies
          # Weekends
          if day_types.include?('Wknd')
            sch_rule.setApplySaturday(true)
            sch_rule.setApplySunday(true)
          end
          # Weekdays
          if day_types.include?('Wkdy')
            sch_rule.setApplyMonday(true)
            sch_rule.setApplyTuesday(true)
            sch_rule.setApplyWednesday(true)
            sch_rule.setApplyThursday(true)
            sch_rule.setApplyFriday(true)
          end
          # Individual Days
          sch_rule.setApplyMonday(true) if day_types.include?('Mon')
          sch_rule.setApplyTuesday(true) if day_types.include?('Tue')
          sch_rule.setApplyWednesday(true) if day_types.include?('Wed')
          sch_rule.setApplyThursday(true) if day_types.include?('Thu')
          sch_rule.setApplyFriday(true) if day_types.include?('Fri')
          sch_rule.setApplySaturday(true) if day_types.include?('Sat')
          sch_rule.setApplySunday(true) if day_types.include?('Sun')
        end
        if day_types.include?('WntrDsn')
          day_sch = OpenStudio::Model::ScheduleDay.new(space_type.model)
          lighting_sch_ruleset.setWinterDesignDaySchedule(day_sch)
          day_sch = lighting_sch_ruleset.winterDesignDaySchedule
          day_sch.setName("#{occupancy_schedule}-#{orig_lighting_sch}-#{lights_rel_absence_occ}-#{lights_personal_control}-#{lights_occ_sense}-Light Winter Design")
          model_add_vals_to_sch(space_type.model, day_sch, sch_type, hourly_occ_control)
        end
        if day_types.include?('SmrDsn')
          day_sch = OpenStudio::Model::ScheduleDay.new(space_type.model)
          lighting_sch_ruleset.setSummerDesignDaySchedule(day_sch)
          day_sch = lighting_sch_ruleset.summerDesignDaySchedule
          day_sch.setName("#{occupancy_schedule}-#{orig_lighting_sch}-#{lights_rel_absence_occ}-#{lights_personal_control}-#{lights_occ_sense}-Light Summer Design")
          model_add_vals_to_sch(space_type.model, day_sch, sch_type, hourly_occ_control)
        end
      end #rules.each do|rule|
      #set the lighting schedule
      unless lighting_sch_ruleset.nil?
        default_sch_set.setLightingSchedule(lighting_sch_ruleset)
        OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.SpaceType', "#{space_type.name.to_s} set lighting schedule to #{lighting_sch_ruleset}.")
      end
    end #if rules.size.zero? #does not exist
  end #if lighting_per_area <= 0.7999256505 #8.6 W/m2
end

#apply_maximum_loop_pump_power(model) ⇒ Object

Searches through any hydronic loops and applies the maxmimum total pump power by modifying the pump design power consumption. This is as per NECB2015 5.2.6.3.(1)



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/NECB2015/hvac_systems.rb', line 107

def apply_maximum_loop_pump_power(model)
  plant_loops = model.getPlantLoops
  return model if plant_loops.nil?
  plant_loops.each do |plantloop|
    next if plant_loop_swh_loop?(plantloop) == true
    pumps = []
    max_powertoload = 0
    total_pump_power = 0
    # This cycles through the plant loop supply side components to determine if there is a heat pump present or a pump
    # If a heat pump is present the pump power to total demand ratio is set to what NECB 2015 table 5.2.6.3. say it should be.
    # If a pump is present, this is a handy time to grab it for modification later.  Also, it adds the pump power consumption
    # to a total which will be used to determine how much to modify the pump power consumption later.
    max_total_loop_pump_power_table = @standards_data['max_total_loop_pump_power']
    plantloop.supplyComponents.each do |supplycomp|
      case supplycomp.iddObjectType.valueName.to_s
        when 'OS_CentralHeatPumpSystem', 'OS_Coil_Heating_WaterToAirHeatPump_EquationFit','OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFit','OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFit_SpeedData','OS_HeatPump_WaterToWater_EquationFit_Cooling','OS_HeatPump_WaterToWater_EquationFit_Heating'
          max_powertoload = model_find_object(max_total_loop_pump_power_table, {'hydronic_system_type' => 'WSHP'})['total_normalized_pump_power_wperkw']
        when 'OS_Pump_VariableSpeed'
          pumps << supplycomp.to_PumpVariableSpeed.get
          total_pump_power += model.getAutosizedValue(supplycomp, 'Design Power Consumption', 'W').to_f
        when 'OS_Pump_ConstantSpeed'
          pumps << supplycomp.to_PumpConstantSpeed.get
          total_pump_power += model.getAutosizedValue(supplycomp, 'Design Power Consumption', 'W').to_f
        when 'OS_HeaderedPumps_ConstantSpeed'
          OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.PlantLoop', "A pump used in the plant loop named #{plantloop.name.to_s} is headered.  This may result in an error and cause a failure.")
          pumps << supplycomp.to_HeaderedPumpsConstantSpeed.get
          total_pump_power += model.getAutosizedValue(supplycomp, 'Design Power Consumption', 'W').to_f
        when 'OS_HeaderedPumps_VariableSpeed'
          OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.PlantLoop', "A pump used in the plant loop named #{plantloop.name.to_s} is headered.  This may result in an error and cause a failure.")
          pumps << supplycomp.to_HeaderedPumpsVariableSpeed.get
          total_pump_power += model.getAutosizedValue(supplycomp, 'Design Power Consumption', 'W').to_f
      end
    end
    # If no pumps were found then there is nothing to set so go to the next plant loop
    next if pumps.length == 0
    # If a heat pump was found then the pump power to total demand ratio should have been set to what NECB 2015 table 5.2.6.3 says.
    # If the pump power to total demand ratio was not set then no heat pump was present so set according to if the plant loop is
    # used for heating, cooling, or heat rejection (condeser as OpenStudio calls it).
    unless max_powertoload > 0
      case plantloop.sizingPlant.loopType
        when 'Heating'
          max_powertoload = model_find_object(max_total_loop_pump_power_table, {'hydronic_system_type' => 'Heating'})['total_normalized_pump_power_wperkw']
        when 'Cooling'
          max_powertoload = model_find_object(max_total_loop_pump_power_table, {'hydronic_system_type' => 'Cooling'})['total_normalized_pump_power_wperkw']
        when 'Condenser'
          max_powertoload = model_find_object(max_total_loop_pump_power_table, {'hydronic_system_type' => 'Heat_rejection'})['total_normalized_pump_power_wperkw']
      end
    end
    # If nothing was found then do nothing (though by this point if nothing was found then an error should have been thrown).
    next if max_powertoload == 0
    # Get the capacity of the loop (using the more general method of calculating via maxflow*temp diff*density*heat capacity)
    # This is more general than the other method in Standards.PlantLoop.rb which only looks at heat and cooling.  Also,
    # that method looks for spceific equipment and would be thrown if other equipment was present.  However my method
    # only works for water for now.
    plantloop_capacity = plant_loop_capacity_W_by_maxflow_and_deltaT_forwater (plantloop)
    # Sizing factor is pump power (W)/ zone demand (in kW, as approximated using plant loop capacity).
    necb_pump_power_cap = plantloop_capacity*max_powertoload/1000
    pump_power_adjustment = necb_pump_power_cap/total_pump_power
    # Multiply the factor EnergyPlus uses to calculate the pump power by the sizing factor to make pump power in line with NECB 2015.
    pumps.each do |pump|
      case pump.designPowerSizingMethod
        when 'PowerPerFlowPerPressure'
          pump.setDesignShaftPowerPerUnitFlowRatePerUnitHead(pump.designShaftPowerPerUnitFlowRatePerUnitHead.to_f*pump_power_adjustment)
        when 'PowerPerFlow'
          pump.setDesignElectricPowerPerUnitFlowRate(pump.designElectricPowerPerUnitFlowRate.to_f*pump_power_adjustment)
      end
    end
  end
  return model
end

#chiller_electric_eir_apply_efficiency_and_curves(chiller_electric_eir, clg_tower_objs) ⇒ Bool

Applies the standard efficiency ratings and typical performance curves to this object.

Returns:

  • (Bool)

    true if successful, false if not



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
# File 'lib/openstudio-standards/standards/necb/NECB2015/hvac_systems.rb', line 6

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)
  if (capacity_w / 1000.0) < 2100.0
    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
    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['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.013 * 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

#load_qaqc_database_newObject



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
# File 'lib/openstudio-standards/standards/necb/NECB2015/qaqc/necb_2015_qaqc.rb', line 4

def load_qaqc_database_new()
  super()
  # replace 2011 to 2015 for all references in the tables.
  # puts JSON.pretty_generate( @standards_data['tables'] )
  @qaqc_data['tables'].each do |table|
    if table.has_key?('refs')
      # check if the reference is an array
      if table['refs'].is_a?(Array)
        table['refs'].each {|item|
          # Supply air system - necb_design_supply_temp_compliance
          item.gsub!('NECB2011-8.4.4.19', 'NECB2015-8.4.4.18')
          # Zone sizing compliance - Re: heating_sizing_factor and cooling_sizing_factor
          item.gsub!('NECB2011-8.4.4.9', 'NECB2015-8.4.4.8')
          item.gsub!('NECB2011', 'NECB2015')
        }
        # if the reference is a hash (e.g. see space.json compliance), then
        # replace the 2011 in the value with 2015
      elsif table['refs'].is_a?(Hash)
        table['refs'].keys.each  {|key|
          table['refs'][key].gsub!('NECB2011', 'NECB2015') unless table['refs'][key].nil?
        }
      end
    end
  end

  # Overwrite the data present from 2011 with the data read from the JSON files
  files = Dir.glob("#{File.dirname(__FILE__)}/qaqc_data/*.json").select {|e| File.file? e}
  puts "\n\n#{files}\n\n"
  files.each do |file|
    puts "loading standards data from #{file}"
    data = JSON.parse(File.read(file))
    if not data["tables"].nil? and data["tables"].first["data_type"] =="table"
      @qaqc_data["tables"] << data["tables"].first
    else
      @qaqc_data[data.keys.first] = data[data.keys.first]
    end
  end

  #needed for compatibility of standards database format
  @qaqc_data['tables'].each do |table|
    @qaqc_data[table['name']] = table
  end
  return @qaqc_data
end

#load_standards_database_newObject



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
# File 'lib/openstudio-standards/standards/necb/NECB2015/necb_2015.rb', line 15

def load_standards_database_new()
  #load NECB2011 data.
  super()
  #replace template to 2015 for all tables.
  #puts JSON.pretty_generate( @standards_data['tables'] )
  @standards_data['tables'].each do |key,value|
    value['table'].each do |row|
      ["lighting_standard", "ventilation_standard", "template"].each do |item|
        row[item].gsub!('NECB2011', 'NECB2015') unless row[item].nil?
      end
    end
  end

  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_standard(model:, epw_file:, debug: false, sizing_run_dir: Dir.pwd, x_scale: 1.0, y_scale: 1.0, z_scale: 1.0, fdwr_set: 1.1, srr_set: 1.1, new_auto_zoner: false) ⇒ Object

Created this method so that additional methods can be addded for bulding the prototype model in later code versions without modifying the build_protoype_model method or copying it wholesale for a few changes.



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
# File 'lib/openstudio-standards/standards/necb/NECB2015/necb_2015.rb', line 60

def model_apply_standard(model:,
                         epw_file:,
                         debug: false,
                         sizing_run_dir: Dir.pwd,
                         x_scale: 1.0,
                         y_scale: 1.0,
                         z_scale: 1.0,
                         fdwr_set: 1.1,
                         srr_set: 1.1,
                         new_auto_zoner: false)

  #Run everything like parent NECB2011 'model_apply_standard' method.
  model = super(model: model,
                epw_file: epw_file,
                debug: debug,
                sizing_run_dir: sizing_run_dir,
                x_scale: x_scale,
                y_scale: y_scale,
                z_scale: z_scale,
                fdwr_set: fdwr_set,
                srr_set: srr_set)
  # NECB2015 Custom code
  # Do another sizing run to take into account adjustments to equipment efficiency etc. on capacities. This was done primarily
  # because the cooling tower loop capacity is affected by the chiller COP.  If the chiller COP is not properly set then
  # the cooling tower loop capacity can be significantly off which will affect the NECB 2015 maximum loop pump capacity.  Found
  # all sizing was off somewhat if the additional sizing run was not done.
  if model_run_sizing_run(model, "#{sizing_run_dir}/SR2") == false
    raise("sizing run 2 failed!")
  end
  # Apply maxmimum loop pump power normalized by peak demand by served spaces as per NECB2015 5.2.6.3.(1)
  apply_maximum_loop_pump_power(model)

  # Remove duplicate materials and constructions
  # Note For NECB2015 This is the 2nd time this method is bieng run.
  # First time it ran in the super() within model_apply_standard() method
  model  = BTAP::FileIO::remove_duplicate_materials_and_constructions(model)
  return model
end

#necb_envelope_compliance(qaqc) ⇒ Object



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
# File 'lib/openstudio-standards/standards/necb/NECB2015/qaqc/necb_2015_qaqc.rb', line 50

def necb_envelope_compliance(qaqc)
  puts "\nUsing necb_envelope_compliance in NECB2015 Class\n"
  # Envelope
  necb_section_name = "NECB2015-Section 3.2.1.4"
  # store hdd in short form
  hdd = qaqc[:geography][:hdd]
  # calculate fdwr based on hdd.
  # [fdwr] *maximum* allowable total vertical fenestration and door area to
  # gross wall area ratio
  fdwr = 0
  # if hdd < 4000 [NECB 2011]
  if hdd <= 4000
    fdwr = 0.40
    # elsif hdd >= 4000 and hdd <=7000 [NECB 2011]
  elsif hdd > 4000 and hdd <7000
    fdwr = (2000-0.2 * hdd)/3000
    # elsif hdd >7000   [NECB 2011]
  elsif hdd >=7000
    fdwr = 0.20
  end
  #hardset srr to 0.05
  srr = 0.05

  # perform test. result must be equal to.
  necb_section_test(
      qaqc,
      (fdwr * 100), # fdwr is the maximum value possible
      '>=', # NECB 2011 [No Change]
      qaqc[:envelope][:fdwr].round(3),
      necb_section_name,
      "[ENVELOPE]fenestration_to_door_and_window_percentage",
      1 #padmassun added tollerance
  )

  # The total skylight area shall be less than 5% of gross roof area as determined
  # in article 3.1.1.6
  necb_section_test(
      qaqc,
      (srr * 100),
      '>=', # NECB 2011 [No Change]
      qaqc[:envelope][:srr].round(3),
      necb_section_name,
      "[ENVELOPE]skylight_to_roof_percentage",
      1 #padmassun added tollerance
  )
end

#necb_qaqc(qaqc, model) ⇒ Object



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/NECB2015/qaqc/necb_2015_qaqc.rb', line 150

def necb_qaqc(qaqc, model)
  puts "\n\nin necb_qaqc 2015 now\n\n"
  #Now perform basic QA/QC on items for NECB2015
  qaqc[:information] = []
  qaqc[:warnings] =[]
  qaqc[:errors] = []
  qaqc[:unique_errors]=[]

  necb_space_compliance(qaqc)

  necb_envelope_compliance(qaqc) # [DONE]

  necb_infiltration_compliance(qaqc, model) # [DONE-NC]

  necb_exterior_opaque_compliance(qaqc) # [DONE-NC]

  necb_exterior_fenestration_compliance(qaqc) # [DONE-NC]

  necb_exterior_ground_surfaces_compliance(qaqc) # [DONE-NC]

  necb_zone_sizing_compliance(qaqc) # [DONE] made changes to NECB section numbers

  necb_design_supply_temp_compliance(qaqc) # [DONE] made changes to NECB section numbers

  # Cannot implement 5.2.2.8.(4) and 5.2.2.8.(5) due to OpenStudio's limitation.
  necb_economizer_compliance(qaqc) # [DONE-NC]

  #NECB code regarding MURBS (ยง5.2.10.4) has not been implemented in both NECB 2011 and 2015
  necb_hrv_compliance(qaqc, model) # [DONE-NC]

  necb_vav_fan_power_compliance(qaqc) # [DONE-NC]

  sanity_check(qaqc)

  necb_plantloop_sanity(qaqc)

  qaqc[:information] = qaqc[:information].sort
  qaqc[:warnings] = qaqc[:warnings].sort
  qaqc[:errors] = qaqc[:errors].sort
  qaqc[:unique_errors]= qaqc[:unique_errors].sort
  return qaqc
end

#necb_space_compliance(qaqc) ⇒ Object



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
# File 'lib/openstudio-standards/standards/necb/NECB2015/qaqc/necb_2015_qaqc.rb', line 97

def necb_space_compliance(qaqc)
  #    #Padmassun's Code Start
  #csv_file_name ="#{File.dirname(__FILE__)}/necb_2011_spacetype_info.csv"
  qaqc[:spaces].each do |space|
    building_type =""
    space_type =""
    if space[:space_type_name].include? 'Space Function '
      space_type = (space[:space_type_name].to_s.rpartition('Space Function '))[2].strip
      building_type = 'Space Function'
    elsif space[:space_type_name].include? ' WholeBuilding'
      space_type = (space[:space_type_name].to_s.rpartition(' WholeBuilding'))[0].strip
      building_type = 'WholeBuilding'
    end

    ["occupancy_per_area_people_per_m2", "occupancy_schedule", "electric_equipment_per_area_w_per_m2"].each {|compliance_var|
      #qaqc_table = get_qaqc_table("space_compliance", {"template" => 'NECB2015', "building_type" => building_type, "space_type" => space_type}).first
      #qaqc_table = @qaqc_data['space_compliance']

      search_criteria = {"template" => 'NECB2015', "building_type" => building_type, "space_type" => space_type}
      table_to_search = @standards_data[@qaqc_data['space_compliance']]
      qaqc_table = model_find_objects(table_to_search, search_criteria)
      qaqc_table = qaqc_table.first
      puts"{\"building_type\" => #{building_type}, \"space_type\" => #{space_type}}"
      puts "#{qaqc_table}\n\n"

      necb_section_name = get_qaqc_table("space_compliance")['refs'][compliance_var]
      tolerance = get_qaqc_table("space_compliance")['tolerance'][compliance_var]
      # puts "\ncompliance_var:#{compliance_var}\n\tnecb_section_name:#{necb_section_name}\n\texp Value:#{qaqc_table[compliance_var]}\n"
      if compliance_var =="occupancy_per_area_people_per_m2"
        result_value = space[:occ_per_m2]
      elsif compliance_var =="occupancy_schedule"
        result_value = space[:occupancy_schedule]
      elsif compliance_var =="electric_equipment_per_area_w_per_m2"
        result_value = space[:electric_w_per_m2]
      end

      test_text = "[SPACE][#{space[:name]}]-[TYPE:][#{space_type}]-#{compliance_var}"
      next if result_value.nil?
      necb_section_test(
          qaqc,
          result_value,
          '==',
          qaqc_table[compliance_var],
          necb_section_name,
          test_text,
          tolerance
      )
    }

  end
  #Padmassun's Code End
end

#set_lighting_per_area(space_type, definition, lighting_per_area) ⇒ Object



2
3
4
5
# File 'lib/openstudio-standards/standards/necb/NECB2015/lighting.rb', line 2

def set_lighting_per_area(space_type, definition, lighting_per_area)
  definition.setWattsperSpaceFloorArea(OpenStudio.convert(lighting_per_area.to_f, 'W/ft^2', 'W/m^2').get)
  OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.SpaceType', "#{space_type.name} set LPD to #{lighting_per_area} W/ft^2.")
end

#set_occ_sensor_spacetypes(model, space_type_map) ⇒ Object

occupancy sensor control applied using lighting schedule, see apply_lighting_schedule method



100
101
102
# File 'lib/openstudio-standards/standards/necb/NECB2015/necb_2015.rb', line 100

def set_occ_sensor_spacetypes(model, space_type_map)
  return true
end