Class: NECB2020

Inherits:
NECB2017 show all
Defined in:
lib/openstudio-standards/standards/necb/NECB2020/necb_2020.rb,
lib/openstudio-standards/standards/necb/NECB2020/building_envelope.rb,
lib/openstudio-standards/standards/necb/NECB2020/service_water_heating.rb

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 NECB2017

#air_loop_hvac_energy_recovery_ventilator_required?, #set_lighting_per_area_led_lighting

Methods inherited from NECB2015

#apply_lighting_schedule, #apply_loop_pump_power, #apply_maximum_loop_pump_power, #chiller_electric_eir_apply_efficiency_and_curves, #load_qaqc_database_new, #necb_envelope_compliance, #necb_qaqc, #necb_space_compliance, #set_lighting_per_area, #set_lighting_per_area_led_lighting, #set_occ_sensor_spacetypes

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_sys3_and_8_zone_equip, #add_sys3and8_single_zone_packaged_rooftop_unit_with_baseboard_heating, #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_sys6_multi_zone_reference_hp_with_baseboard_heating, #add_system_3_and_8_airloop, #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_energy_recovery_ventilator_required?, #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_fdwr_srr_daylighting, #apply_kiva_foundation, #apply_limit_fdwr, #apply_loads, #apply_loop_pump_power, #apply_max_fdwr_nrcan, #apply_max_srr_nrcan, #apply_standard_efficiencies, #apply_standard_lights, #apply_standard_skylight_to_roof_ratio, #apply_standard_window_to_wall_ratio, #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, #chiller_electric_eir_apply_efficiency_and_curves, #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, #new_add_sys6_multi_zone_built_up_system_with_baseboard_heating, #percentage_difference, #pump_standard_minimum_motor_efficiency_and_size, #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_surface_conductance, #set_occ_sensor_spacetypes, #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_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, #validate_primary_heating_fuel, #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_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_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_apply_efficiency_and_curves, #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_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_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, #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_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

#initializeNECB2020

Returns a new instance of NECB2020.



17
18
19
20
21
22
# File 'lib/openstudio-standards/standards/necb/NECB2020/necb_2020.rb', line 17

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

Instance Method Details

#apply_standard_construction_properties(model:, necb_hdd: true, 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, fixed_window_cond: nil, fixed_wind_solar_trans: nil, fixed_wind_vis_trans: nil, operable_wind_solar_trans: nil, operable_window_cond: nil, operable_wind_vis_trans: nil, glass_door_cond: nil, glass_door_solar_trans: nil, glass_door_vis_trans: nil, door_construction_cond: nil, overhead_door_cond: nil, skylight_cond: nil, skylight_solar_trans: nil, skylight_vis_trans: nil, tubular_daylight_dome_cond: nil, tubular_daylight_dome_solar_trans: nil, tubular_daylight_dome_vis_trans: nil, tubular_daylight_diffuser_cond: nil, tubular_daylight_diffuser_solar_trans: nil, tubular_daylight_diffuser_vis_trans: nil) ⇒ 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



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

def apply_standard_construction_properties(model:,
                                           necb_hdd: true,
                                           runner: nil,
                                           # ext surfaces
                                           ext_wall_cond: nil,
                                           ext_floor_cond: nil,
                                           ext_roof_cond: nil,
                                           # ground surfaces
                                           ground_wall_cond: nil,
                                           ground_floor_cond: nil,
                                           ground_roof_cond: nil,
                                           # fixed Windows
                                           fixed_window_cond: nil,
                                           fixed_wind_solar_trans: nil,
                                           fixed_wind_vis_trans: nil,
                                           # operable windows
                                           operable_wind_solar_trans: nil,
                                           operable_window_cond: nil,
                                           operable_wind_vis_trans: nil,
                                           # glass doors
                                           glass_door_cond: nil,
                                           glass_door_solar_trans: nil,
                                           glass_door_vis_trans: nil,
                                           # opaque doors
                                           door_construction_cond: nil,
                                           overhead_door_cond: nil,
                                           # skylights
                                           skylight_cond: nil,
                                           skylight_solar_trans: nil,
                                           skylight_vis_trans: nil,
                                           # tubular daylight dome
                                           tubular_daylight_dome_cond: nil,
                                           tubular_daylight_dome_solar_trans: nil,
                                           tubular_daylight_dome_vis_trans: nil,
                                           # tubular daylight diffuser
                                           tubular_daylight_diffuser_cond: nil,
                                           tubular_daylight_diffuser_solar_trans: nil,
                                           tubular_daylight_diffuser_vis_trans: nil)

  model.getDefaultConstructionSets.sort.each do |default_surface_construction_set|
    BTAP.runner_register('Info', 'apply_standard_construction_properties', runner)
    if model.weatherFile.empty? || model.weatherFile.get.path.empty? || !File.exist?(model.weatherFile.get.path.get.to_s)

      BTAP.runner_register('Error', 'Weather file is not defined. Please ensure the weather file is defined and exists.', runner)
      return false
    end

    # hdd required to get correct conductance values from the json file. 
    hdd = get_necb_hdd18(model: model, necb_hdd: necb_hdd)
 
    # Lambdas are preferred over methods in methods for small utility methods.
    correct_cond = lambda do |conductivity, surface_type|
      return conductivity.nil? || conductivity.to_f <= 0.0 || conductivity == "NECB_Default" ? eval(model_find_objects(@standards_data['surface_thermal_transmittance'], surface_type)[0]['formula']) : conductivity.to_f
    end

    # Converts trans and vis to nil if requesting default.. or casts the string to a float.
    correct_vis_trans = lambda do |value|
      return value.nil? || value.to_f <= 0.0 || value == "NECB_Default" ? nil : value.to_f
    end

    BTAP::Resources::Envelope::ConstructionSets.customize_default_surface_construction_set!(model: model,
                                                                                            name: "#{default_surface_construction_set.name.get} at hdd = #{hdd}",
                                                                                            default_surface_construction_set: default_surface_construction_set,
                                                                                            # ext surfaces
                                                                                            ext_wall_cond: correct_cond.call(ext_wall_cond, {'boundary_condition' => 'Outdoors', 'surface' => 'Wall'}),
                                                                                            ext_floor_cond: correct_cond.call(ext_floor_cond, {'boundary_condition' => 'Outdoors', 'surface' => 'Floor'}),
                                                                                            ext_roof_cond: correct_cond.call(ext_roof_cond, {'boundary_condition' => 'Outdoors', 'surface' => 'RoofCeiling'}),
                                                                                            # ground surfaces
                                                                                            ground_wall_cond: correct_cond.call(ground_wall_cond, {'boundary_condition' => 'Ground', 'surface' => 'Wall'}),
                                                                                            ground_floor_cond: correct_cond.call(ground_floor_cond, {'boundary_condition' => 'Ground', 'surface' => 'Floor'}),
                                                                                            ground_roof_cond: correct_cond.call(ground_roof_cond, {'boundary_condition' => 'Ground', 'surface' => 'RoofCeiling'}),
                                                                                            # fixed Windows
                                                                                            fixed_window_cond: correct_cond.call(fixed_window_cond, {'boundary_condition' => 'Outdoors', 'surface' => 'Window'}),
                                                                                            fixed_wind_solar_trans: correct_vis_trans.call(fixed_wind_solar_trans),
                                                                                            fixed_wind_vis_trans: correct_vis_trans.call(fixed_wind_vis_trans),
                                                                                            # operable windows
                                                                                            operable_wind_solar_trans: correct_vis_trans.call(operable_wind_solar_trans),
                                                                                            operable_window_cond: correct_cond.call(fixed_window_cond, {'boundary_condition' => 'Outdoors', 'surface' => 'Window'}),
                                                                                            operable_wind_vis_trans: correct_vis_trans.call(operable_wind_vis_trans),
                                                                                            # glass doors
                                                                                            glass_door_cond: correct_cond.call(glass_door_cond, {'boundary_condition' => 'Outdoors', 'surface' => 'Window'}),
                                                                                            glass_door_solar_trans: correct_vis_trans.call(glass_door_solar_trans),
                                                                                            glass_door_vis_trans: correct_vis_trans.call(glass_door_vis_trans),
                                                                                            # opaque doors
                                                                                            door_construction_cond: correct_cond.call(door_construction_cond, {'boundary_condition' => 'Outdoors', 'surface' => 'Door'}),
                                                                                            overhead_door_cond: correct_cond.call(overhead_door_cond, {'boundary_condition' => 'Outdoors', 'surface' => 'Door'}),
                                                                                            # skylights
                                                                                            skylight_cond: correct_cond.call(skylight_cond, {'boundary_condition' => 'Outdoors', 'surface' => 'Skylight'}),
                                                                                            skylight_solar_trans: correct_vis_trans.call(skylight_solar_trans),
                                                                                            skylight_vis_trans: correct_vis_trans.call(skylight_vis_trans),
                                                                                            # tubular daylight dome
                                                                                            tubular_daylight_dome_cond: correct_cond.call(skylight_cond, {'boundary_condition' => 'Outdoors', 'surface' => 'Skylight'}),
                                                                                            tubular_daylight_dome_solar_trans: correct_vis_trans.call(tubular_daylight_dome_solar_trans),
                                                                                            tubular_daylight_dome_vis_trans: correct_vis_trans.call(tubular_daylight_dome_vis_trans),
                                                                                            # tubular daylight diffuser
                                                                                            tubular_daylight_diffuser_cond: correct_cond.call(skylight_cond, {'boundary_condition' => 'Outdoors', 'surface' => 'Skylight'}),
                                                                                            tubular_daylight_diffuser_solar_trans: correct_vis_trans.call(tubular_daylight_diffuser_solar_trans),
                                                                                            tubular_daylight_diffuser_vis_trans: correct_vis_trans.call(tubular_daylight_diffuser_vis_trans)
    )
  end
  # sets all surfaces to use default constructions sets except adiabatic, where it does a hard assignment of the interior wall construction type.
  model.getPlanarSurfaces.sort.each(&:resetConstruction)
  # if the default construction set is defined..try to assign the interior wall to the adiabatic surfaces
  BTAP::Resources::Envelope.assign_interior_surface_construction_to_adiabatic_surfaces(model, nil)
  BTAP.runner_register('Info', ' apply_standard_construction_properties was sucessful.', runner)
end

#load_standards_database_newObject



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/NECB2020/necb_2020.rb', line 24

def load_standards_database_new
  # load NECB2020 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 test report file.
  # 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

#set_necb_external_subsurface_conductance(subsurface, hdd) ⇒ Object

Set all external subsurfaces (doors, windows, skylights) to NECB values.

Parameters:

  • subsurface (String)
  • hdd (Float)

Author:



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# File 'lib/openstudio-standards/standards/necb/NECB2020/building_envelope.rb', line 124

def set_necb_external_subsurface_conductance(subsurface, hdd)
  conductance_value = 0

  if subsurface.outsideBoundaryCondition.downcase.match('outdoors')
    case subsurface.subSurfaceType.downcase
    when /window/
      conductance_value = @standards_data['conductances']['Window'].find { |i| i['hdd'] > hdd }['thermal_transmittance'] * scaling_factor
    when /skylight/
      conductance_value = @standards_data['conductances']['Skylight'].find { |i| i['hdd'] > hdd }['thermal_transmittance'] * scaling_factor
    when /door/
      conductance_value = @standards_data['conductances']['Door'].find { |i| i['hdd'] > hdd }['thermal_transmittance'] * scaling_factor
    end
    subsurface.setRSI(1 / conductance_value)
  end
end

#space_apply_infiltration_rate(space) ⇒ Double

TODO:

handle doors and vestibules

Set the infiltration rate for this space to include the impact of air leakage requirements in the standard.

Note that this is significantly different for NECB 2020 compared to previous codes.

The value is now specified at 75 Pa normalised by entire building surface area (previously 5 Pa
and for above grade surfaces only). Need to convert to 5 Pa and for the different surface area.

Returns:

  • (Double)

    true if successful, false if not



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
# File 'lib/openstudio-standards/standards/necb/NECB2020/necb_2020.rb', line 67

def space_apply_infiltration_rate(space)

  # Remove infiltration rates set at the space type.
  infiltration_data = @standards_data['infiltration']
  unless space.spaceType.empty?
    space.spaceType.get.spaceInfiltrationDesignFlowRates.each(&:remove)
  end
  # Remove infiltration rates set at the space object.
  space.spaceInfiltrationDesignFlowRates.each(&:remove)

  # Don't create an object if there is no exterior wall area.
  exterior_wall_and_roof_and_subsurface_area = OpenstudioStandards::Geometry.space_get_exterior_wall_and_subsurface_and_roof_area(space)
  if exterior_wall_and_roof_and_subsurface_area <= 0.0
    OpenStudio.logFree(OpenStudio::Info, 'openstudio.Standards.Model', "For #{template}, no exterior wall area was found in #{space.name}; no infiltration will be added.")
    return true
  end

  # Calculate total area of above and below grade envelope area in the entire model.
  totalAreaBuildingEnvelope = 0.0
  totalAboveGradeArea = 0.0

	space.model.getSpaces.each do |modelspace|
 multiplier = modelspace.multiplier
 modelspace.surfaces.each do |surface|
   if surface.outsideBoundaryCondition == "Outdoors" then
  area = surface.grossArea * multiplier
        totalAreaBuildingEnvelope += area
        totalAboveGradeArea += area
elsif surface.outsideBoundaryCondition == "Ground" then
  area = surface.grossArea * multiplier
        totalAreaBuildingEnvelope += area
end
 end
	end

	# Get infiltration rate from standards and convert to value at 5 Pa applied to all above grade surfaces.
  infil_75Pa_all_surf = self.get_standards_constant('infiltration_rate_m3_per_s_per_m2')
  infil_5Pa_above_grade = infil_75Pa_all_surf * ((5.0 / 75.0) ** (0.6)) * totalAreaBuildingEnvelope / totalAboveGradeArea
  OpenStudio.logFree(OpenStudio::Debug, 'openstudio.Standards.Space', "For #{space.name}, adj infil = #{infil_5Pa_above_grade.round(5)} m^3/s*m^2.")

  # Get any infiltration schedule already assigned to this space or its space type
  # If not, the always on schedule will be applied.
  infil_sch = nil
  unless space.spaceInfiltrationDesignFlowRates.empty?
    old_infil = space.spaceInfiltrationDesignFlowRates[0]
    if old_infil.schedule.is_initialized
      infil_sch = old_infil.schedule.get
    end
  end

  if infil_sch.nil? && space.spaceType.is_initialized
    space_type = space.spaceType.get
    unless space_type.spaceInfiltrationDesignFlowRates.empty?
      old_infil = space_type.spaceInfiltrationDesignFlowRates[0]
      if old_infil.schedule.is_initialized
        infil_sch = old_infil.schedule.get
      end
    end
  end

  if infil_sch.nil?
    infil_sch = space.model.alwaysOnDiscreteSchedule
  end

  # Create an infiltration rate object for this space.
  infiltration = OpenStudio::Model::SpaceInfiltrationDesignFlowRate.new(space.model)
  infiltration.setName("#{space.name} Infiltration")
  infiltration.setFlowperExteriorSurfaceArea(infil_5Pa_above_grade)
  infiltration.setSchedule(infil_sch)
  infiltration.setConstantTermCoefficient(self.get_standards_constant('infiltration_constant_term_coefficient'))
  infiltration.setTemperatureTermCoefficient(self.get_standards_constant('infiltration_constant_term_coefficient'))
  infiltration.setVelocityTermCoefficient(self.get_standards_constant('infiltration_velocity_term_coefficient'))
  infiltration.setVelocitySquaredTermCoefficient(self.get_standards_constant('infiltration_velocity_squared_term_coefficient'))
  infiltration.setSpace(space)
  return true
end

#water_heater_mixed_apply_efficiency(water_heater_mixed) ⇒ Boolean

Applies the standard efficiency ratings and typical losses and paraisitic loads to this object. Efficiency and skin loss coefficient (UA) Per PNNL www.energycodes.gov/sites/default/files/documents/PrototypeModelEnhancements_2014_0.pdf Appendix A: Service Water Heating

NECB2020 uses a different procedure calculate gas water heater efficiencies (compared to previous NECB)

Returns:

  • (Boolean)

    true if successful, false if not



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
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
# File 'lib/openstudio-standards/standards/necb/NECB2020/service_water_heating.rb', line 12

def water_heater_mixed_apply_efficiency(water_heater_mixed)
  # Get the capacity of the water heater
  # @todo add capability to pull autosized water heater capacity
  # if the Sizing:WaterHeater object is ever implemented in OpenStudio.
  capacity_w = water_heater_mixed.heaterMaximumCapacity
  if capacity_w.empty?
    OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.WaterHeaterMixed', "For #{water_heater_mixed.name}, cannot find capacity, standard will not be applied.")
    return false
  else
    capacity_w = capacity_w.get
  end
  capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
  capacity_kbtu_per_hr = OpenStudio.convert(capacity_w, 'W', 'kBtu/hr').get

  # Get the volume of the water heater
  # @todo add capability to pull autosized water heater volume
  # if the Sizing:WaterHeater object is ever implemented in OpenStudio.
  volume_m3 = water_heater_mixed.tankVolume
  if volume_m3.empty?
    OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.WaterHeaterMixed', "For #{water_heater_mixed.name}, cannot find volume, standard will not be applied.")
    return false
  else
    volume_m3 = volume_m3.get
  end
  volume_gal = OpenStudio.convert(volume_m3, 'm^3', 'gal').get
  volume_litre = OpenStudio.convert(volume_m3, 'm^3', 'L').get
  # Get the heater fuel type
  fuel_type = water_heater_mixed.heaterFuelType
  unless fuel_type == 'NaturalGas' || fuel_type == 'Electricity' || fuel_type == 'FuelOilNo2'
    OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.WaterHeaterMixed', "For #{water_heater_mixed.name}, fuel type of #{fuel_type} is not yet supported, standard will not be applied.")
  end

  # Calculate the water heater efficiency and
  # skin loss coefficient (UA)
  # Calculate the energy factor (EF)
  # From PNNL http://www.energycodes.gov/sites/default/files/documents/PrototypeModelEnhancements_2014_0.pdf
  # Appendix A: Service Water Heating
 # and modified by PCF 1630 as noted below.

  water_heater_eff = nil
  ua_btu_per_hr_per_f = nil
  sl_btu_per_hr = nil
  q_load_btu_per_hr = nil
  uef = nil
  case fuel_type
  when 'Electricity'
    volume_litre_per_s = volume_m3 * 1000
    if capacity_btu_per_hr <= OpenStudio.convert(12, 'kW', 'Btu/hr').get
      # Fixed water heater efficiency per PNNL
      water_heater_eff = 1
      # Calculate the max allowable standby loss (SL)
      sl_w = if volume_litre_per_s < 270
               40 + 0.2 * volume_litre_per_s # assume bottom inlet
             else
               0.472 * volume_litre_per_s - 33.5
               # assume bottom inlet
             end
      sl_btu_per_hr = OpenStudio.convert(sl_w, 'W', 'Btu/hr').get
    else
      # Fixed water heater efficiency per PNNL
      water_heater_eff = 1
      # Calculate the max allowable standby loss (SL)   # use this - NECB does not give SL calculation for cap > 12 kW
      sl_w = 0.3 + 102.2/volume_litre_per_s
      sl_btu_per_hr = OpenStudio.convert(sl_w, 'W', 'Btu/hr').get
    end
    # Calculate the skin loss coefficient (UA)
    ua_btu_per_hr_per_f = sl_btu_per_hr / 70
  when 'NaturalGas', 'FuelOilNo2'
    # Performance requirements from NECB2020 Table 6.2.2.1 Gas-fired storage type
    
    # Performance requirement based on FHR and volume
    # Water heater parameters derived using the procedure described by:
    #   Maguire, J., & Roberts, D. (2020). DERIVING SIMULATION PARAMETERS FOR STORAGE-TYPE WATER HEATERS 
    #   USING RATINGS DATA PRODUCED FROM THE UNIFORM ENERGY FACTOR TEST PROCEDURE. 2020 Building Performance 
    #   Analysis Conference and SimBuild co-organized by ASHRAE and IBPSA-USA (pp. 325-331). Chicago: ASHRAE.
    #   https://www.ashrae.org/file%20library/conferences/specialty%20conferences/2020%20building%20performance/papers/d-bsc20-c039.pdf
    #
    #   AND
    #
    #   PNNL http://www.energycodes.gov/sites/default/files/documents/PrototypeModelEnhancements_2014_0.pdf

    # Assume fhr = peak demand flow
    tank_param = auto_size_shw_capacity(model:water_heater_mixed.model, shw_scale: 'NECB_Default')
    fhr_L_per_hr = tank_param['loop_peak_flow_rate_SI']
    fhr_L_per_hr = fhr_L_per_hr * 3600000
    if capacity_w <= 22000 and volume_litre >= 76 and volume_litre < 208
      if fhr_L_per_hr < 68
        uef = 0.3456 - 0.00053*volume_litre
        q_load_btu_per_hr = 5561
        volume_drawn_gal = 10
      elsif fhr_L_per_hr >= 68 and fhr_L_per_hr < 193
        uef = 0.5982 - 0.00050*volume_litre
        q_load_btu_per_hr = 21131
        volume_drawn_gal = 38
      elsif fhr_L_per_hr >= 193 and fhr_L_per_hr < 284
        uef = 0.6483 - 0.00045*volume_litre
        q_load_btu_per_hr = 30584
        volume_drawn_gal = 55
      elsif fhr_L_per_hr >= 284 
        uef = 0.6920 - 0.00034*volume_litre
        q_load_btu_per_hr = 46710
        volume_drawn_gal = 84
      end

      # Assume burner efficiency  (PNNL)
      water_heater_eff = 0.82

      # Estimate recovery efficiency (RE) and UA (Maguire and Robers, 2020)
      q_load_btu = volume_drawn_gal*8.30074*0.99826*(125-58) #water properties at 91.5F
      capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
      re = water_heater_eff + q_load_btu*(uef-water_heater_eff)/(24*capacity_btu_per_hr*uef)
      ua_btu_per_hr_per_f = (water_heater_eff-re)*capacity_btu_per_hr/(125-67.5)  

    elsif capacity_w <= 22000 and volume_litre >= 208 and volume_litre < 380
      if fhr_L_per_hr < 68
        uef = 0.6470 - 0.00016*volume_litre
        q_load_btu_per_hr = 5561
        volume_drawn_gal = 10
      elsif fhr_L_per_hr >= 68 and fhr_L_per_hr < 193
        uef = 0.7689 - 0.00013*volume_litre
        q_load_btu_per_hr = 21131
        volume_drawn_gal = 38
      elsif fhr_L_per_hr >= 193 and fhr_L_per_hr < 284
        uef = 0.7897 - 0.00011*volume_litre
        q_load_btu_per_hr = 30584
        volume_drawn_gal = 55
      elsif fhr_L_per_hr >= 284 
        uef = 0.8072 - 0.00008*volume_litre
        q_load_btu_per_hr = 46710
        volume_drawn_gal = 84
      end

      # Assume burner  efficiency  (PNNL)
      water_heater_eff = 0.82

      # Estimate recovery efficiency (RE) and UA (Maguire and Robers, 2020)
      q_load_btu = volume_drawn_gal*8.30074*0.99826*(125-58) #water properties at 91.5F
      capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
      # Estimate recovery efficiency (RE) and UA (Maguire and Robers, 2020)
      re = water_heater_eff + q_load_btu*(uef-water_heater_eff)/(24*capacity_btu_per_hr*uef)
      ua_btu_per_hr_per_f = (water_heater_eff-re)*capacity_btu_per_hr/(125-67.5)      

    elsif capacity_w > 22000 and capacity_w <= 30500 and volume_litre <= 454 
      # NOTE: volume_litre 454L in this case, refers to manufacturer stated volume.
      # Assume manufacturer rated volume = actual tank volume (value used in EnergyPlus)
      
      uef = 0.8107 - 0.00021*volume_litre

      # Assume burner efficiency  (PNNL)
      water_heater_eff = 0.82

      # Estimate recovery efficiency (RE) and UA (Maguire and Robers, 2020)
      capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
      if fhr_L_per_hr < 68
        q_load_btu_per_hr = 5561
        volume_drawn_gal = 10
      elsif fhr_L_per_hr >= 68 and fhr_L_per_hr < 193
        q_load_btu_per_hr = 21131
        volume_drawn_gal = 38
      elsif fhr_L_per_hr >= 193 and fhr_L_per_hr < 284
        q_load_btu_per_hr = 30584
        volume_drawn_gal = 55
      elsif fhr_L_per_hr >= 284 
        q_load_btu_per_hr = 46710
        volume_drawn_gal = 84
      end
      q_load_btu = volume_drawn_gal*8.30074*0.99826*(125-58) #water properties at 91.5F

      # Estimate recovery efficiency (RE) and UA (Maguire and Robers, 2020)
      re = water_heater_eff + q_load_btu*(uef-water_heater_eff)/(24*capacity_btu_per_hr*uef)
      ua_btu_per_hr_per_f = (water_heater_eff-re)*capacity_btu_per_hr/(125-67.5)      
      
    else # all other water heaters
      capacity_kw = capacity_w/1000
      capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
      # thermal efficiency (NECB2020)
      et = 0.9
      # maximum standby losses
      sl_w = 0.84*(1.25*capacity_kw + 16.57*(volume_litre**0.5))
      sl_btu_per_hr = OpenStudio.convert(sl_w, 'W', 'Btu/hr').get
      ua_btu_per_hr_per_f = sl_btu_per_hr*et / 70
      water_heater_eff = (ua_btu_per_hr_per_f*70 + capacity_btu_per_hr*et)/capacity_btu_per_hr
    end
  end

  # Convert to SI
  ua_w_per_k = OpenStudio.convert(ua_btu_per_hr_per_f, 'Btu/hr*R', 'W/K').get
  # Set the water heater properties
  # Efficiency
  water_heater_mixed.setHeaterThermalEfficiency(water_heater_eff)
  # Skin loss
  water_heater_mixed.setOffCycleLossCoefficienttoAmbientTemperature(ua_w_per_k)
  water_heater_mixed.setOnCycleLossCoefficienttoAmbientTemperature(ua_w_per_k)
  # @todo Parasitic loss (pilot light)
  # PNNL document says pilot lights were removed, but IDFs
  # still have the on/off cycle parasitic fuel consumptions filled in
  water_heater_mixed.setOnCycleParasiticFuelType(fuel_type)
  # self.setOffCycleParasiticFuelConsumptionRate(??)
  water_heater_mixed.setOnCycleParasiticHeatFractiontoTank(0)
  water_heater_mixed.setOffCycleParasiticFuelType(fuel_type)
  # self.setOffCycleParasiticFuelConsumptionRate(??)
  water_heater_mixed.setOffCycleParasiticHeatFractiontoTank(0.8)

  # set part-load performance curve
  if (fuel_type == 'NaturalGas') || (fuel_type == 'FuelOilNo2')
    plf_vs_plr_curve = model_add_curve(water_heater_mixed.model, 'SWH-EFFFPLR-NECB2011')
    water_heater_mixed.setPartLoadFactorCurve(plf_vs_plr_curve)
  end

  # Append the name with standards information
  water_heater_mixed.setName("#{water_heater_mixed.name} #{water_heater_eff.round(3)} Therm Eff")
  OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.WaterHeaterMixed', "For #{template}: #{water_heater_mixed.name}; thermal efficiency = #{water_heater_eff.round(3)}, skin-loss UA = #{ua_btu_per_hr_per_f.round}Btu/hr-R")
  return true
end