openstudio-standards 0.4.0 → 0.5.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/data/inventory/thermal_bridging.csv +90 -0
- data/data/standards/OpenStudio_Standards-deer-comstock.xlsx +0 -0
- data/data/standards/manage_OpenStudio_Standards.rb +1 -1
- data/data/standards/test_performance_expected_dd_results.csv +2014 -1891
- data/lib/openstudio-standards/btap/analysis.rb +8 -8
- data/lib/openstudio-standards/btap/bridging.rb +664 -645
- data/lib/openstudio-standards/btap/btap.model.rb +14 -14
- data/lib/openstudio-standards/btap/btap.rb +7 -7
- data/lib/openstudio-standards/btap/btap_result.rb +1 -1
- data/lib/openstudio-standards/btap/economics.rb +23 -23
- data/lib/openstudio-standards/btap/envelope.rb +8 -8
- data/lib/openstudio-standards/btap/equest.rb +1 -1
- data/lib/openstudio-standards/btap/geometry.rb +2 -2
- data/lib/openstudio-standards/btap/mpc.rb +7 -7
- data/lib/openstudio-standards/btap/schedules.rb +1 -1
- data/lib/openstudio-standards/btap/simmanager.rb +4 -4
- data/lib/openstudio-standards/btap/spaceloads.rb +26 -26
- data/lib/openstudio-standards/btap/utilities.rb +6 -6
- data/lib/openstudio-standards/btap/vintagizer.rb +1 -1
- data/lib/openstudio-standards/constructions/information.rb +83 -0
- data/lib/openstudio-standards/constructions/materials/modify.rb +72 -0
- data/lib/openstudio-standards/constructions/modify.rb +80 -0
- data/lib/openstudio-standards/create_typical/create_typical.rb +983 -0
- data/lib/openstudio-standards/create_typical/enumerations.rb +484 -0
- data/lib/openstudio-standards/create_typical/space_type_blend.rb +791 -0
- data/lib/openstudio-standards/create_typical/space_type_ratios.rb +494 -0
- data/lib/openstudio-standards/daylighting/space.rb +47 -0
- data/lib/openstudio-standards/geometry/create.rb +801 -0
- data/lib/openstudio-standards/geometry/create_bar.rb +2171 -0
- data/lib/openstudio-standards/geometry/information.rb +462 -0
- data/lib/openstudio-standards/geometry/modify.rb +48 -0
- data/lib/openstudio-standards/hvac/air_loop/information.rb +79 -0
- data/lib/openstudio-standards/hvac/cbecs_hvac.rb +616 -0
- data/lib/openstudio-standards/hvac/setpoint_managers/information.rb +91 -0
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2007/ashrae_90_1_2007.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.Model.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.Model.rb +2 -2
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.hvac_systems.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.Model.rb +4 -36
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.hvac_systems.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Model.rb +4 -36
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Space.rb +3 -3
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.hvac_systems.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/doe_ref_1980_2004/doe_ref_1980_2004.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/doe_ref_1980_2004/doe_ref_1980_2004.Model.elevators.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/doe_ref_pre_1980/doe_ref_pre_1980.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/doe_ref_pre_1980/doe_ref_pre_1980.CoilHeatingGas.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/doe_ref_pre_1980/doe_ref_pre_1980.Model.elevators.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/nrel_nze_ready_2017/nrel_zne_ready_2017.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.College.rb +7 -7
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.Courthouse.rb +8 -8
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.FullServiceRestaurant.rb +14 -14
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.HighRiseApartment.rb +9 -9
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.Hospital.rb +16 -16
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.Laboratory.rb +7 -7
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeDataCenterHighITE.rb +8 -8
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeDataCenterLowITE.rb +8 -8
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeHotel.rb +11 -11
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeOffice.rb +7 -7
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeOfficeDetailed.rb +9 -9
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.MediumOffice.rb +8 -8
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.MediumOfficeDetailed.rb +11 -11
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.MidriseApartment.rb +9 -9
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.Outpatient.rb +19 -19
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.PrimarySchool.rb +10 -10
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.QuickServiceRestaurant.rb +13 -13
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.RetailStandalone.rb +6 -6
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.RetailStripmall.rb +6 -6
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SecondarySchool.rb +9 -9
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SmallDataCenterHighITE.rb +8 -8
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SmallDataCenterLowITE.rb +8 -8
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SmallHotel.rb +8 -8
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SmallOffice.rb +8 -8
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SmallOfficeDetailed.rb +11 -11
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SuperMarket.rb +10 -10
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SuperTallBuilding.rb +19 -19
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.TallBuilding.rb +18 -18
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.Warehouse.rb +6 -6
- data/lib/openstudio-standards/prototypes/common/do_not_edit_metaclasses.rb +957 -957
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.AirConditionerVariableRefrigerantFlow.rb +1 -1
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilCoolingWaterToAirHeatPumpEquationFit.rb +84 -16
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingDXSingleSpeed.rb +1 -1
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingGas.rb +1 -1
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingWaterToAirHeatPumpEquationFit.rb +61 -10
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.ControllerWaterCoil.rb +1 -1
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoolingTower.rb +1 -1
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Fan.rb +1 -1
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanConstantVolume.rb +1 -1
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanOnOff.rb +1 -1
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanVariableVolume.rb +1 -1
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanZoneExhaust.rb +1 -1
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.HeatExchangerAirToAirSensibleAndLatent.rb +2 -2
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.exterior_lights.rb +4 -4
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.hvac.rb +4 -4
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.rb +43 -30
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.swh.rb +1 -1
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.ServiceWaterHeating.rb +18 -11
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.SizingSystem.rb +1 -1
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.hvac_systems.rb +774 -117
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.radiant_system_controls.rb +340 -481
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.refrigeration.rb +3 -3
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.utilities.rb +3 -3
- data/lib/openstudio-standards/prototypes/common/prototype_metaprogramming.rb +22 -22
- data/lib/openstudio-standards/prototypes/deer/deer.Model.rb +1 -1
- data/lib/openstudio-standards/qaqc/calibration.rb +131 -0
- data/lib/openstudio-standards/qaqc/create_results.rb +983 -0
- data/lib/openstudio-standards/qaqc/envelope.rb +399 -0
- data/lib/openstudio-standards/qaqc/eui.rb +213 -0
- data/lib/openstudio-standards/qaqc/hvac.rb +1943 -0
- data/lib/openstudio-standards/qaqc/internal_loads.rb +568 -0
- data/lib/openstudio-standards/qaqc/reporting.rb +141 -0
- data/lib/openstudio-standards/qaqc/schedules.rb +129 -0
- data/lib/openstudio-standards/qaqc/service_water_heating.rb +273 -0
- data/lib/openstudio-standards/qaqc/weather_files.rb +497 -0
- data/lib/openstudio-standards/qaqc/zone_conditions.rb +278 -0
- data/lib/openstudio-standards/schedules/create.rb +364 -0
- data/lib/openstudio-standards/schedules/information.rb +169 -0
- data/lib/openstudio-standards/schedules/modify.rb +445 -0
- data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +110 -71
- data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctParallelPIUReheat.rb +3 -3
- data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctVAVReheat.rb +4 -4
- data/lib/openstudio-standards/standards/Standards.BoilerHotWater.rb +2 -1
- data/lib/openstudio-standards/standards/Standards.ChillerElectricEIR.rb +16 -10
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXSingleSpeed.rb +4 -4
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXTwoSpeed.rb +1 -1
- data/lib/openstudio-standards/standards/Standards.CoilCoolingWaterToAirHeatPumpEquationFit.rb +1 -1
- data/lib/openstudio-standards/standards/Standards.CoilDX.rb +4 -4
- data/lib/openstudio-standards/standards/Standards.CoilHeatingDXMultiSpeed.rb +1 -1
- data/lib/openstudio-standards/standards/Standards.CoilHeatingDXSingleSpeed.rb +5 -5
- data/lib/openstudio-standards/standards/Standards.CoilHeatingGas.rb +1 -1
- data/lib/openstudio-standards/standards/Standards.CoilHeatingGasMultiStage.rb +1 -1
- data/lib/openstudio-standards/standards/Standards.CoilHeatingWaterToAirHeatPumpEquationFit.rb +1 -1
- data/lib/openstudio-standards/standards/Standards.Construction.rb +17 -18
- data/lib/openstudio-standards/standards/Standards.CoolingTower.rb +6 -6
- data/lib/openstudio-standards/standards/Standards.CoolingTowerSingleSpeed.rb +1 -1
- data/lib/openstudio-standards/standards/Standards.CoolingTowerTwoSpeed.rb +1 -1
- data/lib/openstudio-standards/standards/Standards.CoolingTowerVariableSpeed.rb +1 -1
- data/lib/openstudio-standards/standards/Standards.Fan.rb +6 -12
- data/lib/openstudio-standards/standards/Standards.FanVariableVolume.rb +2 -2
- data/lib/openstudio-standards/standards/Standards.FluidCooler.rb +1 -1
- data/lib/openstudio-standards/standards/Standards.HeaderedPumpsVariableSpeed.rb +1 -1
- data/lib/openstudio-standards/standards/Standards.HeatExchangerSensLat.rb +3 -3
- data/lib/openstudio-standards/standards/Standards.Model.rb +411 -261
- data/lib/openstudio-standards/standards/Standards.PlanarSurface.rb +2 -2
- data/lib/openstudio-standards/standards/Standards.PlantLoop.rb +94 -29
- data/lib/openstudio-standards/standards/Standards.Pump.rb +2 -2
- data/lib/openstudio-standards/standards/Standards.ScheduleConstant.rb +2 -2
- data/lib/openstudio-standards/standards/Standards.ScheduleRuleset.rb +14 -14
- data/lib/openstudio-standards/standards/Standards.Space.rb +37 -30
- data/lib/openstudio-standards/standards/Standards.SpaceType.rb +38 -29
- data/lib/openstudio-standards/standards/Standards.SubSurface.rb +7 -7
- data/lib/openstudio-standards/standards/Standards.Surface.rb +13 -13
- data/lib/openstudio-standards/standards/Standards.ThermalZone.rb +109 -66
- data/lib/openstudio-standards/standards/Standards.WaterHeaterMixed.rb +11 -4
- data/lib/openstudio-standards/standards/Standards.ZoneHVACComponent.rb +6 -6
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.AirLoopHVAC.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.PlantLoop.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.Space.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/ashrae_90_1_2007.Space.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.AirLoopHVAC.rb +4 -4
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.Space.rb +4 -4
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirLoopHVAC.rb +4 -4
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.CoolingTowerVariableSpeed.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.Model.rb +5 -21
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.Space.rb +4 -4
- 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 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.AirLoopHVAC.rb +36 -4
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.CoolingTowerVariableSpeed.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.Space.rb +4 -4
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.ZoneHVACComponent.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/comstock_ashrae_90_1_2016/comstock_ashrae_90_1_2016.AirLoopHVAC.rb +26 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirLoopHVAC.rb +53 -10
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.CoolingTowerVariableSpeed.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Space.rb +6 -6
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.ZoneHVACComponent.rb +2 -2
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/comstock_ashrae_90_1_2019/comstock_ashrae_90_1_2019.AirLoopHVAC.rb +26 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.curves.json +211 -211
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/data/doe_ref_1980_2004.economizers.json +14 -14
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/doe_ref_1980_2004.AirLoopHVAC.rb +4 -4
- 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 +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/data/doe_ref_pre_1980.economizers.json +14 -14
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/doe_ref_pre_1980.AirLoopHVAC.rb +4 -4
- 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 +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.AirLoopHVAC.rb +6 -6
- data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.CoolingTowerVariableSpeed.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.PlantLoop.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.Space.rb +4 -4
- data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.AirLoopHVAC.rb +6 -6
- data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.CoolingTowerVariableSpeed.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.PlantLoop.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.Space.rb +4 -4
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.AirLoopHVAC.rb +22 -28
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.AirTerminalSingleDuctParallelPIUReheat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.AirTerminalSingleDuctVAVReheat.rb +2 -2
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.BoilerHotWater.rb +1 -74
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.ChillerElectricEIR.rb +7 -59
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilCoolingDXSingleSpeed.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilCoolingDXTwoSpeed.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilDX.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilHeatingDXSingleSpeed.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilHeatingGas.rb +1 -21
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.DesignSpecificationOutdoorAir.rb +101 -0
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.FanConstantVolume.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.FanOnOff.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.FanVariableVolume.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.HeatExchangerSensLat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.Model.rb +643 -526
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.PlanarSurface.rb +8 -2
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.PlantLoop.rb +17 -77
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.Space.rb +74 -16
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.SpaceType.rb +96 -44
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.Surface.rb +6 -6
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.ThermalZone.rb +18 -6
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.ZoneHVACComponent.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.rb +328 -74
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/ashrae_90_1_prm_2019.Model.rb +0 -118
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/ashrae_90_1_prm_2019.rb +2 -1
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.heat_rejection.json +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/baseline_outdoor_air.md +35 -0
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/set_plug_load_measures.md +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/ashrae_90_1_prm.UserData.rb +228 -0
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_enums.rb +131 -0
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_space.csv +1 -1
- data/lib/openstudio-standards/standards/cbes/cbes.AirLoopHVAC.rb +5 -5
- data/lib/openstudio-standards/standards/cbes/cbes.Model.rb +1 -1
- data/lib/openstudio-standards/standards/cbes/cbes.PlantLoop.rb +1 -1
- data/lib/openstudio-standards/standards/cbes/cbes.Space.rb +1 -1
- data/lib/openstudio-standards/standards/cbes/cbes_t24_2005/cbes_t24_2005.Space.rb +1 -1
- data/lib/openstudio-standards/standards/cbes/cbes_t24_2008/cbes_t24_2008.Space.rb +1 -1
- data/lib/openstudio-standards/standards/deer/deer.AirLoopHVAC.rb +109 -27
- data/lib/openstudio-standards/standards/deer/deer.Space.rb +1 -1
- data/lib/openstudio-standards/standards/deer/deer_1985/data/deer_1985.economizers.json +246 -4
- data/lib/openstudio-standards/standards/deer/deer_1996/data/deer_1996.economizers.json +246 -4
- data/lib/openstudio-standards/standards/deer/deer_2003/data/deer_2003.economizers.json +246 -4
- data/lib/openstudio-standards/standards/deer/deer_2003/deer_2003.ThermalZone.rb +18 -18
- data/lib/openstudio-standards/standards/deer/deer_2007/data/deer_2007.economizers.json +246 -4
- data/lib/openstudio-standards/standards/deer/deer_2007/deer_2007.ThermalZone.rb +18 -18
- data/lib/openstudio-standards/standards/deer/deer_2011/data/deer_2011.economizers.json +246 -4
- data/lib/openstudio-standards/standards/deer/deer_2011/deer_2011.ThermalZone.rb +18 -18
- data/lib/openstudio-standards/standards/deer/deer_2014/data/deer_2014.economizers.json +248 -6
- data/lib/openstudio-standards/standards/deer/deer_2014/deer_2014.Space.rb +3 -3
- data/lib/openstudio-standards/standards/deer/deer_2014/deer_2014.ThermalZone.rb +18 -18
- data/lib/openstudio-standards/standards/deer/deer_2015/data/deer_2015.economizers.json +248 -6
- data/lib/openstudio-standards/standards/deer/deer_2015/deer_2015.Space.rb +3 -3
- data/lib/openstudio-standards/standards/deer/deer_2015/deer_2015.ThermalZone.rb +18 -18
- data/lib/openstudio-standards/standards/deer/deer_2017/data/deer_2017.economizers.json +248 -6
- data/lib/openstudio-standards/standards/deer/deer_2017/deer_2017.Space.rb +3 -3
- data/lib/openstudio-standards/standards/deer/deer_2017/deer_2017.ThermalZone.rb +18 -18
- data/lib/openstudio-standards/standards/deer/deer_2020/data/deer_2020.economizers.json +248 -6
- data/lib/openstudio-standards/standards/deer/deer_2020/deer_2020.AirLoopHVAC.rb +18 -5
- data/lib/openstudio-standards/standards/deer/deer_2020/deer_2020.FanVariableVolume.rb +1 -1
- data/lib/openstudio-standards/standards/deer/deer_2020/deer_2020.Space.rb +3 -3
- data/lib/openstudio-standards/standards/deer/deer_2020/deer_2020.ThermalZone.rb +18 -18
- data/lib/openstudio-standards/standards/deer/deer_2025/data/deer_2025.economizers.json +248 -6
- data/lib/openstudio-standards/standards/deer/deer_2025/deer_2025.AirLoopHVAC.rb +3 -3
- data/lib/openstudio-standards/standards/deer/deer_2025/deer_2025.FanVariableVolume.rb +1 -1
- data/lib/openstudio-standards/standards/deer/deer_2025/deer_2025.Space.rb +3 -3
- data/lib/openstudio-standards/standards/deer/deer_2030/data/deer_2030.economizers.json +248 -6
- data/lib/openstudio-standards/standards/deer/deer_2030/data/deer_2030.heat_pumps.json +2 -2
- data/lib/openstudio-standards/standards/deer/deer_2030/deer_2030.AirLoopHVAC.rb +3 -3
- data/lib/openstudio-standards/standards/deer/deer_2030/deer_2030.FanVariableVolume.rb +1 -1
- data/lib/openstudio-standards/standards/deer/deer_2030/deer_2030.Space.rb +3 -3
- data/lib/openstudio-standards/standards/deer/deer_2035/data/deer_2035.economizers.json +248 -6
- data/lib/openstudio-standards/standards/deer/deer_2035/deer_2035.AirLoopHVAC.rb +3 -3
- data/lib/openstudio-standards/standards/deer/deer_2035/deer_2035.FanVariableVolume.rb +1 -1
- data/lib/openstudio-standards/standards/deer/deer_2035/deer_2035.Space.rb +3 -3
- data/lib/openstudio-standards/standards/deer/deer_2040/data/deer_2040.economizers.json +248 -6
- data/lib/openstudio-standards/standards/deer/deer_2040/deer_2040.AirLoopHVAC.rb +3 -3
- data/lib/openstudio-standards/standards/deer/deer_2040/deer_2040.FanVariableVolume.rb +1 -1
- data/lib/openstudio-standards/standards/deer/deer_2040/deer_2040.Space.rb +3 -3
- data/lib/openstudio-standards/standards/deer/deer_2045/data/deer_2045.economizers.json +260 -0
- data/lib/openstudio-standards/standards/deer/deer_2045/deer_2045.AirLoopHVAC.rb +3 -3
- data/lib/openstudio-standards/standards/deer/deer_2045/deer_2045.FanVariableVolume.rb +1 -1
- data/lib/openstudio-standards/standards/deer/deer_2045/deer_2045.Space.rb +3 -3
- data/lib/openstudio-standards/standards/deer/deer_2050/data/deer_2050.economizers.json +248 -6
- data/lib/openstudio-standards/standards/deer/deer_2050/deer_2050.AirLoopHVAC.rb +3 -3
- data/lib/openstudio-standards/standards/deer/deer_2050/deer_2050.FanVariableVolume.rb +1 -1
- data/lib/openstudio-standards/standards/deer/deer_2050/deer_2050.Space.rb +3 -3
- data/lib/openstudio-standards/standards/deer/deer_2055/data/deer_2055.economizers.json +248 -6
- data/lib/openstudio-standards/standards/deer/deer_2055/deer_2055.AirLoopHVAC.rb +3 -3
- data/lib/openstudio-standards/standards/deer/deer_2055/deer_2055.FanVariableVolume.rb +1 -1
- data/lib/openstudio-standards/standards/deer/deer_2055/deer_2055.Space.rb +3 -3
- data/lib/openstudio-standards/standards/deer/deer_2060/data/deer_2060.economizers.json +248 -6
- data/lib/openstudio-standards/standards/deer/deer_2060/deer_2060.AirLoopHVAC.rb +3 -3
- data/lib/openstudio-standards/standards/deer/deer_2060/deer_2060.FanVariableVolume.rb +1 -1
- data/lib/openstudio-standards/standards/deer/deer_2060/deer_2060.Space.rb +3 -3
- data/lib/openstudio-standards/standards/deer/deer_2065/data/deer_2065.economizers.json +248 -6
- data/lib/openstudio-standards/standards/deer/deer_2065/deer_2065.AirLoopHVAC.rb +3 -3
- data/lib/openstudio-standards/standards/deer/deer_2065/deer_2065.FanVariableVolume.rb +1 -1
- data/lib/openstudio-standards/standards/deer/deer_2065/deer_2065.Space.rb +3 -3
- data/lib/openstudio-standards/standards/deer/deer_2070/data/deer_2070.economizers.json +248 -6
- data/lib/openstudio-standards/standards/deer/deer_2070/deer_2070.AirLoopHVAC.rb +3 -3
- data/lib/openstudio-standards/standards/deer/deer_2070/deer_2070.FanVariableVolume.rb +1 -1
- data/lib/openstudio-standards/standards/deer/deer_2070/deer_2070.Space.rb +3 -3
- data/lib/openstudio-standards/standards/deer/deer_2075/data/deer_2075.economizers.json +248 -6
- data/lib/openstudio-standards/standards/deer/deer_2075/deer_2075.AirLoopHVAC.rb +3 -3
- data/lib/openstudio-standards/standards/deer/deer_2075/deer_2075.FanVariableVolume.rb +1 -1
- data/lib/openstudio-standards/standards/deer/deer_2075/deer_2075.Space.rb +3 -3
- data/lib/openstudio-standards/standards/deer/deer_pre_1975/data/deer_pre_1975.economizers.json +246 -4
- data/lib/openstudio-standards/standards/necb/BTAP1980TO2010/data/space_types.json +447 -223
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/building_envelope.rb +1 -1
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/data/space_types.json +447 -223
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_systems.rb +5 -2
- data/lib/openstudio-standards/standards/necb/ECMS/data/chiller_types.json +25 -0
- data/lib/openstudio-standards/standards/necb/ECMS/data/chillers.json +44 -0
- data/lib/openstudio-standards/standards/necb/ECMS/data/curves.json +225 -0
- data/lib/openstudio-standards/standards/necb/ECMS/ecms.rb +2 -2
- data/lib/openstudio-standards/standards/necb/ECMS/hvac_systems.rb +193 -73
- data/lib/openstudio-standards/standards/necb/ECMS/pv_ground.rb +1 -1
- data/lib/openstudio-standards/standards/necb/NECB2011/autozone.rb +10 -4
- data/lib/openstudio-standards/standards/necb/NECB2011/beps_compliance_path.rb +7 -7
- data/lib/openstudio-standards/standards/necb/NECB2011/building_envelope.rb +4 -5
- data/lib/openstudio-standards/standards/necb/NECB2011/data/chiller_types.json +32 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/data/chillers.json +1 -1
- data/lib/openstudio-standards/standards/necb/NECB2011/data/constants.json +36 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/data/fuel_type_sets.json +7 -7
- data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/NorthernEducation.osm +47587 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/NorthernHealthCare.osm +49764 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/Warehouse.osm +283 -297
- data/lib/openstudio-standards/standards/necb/NECB2011/data/space_type_unit_definitions.txt +2 -1
- data/lib/openstudio-standards/standards/necb/NECB2011/data/space_types.json +447 -223
- data/lib/openstudio-standards/standards/necb/NECB2011/data/standards_data.rb +3 -3
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_1_multi_speed.rb +1 -1
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb +49 -27
- data/lib/openstudio-standards/standards/necb/NECB2011/necb_2011.rb +400 -202
- data/lib/openstudio-standards/standards/necb/NECB2011/service_water_heating.rb +4 -4
- data/lib/openstudio-standards/standards/necb/NECB2015/data/space_types.json +637 -318
- data/lib/openstudio-standards/standards/necb/NECB2015/hvac_systems.rb +18 -1
- data/lib/openstudio-standards/standards/necb/NECB2015/necb_2015.rb +3 -3
- data/lib/openstudio-standards/standards/necb/NECB2017/data/space_types.json +637 -318
- data/lib/openstudio-standards/standards/necb/NECB2017/hvac_systems.rb +1 -1
- data/lib/openstudio-standards/standards/necb/NECB2017/necb_2017.rb +3 -3
- data/lib/openstudio-standards/standards/necb/NECB2020/building_envelope.rb +1 -1
- data/lib/openstudio-standards/standards/necb/NECB2020/data/space_types.json +615 -307
- data/lib/openstudio-standards/standards/necb/NECB2020/service_water_heating.rb +4 -4
- data/lib/openstudio-standards/standards/necb/common/btap_data.rb +10 -5
- data/lib/openstudio-standards/standards/necb/common/btap_datapoint.rb +1 -1
- data/lib/openstudio-standards/utilities/assertion.rb +128 -0
- data/lib/openstudio-standards/utilities/logging.rb +2 -3
- data/lib/openstudio-standards/utilities/object_info.rb +39 -18
- data/lib/openstudio-standards/utilities/schedule_translator.rb +8 -6
- data/lib/openstudio-standards/utilities/simulation.rb +24 -11
- data/lib/openstudio-standards/utilities/sqlfile.rb +10 -5
- data/lib/openstudio-standards/version.rb +1 -1
- data/lib/openstudio-standards/weather/Weather.Model.rb +8 -9
- data/lib/openstudio-standards/weather/Weather.stat_file.rb +3 -3
- data/lib/openstudio-standards/weather/information.rb +35 -0
- data/lib/openstudio-standards.rb +69 -5
- metadata +52 -16
- data/data/standards/OpenStudio_Standards-deer-ALL-comstock(space_types).xlsx +0 -0
- data/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVAC.rb +0 -59
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingWater.rb +0 -13
- data/lib/openstudio-standards/hvac_sizing/Siz.HVACComponent.rb +0 -36
- data/lib/openstudio-standards/hvac_sizing/Siz.HeatingCoolingFuels.rb +0 -898
- data/lib/openstudio-standards/hvac_sizing/Siz.Model.rb +0 -126
- data/lib/openstudio-standards/hvac_sizing/Siz.ThermalZone.rb +0 -356
- data/lib/openstudio-standards/prototypes/ashrae_90_1/nrel_nze_ready_2017/nrel_zne_ready_2017.Model.rb +0 -35
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoolingTower.rb +0 -110
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoolingTowerVariableSpeed.rb +0 -5
@@ -0,0 +1,791 @@
|
|
1
|
+
# Methods to create typical models
|
2
|
+
module OpenstudioStandards
|
3
|
+
module CreateTypical
|
4
|
+
# @!group Space Type Blending
|
5
|
+
|
6
|
+
# get all loads for a space or space type and place in hash by type
|
7
|
+
#
|
8
|
+
# @param space_or_space_type [OpenStudio::Model::Space, OpenStuido::Model::SpaceType] OpenStudio Space or SpaceType object
|
9
|
+
# @return [Hash] Hash of internal load properties
|
10
|
+
def self.space_or_space_type_gather_internal_loads(space_or_space_type)
|
11
|
+
internal_load_hash = {}
|
12
|
+
|
13
|
+
# gather different load types (all vectors except dsoa which will be turned into an array)
|
14
|
+
internal_load_hash[:internal_mass] = space_or_space_type.internalMass
|
15
|
+
internal_load_hash[:people] = space_or_space_type.people
|
16
|
+
internal_load_hash[:lights] = space_or_space_type.lights
|
17
|
+
internal_load_hash[:luminaires] = space_or_space_type.luminaires
|
18
|
+
internal_load_hash[:electric_equipment] = space_or_space_type.electricEquipment
|
19
|
+
internal_load_hash[:gas_equipment] = space_or_space_type.gasEquipment
|
20
|
+
internal_load_hash[:hot_water_equipment] = space_or_space_type.hotWaterEquipment
|
21
|
+
internal_load_hash[:steam_equipment] = space_or_space_type.steamEquipment
|
22
|
+
internal_load_hash[:other_equipment] = space_or_space_type.otherEquipment
|
23
|
+
internal_load_hash[:space_infiltration_design_flow_rates] = space_or_space_type.spaceInfiltrationDesignFlowRates
|
24
|
+
internal_load_hash[:space_infiltration_effective_leakage_areas] = space_or_space_type.spaceInfiltrationEffectiveLeakageAreas
|
25
|
+
if space_or_space_type.designSpecificationOutdoorAir.nil?
|
26
|
+
internal_load_hash[:design_specification_outdoor_air] = []
|
27
|
+
else
|
28
|
+
internal_load_hash[:design_specification_outdoor_air] = [space_or_space_type.designSpecificationOutdoorAir]
|
29
|
+
end
|
30
|
+
if space_or_space_type.class.to_s == 'OpenStudio::Model::Space'
|
31
|
+
internal_load_hash[:water_use_equipment] = space_or_space_type.waterUseEquipment # don't think this reports
|
32
|
+
internal_load_hash[:daylighting_controls] = space_or_space_type.daylightingControls
|
33
|
+
end
|
34
|
+
|
35
|
+
# @todo warn if daylighting controls in spaces (should I alter fraction controled based on lighting per area ratio)
|
36
|
+
|
37
|
+
return internal_load_hash
|
38
|
+
end
|
39
|
+
|
40
|
+
# blend_space_types_from_floor_area_ratio used when working from space type ratio and un-assigned space types
|
41
|
+
#
|
42
|
+
# @param model [OpenStudio::Model::Model] OpenStudio model object
|
43
|
+
# @param space_type_ratio_hash [Hash] Hash where the keys are OpenStudio SpaceType objects and hash includes the floor area ratio
|
44
|
+
# @option space_type_ratio_hash [Double] :floor_area_ratio
|
45
|
+
# @return [OpenStudio::Model::SpaceType] Blended OpenStudio SpaceType object
|
46
|
+
def self.blend_space_types_from_floor_area_ratio(model, space_type_ratio_hash)
|
47
|
+
# create stub blended space type
|
48
|
+
blended_space_type = OpenStudio::Model::SpaceType.new(model)
|
49
|
+
blended_space_type.setName('Blended Space Type')
|
50
|
+
|
51
|
+
# @todo inspect people instances and see if any defs are not normalized per area. If find any issue warning
|
52
|
+
|
53
|
+
# gather inputs
|
54
|
+
sum_of_num_people_per_m_2 = 0.0
|
55
|
+
space_type_ratio_hash.each do |space_type, ratios|
|
56
|
+
# get number of peple per m 2 for space type. Can do this without looking at instances
|
57
|
+
sum_of_num_people_per_m_2 += space_type.getPeoplePerFloorArea(1.0)
|
58
|
+
end
|
59
|
+
|
60
|
+
# raw num_people_ratios
|
61
|
+
sum_area_adj_num_people_ratio = 0.0
|
62
|
+
space_type_ratio_hash.each do |space_type, ratios|
|
63
|
+
# calculate num_people_ratios
|
64
|
+
area_adj_num_people_ratio = (space_type.getPeoplePerFloorArea(1.0) / sum_of_num_people_per_m_2) * ratios[:floor_area_ratio]
|
65
|
+
sum_area_adj_num_people_ratio += area_adj_num_people_ratio
|
66
|
+
end
|
67
|
+
|
68
|
+
# set ratios
|
69
|
+
largest_space_type = nil
|
70
|
+
largest_space_type_ratio = 0.00
|
71
|
+
space_type_ratio_hash.each do |space_type, ratios|
|
72
|
+
# calculate num_people_ratios
|
73
|
+
area_adj_num_people_ratio = (space_type.getPeoplePerFloorArea(1.0) / sum_of_num_people_per_m_2) * ratios[:floor_area_ratio]
|
74
|
+
normalized_area_adj_num_people_ratio = area_adj_num_people_ratio / sum_area_adj_num_people_ratio
|
75
|
+
|
76
|
+
# ratios[:floor_area_ratio] is already defined
|
77
|
+
ratios[:num_people_ratio] = normalized_area_adj_num_people_ratio.round(4)
|
78
|
+
ratios[:ext_surface_area_ratio] = ratios[:floor_area_ratio]
|
79
|
+
ratios[:ext_wall_area_ratio] = ratios[:floor_area_ratio]
|
80
|
+
ratios[:volume_ratio] = ratios[:floor_area_ratio]
|
81
|
+
|
82
|
+
# update largest space type values
|
83
|
+
if largest_space_type.nil?
|
84
|
+
largest_space_type = space_type
|
85
|
+
largest_space_type_ratio = ratios[:floor_area_ratio]
|
86
|
+
elsif ratios[:floor_area_ratio] > largest_space_type_ratio
|
87
|
+
largest_space_type = space_type
|
88
|
+
largest_space_type_ratio = ratios[:floor_area_ratio]
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
if largest_space_type.nil?
|
93
|
+
OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.CreateTypical', "Didn't find any space types in model matching user argument string.")
|
94
|
+
return false
|
95
|
+
end
|
96
|
+
|
97
|
+
# set standards info for space type based on largest ratio (for use to apply HVAC system)
|
98
|
+
standards_building_type = largest_space_type.standardsBuildingType
|
99
|
+
standards_space_type = largest_space_type.standardsSpaceType
|
100
|
+
if standards_building_type.is_initialized
|
101
|
+
blended_space_type.setStandardsBuildingType(standards_building_type.get)
|
102
|
+
end
|
103
|
+
if standards_space_type.is_initialized
|
104
|
+
blended_space_type.setStandardsSpaceType(standards_space_type.get)
|
105
|
+
end
|
106
|
+
|
107
|
+
# loop therough space types to get instances from and then remove
|
108
|
+
space_type_ratio_hash.each do |space_type, ratios|
|
109
|
+
# blend internal loads (nil is space_hash)
|
110
|
+
space_type_load_instances = OpenstudioStandards::CreateTypical.blend_internal_loads(model, space_type, blended_space_type, ratios, model.getBuilding.floorArea, nil)
|
111
|
+
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CreateTypical', "Blending #{space_type.name.get} with floor area ratio of #{ratios[:floor_area_ratio]} and number of people ratio of #{ratios[:num_people_ratio]}.")
|
112
|
+
|
113
|
+
# delete space type. Don't want to leave in model since internal loads have been removed from it
|
114
|
+
space_type.remove
|
115
|
+
end
|
116
|
+
|
117
|
+
return blended_space_type
|
118
|
+
end
|
119
|
+
|
120
|
+
# takes in space type hash where each hash value is a collection of space types. Each collection is blended into it's own space type
|
121
|
+
# If key for any collection is "Building" it will also opererate on spaces that don't have space type assigned
|
122
|
+
# where a space assigned to a space type from a collection has space loads, those space loads are normalized and added to the blended space type
|
123
|
+
# load instances are maintained so that they can haave unique schedules, and can have EE measures selectivly applied.
|
124
|
+
#
|
125
|
+
# @param model [OpenStudio::Model::Model] OpenStudio model object
|
126
|
+
# @param space_type_hash [Hash] Hash of space type information
|
127
|
+
# @return [Array<OpenStudio::Model::SpaceType>] Array of OpenStudio SpaceType objects
|
128
|
+
def self.blend_space_type_collections(model, space_type_hash)
|
129
|
+
# loop through building type hash to create multiple blends
|
130
|
+
space_type_hash.each do |collection_name, space_types|
|
131
|
+
if collection_name == 'Building'
|
132
|
+
space_array = model.getSpaces.sort # use all space types, not just space types passed in
|
133
|
+
else
|
134
|
+
space_array = []
|
135
|
+
space_types.each do |space_type|
|
136
|
+
space_array.concat(space_type.spaces)
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
# calculate metrics for all spaces included in building area to pass into space_type and space hash
|
141
|
+
# note: in the future this may be a subset of spaces if blending into multiple space types vs. just one.
|
142
|
+
collection_totals = {}
|
143
|
+
collection_totals[:floor_area] = 0.0
|
144
|
+
collection_totals[:num_people] = 0.0
|
145
|
+
collection_totals[:ext_surface_area] = 0.0
|
146
|
+
collection_totals[:ext_wall_area] = 0.0
|
147
|
+
collection_totals[:volume] = 0.0
|
148
|
+
space_array.each do |space|
|
149
|
+
next if !space.partofTotalFloorArea
|
150
|
+
|
151
|
+
collection_totals[:floor_area] += space.floorArea * space.multiplier
|
152
|
+
collection_totals[:num_people] += space.numberOfPeople * space.multiplier
|
153
|
+
collection_totals[:ext_surface_area] += space.exteriorArea * space.multiplier
|
154
|
+
collection_totals[:ext_wall_area] += space.exteriorWallArea * space.multiplier
|
155
|
+
collection_totals[:volume] += space.volume * space.multiplier
|
156
|
+
end
|
157
|
+
area_ip = OpenStudio.convert(collection_totals[:floor_area], 'm^2', 'ft^2').get
|
158
|
+
area_ip_neat = OpenStudio.toNeatString(area_ip, 2, true)
|
159
|
+
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CreateTypical', "#{collection_name} area is #{area_ip_neat} ft^2, number of people is #{collection_totals[:num_people].round(0)}.")
|
160
|
+
|
161
|
+
# create hash of space types and floor area for all space types with area > 0 when spaces included in floor area
|
162
|
+
# code to gather space type areas came from openstudio_results measure.
|
163
|
+
space_type_hash = {}
|
164
|
+
largest_space_type = nil
|
165
|
+
largest_space_type_ratio = 0.00
|
166
|
+
space_types.each do |space_type|
|
167
|
+
next if space_type.floorArea == 0
|
168
|
+
|
169
|
+
space_type_totals = {}
|
170
|
+
space_type_totals[:floor_area] = 0.0
|
171
|
+
space_type_totals[:num_people] = 0.0
|
172
|
+
space_type_totals[:ext_surface_area] = 0.0
|
173
|
+
space_type_totals[:ext_wall_area] = 0.0
|
174
|
+
space_type_totals[:volume] = 0.0
|
175
|
+
# loop through spaces so I can skip if not included in floor area
|
176
|
+
space_type.spaces.each do |space|
|
177
|
+
next if !space.partofTotalFloorArea
|
178
|
+
|
179
|
+
space_type_totals[:floor_area] += space.floorArea * space.multiplier
|
180
|
+
space_type_totals[:num_people] += space.numberOfPeople * space.multiplier
|
181
|
+
space_type_totals[:ext_surface_area] += space.exteriorArea * space.multiplier
|
182
|
+
space_type_totals[:ext_wall_area] += space.exteriorWallArea * space.multiplier
|
183
|
+
space_type_totals[:volume] += space.volume * space.multiplier
|
184
|
+
end
|
185
|
+
|
186
|
+
# update largest space type values
|
187
|
+
if largest_space_type.nil?
|
188
|
+
largest_space_type = space_type
|
189
|
+
largest_space_type_ratio = space_type_totals[:floor_area]
|
190
|
+
elsif space_type_totals[:floor_area] > largest_space_type_ratio
|
191
|
+
largest_space_type = space_type
|
192
|
+
largest_space_type_ratio = space_type_totals[:floor_area]
|
193
|
+
end
|
194
|
+
|
195
|
+
# gather internal loads
|
196
|
+
space_type_loads_hash = OpenstudioStandards::CreateTypical.space_or_space_type_gather_internal_loads(space_type)
|
197
|
+
|
198
|
+
# don't add to hash if no spaces used for space type are included in building area (e.g. plenum and attic)
|
199
|
+
# @todo log these and decide what to do for them. Leave loads alone or remove, do they add to blend at all?
|
200
|
+
next if space_type_totals[:floor_area] == 0
|
201
|
+
|
202
|
+
if !space_type_totals[:floor_area] = space_type.floorArea
|
203
|
+
# @todo not sure if these would ever show as different
|
204
|
+
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CreateTypical', "Some but not all spaces of #{space_type.name} space type are not included in the building floor area. May have unexpected results")
|
205
|
+
end
|
206
|
+
|
207
|
+
# populate space type hash
|
208
|
+
space_type_hash[space_type] = { int_loads: space_type_loads_hash, totals: space_type_totals }
|
209
|
+
end
|
210
|
+
|
211
|
+
# report initial condition of model
|
212
|
+
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CreateTypical', "#{collection_name} accounts for #{space_type_hash.size} space types.")
|
213
|
+
|
214
|
+
if collection_name == 'Building'
|
215
|
+
# count area of spaces that have no space type
|
216
|
+
no_space_type_area_counter = 0
|
217
|
+
model.getSpaces.sort.each do |space|
|
218
|
+
if space.spaceType.empty?
|
219
|
+
next if !space.partofTotalFloorArea
|
220
|
+
|
221
|
+
no_space_type_area_counter += space.floorArea * space.multiplier
|
222
|
+
end
|
223
|
+
end
|
224
|
+
floor_area_ratio = no_space_type_area_counter / collection_totals[:floor_area]
|
225
|
+
if floor_area_ratio > 0
|
226
|
+
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CreateTypical', "#{floor_area_ratio} fraction of building area is composed of spaces without space type assignments.")
|
227
|
+
end
|
228
|
+
end
|
229
|
+
|
230
|
+
# report the space ratio for hard spaces
|
231
|
+
space_hash = {}
|
232
|
+
space_array.each do |space|
|
233
|
+
next if !space.partofTotalFloorArea
|
234
|
+
|
235
|
+
space_loads_hash = OpenstudioStandards::CreateTypical.space_or_space_type_gather_internal_loads(space)
|
236
|
+
space_totals = {}
|
237
|
+
space_totals[:floor_area] = space.floorArea * space.multiplier
|
238
|
+
space_totals[:num_people] = space.numberOfPeople * space.multiplier
|
239
|
+
space_totals[:ext_surface_area] = space.exteriorArea * space.multiplier
|
240
|
+
space_totals[:ext_wall_area] = space.exteriorWallArea * space.multiplier
|
241
|
+
space_totals[:volume] = space.volume * space.multiplier
|
242
|
+
if !space_loads_hash[:daylighting_controls].empty?
|
243
|
+
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CreateTypical', "#{space.name} has one or more daylighting controls. Lighting loads from blended space type may affect lighting reduction from daylighting controls.")
|
244
|
+
end
|
245
|
+
if !space_loads_hash[:water_use_equipment].empty?
|
246
|
+
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CreateTypical', "One or more water use equipment objects are associated with space #{space.name}. This can't be moved to a space type.")
|
247
|
+
end
|
248
|
+
# note: If generating ratios without geometry can calculate people_ratio given space_types floor_area_ratio
|
249
|
+
space_hash[space] = { int_loads: space_loads_hash, totals: space_totals }
|
250
|
+
end
|
251
|
+
|
252
|
+
# create stub blended space type
|
253
|
+
blended_space_type = OpenStudio::Model::SpaceType.new(model)
|
254
|
+
blended_space_type.setName("#{collection_name} Blended Space Type")
|
255
|
+
|
256
|
+
# set standards info for space type based on largest ratio (for use to apply HVAC system)
|
257
|
+
standards_building_type = largest_space_type.standardsBuildingType
|
258
|
+
standards_space_type = largest_space_type.standardsSpaceType
|
259
|
+
if standards_building_type.is_initialized
|
260
|
+
blended_space_type.setStandardsBuildingType(standards_building_type.get)
|
261
|
+
end
|
262
|
+
if standards_space_type.is_initialized
|
263
|
+
blended_space_type.setStandardsSpaceType(standards_space_type.get)
|
264
|
+
end
|
265
|
+
|
266
|
+
# values from collection hash
|
267
|
+
collection_floor_area = collection_totals[:floor_area]
|
268
|
+
collection_num_people = collection_totals[:num_people]
|
269
|
+
collection_ext_surface_area = collection_totals[:ext_surface_area]
|
270
|
+
collection_ext_wall_area = collection_totals[:ext_wall_area]
|
271
|
+
collection_volume = collection_totals[:volume]
|
272
|
+
|
273
|
+
# loop through space that have one or more spaces included in the building area
|
274
|
+
space_type_hash.each do |space_type, hash|
|
275
|
+
# hard assign space load schedules before re-assign instances to blended space type
|
276
|
+
space_type.hardApplySpaceLoadSchedules
|
277
|
+
|
278
|
+
# vaules from space or space_type
|
279
|
+
floor_area = hash[:totals][:floor_area]
|
280
|
+
num_people = hash[:totals][:num_people]
|
281
|
+
ext_surface_area = hash[:totals][:ext_surface_area]
|
282
|
+
ext_wall_area = hash[:totals][:ext_wall_area]
|
283
|
+
volume = hash[:totals][:volume]
|
284
|
+
|
285
|
+
# ratios
|
286
|
+
ratios = {}
|
287
|
+
if collection_floor_area > 0
|
288
|
+
ratios[:floor_area_ratio] = floor_area / collection_floor_area
|
289
|
+
else
|
290
|
+
ratios[:floor_area_ratio] = 0.0
|
291
|
+
end
|
292
|
+
if collection_num_people > 0
|
293
|
+
ratios[:num_people_ratio] = num_people / collection_num_people
|
294
|
+
else
|
295
|
+
ratios[:num_people_ratio] = 0.0
|
296
|
+
end
|
297
|
+
if collection_ext_surface_area > 0
|
298
|
+
ratios[:ext_surface_area_ratio] = ext_surface_area / collection_ext_surface_area
|
299
|
+
else
|
300
|
+
ratios[:ext_surface_area_ratio] = 0.0
|
301
|
+
end
|
302
|
+
if collection_ext_wall_area > 0
|
303
|
+
ratios[:ext_wall_area_ratio] = ext_wall_area / collection_ext_wall_area
|
304
|
+
else
|
305
|
+
ratios[:ext_wall_area_ratio] = 0.0
|
306
|
+
end
|
307
|
+
if collection_volume > 0
|
308
|
+
ratios[:volume_ratio] = volume / collection_volume
|
309
|
+
else
|
310
|
+
ratios[:volume_ratio] = 0.0
|
311
|
+
end
|
312
|
+
|
313
|
+
# populate blended space type with space type loads
|
314
|
+
space_type_load_instances = OpenstudioStandards::CreateTypical.blend_internal_loads(model, space_type, blended_space_type, ratios, collection_floor_area, space_hash)
|
315
|
+
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CreateTypical', "Blending space type #{space_type.name}. Floor area ratio is #{(hash[:totals][:floor_area] / collection_totals[:floor_area]).round(3)}. People ratio is #{(hash[:totals][:num_people] / collection_totals[:num_people]).round(3)}")
|
316
|
+
|
317
|
+
# hard assign any constructions assigned by space types, except for space not included in the building area
|
318
|
+
if space_type.defaultConstructionSet.is_initialized
|
319
|
+
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CreateTypical', "Hard assigning constructions for #{space_type.name}.")
|
320
|
+
space_type.spaces.each(&:hardApplyConstructions)
|
321
|
+
end
|
322
|
+
|
323
|
+
# remove all space type assignments, except for spaces not included in building area.
|
324
|
+
space_type.spaces.each do |space|
|
325
|
+
next if !space.partofTotalFloorArea
|
326
|
+
|
327
|
+
space.resetSpaceType
|
328
|
+
end
|
329
|
+
|
330
|
+
# delete space type. Don't want to leave in model since internal loads have been removed from it
|
331
|
+
space_type.remove
|
332
|
+
end
|
333
|
+
|
334
|
+
# loop through spaces that are included in building area
|
335
|
+
space_hash.each do |space, hash|
|
336
|
+
# hard assign space load schedules before re-assign instances to blended space type
|
337
|
+
space.hardApplySpaceLoadSchedules
|
338
|
+
|
339
|
+
# vaules from space or space_type
|
340
|
+
floor_area = hash[:totals][:floor_area]
|
341
|
+
num_people = hash[:totals][:num_people]
|
342
|
+
ext_surface_area = hash[:totals][:ext_surface_area]
|
343
|
+
ext_wall_area = hash[:totals][:ext_wall_area]
|
344
|
+
volume = hash[:totals][:volume]
|
345
|
+
|
346
|
+
# ratios
|
347
|
+
ratios = {}
|
348
|
+
if collection_floor_area > 0
|
349
|
+
ratios[:floor_area_ratio] = floor_area / collection_floor_area
|
350
|
+
else
|
351
|
+
ratios[:floor_area_ratio] = 0.0
|
352
|
+
end
|
353
|
+
if collection_num_people > 0
|
354
|
+
ratios[:num_people_ratio] = num_people / collection_num_people
|
355
|
+
else
|
356
|
+
ratios[:num_people_ratio] = 0.0
|
357
|
+
end
|
358
|
+
if collection_ext_surface_area > 0
|
359
|
+
ratios[:ext_surface_area_ratio] = ext_surface_area / collection_ext_surface_area
|
360
|
+
else
|
361
|
+
ratios[:ext_surface_area_ratio] = 0.0
|
362
|
+
end
|
363
|
+
if collection_ext_wall_area > 0
|
364
|
+
ratios[:ext_wall_area_ratio] = ext_wall_area / collection_ext_wall_area
|
365
|
+
else
|
366
|
+
ratios[:ext_wall_area_ratio] = 0.0
|
367
|
+
end
|
368
|
+
if collection_volume > 0
|
369
|
+
ratios[:volume_ratio] = volume / collection_volume
|
370
|
+
else
|
371
|
+
ratios[:volume_ratio] = 0.0
|
372
|
+
end
|
373
|
+
|
374
|
+
# populate blended space type with space loads
|
375
|
+
space_load_instances = OpenstudioStandards::CreateTypical.blend_internal_loads(model, space, blended_space_type, ratios, collection_floor_area, space_hash)
|
376
|
+
next if space_load_instances.empty?
|
377
|
+
|
378
|
+
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CreateTypical', "Blending space #{space.name}. Floor area ratio is #{(hash[:totals][:floor_area] / collection_totals[:floor_area]).round(3)}. People ratio is #{(hash[:totals][:num_people] / collection_totals[:num_people]).round(3)}")
|
379
|
+
end
|
380
|
+
|
381
|
+
if collection_name == 'Building'
|
382
|
+
# assign blended space type to building
|
383
|
+
model.getBuilding.setSpaceType(blended_space_type)
|
384
|
+
building_space_type = model.getBuilding.spaceType
|
385
|
+
else
|
386
|
+
space_array.each do |space|
|
387
|
+
space.setSpaceType(blended_space_type)
|
388
|
+
end
|
389
|
+
end
|
390
|
+
end
|
391
|
+
|
392
|
+
return model.getSpaceTypes.sort
|
393
|
+
end
|
394
|
+
|
395
|
+
# blend internal loads used when working from existing model
|
396
|
+
#
|
397
|
+
# @param model [OpenStudio::Model::Model] OpenStudio model object
|
398
|
+
# @param source_space_or_space_type [OpenStudio::Model::Space, OpenStuido::Model::SpaceType] OpenStudio Space or SpaceType object
|
399
|
+
# @param target_space_type [OpenStuido::Model::SpaceType] target OpenStudio SpaceType object
|
400
|
+
# @param ratios [Hash] Hash of ratios
|
401
|
+
# @option ratios [Double] :floor_area_ratio
|
402
|
+
# @option ratios [Double] :num_people_ratio
|
403
|
+
# @option ratios [Double] :ext_surface_area_ratio
|
404
|
+
# @option ratios [Double] :ext_wall_area_ratio
|
405
|
+
# @option ratios [Double] :volume_ratio
|
406
|
+
# @param collection_floor_area [Double] floor area in m^2
|
407
|
+
# @param space_hash [Hash] has of space load properties with space_hash[space] = { int_loads: space_loads_hash, totals: space_totals }
|
408
|
+
# @return [Array<OpenStudio::Model::SpaceLoad>] Array of OpenStudio SpaceLoad objects
|
409
|
+
def self.blend_internal_loads(model, source_space_or_space_type, target_space_type, ratios, collection_floor_area, space_hash)
|
410
|
+
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CreateTypical', 'WARNING: This method blends space types together. We recommend against blending space types. Blending space types averages internal loads that determine peak loads and therefore HVAC sizing. DO NOT use this method across thermal zones coupled with autosized HVAC.')
|
411
|
+
|
412
|
+
# ratios
|
413
|
+
floor_area_ratio = ratios[:floor_area_ratio]
|
414
|
+
num_people_ratio = ratios[:num_people_ratio]
|
415
|
+
ext_surface_area_ratio = ratios[:ext_surface_area_ratio]
|
416
|
+
ext_wall_area_ratio = ratios[:ext_wall_area_ratio]
|
417
|
+
volume_ratio = ratios[:volume_ratio]
|
418
|
+
|
419
|
+
# for normalizing design level loads I need to know effective number of spaces instance is applied to
|
420
|
+
if source_space_or_space_type.to_Space.is_initialized
|
421
|
+
eff_num_spaces = source_space_or_space_type.multiplier
|
422
|
+
else
|
423
|
+
eff_num_spaces = 0
|
424
|
+
source_space_or_space_type.spaces.each do |space|
|
425
|
+
eff_num_spaces += space.multiplier
|
426
|
+
end
|
427
|
+
end
|
428
|
+
|
429
|
+
# array of load instacnes re-assigned to blended space
|
430
|
+
instances_array = []
|
431
|
+
|
432
|
+
# internal_mass
|
433
|
+
source_space_or_space_type.internalMass.each do |load_inst|
|
434
|
+
load_def = load_inst.definition.to_InternalMassDefinition.get
|
435
|
+
if load_def.surfaceArea.is_initialized
|
436
|
+
# edit and assign a clone of definition and normalize per area based on floor area ratio
|
437
|
+
if collection_floor_area == 0
|
438
|
+
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CreateTypical', "Can't determine building floor area to normalize #{load_def}. #{load_inst} will be asigned the the blended space without altering its values.")
|
439
|
+
else
|
440
|
+
cloned_load_def = load_def.clone(model).to_InternalMass.get
|
441
|
+
orig_design_level = cloned_load_def.surfaceArea.get
|
442
|
+
cloned_load_def.setSurfaceAreaperSpaceFloorArea(eff_num_spaces * orig_design_level / collection_floor_area)
|
443
|
+
cloned_load_def.setName("#{cloned_load_def.name} - pre-normalized value was #{orig_design_level.round} m^2.")
|
444
|
+
load_inst.setInternalMassDefinition(cloned_load_def)
|
445
|
+
end
|
446
|
+
elsif load_def.surfaceAreaperSpaceFloorArea.is_initialized
|
447
|
+
load_inst.setMultiplier(load_inst.multiplier * floor_area_ratio)
|
448
|
+
elsif load_def.surfaceAreaperPerson.is_initialized
|
449
|
+
if num_people_ratio.nil?
|
450
|
+
OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.CreateTypical', "#{load_def} has value defined per person, but people ratio wasn't passed in")
|
451
|
+
return false
|
452
|
+
else
|
453
|
+
load_inst.setMultiplier(load_inst.multiplier * num_people_ratio)
|
454
|
+
end
|
455
|
+
else
|
456
|
+
OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.CreateTypical', "Unexpected value type for #{load_def.name}")
|
457
|
+
return false
|
458
|
+
end
|
459
|
+
load_inst.setSpaceType(target_space_type)
|
460
|
+
instances_array << load_inst
|
461
|
+
end
|
462
|
+
|
463
|
+
# people
|
464
|
+
source_space_or_space_type.people.each do |load_inst|
|
465
|
+
load_def = load_inst.definition.to_PeopleDefinition.get
|
466
|
+
if load_def.numberofPeople.is_initialized
|
467
|
+
# edit and assign a clone of definition and normalize per area based on floor area ratio
|
468
|
+
if collection_floor_area == 0
|
469
|
+
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CreateTypical', "Can't determine building floor area to normalize #{load_def}. #{load_inst} will be asigned the the blended space without altering its values.")
|
470
|
+
else
|
471
|
+
cloned_load_def = load_def.clone(model).to_PeopleDefinition.get
|
472
|
+
orig_design_level = cloned_load_def.numberofPeople.get
|
473
|
+
cloned_load_def.setPeopleperSpaceFloorArea(eff_num_spaces * orig_design_level / collection_floor_area)
|
474
|
+
cloned_load_def.setName("#{cloned_load_def.name} - pre-normalized value was #{orig_design_level.round} people.")
|
475
|
+
load_inst.setPeopleDefinition(cloned_load_def)
|
476
|
+
end
|
477
|
+
elsif load_def.peopleperSpaceFloorArea.is_initialized
|
478
|
+
load_inst.setMultiplier(load_inst.multiplier * floor_area_ratio)
|
479
|
+
elsif load_def.spaceFloorAreaperPerson.is_initialized
|
480
|
+
load_inst.setMultiplier(load_inst.multiplier * floor_area_ratio)
|
481
|
+
else
|
482
|
+
OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.CreateTypical', "Unexpected value type for #{load_def.name}")
|
483
|
+
return false
|
484
|
+
end
|
485
|
+
load_inst.setSpaceType(target_space_type)
|
486
|
+
instances_array << load_inst
|
487
|
+
end
|
488
|
+
|
489
|
+
# lights
|
490
|
+
source_space_or_space_type.lights.each do |load_inst|
|
491
|
+
load_def = load_inst.definition.to_LightsDefinition.get
|
492
|
+
if load_def.lightingLevel.is_initialized
|
493
|
+
# edit and assign a clone of definition and normalize per area based on floor area ratio
|
494
|
+
if collection_floor_area == 0
|
495
|
+
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CreateTypical', "Can't determine building floor area to normalize #{load_def}. #{load_inst} will be asigned the the blended space without altering its values.")
|
496
|
+
else
|
497
|
+
cloned_load_def = load_def.clone(model).to_LightsDefinition.get
|
498
|
+
orig_design_level = cloned_load_def.lightingLevel.get
|
499
|
+
cloned_load_def.setWattsperSpaceFloorArea(eff_num_spaces * orig_design_level / collection_floor_area)
|
500
|
+
cloned_load_def.setName("#{cloned_load_def.name} - pre-normalized value was #{orig_design_level.round} W.")
|
501
|
+
load_inst.setLightsDefinition(cloned_load_def)
|
502
|
+
end
|
503
|
+
elsif load_def.wattsperSpaceFloorArea.is_initialized
|
504
|
+
load_inst.setMultiplier(load_inst.multiplier * floor_area_ratio)
|
505
|
+
elsif load_def.wattsperPerson.is_initialized
|
506
|
+
if num_people_ratio.nil?
|
507
|
+
OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.CreateTypical', "#{load_def} has value defined per person, but people ratio wasn't passed in")
|
508
|
+
return false
|
509
|
+
else
|
510
|
+
load_inst.setMultiplier(load_inst.multiplier * num_people_ratio)
|
511
|
+
end
|
512
|
+
else
|
513
|
+
OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.CreateTypical', "Unexpected value type for #{load_def.name}")
|
514
|
+
return false
|
515
|
+
end
|
516
|
+
load_inst.setSpaceType(target_space_type)
|
517
|
+
instances_array << load_inst
|
518
|
+
end
|
519
|
+
|
520
|
+
# luminaires
|
521
|
+
source_space_or_space_type.luminaires.each do |load_inst|
|
522
|
+
# @todo can't normalize luminaire. Replace it with similar normalized lights def and instance
|
523
|
+
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CreateTypical', "Can't area normalize luminaire. Instance will be applied to every space using the blended space type")
|
524
|
+
instances_array << load_inst
|
525
|
+
end
|
526
|
+
|
527
|
+
# electric_equipment
|
528
|
+
source_space_or_space_type.electricEquipment.each do |load_inst|
|
529
|
+
load_def = load_inst.definition.to_ElectricEquipmentDefinition.get
|
530
|
+
if load_def.designLevel.is_initialized
|
531
|
+
# edit and assign a clone of definition and normalize per area based on floor area ratio
|
532
|
+
if collection_floor_area == 0
|
533
|
+
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CreateTypical', "Can't determine building floor area to normalize #{load_def}. #{load_inst} will be asigned the the blended space without altering its values.")
|
534
|
+
else
|
535
|
+
cloned_load_def = load_def.clone(model).to_ElectricEquipmentDefinition.get
|
536
|
+
orig_design_level = cloned_load_def.designLevel.get
|
537
|
+
cloned_load_def.setWattsperSpaceFloorArea(eff_num_spaces * orig_design_level / collection_floor_area)
|
538
|
+
cloned_load_def.setName("#{cloned_load_def.name} - pre-normalized value was #{orig_design_level.round} W.")
|
539
|
+
load_inst.setElectricEquipmentDefinition(cloned_load_def)
|
540
|
+
end
|
541
|
+
elsif load_def.wattsperSpaceFloorArea.is_initialized
|
542
|
+
load_inst.setMultiplier(load_inst.multiplier * floor_area_ratio)
|
543
|
+
elsif load_def.wattsperPerson.is_initialized
|
544
|
+
if num_people_ratio.nil?
|
545
|
+
OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.CreateTypical', "#{load_def} has value defined per person, but people ratio wasn't passed in")
|
546
|
+
return false
|
547
|
+
else
|
548
|
+
load_inst.setMultiplier(load_inst.multiplier * num_people_ratio)
|
549
|
+
end
|
550
|
+
else
|
551
|
+
OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.CreateTypical', "Unexpected value type for #{load_def.name}")
|
552
|
+
return false
|
553
|
+
end
|
554
|
+
load_inst.setSpaceType(target_space_type)
|
555
|
+
instances_array << load_inst
|
556
|
+
end
|
557
|
+
|
558
|
+
# gas_equipment
|
559
|
+
source_space_or_space_type.gasEquipment.each do |load_inst|
|
560
|
+
load_def = load_inst.definition.to_GasEquipmentDefinition.get
|
561
|
+
if load_def.designLevel.is_initialized
|
562
|
+
# edit and assign a clone of definition and normalize per area based on floor area ratio
|
563
|
+
if collection_floor_area == 0
|
564
|
+
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CreateTypical', "Can't determine building floor area to normalize #{load_def}. #{load_inst} will be asigned the the blended space without altering its values.")
|
565
|
+
else
|
566
|
+
cloned_load_def = load_def.clone(model).to_GasEquipmentDefinition.get
|
567
|
+
orig_design_level = cloned_load_def.designLevel.get
|
568
|
+
cloned_load_def.setWattsperSpaceFloorArea(eff_num_spaces * orig_design_level / collection_floor_area)
|
569
|
+
cloned_load_def.setName("#{cloned_load_def.name} - pre-normalized value was #{orig_design_level.round} W.")
|
570
|
+
load_inst.setGasEquipmentDefinition(cloned_load_def)
|
571
|
+
end
|
572
|
+
elsif load_def.wattsperSpaceFloorArea.is_initialized
|
573
|
+
load_inst.setMultiplier(load_inst.multiplier * floor_area_ratio)
|
574
|
+
elsif load_def.wattsperPerson.is_initialized
|
575
|
+
if num_people_ratio.nil?
|
576
|
+
OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.CreateTypical', "#{load_def} has value defined per person, but people ratio wasn't passed in")
|
577
|
+
return false
|
578
|
+
else
|
579
|
+
load_inst.setMultiplier(load_inst.multiplier * num_people_ratio)
|
580
|
+
end
|
581
|
+
else
|
582
|
+
OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.CreateTypical', "Unexpected value type for #{load_def.name}")
|
583
|
+
return false
|
584
|
+
end
|
585
|
+
load_inst.setSpaceType(target_space_type)
|
586
|
+
instances_array << load_inst
|
587
|
+
end
|
588
|
+
|
589
|
+
# hot_water_equipment
|
590
|
+
source_space_or_space_type.hotWaterEquipment.each do |load_inst|
|
591
|
+
load_def = load_inst.definition.to_HotWaterDefinition.get
|
592
|
+
if load_def.designLevel.is_initialized
|
593
|
+
# edit and assign a clone of definition and normalize per area based on floor area ratio
|
594
|
+
if collection_floor_area == 0
|
595
|
+
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CreateTypical', "Can't determine building floor area to normalize #{load_def}. #{load_inst} will be asigned the the blended space without altering its values.")
|
596
|
+
else
|
597
|
+
cloned_load_def = load_def.clone(model).to_HotWaterEquipmentDefinition.get
|
598
|
+
orig_design_level = cloned_load_def.designLevel.get
|
599
|
+
cloned_load_def.setWattsperSpaceFloorArea(eff_num_spaces * orig_design_level / collection_floor_area)
|
600
|
+
cloned_load_def.setName("#{cloned_load_def.name} - pre-normalized value was #{orig_design_level.round} W.")
|
601
|
+
load_inst.setHotWaterEquipmentDefinition(cloned_load_def)
|
602
|
+
end
|
603
|
+
elsif load_def.wattsperSpaceFloorArea.is_initialized
|
604
|
+
load_inst.setMultiplier(load_inst.multiplier * floor_area_ratio)
|
605
|
+
elsif load_def.wattsperPerson.is_initialized
|
606
|
+
if num_people_ratio.nil?
|
607
|
+
OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.CreateTypical', "#{load_def} has value defined per person, but people ratio wasn't passed in")
|
608
|
+
return false
|
609
|
+
else
|
610
|
+
load_inst.setMultiplier(load_inst.multiplier * num_people_ratio)
|
611
|
+
end
|
612
|
+
else
|
613
|
+
OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.CreateTypical', "Unexpected value type for #{load_def.name}")
|
614
|
+
return false
|
615
|
+
end
|
616
|
+
load_inst.setSpaceType(target_space_type)
|
617
|
+
instances_array << load_inst
|
618
|
+
end
|
619
|
+
|
620
|
+
# steam_equipment
|
621
|
+
source_space_or_space_type.steamEquipment.each do |load_inst|
|
622
|
+
load_def = load_inst.definition.to_SteamDefinition.get
|
623
|
+
if load_def.designLevel.is_initialized
|
624
|
+
# edit and assign a clone of definition and normalize per area based on floor area ratio
|
625
|
+
if collection_floor_area == 0
|
626
|
+
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CreateTypical', "Can't determine building floor area to normalize #{load_def}. #{load_inst} will be asigned the the blended space without altering its values.")
|
627
|
+
else
|
628
|
+
cloned_load_def = load_def.clone(model).to_SteamEquipmentDefinition.get
|
629
|
+
orig_design_level = cloned_load_def.designLevel.get
|
630
|
+
cloned_load_def.setWattsperSpaceFloorArea(eff_num_spaces * orig_design_level / collection_floor_area)
|
631
|
+
cloned_load_def.setName("#{cloned_load_def.name} - pre-normalized value was #{orig_design_level.round} W.")
|
632
|
+
load_inst.setSteamEquipmentDefinition(cloned_load_def)
|
633
|
+
end
|
634
|
+
elsif load_def.wattsperSpaceFloorArea.is_initialized
|
635
|
+
load_inst.setMultiplier(load_inst.multiplier * floor_area_ratio)
|
636
|
+
elsif load_def.wattsperPerson.is_initialized
|
637
|
+
if num_people_ratio.nil?
|
638
|
+
OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.CreateTypical', "#{load_def} has value defined per person, but people ratio wasn't passed in")
|
639
|
+
return false
|
640
|
+
else
|
641
|
+
load_inst.setMultiplier(load_inst.multiplier * num_people_ratio)
|
642
|
+
end
|
643
|
+
else
|
644
|
+
OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.CreateTypical', "Unexpected value type for #{load_def.name}")
|
645
|
+
return false
|
646
|
+
end
|
647
|
+
load_inst.setSpaceType(target_space_type)
|
648
|
+
instances_array << load_inst
|
649
|
+
end
|
650
|
+
|
651
|
+
# other_equipment
|
652
|
+
source_space_or_space_type.otherEquipment.each do |load_inst|
|
653
|
+
load_def = load_inst.definition.to_OtherDefinition.get
|
654
|
+
if load_def.designLevel.is_initialized
|
655
|
+
# edit and assign a clone of definition and normalize per area based on floor area ratio
|
656
|
+
if collection_floor_area == 0
|
657
|
+
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CreateTypical', "Can't determine building floor area to normalize #{load_def}. #{load_inst} will be asigned the the blended space without altering its values.")
|
658
|
+
else
|
659
|
+
cloned_load_def = load_def.clone(model).to_OtherEquipmentDefinition.get
|
660
|
+
orig_design_level = cloned_load_def.designLevel.get
|
661
|
+
cloned_load_def.setWattsperSpaceFloorArea(eff_num_spaces * orig_design_level / collection_floor_area)
|
662
|
+
cloned_load_def.setName("#{cloned_load_def.name} - pre-normalized value was #{orig_design_level.round} W.")
|
663
|
+
load_inst.setOtherEquipmentDefinition(cloned_load_def)
|
664
|
+
end
|
665
|
+
elsif load_def.wattsperSpaceFloorArea.is_initialized
|
666
|
+
load_inst.setMultiplier(load_inst.multiplier * floor_area_ratio)
|
667
|
+
elsif load_def.wattsperPerson.is_initialized
|
668
|
+
if num_people_ratio.nil?
|
669
|
+
OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.CreateTypical', "#{load_def} has value defined per person, but people ratio wasn't passed in")
|
670
|
+
return false
|
671
|
+
else
|
672
|
+
load_inst.setMultiplier(load_inst.multiplier * num_people_ratio)
|
673
|
+
end
|
674
|
+
else
|
675
|
+
OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.CreateTypical', "Unexpected value type for #{load_def.name}")
|
676
|
+
return false
|
677
|
+
end
|
678
|
+
load_inst.setSpaceType(target_space_type)
|
679
|
+
instances_array << load_inst
|
680
|
+
end
|
681
|
+
|
682
|
+
# space_infiltration_design_flow_rates
|
683
|
+
source_space_or_space_type.spaceInfiltrationDesignFlowRates.each do |load_inst|
|
684
|
+
if load_inst.designFlowRateCalculationMethod == 'Flow/Space'
|
685
|
+
# edit load so normalized for building area
|
686
|
+
if collection_floor_area == 0
|
687
|
+
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CreateTypical', "Can't determine building floor area to normalize #{load_def}. #{load_inst} will be asigned the the blended space without altering its values.")
|
688
|
+
else
|
689
|
+
orig_design_level = load_inst.designFlowRate.get
|
690
|
+
load_inst.setFlowperSpaceFloorArea(eff_num_spaces * orig_design_level / collection_floor_area)
|
691
|
+
load_inst.setName("#{load_inst.name} - pre-normalized value was #{orig_design_level} m^3/sec")
|
692
|
+
end
|
693
|
+
elsif load_inst.designFlowRateCalculationMethod == 'Flow/Area'
|
694
|
+
load_inst.setFlowperSpaceFloorArea(load_inst.flowperSpaceFloorArea.get * floor_area_ratio)
|
695
|
+
elsif load_inst.designFlowRateCalculationMethod == 'Flow/ExteriorArea'
|
696
|
+
load_inst.setFlowperExteriorSurfaceArea(load_inst.flowperExteriorSurfaceArea.get * ext_surface_area_ratio)
|
697
|
+
elsif load_inst.designFlowRateCalculationMethod == 'Flow/ExteriorWallArea'
|
698
|
+
load_inst.setFlowperExteriorWallArea(load_inst.flowperExteriorWallArea.get * ext_wall_area_ratio)
|
699
|
+
elsif load_inst.designFlowRateCalculationMethod == 'AirChanges/Hour'
|
700
|
+
load_inst.setAirChangesperHour (load_inst.airChangesperHour.get * volume_ratio)
|
701
|
+
else
|
702
|
+
OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.CreateTypical', "Unexpected value type for #{load_inst.name}")
|
703
|
+
return false
|
704
|
+
end
|
705
|
+
load_inst.setSpaceType(target_space_type)
|
706
|
+
instances_array << load_inst
|
707
|
+
end
|
708
|
+
|
709
|
+
# space_infiltration_effective_leakage_areas
|
710
|
+
source_space_or_space_type.spaceInfiltrationEffectiveLeakageAreas.each do |load|
|
711
|
+
# @todo can't normalize space_infiltration_effective_leakage_areas. Come up with logic to address this
|
712
|
+
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CreateTypical', "Can't area normalize space_infiltration_effective_leakage_areas. It will be applied to every space using the blended space type")
|
713
|
+
load.setSpaceType(target_space_type)
|
714
|
+
instances_array << load
|
715
|
+
end
|
716
|
+
|
717
|
+
# add OA object if it doesn't already exist
|
718
|
+
if target_space_type.designSpecificationOutdoorAir.is_initialized
|
719
|
+
blended_oa = target_space_type.designSpecificationOutdoorAir.get
|
720
|
+
else
|
721
|
+
blended_oa = OpenStudio::Model::DesignSpecificationOutdoorAir.new(model)
|
722
|
+
blended_oa.setName('Blended OA')
|
723
|
+
blended_oa.setOutdoorAirMethod('Sum')
|
724
|
+
target_space_type.setDesignSpecificationOutdoorAir(blended_oa)
|
725
|
+
instances_array << blended_oa
|
726
|
+
end
|
727
|
+
|
728
|
+
# update OA object
|
729
|
+
if source_space_or_space_type.designSpecificationOutdoorAir.is_initialized
|
730
|
+
oa = source_space_or_space_type.designSpecificationOutdoorAir.get
|
731
|
+
oa_sch = nil
|
732
|
+
if oa.outdoorAirFlowRateFractionSchedule.is_initialized
|
733
|
+
# @todo improve logic to address multiple schedules
|
734
|
+
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CreateTypical', "Schedule #{oa.outdoorAirFlowRateFractionSchedule.get.name} assigned to #{oa.name} will be ignored. New OA object will not have a schedule assigned")
|
735
|
+
end
|
736
|
+
if oa.outdoorAirMethod == 'Maximum'
|
737
|
+
# @todo see if way to address this by pre-calculating the max and only entering that value for space type
|
738
|
+
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CreateTypical', "Outdoor air method of Maximum will be ignored for #{oa.name}. New OA object will have outdoor air method of Sum.")
|
739
|
+
end
|
740
|
+
# adjusted ratios for oa (lowered for space type if there is hard assigned oa load for one or more spaces)
|
741
|
+
oa_floor_area_ratio = floor_area_ratio
|
742
|
+
oa_num_people_ratio = num_people_ratio
|
743
|
+
if source_space_or_space_type.class.to_s == 'OpenStudio::Model::SpaceType'
|
744
|
+
source_space_or_space_type.spaces.each do |space|
|
745
|
+
if !space.isDesignSpecificationOutdoorAirDefaulted
|
746
|
+
if space_hash.nil?
|
747
|
+
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CreateTypical', 'No space_hash passed in and model has OA designed at space level.')
|
748
|
+
else
|
749
|
+
oa_floor_area_ratio -= space_hash[space][:floor_area_ratio]
|
750
|
+
oa_num_people_ratio -= space_hash[space][:num_people_ratio]
|
751
|
+
end
|
752
|
+
end
|
753
|
+
end
|
754
|
+
end
|
755
|
+
# add to values of blended OA load
|
756
|
+
if oa.outdoorAirFlowperPerson > 0
|
757
|
+
blended_oa.setOutdoorAirFlowperPerson(blended_oa.outdoorAirFlowperPerson + oa.outdoorAirFlowperPerson * oa_num_people_ratio)
|
758
|
+
end
|
759
|
+
if oa.outdoorAirFlowperFloorArea > 0
|
760
|
+
blended_oa.setOutdoorAirFlowperFloorArea(blended_oa.outdoorAirFlowperFloorArea + oa.outdoorAirFlowperFloorArea * oa_floor_area_ratio)
|
761
|
+
end
|
762
|
+
if oa.outdoorAirFlowRate > 0
|
763
|
+
|
764
|
+
# calculate quantity for instance (doesn't exist as a method in api)
|
765
|
+
if source_space_or_space_type.class.to_s == 'OpenStudio::Model::SpaceType'
|
766
|
+
quantity = 0
|
767
|
+
source_space_or_space_type.spaces.each do |space|
|
768
|
+
if !space.isDesignSpecificationOutdoorAirDefaulted
|
769
|
+
quantity += space.multiplier
|
770
|
+
end
|
771
|
+
end
|
772
|
+
else
|
773
|
+
quantity = source_space_or_space_type.multiplier
|
774
|
+
end
|
775
|
+
|
776
|
+
# can't normalize air flow rate, convert to air flow rate per floor area
|
777
|
+
blended_oa.setOutdoorAirFlowperFloorArea(blended_oa.outdoorAirFlowperFloorArea + quantity * oa.outdoorAirFlowRate / collection_floor_area)
|
778
|
+
end
|
779
|
+
if oa.outdoorAirFlowAirChangesperHour > 0
|
780
|
+
# floor area should be good approximation of area for multiplier
|
781
|
+
blended_oa.setOutdoorAirFlowAirChangesperHour(blended_oa.outdoorAirFlowAirChangesperHour + oa.outdoorAirFlowAirChangesperHour * oa_floor_area_ratio)
|
782
|
+
end
|
783
|
+
end
|
784
|
+
|
785
|
+
# note: water_use_equipment can't be assigned to a space type. Leave it as is, if assigned to space type
|
786
|
+
# @todo if we use this measure with new geometry need to find a way to pull water use equipment loads into new model
|
787
|
+
|
788
|
+
return instances_array
|
789
|
+
end
|
790
|
+
end
|
791
|
+
end
|