openstudio-standards 0.8.3 → 0.8.5.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/data/geometry/ASHRAECollege.osm +30 -30
- data/data/geometry/ASHRAECourthouse.osm +22 -22
- data/data/geometry/ASHRAESmallOfficeDetailed.osm +2 -2
- data/data/geometry/DEER_Asm.osm +1 -1
- data/data/geometry/DEER_ECC.osm +1 -1
- data/data/geometry/DEER_EPr.osm +1 -1
- data/data/geometry/DEER_ERC.osm +1 -1
- data/data/geometry/DEER_ESe.osm +1 -1
- data/data/geometry/DEER_EUn.osm +1 -1
- data/data/geometry/DEER_Hsp.osm +1 -1
- data/data/geometry/DEER_Htl.osm +1 -1
- data/data/geometry/DEER_MBT.osm +1 -1
- data/data/geometry/DEER_MFm.osm +1 -1
- data/data/geometry/DEER_Nrs.osm +1 -1
- data/data/geometry/DEER_OfL.osm +1 -1
- data/data/geometry/DEER_OfS.osm +1 -1
- data/data/geometry/DEER_RFF.osm +1 -1
- data/data/geometry/DEER_RSD.osm +1 -1
- data/data/geometry/DEER_Rt3.osm +1 -1
- data/data/geometry/DEER_RtS.osm +1 -1
- data/data/standards/export_OpenStudio_libraries.rb +2 -3
- data/data/standards/test_performance_expected_dd_results.csv +42 -42
- data/lib/openstudio-standards/btap/NECB_building_types.csv +35 -0
- data/lib/openstudio-standards/btap/NECB_space_types.csv +109 -0
- data/lib/openstudio-standards/btap/activity.rb +480 -0
- data/lib/openstudio-standards/btap/attributes.rb +166 -0
- data/lib/openstudio-standards/btap/bridging.rb +561 -1402
- data/lib/openstudio-standards/btap/btap.rb +4 -2
- data/lib/openstudio-standards/btap/btap_test_helper.rb +86 -0
- data/lib/openstudio-standards/btap/carbon/btap_carbon.rb +177 -0
- data/lib/openstudio-standards/btap/common_paths.rb +81 -0
- data/lib/openstudio-standards/btap/common_resources/ConstructionProperties.csv +52 -0
- data/lib/openstudio-standards/btap/common_resources/Constructions.csv +37 -0
- data/lib/openstudio-standards/btap/common_resources/carbon_frame.csv +35 -0
- data/lib/openstudio-standards/btap/common_resources/carbon_glazing.csv +35 -0
- data/lib/openstudio-standards/btap/common_resources/carbon_opaque.csv +164 -0
- data/lib/openstudio-standards/btap/common_resources/construction_sets.csv +1270 -0
- data/lib/openstudio-standards/btap/common_resources/constructions_glazing.csv +121 -0
- data/lib/openstudio-standards/btap/common_resources/constructions_opaque.csv +2256 -0
- data/lib/openstudio-standards/btap/common_resources/costs.csv +1897 -0
- data/lib/openstudio-standards/btap/common_resources/costs_local_factors.csv +2315 -0
- data/lib/openstudio-standards/btap/common_resources/hvac_vent_ahu.csv +925 -0
- data/lib/openstudio-standards/btap/common_resources/lighting.csv +364 -0
- data/lib/openstudio-standards/btap/common_resources/lighting_sets.csv +2667 -0
- data/lib/openstudio-standards/btap/common_resources/locations.csv +75 -0
- data/lib/openstudio-standards/btap/common_resources/materials_glazing.csv +35 -0
- data/lib/openstudio-standards/btap/common_resources/materials_hvac.csv +1686 -0
- data/lib/openstudio-standards/btap/common_resources/materials_lighting.csv +267 -0
- data/lib/openstudio-standards/btap/common_resources/materials_opaque.csv +164 -0
- data/lib/openstudio-standards/btap/costing/README.md +502 -0
- data/lib/openstudio-standards/btap/costing/btap_costing.rb +469 -0
- data/lib/openstudio-standards/btap/costing/btap_measure_helper.rb +359 -0
- data/lib/openstudio-standards/btap/costing/btap_workflow.rb +117 -0
- data/lib/openstudio-standards/btap/costing/copy_test_results_files_to_expected_results.rb +11 -0
- data/lib/openstudio-standards/btap/costing/cost_building_from_file.rb +136 -0
- data/lib/openstudio-standards/btap/costing/costing_database_wrapper.rb +173 -0
- data/lib/openstudio-standards/btap/costing/daylighting_sensor_control_costing.rb +354 -0
- data/lib/openstudio-standards/btap/costing/dcv_costing.rb +314 -0
- data/lib/openstudio-standards/btap/costing/dummy.epw +8768 -0
- data/lib/openstudio-standards/btap/costing/dummy.osm +5320 -0
- data/lib/openstudio-standards/btap/costing/envelope_costing.rb +215 -0
- data/lib/openstudio-standards/btap/costing/heating_cooling_costing.rb +2584 -0
- data/lib/openstudio-standards/btap/costing/led_lighting_costing.rb +156 -0
- data/lib/openstudio-standards/btap/costing/lighting_costing.rb +209 -0
- data/lib/openstudio-standards/btap/costing/mech_sizing.json +502 -0
- data/lib/openstudio-standards/btap/costing/neb_end_use_prices.csv +42 -0
- data/lib/openstudio-standards/btap/costing/necb_2011_spacetype_info.csv +225 -0
- data/lib/openstudio-standards/btap/costing/necb_reference_runs.csv +28705 -0
- data/lib/openstudio-standards/btap/costing/nv_costing.rb +547 -0
- data/lib/openstudio-standards/btap/costing/parallel_tests.rb +92 -0
- data/lib/openstudio-standards/btap/costing/pv_ground_costing.rb +687 -0
- data/lib/openstudio-standards/btap/costing/shw_costing.rb +705 -0
- data/lib/openstudio-standards/btap/costing/test_list.txt +15 -0
- data/lib/openstudio-standards/btap/costing/test_run_all_test_locally.rb +27 -0
- data/lib/openstudio-standards/btap/costing/test_run_costing_tests.rb +80 -0
- data/lib/openstudio-standards/btap/costing/ventilation_costing.rb +2616 -0
- data/lib/openstudio-standards/btap/geometry.rb +86 -6
- data/lib/openstudio-standards/btap/structure.rb +657 -0
- data/lib/openstudio-standards/constructions/modify.rb +2 -1
- data/lib/openstudio-standards/create_typical/create_typical.rb +17 -33
- data/lib/openstudio-standards/create_typical/space_type_ratios.rb +36 -36
- data/lib/openstudio-standards/equipment/create_transformer.rb +104 -0
- data/lib/openstudio-standards/equipment/create_typical_equipment.rb +117 -0
- data/lib/openstudio-standards/equipment/data/electric_equipment_space_types.json +1514 -0
- data/lib/openstudio-standards/equipment/data/gas_equipment_space_types.json +227 -0
- data/lib/openstudio-standards/exterior_lighting/create.rb +22 -22
- data/lib/openstudio-standards/exterior_lighting/information.rb +3 -2
- data/lib/openstudio-standards/hvac/components/air_conditioner_vrf.rb +482 -0
- data/lib/openstudio-standards/hvac/components/air_terminal.rb +31 -0
- data/lib/openstudio-standards/hvac/components/boiler_hot_water.rb +163 -0
- data/lib/openstudio-standards/hvac/components/central_air_source_heat_pump.rb +220 -0
- data/lib/openstudio-standards/hvac/components/chiller.rb +25 -0
- data/lib/openstudio-standards/hvac/components/coil.rb +276 -0
- data/lib/openstudio-standards/hvac/components/coil_cooling_dx_multi_speed.rb +40 -0
- data/lib/openstudio-standards/hvac/components/coil_cooling_dx_single_speed.rb +300 -0
- data/lib/openstudio-standards/hvac/components/coil_cooling_dx_two_speed.rb +187 -0
- data/lib/openstudio-standards/hvac/components/coil_cooling_water.rb +80 -0
- data/lib/openstudio-standards/hvac/components/coil_cooling_water_to_air_heat_pump_equation_fit.rb +182 -0
- data/lib/openstudio-standards/hvac/components/coil_heating_dx_single_speed.rb +220 -0
- data/lib/openstudio-standards/hvac/components/coil_heating_electric.rb +56 -0
- data/lib/openstudio-standards/hvac/components/coil_heating_gas.rb +90 -0
- data/lib/openstudio-standards/hvac/components/coil_heating_gas_multi_stage.rb +33 -0
- data/lib/openstudio-standards/hvac/components/coil_heating_water.rb +98 -0
- data/lib/openstudio-standards/hvac/components/coil_heating_water_to_air_heat_pump_equation_fit.rb +147 -0
- data/lib/openstudio-standards/hvac/components/component.rb +39 -0
- data/lib/openstudio-standards/{standards/ashrae_90_1/data/ashrae_90_1.fans.json → hvac/components/data/fans.json} +6 -6
- data/lib/openstudio-standards/hvac/components/fan.rb +363 -0
- data/lib/openstudio-standards/hvac/components/heat_exchanger_air_to_air.rb +203 -0
- data/lib/openstudio-standards/hvac/components/pump.rb +181 -0
- data/lib/openstudio-standards/hvac/controls/radiant_system_controls.rb +594 -0
- data/lib/openstudio-standards/hvac/conversions.rb +222 -0
- data/lib/openstudio-standards/hvac/curves.rb +192 -0
- data/lib/openstudio-standards/hvac/helpers.rb +357 -0
- data/lib/openstudio-standards/hvac/setpoint_managers/information.rb +4 -4
- data/lib/openstudio-standards/interior_lighting/create_lights.rb +52 -0
- data/lib/openstudio-standards/interior_lighting/create_typical_interior_lighting.rb +254 -0
- data/lib/openstudio-standards/interior_lighting/data/convert_lighting_data.rb +249 -0
- data/lib/openstudio-standards/interior_lighting/data/lighting_space_types.csv +96 -0
- data/lib/openstudio-standards/interior_lighting/data/lighting_space_types.json +1429 -0
- data/lib/openstudio-standards/interior_lighting/data/lighting_technology.csv +46 -0
- data/lib/openstudio-standards/interior_lighting/data/lighting_technology.json +859 -0
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.Model.rb +4 -4
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Model.rb +4 -4
- data/lib/openstudio-standards/prototypes/ashrae_90_1/nrel_nze_ready_2017/nrel_zne_ready_2017.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.HighRiseApartment.rb +6 -7
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.Hospital.rb +15 -15
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeHotel.rb +4 -4
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeOffice.rb +5 -5
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.MediumOffice.rb +6 -6
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.Outpatient.rb +7 -7
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.PrimarySchool.rb +4 -4
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SecondarySchool.rb +6 -6
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SmallOfficeDetailed.rb +5 -1
- data/lib/openstudio-standards/prototypes/common/data/prototype_space_type_map.json +2594 -0
- data/lib/openstudio-standards/prototypes/common/data/thermostat_schedule_lookup.json +2108 -0
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.AirTerminalSingleDuctVAVReheat.rb +33 -0
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Fan.rb +0 -140
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanConstantVolume.rb +1 -73
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanOnOff.rb +1 -69
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanVariableVolume.rb +0 -116
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanZoneExhaust.rb +0 -61
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.hvac.rb +2 -2
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.rb +128 -13
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.hvac_systems.rb +606 -607
- data/lib/openstudio-standards/prototypes/common/prototype_space_type_map.rb +41 -0
- data/lib/openstudio-standards/prototypes/common/space_type_equipment_map.rb +184 -0
- data/lib/openstudio-standards/prototypes/common/space_type_thermostat_schedule_map.rb +116 -0
- data/lib/openstudio-standards/qaqc/hvac.rb +12 -12
- data/lib/openstudio-standards/refrigeration/create_compressor.rb +2 -5
- data/lib/openstudio-standards/refrigeration/data/refrigeration_compressors.csv +4 -4
- data/lib/openstudio-standards/service_water_heating/create_water_heater.rb +1 -2
- data/lib/openstudio-standards/service_water_heating/create_water_use.rb +5 -5
- data/lib/openstudio-standards/space_type/data/level_1_space_types.json +612 -0
- data/lib/openstudio-standards/space_type/standards_space_type.rb +53 -0
- data/lib/openstudio-standards/standards/Standards.AirConditionerVariableRefrigerantFlow.rb +8 -26
- data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +13 -13
- data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctVAVReheat.rb +0 -24
- data/lib/openstudio-standards/standards/Standards.BoilerHotWater.rb +6 -43
- data/lib/openstudio-standards/standards/Standards.ChillerElectricEIR.rb +7 -24
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXMultiSpeed.rb +19 -44
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXSingleSpeed.rb +25 -50
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXTwoSpeed.rb +25 -33
- data/lib/openstudio-standards/standards/Standards.CoilCoolingWaterToAirHeatPumpEquationFit.rb +9 -22
- data/lib/openstudio-standards/standards/Standards.CoilDX.rb +15 -157
- data/lib/openstudio-standards/standards/Standards.CoilHeatingDXMultiSpeed.rb +2 -2
- data/lib/openstudio-standards/standards/Standards.CoilHeatingDXSingleSpeed.rb +18 -105
- data/lib/openstudio-standards/standards/Standards.CoilHeatingGas.rb +3 -23
- data/lib/openstudio-standards/standards/Standards.CoilHeatingGasMultiStage.rb +0 -24
- data/lib/openstudio-standards/standards/Standards.CoilHeatingWaterToAirHeatPumpEquationFit.rb +2 -86
- data/lib/openstudio-standards/standards/Standards.FanVariableVolume.rb +0 -107
- data/lib/openstudio-standards/standards/Standards.Model.rb +45 -20
- data/lib/openstudio-standards/standards/Standards.People.rb +113 -0
- data/lib/openstudio-standards/standards/Standards.PlantLoop.rb +11 -11
- data/lib/openstudio-standards/standards/Standards.Pump.rb +2 -147
- data/lib/openstudio-standards/standards/Standards.PumpVariableSpeed.rb +57 -41
- data/lib/openstudio-standards/standards/Standards.SpaceType.rb +30 -153
- data/lib/openstudio-standards/standards/Standards.Ventilation.rb +74 -0
- data/lib/openstudio-standards/standards/Standards.ZoneHVACComponent.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.PlantLoop.rb +4 -4
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.heat_pumps_heating.json +3 -3
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.spc_typ.json +37 -112
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/comstock_ashrae_90_1_2007/data/comstock_ashrae_90_1_2007.spc_typ.json +37 -102
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.heat_pumps_heating.json +3 -3
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.spc_typ.json +37 -112
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/comstock_ashrae_90_1_2010/data/comstock_ashrae_90_1_2010.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.heat_pumps_heating.json +6 -6
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.BoilerHotWater.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/comstock_ashrae_90_1_2013/data/comstock_ashrae_90_1_2013.spc_typ.json +37 -102
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.heat_pumps_heating.json +6 -6
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.BoilerHotWater.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/comstock_ashrae_90_1_2016/data/comstock_ashrae_90_1_2016.spc_typ.json +45 -109
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.heat_pumps_heating.json +6 -6
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirLoopHVAC.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.BoilerHotWater.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.CoilHeatingGas.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/comstock_ashrae_90_1_2019/data/comstock_ashrae_90_1_2019.spc_typ.json +45 -109
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.heat_pumps_heating.json +6 -6
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.curves.json +0 -200
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/comstock_doe_ref_1980_2004/data/comstock_doe_ref_1980_2004.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/data/doe_ref_1980_2004.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/comstock_doe_ref_pre_1980/data/comstock_doe_ref_pre_1980.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/data/doe_ref_pre_1980.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.PlantLoop.rb +5 -5
- data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.PlantLoop.rb +5 -5
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.AirLoopHVAC.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.ChillerElectricEIR.rb +2 -2
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilCoolingDXSingleSpeed.rb +2 -68
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilCoolingDXTwoSpeed.rb +2 -35
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilDX.rb +42 -0
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilHeatingDXSingleSpeed.rb +5 -2
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilHeatingGas.rb +2 -2
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.Model.rb +2 -2
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.PlantLoop.rb +3 -3
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.SpaceType.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/ashrae_90_1_prm_2019.Model.rb +1 -0
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/ashrae_90_1_prm_2019_WaterHeaterMixed.rb +2 -4
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/data/ashrae_90_1_prm.curves.json +0 -200
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/data/ashrae_90_1_prm.fans.json +5 -5
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/ashrae_90_1_prm.UserData.rb +7 -1
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_enums.rb +0 -1
- data/lib/openstudio-standards/standards/cbes/data/cbes.curves.json +0 -200
- data/lib/openstudio-standards/standards/deer/data/deer.curves.json +0 -200
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/btap_pre1980.rb +21 -37
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/building_envelope.rb +12 -11
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_3_and_8_single_speed.rb +68 -27
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_4.rb +64 -25
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_6.rb +9 -14
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_systems.rb +4 -4
- data/lib/openstudio-standards/standards/necb/ECMS/ecms.rb +1 -1
- data/lib/openstudio-standards/standards/necb/ECMS/hvac_systems.rb +115 -112
- data/lib/openstudio-standards/standards/necb/NECB2011/autozone.rb +637 -249
- data/lib/openstudio-standards/standards/necb/NECB2011/beps_compliance_path.rb +16 -12
- data/lib/openstudio-standards/standards/necb/NECB2011/building_envelope.rb +799 -46
- data/lib/openstudio-standards/standards/necb/NECB2011/data/chillers.json +33 -51
- data/lib/openstudio-standards/standards/necb/NECB2011/data/constants.json +75 -7
- data/lib/openstudio-standards/standards/necb/NECB2011/data/fuel_type_sets.json +25 -1
- data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/HighriseApartmentMult.osm +14272 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/data/heat_pumps_heating.json +21 -15
- data/lib/openstudio-standards/standards/necb/NECB2011/data/necb_2015_table_c1.json +1 -1
- data/lib/openstudio-standards/standards/necb/NECB2011/data/space_types.json +437 -437
- data/lib/openstudio-standards/standards/necb/NECB2011/data/systems.json +516 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/data/systems_including_sys5.json +588 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_namer.rb +489 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_1_single_speed.rb +18 -6
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_2_and_5.rb +48 -5
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_multi_speed.rb +2 -2
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_single_speed.rb +35 -27
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_4.rb +34 -23
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_6.rb +8 -6
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb +68 -150
- data/lib/openstudio-standards/standards/necb/NECB2011/necb_2011.rb +444 -134
- data/lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb +61 -1
- data/lib/openstudio-standards/standards/necb/NECB2015/data/heat_pumps_heating.json +10 -2
- data/lib/openstudio-standards/standards/necb/NECB2015/data/space_types.json +636 -636
- data/lib/openstudio-standards/standards/necb/NECB2015/data/unitary_acs.json +38 -38
- data/lib/openstudio-standards/standards/necb/NECB2015/hvac_systems.rb +17 -8
- data/lib/openstudio-standards/standards/necb/NECB2017/data/space_types.json +636 -636
- data/lib/openstudio-standards/standards/necb/NECB2020/data/chillers.json +71 -71
- data/lib/openstudio-standards/standards/necb/NECB2020/data/heat_pumps_heating.json +16 -6
- data/lib/openstudio-standards/standards/necb/NECB2020/data/unitary_acs.json +60 -61
- data/lib/openstudio-standards/standards/necb/NECB2020/service_water_heating.rb +30 -30
- data/lib/openstudio-standards/standards/necb/README.md +343 -0
- data/lib/openstudio-standards/standards/necb/common/btap_analysis.rb +79 -0
- data/lib/openstudio-standards/standards/necb/common/btap_data.rb +206 -32
- data/lib/openstudio-standards/standards/necb/common/btap_datapoint.rb +75 -43
- data/lib/openstudio-standards/standards/necb/common/eccc_electric_grid_intensity_20250311.csv +14 -0
- data/lib/openstudio-standards/standards/necb/common/nir_gas_grid_intensity_20250311.csv +14 -0
- data/lib/openstudio-standards/standards/necb/common/system_types.yaml +0 -0
- data/lib/openstudio-standards/thermal_zone/{thermal_zone.rb → information.rb} +12 -45
- data/lib/openstudio-standards/thermal_zone/thermostat_schedules.rb +152 -0
- data/lib/openstudio-standards/utilities/logging.rb +18 -14
- data/lib/openstudio-standards/version.rb +1 -1
- data/lib/openstudio-standards/weather/modify.rb +2 -2
- data/lib/openstudio-standards/weather/stat_file.rb +2 -2
- data/lib/openstudio-standards.rb +67 -38
- metadata +141 -50
- data/lib/openstudio-standards/hvac/components/create.rb +0 -169
- data/lib/openstudio-standards/hvac/components/modify.rb +0 -42
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.AirConditionerVariableRefrigerantFlow.rb +0 -438
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.BoilerHotWater.rb +0 -123
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CentralAirSourceHeatPump.rb +0 -216
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilCoolingDXSingleSpeed.rb +0 -273
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilCoolingDXTwoSpeed.rb +0 -159
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilCoolingWater.rb +0 -77
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilCoolingWaterToAirHeatPumpEquationFit.rb +0 -154
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingDXSingleSpeed.rb +0 -214
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingElectric.rb +0 -53
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingGas.rb +0 -72
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingWater.rb +0 -95
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingWaterToAirHeatPumpEquationFit.rb +0 -125
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.ControllerWaterCoil.rb +0 -17
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.transformers.rb +0 -90
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Pump.rb +0 -4
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.PumpVariableSpeed.rb +0 -70
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.radiant_system_controls.rb +0 -590
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.utilities.rb +0 -901
- data/lib/openstudio-standards/standards/Standards.FanConstantVolume.rb +0 -5
- data/lib/openstudio-standards/standards/Standards.FanOnOff.rb +0 -5
- data/lib/openstudio-standards/standards/Standards.FanZoneExhaust.rb +0 -5
- data/lib/openstudio-standards/standards/Standards.HeaderedPumpsConstantSpeed.rb +0 -5
- data/lib/openstudio-standards/standards/Standards.HeaderedPumpsVariableSpeed.rb +0 -55
- data/lib/openstudio-standards/standards/Standards.PumpConstantSpeed.rb +0 -5
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.FanConstantVolume.rb +0 -5
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.FanOnOff.rb +0 -5
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.FanZoneExhaust.rb +0 -5
- data/lib/openstudio-standards/standards/cbes/data/cbes.fans.json +0 -328
- data/lib/openstudio-standards/standards/deer/data/deer.fans.json +0 -328
- /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.PumpVariableSpeed.rb +0 -0
- /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2007/ashrae_90_1_2007.PumpVariableSpeed.rb +0 -0
- /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.PumpVariableSpeed.rb +0 -0
- /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.PumpVariableSpeed.rb +0 -0
- /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.PumpVariableSpeed.rb +0 -0
- /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Pump.rb +0 -0
- /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.PumpVariableSpeed.rb +0 -0
|
@@ -1,901 +0,0 @@
|
|
|
1
|
-
class Standard
|
|
2
|
-
# @!group utilities
|
|
3
|
-
|
|
4
|
-
# load a model into OS & version translates, exiting and erroring if a problem is found
|
|
5
|
-
#
|
|
6
|
-
# @param model_path_string [String] file path to OpenStudio model file
|
|
7
|
-
# @return [OpenStudio::Model::Model] OpenStudio model object
|
|
8
|
-
def safe_load_model(model_path_string)
|
|
9
|
-
model_path = OpenStudio::Path.new(model_path_string)
|
|
10
|
-
if OpenStudio.exists(model_path)
|
|
11
|
-
version_translator = OpenStudio::OSVersion::VersionTranslator.new
|
|
12
|
-
model = version_translator.loadModel(model_path)
|
|
13
|
-
if model.empty?
|
|
14
|
-
OpenStudio.logFree(OpenStudio::Error, 'openstudio.model.Model', "Version translation failed for #{model_path_string}")
|
|
15
|
-
return false
|
|
16
|
-
else
|
|
17
|
-
model = model.get
|
|
18
|
-
end
|
|
19
|
-
else
|
|
20
|
-
OpenStudio.logFree(OpenStudio::Error, 'openstudio.model.Model', "#{model_path_string} couldn't be found")
|
|
21
|
-
return false
|
|
22
|
-
end
|
|
23
|
-
return model
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
# Remove all resource objects in the model
|
|
27
|
-
#
|
|
28
|
-
# @param model [OpenStudio::Model::Model] OpenStudio model object
|
|
29
|
-
# @return [OpenStudio::Model::Model] OpenStudio model object
|
|
30
|
-
def strip_model(model)
|
|
31
|
-
# remove all materials
|
|
32
|
-
model.getMaterials.each(&:remove)
|
|
33
|
-
|
|
34
|
-
# remove all constructions
|
|
35
|
-
model.getConstructions.each(&:remove)
|
|
36
|
-
|
|
37
|
-
# remove performance curves
|
|
38
|
-
model.getCurves.each do |curve|
|
|
39
|
-
model.removeObject(curve.handle)
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
# remove all zone equipment
|
|
43
|
-
model.getThermalZones.sort.each do |zone|
|
|
44
|
-
zone.equipment.each(&:remove)
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
# remove all thermostats
|
|
48
|
-
model.getThermostatSetpointDualSetpoints.each(&:remove)
|
|
49
|
-
|
|
50
|
-
# remove all people
|
|
51
|
-
model.getPeoples.each(&:remove)
|
|
52
|
-
model.getPeopleDefinitions.each(&:remove)
|
|
53
|
-
|
|
54
|
-
# remove all lights
|
|
55
|
-
model.getLightss.each(&:remove)
|
|
56
|
-
model.getLightsDefinitions.each(&:remove)
|
|
57
|
-
|
|
58
|
-
# remove all electric equipment
|
|
59
|
-
model.getElectricEquipments.each(&:remove)
|
|
60
|
-
model.getElectricEquipmentDefinitions.each(&:remove)
|
|
61
|
-
|
|
62
|
-
# remove all gas equipment
|
|
63
|
-
model.getGasEquipments.each(&:remove)
|
|
64
|
-
model.getGasEquipmentDefinitions.each(&:remove)
|
|
65
|
-
|
|
66
|
-
# remove all outdoor air
|
|
67
|
-
model.getDesignSpecificationOutdoorAirs.each(&:remove)
|
|
68
|
-
|
|
69
|
-
# remove all infiltration
|
|
70
|
-
model.getSpaceInfiltrationDesignFlowRates.each(&:remove)
|
|
71
|
-
|
|
72
|
-
# Remove all internal mass
|
|
73
|
-
model.getInternalMasss.each(&:remove)
|
|
74
|
-
|
|
75
|
-
# Remove all internal mass defs
|
|
76
|
-
model.getInternalMassDefinitions.each(&:remove)
|
|
77
|
-
|
|
78
|
-
# Remove all thermal zones
|
|
79
|
-
model.getThermalZones.each(&:remove)
|
|
80
|
-
|
|
81
|
-
# Remove all schedules
|
|
82
|
-
model.getSchedules.each(&:remove)
|
|
83
|
-
|
|
84
|
-
# Remove all schedule type limits
|
|
85
|
-
model.getScheduleTypeLimitss.each(&:remove)
|
|
86
|
-
|
|
87
|
-
# Remove the sizing parameters
|
|
88
|
-
model.getSizingParameters.remove
|
|
89
|
-
|
|
90
|
-
# Remove the design days
|
|
91
|
-
model.getDesignDays.each(&:remove)
|
|
92
|
-
|
|
93
|
-
# Remove the rendering colors
|
|
94
|
-
model.getRenderingColors.each(&:remove)
|
|
95
|
-
|
|
96
|
-
# Remove the daylight controls
|
|
97
|
-
model.getDaylightingControls.each(&:remove)
|
|
98
|
-
|
|
99
|
-
return model
|
|
100
|
-
end
|
|
101
|
-
|
|
102
|
-
# Remove all air loops in model
|
|
103
|
-
#
|
|
104
|
-
# @param model [OpenStudio::Model::Model] OpenStudio model object
|
|
105
|
-
# @return [OpenStudio::Model::Model] OpenStudio model object
|
|
106
|
-
def remove_air_loops(model)
|
|
107
|
-
model.getAirLoopHVACs.each(&:remove)
|
|
108
|
-
return model
|
|
109
|
-
end
|
|
110
|
-
|
|
111
|
-
# Remove plant loops in model except those used for service hot water
|
|
112
|
-
#
|
|
113
|
-
# @param model [OpenStudio::Model::Model] OpenStudio model object
|
|
114
|
-
# @return [OpenStudio::Model::Model] OpenStudio model object
|
|
115
|
-
def remove_plant_loops(model)
|
|
116
|
-
plant_loops = model.getPlantLoops
|
|
117
|
-
plant_loops.each do |plant_loop|
|
|
118
|
-
shw_use = false
|
|
119
|
-
plant_loop.demandComponents.each do |component|
|
|
120
|
-
if component.to_WaterUseConnections.is_initialized || component.to_CoilWaterHeatingDesuperheater.is_initialized
|
|
121
|
-
shw_use = true
|
|
122
|
-
OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Model', "#{plant_loop.name} is used for SHW or refrigeration heat reclaim and will not be removed.")
|
|
123
|
-
break
|
|
124
|
-
end
|
|
125
|
-
end
|
|
126
|
-
plant_loop.remove unless shw_use
|
|
127
|
-
end
|
|
128
|
-
return model
|
|
129
|
-
end
|
|
130
|
-
|
|
131
|
-
# Remove all plant loops in model including those used for service hot water
|
|
132
|
-
#
|
|
133
|
-
# @param model [OpenStudio::Model::Model] OpenStudio model object
|
|
134
|
-
# @return [OpenStudio::Model::Model] OpenStudio model object
|
|
135
|
-
def remove_all_plant_loops(model)
|
|
136
|
-
model.getPlantLoops.each(&:remove)
|
|
137
|
-
return model
|
|
138
|
-
end
|
|
139
|
-
|
|
140
|
-
# Remove VRF units
|
|
141
|
-
#
|
|
142
|
-
# @param model [OpenStudio::Model::Model] OpenStudio model object
|
|
143
|
-
# @return [OpenStudio::Model::Model] OpenStudio model object
|
|
144
|
-
def remove_vrf(model)
|
|
145
|
-
model.getAirConditionerVariableRefrigerantFlows.each(&:remove)
|
|
146
|
-
model.getZoneHVACTerminalUnitVariableRefrigerantFlows.each(&:remove)
|
|
147
|
-
return model
|
|
148
|
-
end
|
|
149
|
-
|
|
150
|
-
# Remove zone equipment except for exhaust fans
|
|
151
|
-
#
|
|
152
|
-
# @param model [OpenStudio::Model::Model] OpenStudio model object
|
|
153
|
-
# @return [OpenStudio::Model::Model] OpenStudio model object
|
|
154
|
-
def remove_zone_equipment(model)
|
|
155
|
-
model.getThermalZones.each do |zone|
|
|
156
|
-
zone.equipment.each do |equipment|
|
|
157
|
-
if equipment.to_FanZoneExhaust.is_initialized
|
|
158
|
-
OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Model', "#{equipment.name} is a zone exhaust fan and will not be removed.")
|
|
159
|
-
else
|
|
160
|
-
equipment.remove
|
|
161
|
-
end
|
|
162
|
-
end
|
|
163
|
-
end
|
|
164
|
-
return model
|
|
165
|
-
end
|
|
166
|
-
|
|
167
|
-
# Remove all zone equipment including exhaust fans
|
|
168
|
-
#
|
|
169
|
-
# @param model [OpenStudio::Model::Model] OpenStudio model object
|
|
170
|
-
# @return [OpenStudio::Model::Model] OpenStudio model object
|
|
171
|
-
def remove_all_zone_equipment(model)
|
|
172
|
-
model.getThermalZones.each do |zone|
|
|
173
|
-
zone.equipment.each(&:remove)
|
|
174
|
-
end
|
|
175
|
-
return model
|
|
176
|
-
end
|
|
177
|
-
|
|
178
|
-
# Remove unused performance curves
|
|
179
|
-
#
|
|
180
|
-
# @param model [OpenStudio::Model::Model] OpenStudio model object
|
|
181
|
-
# @return [OpenStudio::Model::Model] OpenStudio model object
|
|
182
|
-
def remove_unused_curves(model)
|
|
183
|
-
model.getCurves.each do |curve|
|
|
184
|
-
if curve.directUseCount == 0
|
|
185
|
-
model.removeObject(curve.handle)
|
|
186
|
-
end
|
|
187
|
-
end
|
|
188
|
-
return model
|
|
189
|
-
end
|
|
190
|
-
|
|
191
|
-
# Remove HVAC equipment except for service hot water loops and zone exhaust fans
|
|
192
|
-
#
|
|
193
|
-
# @param model [OpenStudio::Model::Model] OpenStudio model object
|
|
194
|
-
# @return [OpenStudio::Model::Model] OpenStudio model object
|
|
195
|
-
def remove_hvac(model)
|
|
196
|
-
remove_air_loops(model)
|
|
197
|
-
remove_plant_loops(model)
|
|
198
|
-
remove_vrf(model)
|
|
199
|
-
remove_zone_equipment(model)
|
|
200
|
-
remove_unused_curves(model)
|
|
201
|
-
return model
|
|
202
|
-
end
|
|
203
|
-
|
|
204
|
-
# Remove all HVAC equipment including service hot water loops and zone exhaust fans
|
|
205
|
-
#
|
|
206
|
-
# @param model [OpenStudio::Model::Model] OpenStudio model object
|
|
207
|
-
# @return [OpenStudio::Model::Model] OpenStudio model object
|
|
208
|
-
def remove_all_hvac(model)
|
|
209
|
-
remove_air_loops(model)
|
|
210
|
-
remove_all_plant_loops(model)
|
|
211
|
-
remove_vrf(model)
|
|
212
|
-
remove_all_zone_equipment(model)
|
|
213
|
-
remove_unused_curves(model)
|
|
214
|
-
return model
|
|
215
|
-
end
|
|
216
|
-
|
|
217
|
-
# Loads a JSON file containing the space type map into a hash
|
|
218
|
-
#
|
|
219
|
-
# @param hvac_map_file [String] path to JSON file, relative to the /data folder
|
|
220
|
-
# @return [Hash] returns a hash that contains the space type map
|
|
221
|
-
def load_hvac_map(hvac_map_file)
|
|
222
|
-
# Load the geometry .osm from relative to the data folder
|
|
223
|
-
rel_path_to_hvac_map = "../../../../../data/#{hvac_map_file}"
|
|
224
|
-
|
|
225
|
-
# Load the JSON depending on whether running from normal gem location
|
|
226
|
-
# or from the embedded location in the OpenStudio CLI
|
|
227
|
-
if File.dirname(__FILE__)[0] == ':'
|
|
228
|
-
# running from embedded location in OpenStudio CLI
|
|
229
|
-
hvac_map_string = load_resource_relative(rel_path_to_hvac_map)
|
|
230
|
-
hvac_map = JSON.parse(hvac_map_string)
|
|
231
|
-
else
|
|
232
|
-
abs_path = File.join(File.dirname(__FILE__), rel_path_to_hvac_map)
|
|
233
|
-
hvac_map = JSON.parse(File.read(abs_path)) if File.exist?(abs_path)
|
|
234
|
-
end
|
|
235
|
-
|
|
236
|
-
return hvac_map
|
|
237
|
-
end
|
|
238
|
-
|
|
239
|
-
# Convert from SEER to COP (no fan) for cooling coils
|
|
240
|
-
# @ref [References::ASHRAE9012013] Appendix G
|
|
241
|
-
#
|
|
242
|
-
# @param seer [Double] seasonal energy efficiency ratio (SEER)
|
|
243
|
-
# @return [Double] Coefficient of Performance (COP)
|
|
244
|
-
def seer_to_cop_no_fan(seer)
|
|
245
|
-
cop = (-0.0076 * seer * seer) + (0.3796 * seer)
|
|
246
|
-
|
|
247
|
-
return cop
|
|
248
|
-
end
|
|
249
|
-
|
|
250
|
-
# Convert from COP to SEER
|
|
251
|
-
# @ref [References::USDOEPrototypeBuildings]
|
|
252
|
-
#
|
|
253
|
-
# @param cop [Double] COP
|
|
254
|
-
# @return [Double] Seasonal Energy Efficiency Ratio
|
|
255
|
-
def cop_no_fan_to_seer(cop)
|
|
256
|
-
delta = (0.3796**2) - (4.0 * 0.0076 * cop)
|
|
257
|
-
seer = ((-delta**0.5) + 0.3796) / (2.0 * 0.0076)
|
|
258
|
-
|
|
259
|
-
return seer
|
|
260
|
-
end
|
|
261
|
-
|
|
262
|
-
# Convert from SEER to COP (with fan) for cooling coils
|
|
263
|
-
# per the method specified in Thornton et al. 2011
|
|
264
|
-
#
|
|
265
|
-
# @param seer [Double] seasonal energy efficiency ratio (SEER)
|
|
266
|
-
# @return [Double] Coefficient of Performance (COP)
|
|
267
|
-
def seer_to_cop(seer)
|
|
268
|
-
eer = (-0.0182 * seer * seer) + (1.1088 * seer)
|
|
269
|
-
cop = eer_to_cop(eer)
|
|
270
|
-
|
|
271
|
-
return cop
|
|
272
|
-
end
|
|
273
|
-
|
|
274
|
-
# Convert from COP to SEER (with fan) for cooling coils
|
|
275
|
-
# per the method specified in Thornton et al. 2011
|
|
276
|
-
#
|
|
277
|
-
# @param cop [Double] Coefficient of Performance (COP)
|
|
278
|
-
# @return [Double] seasonal energy efficiency ratio (SEER)
|
|
279
|
-
def cop_to_seer(cop)
|
|
280
|
-
eer = cop_to_eer(cop)
|
|
281
|
-
delta = (1.1088**2) - (4.0 * 0.0182 * eer)
|
|
282
|
-
seer = (1.1088 - (delta**0.5)) / (2.0 * 0.0182)
|
|
283
|
-
|
|
284
|
-
return seer
|
|
285
|
-
end
|
|
286
|
-
|
|
287
|
-
# Convert from COP_H to COP (no fan) for heat pump heating coils
|
|
288
|
-
# @ref [References::ASHRAE9012013] Appendix G
|
|
289
|
-
#
|
|
290
|
-
# @param coph47 [Double] coefficient of performance at 47F Tdb, 42F Twb
|
|
291
|
-
# @param capacity_w [Double] the heating capacity at AHRI rating conditions, in W
|
|
292
|
-
# @return [Double] Coefficient of Performance (COP)
|
|
293
|
-
def cop_heating_to_cop_heating_no_fan(coph47, capacity_w)
|
|
294
|
-
# Convert the capacity to Btu/hr
|
|
295
|
-
capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
|
|
296
|
-
|
|
297
|
-
cop = (1.48E-7 * coph47 * capacity_btu_per_hr) + (1.062 * coph47)
|
|
298
|
-
|
|
299
|
-
return cop
|
|
300
|
-
end
|
|
301
|
-
|
|
302
|
-
# Convert from HSPF to COP (no fan) for heat pump heating coils
|
|
303
|
-
# @ref [References::ASHRAE9012013] Appendix G
|
|
304
|
-
#
|
|
305
|
-
# @param hspf [Double] heating seasonal performance factor (HSPF)
|
|
306
|
-
# @return [Double] Coefficient of Performance (COP)
|
|
307
|
-
def hspf_to_cop_no_fan(hspf)
|
|
308
|
-
cop = (-0.0296 * hspf * hspf) + (0.7134 * hspf)
|
|
309
|
-
|
|
310
|
-
return cop
|
|
311
|
-
end
|
|
312
|
-
|
|
313
|
-
# Convert from HSPF to COP (with fan) for heat pump heating coils
|
|
314
|
-
# @ref ASHRAE RP-1197
|
|
315
|
-
#
|
|
316
|
-
# @param hspf [Double] heating seasonal performance factor (HSPF)
|
|
317
|
-
# @return [Double] Coefficient of Performance (COP)
|
|
318
|
-
def hspf_to_cop(hspf)
|
|
319
|
-
cop = (-0.0255 * hspf * hspf) + (0.6239 * hspf)
|
|
320
|
-
|
|
321
|
-
return cop
|
|
322
|
-
end
|
|
323
|
-
|
|
324
|
-
# Convert from EER to COP (no fan)
|
|
325
|
-
# @ref [References::USDOEPrototypeBuildings] If capacity is not supplied, use DOE Prototype Building method.
|
|
326
|
-
# @ref [References::ASHRAE9012013] If capacity is supplied, use the 90.1-2013 method
|
|
327
|
-
#
|
|
328
|
-
# @param eer [Double] Energy Efficiency Ratio (EER)
|
|
329
|
-
# @param capacity_w [Double] the heating capacity at AHRI rating conditions, in W
|
|
330
|
-
# @return [Double] Coefficient of Performance (COP)
|
|
331
|
-
def eer_to_cop_no_fan(eer, capacity_w = nil)
|
|
332
|
-
if capacity_w.nil?
|
|
333
|
-
# From Thornton et al. 2011
|
|
334
|
-
# r is the ratio of supply fan power to total equipment power at the rating condition,
|
|
335
|
-
# assumed to be 0.12 for the reference buildings per Thornton et al. 2011.
|
|
336
|
-
r = 0.12
|
|
337
|
-
cop = ((eer / OpenStudio.convert(1.0, 'W', 'Btu/h').get) + r) / (1 - r)
|
|
338
|
-
else
|
|
339
|
-
# The 90.1-2013 method
|
|
340
|
-
# Convert the capacity to Btu/hr
|
|
341
|
-
capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
|
|
342
|
-
cop = (7.84E-8 * eer * capacity_btu_per_hr) + (0.338 * eer)
|
|
343
|
-
end
|
|
344
|
-
|
|
345
|
-
return cop
|
|
346
|
-
end
|
|
347
|
-
|
|
348
|
-
# Convert from COP (no fan) to EER
|
|
349
|
-
# @ref [References::USDOEPrototypeBuildings]
|
|
350
|
-
#
|
|
351
|
-
# @param cop [Double] COP
|
|
352
|
-
# @return [Double] Energy Efficiency Ratio (EER)
|
|
353
|
-
def cop_no_fan_to_eer(cop, capacity_w = nil)
|
|
354
|
-
if capacity_w.nil?
|
|
355
|
-
# From Thornton et al. 2011
|
|
356
|
-
# r is the ratio of supply fan power to total equipment power at the rating condition,
|
|
357
|
-
# assumed to be 0.12 for the reference buildngs per Thornton et al. 2011.
|
|
358
|
-
r = 0.12
|
|
359
|
-
eer = OpenStudio.convert(1.0, 'W', 'Btu/h').get * ((cop * (1 - r)) - r)
|
|
360
|
-
else
|
|
361
|
-
# The 90.1-2013 method
|
|
362
|
-
# Convert the capacity to Btu/hr
|
|
363
|
-
capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
|
|
364
|
-
eer = cop / ((7.84E-8 * capacity_btu_per_hr) + 0.338)
|
|
365
|
-
end
|
|
366
|
-
|
|
367
|
-
return eer
|
|
368
|
-
end
|
|
369
|
-
|
|
370
|
-
# Convert from IEER to COP (no fan)
|
|
371
|
-
#
|
|
372
|
-
# @note IEER is a weighted-average efficiency metrics at different load percentages, operataional and environemental conditions
|
|
373
|
-
# @note IEER should be modeled by using performance curves that match a targeted efficiency values
|
|
374
|
-
# @note This method estimates what a reasonable full load rated EER would be for a targeted IEER value
|
|
375
|
-
# @note The regression used in this method is based on a survey of over 1,000 rated AHRI units with IEER ranging from 11.8 to 25.6
|
|
376
|
-
# @todo Implement methods to handle IEER modeling
|
|
377
|
-
#
|
|
378
|
-
# @param ieer [Double] Energy Efficiency Ratio (EER)
|
|
379
|
-
# @return [Double] Coefficient of Performance (COP)
|
|
380
|
-
def ieer_to_cop_no_fan(ieer)
|
|
381
|
-
eer = 0.0183 * ieer * ieer - 0.4552 * ieer + 13.21
|
|
382
|
-
|
|
383
|
-
return eer_to_cop_no_fan(eer)
|
|
384
|
-
end
|
|
385
|
-
|
|
386
|
-
# Convert from EER to COP
|
|
387
|
-
#
|
|
388
|
-
# @param eer [Double] Energy Efficiency Ratio (EER)
|
|
389
|
-
# @return [Double] Coefficient of Performance (COP)
|
|
390
|
-
def eer_to_cop(eer)
|
|
391
|
-
return eer / OpenStudio.convert(1.0, 'W', 'Btu/h').get
|
|
392
|
-
end
|
|
393
|
-
|
|
394
|
-
# Convert from COP to EER
|
|
395
|
-
#
|
|
396
|
-
# @param cop [Double] Coefficient of Performance (COP)
|
|
397
|
-
# @return [Double] Energy Efficiency Ratio (EER)
|
|
398
|
-
def cop_to_eer(cop)
|
|
399
|
-
return cop * OpenStudio.convert(1.0, 'W', 'Btu/h').get
|
|
400
|
-
end
|
|
401
|
-
|
|
402
|
-
# Convert from COP to kW/ton
|
|
403
|
-
#
|
|
404
|
-
# @param cop [Double] Coefficient of Performance (COP)
|
|
405
|
-
# @return [Double] kW of input power per ton of cooling
|
|
406
|
-
def cop_to_kw_per_ton(cop)
|
|
407
|
-
return 3.517 / cop
|
|
408
|
-
end
|
|
409
|
-
|
|
410
|
-
# A helper method to convert from kW/ton to COP
|
|
411
|
-
#
|
|
412
|
-
# @param kw_per_ton [Double] kW of input power per ton of cooling
|
|
413
|
-
# @return [Double] Coefficient of Performance (COP)
|
|
414
|
-
def kw_per_ton_to_cop(kw_per_ton)
|
|
415
|
-
return 3.517 / kw_per_ton
|
|
416
|
-
end
|
|
417
|
-
|
|
418
|
-
# A helper method to convert from AFUE to thermal efficiency
|
|
419
|
-
# @ref [References::USDOEPrototypeBuildings] Boiler Addendum 90.1-04an
|
|
420
|
-
#
|
|
421
|
-
# @param afue [Double] Annual Fuel Utilization Efficiency
|
|
422
|
-
# @return [Double] Thermal efficiency (%)
|
|
423
|
-
def afue_to_thermal_eff(afue)
|
|
424
|
-
return afue
|
|
425
|
-
end
|
|
426
|
-
|
|
427
|
-
# A helper method to convert from thermal efficiency to AFUE
|
|
428
|
-
# @ref [References::USDOEPrototypeBuildings] Boiler Addendum 90.1-04an
|
|
429
|
-
#
|
|
430
|
-
# @param teff [Double] Thermal Efficiency
|
|
431
|
-
# @return [Double] AFUE
|
|
432
|
-
def thermal_eff_to_afue(teff)
|
|
433
|
-
return teff
|
|
434
|
-
end
|
|
435
|
-
|
|
436
|
-
# A helper method to convert from combustion efficiency to thermal efficiency
|
|
437
|
-
# @ref [References::USDOEPrototypeBuildings] Boiler Addendum 90.1-04an
|
|
438
|
-
#
|
|
439
|
-
# @param combustion_eff [Double] Combustion efficiency (%)
|
|
440
|
-
# @return [Double] Thermal efficiency (%)
|
|
441
|
-
def combustion_eff_to_thermal_eff(combustion_eff)
|
|
442
|
-
return combustion_eff - 0.007
|
|
443
|
-
end
|
|
444
|
-
|
|
445
|
-
# A helper method to convert from thermal efficiency to combustion efficiency
|
|
446
|
-
# @ref [References::USDOEPrototypeBuildings] Boiler Addendum 90.1-04an
|
|
447
|
-
#
|
|
448
|
-
# @param thermal_eff [Double] Thermal efficiency
|
|
449
|
-
# @return [Double] Combustion efficiency
|
|
450
|
-
def thermal_eff_to_comb_eff(thermal_eff)
|
|
451
|
-
return thermal_eff + 0.007
|
|
452
|
-
end
|
|
453
|
-
|
|
454
|
-
# Convert biquadratic curves that are a function of temperature
|
|
455
|
-
# from IP (F) to SI (C) or vice-versa. The curve is of the form
|
|
456
|
-
# z = C1 + C2*x + C3*x^2 + C4*y + C5*y^2 + C6*x*y
|
|
457
|
-
# where C1, C2, ... are the coefficients,
|
|
458
|
-
# x is the first independent variable (in F or C)
|
|
459
|
-
# y is the second independent variable (in F or C)
|
|
460
|
-
# and z is the resulting value
|
|
461
|
-
#
|
|
462
|
-
# @author Scott Horowitz, NREL
|
|
463
|
-
# @param coeffs [Array<Double>] an array of 6 coefficients, in order
|
|
464
|
-
# @return [Array<Double>] the revised coefficients in the new unit system
|
|
465
|
-
def convert_curve_biquadratic(coeffs, ip_to_si = true)
|
|
466
|
-
if ip_to_si
|
|
467
|
-
# Convert IP curves to SI curves
|
|
468
|
-
si_coeffs = []
|
|
469
|
-
si_coeffs << (coeffs[0] + (32.0 * (coeffs[1] + coeffs[3])) + (1024.0 * (coeffs[2] + coeffs[4] + coeffs[5])))
|
|
470
|
-
si_coeffs << ((9.0 / 5.0 * coeffs[1]) + (576.0 / 5.0 * coeffs[2]) + (288.0 / 5.0 * coeffs[5]))
|
|
471
|
-
si_coeffs << (81.0 / 25.0 * coeffs[2])
|
|
472
|
-
si_coeffs << ((9.0 / 5.0 * coeffs[3]) + (576.0 / 5.0 * coeffs[4]) + (288.0 / 5.0 * coeffs[5]))
|
|
473
|
-
si_coeffs << (81.0 / 25.0 * coeffs[4])
|
|
474
|
-
si_coeffs << (81.0 / 25.0 * coeffs[5])
|
|
475
|
-
return si_coeffs
|
|
476
|
-
else
|
|
477
|
-
# Convert SI curves to IP curves
|
|
478
|
-
ip_coeffs = []
|
|
479
|
-
ip_coeffs << (coeffs[0] - (160.0 / 9.0 * (coeffs[1] + coeffs[3])) + (25_600.0 / 81.0 * (coeffs[2] + coeffs[4] + coeffs[5])))
|
|
480
|
-
ip_coeffs << (5.0 / 9.0 * (coeffs[1] - (320.0 / 9.0 * coeffs[2]) - (160.0 / 9.0 * coeffs[5])))
|
|
481
|
-
ip_coeffs << (25.0 / 81.0 * coeffs[2])
|
|
482
|
-
ip_coeffs << (5.0 / 9.0 * (coeffs[3] - (320.0 / 9.0 * coeffs[4]) - (160.0 / 9.0 * coeffs[5])))
|
|
483
|
-
ip_coeffs << (25.0 / 81.0 * coeffs[4])
|
|
484
|
-
ip_coeffs << (25.0 / 81.0 * coeffs[5])
|
|
485
|
-
return ip_coeffs
|
|
486
|
-
end
|
|
487
|
-
end
|
|
488
|
-
|
|
489
|
-
# Create a biquadratic curve of the form
|
|
490
|
-
# z = C1 + C2*x + C3*x^2 + C4*y + C5*y^2 + C6*x*y
|
|
491
|
-
#
|
|
492
|
-
# @author Scott Horowitz, NREL
|
|
493
|
-
# @param model [OpenStudio::Model::Model] OpenStudio model object
|
|
494
|
-
# @param coeffs [Array<Double>] an array of 6 coefficients, in order
|
|
495
|
-
# @param crv_name [String] the name of the curve
|
|
496
|
-
# @param min_x [Double] the minimum value of independent variable X that will be used
|
|
497
|
-
# @param max_x [Double] the maximum value of independent variable X that will be used
|
|
498
|
-
# @param min_y [Double] the minimum value of independent variable Y that will be used
|
|
499
|
-
# @param max_y [Double] the maximum value of independent variable Y that will be used
|
|
500
|
-
# @param min_out [Double] the minimum value of dependent variable Z
|
|
501
|
-
# @param max_out [Double] the maximum value of dependent variable Z
|
|
502
|
-
# @return [OpenStudio::Model::CurveBiquadratic] a biquadratic curve
|
|
503
|
-
def create_curve_biquadratic(model, coeffs, crv_name, min_x, max_x, min_y, max_y, min_out, max_out)
|
|
504
|
-
curve = OpenStudio::Model::CurveBiquadratic.new(model)
|
|
505
|
-
curve.setName(crv_name)
|
|
506
|
-
curve.setCoefficient1Constant(coeffs[0])
|
|
507
|
-
curve.setCoefficient2x(coeffs[1])
|
|
508
|
-
curve.setCoefficient3xPOW2(coeffs[2])
|
|
509
|
-
curve.setCoefficient4y(coeffs[3])
|
|
510
|
-
curve.setCoefficient5yPOW2(coeffs[4])
|
|
511
|
-
curve.setCoefficient6xTIMESY(coeffs[5])
|
|
512
|
-
curve.setMinimumValueofx(min_x) unless min_x.nil?
|
|
513
|
-
curve.setMaximumValueofx(max_x) unless max_x.nil?
|
|
514
|
-
curve.setMinimumValueofy(min_y) unless min_y.nil?
|
|
515
|
-
curve.setMaximumValueofy(max_y) unless max_y.nil?
|
|
516
|
-
curve.setMinimumCurveOutput(min_out) unless min_out.nil?
|
|
517
|
-
curve.setMaximumCurveOutput(max_out) unless max_out.nil?
|
|
518
|
-
return curve
|
|
519
|
-
end
|
|
520
|
-
|
|
521
|
-
# Create a bicubic curve of the form
|
|
522
|
-
# z = C1 + C2*x + C3*x^2 + C4*y + C5*y^2 + C6*x*y + C7*x^3 + C8*y^3 + C9*x^2*y + C10*x*y^2
|
|
523
|
-
#
|
|
524
|
-
# @author Scott Horowitz, NREL
|
|
525
|
-
# @param model [OpenStudio::Model::Model] OpenStudio model object
|
|
526
|
-
# @param coeffs [Array<Double>] an array of 10 coefficients, in order
|
|
527
|
-
# @param crv_name [String] the name of the curve
|
|
528
|
-
# @param min_x [Double] the minimum value of independent variable X that will be used
|
|
529
|
-
# @param max_x [Double] the maximum value of independent variable X that will be used
|
|
530
|
-
# @param min_y [Double] the minimum value of independent variable Y that will be used
|
|
531
|
-
# @param max_y [Double] the maximum value of independent variable Y that will be used
|
|
532
|
-
# @param min_out [Double] the minimum value of dependent variable Z
|
|
533
|
-
# @param max_out [Double] the maximum value of dependent variable Z
|
|
534
|
-
# @return [OpenStudio::Model::CurveBicubic] a bicubic curve
|
|
535
|
-
def create_curve_bicubic(model, coeffs, crv_name, min_x, max_x, min_y, max_y, min_out, max_out)
|
|
536
|
-
curve = OpenStudio::Model::CurveBicubic.new(model)
|
|
537
|
-
curve.setName(crv_name)
|
|
538
|
-
curve.setCoefficient1Constant(coeffs[0])
|
|
539
|
-
curve.setCoefficient2x(coeffs[1])
|
|
540
|
-
curve.setCoefficient3xPOW2(coeffs[2])
|
|
541
|
-
curve.setCoefficient4y(coeffs[3])
|
|
542
|
-
curve.setCoefficient5yPOW2(coeffs[4])
|
|
543
|
-
curve.setCoefficient6xTIMESY(coeffs[5])
|
|
544
|
-
curve.setCoefficient7xPOW3(coeffs[6])
|
|
545
|
-
curve.setCoefficient8yPOW3(coeffs[7])
|
|
546
|
-
curve.setCoefficient9xPOW2TIMESY(coeffs[8])
|
|
547
|
-
curve.setCoefficient10xTIMESYPOW2(coeffs[9])
|
|
548
|
-
curve.setMinimumValueofx(min_x) unless min_x.nil?
|
|
549
|
-
curve.setMaximumValueofx(max_x) unless max_x.nil?
|
|
550
|
-
curve.setMinimumValueofy(min_y) unless min_y.nil?
|
|
551
|
-
curve.setMaximumValueofy(max_y) unless max_y.nil?
|
|
552
|
-
curve.setMinimumCurveOutput(min_out) unless min_out.nil?
|
|
553
|
-
curve.setMaximumCurveOutput(max_out) unless max_out.nil?
|
|
554
|
-
return curve
|
|
555
|
-
end
|
|
556
|
-
|
|
557
|
-
# Create a quadratic curve of the form
|
|
558
|
-
# z = C1 + C2*x + C3*x^2
|
|
559
|
-
#
|
|
560
|
-
# @author Scott Horowitz, NREL
|
|
561
|
-
# @param model [OpenStudio::Model::Model] OpenStudio model object
|
|
562
|
-
# @param coeffs [Array<Double>] an array of 3 coefficients, in order
|
|
563
|
-
# @param crv_name [String] the name of the curve
|
|
564
|
-
# @param min_x [Double] the minimum value of independent variable X that will be used
|
|
565
|
-
# @param max_x [Double] the maximum value of independent variable X that will be used
|
|
566
|
-
# @param min_out [Double] the minimum value of dependent variable Z
|
|
567
|
-
# @param max_out [Double] the maximum value of dependent variable Z
|
|
568
|
-
# @param is_dimensionless [Boolean] if true, the X independent variable is considered unitless
|
|
569
|
-
# and the resulting output dependent variable is considered unitless
|
|
570
|
-
# @return [OpenStudio::Model::CurveQuadratic] a quadratic curve
|
|
571
|
-
def create_curve_quadratic(model, coeffs, crv_name, min_x, max_x, min_out, max_out, is_dimensionless = false)
|
|
572
|
-
curve = OpenStudio::Model::CurveQuadratic.new(model)
|
|
573
|
-
curve.setName(crv_name)
|
|
574
|
-
curve.setCoefficient1Constant(coeffs[0])
|
|
575
|
-
curve.setCoefficient2x(coeffs[1])
|
|
576
|
-
curve.setCoefficient3xPOW2(coeffs[2])
|
|
577
|
-
curve.setMinimumValueofx(min_x) unless min_x.nil?
|
|
578
|
-
curve.setMaximumValueofx(max_x) unless max_x.nil?
|
|
579
|
-
curve.setMinimumCurveOutput(min_out) unless min_out.nil?
|
|
580
|
-
curve.setMaximumCurveOutput(max_out) unless max_out.nil?
|
|
581
|
-
if is_dimensionless
|
|
582
|
-
curve.setInputUnitTypeforX('Dimensionless')
|
|
583
|
-
curve.setOutputUnitType('Dimensionless')
|
|
584
|
-
end
|
|
585
|
-
return curve
|
|
586
|
-
end
|
|
587
|
-
|
|
588
|
-
# Create a cubic curve of the form
|
|
589
|
-
# z = C1 + C2*x + C3*x^2 + C4*x^3
|
|
590
|
-
#
|
|
591
|
-
# @author Scott Horowitz, NREL
|
|
592
|
-
# @param model [OpenStudio::Model::Model] OpenStudio model object
|
|
593
|
-
# @param coeffs [Array<Double>] an array of 4 coefficients, in order
|
|
594
|
-
# @param crv_name [String] the name of the curve
|
|
595
|
-
# @param min_x [Double] the minimum value of independent variable X that will be used
|
|
596
|
-
# @param max_x [Double] the maximum value of independent variable X that will be used
|
|
597
|
-
# @param min_out [Double] the minimum value of dependent variable Z
|
|
598
|
-
# @param max_out [Double] the maximum value of dependent variable Z
|
|
599
|
-
# @return [OpenStudio::Model::CurveCubic] a cubic curve
|
|
600
|
-
def create_curve_cubic(model, coeffs, crv_name, min_x, max_x, min_out, max_out)
|
|
601
|
-
curve = OpenStudio::Model::CurveCubic.new(model)
|
|
602
|
-
curve.setName(crv_name)
|
|
603
|
-
curve.setCoefficient1Constant(coeffs[0])
|
|
604
|
-
curve.setCoefficient2x(coeffs[1])
|
|
605
|
-
curve.setCoefficient3xPOW2(coeffs[2])
|
|
606
|
-
curve.setCoefficient4xPOW3(coeffs[3])
|
|
607
|
-
curve.setMinimumValueofx(min_x) unless min_x.nil?
|
|
608
|
-
curve.setMaximumValueofx(max_x) unless max_x.nil?
|
|
609
|
-
curve.setMinimumCurveOutput(min_out) unless min_out.nil?
|
|
610
|
-
curve.setMaximumCurveOutput(max_out) unless max_out.nil?
|
|
611
|
-
return curve
|
|
612
|
-
end
|
|
613
|
-
|
|
614
|
-
# Create an exponential curve of the form
|
|
615
|
-
# z = C1 + C2*x^C3
|
|
616
|
-
#
|
|
617
|
-
# @author Scott Horowitz, NREL
|
|
618
|
-
# @param model [OpenStudio::Model::Model] OpenStudio model object
|
|
619
|
-
# @param coeffs [Array<Double>] an array of 3 coefficients, in order
|
|
620
|
-
# @param crv_name [String] the name of the curve
|
|
621
|
-
# @param min_x [Double] the minimum value of independent variable X that will be used
|
|
622
|
-
# @param max_x [Double] the maximum value of independent variable X that will be used
|
|
623
|
-
# @param min_out [Double] the minimum value of dependent variable Z
|
|
624
|
-
# @param max_out [Double] the maximum value of dependent variable Z
|
|
625
|
-
# @return [OpenStudio::Model::CurveExponent] an exponent curve
|
|
626
|
-
def create_curve_exponent(model, coeffs, crv_name, min_x, max_x, min_out, max_out)
|
|
627
|
-
curve = OpenStudio::Model::CurveExponent.new(model)
|
|
628
|
-
curve.setName(crv_name)
|
|
629
|
-
curve.setCoefficient1Constant(coeffs[0])
|
|
630
|
-
curve.setCoefficient2Constant(coeffs[1])
|
|
631
|
-
curve.setCoefficient3Constant(coeffs[2])
|
|
632
|
-
curve.setMinimumValueofx(min_x) unless min_x.nil?
|
|
633
|
-
curve.setMaximumValueofx(max_x) unless max_x.nil?
|
|
634
|
-
curve.setMinimumCurveOutput(min_out) unless min_out.nil?
|
|
635
|
-
curve.setMaximumCurveOutput(max_out) unless max_out.nil?
|
|
636
|
-
return curve
|
|
637
|
-
end
|
|
638
|
-
|
|
639
|
-
# Sets VAV reheat and VAV no reheat terminals on an air loop to control for outdoor air
|
|
640
|
-
#
|
|
641
|
-
# @param model [OpenStudio::Model::Model] OpenStudio model object
|
|
642
|
-
# @param air_loop [<OpenStudio::Model::AirLoopHVAC>] air loop to enable DCV on.
|
|
643
|
-
# Default is nil, which will apply to all air loops
|
|
644
|
-
# @return [OpenStudio::Model::Model] OpenStudio model object
|
|
645
|
-
def model_set_vav_terminals_to_control_for_outdoor_air(model, air_loop: nil)
|
|
646
|
-
vav_reheats = model.getAirTerminalSingleDuctVAVReheats
|
|
647
|
-
vav_no_reheats = model.getAirTerminalSingleDuctVAVNoReheats
|
|
648
|
-
|
|
649
|
-
if air_loop.nil?
|
|
650
|
-
# all terminals
|
|
651
|
-
vav_reheats.each do |vav_reheat|
|
|
652
|
-
vav_reheat.setControlForOutdoorAir(true)
|
|
653
|
-
end
|
|
654
|
-
vav_no_reheats.each do |vav_no_reheat|
|
|
655
|
-
vav_no_reheat.setControlForOutdoorAir(true)
|
|
656
|
-
end
|
|
657
|
-
else
|
|
658
|
-
vav_reheats.each do |vav_reheat|
|
|
659
|
-
next if vav_reheat.airLoopHVAC.get.name.to_s != air_loop.name.to_s
|
|
660
|
-
|
|
661
|
-
vav_reheat.setControlForOutdoorAir(true)
|
|
662
|
-
end
|
|
663
|
-
vav_no_reheats.each do |vav_no_reheat|
|
|
664
|
-
next if vav_no_reheat.airLoopHVAC.get.name.to_s != air_loop.name.to_s
|
|
665
|
-
|
|
666
|
-
vav_no_reheat.setControlForOutdoorAir(true)
|
|
667
|
-
end
|
|
668
|
-
end
|
|
669
|
-
return model
|
|
670
|
-
end
|
|
671
|
-
|
|
672
|
-
# renames air loop nodes to readable values
|
|
673
|
-
#
|
|
674
|
-
# @param model [OpenStudio::Model::Model] OpenStudio model object
|
|
675
|
-
# @return [OpenStudio::Model::Model] OpenStudio model object
|
|
676
|
-
def rename_air_loop_nodes(model)
|
|
677
|
-
# rename all hvac components on air loops
|
|
678
|
-
model.getHVACComponents.sort.each do |component|
|
|
679
|
-
next if component.to_Node.is_initialized # skip nodes
|
|
680
|
-
|
|
681
|
-
unless component.airLoopHVAC.empty?
|
|
682
|
-
# rename water to air component outlet nodes
|
|
683
|
-
if component.to_WaterToAirComponent.is_initialized
|
|
684
|
-
component = component.to_WaterToAirComponent.get
|
|
685
|
-
unless component.airOutletModelObject.empty?
|
|
686
|
-
component_outlet_object = component.airOutletModelObject.get
|
|
687
|
-
next unless component_outlet_object.to_Node.is_initialized
|
|
688
|
-
|
|
689
|
-
component_outlet_object.setName("#{component.name} Outlet Air Node")
|
|
690
|
-
end
|
|
691
|
-
end
|
|
692
|
-
|
|
693
|
-
# rename air to air component nodes
|
|
694
|
-
if component.to_AirToAirComponent.is_initialized
|
|
695
|
-
component = component.to_AirToAirComponent.get
|
|
696
|
-
unless component.primaryAirOutletModelObject.empty?
|
|
697
|
-
component_outlet_object = component.primaryAirOutletModelObject.get
|
|
698
|
-
next unless component_outlet_object.to_Node.is_initialized
|
|
699
|
-
|
|
700
|
-
component_outlet_object.setName("#{component.name} Primary Outlet Air Node")
|
|
701
|
-
end
|
|
702
|
-
unless component.secondaryAirInletModelObject.empty?
|
|
703
|
-
component_inlet_object = component.secondaryAirInletModelObject.get
|
|
704
|
-
next unless component_inlet_object.to_Node.is_initialized
|
|
705
|
-
|
|
706
|
-
component_inlet_object.setName("#{component.name} Secondary Inlet Air Node")
|
|
707
|
-
end
|
|
708
|
-
end
|
|
709
|
-
|
|
710
|
-
# rename straight component outlet nodes
|
|
711
|
-
if component.to_StraightComponent.is_initialized && !component.to_StraightComponent.get.outletModelObject.empty?
|
|
712
|
-
component_outlet_object = component.to_StraightComponent.get.outletModelObject.get
|
|
713
|
-
next unless component_outlet_object.to_Node.is_initialized
|
|
714
|
-
|
|
715
|
-
component_outlet_object.setName("#{component.name} Outlet Air Node")
|
|
716
|
-
end
|
|
717
|
-
end
|
|
718
|
-
|
|
719
|
-
# rename zone hvac component nodes
|
|
720
|
-
if component.to_ZoneHVACComponent.is_initialized
|
|
721
|
-
component = component.to_ZoneHVACComponent.get
|
|
722
|
-
unless component.airInletModelObject.empty?
|
|
723
|
-
component_inlet_object = component.airInletModelObject.get
|
|
724
|
-
next unless component_inlet_object.to_Node.is_initialized
|
|
725
|
-
|
|
726
|
-
component_inlet_object.setName("#{component.name} Inlet Air Node")
|
|
727
|
-
end
|
|
728
|
-
unless component.airOutletModelObject.empty?
|
|
729
|
-
component_outlet_object = component.airOutletModelObject.get
|
|
730
|
-
next unless component_outlet_object.to_Node.is_initialized
|
|
731
|
-
|
|
732
|
-
component_outlet_object.setName("#{component.name} Outlet Air Node")
|
|
733
|
-
end
|
|
734
|
-
end
|
|
735
|
-
end
|
|
736
|
-
|
|
737
|
-
# rename supply side nodes
|
|
738
|
-
model.getAirLoopHVACs.sort.each do |air_loop|
|
|
739
|
-
air_loop_name = air_loop.name.to_s
|
|
740
|
-
air_loop.demandInletNode.setName("#{air_loop_name} Demand Inlet Node")
|
|
741
|
-
air_loop.demandOutletNode.setName("#{air_loop_name} Demand Outlet Node")
|
|
742
|
-
air_loop.supplyInletNode.setName("#{air_loop_name} Supply Inlet Node")
|
|
743
|
-
air_loop.supplyOutletNode.setName("#{air_loop_name} Supply Outlet Node")
|
|
744
|
-
|
|
745
|
-
unless air_loop.reliefAirNode.empty?
|
|
746
|
-
relief_node = air_loop.reliefAirNode.get
|
|
747
|
-
relief_node.setName("#{air_loop_name} Relief Air Node")
|
|
748
|
-
end
|
|
749
|
-
|
|
750
|
-
unless air_loop.mixedAirNode.empty?
|
|
751
|
-
mixed_node = air_loop.mixedAirNode.get
|
|
752
|
-
mixed_node.setName("#{air_loop_name} Mixed Air Node")
|
|
753
|
-
end
|
|
754
|
-
|
|
755
|
-
# rename outdoor air system and nodes
|
|
756
|
-
unless air_loop.airLoopHVACOutdoorAirSystem.empty?
|
|
757
|
-
oa_system = air_loop.airLoopHVACOutdoorAirSystem.get
|
|
758
|
-
unless oa_system.outboardOANode.empty?
|
|
759
|
-
oa_node = oa_system.outboardOANode.get
|
|
760
|
-
oa_node.setName("#{air_loop_name} Outdoor Air Node")
|
|
761
|
-
end
|
|
762
|
-
end
|
|
763
|
-
end
|
|
764
|
-
|
|
765
|
-
# rename zone air and terminal nodes
|
|
766
|
-
model.getThermalZones.sort.each do |zone|
|
|
767
|
-
zone.zoneAirNode.setName("#{zone.name} Zone Air Node")
|
|
768
|
-
|
|
769
|
-
unless zone.returnAirModelObject.empty?
|
|
770
|
-
zone.returnAirModelObject.get.setName("#{zone.name} Return Air Node")
|
|
771
|
-
end
|
|
772
|
-
|
|
773
|
-
unless zone.airLoopHVACTerminal.empty?
|
|
774
|
-
terminal_unit = zone.airLoopHVACTerminal.get
|
|
775
|
-
if terminal_unit.to_StraightComponent.is_initialized
|
|
776
|
-
component = terminal_unit.to_StraightComponent.get
|
|
777
|
-
component.inletModelObject.get.setName("#{terminal_unit.name} Inlet Air Node")
|
|
778
|
-
end
|
|
779
|
-
end
|
|
780
|
-
end
|
|
781
|
-
|
|
782
|
-
# rename zone equipment list objects
|
|
783
|
-
model.getZoneHVACEquipmentLists.sort.each do |obj|
|
|
784
|
-
begin
|
|
785
|
-
zone = obj.thermalZone
|
|
786
|
-
obj.setName("#{zone.name} Zone HVAC Equipment List")
|
|
787
|
-
rescue StandardError => e
|
|
788
|
-
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.model.Model', "Removing ZoneHVACEquipmentList #{obj.name}; missing thermal zone.")
|
|
789
|
-
obj.remove
|
|
790
|
-
end
|
|
791
|
-
end
|
|
792
|
-
|
|
793
|
-
return model
|
|
794
|
-
end
|
|
795
|
-
|
|
796
|
-
# renames plant loop nodes to readable values
|
|
797
|
-
#
|
|
798
|
-
# @param model [OpenStudio::Model::Model] OpenStudio model object
|
|
799
|
-
# @return [OpenStudio::Model::Model] OpenStudio model object
|
|
800
|
-
def rename_plant_loop_nodes(model)
|
|
801
|
-
# rename all hvac components on plant loops
|
|
802
|
-
model.getHVACComponents.sort.each do |component|
|
|
803
|
-
next if component.to_Node.is_initialized # skip nodes
|
|
804
|
-
|
|
805
|
-
unless component.plantLoop.empty?
|
|
806
|
-
# rename straight component nodes
|
|
807
|
-
# some inlet or outlet nodes may get renamed again
|
|
808
|
-
if component.to_StraightComponent.is_initialized
|
|
809
|
-
unless component.to_StraightComponent.get.inletModelObject.empty?
|
|
810
|
-
component_inlet_object = component.to_StraightComponent.get.inletModelObject.get
|
|
811
|
-
next unless component_inlet_object.to_Node.is_initialized
|
|
812
|
-
|
|
813
|
-
component_inlet_object.setName("#{component.name} Inlet Water Node")
|
|
814
|
-
end
|
|
815
|
-
unless component.to_StraightComponent.get.outletModelObject.empty?
|
|
816
|
-
component_outlet_object = component.to_StraightComponent.get.outletModelObject.get
|
|
817
|
-
next unless component_outlet_object.to_Node.is_initialized
|
|
818
|
-
|
|
819
|
-
component_outlet_object.setName("#{component.name} Outlet Water Node")
|
|
820
|
-
end
|
|
821
|
-
end
|
|
822
|
-
|
|
823
|
-
# rename water to air component nodes
|
|
824
|
-
if component.to_WaterToAirComponent.is_initialized
|
|
825
|
-
component = component.to_WaterToAirComponent.get
|
|
826
|
-
unless component.waterInletModelObject.empty?
|
|
827
|
-
component_inlet_object = component.waterInletModelObject.get
|
|
828
|
-
next unless component_inlet_object.to_Node.is_initialized
|
|
829
|
-
|
|
830
|
-
component_inlet_object.setName("#{component.name} Inlet Water Node")
|
|
831
|
-
end
|
|
832
|
-
unless component.waterOutletModelObject.empty?
|
|
833
|
-
component_outlet_object = component.waterOutletModelObject.get
|
|
834
|
-
next unless component_outlet_object.to_Node.is_initialized
|
|
835
|
-
|
|
836
|
-
component_outlet_object.setName("#{component.name} Outlet Water Node")
|
|
837
|
-
end
|
|
838
|
-
end
|
|
839
|
-
|
|
840
|
-
# rename water to water component nodes
|
|
841
|
-
if component.to_WaterToWaterComponent.is_initialized
|
|
842
|
-
component = component.to_WaterToWaterComponent.get
|
|
843
|
-
unless component.demandInletModelObject.empty?
|
|
844
|
-
demand_inlet_object = component.demandInletModelObject.get
|
|
845
|
-
next unless demand_inlet_object.to_Node.is_initialized
|
|
846
|
-
|
|
847
|
-
demand_inlet_object.setName("#{component.name} Demand Inlet Water Node")
|
|
848
|
-
end
|
|
849
|
-
unless component.demandOutletModelObject.empty?
|
|
850
|
-
demand_outlet_object = component.demandOutletModelObject.get
|
|
851
|
-
next unless demand_outlet_object.to_Node.is_initialized
|
|
852
|
-
|
|
853
|
-
demand_outlet_object.setName("#{component.name} Demand Outlet Water Node")
|
|
854
|
-
end
|
|
855
|
-
unless component.supplyInletModelObject.empty?
|
|
856
|
-
supply_inlet_object = component.supplyInletModelObject.get
|
|
857
|
-
next unless supply_inlet_object.to_Node.is_initialized
|
|
858
|
-
|
|
859
|
-
supply_inlet_object.setName("#{component.name} Supply Inlet Water Node")
|
|
860
|
-
end
|
|
861
|
-
unless component.supplyOutletModelObject.empty?
|
|
862
|
-
supply_outlet_object = component.supplyOutletModelObject.get
|
|
863
|
-
next unless supply_outlet_object.to_Node.is_initialized
|
|
864
|
-
|
|
865
|
-
supply_outlet_object.setName("#{component.name} Supply Outlet Water Node")
|
|
866
|
-
end
|
|
867
|
-
end
|
|
868
|
-
end
|
|
869
|
-
end
|
|
870
|
-
|
|
871
|
-
# rename plant nodes
|
|
872
|
-
model.getPlantLoops.sort.each do |plant_loop|
|
|
873
|
-
plant_loop_name = plant_loop.name.to_s
|
|
874
|
-
plant_loop.demandInletNode.setName("#{plant_loop_name} Demand Inlet Node")
|
|
875
|
-
plant_loop.demandOutletNode.setName("#{plant_loop_name} Demand Outlet Node")
|
|
876
|
-
plant_loop.supplyInletNode.setName("#{plant_loop_name} Supply Inlet Node")
|
|
877
|
-
plant_loop.supplyOutletNode.setName("#{plant_loop_name} Supply Outlet Node")
|
|
878
|
-
end
|
|
879
|
-
|
|
880
|
-
return model
|
|
881
|
-
end
|
|
882
|
-
|
|
883
|
-
# converts existing string to ems friendly string
|
|
884
|
-
#
|
|
885
|
-
# @param name [String] original name
|
|
886
|
-
# @return [String] the resulting EMS friendly string
|
|
887
|
-
def ems_friendly_name(name)
|
|
888
|
-
# replace white space and special characters with underscore
|
|
889
|
-
# \W is equivalent to [^a-zA-Z0-9_]
|
|
890
|
-
new_name = name.to_s.gsub(/\W/, '_')
|
|
891
|
-
|
|
892
|
-
# prepend ems_ in case the name starts with a number
|
|
893
|
-
new_name = "ems_#{new_name}"
|
|
894
|
-
|
|
895
|
-
return new_name
|
|
896
|
-
end
|
|
897
|
-
|
|
898
|
-
def true?(obj)
|
|
899
|
-
obj.to_s.downcase == 'true'
|
|
900
|
-
end
|
|
901
|
-
end
|