openstudio-standards 0.2.14 → 0.2.15.pre.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.json +0 -19
- data/data/geometry/ASHRAEMidriseApartment.json +47 -47
- data/data/geometry/ASHRAESecondarySchool.osm +2 -2
- data/data/standards/OpenStudio_Standards-ashrae_90_1.xlsx +0 -0
- data/data/standards/export_OpenStudio_libraries.rb +1 -1
- data/data/standards/manage_OpenStudio_Standards.rb +43 -87
- data/data/standards/metadata_units_OpenStudio_Standards-ashrae_90_1.csv +9 -0
- data/data/standards/openstudio_standards_duplicates_log.csv +142 -27
- data/data/standards/test_performance_expected_dd_results.csv +2016 -2016
- data/data/weather/CAN_NU_Iqaluit.AP.719090_CWEC2016.ddy +2316 -0
- data/data/weather/CAN_NU_Iqaluit.AP.719090_CWEC2016.epw +8768 -0
- data/data/weather/CAN_NU_Iqaluit.AP.719090_CWEC2016.stat +697 -0
- data/lib/openstudio-standards/btap/WeatherData1.json +54 -0
- data/lib/openstudio-standards/btap/WeatherData1.xlsx +0 -0
- data/lib/openstudio-standards/btap/btap_result.rb +12 -10
- data/lib/openstudio-standards/btap/envelope.rb +2 -2
- data/lib/openstudio-standards/btap/geometry.rb +96 -49
- data/lib/openstudio-standards/{utilities → btap/utilities}/Add_template_field_to_json.rb +0 -0
- data/lib/openstudio-standards/{utilities → btap/utilities}/convert_surfaces_to_adiabatic_necb_8426.rb +0 -0
- data/lib/openstudio-standards/{utilities → btap/utilities}/generate_space_types.rb +0 -0
- data/lib/openstudio-standards/{utilities → btap/utilities}/necb_to_epw_map.rb +0 -0
- data/lib/openstudio-standards/{utilities → btap/utilities}/os_sim_extract.rb +0 -0
- data/lib/openstudio-standards/{utilities → btap/utilities}/rename_surfaces.rb +0 -0
- data/lib/openstudio-standards/{utilities → btap/utilities}/round_surf_coords.rb +0 -0
- data/lib/openstudio-standards/{utilities → btap/utilities}/sched_create.rb +0 -0
- data/lib/openstudio-standards/{utilities → btap/utilities}/set_mult_to_adiabatic.rb +0 -0
- data/lib/openstudio-standards/btap/utilities/space_type.rb +78 -0
- data/lib/openstudio-standards/{utilities → btap/utilities}/weatherData1_xlsx_to_json.rb +0 -0
- data/lib/openstudio-standards/hvac_sizing/Siz.AirConditionerVariableRefrigerantFlow.rb +1 -1
- data/lib/openstudio-standards/hvac_sizing/Siz.HVACComponent.rb +1 -1
- data/lib/openstudio-standards/hvac_sizing/Siz.HeatingCoolingFuels.rb +20 -6
- data/lib/openstudio-standards/hvac_sizing/Siz.Model.rb +6 -6
- data/lib/openstudio-standards/hvac_sizing/Siz.WaterHeaterMixed.rb +2 -2
- data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACTerminalUnitVariableRefrigerantFlow.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.AirTerminalSingleDuctVAVReheat.rb +2 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.PumpVariableSpeed.rb +6 -7
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2007/ashrae_90_1_2007.AirTerminalSingleDuctVAVReheat.rb +2 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2007/ashrae_90_1_2007.FanConstantVolume.rb +5 -4
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2007/ashrae_90_1_2007.FanOnOff.rb +5 -5
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2007/ashrae_90_1_2007.FanVariableVolume.rb +5 -4
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2007/ashrae_90_1_2007.PumpVariableSpeed.rb +6 -7
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.AirTerminalSingleDuctVAVReheat.rb +2 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.FanConstantVolume.rb +5 -4
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.FanOnOff.rb +5 -5
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.FanVariableVolume.rb +5 -4
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.Model.elevators.rb +6 -4
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.Model.rb +10 -9
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.PumpVariableSpeed.rb +9 -11
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirTerminalSingleDuctVAVReheat.rb +2 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.FanConstantVolume.rb +5 -4
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.FanOnOff.rb +5 -5
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.FanVariableVolume.rb +5 -4
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.Model.elevators.rb +11 -7
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.Model.rb +17 -16
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.PumpVariableSpeed.rb +9 -11
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.hvac_systems.rb +4 -2
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.AirTerminalSingleDuctVAVReheat.rb +2 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.FanConstantVolume.rb +5 -4
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.FanOnOff.rb +5 -5
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.FanVariableVolume.rb +5 -4
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.Model.elevators.rb +11 -7
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.Model.rb +23 -22
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.PumpVariableSpeed.rb +9 -10
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.hvac_systems.rb +4 -2
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirTerminalSingleDuctVAVReheat.rb +2 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.FanConstantVolume.rb +5 -4
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.FanOnOff.rb +5 -5
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.FanVariableVolume.rb +5 -4
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Model.elevators.rb +11 -7
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Model.rb +23 -22
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Pump.rb +89 -0
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.PumpVariableSpeed.rb +9 -10
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Space.rb +76 -0
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.hvac_systems.rb +22 -2
- data/lib/openstudio-standards/prototypes/ashrae_90_1/doe_ref_1980_2004/doe_ref_1980_2004.AirTerminalSingleDuctVAVReheat.rb +2 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/doe_ref_1980_2004/doe_ref_1980_2004.Model.elevators.rb +11 -11
- data/lib/openstudio-standards/prototypes/ashrae_90_1/doe_ref_1980_2004/doe_ref_1980_2004.refrigeration.rb +5 -4
- data/lib/openstudio-standards/prototypes/ashrae_90_1/doe_ref_pre_1980/doe_ref_pre_1980.AirTerminalSingleDuctVAVReheat.rb +2 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/doe_ref_pre_1980/doe_ref_pre_1980.CoilHeatingGas.rb +5 -4
- data/lib/openstudio-standards/prototypes/ashrae_90_1/doe_ref_pre_1980/doe_ref_pre_1980.Model.elevators.rb +11 -11
- data/lib/openstudio-standards/prototypes/ashrae_90_1/doe_ref_pre_1980/doe_ref_pre_1980.refrigeration.rb +5 -4
- data/lib/openstudio-standards/prototypes/ashrae_90_1/nrel_nze_ready_2017/nrel_zne_ready_2017.AirTerminalSingleDuctVAVReheat.rb +2 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/nrel_nze_ready_2017/nrel_zne_ready_2017.FanConstantVolume.rb +5 -4
- data/lib/openstudio-standards/prototypes/ashrae_90_1/nrel_nze_ready_2017/nrel_zne_ready_2017.FanOnOff.rb +5 -5
- data/lib/openstudio-standards/prototypes/ashrae_90_1/nrel_nze_ready_2017/nrel_zne_ready_2017.FanVariableVolume.rb +5 -4
- data/lib/openstudio-standards/prototypes/ashrae_90_1/nrel_nze_ready_2017/nrel_zne_ready_2017.HeatExchangerAirToAirSensibleAndLatent.rb +2 -0
- data/lib/openstudio-standards/prototypes/ashrae_90_1/nrel_nze_ready_2017/nrel_zne_ready_2017.Model.elevators.rb +11 -7
- data/lib/openstudio-standards/prototypes/ashrae_90_1/nrel_nze_ready_2017/nrel_zne_ready_2017.Model.rb +10 -10
- data/lib/openstudio-standards/prototypes/ashrae_90_1/nrel_nze_ready_2017/nrel_zne_ready_2017.hvac_systems.rb +4 -2
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.AirTerminalSingleDuctVAVReheat.rb +2 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.FanConstantVolume.rb +5 -4
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.FanOnOff.rb +5 -5
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.FanVariableVolume.rb +5 -4
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.HeatExchangerAirToAirSensibleAndLatent.rb +2 -0
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.Model.elevators.rb +11 -7
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.Model.rb +10 -10
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.hvac_systems.rb +4 -2
- data/lib/openstudio-standards/prototypes/cbes/cbes.Model.elevators.rb +3 -6
- data/lib/openstudio-standards/prototypes/cbes/cbes.refrigeration.rb +5 -4
- data/lib/openstudio-standards/prototypes/cbes/cbes_t24_2008/cbes_t24_2008.FanConstantVolume.rb +5 -3
- data/lib/openstudio-standards/prototypes/cbes/cbes_t24_2008/cbes_t24_2008.FanOnOff.rb +5 -4
- data/lib/openstudio-standards/prototypes/cbes/cbes_t24_2008/cbes_t24_2008.FanVariableVolume.rb +5 -3
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.College.rb +65 -30
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.Courthouse.rb +54 -23
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.FullServiceRestaurant.rb +135 -147
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.HighRiseApartment.rb +42 -7
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.Hospital.rb +85 -12
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.Laboratory.rb +42 -30
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeDataCenterHighITE.rb +39 -8
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeDataCenterLowITE.rb +39 -8
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeHotel.rb +60 -12
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeOffice.rb +33 -265
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeOfficeDetailed.rb +41 -3
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.MediumOffice.rb +69 -297
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.MediumOfficeDetailed.rb +68 -25
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.MidriseApartment.rb +88 -59
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.Outpatient.rb +88 -9
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.PrimarySchool.rb +48 -10
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.QuickServiceRestaurant.rb +130 -145
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.RetailStandalone.rb +29 -101
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.RetailStripmall.rb +24 -7
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SecondarySchool.rb +48 -589
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SmallDataCenterHighITE.rb +38 -7
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SmallDataCenterLowITE.rb +38 -8
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SmallHotel.rb +40 -7
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SmallOffice.rb +85 -171
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SmallOfficeDetailed.rb +87 -44
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SuperMarket.rb +46 -5
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SuperTallBuilding.rb +105 -17
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.TallBuilding.rb +97 -15
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.Warehouse.rb +26 -167
- data/lib/openstudio-standards/prototypes/common/do_not_edit_metaclasses.rb +3828 -1131
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.AirConditionerVariableRefrigerantFlow.rb +3 -0
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.AirTerminalSingleDuctVAVReheat.rb +2 -1
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.BoilerHotWater.rb +2 -0
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CentralAirSourceHeatPump.rb +2 -0
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilCoolingDXSingleSpeed.rb +4 -1
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilCoolingDXTwoSpeed.rb +3 -0
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilCoolingWater.rb +4 -1
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilCoolingWaterToAirHeatPumpEquationFit.rb +3 -0
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingDXSingleSpeed.rb +9 -0
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingElectric.rb +3 -0
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingGas.rb +9 -4
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingWater.rb +4 -1
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingWaterToAirHeatPumpEquationFit.rb +3 -0
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.ControllerWaterCoil.rb +2 -2
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoolingTower.rb +4 -1
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Fan.rb +23 -2
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanConstantVolume.rb +29 -4
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanOnOff.rb +29 -5
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanVariableVolume.rb +43 -4
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanZoneExhaust.rb +22 -0
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.HeatExchangerAirToAirSensibleAndLatent.rb +46 -3
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.elevators.rb +27 -22
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.exterior_lights.rb +15 -8
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.hvac.rb +22 -4
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.rb +429 -59
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.swh.rb +18 -11
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.transformers.rb +11 -2
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Pump.rb +1 -0
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.PumpVariableSpeed.rb +8 -10
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.ServiceWaterHeating.rb +37 -28
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.SizingSystem.rb +24 -6
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.hvac_systems.rb +251 -65
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.radiant_system_controls.rb +1 -1
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.refrigeration.rb +46 -31
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.utilities.rb +62 -10
- data/lib/openstudio-standards/prototypes/common/prototype_metaprogramming.rb +76 -33
- data/lib/openstudio-standards/prototypes/deer/deer.Model.rb +1 -1
- data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +445 -275
- data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctParallelPIUReheat.rb +3 -3
- data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctVAVReheat.rb +26 -21
- data/lib/openstudio-standards/standards/Standards.BoilerHotWater.rb +5 -2
- data/lib/openstudio-standards/standards/Standards.BuildingStory.rb +7 -9
- data/lib/openstudio-standards/standards/Standards.ChillerElectricEIR.rb +8 -2
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXMultiSpeed.rb +10 -6
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXSingleSpeed.rb +5 -1
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXTwoSpeed.rb +6 -1
- data/lib/openstudio-standards/standards/Standards.CoilCoolingWaterToAirHeatPumpEquationFit.rb +45 -4
- data/lib/openstudio-standards/standards/Standards.CoilDX.rb +18 -8
- data/lib/openstudio-standards/standards/Standards.CoilHeatingDXMultiSpeed.rb +9 -7
- data/lib/openstudio-standards/standards/Standards.CoilHeatingDXSingleSpeed.rb +8 -4
- data/lib/openstudio-standards/standards/Standards.CoilHeatingGas.rb +86 -3
- data/lib/openstudio-standards/standards/Standards.CoilHeatingGasMultiStage.rb +5 -2
- data/lib/openstudio-standards/standards/Standards.CoilHeatingWaterToAirHeatPumpEquationFit.rb +6 -2
- data/lib/openstudio-standards/standards/Standards.Construction.rb +66 -35
- data/lib/openstudio-standards/standards/Standards.CoolingTower.rb +7 -7
- data/lib/openstudio-standards/standards/Standards.CoolingTowerSingleSpeed.rb +2 -2
- data/lib/openstudio-standards/standards/Standards.CoolingTowerTwoSpeed.rb +2 -1
- data/lib/openstudio-standards/standards/Standards.CoolingTowerVariableSpeed.rb +2 -1
- data/lib/openstudio-standards/standards/Standards.Fan.rb +53 -35
- data/lib/openstudio-standards/standards/Standards.FanVariableVolume.rb +22 -16
- data/lib/openstudio-standards/standards/Standards.FluidCooler.rb +2 -2
- data/lib/openstudio-standards/standards/Standards.HeaderedPumpsVariableSpeed.rb +4 -4
- data/lib/openstudio-standards/standards/Standards.HeatExchangerSensLat.rb +77 -19
- data/lib/openstudio-standards/standards/Standards.Model.rb +387 -245
- data/lib/openstudio-standards/standards/Standards.PlanarSurface.rb +13 -15
- data/lib/openstudio-standards/standards/Standards.PlantLoop.rb +94 -48
- data/lib/openstudio-standards/standards/Standards.Pump.rb +28 -20
- data/lib/openstudio-standards/standards/Standards.PumpVariableSpeed.rb +3 -4
- data/lib/openstudio-standards/standards/Standards.ScheduleCompact.rb +2 -1
- data/lib/openstudio-standards/standards/Standards.ScheduleConstant.rb +2 -0
- data/lib/openstudio-standards/standards/Standards.ScheduleRuleset.rb +34 -24
- data/lib/openstudio-standards/standards/Standards.Space.rb +179 -116
- data/lib/openstudio-standards/standards/Standards.SpaceType.rb +23 -12
- data/lib/openstudio-standards/standards/Standards.SubSurface.rb +55 -25
- data/lib/openstudio-standards/standards/Standards.Surface.rb +57 -32
- data/lib/openstudio-standards/standards/Standards.ThermalZone.rb +157 -107
- data/lib/openstudio-standards/standards/Standards.WaterHeaterMixed.rb +9 -6
- data/lib/openstudio-standards/standards/Standards.ZoneHVACComponent.rb +52 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1.Standards.FanVariableVolume.rb +2 -2
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1.rb +4 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.AirLoopHVAC.rb +28 -18
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.FanVariableVolume.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.PlantLoop.rb +4 -2
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.rb +4 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/comstock_ashrae_90_1_2004/comstock_ashrae_90_1_2004.rb +4 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/comstock_ashrae_90_1_2004/data/ashrae_90_1.schedules.json +696 -2938
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/comstock_ashrae_90_1_2004/data/comstock_ashrae_90_1_2004.ext_ltg.json +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/comstock_ashrae_90_1_2004/data/comstock_ashrae_90_1_2004.spc_typ.json +123 -123
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.furnaces.json +26 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.prototype_inputs.json +11 -11
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.refrigeration_system.json +0 -8
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.spc_typ.json +395 -384
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.unitary_acs.json +69 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/ashrae_90_1_2007.AirLoopHVAC.rb +20 -13
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/ashrae_90_1_2007.FanVariableVolume.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/ashrae_90_1_2007.Model.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/ashrae_90_1_2007.rb +4 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/comstock_ashrae_90_1_2007/comstock_ashrae_90_1_2007.rb +4 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/comstock_ashrae_90_1_2007/data/ashrae_90_1.schedules.json +696 -2938
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/comstock_ashrae_90_1_2007/data/comstock_ashrae_90_1_2007.ext_ltg.json +1 -1
- 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 +122 -122
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.furnaces.json +26 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.prototype_inputs.json +11 -11
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.refrigeration_system.json +0 -8
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.spc_typ.json +413 -401
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.unitary_acs.json +69 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.AirLoopHVAC.rb +42 -53
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.AirTerminalSingleDuctVAVReheat.rb +3 -2
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.CoolingTower.rb +5 -8
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.FanVariableVolume.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.Space.rb +6 -4
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.rb +4 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/comstock_ashrae_90_1_2010/comstock_ashrae_90_1_2010.rb +4 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/comstock_ashrae_90_1_2010/data/ashrae_90_1.schedules.json +696 -2938
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/comstock_ashrae_90_1_2010/data/comstock_ashrae_90_1_2010.ext_ltg.json +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 +129 -129
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.energy_recovery.json +210 -42
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.furnaces.json +26 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.prototype_inputs.json +11 -11
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.refrigeration_system.json +0 -8
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.spc_typ.json +460 -320
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.unitary_acs.json +69 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirLoopHVAC.rb +45 -51
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirTerminalSingleDuctVAVReheat.rb +3 -2
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.CoolingTower.rb +5 -8
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.CoolingTowerVariableSpeed.rb +2 -3
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.FanVariableVolume.rb +2 -2
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.Space.rb +8 -5
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.ThermalZone.rb +2 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.WaterHeaterMixed.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.ZoneHVACComponent.rb +1 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.rb +4 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/comstock_ashrae_90_1_2013/comstock_ashrae_90_1_2013.rb +4 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/comstock_ashrae_90_1_2013/data/ashrae_90_1.schedules.json +696 -2938
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/comstock_ashrae_90_1_2013/data/comstock_ashrae_90_1_2013.ext_ltg.json +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 +121 -121
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.energy_recovery.json +420 -84
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.furnaces.json +26 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.prototype_inputs.json +12 -12
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.refrigeration_system.json +0 -8
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.spc_typ.json +475 -335
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.unitary_acs.json +69 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.AirLoopHVAC.rb +40 -50
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.AirTerminalSingleDuctVAVReheat.rb +3 -2
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.CoolingTower.rb +5 -8
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.CoolingTowerVariableSpeed.rb +2 -3
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.FanVariableVolume.rb +2 -2
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.Space.rb +8 -5
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.ThermalZone.rb +2 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.ZoneHVACComponent.rb +1 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.rb +4 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/comstock_ashrae_90_1_2016/comstock_ashrae_90_1_2016.rb +4 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/comstock_ashrae_90_1_2016/data/ashrae_90_1.schedules.json +696 -2938
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/comstock_ashrae_90_1_2016/data/comstock_ashrae_90_1_2016.ext_ltg.json +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 +152 -128
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.energy_recovery.json +488 -84
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.furnaces.json +26 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.spc_typ.json +47 -47
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.unitary_acs.json +69 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirLoopHVAC.rb +342 -56
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirTerminalSingleDuctVAVReheat.rb +3 -2
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.CoolingTower.rb +5 -8
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.CoolingTowerVariableSpeed.rb +2 -3
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.FanVariableVolume.rb +2 -2
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Space.rb +25 -5
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.ThermalZone.rb +2 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.ZoneHVACComponent.rb +30 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.rb +4 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/comstock_ashrae_90_1_2019/comstock_ashrae_90_1_2019.rb +4 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/comstock_ashrae_90_1_2019/data/ashrae_90_1.schedules.json +696 -2938
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/comstock_ashrae_90_1_2019/data/comstock_ashrae_90_1_2019.ext_ltg.json +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 +151 -127
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.boilers.json +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.energy_recovery.json +2307 -101
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.furnaces.json +26 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.refrigeration_compressors.json +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.spc_typ.json +47 -47
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.unitary_acs.json +69 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.curves.json +25 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.schedules.json +286 -224
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/comstock_doe_ref_1980_2004/comstock_doe_ref_1980_2004.rb +4 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/comstock_doe_ref_1980_2004/data/ashrae_90_1.schedules.json +696 -2938
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/comstock_doe_ref_1980_2004/data/comstock_doe_ref_1980_2004.ext_ltg.json +1 -1
- 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 +126 -126
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/data/doe_ref_1980_2004.furnaces.json +26 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/data/doe_ref_1980_2004.prototype_inputs.json +11 -11
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/data/doe_ref_1980_2004.refrigeration_system.json +0 -8
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/data/doe_ref_1980_2004.spc_typ.json +405 -393
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/doe_ref_1980_2004.AirLoopHVAC.rb +15 -11
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/doe_ref_1980_2004.Model.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/doe_ref_1980_2004.PlantLoop.rb +3 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/doe_ref_1980_2004.rb +4 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/comstock_doe_ref_pre_1980/comstock_doe_ref_pre_1980.rb +4 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/comstock_doe_ref_pre_1980/data/ashrae_90_1.schedules.json +696 -2938
- 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 +121 -121
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/data/doe_ref_pre_1980.furnaces.json +37 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/data/doe_ref_pre_1980.prototype_inputs.json +11 -11
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/data/doe_ref_pre_1980.refrigeration_system.json +0 -8
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/data/doe_ref_pre_1980.spc_typ.json +403 -391
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/doe_ref_pre_1980.AirLoopHVAC.rb +15 -11
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/doe_ref_pre_1980.Model.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/doe_ref_pre_1980.PlantLoop.rb +3 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/doe_ref_pre_1980.rb +4 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/data/nrel_zne_ready_2017.furnaces.json +15 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.AirLoopHVAC.rb +64 -42
- data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.AirTerminalSingleDuctVAVReheat.rb +3 -2
- data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.CoolingTower.rb +5 -8
- data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.CoolingTowerVariableSpeed.rb +2 -3
- data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.FanVariableVolume.rb +2 -2
- data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.HeatExchangerSensLat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.Model.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.PlantLoop.rb +4 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.Space.rb +5 -3
- data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.ZoneHVACComponent.rb +3 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.rb +4 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/data/ze_aedg_multifamily.furnaces.json +15 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.AirLoopHVAC.rb +61 -36
- data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.AirTerminalSingleDuctVAVReheat.rb +3 -2
- data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.CoolingTower.rb +5 -8
- data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.CoolingTowerVariableSpeed.rb +2 -3
- data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.FanVariableVolume.rb +2 -2
- data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.HeatExchangerSensLat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.Model.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.PlantLoop.rb +4 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.Space.rb +6 -4
- data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.ZoneHVACComponent.rb +3 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.rb +4 -0
- data/lib/openstudio-standards/standards/cbes/cbes.AirLoopHVAC.rb +20 -14
- data/lib/openstudio-standards/standards/cbes/cbes.PlantLoop.rb +3 -0
- data/lib/openstudio-standards/standards/cbes/cbes.rb +4 -0
- data/lib/openstudio-standards/standards/cbes/cbes_pre_1978/cbes_pre_1978.rb +4 -0
- data/lib/openstudio-standards/standards/cbes/cbes_t24_1978/cbes_t24_1978.rb +4 -0
- data/lib/openstudio-standards/standards/cbes/cbes_t24_1992/cbes_t24_1992.rb +4 -0
- data/lib/openstudio-standards/standards/cbes/cbes_t24_2001/cbes_t24_2001.rb +4 -0
- data/lib/openstudio-standards/standards/cbes/cbes_t24_2005/cbes_t24_2005.rb +4 -0
- data/lib/openstudio-standards/standards/cbes/cbes_t24_2008/cbes_t24_2008.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer.AirLoopHVAC.rb +10 -5
- data/lib/openstudio-standards/standards/deer/deer.PlanarSurface.rb +1 -1
- data/lib/openstudio-standards/standards/deer/deer.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_1985/comstock_deer_1985/comstock_deer_1985.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_1985/comstock_deer_1985/data/comstock_deer_1985.ext_ltg.json +2 -2
- data/lib/openstudio-standards/standards/deer/deer_1985/deer_1985.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_1996/comstock_deer_1996/comstock_deer_1996.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_1996/comstock_deer_1996/data/comstock_deer_1996.ext_ltg.json +2 -2
- data/lib/openstudio-standards/standards/deer/deer_1996/deer_1996.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2003/comstock_deer_2003/comstock_deer_2003.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2003/comstock_deer_2003/data/comstock_deer_2003.ext_ltg.json +2 -2
- data/lib/openstudio-standards/standards/deer/deer_2003/deer_2003.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2007/comstock_deer_2007/comstock_deer_2007.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2007/comstock_deer_2007/data/comstock_deer_2007.ext_ltg.json +2 -2
- data/lib/openstudio-standards/standards/deer/deer_2007/deer_2007.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2011/comstock_deer_2011/comstock_deer_2011.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2011/comstock_deer_2011/data/comstock_deer_2011.ext_ltg.json +2 -2
- data/lib/openstudio-standards/standards/deer/deer_2011/deer_2011.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2014/comstock_deer_2014/comstock_deer_2014.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2014/comstock_deer_2014/data/comstock_deer_2014.ext_ltg.json +2 -2
- data/lib/openstudio-standards/standards/deer/deer_2014/deer_2014.Space.rb +5 -3
- data/lib/openstudio-standards/standards/deer/deer_2014/deer_2014.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2015/comstock_deer_2015/comstock_deer_2015.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2015/comstock_deer_2015/data/comstock_deer_2015.ext_ltg.json +2 -2
- data/lib/openstudio-standards/standards/deer/deer_2015/deer_2015.Space.rb +5 -3
- data/lib/openstudio-standards/standards/deer/deer_2015/deer_2015.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2017/comstock_deer_2017/comstock_deer_2017.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2017/comstock_deer_2017/data/comstock_deer_2017.ext_ltg.json +2 -2
- data/lib/openstudio-standards/standards/deer/deer_2017/deer_2017.Space.rb +5 -3
- data/lib/openstudio-standards/standards/deer/deer_2017/deer_2017.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2020/comstock_deer_2020/comstock_deer_2020.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2020/deer_2020.AirLoopHVAC.rb +9 -5
- data/lib/openstudio-standards/standards/deer/deer_2020/deer_2020.FanVariableVolume.rb +3 -0
- data/lib/openstudio-standards/standards/deer/deer_2020/deer_2020.Space.rb +5 -3
- data/lib/openstudio-standards/standards/deer/deer_2020/deer_2020.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2025/comstock_deer_2025/comstock_deer_2025.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2025/deer_2025.AirLoopHVAC.rb +9 -5
- data/lib/openstudio-standards/standards/deer/deer_2025/deer_2025.FanVariableVolume.rb +3 -0
- data/lib/openstudio-standards/standards/deer/deer_2025/deer_2025.Space.rb +5 -3
- data/lib/openstudio-standards/standards/deer/deer_2025/deer_2025.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2030/comstock_deer_2030/comstock_deer_2030.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2030/deer_2030.AirLoopHVAC.rb +9 -5
- data/lib/openstudio-standards/standards/deer/deer_2030/deer_2030.FanVariableVolume.rb +3 -0
- data/lib/openstudio-standards/standards/deer/deer_2030/deer_2030.Space.rb +5 -3
- data/lib/openstudio-standards/standards/deer/deer_2030/deer_2030.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2035/comstock_deer_2035/comstock_deer_2035.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2035/deer_2035.AirLoopHVAC.rb +9 -5
- data/lib/openstudio-standards/standards/deer/deer_2035/deer_2035.FanVariableVolume.rb +3 -0
- data/lib/openstudio-standards/standards/deer/deer_2035/deer_2035.Space.rb +5 -3
- data/lib/openstudio-standards/standards/deer/deer_2035/deer_2035.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2040/comstock_deer_2040/comstock_deer_2040.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2040/deer_2040.AirLoopHVAC.rb +9 -5
- data/lib/openstudio-standards/standards/deer/deer_2040/deer_2040.FanVariableVolume.rb +3 -0
- data/lib/openstudio-standards/standards/deer/deer_2040/deer_2040.Space.rb +5 -3
- data/lib/openstudio-standards/standards/deer/deer_2040/deer_2040.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2045/comstock_deer_2045/comstock_deer_2045.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2045/deer_2045.AirLoopHVAC.rb +9 -5
- data/lib/openstudio-standards/standards/deer/deer_2045/deer_2045.FanVariableVolume.rb +3 -0
- data/lib/openstudio-standards/standards/deer/deer_2045/deer_2045.Space.rb +5 -3
- data/lib/openstudio-standards/standards/deer/deer_2045/deer_2045.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2050/comstock_deer_2050/comstock_deer_2050.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2050/deer_2050.AirLoopHVAC.rb +9 -5
- data/lib/openstudio-standards/standards/deer/deer_2050/deer_2050.FanVariableVolume.rb +3 -0
- data/lib/openstudio-standards/standards/deer/deer_2050/deer_2050.Space.rb +5 -3
- data/lib/openstudio-standards/standards/deer/deer_2050/deer_2050.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2055/comstock_deer_2055/comstock_deer_2055.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2055/deer_2055.AirLoopHVAC.rb +9 -5
- data/lib/openstudio-standards/standards/deer/deer_2055/deer_2055.FanVariableVolume.rb +3 -0
- data/lib/openstudio-standards/standards/deer/deer_2055/deer_2055.Space.rb +5 -3
- data/lib/openstudio-standards/standards/deer/deer_2055/deer_2055.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2060/comstock_deer_2060/comstock_deer_2060.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2060/deer_2060.AirLoopHVAC.rb +9 -5
- data/lib/openstudio-standards/standards/deer/deer_2060/deer_2060.FanVariableVolume.rb +3 -0
- data/lib/openstudio-standards/standards/deer/deer_2060/deer_2060.Space.rb +5 -3
- data/lib/openstudio-standards/standards/deer/deer_2060/deer_2060.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2065/comstock_deer_2065/comstock_deer_2065.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2065/deer_2065.AirLoopHVAC.rb +9 -5
- data/lib/openstudio-standards/standards/deer/deer_2065/deer_2065.FanVariableVolume.rb +3 -0
- data/lib/openstudio-standards/standards/deer/deer_2065/deer_2065.Space.rb +5 -3
- data/lib/openstudio-standards/standards/deer/deer_2065/deer_2065.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2070/comstock_deer_2070/comstock_deer_2070.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2070/deer_2070.AirLoopHVAC.rb +9 -5
- data/lib/openstudio-standards/standards/deer/deer_2070/deer_2070.FanVariableVolume.rb +3 -0
- data/lib/openstudio-standards/standards/deer/deer_2070/deer_2070.Space.rb +5 -3
- data/lib/openstudio-standards/standards/deer/deer_2070/deer_2070.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2075/comstock_deer_2075/comstock_deer_2075.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_2075/deer_2075.AirLoopHVAC.rb +9 -5
- data/lib/openstudio-standards/standards/deer/deer_2075/deer_2075.FanVariableVolume.rb +3 -0
- data/lib/openstudio-standards/standards/deer/deer_2075/deer_2075.Space.rb +5 -3
- data/lib/openstudio-standards/standards/deer/deer_2075/deer_2075.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_pre_1975/comstock_deer_pre_1975/comstock_deer_pre_1975.rb +4 -0
- data/lib/openstudio-standards/standards/deer/deer_pre_1975/comstock_deer_pre_1975/data/comstock_deer_pre_1975.ext_ltg.json +2 -2
- data/lib/openstudio-standards/standards/deer/deer_pre_1975/deer_pre_1975.rb +4 -0
- data/lib/openstudio-standards/standards/icc_iecc/icc_iecc_2015/icc_iecc_2015.rb +4 -0
- data/lib/openstudio-standards/standards/necb/BTAP1980TO2010/btap_1980to2010.rb +6 -28
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/btap_pre1980.rb +25 -110
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/building_envelope.rb +45 -60
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_3_and_8_single_speed.rb +19 -23
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_4.rb +84 -83
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_6.rb +52 -47
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_systems.rb +43 -40
- data/lib/openstudio-standards/standards/necb/ECMS/data/boiler_set.json +18 -0
- data/lib/openstudio-standards/standards/necb/ECMS/data/chiller_set.json +211 -0
- data/lib/openstudio-standards/standards/necb/ECMS/data/curves.json +1195 -20
- data/lib/openstudio-standards/standards/necb/ECMS/data/furnace_set.json +18 -0
- data/lib/openstudio-standards/standards/necb/ECMS/data/heat_pumps.json +244 -182
- data/lib/openstudio-standards/standards/necb/ECMS/data/heat_pumps_heating.json +232 -185
- data/lib/openstudio-standards/standards/necb/ECMS/data/shw_set.json +20 -2
- data/lib/openstudio-standards/standards/necb/ECMS/ecms.rb +18 -25
- data/lib/openstudio-standards/standards/necb/ECMS/erv.rb +12 -13
- data/lib/openstudio-standards/standards/necb/ECMS/hvac_systems.rb +1647 -466
- data/lib/openstudio-standards/standards/necb/ECMS/loads.rb +93 -0
- data/lib/openstudio-standards/standards/necb/ECMS/nv.rb +40 -47
- data/lib/openstudio-standards/standards/necb/ECMS/pv_ground.rb +26 -25
- data/lib/openstudio-standards/standards/necb/NECB2011/autozone.rb +303 -305
- data/lib/openstudio-standards/standards/necb/NECB2011/beps_compliance_path.rb +45 -45
- data/lib/openstudio-standards/standards/necb/NECB2011/building_envelope.rb +90 -120
- data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/Hospital.osm +1176 -1115
- data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/LowriseApartment.osm +8279 -28923
- data/lib/openstudio-standards/standards/necb/NECB2011/data/space_types.json +1173 -1173
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_1_multi_speed.rb +15 -13
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_1_single_speed.rb +32 -29
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_2_and_5.rb +25 -26
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_multi_speed.rb +14 -14
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_single_speed.rb +24 -29
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_4.rb +85 -84
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_6.rb +41 -42
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb +209 -197
- data/lib/openstudio-standards/standards/necb/NECB2011/lighting.rb +87 -82
- data/lib/openstudio-standards/standards/necb/NECB2011/necb_2011.rb +510 -406
- data/lib/openstudio-standards/standards/necb/NECB2011/nv.md +3 -3
- data/lib/openstudio-standards/standards/necb/NECB2011/qaqc/necb_qaqc.rb +686 -683
- data/lib/openstudio-standards/standards/necb/NECB2011/service_water_heating.rb +129 -82
- data/lib/openstudio-standards/standards/necb/NECB2015/data/space_types.json +1608 -1608
- data/lib/openstudio-standards/standards/necb/NECB2015/hvac_systems.rb +25 -18
- data/lib/openstudio-standards/standards/necb/NECB2015/lighting.rb +73 -67
- data/lib/openstudio-standards/standards/necb/NECB2015/necb_2015.rb +18 -22
- data/lib/openstudio-standards/standards/necb/NECB2015/qaqc/necb_2015_qaqc.rb +59 -63
- data/lib/openstudio-standards/standards/necb/NECB2017/data/space_types.json +1608 -1608
- data/lib/openstudio-standards/standards/necb/NECB2017/hvac_systems.rb +1 -4
- data/lib/openstudio-standards/standards/necb/NECB2017/necb_2017.rb +10 -14
- data/lib/openstudio-standards/standards/necb/NECB2020/building_envelope.rb +779 -0
- data/lib/openstudio-standards/standards/necb/NECB2020/data/boilers.json +122 -0
- data/lib/openstudio-standards/standards/necb/NECB2020/data/chillers.json +335 -0
- data/lib/openstudio-standards/standards/necb/NECB2020/data/constants.json +13 -0
- data/lib/openstudio-standards/standards/necb/NECB2020/data/furnaces.json +41 -0
- data/lib/openstudio-standards/standards/necb/NECB2020/data/heat_pumps.json +452 -0
- data/lib/openstudio-standards/standards/necb/NECB2020/data/heat_pumps_heating.json +164 -0
- data/lib/openstudio-standards/standards/necb/NECB2020/data/heat_rejection.json +228 -0
- data/lib/openstudio-standards/standards/necb/NECB2020/data/led_lighting_data.json +2883 -0
- data/lib/openstudio-standards/standards/necb/NECB2020/data/space_types.json +25851 -0
- data/lib/openstudio-standards/standards/necb/NECB2020/data/surface_thermal_transmittance.json +60 -0
- data/lib/openstudio-standards/standards/necb/NECB2020/data/unitary_acs.json +585 -0
- data/lib/openstudio-standards/standards/necb/NECB2020/necb_2020.rb +175 -0
- data/lib/openstudio-standards/standards/necb/common/bc_step_code_indicators.md +10 -0
- data/lib/openstudio-standards/standards/necb/common/btap_data.rb +1963 -0
- data/lib/openstudio-standards/standards/necb/common/btap_datapoint.rb +410 -0
- data/lib/openstudio-standards/standards/necb/common/neb_end_use_prices.csv +42 -0
- data/lib/openstudio-standards/standards/necb/common/necb_reference_runs.csv +28705 -0
- data/lib/openstudio-standards/standards/necb/common/phius.md +23 -0
- data/lib/openstudio-standards/standards/necb/common/space_type_upgrade_map.json +1158 -386
- data/lib/openstudio-standards/standards/oeesc/oeesc_2014/oeesc_2014.rb +4 -0
- data/lib/openstudio-standards/standards/standard.rb +2 -1
- data/lib/openstudio-standards/utilities/define_thermal_zone_and_mulitpliers.rb +1 -1
- data/lib/openstudio-standards/utilities/logging.rb +6 -0
- data/lib/openstudio-standards/utilities/simulation.rb +30 -14
- data/lib/openstudio-standards/utilities/{speacetype_map_converter.rb → spacetype_map_converter.rb} +0 -0
- data/lib/openstudio-standards/utilities/sqlfile.rb +112 -71
- data/lib/openstudio-standards/version.rb +2 -2
- data/lib/openstudio-standards/weather/Weather.Model.rb +209 -9
- data/lib/openstudio-standards/weather/Weather.stat_file.rb +1 -1
- data/lib/openstudio-standards.rb +9 -0
- metadata +106 -205
- data/data/standards/OpenStudio_Standards-ashrae_90_1-ALL-comstock(space_types).xlsx +0 -0
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.boilers.json +0 -49
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.chillers.json +0 -293
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.construction_properties.json +0 -25426
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.construction_sets.json +0 -1600
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.economizers.json +0 -564
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.elevators.json +0 -349
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.ext_ltg.json +0 -164
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.ground_temperatures.json +0 -10663
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.heat_pumps.json +0 -508
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.heat_pumps_heating.json +0 -156
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.heat_rejection.json +0 -44
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.motors.json +0 -184
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.prototype_inputs.json +0 -3094
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.ref_cases.json +0 -829
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.ref_lnup.json +0 -562
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.refrigeration_compressors.json +0 -52
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.refrigeration_condenser.json +0 -220
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.refrigeration_system.json +0 -156
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.refrigeration_walkins.json +0 -1316
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.spc_typ.json +0 -21446
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.unitary_acs.json +0 -554
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.water_heaters.json +0 -68
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.water_source_heat_pumps.json +0 -28
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.water_source_heat_pumps_heating.json +0 -12
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.boilers.json +0 -49
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.chillers.json +0 -293
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.construction_properties.json +0 -12487
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.construction_sets.json +0 -1600
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.economizers.json +0 -564
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.elevators.json +0 -349
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.ext_ltg.json +0 -164
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.ground_temperatures.json +0 -10663
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.heat_pumps.json +0 -466
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.heat_pumps_heating.json +0 -137
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.heat_rejection.json +0 -44
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.motors.json +0 -184
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.prototype_inputs.json +0 -3094
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.ref_cases.json +0 -829
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.ref_lnup.json +0 -562
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.refrigeration_compressors.json +0 -52
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.refrigeration_condenser.json +0 -220
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.refrigeration_system.json +0 -156
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.refrigeration_walkins.json +0 -1316
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.spc_typ.json +0 -21380
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.unitary_acs.json +0 -554
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.water_heaters.json +0 -68
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.water_source_heat_pumps.json +0 -28
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.water_source_heat_pumps_heating.json +0 -12
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.boilers.json +0 -49
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.chillers.json +0 -395
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.construction_properties.json +0 -12487
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.construction_sets.json +0 -1600
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.economizers.json +0 -592
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.elevators.json +0 -349
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.energy_recovery.json +0 -550
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.ext_ltg.json +0 -164
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.ground_temperatures.json +0 -10663
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.heat_pumps.json +0 -466
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.heat_pumps_heating.json +0 -137
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.heat_rejection.json +0 -44
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.motors.json +0 -238
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.prototype_inputs.json +0 -3094
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.ref_cases.json +0 -829
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.ref_lnup.json +0 -562
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.refrigeration_compressors.json +0 -52
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.refrigeration_condenser.json +0 -220
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.refrigeration_system.json +0 -156
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.refrigeration_walkins.json +0 -1316
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.spc_typ.json +0 -21548
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.unitary_acs.json +0 -554
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.water_heaters.json +0 -68
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.water_source_heat_pumps.json +0 -28
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.water_source_heat_pumps_heating.json +0 -12
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.boilers.json +0 -64
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.chillers.json +0 -871
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.construction_properties.json +0 -12487
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.construction_sets.json +0 -1600
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.economizers.json +0 -592
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.elevators.json +0 -349
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.energy_recovery.json +0 -1096
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.ext_ltg.json +0 -164
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.ground_temperatures.json +0 -10663
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.heat_pumps.json +0 -886
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.heat_pumps_heating.json +0 -194
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.heat_rejection.json +0 -44
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.motors.json +0 -247
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.prototype_inputs.json +0 -3094
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.ref_cases.json +0 -829
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.ref_lnup.json +0 -562
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.refrigeration_compressors.json +0 -52
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.refrigeration_condenser.json +0 -220
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.refrigeration_system.json +0 -156
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.refrigeration_walkins.json +0 -1316
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.spc_typ.json +0 -22079
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.unitary_acs.json +0 -994
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.water_heaters.json +0 -68
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.water_source_heat_pumps.json +0 -28
- data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.water_source_heat_pumps_heating.json +0 -12
- data/lib/openstudio-standards/utilities/convert_costing_constructions.rb +0 -105
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
class NECB2011
|
|
2
|
-
|
|
3
2
|
attr_accessor :qaqc_data
|
|
4
3
|
|
|
5
|
-
def get_sql_table_to_json(
|
|
4
|
+
def get_sql_table_to_json(model, report_name, report_for_string, table_name)
|
|
6
5
|
table = []
|
|
7
6
|
query_row_names = "
|
|
8
7
|
SELECT DISTINCT
|
|
@@ -17,7 +16,7 @@ class NECB2011
|
|
|
17
16
|
TableName='#{table_name}'"
|
|
18
17
|
row_names = model.sqlFile.get.execAndReturnVectorOfString(query_row_names).get
|
|
19
18
|
|
|
20
|
-
#get Columns
|
|
19
|
+
# get Columns
|
|
21
20
|
query_col_names = "
|
|
22
21
|
SELECT DISTINCT
|
|
23
22
|
ColumnName
|
|
@@ -27,7 +26,7 @@ class NECB2011
|
|
|
27
26
|
AND TableName='#{table_name}'"
|
|
28
27
|
col_names = model.sqlFile.get.execAndReturnVectorOfString(query_col_names).get
|
|
29
28
|
|
|
30
|
-
#get units
|
|
29
|
+
# get units
|
|
31
30
|
query_unit_names = "
|
|
32
31
|
SELECT DISTINCT
|
|
33
32
|
Units
|
|
@@ -39,6 +38,7 @@ class NECB2011
|
|
|
39
38
|
|
|
40
39
|
row_names.each do |row|
|
|
41
40
|
next if row.nil? || row == ''
|
|
41
|
+
|
|
42
42
|
row_hash = {}
|
|
43
43
|
row_hash[:name] = row
|
|
44
44
|
col_names.each do |col|
|
|
@@ -61,26 +61,31 @@ class NECB2011
|
|
|
61
61
|
AND
|
|
62
62
|
Units='#{unit}'
|
|
63
63
|
"
|
|
64
|
-
column_name =
|
|
64
|
+
column_name = col.to_s.gsub(/\s+/, '_').downcase
|
|
65
65
|
# If the column name is "additional_fuel" and the file contains a boiler with a FuelOilNo2 fuel type assume
|
|
66
66
|
# the column name should be "fueloilno2".
|
|
67
|
-
if column_name.include?
|
|
67
|
+
if column_name.include? 'additional_fuel'
|
|
68
68
|
model.getPlantLoops.sort.each do |iplantloop|
|
|
69
|
-
boilers = iplantloop.components.select {|icomponent| icomponent.to_BoilerHotWater.is_initialized}
|
|
70
|
-
column_name =
|
|
69
|
+
boilers = iplantloop.components.select { |icomponent| icomponent.to_BoilerHotWater.is_initialized }
|
|
70
|
+
column_name = 'fueloilno2' unless boilers.select { |boiler| boiler.to_BoilerHotWater.get.fuelType.to_s == 'FuelOilNo2' }.empty?
|
|
71
71
|
end
|
|
72
72
|
end
|
|
73
|
-
column_name
|
|
73
|
+
column_name += "_#{unit}" if unit != ''
|
|
74
74
|
value = model.sqlFile.get.execAndReturnFirstString(query)
|
|
75
75
|
next if value.empty? || value.get.nil?
|
|
76
|
+
|
|
76
77
|
value = value.get.strip
|
|
77
|
-
#check is value is a number
|
|
78
|
-
if (
|
|
78
|
+
# check is value is a number
|
|
79
|
+
if (begin
|
|
80
|
+
Float(value)
|
|
81
|
+
rescue StandardError
|
|
82
|
+
false
|
|
83
|
+
end) && value.to_f != 0
|
|
79
84
|
row_hash[column_name] = value.to_f
|
|
80
|
-
#Check if value is a date
|
|
81
|
-
elsif
|
|
85
|
+
# Check if value is a date
|
|
86
|
+
elsif unit == '' && value =~ /\d\d-\D\D\D-\d\d:\d\d/
|
|
82
87
|
row_hash[column_name] = DateTime.parse(value)
|
|
83
|
-
#skip if value in an empty string or a zero value
|
|
88
|
+
# skip if value in an empty string or a zero value
|
|
84
89
|
elsif value != '' && value != '0.00'
|
|
85
90
|
row_hash[column_name] = value
|
|
86
91
|
end
|
|
@@ -95,14 +100,13 @@ class NECB2011
|
|
|
95
100
|
end
|
|
96
101
|
|
|
97
102
|
def merge_recursively(a, b)
|
|
98
|
-
a.merge(b) {|key, a_item, b_item| merge_recursively(a_item, b_item) }
|
|
103
|
+
a.merge(b) { |key, a_item, b_item| merge_recursively(a_item, b_item) }
|
|
99
104
|
end
|
|
100
105
|
|
|
101
|
-
|
|
102
106
|
def get_sql_tables_to_json(model)
|
|
103
107
|
sql_data = []
|
|
104
|
-
sql_data << get_sql_table_to_json(model,
|
|
105
|
-
sql_data << get_sql_table_to_json(model,
|
|
108
|
+
sql_data << get_sql_table_to_json(model, 'AnnualBuildingUtilityPerformanceSummary', 'Entire Facility', 'End Uses')
|
|
109
|
+
sql_data << get_sql_table_to_json(model, 'AnnualBuildingUtilityPerformanceSummary', 'Entire Facility', 'Site and Source Energy')
|
|
106
110
|
# sql_data << get_sql_table_to_json(model, "AnnualBuildingUtilityPerformanceSummary", "Entire Facility", "On-Site Thermal Sources")
|
|
107
111
|
# sql_data << get_sql_table_to_json(model, "AnnualBuildingUtilityPerformanceSummary", "Entire Facility", "Comfort and Setpoint Not Met Summary")
|
|
108
112
|
# sql_data << get_sql_table_to_json(model, "InputVerificationandResultsSummary", "Entire Facility", "Window-Wall Ratio")
|
|
@@ -113,26 +117,23 @@ class NECB2011
|
|
|
113
117
|
return sql_data
|
|
114
118
|
end
|
|
115
119
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
def load_qaqc_database_new()
|
|
120
|
+
def load_qaqc_database_new
|
|
120
121
|
# Combine the data from the JSON files into a single hash
|
|
121
|
-
files = Dir.glob("#{File.dirname(__FILE__)}/qaqc_data/*.json").select {|e| File.file? e}
|
|
122
|
+
files = Dir.glob("#{File.dirname(__FILE__)}/qaqc_data/*.json").select { |e| File.file? e }
|
|
122
123
|
@qaqc_data = {}
|
|
123
|
-
@qaqc_data[
|
|
124
|
+
@qaqc_data['tables'] = {}
|
|
124
125
|
files.each do |file|
|
|
125
|
-
#puts "loading qaqc data from #{file}"
|
|
126
|
+
# puts "loading qaqc data from #{file}"
|
|
126
127
|
data = JSON.parse(File.read(file))
|
|
127
|
-
if
|
|
128
|
-
@qaqc_data[
|
|
128
|
+
if !data['tables'].nil?
|
|
129
|
+
@qaqc_data['tables'] = [*@qaqc_data['tables'], *data['tables']].to_h
|
|
129
130
|
else
|
|
130
131
|
@qaqc_data[data.keys.first] = data[data.keys.first]
|
|
131
132
|
end
|
|
132
133
|
end
|
|
133
|
-
#Write test report file.
|
|
134
|
+
# Write test report file.
|
|
134
135
|
test_result_file = File.join(File.dirname(__FILE__), '..', 'NECB2011_QAQC.json')
|
|
135
|
-
File.open(test_result_file, 'w') {|f| f.write(JSON.pretty_generate(@qaqc_data))}
|
|
136
|
+
File.open(test_result_file, 'w') { |f| f.write(JSON.pretty_generate(@qaqc_data)) }
|
|
136
137
|
return @qaqc_data
|
|
137
138
|
end
|
|
138
139
|
|
|
@@ -140,16 +141,14 @@ class NECB2011
|
|
|
140
141
|
return_objects = nil
|
|
141
142
|
table = @qaqc_data['tables'][table_name]
|
|
142
143
|
raise("could not find #{table_name} in qaqc table database. ") if table.nil?
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
rows = rows.select{ |row| row[key] == value}
|
|
150
|
-
end
|
|
151
|
-
return rows
|
|
144
|
+
|
|
145
|
+
return table if search_criteria.nil? # removed table beause need to use the object['refs']
|
|
146
|
+
|
|
147
|
+
rows = table['table']
|
|
148
|
+
search_criteria.each do |key, value|
|
|
149
|
+
rows = rows.select { |row| row[key] == value }
|
|
152
150
|
end
|
|
151
|
+
return rows
|
|
153
152
|
end
|
|
154
153
|
|
|
155
154
|
# generates full qaqc.json
|
|
@@ -161,14 +160,14 @@ class NECB2011
|
|
|
161
160
|
# generate base qaqc hash
|
|
162
161
|
qaqc = create_base_data(model)
|
|
163
162
|
# performs the qaqc on the given base qaqc hash
|
|
164
|
-
#necb_qaqc(qaqc, model)
|
|
163
|
+
# necb_qaqc(qaqc, model)
|
|
165
164
|
return qaqc
|
|
166
165
|
end
|
|
167
166
|
|
|
168
167
|
# generates only qaqc component
|
|
169
168
|
def qaqc_only(model)
|
|
170
169
|
# load the qaqc.json files
|
|
171
|
-
@qaqc_data =
|
|
170
|
+
@qaqc_data = load_qaqc_database_new
|
|
172
171
|
|
|
173
172
|
# generate base qaqc hash
|
|
174
173
|
qaqc = create_base_data(model)
|
|
@@ -182,96 +181,89 @@ class NECB2011
|
|
|
182
181
|
|
|
183
182
|
# Generates the base data hash mainly used to perform qaqc.
|
|
184
183
|
def create_base_data(model)
|
|
185
|
-
|
|
186
|
-
#construct command with local libs
|
|
184
|
+
# construct command with local libs
|
|
187
185
|
os_version = OpenStudio.openStudioLongVersion
|
|
188
186
|
eplus_version = OpenStudio.energyPlusVersion
|
|
189
187
|
puts "\n\n\nOS_version is [#{os_version.strip}]"
|
|
190
188
|
puts "\n\n\nEP_version is [#{eplus_version.strip}]"
|
|
191
189
|
|
|
192
|
-
|
|
193
|
-
#Ensure all surfaces are unique.
|
|
190
|
+
# Ensure all surfaces are unique.
|
|
194
191
|
surfaces = model.getSurfaces.sort
|
|
195
192
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
" AND ReportForString='Entire Facility' AND TableName='Annual and Peak Values - Electricity' AND RowName='Electricity:Facility'" +
|
|
193
|
+
# Sort surfaces by type
|
|
194
|
+
|
|
195
|
+
interior_surfaces = BTAP::Geometry::Surfaces.filter_by_boundary_condition(surfaces, ['Surface', 'Adiabatic'])
|
|
196
|
+
interior_floors = BTAP::Geometry::Surfaces.filter_by_surface_types(interior_surfaces, 'Floor')
|
|
197
|
+
outdoor_surfaces = BTAP::Geometry::Surfaces.filter_by_boundary_condition(surfaces, 'Outdoors')
|
|
198
|
+
outdoor_walls = BTAP::Geometry::Surfaces.filter_by_surface_types(outdoor_surfaces, 'Wall')
|
|
199
|
+
outdoor_roofs = BTAP::Geometry::Surfaces.filter_by_surface_types(outdoor_surfaces, 'RoofCeiling')
|
|
200
|
+
outdoor_floors = BTAP::Geometry::Surfaces.filter_by_surface_types(outdoor_surfaces, 'Floor')
|
|
201
|
+
outdoor_subsurfaces = BTAP::Geometry::Surfaces.get_subsurfaces_from_surfaces(outdoor_surfaces)
|
|
202
|
+
|
|
203
|
+
ground_surfaces = BTAP::Geometry::Surfaces.filter_by_boundary_condition(surfaces, 'Ground')
|
|
204
|
+
ground_walls = BTAP::Geometry::Surfaces.filter_by_surface_types(ground_surfaces, 'Wall')
|
|
205
|
+
ground_roofs = BTAP::Geometry::Surfaces.filter_by_surface_types(ground_surfaces, 'RoofCeiling')
|
|
206
|
+
ground_floors = BTAP::Geometry::Surfaces.filter_by_surface_types(ground_surfaces, 'Floor')
|
|
207
|
+
|
|
208
|
+
windows = BTAP::Geometry::Surfaces.filter_subsurfaces_by_types(outdoor_subsurfaces, ['FixedWindow', 'OperableWindow'])
|
|
209
|
+
skylights = BTAP::Geometry::Surfaces.filter_subsurfaces_by_types(outdoor_subsurfaces, ['Skylight', 'TubularDaylightDiffuser', 'TubularDaylightDome'])
|
|
210
|
+
doors = BTAP::Geometry::Surfaces.filter_subsurfaces_by_types(outdoor_subsurfaces, ['Door', 'GlassDoor'])
|
|
211
|
+
overhead_doors = BTAP::Geometry::Surfaces.filter_subsurfaces_by_types(outdoor_subsurfaces, ['OverheadDoor'])
|
|
212
|
+
|
|
213
|
+
# Peaks
|
|
214
|
+
electric_peak = model.sqlFile.get.execAndReturnFirstDouble("SELECT Value FROM tabulardatawithstrings WHERE ReportName='EnergyMeters'" \
|
|
215
|
+
" AND ReportForString='Entire Facility' AND TableName='Annual and Peak Values - Electricity' AND RowName='Electricity:Facility'" \
|
|
220
216
|
" AND ColumnName='Electricity Maximum Value' AND Units='W'")
|
|
221
|
-
natural_gas_peak = model.sqlFile
|
|
222
|
-
" AND ReportForString='Entire Facility' AND TableName='Annual and Peak Values - Gas' AND RowName='Gas:Facility'"
|
|
217
|
+
natural_gas_peak = model.sqlFile.get.execAndReturnFirstDouble("SELECT Value FROM tabulardatawithstrings WHERE ReportName='EnergyMeters'" \
|
|
218
|
+
" AND ReportForString='Entire Facility' AND TableName='Annual and Peak Values - Gas' AND RowName='Gas:Facility'" \
|
|
223
219
|
" AND ColumnName='Gas Maximum Value' AND Units='W'")
|
|
224
220
|
|
|
225
|
-
|
|
226
221
|
get_sql_tables_to_json(model)
|
|
227
222
|
|
|
228
|
-
|
|
229
223
|
# Create hash to store all the collected data.
|
|
230
224
|
qaqc = {}
|
|
231
225
|
qaqc[:sql_data] = get_sql_tables_to_json(model)
|
|
232
226
|
error_warning = []
|
|
233
|
-
qaqc[:os_standards_revision] = OpenstudioStandards
|
|
227
|
+
qaqc[:os_standards_revision] = OpenstudioStandards.git_revision
|
|
234
228
|
qaqc[:os_standards_version] = OpenstudioStandards::VERSION
|
|
235
229
|
qaqc[:openstudio_version] = os_version.strip
|
|
236
230
|
qaqc[:energyplus_version] = eplus_version.strip
|
|
237
231
|
# Store Building data.
|
|
238
232
|
qaqc[:building] = {}
|
|
239
233
|
qaqc[:building][:name] = model.building.get.name.get
|
|
240
|
-
qaqc[:building][:conditioned_floor_area_m2]=nil
|
|
241
|
-
|
|
242
|
-
qaqc[:building][:conditioned_floor_area_m2] = model.building.get.conditionedFloorArea().get
|
|
243
|
-
else
|
|
234
|
+
qaqc[:building][:conditioned_floor_area_m2] = nil
|
|
235
|
+
if model.building.get.conditionedFloorArea.empty?
|
|
244
236
|
error_warning << "model.building.get.conditionedFloorArea() is empty for #{model.building.get.name.get}"
|
|
237
|
+
else
|
|
238
|
+
qaqc[:building][:conditioned_floor_area_m2] = model.building.get.conditionedFloorArea.get
|
|
245
239
|
end
|
|
246
|
-
qaqc[:building][:exterior_area_m2] = model.building.get.exteriorSurfaceArea
|
|
247
|
-
qaqc[:building][:volume] = model.building.get.airVolume
|
|
240
|
+
qaqc[:building][:exterior_area_m2] = model.building.get.exteriorSurfaceArea # m2
|
|
241
|
+
qaqc[:building][:volume] = model.building.get.airVolume # m3
|
|
248
242
|
qaqc[:building][:number_of_stories] = model.getBuildingStorys.size
|
|
249
243
|
qaqc[:building][:standards_number_of_stories] = nil
|
|
250
|
-
qaqc[:building][:standards_number_of_stories] = model.building.get.standardsNumberOfStories
|
|
244
|
+
qaqc[:building][:standards_number_of_stories] = model.building.get.standardsNumberOfStories.get unless model.building.get.standardsNumberOfStories.empty?
|
|
251
245
|
qaqc[:building][:standards_number_of_above_ground_stories] = nil
|
|
252
|
-
qaqc[:building][:standards_number_of_above_ground_stories] = model.building.get.standardsNumberOfAboveGroundStories.get unless model.building.get.standardsNumberOfAboveGroundStories
|
|
246
|
+
qaqc[:building][:standards_number_of_above_ground_stories] = model.building.get.standardsNumberOfAboveGroundStories.get unless model.building.get.standardsNumberOfAboveGroundStories.empty?
|
|
253
247
|
qaqc[:building][:standards_number_of_living_units] = nil
|
|
254
|
-
qaqc[:building][:standards_number_of_living_units] = model.building.get.standardsNumberOfLivingUnits
|
|
248
|
+
qaqc[:building][:standards_number_of_living_units] = model.building.get.standardsNumberOfLivingUnits.get unless model.building.get.standardsNumberOfLivingUnits.empty?
|
|
255
249
|
qaqc[:building][:nominal_floor_to_ceiling_height] = nil
|
|
256
|
-
qaqc[:building][:nominal_floor_to_ceiling_height] = model.building.get.nominalFloortoCeilingHeight.get unless model.building.get.nominalFloortoCeilingHeight
|
|
250
|
+
qaqc[:building][:nominal_floor_to_ceiling_height] = model.building.get.nominalFloortoCeilingHeight.get unless model.building.get.nominalFloortoCeilingHeight.empty?
|
|
257
251
|
qaqc[:building][:nominal_floor_to_floor_height] = nil
|
|
258
|
-
qaqc[:building][:nominal_floor_to_floor_height] = model.building.get.nominalFloortoFloorHeight.get unless model.building.get.nominalFloortoFloorHeight
|
|
259
|
-
|
|
260
|
-
|
|
252
|
+
qaqc[:building][:nominal_floor_to_floor_height] = model.building.get.nominalFloortoFloorHeight.get unless model.building.get.nominalFloortoFloorHeight.empty?
|
|
261
253
|
|
|
262
254
|
# Store Geography Data
|
|
263
|
-
qaqc[:geography] ={}
|
|
255
|
+
qaqc[:geography] = {}
|
|
264
256
|
qaqc[:geography][:hdd] = get_necb_hdd18(model)
|
|
265
257
|
qaqc[:geography][:cdd] = BTAP::Environment::WeatherFile.new(model.getWeatherFile.path.get.to_s).cdd18
|
|
266
|
-
qaqc[:geography][:climate_zone] = NECB2011.new
|
|
258
|
+
qaqc[:geography][:climate_zone] = NECB2011.new.get_climate_zone_name(qaqc[:geography][:hdd])
|
|
267
259
|
qaqc[:geography][:city] = model.getWeatherFile.city
|
|
268
260
|
qaqc[:geography][:state_province_region] = model.getWeatherFile.stateProvinceRegion
|
|
269
261
|
qaqc[:geography][:country] = model.getWeatherFile.country
|
|
270
262
|
qaqc[:geography][:latitude] = model.getWeatherFile.latitude
|
|
271
263
|
qaqc[:geography][:longitude] = model.getWeatherFile.longitude
|
|
272
264
|
|
|
273
|
-
#Spacetype Breakdown
|
|
274
|
-
qaqc[:spacetype_area_breakdown]={}
|
|
265
|
+
# Spacetype Breakdown
|
|
266
|
+
qaqc[:spacetype_area_breakdown] = {}
|
|
275
267
|
model.getSpaceTypes.sort.each do |spaceType|
|
|
276
268
|
next if spaceType.floorArea == 0
|
|
277
269
|
|
|
@@ -280,239 +272,239 @@ class NECB2011
|
|
|
280
272
|
floor_area_si = 0
|
|
281
273
|
# loop through spaces so I can skip if not included in floor area
|
|
282
274
|
spaceType.spaces.sort.each do |space|
|
|
283
|
-
next if
|
|
275
|
+
next if !space.partofTotalFloorArea
|
|
276
|
+
|
|
284
277
|
floor_area_si += space.floorArea * space.multiplier
|
|
285
278
|
end
|
|
286
|
-
qaqc[:spacetype_area_breakdown][spaceType.name.get.gsub(/\s+/,
|
|
279
|
+
qaqc[:spacetype_area_breakdown][spaceType.name.get.gsub(/\s+/, '_').downcase.to_sym] = floor_area_si
|
|
287
280
|
end
|
|
288
281
|
|
|
289
|
-
#Economics Section
|
|
282
|
+
# Economics Section
|
|
290
283
|
qaqc[:economics] = {}
|
|
291
|
-
provinces_names_map = {'QC' => 'Quebec', 'NL' => 'Newfoundland and Labrador', 'NS' => 'Nova Scotia', 'PE' => 'Prince Edward Island', 'ON' => 'Ontario', 'MB' => 'Manitoba', 'SK' => 'Saskatchewan', 'AB' => 'Alberta', 'BC' => 'British Columbia', 'YT' => 'Yukon', 'NT' => 'Northwest Territories', 'NB' => 'New Brunswick', 'NU' => 'Nunavut'}
|
|
292
|
-
neb_prices_csv_file_name ="#{File.dirname(__FILE__)}/qaqc_resources/neb_end_use_prices.csv"
|
|
284
|
+
provinces_names_map = { 'QC' => 'Quebec', 'NL' => 'Newfoundland and Labrador', 'NS' => 'Nova Scotia', 'PE' => 'Prince Edward Island', 'ON' => 'Ontario', 'MB' => 'Manitoba', 'SK' => 'Saskatchewan', 'AB' => 'Alberta', 'BC' => 'British Columbia', 'YT' => 'Yukon', 'NT' => 'Northwest Territories', 'NB' => 'New Brunswick', 'NU' => 'Nunavut' }
|
|
285
|
+
neb_prices_csv_file_name = "#{File.dirname(__FILE__)}/qaqc_resources/neb_end_use_prices.csv"
|
|
293
286
|
puts neb_prices_csv_file_name
|
|
294
287
|
building_type = 'Commercial'
|
|
295
288
|
province = provinces_names_map[qaqc[:geography][:state_province_region]]
|
|
296
|
-
neb_fuel_list = ['Electricity', 'Natural Gas',
|
|
297
|
-
neb_eplus_fuel_map = {'Electricity' => 'Electricity', 'Natural Gas' => 'Gas', 'Oil' =>
|
|
289
|
+
neb_fuel_list = ['Electricity', 'Natural Gas', 'Oil']
|
|
290
|
+
neb_eplus_fuel_map = { 'Electricity' => 'Electricity', 'Natural Gas' => 'Gas', 'Oil' => 'FuelOilNo2' }
|
|
298
291
|
qaqc[:economics][:total_neb_cost] = 0.0
|
|
299
292
|
qaqc[:economics][:total_neb_cost_per_m2] = 0.0
|
|
300
293
|
neb_eplus_fuel_map.each do |neb_fuel, ep_fuel|
|
|
301
|
-
|
|
294
|
+
search_info = {
|
|
295
|
+
0 => building_type,
|
|
296
|
+
1 => province,
|
|
297
|
+
2 => neb_fuel
|
|
298
|
+
}
|
|
299
|
+
row = look_up_csv_data(neb_prices_csv_file_name, search_info)
|
|
302
300
|
neb_fuel_cost = row['2020']
|
|
303
301
|
fuel_consumption_gj = 0.0
|
|
304
302
|
if neb_fuel == 'Electricity' || neb_fuel == 'Natural Gas'
|
|
305
|
-
if model.sqlFile
|
|
303
|
+
if model.sqlFile.get.execAndReturnFirstDouble("SELECT Value FROM tabulardatawithstrings WHERE ReportName='EnergyMeters' AND ReportForString='Entire Facility' AND
|
|
306
304
|
TableName='Annual and Peak Values - #{ep_fuel}' AND RowName='#{ep_fuel}:Facility' AND ColumnName='#{ep_fuel} Annual Value' AND Units='GJ'").is_initialized
|
|
307
|
-
fuel_consumption_gj = model.sqlFile
|
|
305
|
+
fuel_consumption_gj = model.sqlFile.get.execAndReturnFirstDouble("SELECT Value FROM tabulardatawithstrings WHERE ReportName='EnergyMeters' AND ReportForString='Entire Facility' AND
|
|
308
306
|
TableName='Annual and Peak Values - #{ep_fuel}' AND RowName='#{ep_fuel}:Facility' AND ColumnName='#{ep_fuel} Annual Value' AND Units='GJ'").get
|
|
309
307
|
end
|
|
310
308
|
else
|
|
311
|
-
if model.sqlFile
|
|
309
|
+
if model.sqlFile.get.execAndReturnFirstDouble("SELECT Value FROM tabulardatawithstrings WHERE ReportName='EnergyMeters' AND ReportForString='Entire Facility' AND
|
|
312
310
|
TableName='Annual and Peak Values - Other' AND RowName='#{ep_fuel}:Facility' AND ColumnName='Annual Value' AND Units='GJ'").is_initialized
|
|
313
|
-
fuel_consumption_gj = model.sqlFile
|
|
311
|
+
fuel_consumption_gj = model.sqlFile.get.execAndReturnFirstDouble("SELECT Value FROM tabulardatawithstrings WHERE ReportName='EnergyMeters' AND ReportForString='Entire Facility' AND
|
|
314
312
|
TableName='Annual and Peak Values - Other' AND RowName='#{ep_fuel}:Facility' AND ColumnName='Annual Value' AND Units='GJ'").get
|
|
315
313
|
end
|
|
316
314
|
end
|
|
317
|
-
qaqc[:economics][:"#{neb_fuel}_neb_cost"] = fuel_consumption_gj*neb_fuel_cost.to_f
|
|
318
|
-
qaqc[:economics][:"#{neb_fuel}_neb_cost_per_m2"] = qaqc[:economics][:"#{neb_fuel}_neb_cost"]/qaqc[:building][:conditioned_floor_area_m2] unless model.building.get.conditionedFloorArea
|
|
315
|
+
qaqc[:economics][:"#{neb_fuel}_neb_cost"] = fuel_consumption_gj * neb_fuel_cost.to_f
|
|
316
|
+
qaqc[:economics][:"#{neb_fuel}_neb_cost_per_m2"] = qaqc[:economics][:"#{neb_fuel}_neb_cost"] / qaqc[:building][:conditioned_floor_area_m2] unless model.building.get.conditionedFloorArea.empty?
|
|
319
317
|
qaqc[:economics][:total_neb_cost] += qaqc[:economics][:"#{neb_fuel}_neb_cost"]
|
|
320
|
-
qaqc[:economics][:total_neb_cost_per_m2] += qaqc[:economics][:"#{neb_fuel}_neb_cost_per_m2"]
|
|
318
|
+
qaqc[:economics][:total_neb_cost_per_m2] += qaqc[:economics][:"#{neb_fuel}_neb_cost_per_m2"] || 0.0
|
|
321
319
|
end
|
|
322
320
|
|
|
323
|
-
#Fuel cost based local utility rates
|
|
324
|
-
costing_rownames = model.sqlFile
|
|
321
|
+
# Fuel cost based local utility rates
|
|
322
|
+
costing_rownames = model.sqlFile.get.execAndReturnVectorOfString("SELECT RowName FROM TabularDataWithStrings WHERE ReportName='LEEDsummary' AND ReportForString='Entire Facility' AND TableName='EAp2-7. Energy Cost Summary' AND ColumnName='Total Energy Cost'")
|
|
325
323
|
#==> ["Electricity", "Natural Gas", "Additional", "Total"]
|
|
326
|
-
costing_rownames = validate_optional(costing_rownames, model,
|
|
327
|
-
|
|
324
|
+
costing_rownames = validate_optional(costing_rownames, model, 'N/A')
|
|
325
|
+
if costing_rownames != 'N/A'
|
|
328
326
|
costing_rownames.each do |rowname|
|
|
329
327
|
case rowname
|
|
330
|
-
when
|
|
331
|
-
qaqc[:economics][:electricity_cost] = model.sqlFile
|
|
332
|
-
qaqc[:economics][:electricity_cost_per_m2]=qaqc[:economics][:electricity_cost]/qaqc[:building][:conditioned_floor_area_m2] unless model.building.get.conditionedFloorArea
|
|
333
|
-
when
|
|
334
|
-
qaqc[:economics][:natural_gas_cost] = model.sqlFile
|
|
335
|
-
qaqc[:economics][:natural_gas_cost_per_m2]=qaqc[:economics][:natural_gas_cost]/qaqc[:building][:conditioned_floor_area_m2] unless model.building.get.conditionedFloorArea
|
|
336
|
-
|
|
337
|
-
when
|
|
338
|
-
qaqc[:economics][:additional_cost] = model.sqlFile
|
|
339
|
-
qaqc[:economics][:additional_cost_per_m2]=qaqc[:economics][:additional_cost]/qaqc[:building][:conditioned_floor_area_m2] unless model.building.get.conditionedFloorArea
|
|
340
|
-
|
|
341
|
-
when
|
|
342
|
-
qaqc[:economics][:total_cost] = model.sqlFile
|
|
343
|
-
qaqc[:economics][:total_cost_per_m2]=qaqc[:economics][:total_cost]/qaqc[:building][:conditioned_floor_area_m2] unless model.building.get.conditionedFloorArea
|
|
328
|
+
when 'Electricity'
|
|
329
|
+
qaqc[:economics][:electricity_cost] = model.sqlFile.get.execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='LEEDsummary' AND ReportForString='Entire Facility' AND TableName='EAp2-7. Energy Cost Summary' AND ColumnName='Total Energy Cost' AND RowName='#{rowname}'").get
|
|
330
|
+
qaqc[:economics][:electricity_cost_per_m2] = qaqc[:economics][:electricity_cost] / qaqc[:building][:conditioned_floor_area_m2] unless model.building.get.conditionedFloorArea.empty?
|
|
331
|
+
when 'Natural Gas'
|
|
332
|
+
qaqc[:economics][:natural_gas_cost] = model.sqlFile.get.execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='LEEDsummary' AND ReportForString='Entire Facility' AND TableName='EAp2-7. Energy Cost Summary' AND ColumnName='Total Energy Cost' AND RowName='#{rowname}'").get
|
|
333
|
+
qaqc[:economics][:natural_gas_cost_per_m2] = qaqc[:economics][:natural_gas_cost] / qaqc[:building][:conditioned_floor_area_m2] unless model.building.get.conditionedFloorArea.empty?
|
|
334
|
+
|
|
335
|
+
when 'Additional'
|
|
336
|
+
qaqc[:economics][:additional_cost] = model.sqlFile.get.execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='LEEDsummary' AND ReportForString='Entire Facility' AND TableName='EAp2-7. Energy Cost Summary' AND ColumnName='Total Energy Cost' AND RowName='#{rowname}'").get
|
|
337
|
+
qaqc[:economics][:additional_cost_per_m2] = qaqc[:economics][:additional_cost] / qaqc[:building][:conditioned_floor_area_m2] unless model.building.get.conditionedFloorArea.empty?
|
|
338
|
+
|
|
339
|
+
when 'Total'
|
|
340
|
+
qaqc[:economics][:total_cost] = model.sqlFile.get.execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='LEEDsummary' AND ReportForString='Entire Facility' AND TableName='EAp2-7. Energy Cost Summary' AND ColumnName='Total Energy Cost' AND RowName='#{rowname}'").get
|
|
341
|
+
qaqc[:economics][:total_cost_per_m2] = qaqc[:economics][:total_cost] / qaqc[:building][:conditioned_floor_area_m2] unless model.building.get.conditionedFloorArea.empty?
|
|
344
342
|
end
|
|
345
343
|
end
|
|
346
344
|
else
|
|
347
345
|
error_warning << "costing is unavailable because the sql statement is nil RowName FROM TabularDataWithStrings WHERE ReportName='LEEDsummary' AND ReportForString='Entire Facility' AND TableName='EAp2-7. Energy Cost Summary' AND ColumnName='Total Energy Cost'"
|
|
348
346
|
end
|
|
349
347
|
|
|
350
|
-
#Store end_use data
|
|
348
|
+
# Store end_use data
|
|
351
349
|
end_uses = [
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
350
|
+
'Heating',
|
|
351
|
+
'Cooling',
|
|
352
|
+
'Interior Lighting',
|
|
353
|
+
'Exterior Lighting',
|
|
354
|
+
'Interior Equipment',
|
|
355
|
+
'Exterior Equipment',
|
|
356
|
+
'Fans',
|
|
357
|
+
'Pumps',
|
|
358
|
+
'Heat Rejection',
|
|
359
|
+
'Humidification',
|
|
360
|
+
'Heat Recovery',
|
|
361
|
+
'Water Systems',
|
|
362
|
+
'Refrigeration',
|
|
363
|
+
'Generators',
|
|
364
|
+
'Total End Uses'
|
|
367
365
|
]
|
|
368
366
|
|
|
369
367
|
fuels = [
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
368
|
+
['Electricity', 'GJ'],
|
|
369
|
+
['Natural Gas', 'GJ'],
|
|
370
|
+
['Additional Fuel', 'GJ'],
|
|
371
|
+
['District Cooling', 'GJ'],
|
|
372
|
+
['District Heating', 'GJ']
|
|
375
373
|
]
|
|
376
374
|
|
|
377
375
|
qaqc[:end_uses] = {}
|
|
378
376
|
qaqc[:end_uses_eui] = {}
|
|
379
377
|
end_uses.each do |use_type|
|
|
380
|
-
qaqc[:end_uses]["#{use_type.gsub(/\s+/,
|
|
381
|
-
qaqc[:end_uses_eui]["#{use_type.gsub(/\s+/,
|
|
378
|
+
qaqc[:end_uses]["#{use_type.gsub(/\s+/, '_').downcase.to_sym}_gj"] = 0
|
|
379
|
+
qaqc[:end_uses_eui]["#{use_type.gsub(/\s+/, '_').downcase.to_sym}_gj_per_m2"] = 0
|
|
382
380
|
fuels.each do |fuel_type|
|
|
383
|
-
value = model.sqlFile
|
|
384
|
-
if value.empty?
|
|
381
|
+
value = model.sqlFile.get.execAndReturnFirstDouble("SELECT Value FROM tabulardatawithstrings WHERE ReportName='AnnualBuildingUtilityPerformanceSummary' AND ReportForString='Entire Facility' AND TableName='End Uses' AND RowName='#{use_type}' AND ColumnName='#{fuel_type[0]}' AND Units='#{fuel_type[1]}'")
|
|
382
|
+
if value.empty? || (value.get == 0)
|
|
385
383
|
else
|
|
386
|
-
qaqc[:end_uses]["#{use_type.gsub(/\s+/,
|
|
384
|
+
qaqc[:end_uses]["#{use_type.gsub(/\s+/, '_').downcase.to_sym}_gj"] += value.get
|
|
387
385
|
unless qaqc[:building][:conditioned_floor_area_m2].nil?
|
|
388
|
-
qaqc[:end_uses_eui]["#{use_type.gsub(/\s+/,
|
|
386
|
+
qaqc[:end_uses_eui]["#{use_type.gsub(/\s+/, '_').downcase.to_sym}_gj_per_m2"] += value.get / qaqc[:building][:conditioned_floor_area_m2]
|
|
389
387
|
end
|
|
390
388
|
end
|
|
391
389
|
end
|
|
392
|
-
value = model.sqlFile
|
|
393
|
-
if value.empty?
|
|
390
|
+
value = model.sqlFile.get.execAndReturnFirstDouble("SELECT Value FROM tabulardatawithstrings WHERE ReportName='AnnualBuildingUtilityPerformanceSummary' AND ReportForString='Entire Facility' AND TableName='End Uses' AND RowName='#{use_type}' AND ColumnName='Water' AND Units='m3'")
|
|
391
|
+
if value.empty? || (value.get == 0)
|
|
394
392
|
else
|
|
395
|
-
qaqc[:end_uses]["#{use_type.gsub(/\s+/,
|
|
393
|
+
qaqc[:end_uses]["#{use_type.gsub(/\s+/, '_').downcase.to_sym}_water_m3"] = value.get
|
|
396
394
|
unless qaqc[:building][:conditioned_floor_area_m2].nil?
|
|
397
|
-
qaqc[:end_uses_eui]["#{use_type.gsub(/\s+/,
|
|
395
|
+
qaqc[:end_uses_eui]["#{use_type.gsub(/\s+/, '_').downcase.to_sym}_water_m3_per_m2"] = value.get / qaqc[:building][:conditioned_floor_area_m2]
|
|
398
396
|
end
|
|
399
397
|
end
|
|
400
398
|
end
|
|
401
399
|
|
|
402
400
|
# Store Peak Data
|
|
403
401
|
qaqc[:meter_peaks] = {}
|
|
404
|
-
qaqc[:meter_peaks][:electric_w] = electric_peak.empty? ?
|
|
405
|
-
qaqc[:meter_peaks][:natural_gas_w] = natural_gas_peak.empty? ?
|
|
406
|
-
|
|
402
|
+
qaqc[:meter_peaks][:electric_w] = electric_peak.empty? ? 'NA' : electric_peak.get
|
|
403
|
+
qaqc[:meter_peaks][:natural_gas_w] = natural_gas_peak.empty? ? 'NA' : natural_gas_peak.get
|
|
407
404
|
|
|
408
|
-
#Store unmet hour data
|
|
405
|
+
# Store unmet hour data
|
|
409
406
|
qaqc[:unmet_hours] = {}
|
|
410
|
-
qaqc[:unmet_hours][:cooling] = model.getFacility.hoursCoolingSetpointNotMet
|
|
411
|
-
qaqc[:unmet_hours][:heating] = model.getFacility.hoursHeatingSetpointNotMet
|
|
407
|
+
qaqc[:unmet_hours][:cooling] = model.getFacility.hoursCoolingSetpointNotMet.get unless model.getFacility.hoursCoolingSetpointNotMet.empty?
|
|
408
|
+
qaqc[:unmet_hours][:heating] = model.getFacility.hoursHeatingSetpointNotMet.get unless model.getFacility.hoursHeatingSetpointNotMet.empty?
|
|
412
409
|
|
|
410
|
+
# puts "\n\n\n#{costing_rownames}\n\n\n"
|
|
411
|
+
# Padmassun's Code -- Tarrif end
|
|
413
412
|
|
|
414
|
-
#
|
|
415
|
-
#Padmassun's Code -- Tarrif end
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
#Padmassun's Code -- Service Hotwater Heating *start*
|
|
413
|
+
# Padmassun's Code -- Service Hotwater Heating *start*
|
|
419
414
|
qaqc[:service_water_heating] = {}
|
|
420
|
-
qaqc[:service_water_heating][:total_nominal_occupancy]
|
|
421
|
-
#qaqc[:service_water_heating][:total_nominal_occupancy]=model.sqlFile().get().execAndReturnVectorOfDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='OutdoorAirSummary' AND ReportForString='Entire Facility' AND TableName='Average Outdoor Air During Occupied Hours' AND ColumnName='Nominal Number of Occupants'").get.inject(0, :+)
|
|
422
|
-
qaqc[:service_water_heating][:total_nominal_occupancy]=get_total_nominal_capacity(model)
|
|
415
|
+
qaqc[:service_water_heating][:total_nominal_occupancy] = -1
|
|
416
|
+
# qaqc[:service_water_heating][:total_nominal_occupancy]=model.sqlFile().get().execAndReturnVectorOfDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='OutdoorAirSummary' AND ReportForString='Entire Facility' AND TableName='Average Outdoor Air During Occupied Hours' AND ColumnName='Nominal Number of Occupants'").get.inject(0, :+)
|
|
417
|
+
qaqc[:service_water_heating][:total_nominal_occupancy] = get_total_nominal_capacity(model)
|
|
423
418
|
|
|
424
|
-
qaqc[:service_water_heating][:electricity_per_year]=model.sqlFile
|
|
425
|
-
qaqc[:service_water_heating][:electricity_per_year]= validate_optional(qaqc[:service_water_heating][:electricity_per_year], model, -1)
|
|
419
|
+
qaqc[:service_water_heating][:electricity_per_year] = model.sqlFile.get.execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='AnnualBuildingUtilityPerformanceSummary' AND ReportForString='Entire Facility' AND TableName='End Uses' AND ColumnName='Electricity' AND RowName='Water Systems'")
|
|
420
|
+
qaqc[:service_water_heating][:electricity_per_year] = validate_optional(qaqc[:service_water_heating][:electricity_per_year], model, -1)
|
|
426
421
|
|
|
427
|
-
qaqc[:service_water_heating][:electricity_per_day]=qaqc[:service_water_heating][:electricity_per_year]/365.5
|
|
428
|
-
qaqc[:service_water_heating][:electricity_per_day_per_occupant]=qaqc[:service_water_heating][:electricity_per_day]/qaqc[:service_water_heating][:total_nominal_occupancy]
|
|
422
|
+
qaqc[:service_water_heating][:electricity_per_day] = qaqc[:service_water_heating][:electricity_per_year] / 365.5
|
|
423
|
+
qaqc[:service_water_heating][:electricity_per_day_per_occupant] = qaqc[:service_water_heating][:electricity_per_day] / qaqc[:service_water_heating][:total_nominal_occupancy]
|
|
429
424
|
|
|
425
|
+
qaqc[:service_water_heating][:natural_gas_per_year] = model.sqlFile.get.execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='AnnualBuildingUtilityPerformanceSummary' AND ReportForString='Entire Facility' AND TableName='End Uses' AND ColumnName='Natural Gas' AND RowName='Water Systems'")
|
|
426
|
+
qaqc[:service_water_heating][:natural_gas_per_year] = validate_optional(qaqc[:service_water_heating][:natural_gas_per_year], model, -1)
|
|
430
427
|
|
|
431
|
-
qaqc[:service_water_heating][:
|
|
432
|
-
qaqc[:service_water_heating][:natural_gas_per_year]=validate_optional(qaqc[:service_water_heating][:natural_gas_per_year], model, -1)
|
|
433
|
-
|
|
434
|
-
qaqc[:service_water_heating][:additional_fuel_per_year]=model.sqlFile().get().execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='AnnualBuildingUtilityPerformanceSummary' AND ReportForString='Entire Facility' AND TableName='End Uses' AND ColumnName='Additional Fuel' AND RowName='Water Systems'")
|
|
428
|
+
qaqc[:service_water_heating][:additional_fuel_per_year] = model.sqlFile.get.execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='AnnualBuildingUtilityPerformanceSummary' AND ReportForString='Entire Facility' AND TableName='End Uses' AND ColumnName='Additional Fuel' AND RowName='Water Systems'")
|
|
435
429
|
qaqc[:service_water_heating][:additional_fuel_per_year] = validate_optional(qaqc[:service_water_heating][:additional_fuel_per_year], model, -1)
|
|
436
430
|
|
|
437
|
-
qaqc[:service_water_heating][:water_m3_per_year]=model.sqlFile
|
|
438
|
-
qaqc[:service_water_heating][:water_m3_per_year]=validate_optional(qaqc[:service_water_heating][:water_m3_per_year], model, -1)
|
|
431
|
+
qaqc[:service_water_heating][:water_m3_per_year] = model.sqlFile.get.execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='AnnualBuildingUtilityPerformanceSummary' AND ReportForString='Entire Facility' AND TableName='End Uses' AND ColumnName='Water' AND RowName='Water Systems'")
|
|
432
|
+
qaqc[:service_water_heating][:water_m3_per_year] = validate_optional(qaqc[:service_water_heating][:water_m3_per_year], model, -1)
|
|
439
433
|
|
|
440
|
-
qaqc[:service_water_heating][:water_m3_per_day]=qaqc[:service_water_heating][:water_m3_per_year]/365.5
|
|
441
|
-
qaqc[:service_water_heating][:water_m3_per_day_per_occupant]=qaqc[:service_water_heating][:water_m3_per_day]/qaqc[:service_water_heating][:total_nominal_occupancy]
|
|
442
|
-
#puts qaqc[:service_water_heating][:total_nominal_occupancy]
|
|
443
|
-
#Padmassun's Code -- Service Hotwater Heating *end*
|
|
434
|
+
qaqc[:service_water_heating][:water_m3_per_day] = qaqc[:service_water_heating][:water_m3_per_year] / 365.5
|
|
435
|
+
qaqc[:service_water_heating][:water_m3_per_day_per_occupant] = qaqc[:service_water_heating][:water_m3_per_day] / qaqc[:service_water_heating][:total_nominal_occupancy]
|
|
436
|
+
# puts qaqc[:service_water_heating][:total_nominal_occupancy]
|
|
437
|
+
# Padmassun's Code -- Service Hotwater Heating *end*
|
|
444
438
|
|
|
445
|
-
#Store Envelope data.
|
|
439
|
+
# Store Envelope data.
|
|
446
440
|
qaqc[:envelope] = {}
|
|
447
|
-
#Get Areas
|
|
448
|
-
qaqc[:envelope][:outdoor_walls_area_m2] = outdoor_walls.inject(0){|sum,e| sum + e.netArea
|
|
449
|
-
qaqc[:envelope][:outdoor_roofs_area_m2] = outdoor_roofs.inject(0){|sum,e| sum + e.netArea
|
|
450
|
-
qaqc[:envelope][:outdoor_floors_area_m2] = outdoor_floors.inject(0){|sum,e| sum + e.netArea
|
|
451
|
-
qaqc[:envelope][:ground_walls_area_m2] = ground_walls.inject(0){|sum,e| sum + e.netArea
|
|
452
|
-
qaqc[:envelope][:ground_roofs_area_m2] = ground_roofs.inject(0){|sum,e| sum + e.netArea
|
|
453
|
-
qaqc[:envelope][:ground_floors_area_m2] = ground_floors.inject(0){|sum,e| sum + e.netArea
|
|
454
|
-
qaqc[:envelope][:interior_floors_area_m2] = interior_floors.inject(0){|sum,e| sum + e.netArea
|
|
455
|
-
|
|
456
|
-
#Subsurface areas
|
|
457
|
-
qaqc[:envelope][:windows_area_m2] = windows.inject(0){|sum,e| sum + e.netArea
|
|
458
|
-
qaqc[:envelope][:skylights_area_m2] = skylights.inject(0){|sum,e| sum + e.netArea
|
|
459
|
-
qaqc[:envelope][:doors_area_m2] = doors.inject(0){|sum,e| sum + e.netArea
|
|
460
|
-
qaqc[:envelope][:overhead_doors_area_m2] = overhead_doors.inject(0){|sum,e| sum + e.netArea
|
|
461
|
-
|
|
462
|
-
#Total Building Surface Area.
|
|
441
|
+
# Get Areas
|
|
442
|
+
qaqc[:envelope][:outdoor_walls_area_m2] = outdoor_walls.inject(0) { |sum, e| sum + e.netArea * e.space.get.multiplier }
|
|
443
|
+
qaqc[:envelope][:outdoor_roofs_area_m2] = outdoor_roofs.inject(0) { |sum, e| sum + e.netArea * e.space.get.multiplier }
|
|
444
|
+
qaqc[:envelope][:outdoor_floors_area_m2] = outdoor_floors.inject(0) { |sum, e| sum + e.netArea * e.space.get.multiplier }
|
|
445
|
+
qaqc[:envelope][:ground_walls_area_m2] = ground_walls.inject(0) { |sum, e| sum + e.netArea * e.space.get.multiplier }
|
|
446
|
+
qaqc[:envelope][:ground_roofs_area_m2] = ground_roofs.inject(0) { |sum, e| sum + e.netArea * e.space.get.multiplier }
|
|
447
|
+
qaqc[:envelope][:ground_floors_area_m2] = ground_floors.inject(0) { |sum, e| sum + e.netArea * e.space.get.multiplier }
|
|
448
|
+
qaqc[:envelope][:interior_floors_area_m2] = interior_floors.inject(0) { |sum, e| sum + e.netArea * e.space.get.multiplier }
|
|
449
|
+
|
|
450
|
+
# Subsurface areas
|
|
451
|
+
qaqc[:envelope][:windows_area_m2] = windows.inject(0) { |sum, e| sum + e.netArea * e.space.get.multiplier * e.multiplier }
|
|
452
|
+
qaqc[:envelope][:skylights_area_m2] = skylights.inject(0) { |sum, e| sum + e.netArea * e.space.get.multiplier * e.multiplier }
|
|
453
|
+
qaqc[:envelope][:doors_area_m2] = doors.inject(0) { |sum, e| sum + e.netArea * e.space.get.multiplier * e.multiplier }
|
|
454
|
+
qaqc[:envelope][:overhead_doors_area_m2] = overhead_doors.inject(0) { |sum, e| sum + e.netArea * e.space.get.multiplier * e.multiplier }
|
|
455
|
+
|
|
456
|
+
# Total Building Surface Area.
|
|
463
457
|
qaqc[:envelope][:total_exterior_area_m2] = qaqc[:envelope][:outdoor_walls_area_m2] +
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
#Total Building Ground Surface Area.
|
|
458
|
+
qaqc[:envelope][:outdoor_roofs_area_m2] +
|
|
459
|
+
qaqc[:envelope][:outdoor_floors_area_m2] +
|
|
460
|
+
qaqc[:envelope][:ground_walls_area_m2] +
|
|
461
|
+
qaqc[:envelope][:ground_roofs_area_m2] +
|
|
462
|
+
qaqc[:envelope][:ground_floors_area_m2] +
|
|
463
|
+
qaqc[:envelope][:windows_area_m2] +
|
|
464
|
+
qaqc[:envelope][:skylights_area_m2] +
|
|
465
|
+
qaqc[:envelope][:doors_area_m2] +
|
|
466
|
+
qaqc[:envelope][:overhead_doors_area_m2]
|
|
467
|
+
# Total Building Ground Surface Area.
|
|
474
468
|
qaqc[:envelope][:total_ground_area_m2] = qaqc[:envelope][:ground_walls_area_m2] +
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
#Total Building Outdoor Surface Area.
|
|
469
|
+
qaqc[:envelope][:ground_roofs_area_m2] +
|
|
470
|
+
qaqc[:envelope][:ground_floors_area_m2]
|
|
471
|
+
# Total Building Outdoor Surface Area.
|
|
478
472
|
qaqc[:envelope][:total_outdoor_area_m2] = qaqc[:envelope][:outdoor_walls_area_m2] +
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
qaqc[:envelope][:
|
|
489
|
-
qaqc[:envelope][:
|
|
490
|
-
qaqc[:envelope][:
|
|
491
|
-
qaqc[:envelope][:
|
|
492
|
-
qaqc[:envelope][:
|
|
493
|
-
qaqc[:envelope][:
|
|
494
|
-
qaqc[:envelope][:
|
|
495
|
-
qaqc[:envelope][:
|
|
496
|
-
qaqc[:envelope][:
|
|
497
|
-
qaqc[:envelope][:overhead_doors_average_conductance_w_per_m2_k] = BTAP::Geometry::Surfaces::get_weighted_average_surface_conductance(overhead_doors).round(4) if overhead_doors.size > 0
|
|
473
|
+
qaqc[:envelope][:outdoor_roofs_area_m2] +
|
|
474
|
+
qaqc[:envelope][:outdoor_floors_area_m2] +
|
|
475
|
+
qaqc[:envelope][:windows_area_m2] +
|
|
476
|
+
qaqc[:envelope][:skylights_area_m2] +
|
|
477
|
+
qaqc[:envelope][:doors_area_m2] +
|
|
478
|
+
qaqc[:envelope][:overhead_doors_area_m2]
|
|
479
|
+
|
|
480
|
+
# Average Conductances by surface Type
|
|
481
|
+
qaqc[:envelope][:outdoor_walls_average_conductance_w_per_m2_k] = BTAP::Geometry::Surfaces.get_weighted_average_surface_conductance(outdoor_walls).round(4) if !outdoor_walls.empty?
|
|
482
|
+
qaqc[:envelope][:outdoor_roofs_average_conductance_w_per_m2_k] = BTAP::Geometry::Surfaces.get_weighted_average_surface_conductance(outdoor_roofs).round(4) if !outdoor_roofs.empty?
|
|
483
|
+
qaqc[:envelope][:outdoor_floors_average_conductance_w_per_m2_k] = BTAP::Geometry::Surfaces.get_weighted_average_surface_conductance(outdoor_floors).round(4) if !outdoor_floors.empty?
|
|
484
|
+
qaqc[:envelope][:ground_walls_average_conductance_w_per_m2_k] = BTAP::Geometry::Surfaces.get_weighted_average_surface_conductance(ground_walls).round(4) if !ground_walls.empty?
|
|
485
|
+
qaqc[:envelope][:ground_roofs_average_conductance_w_per_m2_k] = BTAP::Geometry::Surfaces.get_weighted_average_surface_conductance(ground_roofs).round(4) if !ground_roofs.empty?
|
|
486
|
+
qaqc[:envelope][:ground_floors_average_conductance_w_per_m2_k] = BTAP::Geometry::Surfaces.get_weighted_average_surface_conductance(ground_floors).round(4) if !ground_floors.empty?
|
|
487
|
+
qaqc[:envelope][:windows_average_conductance_w_per_m2_k] = BTAP::Geometry::Surfaces.get_weighted_average_surface_conductance(windows).round(4) if !windows.empty?
|
|
488
|
+
qaqc[:envelope][:skylights_average_conductance_w_per_m2_k] = BTAP::Geometry::Surfaces.get_weighted_average_surface_conductance(skylights).round(4) if !skylights.empty?
|
|
489
|
+
qaqc[:envelope][:doors_average_conductance_w_per_m2_k] = BTAP::Geometry::Surfaces.get_weighted_average_surface_conductance(doors).round(4) if !doors.empty?
|
|
490
|
+
qaqc[:envelope][:overhead_doors_average_conductance_w_per_m2_k] = BTAP::Geometry::Surfaces.get_weighted_average_surface_conductance(overhead_doors).round(4) if !overhead_doors.empty?
|
|
498
491
|
|
|
499
492
|
# #Average Conductances for building whole weight factors
|
|
500
|
-
outdoor_walls.
|
|
501
|
-
outdoor_roofs.
|
|
502
|
-
outdoor_floors.
|
|
503
|
-
ground_walls.
|
|
504
|
-
ground_roofs.
|
|
505
|
-
ground_floors.
|
|
506
|
-
windows.
|
|
493
|
+
!outdoor_walls.empty? ? o_wall_cond_weight = qaqc[:envelope][:outdoor_walls_average_conductance_w_per_m2_k] * qaqc[:envelope][:outdoor_walls_area_m2] : o_wall_cond_weight = 0
|
|
494
|
+
!outdoor_roofs.empty? ? o_roof_cond_weight = qaqc[:envelope][:outdoor_roofs_average_conductance_w_per_m2_k] * qaqc[:envelope][:outdoor_roofs_area_m2] : o_roof_cond_weight = 0
|
|
495
|
+
!outdoor_floors.empty? ? o_floor_cond_weight = qaqc[:envelope][:outdoor_floors_average_conductance_w_per_m2_k] * qaqc[:envelope][:outdoor_floors_area_m2] : o_floor_cond_weight = 0
|
|
496
|
+
!ground_walls.empty? ? g_wall_cond_weight = qaqc[:envelope][:ground_walls_average_conductance_w_per_m2_k] * qaqc[:envelope][:ground_walls_area_m2] : g_wall_cond_weight = 0
|
|
497
|
+
!ground_roofs.empty? ? g_roof_cond_weight = qaqc[:envelope][:ground_roofs_average_conductance_w_per_m2_k] * qaqc[:envelope][:ground_roofs_area_m2] : g_roof_cond_weight = 0
|
|
498
|
+
!ground_floors.empty? ? g_floor_cond_weight = qaqc[:envelope][:ground_floors_average_conductance_w_per_m2_k] * qaqc[:envelope][:ground_floors_area_m2] : g_floor_cond_weight = 0
|
|
499
|
+
!windows.empty? ? win_cond_weight = qaqc[:envelope][:windows_average_conductance_w_per_m2_k] * qaqc[:envelope][:windows_area_m2] : win_cond_weight = 0
|
|
507
500
|
# doors.size > 0 ? sky_cond_weight = qaqc[:envelope][:skylights_average_conductance_w_per_m2_k] * qaqc[:envelope][:skylights_area_m2] : sky_cond_weight = 0
|
|
508
|
-
if doors.
|
|
501
|
+
if !doors.empty? && !qaqc[:envelope][:skylights_average_conductance_w_per_m2_k].nil? && !qaqc[:envelope][:skylights_area_m2].nil?
|
|
509
502
|
sky_cond_weight = qaqc[:envelope][:skylights_average_conductance_w_per_m2_k] * qaqc[:envelope][:skylights_area_m2]
|
|
510
503
|
else
|
|
511
504
|
sky_cond_weight = 0
|
|
512
505
|
end
|
|
513
|
-
overhead_doors.
|
|
514
|
-
overhead_doors.
|
|
515
|
-
|
|
506
|
+
!overhead_doors.empty? ? door_cond_weight = qaqc[:envelope][:doors_average_conductance_w_per_m2_k] * qaqc[:envelope][:doors_area_m2] : door_cond_weight = 0
|
|
507
|
+
!overhead_doors.empty? ? overhead_door_cond_weight = qaqc[:envelope][:overhead_doors_average_conductance_w_per_m2_k] * qaqc[:envelope][:overhead_doors_area_m2] : overhead_door_cond_weight = 0
|
|
516
508
|
|
|
517
509
|
# Building Average Conductance
|
|
518
510
|
qaqc[:envelope][:building_outdoor_average_conductance_w_per_m2_k] = (
|
|
@@ -534,38 +526,36 @@ class NECB2011
|
|
|
534
526
|
qaqc[:envelope][:building_average_conductance_w_per_m2_k] = (
|
|
535
527
|
(qaqc[:envelope][:building_ground_average_conductance_w_per_m2_k] * qaqc[:envelope][:total_ground_area_m2]) +
|
|
536
528
|
(qaqc[:envelope][:building_outdoor_average_conductance_w_per_m2_k] * qaqc[:envelope][:total_outdoor_area_m2])
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
qaqc[:envelope][:fdwr] = (BTAP::Geometry::get_fwdr(model) * 100.0).round(1)
|
|
542
|
-
qaqc[:envelope][:srr] = (BTAP::Geometry::get_srr(model) * 100.0).round(1)
|
|
529
|
+
) /
|
|
530
|
+
(qaqc[:envelope][:total_ground_area_m2] + qaqc[:envelope][:total_outdoor_area_m2])
|
|
543
531
|
|
|
532
|
+
qaqc[:envelope][:fdwr] = (BTAP::Geometry.get_fwdr(model) * 100.0).round(1)
|
|
533
|
+
qaqc[:envelope][:srr] = (BTAP::Geometry.get_srr(model) * 100.0).round(1)
|
|
544
534
|
|
|
545
535
|
qaqc[:envelope][:constructions] = {}
|
|
546
536
|
qaqc[:envelope][:constructions][:exterior_fenestration] = []
|
|
547
537
|
constructions = []
|
|
548
|
-
outdoor_subsurfaces.each {|surface| constructions << surface.construction.get}
|
|
538
|
+
outdoor_subsurfaces.each { |surface| constructions << surface.construction.get }
|
|
549
539
|
ext_const_base = Hash.new(0)
|
|
550
|
-
constructions.each {|name| ext_const_base[name] += 1}
|
|
551
|
-
#iterate thought each construction and get store data
|
|
540
|
+
constructions.each { |name| ext_const_base[name] += 1 }
|
|
541
|
+
# iterate thought each construction and get store data
|
|
552
542
|
ext_const_base.sort.each do |construction, count|
|
|
553
543
|
construction_info = {}
|
|
554
544
|
qaqc[:envelope][:constructions][:exterior_fenestration] << construction_info
|
|
555
545
|
construction_info[:name] = construction.name.get
|
|
556
546
|
construction_info[:net_area_m2] = construction.getNetArea.round(2)
|
|
557
|
-
construction_info[:thermal_conductance_m2_w_per_k] = BTAP::Resources::Envelope::Constructions
|
|
558
|
-
construction_info[:solar_transmittance] = BTAP::Resources::Envelope::Constructions
|
|
559
|
-
construction_info[:visible_tranmittance] = BTAP::Resources::Envelope::Constructions
|
|
547
|
+
construction_info[:thermal_conductance_m2_w_per_k] = BTAP::Resources::Envelope::Constructions.get_conductance(construction).round(3)
|
|
548
|
+
construction_info[:solar_transmittance] = BTAP::Resources::Envelope::Constructions.get_shgc(model, construction).round(3)
|
|
549
|
+
construction_info[:visible_tranmittance] = BTAP::Resources::Envelope::Constructions.get_tvis(model, construction).round(3)
|
|
560
550
|
end
|
|
561
551
|
|
|
562
|
-
#Exterior
|
|
552
|
+
# Exterior
|
|
563
553
|
qaqc[:envelope][:constructions][:exterior_opaque] = []
|
|
564
554
|
constructions = []
|
|
565
|
-
outdoor_surfaces.each {|surface| constructions << surface.construction.get}
|
|
555
|
+
outdoor_surfaces.each { |surface| constructions << surface.construction.get }
|
|
566
556
|
ext_const_base = Hash.new(0)
|
|
567
|
-
constructions.each {|name| ext_const_base[name] += 1}
|
|
568
|
-
#iterate thought each construction and get store data
|
|
557
|
+
constructions.each { |name| ext_const_base[name] += 1 }
|
|
558
|
+
# iterate thought each construction and get store data
|
|
569
559
|
ext_const_base.sort.each do |construction, count|
|
|
570
560
|
construction_info = {}
|
|
571
561
|
qaqc[:envelope][:constructions][:exterior_opaque] << construction_info
|
|
@@ -576,13 +566,13 @@ class NECB2011
|
|
|
576
566
|
construction_info[:solar_absorptance] = construction.to_Construction.get.layers[0].exteriorVisibleAbsorptance.get
|
|
577
567
|
end
|
|
578
568
|
|
|
579
|
-
#Ground
|
|
569
|
+
# Ground
|
|
580
570
|
qaqc[:envelope][:constructions][:ground] = []
|
|
581
571
|
constructions = []
|
|
582
|
-
ground_surfaces.each {|surface| constructions << surface.construction.get}
|
|
572
|
+
ground_surfaces.each { |surface| constructions << surface.construction.get }
|
|
583
573
|
ext_const_base = Hash.new(0)
|
|
584
|
-
constructions.each {|name| ext_const_base[name] += 1}
|
|
585
|
-
#iterate thought each construction and get store data
|
|
574
|
+
constructions.each { |name| ext_const_base[name] += 1 }
|
|
575
|
+
# iterate thought each construction and get store data
|
|
586
576
|
ext_const_base.sort.each do |construction, count|
|
|
587
577
|
construction_info = {}
|
|
588
578
|
qaqc[:envelope][:constructions][:ground] << construction_info
|
|
@@ -593,62 +583,61 @@ class NECB2011
|
|
|
593
583
|
construction_info[:solar_absorptance] = construction.to_Construction.get.layers[0].exteriorVisibleAbsorptance.get
|
|
594
584
|
end
|
|
595
585
|
|
|
596
|
-
|
|
597
586
|
qaqc[:envelope][:average_thermal_conductance_m2_w_per_k] =
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
# Store Space data.
|
|
601
|
-
qaqc[:spaces] =[]
|
|
587
|
+
# Store Space data.
|
|
588
|
+
qaqc[:spaces] = []
|
|
602
589
|
model.getSpaces.sort.each do |space|
|
|
603
590
|
spaceinfo = {}
|
|
604
591
|
qaqc[:spaces] << spaceinfo
|
|
605
|
-
spaceinfo[:name] = space.name.get #name should be defined test
|
|
592
|
+
spaceinfo[:name] = space.name.get # name should be defined test
|
|
606
593
|
spaceinfo[:multiplier] = space.multiplier
|
|
607
594
|
spaceinfo[:volume] = space.volume # should be greater than zero
|
|
608
595
|
spaceinfo[:exterior_wall_area] = space.exteriorWallArea # just for information.
|
|
609
|
-
spaceinfo[:space_type_name] = space.spaceType.get.name.get unless space.spaceType.empty? #should have a space types name defined.
|
|
596
|
+
spaceinfo[:space_type_name] = space.spaceType.get.name.get unless space.spaceType.empty? # should have a space types name defined.
|
|
610
597
|
spaceinfo[:thermal_zone] = space.thermalZone.get.name.get unless space.thermalZone.empty? # should be assigned a thermalzone name.
|
|
611
|
-
#puts space.name.get
|
|
612
|
-
#puts space.thermalZone.empty?
|
|
613
|
-
spaceinfo[:breathing_zone_outdoor_airflow_vbz]
|
|
614
|
-
breathing_zone_outdoor_airflow_vbz= model.sqlFile
|
|
615
|
-
spaceinfo[:breathing_zone_outdoor_airflow_vbz] =breathing_zone_outdoor_airflow_vbz.get unless breathing_zone_outdoor_airflow_vbz.empty?
|
|
598
|
+
# puts space.name.get
|
|
599
|
+
# puts space.thermalZone.empty?
|
|
600
|
+
spaceinfo[:breathing_zone_outdoor_airflow_vbz] = -1
|
|
601
|
+
breathing_zone_outdoor_airflow_vbz = model.sqlFile.get.execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='Standard62.1Summary' AND ReportForString='Entire Facility' AND TableName='Zone Ventilation Parameters' AND ColumnName='Breathing Zone Outdoor Airflow - Vbz' AND Units='m3/s' AND RowName='#{spaceinfo[:thermal_zone].to_s.upcase}' ")
|
|
602
|
+
spaceinfo[:breathing_zone_outdoor_airflow_vbz] = breathing_zone_outdoor_airflow_vbz.get unless breathing_zone_outdoor_airflow_vbz.empty?
|
|
616
603
|
spaceinfo[:infiltration_method] = 'N/A'
|
|
617
|
-
spaceinfo[:infiltration_flow_per_m2]
|
|
618
|
-
|
|
619
|
-
spaceinfo[:infiltration_method] = space.spaceInfiltrationDesignFlowRates[0].designFlowRateCalculationMethod
|
|
620
|
-
spaceinfo[:infiltration_flow_per_m2] = "N/A"
|
|
621
|
-
spaceinfo[:infiltration_flow_per_m2] = space.spaceInfiltrationDesignFlowRates[0].flowperExteriorSurfaceArea.get.round(5) unless space.spaceInfiltrationDesignFlowRates[0].flowperExteriorSurfaceArea.empty?
|
|
622
|
-
else
|
|
604
|
+
spaceinfo[:infiltration_flow_per_m2] = -1.0
|
|
605
|
+
if space.spaceInfiltrationDesignFlowRates[0].nil?
|
|
623
606
|
error_warning << "space.spaceInfiltrationDesignFlowRates[0] is empty for #{spaceinfo[:name]}"
|
|
624
607
|
error_warning << "space.spaceInfiltrationDesignFlowRates[0].designFlowRateCalculationMethod is empty for #{spaceinfo[:name]}"
|
|
625
608
|
error_warning << "space.spaceInfiltrationDesignFlowRates[0].flowperExteriorSurfaceArea is empty for #{spaceinfo[:name]}"
|
|
609
|
+
else
|
|
610
|
+
spaceinfo[:infiltration_method] = space.spaceInfiltrationDesignFlowRates[0].designFlowRateCalculationMethod
|
|
611
|
+
spaceinfo[:infiltration_flow_per_m2] = 'N/A'
|
|
612
|
+
spaceinfo[:infiltration_flow_per_m2] = space.spaceInfiltrationDesignFlowRates[0].flowperExteriorSurfaceArea.get.round(5) unless space.spaceInfiltrationDesignFlowRates[0].flowperExteriorSurfaceArea.empty?
|
|
626
613
|
end
|
|
627
614
|
|
|
628
|
-
#the following should have values unless the spacetype is "undefined" other they should be set to the correct NECB values.
|
|
629
|
-
|
|
615
|
+
# the following should have values unless the spacetype is "undefined" other they should be set to the correct NECB values.
|
|
616
|
+
if space.spaceType.empty?
|
|
617
|
+
error_warning << "space.spaceType is empty for #{space.name.get}"
|
|
618
|
+
else
|
|
630
619
|
spaceinfo[:occupancy_schedule] = nil
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
620
|
+
if space.spaceType.get.defaultScheduleSet.empty?
|
|
621
|
+
error_warning << "space.spaceType.get.defaultScheduleSet is empty for #{space.name.get}"
|
|
622
|
+
else
|
|
623
|
+
if space.spaceType.get.defaultScheduleSet.get.numberofPeopleSchedule.empty?
|
|
624
|
+
error_warning << "space.spaceType.get.defaultScheduleSet.get.numberofPeopleSchedule is empty for #{space.name.get}"
|
|
634
625
|
else
|
|
635
|
-
|
|
626
|
+
spaceinfo[:occupancy_schedule] = space.spaceType.get.defaultScheduleSet.get.numberofPeopleSchedule.get.name.get # should not empty.
|
|
636
627
|
end
|
|
637
|
-
else
|
|
638
|
-
error_warning << "space.spaceType.get.defaultScheduleSet is empty for #{space.name.get }"
|
|
639
628
|
end
|
|
640
629
|
|
|
641
|
-
spaceinfo[:occ_per_m2] = space.spaceType.get.people[0].peopleDefinition.peopleperSpaceFloorArea.get.round(3) unless space.spaceType.get.people[0].nil?
|
|
642
|
-
|
|
643
|
-
|
|
630
|
+
spaceinfo[:occ_per_m2] = space.spaceType.get.people[0].peopleDefinition.peopleperSpaceFloorArea.get.round(3) unless space.spaceType.get.people[0].nil? || space.spaceType.get.people[0].peopleDefinition.peopleperSpaceFloorArea.empty?
|
|
631
|
+
if space.spaceType.get.lights[0].nil?
|
|
632
|
+
error_warning << "space.spaceType.get.lights[0] is nil for Space:[#{space.name.get}] Space Type:[#{spaceinfo[:space_type_name]}]"
|
|
633
|
+
else
|
|
634
|
+
spaceinfo[:lighting_w_per_m2] = space.spaceType.get.lights[0].lightsDefinition.wattsperSpaceFloorArea # .get.round(3) unless space.spaceType.get.lights[0].nil?
|
|
644
635
|
spaceinfo[:lighting_w_per_m2] = validate_optional(spaceinfo[:lighting_w_per_m2], model, -1.0)
|
|
645
636
|
unless spaceinfo[:lighting_w_per_m2].nil?
|
|
646
637
|
spaceinfo[:lighting_w_per_m2] = spaceinfo[:lighting_w_per_m2].round(3)
|
|
647
638
|
end
|
|
648
|
-
else
|
|
649
|
-
error_warning << "space.spaceType.get.lights[0] is nil for Space:[#{space.name.get}] Space Type:[#{spaceinfo[:space_type_name]}]"
|
|
650
639
|
end
|
|
651
|
-
#spaceinfo[:electric_w_per_m2] = space.spaceType.get.electricEquipment[0].electricEquipmentDefinition.wattsperSpaceFloorArea.get.round(3) unless space.spaceType.get.electricEquipment[0].nil?
|
|
640
|
+
# spaceinfo[:electric_w_per_m2] = space.spaceType.get.electricEquipment[0].electricEquipmentDefinition.wattsperSpaceFloorArea.get.round(3) unless space.spaceType.get.electricEquipment[0].nil?
|
|
652
641
|
|
|
653
642
|
unless space.spaceType.get.electricEquipment[0].nil?
|
|
654
643
|
unless space.spaceType.get.electricEquipment[0].electricEquipmentDefinition.wattsperSpaceFloorArea.empty?
|
|
@@ -658,19 +647,16 @@ class NECB2011
|
|
|
658
647
|
spaceinfo[:shw_m3_per_s] = space.waterUseEquipment[0].waterUseEquipmentDefinition.peakFlowRate.round(3) unless space.waterUseEquipment[0].nil?
|
|
659
648
|
spaceinfo[:waterUseEquipment] = []
|
|
660
649
|
if !space.waterUseEquipment.empty?
|
|
661
|
-
waterUseEquipment_info={}
|
|
650
|
+
waterUseEquipment_info = {}
|
|
662
651
|
spaceinfo[:waterUseEquipment] << waterUseEquipment_info
|
|
663
|
-
waterUseEquipment_info[:peak_flow_rate]= space.waterUseEquipment[0].waterUseEquipmentDefinition.peakFlowRate
|
|
652
|
+
waterUseEquipment_info[:peak_flow_rate] = space.waterUseEquipment[0].waterUseEquipmentDefinition.peakFlowRate
|
|
664
653
|
waterUseEquipment_info[:peak_flow_rate_per_area] = waterUseEquipment_info[:peak_flow_rate] / space.floorArea
|
|
665
|
-
area_per_occ = space.spaceType.get.people[0].spaceFloorAreaPerPerson
|
|
666
|
-
area_per_occ = validate_optional(area_per_occ, model, -1.0)
|
|
654
|
+
area_per_occ = space.spaceType.get.people[0].nil? ? 0.0 : validate_optional(space.spaceType.get.people[0].spaceFloorAreaPerPerson, model, -1.0)
|
|
667
655
|
# Watt per person = m3/s/m3 * 1000W/kW * (specific heat * dT) * m2/person
|
|
668
656
|
waterUseEquipment_info[:shw_watts_per_person] = waterUseEquipment_info[:peak_flow_rate_per_area] * 1000 * (4.19 * 44.4) * 1000 * area_per_occ
|
|
669
|
-
#puts waterUseEquipment_info[:shw_watts_per_ponce the erson]
|
|
670
|
-
#puts "\n\n\n"
|
|
657
|
+
# puts waterUseEquipment_info[:shw_watts_per_ponce the erson]
|
|
658
|
+
# puts "\n\n\n"
|
|
671
659
|
end
|
|
672
|
-
else
|
|
673
|
-
error_warning << "space.spaceType is empty for #{space.name.get }"
|
|
674
660
|
end
|
|
675
661
|
end
|
|
676
662
|
|
|
@@ -682,33 +668,33 @@ class NECB2011
|
|
|
682
668
|
zoneinfo[:name] = zone.name.get
|
|
683
669
|
zoneinfo[:floor_area] = zone.floorArea
|
|
684
670
|
zoneinfo[:multiplier] = zone.multiplier
|
|
685
|
-
zoneinfo[:is_conditioned] =
|
|
686
|
-
|
|
687
|
-
zoneinfo[:is_conditioned] = zone.isConditioned.get
|
|
688
|
-
else
|
|
671
|
+
zoneinfo[:is_conditioned] = 'N/A'
|
|
672
|
+
if zone.isConditioned.empty?
|
|
689
673
|
error_warning << "zone.isConditioned is empty for #{zone.name.get}"
|
|
674
|
+
else
|
|
675
|
+
zoneinfo[:is_conditioned] = zone.isConditioned.get
|
|
690
676
|
end
|
|
691
677
|
|
|
692
678
|
zoneinfo[:is_ideal_air_loads] = zone.useIdealAirLoads
|
|
693
679
|
zoneinfo[:heating_sizing_factor] = -1.0
|
|
694
|
-
|
|
695
|
-
zoneinfo[:heating_sizing_factor] = zone.sizingZone.zoneHeatingSizingFactor.get
|
|
696
|
-
else
|
|
680
|
+
if zone.sizingZone.zoneHeatingSizingFactor.empty?
|
|
697
681
|
error_warning << "zone.sizingZone.zoneHeatingSizingFactor is empty for #{zone.name.get}"
|
|
682
|
+
else
|
|
683
|
+
zoneinfo[:heating_sizing_factor] = zone.sizingZone.zoneHeatingSizingFactor.get
|
|
698
684
|
end
|
|
699
685
|
|
|
700
|
-
zoneinfo[:cooling_sizing_factor] = -1.0 #zone.sizingZone.zoneCoolingSizingFactor.get
|
|
701
|
-
|
|
702
|
-
zoneinfo[:cooling_sizing_factor] = zone.sizingZone.zoneCoolingSizingFactor.get
|
|
703
|
-
else
|
|
686
|
+
zoneinfo[:cooling_sizing_factor] = -1.0 # zone.sizingZone.zoneCoolingSizingFactor.get
|
|
687
|
+
if zone.sizingZone.zoneCoolingSizingFactor.empty?
|
|
704
688
|
error_warning << "zone.sizingZone.zoneCoolingSizingFactor is empty for #{zone.name.get}"
|
|
689
|
+
else
|
|
690
|
+
zoneinfo[:cooling_sizing_factor] = zone.sizingZone.zoneCoolingSizingFactor.get
|
|
705
691
|
end
|
|
706
692
|
|
|
707
693
|
zoneinfo[:zone_heating_design_supply_air_temperature] = zone.sizingZone.zoneHeatingDesignSupplyAirTemperature
|
|
708
694
|
zoneinfo[:zone_cooling_design_supply_air_temperature] = zone.sizingZone.zoneCoolingDesignSupplyAirTemperature
|
|
709
695
|
zoneinfo[:spaces] = []
|
|
710
696
|
zone.spaces.sort.each do |space|
|
|
711
|
-
spaceinfo ={}
|
|
697
|
+
spaceinfo = {}
|
|
712
698
|
zoneinfo[:spaces] << spaceinfo
|
|
713
699
|
spaceinfo[:name] = space.name.get
|
|
714
700
|
spaceinfo[:type] = space.spaceType.get.name.get unless space.spaceType.empty?
|
|
@@ -724,7 +710,8 @@ class NECB2011
|
|
|
724
710
|
item[:type] = 'StraightComponent'
|
|
725
711
|
end
|
|
726
712
|
end
|
|
727
|
-
|
|
713
|
+
# zone
|
|
714
|
+
end
|
|
728
715
|
# Store Air Loop Information
|
|
729
716
|
qaqc[:air_loops] = []
|
|
730
717
|
model.getAirLoopHVACs.sort.each do |air_loop|
|
|
@@ -735,19 +722,19 @@ class NECB2011
|
|
|
735
722
|
air_loop_info[:total_breathing_zone_outdoor_airflow_vbz] = 0.0
|
|
736
723
|
air_loop.thermalZones.sort.each do |zone|
|
|
737
724
|
air_loop_info[:thermal_zones] << zone.name.get
|
|
738
|
-
vbz = model.sqlFile
|
|
725
|
+
vbz = model.sqlFile.get.execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='Standard62.1Summary' AND ReportForString='Entire Facility' AND TableName='Zone Ventilation Parameters' AND ColumnName='Breathing Zone Outdoor Airflow - Vbz' AND Units='m3/s' AND RowName='#{zone.name.get.to_s.upcase}' ")
|
|
739
726
|
vbz = validate_optional(vbz, model, 0)
|
|
740
727
|
air_loop_info[:total_breathing_zone_outdoor_airflow_vbz] += vbz
|
|
741
|
-
air_loop_info[:total_floor_area_served] += zone.floorArea*zone.multiplier.to_f
|
|
728
|
+
air_loop_info[:total_floor_area_served] += zone.floorArea * zone.multiplier.to_f
|
|
742
729
|
end
|
|
743
|
-
air_loop_info[:area_outdoor_air_rate_m3_per_s_m2] = model.sqlFile
|
|
730
|
+
air_loop_info[:area_outdoor_air_rate_m3_per_s_m2] = model.sqlFile.get.execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='Standard62.1Summary' AND ReportForString='Entire Facility' AND TableName='System Ventilation Parameters' AND ColumnName='Area Outdoor Air Rate - Ra' AND Units='m3/s-m2' AND RowName='#{air_loop_info[:name].to_s.upcase}' ")
|
|
744
731
|
air_loop_info[:area_outdoor_air_rate_m3_per_s_m2] = validate_optional(air_loop_info[:area_outdoor_air_rate_m3_per_s_m2], model, -1.0)
|
|
745
732
|
|
|
746
733
|
air_loop_info[:outdoor_air_L_per_s] = -1.0
|
|
747
|
-
unless air_loop_info[:area_outdoor_air_rate_m3_per_s_m2]
|
|
748
|
-
air_loop_info[:outdoor_air_L_per_s] = air_loop_info[:area_outdoor_air_rate_m3_per_s_m2]*air_loop_info[:total_floor_area_served]*1000
|
|
734
|
+
unless air_loop_info[:area_outdoor_air_rate_m3_per_s_m2] == -1.0
|
|
735
|
+
air_loop_info[:outdoor_air_L_per_s] = air_loop_info[:area_outdoor_air_rate_m3_per_s_m2] * air_loop_info[:total_floor_area_served] * 1000
|
|
749
736
|
end
|
|
750
|
-
#Fan
|
|
737
|
+
# Fan
|
|
751
738
|
|
|
752
739
|
unless air_loop.supplyFan.empty?
|
|
753
740
|
air_loop_info[:supply_fan] = {}
|
|
@@ -759,87 +746,89 @@ class NECB2011
|
|
|
759
746
|
fan = air_loop.supplyFan.get.to_FanVariableVolume.get
|
|
760
747
|
end
|
|
761
748
|
air_loop_info[:supply_fan][:name] = fan.name.get
|
|
762
|
-
#puts "\n\n\n\n#{fan.name.get}\n\n\n\n"
|
|
749
|
+
# puts "\n\n\n\n#{fan.name.get}\n\n\n\n"
|
|
763
750
|
air_loop_info[:supply_fan][:fan_efficiency] = fan.fanEfficiency
|
|
764
751
|
air_loop_info[:supply_fan][:motor_efficiency] = fan.motorEfficiency
|
|
765
752
|
air_loop_info[:supply_fan][:pressure_rise] = fan.pressureRise
|
|
766
753
|
air_loop_info[:supply_fan][:max_air_flow_rate_m3_per_s] = -1.0
|
|
767
754
|
|
|
768
|
-
max_air_flow_info = model.sqlFile
|
|
769
|
-
max_air_flow_info = validate_optional(max_air_flow_info, model,
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
755
|
+
max_air_flow_info = model.sqlFile.get.execAndReturnVectorOfString("SELECT RowName FROM TabularDataWithStrings WHERE ReportName='EquipmentSummary' AND ReportForString='Entire Facility' AND TableName='Fans' AND ColumnName='Max Air Flow Rate' AND Units='m3/s' ")
|
|
756
|
+
max_air_flow_info = validate_optional(max_air_flow_info, model, 'N/A')
|
|
757
|
+
if max_air_flow_info == 'N/A'
|
|
758
|
+
error_warning << "max_air_flow_info is nil because the following sql statement returned nil: RowName FROM TabularDataWithStrings WHERE ReportName='EquipmentSummary' AND ReportForString='Entire Facility' AND TableName='Fans' AND ColumnName='Max Air Flow Rate' AND Units='m3/s' "
|
|
759
|
+
else
|
|
760
|
+
if max_air_flow_info.include? air_loop_info[:supply_fan][:name].to_s.upcase.to_s
|
|
761
|
+
air_loop_info[:supply_fan][:max_air_flow_rate_m3_per_s] = model.sqlFile.get.execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='EquipmentSummary' AND ReportForString='Entire Facility' AND TableName='Fans' AND ColumnName='Max Air Flow Rate' AND Units='m3/s' AND RowName='#{air_loop_info[:supply_fan][:name].upcase}' ").get
|
|
762
|
+
air_loop_info[:supply_fan][:rated_electric_power_w] = model.sqlFile.get.execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='EquipmentSummary' AND ReportForString='Entire Facility' AND TableName='Fans' AND ColumnName='Rated Electric Power' AND Units='W' AND RowName='#{air_loop_info[:supply_fan][:name].upcase}' ")
|
|
763
|
+
# Version 3.2.0 has renamed rated electric_power to rated electricity rate
|
|
764
|
+
if air_loop_info[:supply_fan][:rated_electric_power_w].empty?
|
|
765
|
+
air_loop_info[:supply_fan][:rated_electric_power_w] = model.sqlFile.get.execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='EquipmentSummary' AND ReportForString='Entire Facility' AND TableName='Fans' AND ColumnName='Rated Electricity Rate' AND Units='W' AND RowName='#{air_loop_info[:supply_fan][:name].upcase}' ")
|
|
766
|
+
end
|
|
767
|
+
air_loop_info[:supply_fan][:rated_electric_power_w] = air_loop_info[:supply_fan][:rated_electric_power_w].get
|
|
768
|
+
else
|
|
775
769
|
error_warning << "#{air_loop_info[:supply_fan][:name]} does not exist in sql file WHERE ReportName='EquipmentSummary' AND ReportForString='Entire Facility' AND TableName='Fans' AND ColumnName='Max Air Flow Rate' AND Units='m3/s'"
|
|
776
770
|
end
|
|
777
|
-
else
|
|
778
|
-
error_warning << "max_air_flow_info is nil because the following sql statement returned nil: RowName FROM TabularDataWithStrings WHERE ReportName='EquipmentSummary' AND ReportForString='Entire Facility' AND TableName='Fans' AND ColumnName='Max Air Flow Rate' AND Units='m3/s' "
|
|
779
771
|
end
|
|
780
772
|
end
|
|
781
773
|
|
|
782
|
-
#economizer
|
|
774
|
+
# economizer
|
|
783
775
|
air_loop_info[:economizer] = {}
|
|
784
|
-
air_loop_info[:economizer][:name] = air_loop.airLoopHVACOutdoorAirSystem.get.getControllerOutdoorAir.name.get
|
|
785
|
-
air_loop_info[:economizer][:control_type] = air_loop.airLoopHVACOutdoorAirSystem.get.getControllerOutdoorAir.getEconomizerControlType
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
air_loop_info[:cooling_coils] =
|
|
789
|
-
air_loop_info[:cooling_coils][:
|
|
790
|
-
air_loop_info[:cooling_coils][:
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
#Heating Coil
|
|
776
|
+
air_loop_info[:economizer][:name] = air_loop.airLoopHVACOutdoorAirSystem.get.getControllerOutdoorAir.name.get unless air_loop.airLoopHVACOutdoorAirSystem.empty? or air_loop.airLoopHVACOutdoorAirSystem.get.getControllerOutdoorAir.name.empty?
|
|
777
|
+
air_loop_info[:economizer][:control_type] = air_loop.airLoopHVACOutdoorAirSystem.get.getControllerOutdoorAir.getEconomizerControlType unless air_loop.airLoopHVACOutdoorAirSystem.empty?
|
|
778
|
+
# DX cooling coils
|
|
779
|
+
air_loop_info[:cooling_coils] = {}
|
|
780
|
+
air_loop_info[:cooling_coils][:dx_single_speed] = []
|
|
781
|
+
air_loop_info[:cooling_coils][:dx_two_speed] = []
|
|
782
|
+
air_loop_info[:cooling_coils][:coil_cooling_water] = []
|
|
783
|
+
|
|
784
|
+
# Heating Coil
|
|
794
785
|
air_loop_info[:heating_coils] = {}
|
|
795
786
|
air_loop_info[:heating_coils][:coil_heating_gas] = []
|
|
796
|
-
air_loop_info[:heating_coils][:coil_heating_electric]= []
|
|
797
|
-
air_loop_info[:heating_coils][:coil_heating_water]= []
|
|
787
|
+
air_loop_info[:heating_coils][:coil_heating_electric] = []
|
|
788
|
+
air_loop_info[:heating_coils][:coil_heating_water] = []
|
|
798
789
|
|
|
799
|
-
#Heat Excahnger
|
|
790
|
+
# Heat Excahnger
|
|
800
791
|
air_loop_info[:heat_exchanger] = {}
|
|
801
792
|
|
|
802
793
|
air_loop.supplyComponents.each do |supply_comp|
|
|
803
794
|
if supply_comp.to_CoilHeatingGas.is_initialized
|
|
804
|
-
coil={}
|
|
795
|
+
coil = {}
|
|
805
796
|
air_loop_info[:heating_coils][:coil_heating_gas] << coil
|
|
806
797
|
gas = supply_comp.to_CoilHeatingGas.get
|
|
807
|
-
coil[:name]=gas.name.get
|
|
808
|
-
coil[:type]=
|
|
798
|
+
coil[:name] = gas.name.get
|
|
799
|
+
coil[:type] = 'Gas'
|
|
809
800
|
coil[:efficency] = gas.gasBurnerEfficiency
|
|
810
|
-
#coil[:nominal_capacity]= gas.nominalCapacity()
|
|
811
|
-
coil[:nominal_capacity]= model.sqlFile
|
|
812
|
-
coil[:nominal_capacity]=validate_optional(coil[:nominal_capacity], model, -1.0)
|
|
801
|
+
# coil[:nominal_capacity]= gas.nominalCapacity()
|
|
802
|
+
coil[:nominal_capacity] = model.sqlFile.get.execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='EquipmentSummary' AND ReportForString='Entire Facility' AND TableName='Heating Coils' AND ColumnName='Nominal Total Capacity' AND RowName='#{coil[:name].to_s.upcase}'")
|
|
803
|
+
coil[:nominal_capacity] = validate_optional(coil[:nominal_capacity], model, -1.0)
|
|
813
804
|
end
|
|
814
805
|
if supply_comp.to_CoilHeatingElectric.is_initialized
|
|
815
|
-
coil={}
|
|
806
|
+
coil = {}
|
|
816
807
|
air_loop_info[:heating_coils][:coil_heating_electric] << coil
|
|
817
808
|
electric = supply_comp.to_CoilHeatingElectric.get
|
|
818
|
-
coil[:name]= electric.name.get
|
|
819
|
-
coil[:type]=
|
|
820
|
-
coil[:nominal_capacity]= model.sqlFile
|
|
821
|
-
coil[:nominal_capacity]=validate_optional(coil[:nominal_capacity], model, -1.0)
|
|
809
|
+
coil[:name] = electric.name.get
|
|
810
|
+
coil[:type] = 'Electric'
|
|
811
|
+
coil[:nominal_capacity] = model.sqlFile.get.execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='EquipmentSummary' AND ReportForString='Entire Facility' AND TableName='Heating Coils' AND ColumnName='Nominal Total Capacity' AND RowName='#{coil[:name].to_s.upcase}'")
|
|
812
|
+
coil[:nominal_capacity] = validate_optional(coil[:nominal_capacity], model, -1.0)
|
|
822
813
|
end
|
|
823
814
|
if supply_comp.to_CoilHeatingWater.is_initialized
|
|
824
|
-
coil={}
|
|
815
|
+
coil = {}
|
|
825
816
|
air_loop_info[:heating_coils][:coil_heating_water] << coil
|
|
826
817
|
water = supply_comp.to_CoilHeatingWater.get
|
|
827
|
-
coil[:name]= water.name.get
|
|
828
|
-
coil[:type]=
|
|
829
|
-
coil[:nominal_capacity]= model.sqlFile
|
|
830
|
-
coil[:nominal_capacity]=validate_optional(coil[:nominal_capacity], model, -1.0)
|
|
818
|
+
coil[:name] = water.name.get
|
|
819
|
+
coil[:type] = 'Water'
|
|
820
|
+
coil[:nominal_capacity] = model.sqlFile.get.execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='EquipmentSummary' AND ReportForString='Entire Facility' AND TableName='Heating Coils' AND ColumnName='Nominal Total Capacity' AND RowName='#{coil[:name].to_s.upcase}'")
|
|
821
|
+
coil[:nominal_capacity] = validate_optional(coil[:nominal_capacity], model, -1.0)
|
|
831
822
|
end
|
|
832
823
|
if supply_comp.to_HeatExchangerAirToAirSensibleAndLatent.is_initialized
|
|
833
824
|
heatExchanger = supply_comp.to_HeatExchangerAirToAirSensibleAndLatent.get
|
|
834
825
|
air_loop_info[:heat_exchanger][:name] = heatExchanger.name.get
|
|
835
826
|
end
|
|
836
827
|
end
|
|
828
|
+
# I dont think i need to get the type of heating coil from the sql file, because the coils are differentiated by class, and I have hard coded the information
|
|
829
|
+
# model.sqlFile().get().execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='EquipmentSummary' AND ReportForString='Entire Facility' AND TableName= 'Heating Coils' AND ColumnName='Type' ").get #padmussen to complete #AND RowName='#{air_loop_info[:heating_coils][:name].upcase}'
|
|
837
830
|
|
|
838
|
-
#
|
|
839
|
-
#model.sqlFile().get().execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='EquipmentSummary' AND ReportForString='Entire Facility' AND TableName= 'Heating Coils' AND ColumnName='Type' ").get #padmussen to complete #AND RowName='#{air_loop_info[:heating_coils][:name].upcase}'
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
#Collect all the fans into the the array.
|
|
831
|
+
# Collect all the fans into the the array.
|
|
843
832
|
air_loop.supplyComponents.each do |supply_comp|
|
|
844
833
|
if supply_comp.to_CoilCoolingDXSingleSpeed.is_initialized
|
|
845
834
|
coil = {}
|
|
@@ -874,7 +863,6 @@ class NECB2011
|
|
|
874
863
|
qaqc[:air_loops] << air_loop_info
|
|
875
864
|
end
|
|
876
865
|
|
|
877
|
-
|
|
878
866
|
qaqc[:plant_loops] = []
|
|
879
867
|
model.getPlantLoops.sort.each do |plant_loop|
|
|
880
868
|
plant_loop_info = {}
|
|
@@ -885,42 +873,41 @@ class NECB2011
|
|
|
885
873
|
plant_loop_info[:design_loop_exit_temperature] = sizing.designLoopExitTemperature
|
|
886
874
|
plant_loop_info[:loop_design_temperature_difference] = sizing.loopDesignTemperatureDifference
|
|
887
875
|
|
|
888
|
-
#Create Container for plant equipment arrays.
|
|
876
|
+
# Create Container for plant equipment arrays.
|
|
889
877
|
plant_loop_info[:pumps] = []
|
|
890
878
|
plant_loop_info[:boilers] = []
|
|
891
879
|
plant_loop_info[:chiller_electric_eir] = []
|
|
892
880
|
plant_loop_info[:cooling_tower_single_speed] = []
|
|
893
|
-
plant_loop_info[:water_heater_mixed] =[]
|
|
881
|
+
plant_loop_info[:water_heater_mixed] = []
|
|
894
882
|
plant_loop.supplyComponents.each do |supply_comp|
|
|
895
|
-
|
|
896
|
-
#Collect Constant Speed
|
|
883
|
+
# Collect Constant Speed
|
|
897
884
|
if supply_comp.to_PumpConstantSpeed.is_initialized
|
|
898
885
|
pump = supply_comp.to_PumpConstantSpeed.get
|
|
899
886
|
pump_info = {}
|
|
900
887
|
plant_loop_info[:pumps] << pump_info
|
|
901
888
|
pump_info[:name] = pump.name.get
|
|
902
|
-
pump_info[:type] =
|
|
903
|
-
pump_info[:head_pa] = model.sqlFile
|
|
889
|
+
pump_info[:type] = 'Pump:ConstantSpeed'
|
|
890
|
+
pump_info[:head_pa] = model.sqlFile.get.execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='EquipmentSummary' AND ReportForString='Entire Facility' AND TableName='Pumps' AND ColumnName='Head' AND RowName='#{pump_info[:name].upcase}' ")
|
|
904
891
|
pump_info[:head_pa] = validate_optional(pump_info[:head_pa], model, -1.0)
|
|
905
|
-
pump_info[:water_flow_m3_per_s] = model.sqlFile
|
|
892
|
+
pump_info[:water_flow_m3_per_s] = model.sqlFile.get.execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='EquipmentSummary' AND ReportForString='Entire Facility' AND TableName='Pumps' AND ColumnName='Water Flow' AND RowName='#{pump_info[:name].upcase}' ")
|
|
906
893
|
pump_info[:water_flow_m3_per_s] = validate_optional(pump_info[:water_flow_m3_per_s], model, -1.0)
|
|
907
|
-
pump_info[:electric_power_w] = model.sqlFile
|
|
894
|
+
pump_info[:electric_power_w] = model.sqlFile.get.execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='EquipmentSummary' AND ReportForString='Entire Facility' AND TableName='Pumps' AND ColumnName='Electric Power' AND RowName='#{pump_info[:name].upcase}' ")
|
|
908
895
|
pump_info[:electric_power_w] = validate_optional(pump_info[:electric_power_w], model, -1.0)
|
|
909
896
|
pump_info[:motor_efficency] = pump.motorEfficiency
|
|
910
897
|
end
|
|
911
898
|
|
|
912
|
-
#Collect Variable Speed
|
|
899
|
+
# Collect Variable Speed
|
|
913
900
|
if supply_comp.to_PumpVariableSpeed.is_initialized
|
|
914
901
|
pump = supply_comp.to_PumpVariableSpeed.get
|
|
915
902
|
pump_info = {}
|
|
916
903
|
plant_loop_info[:pumps] << pump_info
|
|
917
904
|
pump_info[:name] = pump.name.get
|
|
918
|
-
pump_info[:type] =
|
|
919
|
-
pump_info[:head_pa] = model.sqlFile
|
|
905
|
+
pump_info[:type] = 'Pump:VariableSpeed'
|
|
906
|
+
pump_info[:head_pa] = model.sqlFile.get.execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='EquipmentSummary' AND ReportForString='Entire Facility' AND TableName='Pumps' AND ColumnName='Head' AND RowName='#{pump_info[:name].upcase}' ")
|
|
920
907
|
pump_info[:head_pa] = validate_optional(pump_info[:head_pa], model, -1.0)
|
|
921
|
-
pump_info[:water_flow_m3_per_s] = model.sqlFile
|
|
908
|
+
pump_info[:water_flow_m3_per_s] = model.sqlFile.get.execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='EquipmentSummary' AND ReportForString='Entire Facility' AND TableName='Pumps' AND ColumnName='Water Flow' AND RowName='#{pump_info[:name].upcase}' ")
|
|
922
909
|
pump_info[:water_flow_m3_per_s] = validate_optional(pump_info[:water_flow_m3_per_s], model, -1.0)
|
|
923
|
-
pump_info[:electric_power_w] = model.sqlFile
|
|
910
|
+
pump_info[:electric_power_w] = model.sqlFile.get.execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='EquipmentSummary' AND ReportForString='Entire Facility' AND TableName='Pumps' AND ColumnName='Electric Power' AND RowName='#{pump_info[:name].upcase}' ")
|
|
924
911
|
pump_info[:electric_power_w] = validate_optional(pump_info[:electric_power_w], model, -1.0)
|
|
925
912
|
pump_info[:motor_efficency] = pump.motorEfficiency
|
|
926
913
|
end
|
|
@@ -931,7 +918,7 @@ class NECB2011
|
|
|
931
918
|
boiler_info = {}
|
|
932
919
|
plant_loop_info[:boilers] << boiler_info
|
|
933
920
|
boiler_info[:name] = boiler.name.get
|
|
934
|
-
boiler_info[:type] =
|
|
921
|
+
boiler_info[:type] = 'Boiler:HotWater'
|
|
935
922
|
boiler_info[:fueltype] = boiler.fuelType
|
|
936
923
|
boiler_info[:nominal_capacity] = boiler.nominalCapacity
|
|
937
924
|
boiler_info[:nominal_capacity] = validate_optional(boiler_info[:nominal_capacity], model, -1.0)
|
|
@@ -943,9 +930,9 @@ class NECB2011
|
|
|
943
930
|
chiller_info = {}
|
|
944
931
|
plant_loop_info[:chiller_electric_eir] << chiller_info
|
|
945
932
|
chiller_info[:name] = chiller.name.get
|
|
946
|
-
chiller_info[:type] =
|
|
933
|
+
chiller_info[:type] = 'Chiller:Electric:EIR'
|
|
947
934
|
chiller_info[:reference_capacity] = validate_optional(chiller.referenceCapacity, model, -1.0)
|
|
948
|
-
chiller_info[:reference_leaving_chilled_water_temperature] =chiller.referenceLeavingChilledWaterTemperature
|
|
935
|
+
chiller_info[:reference_leaving_chilled_water_temperature] = chiller.referenceLeavingChilledWaterTemperature
|
|
949
936
|
end
|
|
950
937
|
|
|
951
938
|
# Collect CoolingTowerSingleSpeed
|
|
@@ -954,7 +941,7 @@ class NECB2011
|
|
|
954
941
|
coolingTower_info = {}
|
|
955
942
|
plant_loop_info[:cooling_tower_single_speed] << coolingTower_info
|
|
956
943
|
coolingTower_info[:name] = coolingTower.name.get
|
|
957
|
-
coolingTower_info[:type] =
|
|
944
|
+
coolingTower_info[:type] = 'CoolingTower:SingleSpeed'
|
|
958
945
|
coolingTower_info[:fan_power_at_design_air_flow_rate] = validate_optional(coolingTower.fanPoweratDesignAirFlowRate, model, -1.0)
|
|
959
946
|
|
|
960
947
|
end
|
|
@@ -965,19 +952,19 @@ class NECB2011
|
|
|
965
952
|
waterHeaterMixed_info = {}
|
|
966
953
|
plant_loop_info[:water_heater_mixed] << waterHeaterMixed_info
|
|
967
954
|
waterHeaterMixed_info[:name] = waterHeaterMixed.name.get
|
|
968
|
-
waterHeaterMixed_info[:type] =
|
|
955
|
+
waterHeaterMixed_info[:type] = 'WaterHeater:Mixed'
|
|
969
956
|
waterHeaterMixed_info[:heater_thermal_efficiency] = waterHeaterMixed.heaterThermalEfficiency.get unless waterHeaterMixed.heaterThermalEfficiency.empty?
|
|
970
957
|
waterHeaterMixed_info[:heater_fuel_type] = waterHeaterMixed.heaterFuelType
|
|
971
958
|
end
|
|
972
959
|
end
|
|
973
960
|
|
|
974
|
-
qaqc[:eplusout_err] ={}
|
|
975
|
-
warnings = model.sqlFile
|
|
976
|
-
warnings = validate_optional(warnings, model,
|
|
977
|
-
unless warnings ==
|
|
978
|
-
qaqc[:eplusout_err][:warnings] = model.sqlFile
|
|
979
|
-
qaqc[:eplusout_err][:fatal] =model.sqlFile
|
|
980
|
-
qaqc[:eplusout_err][:severe] =model.sqlFile
|
|
961
|
+
qaqc[:eplusout_err] = {}
|
|
962
|
+
warnings = model.sqlFile.get.execAndReturnVectorOfString("SELECT ErrorMessage FROM Errors WHERE ErrorType='0' ")
|
|
963
|
+
warnings = validate_optional(warnings, model, 'N/A')
|
|
964
|
+
unless warnings == 'N/A'
|
|
965
|
+
qaqc[:eplusout_err][:warnings] = model.sqlFile.get.execAndReturnVectorOfString("SELECT ErrorMessage FROM Errors WHERE ErrorType='0' ").get
|
|
966
|
+
qaqc[:eplusout_err][:fatal] = model.sqlFile.get.execAndReturnVectorOfString("SELECT ErrorMessage FROM Errors WHERE ErrorType='2' ").get
|
|
967
|
+
qaqc[:eplusout_err][:severe] = model.sqlFile.get.execAndReturnVectorOfString("SELECT ErrorMessage FROM Errors WHERE ErrorType='1' ").get
|
|
981
968
|
end
|
|
982
969
|
|
|
983
970
|
qaqc[:ruby_warnings] = error_warning
|
|
@@ -988,18 +975,21 @@ class NECB2011
|
|
|
988
975
|
qaqc[:code_metrics]['cooling_gj'] = qaqc[:end_uses]['cooling_gj']
|
|
989
976
|
qaqc[:code_metrics][:ep_conditioned_floor_area_m2] = qaqc[:building][:conditioned_floor_area_m2]
|
|
990
977
|
qaqc[:code_metrics][:os_conditioned_floor_area_m2] = qaqc[:envelope][:interior_floors_area_m2] +
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
#TEDI
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
978
|
+
qaqc[:envelope][:outdoor_floors_area_m2] +
|
|
979
|
+
qaqc[:envelope][:ground_floors_area_m2]
|
|
980
|
+
# TEDI
|
|
981
|
+
unless qaqc[:building][:conditioned_floor_area_m2].nil?
|
|
982
|
+
qaqc[:code_metrics][:building_tedi_gj_per_m2] = (qaqc[:end_uses]['heating_gj'] + qaqc[:end_uses]['cooling_gj']
|
|
983
|
+
) / qaqc[:building][:conditioned_floor_area_m2]
|
|
984
|
+
# Mech TEDI?
|
|
985
|
+
qaqc[:code_metrics][:building_medi_gj_per_m2] = (qaqc[:end_uses]['fans_gj'] +
|
|
986
|
+
qaqc[:end_uses]['pumps_gj'] +
|
|
987
|
+
qaqc[:end_uses]['heat_rejection_gj'] +
|
|
988
|
+
qaqc[:end_uses]['humidification_gj'] +
|
|
989
|
+
qaqc[:end_uses]['heat_recovery_gj']
|
|
990
|
+
) / qaqc[:building][:conditioned_floor_area_m2]
|
|
991
|
+
end
|
|
992
|
+
|
|
1003
993
|
|
|
1004
994
|
return qaqc
|
|
1005
995
|
end
|
|
@@ -1009,47 +999,48 @@ class NECB2011
|
|
|
1009
999
|
qaqc[:sanity_check] = {}
|
|
1010
1000
|
qaqc[:sanity_check][:fail] = []
|
|
1011
1001
|
qaqc[:sanity_check][:pass] = []
|
|
1012
|
-
#Padmassun's code for isConditioned start
|
|
1002
|
+
# Padmassun's code for isConditioned start
|
|
1013
1003
|
qaqc[:thermal_zones].each do |zoneinfo|
|
|
1014
1004
|
zoneinfo[:spaces].each do |space|
|
|
1015
|
-
#skip plenums and undefined spaces/zones
|
|
1016
|
-
if zoneinfo[:name].to_s.include?
|
|
1005
|
+
# skip plenums and undefined spaces/zones
|
|
1006
|
+
if zoneinfo[:name].to_s.include? '- undefined -'
|
|
1017
1007
|
next
|
|
1018
1008
|
end
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1009
|
+
|
|
1010
|
+
if zoneinfo[:space_type_name].to_s.include? 'Space Function - undefined -'
|
|
1011
|
+
if zoneinfo[:is_conditioned].to_s == 'No'
|
|
1012
|
+
qaqc[:sanity_check][:pass] << "[TEST-PASS][SANITY_CHECK-PASS] for [SPACE][#{space[:name]}] and [THERMAL ZONE] [#{zoneinfo[:name]}] where isConditioned is supposed to be [" 'No' "] and found as #{zoneinfo[:is_conditioned]}"
|
|
1022
1013
|
else
|
|
1023
|
-
qaqc[:sanity_check][:fail] << "[ERROR][SANITY_CHECK-FAIL] for [SPACE][#{space[:name]}] and [THERMAL ZONE] [#{zoneinfo[:name]}] where isConditioned is supposed to be ["
|
|
1014
|
+
qaqc[:sanity_check][:fail] << "[ERROR][SANITY_CHECK-FAIL] for [SPACE][#{space[:name]}] and [THERMAL ZONE] [#{zoneinfo[:name]}] where isConditioned is supposed to be [" 'No' "] but found as #{zoneinfo[:is_conditioned]}"
|
|
1024
1015
|
end
|
|
1025
1016
|
else
|
|
1026
|
-
if zoneinfo[:is_conditioned].to_s ==
|
|
1027
|
-
qaqc[:sanity_check][:pass] << "[TEST-PASS][SANITY_CHECK-PASS] for [SPACE][#{space[:name]}] and [THERMAL ZONE] [#{zoneinfo[:name]}] where isConditioned is supposed to be ["
|
|
1017
|
+
if zoneinfo[:is_conditioned].to_s == 'Yes'
|
|
1018
|
+
qaqc[:sanity_check][:pass] << "[TEST-PASS][SANITY_CHECK-PASS] for [SPACE][#{space[:name]}] and [THERMAL ZONE] [#{zoneinfo[:name]}] where isConditioned is supposed to be [" 'Yes' "] and found as #{zoneinfo[:is_conditioned]}"
|
|
1028
1019
|
elsif zoneinfo[:name]
|
|
1029
|
-
qaqc[:sanity_check][:fail] << "[ERROR][SANITY_CHECK-FAIL] for [SPACE][#{space[:name]}] and [THERMAL ZONE] [#{zoneinfo[:name]}] where isConditioned is supposed to be ["
|
|
1020
|
+
qaqc[:sanity_check][:fail] << "[ERROR][SANITY_CHECK-FAIL] for [SPACE][#{space[:name]}] and [THERMAL ZONE] [#{zoneinfo[:name]}] where isConditioned is supposed to be [" 'Yes' "] but found as #{zoneinfo[:is_conditioned]}"
|
|
1030
1021
|
end
|
|
1031
1022
|
end
|
|
1032
1023
|
end
|
|
1033
1024
|
end
|
|
1034
1025
|
qaqc[:sanity_check][:fail] = qaqc[:sanity_check][:fail].sort
|
|
1035
1026
|
qaqc[:sanity_check][:pass] = qaqc[:sanity_check][:pass].sort
|
|
1036
|
-
#Padmassun's code for isConditioned end
|
|
1027
|
+
# Padmassun's code for isConditioned end
|
|
1037
1028
|
end
|
|
1038
1029
|
|
|
1039
1030
|
# checks the pump power using pressure, and flowrate
|
|
1040
1031
|
def necb_plantloop_sanity(qaqc)
|
|
1041
|
-
necb_section_name =
|
|
1032
|
+
necb_section_name = 'SANITY-??'
|
|
1042
1033
|
qaqc[:plant_loops].each do |plant_loop_info|
|
|
1043
1034
|
pump_head = plant_loop_info[:pumps][0][:head_pa]
|
|
1044
|
-
flow_rate = plant_loop_info[:pumps][0][:water_flow_m3_per_s]*1000
|
|
1045
|
-
hp_check = ((flow_rate*60*60)/1000*1000*9.81*pump_head*0.000101997)/3600000
|
|
1035
|
+
flow_rate = plant_loop_info[:pumps][0][:water_flow_m3_per_s] * 1000
|
|
1036
|
+
hp_check = ((flow_rate * 60 * 60) / 1000 * 1000 * 9.81 * pump_head * 0.000101997) / 3600000
|
|
1046
1037
|
puts "\npump_head #{pump_head}"
|
|
1047
1038
|
puts "name: #{qaqc[:building][:name]}"
|
|
1048
1039
|
puts "name: #{plant_loop_info[:name]}"
|
|
1049
1040
|
puts "flow_rate #{flow_rate}"
|
|
1050
1041
|
puts "hp_check #{hp_check}\n"
|
|
1051
|
-
pump_power_hp = plant_loop_info[:pumps][0][:electric_power_w]/1000*0.746
|
|
1052
|
-
percent_diff = (hp_check - pump_power_hp).to_f.abs/hp_check * 100
|
|
1042
|
+
pump_power_hp = plant_loop_info[:pumps][0][:electric_power_w] / 1000 * 0.746
|
|
1043
|
+
percent_diff = (hp_check - pump_power_hp).to_f.abs / hp_check * 100
|
|
1053
1044
|
|
|
1054
1045
|
if percent_diff.nan?
|
|
1055
1046
|
qaqc[:ruby_warnings] << "(hp_check - pump_power_hp).to_f.abs/hp_check * 100 for #{plant_loop_info[:name]} is NaN"
|
|
@@ -1062,12 +1053,12 @@ class NECB2011
|
|
|
1062
1053
|
end
|
|
1063
1054
|
|
|
1064
1055
|
necb_section_test(
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1056
|
+
qaqc,
|
|
1057
|
+
percent_diff,
|
|
1058
|
+
'<=',
|
|
1059
|
+
20, # diff of 20%
|
|
1060
|
+
necb_section_name,
|
|
1061
|
+
"[PLANT LOOP][#{plant_loop_info[:name]}][:pumps][0][:electric_power_hp] [#{pump_power_hp}]; NECB value [#{hp_check}]; Percent Diff"
|
|
1071
1062
|
)
|
|
1072
1063
|
end
|
|
1073
1064
|
end
|
|
@@ -1077,50 +1068,51 @@ class NECB2011
|
|
|
1077
1068
|
|
|
1078
1069
|
def necb_space_compliance(qaqc)
|
|
1079
1070
|
# #Padmassun's Code Start
|
|
1080
|
-
#csv_file_name ="#{File.dirname(__FILE__)}/necb_2011_spacetype_info.csv"
|
|
1071
|
+
# csv_file_name ="#{File.dirname(__FILE__)}/necb_2011_spacetype_info.csv"
|
|
1081
1072
|
qaqc[:spaces].each do |space|
|
|
1082
|
-
building_type =
|
|
1083
|
-
space_type =
|
|
1073
|
+
building_type = ''
|
|
1074
|
+
space_type = ''
|
|
1084
1075
|
if space[:space_type_name].include? 'Space Function '
|
|
1085
|
-
space_type =
|
|
1076
|
+
space_type = space[:space_type_name].to_s.rpartition('Space Function ')[2].strip
|
|
1086
1077
|
building_type = 'Space Function'
|
|
1087
1078
|
elsif space[:space_type_name].include? ' WholeBuilding'
|
|
1088
|
-
space_type =
|
|
1079
|
+
space_type = space[:space_type_name].to_s.rpartition(' WholeBuilding')[0].strip
|
|
1089
1080
|
building_type = 'WholeBuilding'
|
|
1090
1081
|
end
|
|
1091
1082
|
|
|
1092
|
-
[
|
|
1093
|
-
qaqc_table = get_qaqc_table(table_name:
|
|
1083
|
+
['lighting_per_area_w_per_m2', 'occupancy_per_area_people_per_m2', 'occupancy_schedule', 'electric_equipment_per_area_w_per_m2'].each do |compliance_var|
|
|
1084
|
+
qaqc_table = get_qaqc_table(table_name: 'space_compliance', search_criteria: { 'building_type' => building_type, 'space_type' => space_type }).first
|
|
1094
1085
|
puts "\n#{qaqc_table}\n"
|
|
1095
|
-
necb_section_name = get_qaqc_table(table_name:
|
|
1096
|
-
tolerance = get_qaqc_table(table_name:
|
|
1086
|
+
necb_section_name = get_qaqc_table(table_name: 'space_compliance')['refs'][compliance_var]
|
|
1087
|
+
tolerance = get_qaqc_table(table_name: 'space_compliance')['tolerance'][compliance_var]
|
|
1097
1088
|
# puts "\ncompliance_var:#{compliance_var}\n\tnecb_section_name:#{necb_section_name}\n\texp Value:#{qaqc_table[compliance_var]}\n"
|
|
1098
|
-
if compliance_var ==
|
|
1099
|
-
|
|
1100
|
-
result_value = space[:lighting_w_per_m2] * qaqc_table['lpd_ratio']
|
|
1101
|
-
else
|
|
1089
|
+
if compliance_var == 'lighting_per_area_w_per_m2'
|
|
1090
|
+
if space[:lighting_w_per_m2].nil?
|
|
1102
1091
|
result_value = 0
|
|
1092
|
+
else
|
|
1093
|
+
result_value = space[:lighting_w_per_m2] * qaqc_table['lpd_ratio']
|
|
1103
1094
|
end
|
|
1104
|
-
elsif compliance_var ==
|
|
1095
|
+
elsif compliance_var == 'occupancy_per_area_people_per_m2'
|
|
1105
1096
|
result_value = space[:occ_per_m2]
|
|
1106
|
-
elsif compliance_var ==
|
|
1097
|
+
elsif compliance_var == 'occupancy_schedule'
|
|
1107
1098
|
result_value = space[:occupancy_schedule]
|
|
1108
|
-
elsif compliance_var ==
|
|
1099
|
+
elsif compliance_var == 'electric_equipment_per_area_w_per_m2'
|
|
1109
1100
|
result_value = space[:electric_w_per_m2]
|
|
1110
1101
|
end
|
|
1111
1102
|
|
|
1112
1103
|
test_text = "[SPACE][#{space[:name]}]-[TYPE:][#{space_type}]-#{compliance_var}"
|
|
1113
1104
|
next if result_value.nil?
|
|
1105
|
+
|
|
1114
1106
|
necb_section_test(
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1107
|
+
qaqc,
|
|
1108
|
+
result_value,
|
|
1109
|
+
'==',
|
|
1110
|
+
qaqc_table[compliance_var],
|
|
1111
|
+
necb_section_name,
|
|
1112
|
+
test_text,
|
|
1113
|
+
tolerance
|
|
1122
1114
|
)
|
|
1123
|
-
|
|
1115
|
+
end
|
|
1124
1116
|
|
|
1125
1117
|
# row = look_up_csv_data(csv_file_name,{2 => space_type, 1 => building_type})
|
|
1126
1118
|
# if row.nil?
|
|
@@ -1129,20 +1121,20 @@ class NECB2011
|
|
|
1129
1121
|
# puts "space type of [#{space_type}] and/or building type of [#{building_type}] was not found in the excel sheet for space: [#{space[:name]}]"
|
|
1130
1122
|
# else
|
|
1131
1123
|
# #correct the data from the csv file to include a multiplier of 0.9 for specific space types.
|
|
1132
|
-
|
|
1124
|
+
|
|
1133
1125
|
# reduceLPDSpaces = ["Classroom/lecture/training", "Conf./meet./multi-purpose", "Lounge/recreation",
|
|
1134
|
-
# "Washroom-sch-A", "Washroom-sch-B", "Washroom-sch-C", "Washroom-sch-D", "Washroom-sch-E",
|
|
1135
|
-
# "Washroom-sch-F", "Washroom-sch-G", "Washroom-sch-H", "Washroom-sch-I", "Dress./fitt. - performance arts",
|
|
1126
|
+
# "Washroom-sch-A", "Washroom-sch-B", "Washroom-sch-C", "Washroom-sch-D", "Washroom-sch-E",
|
|
1127
|
+
# "Washroom-sch-F", "Washroom-sch-G", "Washroom-sch-H", "Washroom-sch-I", "Dress./fitt. - performance arts",
|
|
1136
1128
|
# "Locker room", "Retail - dressing/fitting","Locker room-sch-A","Locker room-sch-B","Locker room-sch-C",
|
|
1137
1129
|
# "Locker room-sch-D","Locker room-sch-E","Locker room-sch-F","Locker room-sch-G","Locker room-sch-H",
|
|
1138
1130
|
# "Locker room-sch-I", "Office - open plan - occsens", "Office - enclosed - occsens", "Storage area - occsens",
|
|
1139
1131
|
# "Hospital - medical supply - occsens", "Storage area - refrigerated - occsens"]
|
|
1140
|
-
|
|
1132
|
+
|
|
1141
1133
|
# if reduceLPDSpaces.include?(space_type)
|
|
1142
1134
|
# row[3] = row[3]*0.9
|
|
1143
1135
|
# puts "\n============================\nspace_type: #{space_type}\n============================\n"
|
|
1144
1136
|
# end
|
|
1145
|
-
|
|
1137
|
+
|
|
1146
1138
|
# # Start of Space Compliance
|
|
1147
1139
|
# necb_section_name = "NECB2011-Section 8.4.3.6"
|
|
1148
1140
|
# data = {}
|
|
@@ -1164,46 +1156,47 @@ class NECB2011
|
|
|
1164
1156
|
# end
|
|
1165
1157
|
# end#space Compliance
|
|
1166
1158
|
end
|
|
1167
|
-
#Padmassun's Code End
|
|
1159
|
+
# Padmassun's Code End
|
|
1168
1160
|
end
|
|
1169
1161
|
|
|
1170
1162
|
# checks envelope compliance
|
|
1171
1163
|
# fenestration_to_door_and_window_percentage, skylight_to_roof_percentage
|
|
1172
1164
|
def necb_envelope_compliance(qaqc)
|
|
1173
1165
|
# Envelope
|
|
1174
|
-
necb_section_name =
|
|
1175
|
-
#store hdd in short form
|
|
1166
|
+
necb_section_name = 'NECB2011-Section 3.2.1.4'
|
|
1167
|
+
# store hdd in short form
|
|
1176
1168
|
hdd = qaqc[:geography][:hdd]
|
|
1177
|
-
#calculate fdwr based on hdd.
|
|
1169
|
+
# calculate fdwr based on hdd.
|
|
1178
1170
|
fdwr = 0
|
|
1179
1171
|
if hdd < 4000
|
|
1180
1172
|
fdwr = 0.40
|
|
1181
|
-
elsif hdd >= 4000
|
|
1182
|
-
fdwr = (2000-0.2 * hdd)/3000
|
|
1183
|
-
elsif hdd >7000
|
|
1173
|
+
elsif (hdd >= 4000) && (hdd <= 7000)
|
|
1174
|
+
fdwr = (2000 - 0.2 * hdd) / 3000
|
|
1175
|
+
elsif hdd > 7000
|
|
1184
1176
|
fdwr = 0.20
|
|
1185
1177
|
end
|
|
1186
|
-
#hardset srr to 0.05
|
|
1178
|
+
# hardset srr to 0.05
|
|
1187
1179
|
srr = 0.05
|
|
1188
|
-
#create table of expected values and results.
|
|
1180
|
+
# create table of expected values and results.
|
|
1189
1181
|
data = {}
|
|
1190
1182
|
data[:fenestration_to_door_and_window_percentage] = [fdwr * 100, qaqc[:envelope][:fdwr].round(3)]
|
|
1191
1183
|
data[:skylight_to_roof_percentage] = [srr * 100, qaqc[:envelope][:srr].round(3)]
|
|
1192
|
-
#perform test. result must be less than or equal to.
|
|
1193
|
-
data.each
|
|
1184
|
+
# perform test. result must be less than or equal to.
|
|
1185
|
+
data.each do |key, value|
|
|
1186
|
+
necb_section_test(
|
|
1194
1187
|
qaqc,
|
|
1195
1188
|
value[0],
|
|
1196
1189
|
'>=',
|
|
1197
1190
|
value[1],
|
|
1198
1191
|
necb_section_name,
|
|
1199
1192
|
"[ENVELOPE]#{key}",
|
|
1200
|
-
1 #padmassun added tollerance
|
|
1201
|
-
|
|
1202
|
-
|
|
1193
|
+
1 # padmassun added tollerance
|
|
1194
|
+
)
|
|
1195
|
+
end
|
|
1203
1196
|
end
|
|
1204
1197
|
|
|
1205
1198
|
def necb_infiltration_compliance(qaqc, model)
|
|
1206
|
-
#Infiltration
|
|
1199
|
+
# Infiltration
|
|
1207
1200
|
# puts "\n"
|
|
1208
1201
|
# puts get_qaqc_table("infiltration_compliance")
|
|
1209
1202
|
# puts "\n"
|
|
@@ -1211,19 +1204,22 @@ class NECB2011
|
|
|
1211
1204
|
# puts get_qaqc_table("infiltration_compliance", {"var" => ":infiltration_method"} )
|
|
1212
1205
|
# puts "\n"
|
|
1213
1206
|
# puts "\n"
|
|
1214
|
-
infiltration_compliance = get_qaqc_table(table_name:
|
|
1215
|
-
necb_section_name = get_qaqc_table(table_name:
|
|
1207
|
+
infiltration_compliance = get_qaqc_table(table_name: 'infiltration_compliance')['table']
|
|
1208
|
+
necb_section_name = get_qaqc_table(table_name: 'infiltration_compliance')['refs'].join(',')
|
|
1216
1209
|
qaqc[:spaces].each do |spaceinfo|
|
|
1217
1210
|
model.getSpaces.sort.each do |space|
|
|
1218
1211
|
next unless space.name.get == spaceinfo[:name]
|
|
1212
|
+
|
|
1219
1213
|
found = false
|
|
1220
|
-
space.surfaces.each
|
|
1214
|
+
space.surfaces.each do |surface|
|
|
1221
1215
|
next unless surface.outsideBoundaryCondition == 'Outdoors'
|
|
1216
|
+
|
|
1222
1217
|
found = true
|
|
1223
1218
|
# peform this infiltration qaqc if and only if the space's surface is in contact with outdoors
|
|
1224
|
-
infiltration_compliance.each
|
|
1219
|
+
infiltration_compliance.each do |compliance|
|
|
1225
1220
|
# puts "\nspaceinfo[#{compliance['var']}]"
|
|
1226
|
-
|
|
1221
|
+
eval_string = "spaceinfo[:#{compliance['var']}]"
|
|
1222
|
+
result_value = eval(eval_string)
|
|
1227
1223
|
# puts "#{compliance['test_text']}"
|
|
1228
1224
|
test_text = "[SPACE][#{spaceinfo[:name]}]-#{compliance['var']}"
|
|
1229
1225
|
# puts "result_value: #{result_value}"
|
|
@@ -1231,62 +1227,61 @@ class NECB2011
|
|
|
1231
1227
|
# data[:infiltration_method] = [ "Flow/ExteriorArea", spaceinfo[:infiltration_method] , nil ]
|
|
1232
1228
|
# data[:infiltration_flow_per_m2] = [ 0.00025, spaceinfo[:infiltration_flow_per_m2], 5 ]
|
|
1233
1229
|
# data.each do |key,value|
|
|
1234
|
-
#puts key
|
|
1230
|
+
# puts key
|
|
1235
1231
|
necb_section_test(
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1232
|
+
qaqc,
|
|
1233
|
+
result_value,
|
|
1234
|
+
compliance['bool_operator'],
|
|
1235
|
+
compliance['expected_value'],
|
|
1236
|
+
necb_section_name,
|
|
1237
|
+
test_text,
|
|
1238
|
+
compliance['tolerance']
|
|
1243
1239
|
)
|
|
1244
|
-
|
|
1240
|
+
end
|
|
1245
1241
|
# peform qaqc only once per space
|
|
1246
1242
|
break
|
|
1247
|
-
|
|
1243
|
+
end
|
|
1248
1244
|
if !found
|
|
1249
1245
|
qaqc[:warnings] << "necb_infiltration_compliance for SPACE:[#{spaceinfo[:name]}] was skipped because it does not contain surfaces with 'Outside' boundary condition."
|
|
1250
1246
|
end
|
|
1251
1247
|
end
|
|
1252
|
-
|
|
1253
1248
|
end
|
|
1254
1249
|
end
|
|
1255
1250
|
|
|
1256
1251
|
def necb_exterior_opaque_compliance(qaqc)
|
|
1257
1252
|
# puts JSON.pretty_generate @qaqc_data
|
|
1258
1253
|
# Exterior Opaque
|
|
1259
|
-
necb_section_name = get_qaqc_table(table_name:
|
|
1260
|
-
climate_index = NECB2011.new
|
|
1254
|
+
necb_section_name = get_qaqc_table(table_name: 'exterior_opaque_compliance')['refs'].join(',')
|
|
1255
|
+
climate_index = NECB2011.new.get_climate_zone_index(qaqc[:geography][:hdd])
|
|
1261
1256
|
puts "HDD #{qaqc[:geography][:hdd]}"
|
|
1262
1257
|
tolerance = 3
|
|
1263
1258
|
# puts "\n\n"
|
|
1264
1259
|
# puts "climate_index: #{climate_index}"
|
|
1265
1260
|
# puts get_qaqc_table("exterior_opaque_compliance", {"var" => "ext_wall_conductances", "climate_index" => 2})
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
if compliance_var =="ext_wall_conductances"
|
|
1261
|
+
['ext_wall_conductances', 'ext_roof_conductances', 'ext_floor_conductances'].each do |compliance_var|
|
|
1262
|
+
qaqc_table = get_qaqc_table(table_name: 'exterior_opaque_compliance', search_criteria: { 'var' => compliance_var, 'climate_index' => climate_index }).first
|
|
1263
|
+
# puts "\n#{qaqc_table}\n"
|
|
1264
|
+
if compliance_var == 'ext_wall_conductances'
|
|
1271
1265
|
result_value = qaqc[:envelope][:outdoor_walls_average_conductance_w_per_m2_k]
|
|
1272
|
-
elsif compliance_var ==
|
|
1266
|
+
elsif compliance_var == 'ext_roof_conductances'
|
|
1273
1267
|
result_value = qaqc[:envelope][:outdoor_floors_average_conductance_w_per_m2_k]
|
|
1274
|
-
elsif compliance_var ==
|
|
1268
|
+
elsif compliance_var == 'ext_floor_conductances'
|
|
1275
1269
|
result_value = qaqc[:envelope][:outdoor_roofs_average_conductance_w_per_m2_k]
|
|
1276
1270
|
end
|
|
1277
1271
|
|
|
1278
1272
|
test_text = "[ENVELOPE] #{compliance_var}"
|
|
1279
1273
|
next if result_value.nil?
|
|
1274
|
+
|
|
1280
1275
|
necb_section_test(
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1276
|
+
qaqc,
|
|
1277
|
+
result_value,
|
|
1278
|
+
qaqc_table['bool_operator'],
|
|
1279
|
+
qaqc_table['expected_value'],
|
|
1280
|
+
necb_section_name,
|
|
1281
|
+
test_text,
|
|
1282
|
+
tolerance
|
|
1288
1283
|
)
|
|
1289
|
-
|
|
1284
|
+
end
|
|
1290
1285
|
# result_value_index = 6
|
|
1291
1286
|
# round_precision = 3
|
|
1292
1287
|
# data = {}
|
|
@@ -1307,38 +1302,39 @@ class NECB2011
|
|
|
1307
1302
|
end
|
|
1308
1303
|
|
|
1309
1304
|
def necb_exterior_fenestration_compliance(qaqc)
|
|
1310
|
-
#Exterior Fenestration
|
|
1311
|
-
necb_section_name = get_qaqc_table(table_name:
|
|
1312
|
-
climate_index = NECB2011.new
|
|
1305
|
+
# Exterior Fenestration
|
|
1306
|
+
necb_section_name = get_qaqc_table(table_name: 'exterior_fenestration_compliance')['refs'].join(',')
|
|
1307
|
+
climate_index = NECB2011.new.get_climate_zone_index(qaqc[:geography][:hdd])
|
|
1313
1308
|
tolerance = 3
|
|
1314
1309
|
# puts "\n\n"
|
|
1315
1310
|
# puts "climate_index: #{climate_index}"
|
|
1316
1311
|
# puts get_qaqc_table("exterior_fenestration_compliance", {"var" => "ext_window_conductances", "climate_index" => 2})
|
|
1317
1312
|
|
|
1318
|
-
[
|
|
1319
|
-
qaqc_table = get_qaqc_table(table_name:
|
|
1320
|
-
#puts "\n#{qaqc_table}\n"
|
|
1321
|
-
if compliance_var ==
|
|
1313
|
+
['ext_window_conductances', 'ext_door_conductances', 'ext_overhead_door_conductances', 'ext_skylight_conductances'].each do |compliance_var|
|
|
1314
|
+
qaqc_table = get_qaqc_table(table_name: 'exterior_fenestration_compliance', search_criteria: { 'var' => compliance_var, 'climate_index' => climate_index }).first
|
|
1315
|
+
# puts "\n#{qaqc_table}\n"
|
|
1316
|
+
if compliance_var == 'ext_window_conductances'
|
|
1322
1317
|
result_value = qaqc[:envelope][:windows_average_conductance_w_per_m2_k]
|
|
1323
|
-
elsif compliance_var ==
|
|
1318
|
+
elsif compliance_var == 'ext_door_conductances'
|
|
1324
1319
|
result_value = qaqc[:envelope][:doors_average_conductance_w_per_m2_k]
|
|
1325
|
-
elsif compliance_var ==
|
|
1320
|
+
elsif compliance_var == 'ext_overhead_door_conductances'
|
|
1326
1321
|
result_value = qaqc[:envelope][:overhead_doors_average_conductance_w_per_m2_k]
|
|
1327
|
-
elsif compliance_var ==
|
|
1322
|
+
elsif compliance_var == 'ext_skylight_conductances'
|
|
1328
1323
|
result_value = qaqc[:envelope][:skylights_average_conductance_w_per_m2_k]
|
|
1329
1324
|
end
|
|
1330
1325
|
test_text = "[ENVELOPE] #{compliance_var}"
|
|
1331
1326
|
next if result_value.nil?
|
|
1327
|
+
|
|
1332
1328
|
necb_section_test(
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1329
|
+
qaqc,
|
|
1330
|
+
result_value,
|
|
1331
|
+
qaqc_table['bool_operator'],
|
|
1332
|
+
qaqc_table['expected_value'],
|
|
1333
|
+
necb_section_name,
|
|
1334
|
+
test_text,
|
|
1335
|
+
tolerance
|
|
1340
1336
|
)
|
|
1341
|
-
|
|
1337
|
+
end
|
|
1342
1338
|
# necb_section_name = "NECB2011-Section 3.2.2.3"
|
|
1343
1339
|
# climate_index = BTAP::Compliance::NECB2011::get_climate_zone_index(qaqc[:geography][:hdd])
|
|
1344
1340
|
# result_value_index = 6
|
|
@@ -1364,36 +1360,37 @@ class NECB2011
|
|
|
1364
1360
|
end
|
|
1365
1361
|
|
|
1366
1362
|
def necb_exterior_ground_surfaces_compliance(qaqc)
|
|
1367
|
-
#Exterior Ground surfaces
|
|
1368
|
-
necb_section_name = get_qaqc_table(table_name:
|
|
1369
|
-
climate_index = NECB2011.new
|
|
1363
|
+
# Exterior Ground surfaces
|
|
1364
|
+
necb_section_name = get_qaqc_table(table_name: 'exterior_ground_surfaces_compliance')['refs'].join(',')
|
|
1365
|
+
climate_index = NECB2011.new.get_climate_zone_index(qaqc[:geography][:hdd])
|
|
1370
1366
|
tolerance = 3
|
|
1371
1367
|
# puts "\n\n"
|
|
1372
1368
|
# puts "climate_index: #{climate_index}"
|
|
1373
1369
|
# puts get_qaqc_table("exterior_ground_surfaces_compliance", {"var" => "ground_wall_conductances", "climate_index" => 2})
|
|
1374
1370
|
|
|
1375
|
-
[
|
|
1376
|
-
qaqc_table = get_qaqc_table(table_name:
|
|
1377
|
-
#puts "\n#{qaqc_table}\n"
|
|
1378
|
-
if compliance_var ==
|
|
1371
|
+
['ground_wall_conductances', 'ground_roof_conductances', 'ground_floor_conductances'].each do |compliance_var|
|
|
1372
|
+
qaqc_table = get_qaqc_table(table_name: 'exterior_ground_surfaces_compliance', search_criteria: { 'var' => compliance_var, 'climate_index' => climate_index }).first
|
|
1373
|
+
# puts "\n#{qaqc_table}\n"
|
|
1374
|
+
if compliance_var == 'ground_wall_conductances'
|
|
1379
1375
|
result_value = qaqc[:envelope][:ground_walls_average_conductance_w_per_m2_k]
|
|
1380
|
-
elsif compliance_var ==
|
|
1376
|
+
elsif compliance_var == 'ground_roof_conductances'
|
|
1381
1377
|
result_value = qaqc[:envelope][:ground_roofs_average_conductance_w_per_m2_k]
|
|
1382
|
-
elsif compliance_var ==
|
|
1378
|
+
elsif compliance_var == 'ground_floor_conductances'
|
|
1383
1379
|
result_value = qaqc[:envelope][:ground_floors_average_conductance_w_per_m2_k]
|
|
1384
1380
|
end
|
|
1385
1381
|
test_text = "[ENVELOPE] #{compliance_var}"
|
|
1386
1382
|
next if result_value.nil?
|
|
1383
|
+
|
|
1387
1384
|
necb_section_test(
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1385
|
+
qaqc,
|
|
1386
|
+
result_value,
|
|
1387
|
+
qaqc_table['bool_operator'],
|
|
1388
|
+
qaqc_table['expected_value'],
|
|
1389
|
+
necb_section_name,
|
|
1390
|
+
test_text,
|
|
1391
|
+
tolerance
|
|
1395
1392
|
)
|
|
1396
|
-
|
|
1393
|
+
end
|
|
1397
1394
|
# necb_section_name = "NECB2011-Section 3.2.3.1"
|
|
1398
1395
|
# climate_index = BTAP::Compliance::NECB2011::get_climate_zone_index(qaqc[:geography][:hdd])
|
|
1399
1396
|
# result_value_index = 6
|
|
@@ -1415,35 +1412,37 @@ class NECB2011
|
|
|
1415
1412
|
end
|
|
1416
1413
|
|
|
1417
1414
|
def necb_zone_sizing_compliance(qaqc)
|
|
1418
|
-
#Zone Sizing test
|
|
1419
|
-
necb_section_name = get_qaqc_table(table_name:
|
|
1420
|
-
qaqc_table = get_qaqc_table(table_name:
|
|
1415
|
+
# Zone Sizing test
|
|
1416
|
+
necb_section_name = get_qaqc_table(table_name: 'zone_sizing_compliance')['refs'].join(',')
|
|
1417
|
+
qaqc_table = get_qaqc_table(table_name: 'zone_sizing_compliance')
|
|
1421
1418
|
tolerance = 3
|
|
1422
|
-
#necb_section_name = "NECB2011-?"
|
|
1423
|
-
#round_precision = 3
|
|
1419
|
+
# necb_section_name = "NECB2011-?"
|
|
1420
|
+
# round_precision = 3
|
|
1424
1421
|
qaqc[:thermal_zones].each do |zoneinfo|
|
|
1425
1422
|
# skipping undefined schedules
|
|
1426
|
-
if (qaqc_table[
|
|
1423
|
+
if (qaqc_table['exclude']['exclude_string'].any? { |ex_string| zoneinfo[:name].to_s.include? ex_string }) && !qaqc_table['exclude']['exclude_string'].empty?
|
|
1427
1424
|
# if zoneinfo[:name].to_s.include?"- undefined -"
|
|
1428
|
-
puts "#{zoneinfo[:name]} was skipped in necb_zone_sizing_compliance because it contains #{qaqc_table[
|
|
1425
|
+
puts "#{zoneinfo[:name]} was skipped in necb_zone_sizing_compliance because it contains #{qaqc_table['exclude']['exclude_string'].join(',')}"
|
|
1429
1426
|
next
|
|
1430
1427
|
end
|
|
1431
|
-
zone_sizing_compliance = qaqc_table[
|
|
1432
|
-
zone_sizing_compliance.each
|
|
1433
|
-
|
|
1428
|
+
zone_sizing_compliance = qaqc_table['table']
|
|
1429
|
+
zone_sizing_compliance.each do |compliance|
|
|
1430
|
+
eval_string = "zoneinfo[:#{compliance['var']}]"
|
|
1431
|
+
result_value = eval(eval_string)
|
|
1434
1432
|
next if result_value.nil?
|
|
1433
|
+
|
|
1435
1434
|
test_text = "[ZONE][#{zoneinfo[:name]}] #{compliance['var']}"
|
|
1436
|
-
#puts key
|
|
1435
|
+
# puts key
|
|
1437
1436
|
necb_section_test(
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1437
|
+
qaqc,
|
|
1438
|
+
result_value,
|
|
1439
|
+
compliance['bool_operator'],
|
|
1440
|
+
compliance['expected_value'],
|
|
1441
|
+
necb_section_name,
|
|
1442
|
+
test_text,
|
|
1443
|
+
tolerance
|
|
1445
1444
|
)
|
|
1446
|
-
|
|
1445
|
+
end
|
|
1447
1446
|
# data = {}
|
|
1448
1447
|
# data[:heating_sizing_factor] = [1.3 , zoneinfo[:heating_sizing_factor]]
|
|
1449
1448
|
# data[:cooling_sizing_factor] = [1.1 ,zoneinfo[:cooling_sizing_factor]]
|
|
@@ -1465,37 +1464,38 @@ class NECB2011
|
|
|
1465
1464
|
end
|
|
1466
1465
|
|
|
1467
1466
|
def necb_design_supply_temp_compliance(qaqc)
|
|
1468
|
-
necb_section_name = get_qaqc_table(table_name:
|
|
1469
|
-
qaqc_table = get_qaqc_table(table_name:
|
|
1467
|
+
necb_section_name = get_qaqc_table(table_name: 'design_supply_temp_compliance')['refs'].join(',')
|
|
1468
|
+
qaqc_table = get_qaqc_table(table_name: 'design_supply_temp_compliance')
|
|
1470
1469
|
tolerance = 3
|
|
1471
1470
|
qaqc[:thermal_zones].each do |zoneinfo|
|
|
1472
1471
|
# skipping undefined schedules
|
|
1473
|
-
if (qaqc_table[
|
|
1474
|
-
puts "#{zoneinfo[:name]} was skipped in necb_zone_sizing_compliance because it contains #{qaqc_table[
|
|
1472
|
+
if (qaqc_table['exclude']['exclude_string'].any? { |ex_string| zoneinfo[:name].to_s.include? ex_string }) && !qaqc_table['exclude']['exclude_string'].empty?
|
|
1473
|
+
puts "#{zoneinfo[:name]} was skipped in necb_zone_sizing_compliance because it contains #{qaqc_table['exclude']['exclude_string'].join(',')}"
|
|
1475
1474
|
next
|
|
1476
1475
|
end
|
|
1477
|
-
design_supply_temp_compliance = qaqc_table[
|
|
1476
|
+
design_supply_temp_compliance = qaqc_table['table']
|
|
1478
1477
|
|
|
1479
|
-
design_supply_temp_compliance.each
|
|
1480
|
-
if compliance['var'] ==
|
|
1478
|
+
design_supply_temp_compliance.each do |compliance|
|
|
1479
|
+
if compliance['var'] == 'heating_design_supply_air_temp'
|
|
1481
1480
|
result_value = zoneinfo[:zone_heating_design_supply_air_temperature]
|
|
1482
|
-
elsif compliance['var'] ==
|
|
1481
|
+
elsif compliance['var'] == 'cooling_design_supply_temp'
|
|
1483
1482
|
result_value = zoneinfo[:zone_cooling_design_supply_air_temperature]
|
|
1484
1483
|
end
|
|
1485
1484
|
|
|
1486
1485
|
next if result_value.nil?
|
|
1486
|
+
|
|
1487
1487
|
test_text = "[ZONE][#{zoneinfo[:name]}] #{compliance['var']}"
|
|
1488
|
-
#puts key
|
|
1488
|
+
# puts key
|
|
1489
1489
|
necb_section_test(
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1490
|
+
qaqc,
|
|
1491
|
+
result_value,
|
|
1492
|
+
compliance['bool_operator'],
|
|
1493
|
+
compliance['expected_value'],
|
|
1494
|
+
necb_section_name,
|
|
1495
|
+
test_text,
|
|
1496
|
+
tolerance
|
|
1497
1497
|
)
|
|
1498
|
-
|
|
1498
|
+
end
|
|
1499
1499
|
end
|
|
1500
1500
|
# Design supply temp test
|
|
1501
1501
|
# necb_section_name = "NECB2011-?"
|
|
@@ -1526,40 +1526,40 @@ class NECB2011
|
|
|
1526
1526
|
end
|
|
1527
1527
|
|
|
1528
1528
|
def necb_economizer_compliance(qaqc)
|
|
1529
|
-
#determine correct economizer usage according to section 5.2.2.7 of NECB2011
|
|
1530
|
-
necb_section_name = get_qaqc_table(table_name:
|
|
1531
|
-
qaqc_table = get_qaqc_table(table_name:
|
|
1529
|
+
# determine correct economizer usage according to section 5.2.2.7 of NECB2011
|
|
1530
|
+
necb_section_name = get_qaqc_table(table_name: 'economizer_compliance')['refs'].join(',')
|
|
1531
|
+
qaqc_table = get_qaqc_table(table_name: 'economizer_compliance') # stores the full hash of qaqc for economizer_compliance
|
|
1532
1532
|
# necb_section_name = "NECB2011-5.2.2.7"
|
|
1533
1533
|
|
|
1534
1534
|
qaqc[:air_loops].each do |air_loop_info|
|
|
1535
1535
|
capacity = -1.0
|
|
1536
1536
|
if !air_loop_info[:cooling_coils][:dx_single_speed][0].nil?
|
|
1537
|
-
puts
|
|
1537
|
+
puts 'capacity = air_loop_info[:cooling_coils][:dx_single_speed][0][:nominal_total_capacity_w]'
|
|
1538
1538
|
capacity = air_loop_info[:cooling_coils][:dx_single_speed][0][:nominal_total_capacity_w]
|
|
1539
1539
|
elsif !air_loop_info[:cooling_coils][:dx_two_speed][0].nil?
|
|
1540
|
-
puts
|
|
1540
|
+
puts 'capacity = air_loop_info[:cooling_coils][:dx_two_speed][0][:cop_high]'
|
|
1541
1541
|
capacity = air_loop_info[:cooling_coils][:dx_two_speed][0][:cop_high]
|
|
1542
1542
|
elsif !air_loop_info[:cooling_coils][:coil_cooling_water][0].nil?
|
|
1543
|
-
puts
|
|
1543
|
+
puts 'capacity = air_loop_info[:cooling_coils][:coil_cooling_water][0][:nominal_total_capacity_w]'
|
|
1544
1544
|
capacity = air_loop_info[:cooling_coils][:coil_cooling_water][0][:nominal_total_capacity_w]
|
|
1545
1545
|
end
|
|
1546
1546
|
puts capacity
|
|
1547
1547
|
if capacity == -1.0
|
|
1548
|
-
#This should not happen
|
|
1548
|
+
# This should not happen
|
|
1549
1549
|
qaqc[:errors] << "[necb_economizer_compliance] air_loop_info[:cooling_coils] for #{air_loop_info[:name]} does not have a capacity "
|
|
1550
1550
|
else
|
|
1551
|
-
#check for correct economizer usage
|
|
1552
|
-
#puts "air_loop_info[:supply_fan][:max_air_flow_rate]: #{air_loop_info[:supply_fan][:max_air_flow_rate]}"
|
|
1551
|
+
# check for correct economizer usage
|
|
1552
|
+
# puts "air_loop_info[:supply_fan][:max_air_flow_rate]: #{air_loop_info[:supply_fan][:max_air_flow_rate]}"
|
|
1553
1553
|
unless air_loop_info[:supply_fan][:max_air_flow_rate_m3_per_s] == -1.0
|
|
1554
|
-
#capacity should be in kW
|
|
1554
|
+
# capacity should be in kW
|
|
1555
1555
|
max_air_flow_rate_m3_per_s = air_loop_info[:supply_fan][:max_air_flow_rate_m3_per_s]
|
|
1556
1556
|
necb_section_test(
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1557
|
+
qaqc,
|
|
1558
|
+
eval(qaqc_table['table'][0]['expected_value']),
|
|
1559
|
+
'==',
|
|
1560
|
+
air_loop_info[:economizer][:control_type],
|
|
1561
|
+
necb_section_name,
|
|
1562
|
+
"[AIR LOOP][#{air_loop_info[:name]}][:economizer][:control_type]"
|
|
1563
1563
|
)
|
|
1564
1564
|
end
|
|
1565
1565
|
end
|
|
@@ -1568,10 +1568,10 @@ class NECB2011
|
|
|
1568
1568
|
|
|
1569
1569
|
def necb_hrv_compliance(qaqc, model)
|
|
1570
1570
|
# HRV check
|
|
1571
|
-
hrv_compliance = get_qaqc_table(table_name:
|
|
1572
|
-
necb_section_name = get_qaqc_table(table_name:
|
|
1571
|
+
hrv_compliance = get_qaqc_table(table_name: 'hrv_compliance')['table']
|
|
1572
|
+
necb_section_name = get_qaqc_table(table_name: 'hrv_compliance')['refs'].join(',')
|
|
1573
1573
|
qaqc[:air_loops].each do |air_loop_info|
|
|
1574
|
-
hrv_compliance.each
|
|
1574
|
+
hrv_compliance.each do |compliance|
|
|
1575
1575
|
data = {}
|
|
1576
1576
|
|
|
1577
1577
|
# puts "\nspaceinfo[#{compliance['var']}]"
|
|
@@ -1583,19 +1583,19 @@ class NECB2011
|
|
|
1583
1583
|
# data[:infiltration_method] = [ "Flow/ExteriorArea", spaceinfo[:infiltration_method] , nil ]
|
|
1584
1584
|
# data[:infiltration_flow_per_m2] = [ 0.00025, spaceinfo[:infiltration_flow_per_m2], 5 ]
|
|
1585
1585
|
# data.each do |key,value|
|
|
1586
|
-
#puts key
|
|
1586
|
+
# puts key
|
|
1587
1587
|
outdoor_air_L_per_s = air_loop_info[:outdoor_air_L_per_s]
|
|
1588
1588
|
db990 = BTAP::Environment::WeatherFile.new(model.getWeatherFile.path.get.to_s).db990
|
|
1589
1589
|
necb_section_test(
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1590
|
+
qaqc,
|
|
1591
|
+
result_value,
|
|
1592
|
+
'==',
|
|
1593
|
+
eval(compliance['expected_value']),
|
|
1594
|
+
necb_section_name,
|
|
1595
|
+
test_text,
|
|
1596
|
+
compliance['tolerance']
|
|
1597
1597
|
)
|
|
1598
|
-
|
|
1598
|
+
end
|
|
1599
1599
|
end
|
|
1600
1600
|
# necb_section_name = "NECB2011-5.2.10.1"
|
|
1601
1601
|
# qaqc[:air_loops].each do |air_loop_info|
|
|
@@ -1625,21 +1625,22 @@ class NECB2011
|
|
|
1625
1625
|
# because support for MURBS has not been implemented for HRV
|
|
1626
1626
|
# in NECB 2011 and 2015
|
|
1627
1627
|
def necb_hrv_compliance_inc_murb(qaqc, model)
|
|
1628
|
-
murb_hrv_compliance = get_qaqc_table(
|
|
1628
|
+
murb_hrv_compliance = get_qaqc_table('murb_hrv_compliance')
|
|
1629
1629
|
hrv_spacetpye_ignore_regex = murb_hrv_compliance['ignored_spacetypes_regex']
|
|
1630
1630
|
hrv_dwelling_unit_spacetpye_regex = murb_hrv_compliance['dwelling_unit_spacetype_regex']
|
|
1631
|
-
necb_section_name = murb_hrv_compliance['refs'].join(
|
|
1631
|
+
necb_section_name = murb_hrv_compliance['refs'].join(',')
|
|
1632
1632
|
|
|
1633
1633
|
model.getAirLoopHVACs.sort.each do |air_loop|
|
|
1634
1634
|
air_loop_info = {}
|
|
1635
1635
|
|
|
1636
1636
|
qaqc[:air_loops].each do |air_loop_i|
|
|
1637
1637
|
next unless air_loop_i[:name] == air_loop.name.get
|
|
1638
|
+
|
|
1638
1639
|
air_loop_info = air_loop_i
|
|
1639
1640
|
end
|
|
1640
1641
|
|
|
1641
|
-
zones = air_loop.thermalZones
|
|
1642
|
-
if zones.length ==1
|
|
1642
|
+
zones = air_loop.thermalZones
|
|
1643
|
+
if zones.length == 1
|
|
1643
1644
|
# here the Airloop is serving only one zone
|
|
1644
1645
|
|
|
1645
1646
|
# So, next we need to determine if the zone has only
|
|
@@ -1647,17 +1648,17 @@ class NECB2011
|
|
|
1647
1648
|
|
|
1648
1649
|
zone = zones.first
|
|
1649
1650
|
# get the spaces and keep track of the number of spaces and dewlling units
|
|
1650
|
-
num_of_served_spaces = zone.spaces
|
|
1651
|
+
num_of_served_spaces = zone.spaces.length
|
|
1651
1652
|
contains_dwelling_unit = false
|
|
1652
1653
|
if num_of_served_spaces == 0
|
|
1653
|
-
qaqc[:warnings] << "[necb_murb_hrv_compliance] Thermal Zone [#{zone.name
|
|
1654
|
+
qaqc[:warnings] << "[necb_murb_hrv_compliance] Thermal Zone [#{zone.name}] does not serve any Spaces"
|
|
1654
1655
|
else
|
|
1655
1656
|
spaces = zone.spaces()
|
|
1656
|
-
spaces.each
|
|
1657
|
-
spacetype = z_space.spaceType
|
|
1657
|
+
spaces.each do |z_space|
|
|
1658
|
+
spacetype = z_space.spaceType
|
|
1658
1659
|
spacetype = validate_optional(spacetype, model, nil)
|
|
1659
1660
|
if spacetype.nil?
|
|
1660
|
-
qaqc[:warnings] << "[necb_murb_hrv_compliance] Space [#{z_space.name
|
|
1661
|
+
qaqc[:warnings] << "[necb_murb_hrv_compliance] Space [#{z_space.name}] does not have a SpaceType"
|
|
1661
1662
|
else
|
|
1662
1663
|
# reduce the number of spaces if the space served by the thermal zone is a
|
|
1663
1664
|
# stairwell/staircase/lobby/corridor
|
|
@@ -1672,33 +1673,33 @@ class NECB2011
|
|
|
1672
1673
|
contains_dwelling_unit = true
|
|
1673
1674
|
end
|
|
1674
1675
|
end
|
|
1675
|
-
|
|
1676
|
-
if num_of_served_spaces == 1
|
|
1676
|
+
end
|
|
1677
|
+
if (num_of_served_spaces == 1) && contains_dwelling_unit
|
|
1677
1678
|
# here the Thermal zone serves one space that is a dwelling unit
|
|
1678
1679
|
# and other space types such as lobby, stairs, or corridors are ignored
|
|
1679
1680
|
# So in this case, an HRV is required
|
|
1680
1681
|
test_text = "[AIR LOOP][:heat_exchanger] (murb) for [#{air_loop_info[:name]}] is present?"
|
|
1681
1682
|
result_value = murb_hrv_compliance['table']['expected_value']
|
|
1682
1683
|
necb_section_test(
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1684
|
+
qaqc,
|
|
1685
|
+
result_value,
|
|
1686
|
+
'==',
|
|
1687
|
+
true,
|
|
1688
|
+
necb_section_name,
|
|
1689
|
+
test_text,
|
|
1690
|
+
nil
|
|
1690
1691
|
)
|
|
1691
1692
|
else
|
|
1692
1693
|
# Here either the number of served spaces exceed 1 or
|
|
1693
1694
|
# does not contain a dwelling unit, So a regular HRV check has to be done for this air loop
|
|
1694
|
-
qaqc[:warnings] << "[necb_murb_hrv_compliance] Regular HRV compliance check for airloop: [#{air_loop.name
|
|
1695
|
+
qaqc[:warnings] << "[necb_murb_hrv_compliance] Regular HRV compliance check for airloop: [#{air_loop.name}], because (it does not serve a single dwelling unit) OR (serves multiple spacetypes)"
|
|
1695
1696
|
necb_hrv_compliance_for_single_airloop(qaqc, model, air_loop_info)
|
|
1696
1697
|
end
|
|
1697
1698
|
end
|
|
1698
1699
|
else
|
|
1699
1700
|
# here the Airloop does not serve any zones, or it serves more than one zone
|
|
1700
1701
|
# So, a regular hrv compliance must be done for this air loop
|
|
1701
|
-
qaqc[:warnings] << "[necb_murb_hrv_compliance] Regular HRV compliance check for airloop: [#{air_loop.name
|
|
1702
|
+
qaqc[:warnings] << "[necb_murb_hrv_compliance] Regular HRV compliance check for airloop: [#{air_loop.name}], because it serves multiple Thermal zones"
|
|
1702
1703
|
necb_hrv_compliance_for_single_airloop(qaqc, model, air_loop_info)
|
|
1703
1704
|
end
|
|
1704
1705
|
end
|
|
@@ -1715,9 +1716,9 @@ class NECB2011
|
|
|
1715
1716
|
# @param air_loop_info [:hash] single air_loop object from the qaqc hash
|
|
1716
1717
|
def necb_hrv_compliance_for_single_airloop(qaqc, model, air_loop_info)
|
|
1717
1718
|
# HRV check
|
|
1718
|
-
hrv_compliance = get_qaqc_table(
|
|
1719
|
-
necb_section_name = get_qaqc_table(
|
|
1720
|
-
hrv_compliance.each
|
|
1719
|
+
hrv_compliance = get_qaqc_table('hrv_compliance')['table']
|
|
1720
|
+
necb_section_name = get_qaqc_table('hrv_compliance')['refs'].join(',')
|
|
1721
|
+
hrv_compliance.each do |compliance|
|
|
1721
1722
|
data = {}
|
|
1722
1723
|
|
|
1723
1724
|
# puts "\nspaceinfo[#{compliance['var']}]"
|
|
@@ -1729,19 +1730,19 @@ class NECB2011
|
|
|
1729
1730
|
# data[:infiltration_method] = [ "Flow/ExteriorArea", spaceinfo[:infiltration_method] , nil ]
|
|
1730
1731
|
# data[:infiltration_flow_per_m2] = [ 0.00025, spaceinfo[:infiltration_flow_per_m2], 5 ]
|
|
1731
1732
|
# data.each do |key,value|
|
|
1732
|
-
#puts key
|
|
1733
|
+
# puts key
|
|
1733
1734
|
outdoor_air_L_per_s = air_loop_info[:outdoor_air_L_per_s]
|
|
1734
1735
|
db990 = BTAP::Environment::WeatherFile.new(model.getWeatherFile.path.get.to_s).db990
|
|
1735
1736
|
necb_section_test(
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1737
|
+
qaqc,
|
|
1738
|
+
result_value,
|
|
1739
|
+
'==',
|
|
1740
|
+
eval(compliance['expected_value']),
|
|
1741
|
+
necb_section_name,
|
|
1742
|
+
test_text,
|
|
1743
|
+
compliance['tolerance']
|
|
1743
1744
|
)
|
|
1744
|
-
|
|
1745
|
+
end
|
|
1745
1746
|
# necb_section_name = "NECB2011-5.2.10.1"
|
|
1746
1747
|
# qaqc[:air_loops].each do |air_loop_info|
|
|
1747
1748
|
# unless air_loop_info[:supply_fan][:max_air_flow_rate_m3_per_s] == -1.0
|
|
@@ -1767,53 +1768,53 @@ class NECB2011
|
|
|
1767
1768
|
end
|
|
1768
1769
|
|
|
1769
1770
|
def necb_vav_fan_power_compliance(qaqc)
|
|
1770
|
-
necb_section_name = get_qaqc_table(table_name:
|
|
1771
|
-
qaqc_table = get_qaqc_table(table_name:
|
|
1772
|
-
#necb_section_name = "NECB2011-5.2.3.3"
|
|
1771
|
+
necb_section_name = get_qaqc_table(table_name: 'vav_fan_power_compliance')['refs'].join(',')
|
|
1772
|
+
qaqc_table = get_qaqc_table(table_name: 'vav_fan_power_compliance')
|
|
1773
|
+
# necb_section_name = "NECB2011-5.2.3.3"
|
|
1773
1774
|
qaqc[:air_loops].each do |air_loop_info|
|
|
1774
|
-
#necb_clg_cop = air_loop_info[:cooling_coils][:dx_single_speed][:cop] #*assuming that the cop is defined correctly*
|
|
1775
|
+
# necb_clg_cop = air_loop_info[:cooling_coils][:dx_single_speed][:cop] #*assuming that the cop is defined correctly*
|
|
1775
1776
|
if air_loop_info[:supply_fan][:max_air_flow_rate_m3_per_s].nil?
|
|
1776
|
-
qaqc[:warnings] <<
|
|
1777
|
+
qaqc[:warnings] << '[vav_fan_power_compliance] air_loop_info[:supply_fan][:max_air_flow_rate_m3_per_s] is nil'
|
|
1777
1778
|
next
|
|
1778
1779
|
end
|
|
1779
1780
|
|
|
1780
1781
|
max_air_flow_rate_m3_per_s = air_loop_info[:supply_fan][:max_air_flow_rate_m3_per_s]
|
|
1781
1782
|
necb_supply_fan_w = -1
|
|
1782
1783
|
|
|
1783
|
-
if air_loop_info[:name].include?
|
|
1784
|
+
if air_loop_info[:name].include? 'PSZ'
|
|
1784
1785
|
necb_supply_fan_w = eval(qaqc_table['formulas']['NECB PSZ fan power (W)']).round(2)
|
|
1785
|
-
elsif air_loop_info[:name].include?
|
|
1786
|
+
elsif air_loop_info[:name].include? 'VAV'
|
|
1786
1787
|
necb_supply_fan_w = eval(qaqc_table['formulas']['NECB VAV fan power (W)']).round(2)
|
|
1787
1788
|
end
|
|
1788
1789
|
|
|
1789
1790
|
if air_loop_info[:supply_fan][:rated_electric_power_w].nil?
|
|
1790
|
-
qaqc[:warnings] <<
|
|
1791
|
+
qaqc[:warnings] << '[vav_fan_power_compliance] air_loop_info[:supply_fan][:rated_electric_power_w] is nil'
|
|
1791
1792
|
next
|
|
1792
1793
|
end
|
|
1793
1794
|
|
|
1794
1795
|
supply_fan_w = (air_loop_info[:supply_fan][:rated_electric_power_w]).round(3)
|
|
1795
1796
|
absolute_diff = (necb_supply_fan_w - supply_fan_w).to_f.abs
|
|
1796
1797
|
if absolute_diff < 10
|
|
1797
|
-
#This case should ALWAYS PASS
|
|
1798
|
+
# This case should ALWAYS PASS
|
|
1798
1799
|
necb_section_test(
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1800
|
+
qaqc,
|
|
1801
|
+
10,
|
|
1802
|
+
'>=',
|
|
1803
|
+
absolute_diff,
|
|
1804
|
+
necb_section_name,
|
|
1805
|
+
"[AIR LOOP][#{air_loop_info[:name]}][:supply_fan][:rated_electric_power_w] [#{supply_fan_w}] Absolute Difference from NECB value [#{necb_supply_fan_w}]"
|
|
1805
1806
|
)
|
|
1806
1807
|
next
|
|
1807
1808
|
else
|
|
1808
|
-
#The test should pass if and only if the percent difference is less than 10%
|
|
1809
|
-
percent_diff = ((necb_supply_fan_w - supply_fan_w).to_f.abs/necb_supply_fan_w * 100).round(3)
|
|
1809
|
+
# The test should pass if and only if the percent difference is less than 10%
|
|
1810
|
+
percent_diff = ((necb_supply_fan_w - supply_fan_w).to_f.abs / necb_supply_fan_w * 100).round(3)
|
|
1810
1811
|
necb_section_test(
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1812
|
+
qaqc,
|
|
1813
|
+
10,
|
|
1814
|
+
'>=',
|
|
1815
|
+
percent_diff,
|
|
1816
|
+
necb_section_name,
|
|
1817
|
+
"[AIR LOOP][#{air_loop_info[:name]}][:supply_fan][:rated_electric_power_w] [#{supply_fan_w}] Percent Diff from NECB value [#{necb_supply_fan_w}]"
|
|
1817
1818
|
)
|
|
1818
1819
|
end
|
|
1819
1820
|
end
|
|
@@ -1821,12 +1822,11 @@ class NECB2011
|
|
|
1821
1822
|
|
|
1822
1823
|
def necb_qaqc(qaqc, model)
|
|
1823
1824
|
puts "\n\nin necb_qaqc 2011 now\n\n"
|
|
1824
|
-
#Now perform basic QA/QC on items for NECB2011
|
|
1825
|
+
# Now perform basic QA/QC on items for NECB2011
|
|
1825
1826
|
qaqc[:information] = []
|
|
1826
|
-
qaqc[:warnings] =[]
|
|
1827
|
+
qaqc[:warnings] = []
|
|
1827
1828
|
qaqc[:errors] = []
|
|
1828
|
-
qaqc[:unique_errors]=[]
|
|
1829
|
-
|
|
1829
|
+
qaqc[:unique_errors] = []
|
|
1830
1830
|
|
|
1831
1831
|
necb_space_compliance(qaqc)
|
|
1832
1832
|
|
|
@@ -1857,52 +1857,55 @@ class NECB2011
|
|
|
1857
1857
|
qaqc[:information] = qaqc[:information].sort
|
|
1858
1858
|
qaqc[:warnings] = qaqc[:warnings].sort
|
|
1859
1859
|
qaqc[:errors] = qaqc[:errors].sort
|
|
1860
|
-
qaqc[:unique_errors]= qaqc[:unique_errors].sort
|
|
1860
|
+
qaqc[:unique_errors] = qaqc[:unique_errors].sort
|
|
1861
1861
|
return qaqc
|
|
1862
1862
|
end
|
|
1863
1863
|
|
|
1864
1864
|
def necb_section_test(qaqc, result_value, bool_operator, expected_value, necb_section_name, test_text, tolerance = nil)
|
|
1865
|
-
test =
|
|
1865
|
+
test = 'eval_failed'
|
|
1866
1866
|
command = ''
|
|
1867
1867
|
if tolerance.is_a?(Integer)
|
|
1868
1868
|
command = "#{result_value}.round(#{tolerance}) #{bool_operator} #{expected_value}.round(#{tolerance})"
|
|
1869
|
-
elsif expected_value.is_a?(String)
|
|
1869
|
+
elsif expected_value.is_a?(String) && result_value.is_a?(String)
|
|
1870
1870
|
command = "'#{result_value}' #{bool_operator} '#{expected_value}'"
|
|
1871
1871
|
else
|
|
1872
1872
|
command = "#{result_value} #{bool_operator} #{expected_value}"
|
|
1873
1873
|
end
|
|
1874
1874
|
test = eval(command)
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
if test
|
|
1875
|
+
test_res = nil
|
|
1876
|
+
test_res = true if test.to_s.downcase == 'true'
|
|
1877
|
+
test_res = false if test.to_s.downcase == 'false'
|
|
1878
|
+
raise "Eval command failed #{test}" if test_res.nil?
|
|
1879
|
+
|
|
1880
|
+
if test_res
|
|
1878
1881
|
qaqc[:information] << "[Info][TEST-PASS][#{necb_section_name}]:#{test_text} result value:#{result_value} #{bool_operator} expected value:#{expected_value}"
|
|
1879
1882
|
else
|
|
1880
1883
|
qaqc[:errors] << "[ERROR][TEST-FAIL][#{necb_section_name}]:#{test_text} expected value:#{expected_value} #{bool_operator} result value:#{result_value}"
|
|
1881
|
-
unless (expected_value == -1.0
|
|
1884
|
+
unless (expected_value == -1.0) || (expected_value == 'N/A')
|
|
1882
1885
|
qaqc[:unique_errors] << "[ERROR][TEST-FAIL][#{necb_section_name}]:#{test_text} expected value:#{expected_value} #{bool_operator} result value:#{result_value}"
|
|
1883
1886
|
end
|
|
1884
1887
|
end
|
|
1885
1888
|
end
|
|
1886
1889
|
|
|
1887
|
-
def check_boolean_value
|
|
1888
|
-
return true if value =~
|
|
1889
|
-
return false if value.empty? || value =~
|
|
1890
|
+
def check_boolean_value(value, varname)
|
|
1891
|
+
return true if value =~ /^(true|t|yes|y|1)$/i
|
|
1892
|
+
return false if value.empty? || value =~ /^(false|f|no|n|0)$/i
|
|
1890
1893
|
|
|
1891
|
-
raise ArgumentError
|
|
1894
|
+
raise ArgumentError, "invalid value for #{varname}: #{value}"
|
|
1892
1895
|
end
|
|
1893
1896
|
|
|
1894
1897
|
def look_up_csv_data(csv_fname, search_criteria)
|
|
1895
|
-
options = {:
|
|
1896
|
-
|
|
1898
|
+
options = { headers: :first_row,
|
|
1899
|
+
converters: [:numeric] }
|
|
1897
1900
|
unless File.exist?(csv_fname)
|
|
1898
|
-
raise
|
|
1901
|
+
raise "File: [#{csv_fname}] Does not exist"
|
|
1899
1902
|
end
|
|
1903
|
+
|
|
1900
1904
|
# we'll save the matches here
|
|
1901
1905
|
matches = nil
|
|
1902
1906
|
# save a copy of the headers
|
|
1903
1907
|
headers = nil
|
|
1904
|
-
CSV.open(csv_fname,
|
|
1905
|
-
|
|
1908
|
+
CSV.open(csv_fname, 'r', options) do |csv|
|
|
1906
1909
|
# Since CSV includes Enumerable we can use 'find_all'
|
|
1907
1910
|
# which will return all the elements of the Enumerble for
|
|
1908
1911
|
# which the block returns true
|
|
@@ -1910,17 +1913,17 @@ class NECB2011
|
|
|
1910
1913
|
matches = csv.find_all do |row|
|
|
1911
1914
|
match = true
|
|
1912
1915
|
search_criteria.keys.each do |key|
|
|
1913
|
-
match
|
|
1916
|
+
match &&= (row[key].strip == search_criteria[key].strip)
|
|
1914
1917
|
end
|
|
1915
1918
|
match
|
|
1916
1919
|
end
|
|
1917
1920
|
headers = csv.headers
|
|
1918
1921
|
end
|
|
1919
|
-
#puts matches
|
|
1920
|
-
raise(
|
|
1921
|
-
|
|
1922
|
-
|
|
1922
|
+
# puts matches
|
|
1923
|
+
raise('More than one match') if matches.size > 1
|
|
1924
|
+
|
|
1925
|
+
puts "Zero matches found for [#{search_criteria}]" if matches.empty?
|
|
1926
|
+
# return matches[0]
|
|
1923
1927
|
return matches[0]
|
|
1924
1928
|
end
|
|
1925
|
-
|
|
1926
1929
|
end
|