openstudio-standards 0.3.0 → 0.3.1.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/data/geometry/ASHRAESuperMarket.json +29 -38
- data/data/standards/OpenStudio_Standards-deer-ALL-comstock(space_types).xlsx +0 -0
- data/data/standards/metadata_units_OpenStudio_Standards-deer-ALL-comstockspace_types.csv +172 -0
- data/data/standards/test_performance_expected_dd_results.csv +12 -12
- data/lib/openstudio-standards/btap/analysis.rb +389 -389
- data/lib/openstudio-standards/btap/bridging.rb +2099 -0
- data/lib/openstudio-standards/btap/btap.model.rb +717 -717
- data/lib/openstudio-standards/btap/btap.rb +33 -30
- data/lib/openstudio-standards/btap/economics.rb +1163 -1163
- data/lib/openstudio-standards/btap/envelope.rb +4 -4
- data/lib/openstudio-standards/btap/equest.rb +2524 -2524
- data/lib/openstudio-standards/btap/fileio.rb +9 -0
- data/lib/openstudio-standards/btap/measures.rb +1515 -1515
- data/lib/openstudio-standards/btap/mpc.rb +554 -554
- data/lib/openstudio-standards/btap/reporting.rb +287 -287
- data/lib/openstudio-standards/btap/simmanager.rb +759 -759
- data/lib/openstudio-standards/btap/spaceloads.rb +439 -439
- data/lib/openstudio-standards/btap/spacetypes.rb +113 -113
- data/lib/openstudio-standards/btap/utilities.rb +134 -134
- data/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVAC.rb +8 -83
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingWater.rb +3 -99
- data/lib/openstudio-standards/hvac_sizing/Siz.HeatingCoolingFuels.rb +81 -75
- data/lib/openstudio-standards/hvac_sizing/Siz.Model.rb +7 -306
- data/lib/openstudio-standards/hvac_sizing/Siz.ThermalZone.rb +70 -98
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.Model.rb +41 -14
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Model.rb +40 -14
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SuperMarket.rb +1 -23
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.ServiceWaterHeating.rb +93 -4
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.hvac_systems.rb +13 -0
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.refrigeration.rb +5 -4
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.utilities.rb +24 -4
- data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +18 -2
- data/lib/openstudio-standards/standards/Standards.BoilerHotWater.rb +18 -0
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXSingleSpeed.rb +13 -10
- data/lib/openstudio-standards/standards/Standards.CoilDX.rb +5 -3
- data/lib/openstudio-standards/standards/Standards.CoilHeatingDXSingleSpeed.rb +11 -8
- data/lib/openstudio-standards/standards/Standards.Construction.rb +1 -1
- data/lib/openstudio-standards/standards/Standards.Model.rb +68 -52
- data/lib/openstudio-standards/standards/Standards.PlantLoop.rb +2 -2
- data/lib/openstudio-standards/standards/Standards.Space.rb +16 -18
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.ref_cases.json +510 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.refrigeration_compressors.json +18 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.refrigeration_walkins.json +410 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.spc_typ.json +2 -2
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.ref_cases.json +510 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.refrigeration_compressors.json +18 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.refrigeration_walkins.json +410 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.spc_typ.json +2 -2
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.ref_cases.json +510 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.refrigeration_compressors.json +18 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.refrigeration_walkins.json +410 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.spc_typ.json +2 -2
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.ref_cases.json +510 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.refrigeration_compressors.json +18 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.refrigeration_walkins.json +410 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.spc_typ.json +2 -2
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.spc_typ.json +2 -2
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.spc_typ.json +2 -2
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.AirLoopHVAC.rb +9 -0
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.Model.rb +2 -0
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.rb +4 -3
- data/lib/openstudio-standards/standards/deer/deer_1985/comstock_deer_1985/data/comstock_deer_1985.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_1996/comstock_deer_1996/data/comstock_deer_1996.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2003/comstock_deer_2003/data/comstock_deer_2003.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2003/deer_2003.ThermalZone.rb +21 -0
- data/lib/openstudio-standards/standards/deer/deer_2007/comstock_deer_2007/data/comstock_deer_2007.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2007/deer_2007.ThermalZone.rb +21 -0
- data/lib/openstudio-standards/standards/deer/deer_2011/comstock_deer_2011/data/comstock_deer_2011.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2011/deer_2011.ThermalZone.rb +21 -0
- data/lib/openstudio-standards/standards/deer/deer_2014/comstock_deer_2014/data/comstock_deer_2014.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2014/deer_2014.ThermalZone.rb +21 -0
- data/lib/openstudio-standards/standards/deer/deer_2015/comstock_deer_2015/data/comstock_deer_2015.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2015/deer_2015.ThermalZone.rb +21 -0
- data/lib/openstudio-standards/standards/deer/deer_2017/comstock_deer_2017/data/comstock_deer_2017.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2017/deer_2017.ThermalZone.rb +21 -0
- data/lib/openstudio-standards/standards/deer/deer_2020/comstock_deer_2020/data/comstock_deer_2020.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2020/deer_2020.AirLoopHVAC.rb +8 -0
- data/lib/openstudio-standards/standards/deer/deer_2020/deer_2020.ThermalZone.rb +21 -0
- data/lib/openstudio-standards/standards/deer/deer_2025/comstock_deer_2025/data/comstock_deer_2025.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2030/comstock_deer_2030/data/comstock_deer_2030.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2035/comstock_deer_2035/data/comstock_deer_2035.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2040/comstock_deer_2040/data/comstock_deer_2040.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2045/comstock_deer_2045/data/comstock_deer_2045.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2050/comstock_deer_2050/data/comstock_deer_2050.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2055/comstock_deer_2055/data/comstock_deer_2055.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2060/comstock_deer_2060/data/comstock_deer_2060.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2065/comstock_deer_2065/data/comstock_deer_2065.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2070/comstock_deer_2070/data/comstock_deer_2070.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2075/comstock_deer_2075/data/comstock_deer_2075.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_pre_1975/comstock_deer_pre_1975/data/comstock_deer_pre_1975.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/btap_pre1980.rb +1 -1
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_3_and_8_single_speed.rb +3 -1
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_4.rb +3 -1
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_6.rb +2 -2
- data/lib/openstudio-standards/standards/necb/ECMS/data/curves.json +233 -0
- data/lib/openstudio-standards/standards/necb/ECMS/data/unitary_acs.json +180 -0
- data/lib/openstudio-standards/standards/necb/ECMS/ecms.rb +6 -1
- data/lib/openstudio-standards/standards/necb/ECMS/hvac_systems.rb +807 -258
- data/lib/openstudio-standards/standards/necb/NECB2011/autozone.rb +102 -66
- data/lib/openstudio-standards/standards/necb/NECB2011/data/fuel_type_sets.json +85 -8
- data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/HighriseApartment.osm +2483 -992
- data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/LowriseApartment.osm +4 -336
- data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/MidriseApartment.osm +228 -231
- data/lib/openstudio-standards/standards/necb/NECB2011/data/heat_pumps_heating.json +12 -18
- data/lib/openstudio-standards/standards/necb/NECB2011/data/space_type_unit_definitions.txt +76 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_1_multi_speed.rb +6 -1
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_1_single_speed.rb +111 -24
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_2_and_5.rb +1 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_multi_speed.rb +3 -1
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_single_speed.rb +64 -16
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_4.rb +61 -17
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_6.rb +128 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb +252 -23
- data/lib/openstudio-standards/standards/necb/NECB2011/necb_2011.rb +316 -20
- data/lib/openstudio-standards/standards/necb/NECB2011/qaqc/necb_qaqc.rb +1 -1
- data/lib/openstudio-standards/standards/necb/NECB2011/service_water_heating.rb +3 -5
- data/lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb +38 -0
- data/lib/openstudio-standards/standards/necb/NECB2015/data/heat_pumps_heating.json +16 -24
- data/lib/openstudio-standards/standards/necb/NECB2015/hvac_systems.rb +48 -25
- data/lib/openstudio-standards/standards/necb/NECB2020/building_envelope.rb +3 -3
- data/lib/openstudio-standards/standards/necb/NECB2020/data/chillers.json +36 -19
- data/lib/openstudio-standards/standards/necb/NECB2020/data/furnaces.json +19 -4
- data/lib/openstudio-standards/standards/necb/NECB2020/data/heat_pumps.json +20 -40
- data/lib/openstudio-standards/standards/necb/NECB2020/data/heat_pumps_heating.json +74 -36
- data/lib/openstudio-standards/standards/necb/NECB2020/necb_2020.rb +0 -2
- data/lib/openstudio-standards/standards/necb/NECB2020/service_water_heating.rb +123 -56
- data/lib/openstudio-standards/standards/necb/common/btap_data.rb +124 -2
- data/lib/openstudio-standards/standards/necb/common/btap_datapoint.rb +15 -2
- data/lib/openstudio-standards/standards/necb/common/necb_reference_runs.csv +1 -1
- data/lib/openstudio-standards/utilities/simulation.rb +1 -1
- data/lib/openstudio-standards/version.rb +1 -1
- data/lib/openstudio-standards/weather/Weather.stat_file.rb +33 -1
- data/lib/openstudio-standards.rb +1 -0
- metadata +14 -121
- data/data/standards/OpenStudio_Standards-ashrae_90_1.xlsx +0 -0
- data/data/weather/CAN_ON_Kingston.AP.718200_TMYx.2004-2018.ddy +0 -2342
- data/data/weather/CAN_ON_Kingston.AP.718200_TMYx.2004-2018.epw +0 -8768
- data/data/weather/CAN_ON_Kingston.AP.718200_TMYx.2004-2018.stat +0 -700
- data/data/weather/CAN_ON_Region.of.Waterloo.Intl.AP.713680_TMYx.2004-2018.ddy +0 -2342
- data/data/weather/CAN_ON_Region.of.Waterloo.Intl.AP.713680_TMYx.2004-2018.epw +0 -8768
- data/data/weather/CAN_ON_Region.of.Waterloo.Intl.AP.713680_TMYx.2004-2018.stat +0 -700
- data/data/weather/CAN_ON_Sarnia-Hadfield.AP.717040_TMYx.2004-2018.ddy +0 -2342
- data/data/weather/CAN_ON_Sarnia-Hadfield.AP.717040_TMYx.2004-2018.epw +0 -8768
- data/data/weather/CAN_ON_Sarnia-Hadfield.AP.717040_TMYx.2004-2018.stat +0 -700
- data/data/weather/CAN_QC_Gatineau.AP.716279_TMYx.2004-2018.ddy +0 -276
- data/data/weather/CAN_QC_Gatineau.AP.716279_TMYx.2004-2018.epw +0 -8768
- data/data/weather/CAN_QC_Gatineau.AP.716279_TMYx.2004-2018.stat +0 -611
- data/data/weather/CAN_QC_Granby.710367_TMYx.2004-2018.ddy +0 -276
- data/data/weather/CAN_QC_Granby.710367_TMYx.2004-2018.epw +0 -8768
- data/data/weather/CAN_QC_Granby.710367_TMYx.2004-2018.stat +0 -610
- data/data/weather/CAN_QC_Sherbrooke.AP.716100_TMYx.2004-2018.ddy +0 -2342
- data/data/weather/CAN_QC_Sherbrooke.AP.716100_TMYx.2004-2018.epw +0 -8768
- data/data/weather/CAN_QC_Sherbrooke.AP.716100_TMYx.2004-2018.stat +0 -700
- data/data/weather/CAN_QC_Trois.Rivieres.717240_TMYx.2004-2018.ddy +0 -2342
- data/data/weather/CAN_QC_Trois.Rivieres.717240_TMYx.2004-2018.epw +0 -8768
- data/data/weather/CAN_QC_Trois.Rivieres.717240_TMYx.2004-2018.stat +0 -700
- data/lib/openstudio-standards/hvac_sizing/Siz.AirConditionerVariableRefrigerantFlow.rb +0 -81
- data/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitaryHeatCoolVAVChngByp.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitaryHeatPumpAirToAir.rb +0 -69
- data/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.rb +0 -178
- data/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitarySystem.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctConstVolCooledBeam.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctConstVolFourPipeInduction.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctConstVolReheat.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctParallelPIUReheat.rb +0 -67
- data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctSeriesPIUReheat.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctUncontrolled.rb +0 -30
- data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVHeatAndCoolNoReheat.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVHeatAndCoolReheat.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVNoReheat.rb +0 -68
- data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVReheat.rb +0 -68
- data/lib/openstudio-standards/hvac_sizing/Siz.BoilerHotWater.rb +0 -42
- data/lib/openstudio-standards/hvac_sizing/Siz.BoilerSteam.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.ChillerElectricEIR.rb +0 -58
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXMultiSpeed.rb +0 -171
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXSingleSpeed.rb +0 -56
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXTwoSpeed.rb +0 -89
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXVariableRefrigerantFlow.rb +0 -50
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingWaterToAirHeatPumpEquationFit.rb +0 -69
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDXMultiSpeed.rb +0 -120
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDXSingleSpeed.rb +0 -56
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDXVariableRefrigerantFlow.rb +0 -41
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDesuperheater.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingElectric.rb +0 -30
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingGas.rb +0 -30
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingGasMultiStage.rb +0 -68
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWater.rb +0 -61
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWaterToAirHeatPumpEquationFit.rb +0 -57
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilWaterHeatingDesuperheater.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.ControllerOutdoorAir.rb +0 -59
- data/lib/openstudio-standards/hvac_sizing/Siz.ControllerWaterCoil.rb +0 -49
- data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerSingleSpeed.rb +0 -90
- data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerTwoSpeed.rb +0 -83
- data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerVariableSpeed.rb +0 -57
- data/lib/openstudio-standards/hvac_sizing/Siz.DistrictCooling.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.DistrictHeating.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.EvaporativeCoolerDirectResearchSpecial.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.EvaporativeCoolerIndirectResearchSpecial.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.EvaporativeFluidCoolerSingleSpeed.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.FanConstantVolume.rb +0 -29
- data/lib/openstudio-standards/hvac_sizing/Siz.FanOnOff.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.FanVariableVolume.rb +0 -29
- data/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsConstantSpeed.rb +0 -55
- data/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsVariableSpeed.rb +0 -55
- data/lib/openstudio-standards/hvac_sizing/Siz.HeatExchangerAirToAirSensibleAndLatent.rb +0 -38
- data/lib/openstudio-standards/hvac_sizing/Siz.HeatExchangerFluidToFluid.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.HumidifierSteamElectric.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.PlantLoop.rb +0 -42
- data/lib/openstudio-standards/hvac_sizing/Siz.PumpConstantSpeed.rb +0 -59
- data/lib/openstudio-standards/hvac_sizing/Siz.PumpVariableSpeed.rb +0 -59
- data/lib/openstudio-standards/hvac_sizing/Siz.SizingSystem.rb +0 -48
- data/lib/openstudio-standards/hvac_sizing/Siz.WaterHeaterMixed.rb +0 -16
- data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACBaseboardConvectiveElectric.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACBaseboardConvectiveWater.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACFourPipeFanCoil.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACHighTemperatureRadiant.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACIdealLoadsAirSystem.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACLowTempRadiantConstFlow.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACLowTempRadiantVarFlow.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACLowTemperatureRadiantElectric.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACPackagedTerminalAirConditioner.rb +0 -88
- data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACPackagedTerminalHeatPump.rb +0 -88
- data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACTerminalUnitVariableRefrigerantFlow.rb +0 -104
- data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACUnitHeater.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACWaterToAirHeatPump.rb +0 -27
@@ -3,11 +3,13 @@
|
|
3
3
|
class NECB2011 < Standard
|
4
4
|
@template = new.class.name
|
5
5
|
register_standard(@template)
|
6
|
+
attr_reader :tbd
|
6
7
|
attr_reader :template
|
7
8
|
attr_accessor :standards_data
|
8
9
|
attr_accessor :space_type_map
|
9
10
|
attr_accessor :space_multiplier_map
|
10
|
-
|
11
|
+
attr_accessor :fuel_type_set
|
12
|
+
|
11
13
|
# This is a helper method to convert arguments that may support 'NECB_Default, and nils to convert to float'
|
12
14
|
def convert_arg_to_f(variable:, default:)
|
13
15
|
return variable if variable.kind_of?(Numeric)
|
@@ -119,6 +121,7 @@ class NECB2011 < Standard
|
|
119
121
|
@template = self.class.name
|
120
122
|
@standards_data = load_standards_database_new
|
121
123
|
corrupt_standards_database
|
124
|
+
@tbd = nil
|
122
125
|
# puts "loaded these tables..."
|
123
126
|
# puts @standards_data.keys.size
|
124
127
|
# raise("tables not all loaded in parent #{}") if @standards_data.keys.size < 24
|
@@ -166,7 +169,7 @@ class NECB2011 < Standard
|
|
166
169
|
return epw.hdd18.to_f
|
167
170
|
else
|
168
171
|
dist_clause = "%.2f % #{(min_distance / 1000.0)}"
|
169
|
-
puts "INFO:NECB HDD18 of #{necb_closest['degree_days_below_18_c'].to_f} at nearest city #{necb_closest['city']},#{necb_closest['province']}, at a distance of " + dist_clause + 'km from epw location. Ref:
|
172
|
+
puts "INFO:NECB HDD18 of #{necb_closest['degree_days_below_18_c'].to_f} at nearest city #{necb_closest['city']},#{necb_closest['province']}, at a distance of " + dist_clause + 'km from epw location. Ref: nbc_2015_table_c1'
|
170
173
|
return necb_closest['degree_days_below_18_c'].to_f
|
171
174
|
end
|
172
175
|
end
|
@@ -177,7 +180,7 @@ class NECB2011 < Standard
|
|
177
180
|
epw_file:,
|
178
181
|
debug: false,
|
179
182
|
sizing_run_dir: Dir.pwd,
|
180
|
-
primary_heating_fuel: '
|
183
|
+
primary_heating_fuel: 'Electricity',
|
181
184
|
dcv_type: 'NECB_Default',
|
182
185
|
lights_type: 'NECB_Default',
|
183
186
|
lights_scale: 1.0,
|
@@ -227,10 +230,11 @@ class NECB2011 < Standard
|
|
227
230
|
shw_scale: nil,
|
228
231
|
output_meters: nil,
|
229
232
|
airloop_economizer_type: nil,
|
230
|
-
baseline_system_zones_map_option: nil
|
231
|
-
|
233
|
+
baseline_system_zones_map_option: nil,
|
234
|
+
tbd_option: nil)
|
232
235
|
model = load_building_type_from_library(building_type: building_type)
|
233
236
|
return model_apply_standard(model: model,
|
237
|
+
tbd_option: tbd_option,
|
234
238
|
epw_file: epw_file,
|
235
239
|
sizing_run_dir: sizing_run_dir,
|
236
240
|
primary_heating_fuel: primary_heating_fuel,
|
@@ -301,8 +305,11 @@ class NECB2011 < Standard
|
|
301
305
|
# Created this method so that additional methods can be addded for bulding the prototype model in later
|
302
306
|
# code versions without modifying the build_protoype_model method or copying it wholesale for a few changes.
|
303
307
|
def model_apply_standard(model:,
|
308
|
+
tbd_option: nil,
|
304
309
|
epw_file:,
|
305
310
|
sizing_run_dir: Dir.pwd,
|
311
|
+
necb_reference_hp: false,
|
312
|
+
necb_reference_hp_supp_fuel: 'DefaultFuel',
|
306
313
|
primary_heating_fuel: 'DefaultFuel',
|
307
314
|
dcv_type: 'NECB_Default',
|
308
315
|
lights_type: 'NECB_Default',
|
@@ -353,9 +360,9 @@ class NECB2011 < Standard
|
|
353
360
|
shw_scale: nil,
|
354
361
|
output_meters: nil,
|
355
362
|
airloop_economizer_type: nil,
|
356
|
-
baseline_system_zones_map_option: nil
|
357
|
-
|
358
|
-
|
363
|
+
baseline_system_zones_map_option: nil)
|
364
|
+
self.fuel_type_set = SystemFuels.new()
|
365
|
+
self.fuel_type_set.set_defaults(standards_data: @standards_data, primary_heating_fuel: primary_heating_fuel)
|
359
366
|
clean_and_scale_model(model: model, rotation_degrees: rotation_degrees, scale_x: scale_x, scale_y: scale_y, scale_z: scale_z)
|
360
367
|
fdwr_set = convert_arg_to_f(variable: fdwr_set, default: -1)
|
361
368
|
srr_set = convert_arg_to_f(variable: srr_set, default: -1)
|
@@ -386,13 +393,15 @@ class NECB2011 < Standard
|
|
386
393
|
apply_fdwr_srr_daylighting(model: model,
|
387
394
|
fdwr_set: fdwr_set,
|
388
395
|
srr_set: srr_set)
|
396
|
+
apply_thermal_bridging(model: model, tbd_option: tbd_option)
|
389
397
|
apply_auto_zoning(model: model,
|
390
398
|
sizing_run_dir: sizing_run_dir,
|
391
399
|
lights_type: lights_type,
|
392
400
|
lights_scale: lights_scale)
|
401
|
+
apply_kiva_foundation(model)
|
393
402
|
apply_systems_and_efficiencies(model: model,
|
394
|
-
primary_heating_fuel: primary_heating_fuel,
|
395
403
|
sizing_run_dir: sizing_run_dir,
|
404
|
+
primary_heating_fuel: primary_heating_fuel,
|
396
405
|
dcv_type: dcv_type,
|
397
406
|
ecm_system_name: ecm_system_name,
|
398
407
|
ecm_system_zones_map_option: ecm_system_zones_map_option,
|
@@ -463,8 +472,8 @@ class NECB2011 < Standard
|
|
463
472
|
end
|
464
473
|
|
465
474
|
def apply_systems_and_efficiencies(model:,
|
466
|
-
primary_heating_fuel:,
|
467
475
|
sizing_run_dir:,
|
476
|
+
primary_heating_fuel:,
|
468
477
|
dcv_type: 'NECB_Default',
|
469
478
|
ecm_system_name: 'NECB_Default',
|
470
479
|
ecm_system_zones_map_option: 'NECB_Default',
|
@@ -494,17 +503,25 @@ class NECB2011 < Standard
|
|
494
503
|
# -------- Systems Layout-----------
|
495
504
|
|
496
505
|
# Create Default Systems.
|
497
|
-
apply_systems(model: model,
|
506
|
+
apply_systems(model: model,
|
507
|
+
primary_heating_fuel: primary_heating_fuel,
|
508
|
+
sizing_run_dir: sizing_run_dir,
|
509
|
+
shw_scale: shw_scale,
|
498
510
|
baseline_system_zones_map_option: baseline_system_zones_map_option)
|
499
511
|
|
500
512
|
# Apply new ECM system. Overwrite standard as required.
|
501
|
-
ecm.apply_system_ecm(model: model,
|
513
|
+
ecm.apply_system_ecm(model: model,
|
514
|
+
ecm_system_name: ecm_system_name,
|
515
|
+
template_standard: self,
|
516
|
+
primary_heating_fuel: self.fuel_type_set.ecm_fueltype,
|
502
517
|
ecm_system_zones_map_option: ecm_system_zones_map_option)
|
503
518
|
|
504
519
|
# -------- Performace, Efficiencies, Controls and Sensors ------------
|
505
520
|
#
|
506
521
|
# Set code standard equipment charecteristics.
|
507
|
-
sql_db_vars_map = apply_standard_efficiencies(model: model,
|
522
|
+
sql_db_vars_map = apply_standard_efficiencies(model: model,
|
523
|
+
sizing_run_dir: sizing_run_dir,
|
524
|
+
necb_reference_hp: self.fuel_type_set.necb_reference_hp)
|
508
525
|
# Apply System
|
509
526
|
ecm.apply_system_efficiencies_ecm(model: model, ecm_system_name: ecm_system_name)
|
510
527
|
# Apply ECM ERV charecteristics as required. Part 2 of above ECM.
|
@@ -515,8 +532,8 @@ class NECB2011 < Standard
|
|
515
532
|
ecm.modify_boiler_efficiency(model: model, boiler_eff: boiler_eff)
|
516
533
|
# Apply Furnace Efficiency
|
517
534
|
ecm.modify_furnace_efficiency(model: model, furnace_eff: furnace_eff)
|
518
|
-
# Apply Unitary
|
519
|
-
ecm.modify_unitary_cop(model: model, unitary_cop: unitary_cop, sql_db_vars_map: sql_db_vars_map)
|
535
|
+
# Apply Unitary curves
|
536
|
+
ecm.modify_unitary_cop(model: model, unitary_cop: unitary_cop, sizing_done: false, sql_db_vars_map: sql_db_vars_map)
|
520
537
|
# Apply SHW Efficiency
|
521
538
|
ecm.modify_shw_efficiency(model: model, shw_eff: shw_eff)
|
522
539
|
# Apply daylight controls.
|
@@ -525,6 +542,16 @@ class NECB2011 < Standard
|
|
525
542
|
ecm.modify_chiller_efficiency(model: model, chiller_type: chiller_type)
|
526
543
|
# Apply airloop economizer
|
527
544
|
ecm.add_airloop_economizer(model: model, airloop_economizer_type: airloop_economizer_type)
|
545
|
+
# Perform a second sizing run if needed
|
546
|
+
if (!unitary_cop.nil? && unitary_cop != 'NECB_Default') || !model.getPlantLoops.empty?
|
547
|
+
if model_run_sizing_run(model, "#{sizing_run_dir}/SR2") == false
|
548
|
+
raise('sizing run 2 failed!')
|
549
|
+
end
|
550
|
+
end
|
551
|
+
# apply unitary cop
|
552
|
+
ecm.modify_unitary_cop(model: model, unitary_cop: unitary_cop, sizing_done: true, sql_db_vars_map: sql_db_vars_map)
|
553
|
+
# set capacities of district heating and cooling equipment for ground-source heat pump ecm
|
554
|
+
ecm.set_ghx_loop_district_cap(model) if (!model.getDistrictHeatings.empty? && !model.getDistrictCoolings.empty?)
|
528
555
|
|
529
556
|
# -------Pump sizing required by some vintages----------------
|
530
557
|
# Apply Pump power as required.
|
@@ -628,6 +655,224 @@ class NECB2011 < Standard
|
|
628
655
|
model_create_thermal_zones(model, @space_multiplier_map)
|
629
656
|
end
|
630
657
|
|
658
|
+
# apply the Kiva foundation model to floors and walls with ground boundary condition
|
659
|
+
# created by: Kamel Haddad (kamel.haddad@nrcan-rncan.gc.ca)
|
660
|
+
def apply_kiva_foundation(model)
|
661
|
+
# define a Kiva model for the whole bldg that's used for the first floor in contact with ground in each zone
|
662
|
+
bldg_kiva_model = OpenStudio::Model::FoundationKiva.new(model)
|
663
|
+
bldg_kiva_model.setName("Bldg Kiva Foundation")
|
664
|
+
bldg_kiva_model.setWallHeightAboveGrade(0.0)
|
665
|
+
bldg_kiva_model.setWallDepthBelowSlab(0.0)
|
666
|
+
model.getThermalZones.sort.each do |zone|
|
667
|
+
zone_kiva_models = [bldg_kiva_model]
|
668
|
+
zone_grd_flr_counter = 0
|
669
|
+
zone.spaces.sort.each do |space|
|
670
|
+
# store space floors and walls in contact with ground and exterior walls
|
671
|
+
space_ground_floors = []
|
672
|
+
space_ground_walls = []
|
673
|
+
space_ext_walls = []
|
674
|
+
space_ground_floors += space.surfaces.select {|surf| surf.surfaceType.downcase == 'floor' && surf.isGroundSurface }
|
675
|
+
space_ground_walls += space.surfaces.select {|surf| surf.surfaceType.downcase == 'wall' && surf.isGroundSurface }
|
676
|
+
space_ext_walls += space.surfaces.select {|surf| surf.surfaceType.downcase == 'wall' && surf.outsideBoundaryCondition.downcase == 'outdoors'}
|
677
|
+
# loop through space floors in contact with ground and assing a Kiva model for each
|
678
|
+
space_ground_floors.each do |gfloor|
|
679
|
+
zone_grd_flr_counter += 1
|
680
|
+
if zone_grd_flr_counter > 1
|
681
|
+
# a new Kiva model is needed for each additional floor in contact with the ground in the zone
|
682
|
+
kiva_model = OpenStudio::Model::FoundationKiva.new(model)
|
683
|
+
kiva_model.setName("#{gfloor.name.to_s} Kiva Foundation")
|
684
|
+
kiva_model.setWallHeightAboveGrade(0.0)
|
685
|
+
kiva_model.setWallDepthBelowSlab(0.0)
|
686
|
+
zone_kiva_models << kiva_model
|
687
|
+
end
|
688
|
+
# Kiva model only works with standard materials. Replace constructions massless materials with standard ones.
|
689
|
+
replace_massless_material_with_std_material(model,gfloor)
|
690
|
+
gfloor.setOutsideBoundaryCondition('Foundation')
|
691
|
+
gfloor.setAdjacentFoundation(zone_kiva_models.last)
|
692
|
+
# Set the exposed perimeter for space floors in contact with the ground.
|
693
|
+
floor_exp_per = 0.0
|
694
|
+
if !space_ground_walls.empty?
|
695
|
+
floor_exp_per += get_surface_exp_per(gfloor,space_ground_walls)
|
696
|
+
elsif !space_ext_walls.empty?
|
697
|
+
floor_exp_per += get_surface_exp_per(gfloor,space_ext_walls)
|
698
|
+
end
|
699
|
+
gfloor.createSurfacePropertyExposedFoundationPerimeter('TotalExposedPerimeter',floor_exp_per)
|
700
|
+
# specify a foundation boundary condition for space walls in contact with the ground and in
|
701
|
+
# contact with the space floor in contact with ground 'gfloor'
|
702
|
+
space_ground_walls.each do |gwall|
|
703
|
+
if surfaces_are_in_contact?(gfloor,gwall)
|
704
|
+
replace_massless_material_with_std_material(model,gwall)
|
705
|
+
gwall.setOutsideBoundaryCondition('Foundation')
|
706
|
+
gwall.setAdjacentFoundation(zone_kiva_models.last)
|
707
|
+
end
|
708
|
+
end
|
709
|
+
end
|
710
|
+
end
|
711
|
+
end
|
712
|
+
kiva_settings = model.getFoundationKivaSettings if !model.getFoundationKivas.empty?
|
713
|
+
end
|
714
|
+
|
715
|
+
# check if two surfaces are in contact. For every two consecutive vertices on surface 1,
|
716
|
+
# loop through two consecutive vertices of surface two. Then check whether the vertices
|
717
|
+
# of surfaces 2 are on the same line as the vertices from surface 1. If the two vectors
|
718
|
+
# defined by the two vertices on surface 1 and those on surface 2 overlap, then the two
|
719
|
+
# surfaces are in contact. If a side from surface 2 is in contact with a side from surface 1,
|
720
|
+
# the length of the side from surface 2 is limited to the length of the side from surface 1.
|
721
|
+
# created by: Kamel Haddad (kamel.haddad@nrcan-rncan.gc.ca)
|
722
|
+
def surfaces_are_in_contact?(surf1,surf2)
|
723
|
+
surfaces_in_contact = false
|
724
|
+
vert1 = surf1.vertices[0]
|
725
|
+
for index1 in 1..surf1.vertices.size
|
726
|
+
if index1 < surf1.vertices.size
|
727
|
+
vert2 = surf1.vertices[index1]
|
728
|
+
else
|
729
|
+
vert2 = surf1.vertices[0]
|
730
|
+
end
|
731
|
+
seg12_length = ((vert2.x-vert1.x)**2+(vert2.y-vert1.y)**2+(vert2.z-vert1.z)**2)**0.5
|
732
|
+
surf2_seg_length = 0.0
|
733
|
+
vert3 = surf2.vertices[0]
|
734
|
+
for index2 in 1..surf2.vertices.size
|
735
|
+
if index2 < surf2.vertices.size
|
736
|
+
vert4 = surf2.vertices[index2]
|
737
|
+
else
|
738
|
+
vert4 = surf2.vertices[0]
|
739
|
+
end
|
740
|
+
vert1_2_3_same_line_and_dir = three_vertices_same_line_and_dir?(vert1,vert2,vert3)
|
741
|
+
if vert1_2_3_same_line_and_dir
|
742
|
+
vert1_2_4_same_line_and_dir = three_vertices_same_line_and_dir?(vert1,vert2,vert4)
|
743
|
+
if vert1_2_4_same_line_and_dir
|
744
|
+
surfaces_in_contact = true
|
745
|
+
seg34_length = ((vert4.x-vert3.x)**2+(vert4.y-vert3.y)**2+(vert4.z-vert3.z)**2)**0.5
|
746
|
+
surf2_seg_length += seg34_length
|
747
|
+
raise("Surface #{surf2.name.to_s} has sides in contact with surface #{surf1.name.to_s} but with a length greater than the max.") if surf2_seg_length > seg12_length
|
748
|
+
end
|
749
|
+
end
|
750
|
+
vert3 = vert4
|
751
|
+
end
|
752
|
+
vert1 = vert2
|
753
|
+
end
|
754
|
+
|
755
|
+
return surfaces_in_contact
|
756
|
+
end
|
757
|
+
|
758
|
+
# Loop through the layers of the construction of the surface and replace any massless material with
|
759
|
+
# a standard one. The material used instead is from the EnergyPlus dataset file 'ASHRAE_2005_HOF_Materials.idf'
|
760
|
+
# with the name: 'Insulation: Expanded polystyrene - extruded (smooth skin surface) (HCFC-142b exp.)'.
|
761
|
+
# The thickness of the new material is based on the thermal resistance of the massless material it replaces.
|
762
|
+
# created by: Kamel Haddad (kamel.haddad@nrcan-rncan.gc.ca)
|
763
|
+
def replace_massless_material_with_std_material(model,surf)
|
764
|
+
std_const_name = "#{surf.construction.get.name.to_s}_std"
|
765
|
+
std_const = model.getLayeredConstructions.select {|const| const.name.to_s == std_const_name}
|
766
|
+
new_const = nil
|
767
|
+
if !std_const.empty?
|
768
|
+
new_const = std_const[0]
|
769
|
+
else
|
770
|
+
new_layers = {}
|
771
|
+
has_massless_mat = false
|
772
|
+
layer_index = 0
|
773
|
+
surf.construction.get.to_LayeredConstruction.get.layers.each do |layer|
|
774
|
+
if layer.to_MasslessOpaqueMaterial.is_initialized then
|
775
|
+
has_massless_mat = true
|
776
|
+
new_mat = OpenStudio::Model::StandardOpaqueMaterial.new(model)
|
777
|
+
new_mat.setName("Expanded Polystyrene")
|
778
|
+
new_mat.setThermalConductivity(0.029)
|
779
|
+
new_mat.setDensity(29.0)
|
780
|
+
new_mat.setSpecificHeat(1210.0)
|
781
|
+
new_mat.setRoughness('MediumSmooth')
|
782
|
+
new_mat.setThickness(layer.to_MasslessOpaqueMaterial.get.thermalResistance.to_f * new_mat.thermalConductivity.to_f)
|
783
|
+
else
|
784
|
+
new_mat = layer
|
785
|
+
end
|
786
|
+
new_layers[layer_index] = new_mat
|
787
|
+
layer_index += 1
|
788
|
+
end
|
789
|
+
if has_massless_mat
|
790
|
+
new_const = OpenStudio::Model::Construction.new(model)
|
791
|
+
new_layers.keys.sort.each {|layer_index| new_const.to_LayeredConstruction.get.insertLayer(layer_index,new_layers[layer_index])}
|
792
|
+
new_const.setName("#{surf.construction.get.name.to_s}_std")
|
793
|
+
end
|
794
|
+
end
|
795
|
+
surf.setConstruction(new_const) if !new_const.nil?
|
796
|
+
|
797
|
+
end
|
798
|
+
|
799
|
+
# Find the exposed perimeter of a floor surface. For each side of the floor loop through
|
800
|
+
# the walls and find the walls that share sides with the floor. Then sum the lengths of
|
801
|
+
# the sides of the walls that come in contact with sides of the floor.
|
802
|
+
# created by: Kamel Haddad (kamel.haddad@nrcan-rncan.gc.ca)
|
803
|
+
def get_surface_exp_per(floor,walls)
|
804
|
+
floor_exp_per = 0.0
|
805
|
+
vert1 = floor.vertices[0]
|
806
|
+
# loop through the indices of the floor surface
|
807
|
+
for index in 1..floor.vertices.size
|
808
|
+
if index < floor.vertices.size
|
809
|
+
vert2 = floor.vertices[index]
|
810
|
+
else
|
811
|
+
vert2 = floor.vertices[0]
|
812
|
+
end
|
813
|
+
side_length = ((vert2.x-vert1.x)**2+(vert2.y-vert1.y)**2+(vert2.z-vert1.z)**2)**0.5
|
814
|
+
walls_exp_per = 0.0
|
815
|
+
walls.each do |wall|
|
816
|
+
vert3 = wall.vertices[0]
|
817
|
+
# loop through the indices of the wall surface
|
818
|
+
for index2 in 1..wall.vertices.size-1
|
819
|
+
if index2 < wall.vertices.size
|
820
|
+
vert4 = wall.vertices[index2]
|
821
|
+
else
|
822
|
+
vert4 = wall.vertices[0]
|
823
|
+
end
|
824
|
+
vert1_2_3_on_same_line = three_vertices_same_line_and_dir?(vert1,vert2,vert3)
|
825
|
+
if vert1_2_3_on_same_line
|
826
|
+
vert1_2_4_on_same_line = three_vertices_same_line_and_dir?(vert1,vert2,vert4)
|
827
|
+
if vert1_2_4_on_same_line
|
828
|
+
wall_width = ((vert4.x-vert3.x)**2+(vert4.y-vert3.y)**2+(vert4.z-vert3.z)**2)**0.5
|
829
|
+
walls_exp_per += wall_width
|
830
|
+
end
|
831
|
+
end
|
832
|
+
vert3 = vert4
|
833
|
+
end
|
834
|
+
end
|
835
|
+
# increment the exposed perimeter of the floor. Limit the length of the walls in contact with the
|
836
|
+
# side of the floor to the length of the side of the floor.
|
837
|
+
floor_exp_per += [walls_exp_per,side_length].min
|
838
|
+
vert1 = vert2
|
839
|
+
end
|
840
|
+
|
841
|
+
return floor_exp_per
|
842
|
+
end
|
843
|
+
|
844
|
+
# check that three vertices are on the same line. Also check that the vectors
|
845
|
+
# from vert1 and vert2 and from vert1 and vert3 are in the same direction.
|
846
|
+
# created by: Kamel Haddad (kamel.haddad@nrcan-rncan.gc.ca)
|
847
|
+
def three_vertices_same_line_and_dir?(vert1,vert2,vert3)
|
848
|
+
tol = 1.0e-5
|
849
|
+
vec12x,vec12y,vec12z = -vert1.x+vert2.x,-vert1.y+vert2.y,-vert1.z+vert2.z # x,y,z of vector 12
|
850
|
+
vec12x = 0.0 if vec12x.abs < tol
|
851
|
+
vec12y = 0.0 if vec12y.abs < tol
|
852
|
+
vec12z = 0.0 if vec12z.abs < tol
|
853
|
+
vec13x,vec13y,vec13z = -vert1.x+vert3.x,-vert1.y+vert3.y,-vert1.z+vert3.z # x,y,z of vector 13
|
854
|
+
vec13x = 0.0 if vec13x.abs < tol
|
855
|
+
vec13y = 0.0 if vec13y.abs < tol
|
856
|
+
vec13z = 0.0 if vec13z.abs < tol
|
857
|
+
# x,y,z of the cross product of the vectors 12 and 13
|
858
|
+
cross_12_13_x = vec12y*vec13z-vec12z*vec13y
|
859
|
+
cross_12_13_y = vec12z*vec13x-vec12x*vec13z
|
860
|
+
cross_12_13_z = vec12x*vec13y-vec12y*vec13x
|
861
|
+
# vectors are in parallel when x,y,z of cross product are 0.0
|
862
|
+
vertices_on_same_line = false
|
863
|
+
vertices_on_same_line = true if (cross_12_13_x == 0.0) && (cross_12_13_y == 0.0) && (cross_12_13_z == 0.0)
|
864
|
+
vectors_same_direction = false
|
865
|
+
if vertices_on_same_line
|
866
|
+
vec12_13_x_factor = vec13x*vec12x
|
867
|
+
vec12_13_y_factor = vec13y*vec12y
|
868
|
+
vec12_13_z_factor = vec13z*vec12z
|
869
|
+
vectors_same_direction = true if (vec12_13_x_factor >= 0.0) && (vec12_13_y_factor >= 0.0) && (vec12_13_z_factor >= 0.0)
|
870
|
+
end
|
871
|
+
same_line_same_dir = vertices_on_same_line && vectors_same_direction
|
872
|
+
|
873
|
+
return same_line_same_dir
|
874
|
+
end
|
875
|
+
|
631
876
|
# Thermal zones need to be set to determine conditioned spaces when applying fdwr and srr limits.
|
632
877
|
# # fdwr_set/srr_set settings:
|
633
878
|
# # 0-1: Remove all windows/skylights and add windows/skylights to match this fdwr/srr
|
@@ -647,19 +892,66 @@ class NECB2011 < Standard
|
|
647
892
|
# model_add_daylighting_controls(model) # to be removed after refactor.
|
648
893
|
end
|
649
894
|
|
650
|
-
|
895
|
+
##
|
896
|
+
# Optionally uprates, then derates, envelope surfaces due to MAJOR thermal
|
897
|
+
# bridges (e.g. roof parapets, corners, fenestration perimeters). See
|
898
|
+
# lib/openstudio-standards/btap/bridging.rb, which relies on the Thermal
|
899
|
+
# Bridging & Derating (TBD) gem.
|
900
|
+
#
|
901
|
+
# @param model [OpenStudio::Model::Model] an OpenStudio model
|
902
|
+
# @param tbd_option [String] BTAP/TBD option
|
903
|
+
#
|
904
|
+
# @return [Bool] true if successful, e.g. no errors, compliant if uprated
|
905
|
+
def apply_thermal_bridging(model: nil, tbd_option: nil)
|
906
|
+
return false unless model.is_a?(OpenStudio::Model::Model)
|
907
|
+
return false unless tbd_option.respond_to?(:to_s)
|
908
|
+
|
909
|
+
tbd_option = tbd_option.to_s
|
910
|
+
# 4x options:
|
911
|
+
# - nil or 'none'(TBD is ignored)
|
912
|
+
# - derate using 'bad' PSI factors (BTAP-costed)
|
913
|
+
# - derate using 'good' PSI factors (BTAP-costed)
|
914
|
+
# - 'uprate' (then derate), i.e. iterative process (BTAP-costed)
|
915
|
+
|
916
|
+
# Do nothing if nil or none or NECB_Default.
|
917
|
+
return true if tbd_option.nil? || tbd_option == 'none' || tbd_option =='NECB_Default'
|
918
|
+
unless tbd_option == 'bad' || tbd_option == 'good' || tbd_option == 'uprate'
|
919
|
+
puts("invalid input for thermal bridging. Must be good, bad, uprate or nil")
|
920
|
+
return false
|
921
|
+
end
|
922
|
+
|
923
|
+
argh = {} # BTAP/TBD arguments
|
924
|
+
argh[:walls ] = { uo: nil }
|
925
|
+
argh[:floors] = { uo: nil }
|
926
|
+
argh[:roofs ] = { uo: nil }
|
927
|
+
|
928
|
+
if tbd_option == 'uprate'
|
929
|
+
argh[:walls ][:ut] = nil
|
930
|
+
argh[:floors ][:ut] = nil
|
931
|
+
argh[:roofs ][:ut] = nil
|
932
|
+
elsif tbd_option == 'good'
|
933
|
+
argh[:quality] = :good
|
934
|
+
end # default == :bad
|
935
|
+
|
936
|
+
@tbd = BTAP::Bridging.new(model, argh)
|
937
|
+
true
|
938
|
+
end
|
939
|
+
|
940
|
+
# @param necb_ref_hp [Bool] if true, NECB reference model rules for heat pumps will be used.
|
941
|
+
def apply_standard_efficiencies(model:, sizing_run_dir:, dcv_type: 'NECB_Default', necb_reference_hp: false)
|
651
942
|
raise('validation of model failed.') unless validate_initial_model(model)
|
652
943
|
|
653
944
|
climate_zone = 'NECB HDD Method'
|
654
945
|
raise("sizing run 1 failed! check #{sizing_run_dir}") if model_run_sizing_run(model, "#{sizing_run_dir}/plant_loops") == false
|
655
946
|
|
656
|
-
# This is needed for NECB2011 as a workaround for sizing the reheat boxes
|
947
|
+
# This is needed for NECB2011 as a workaround for sizing the reheat boxes.
|
657
948
|
model.getAirTerminalSingleDuctVAVReheats.each { |iobj| air_terminal_single_duct_vav_reheat_set_heating_cap(iobj) }
|
658
949
|
# Apply the prototype HVAC assumptions
|
659
950
|
model_apply_prototype_hvac_assumptions(model, nil, climate_zone)
|
660
951
|
# Apply the HVAC efficiency standard
|
661
952
|
sql_db_vars_map = {}
|
662
|
-
model_apply_hvac_efficiency_standard(model, climate_zone, sql_db_vars_map: sql_db_vars_map)
|
953
|
+
model_apply_hvac_efficiency_standard(model, climate_zone, sql_db_vars_map: sql_db_vars_map, necb_ref_hp: necb_reference_hp)
|
954
|
+
|
663
955
|
model_enable_demand_controlled_ventilation(model, dcv_type)
|
664
956
|
return sql_db_vars_map
|
665
957
|
end
|
@@ -699,8 +991,12 @@ class NECB2011 < Standard
|
|
699
991
|
|
700
992
|
# Set HVAC availability schedule to follow occupancy
|
701
993
|
air_loop_hvac.setAvailabilitySchedule(loop_occ_sch)
|
702
|
-
air_loop_hvac.supplyComponents
|
703
|
-
comp.
|
994
|
+
air_loop_hvac.supplyComponents.each do |comp|
|
995
|
+
if comp.to_AirLoopHVACUnitaryHeatPumpAirToAir.is_initialized
|
996
|
+
comp.to_AirLoopHVACUnitaryHeatPumpAirToAir.get.setSupplyAirFanOperatingModeSchedule(loop_occ_sch)
|
997
|
+
elsif comp.to_AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.is_initialized
|
998
|
+
comp.to_AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.get.setAvailabilitySchedule(loop_occ_sch)
|
999
|
+
end
|
704
1000
|
end
|
705
1001
|
|
706
1002
|
return true
|
@@ -200,7 +200,7 @@ class NECB2011
|
|
200
200
|
outdoor_floors = BTAP::Geometry::Surfaces.filter_by_surface_types(outdoor_surfaces, 'Floor')
|
201
201
|
outdoor_subsurfaces = BTAP::Geometry::Surfaces.get_subsurfaces_from_surfaces(outdoor_surfaces)
|
202
202
|
|
203
|
-
ground_surfaces = BTAP::Geometry::Surfaces.filter_by_boundary_condition(surfaces, 'Ground')
|
203
|
+
ground_surfaces = BTAP::Geometry::Surfaces.filter_by_boundary_condition(surfaces, ['Ground', 'Foundation'])
|
204
204
|
ground_walls = BTAP::Geometry::Surfaces.filter_by_surface_types(ground_surfaces, 'Wall')
|
205
205
|
ground_roofs = BTAP::Geometry::Surfaces.filter_by_surface_types(ground_surfaces, 'RoofCeiling')
|
206
206
|
ground_floors = BTAP::Geometry::Surfaces.filter_by_surface_types(ground_surfaces, 'Floor')
|
@@ -197,7 +197,6 @@ class NECB2011
|
|
197
197
|
|
198
198
|
# Convert to SI
|
199
199
|
ua_btu_per_hr_per_c = OpenStudio.convert(ua_btu_per_hr_per_f, 'Btu/hr*R', 'W/K').get
|
200
|
-
|
201
200
|
# Set the water heater properties
|
202
201
|
# Efficiency
|
203
202
|
water_heater_mixed.setHeaterThermalEfficiency(water_heater_eff)
|
@@ -263,14 +262,14 @@ class NECB2011
|
|
263
262
|
model.getSpaces.sort.each do |space|
|
264
263
|
space_peak_flow = 0
|
265
264
|
data = nil
|
266
|
-
space_type_name = space.spaceType.get.
|
265
|
+
space_type_name = space.spaceType.get.standardsSpaceType.get.to_s
|
267
266
|
tank_temperature = 60
|
268
267
|
# find the specific space_type properties from standard.json
|
269
268
|
space_types_table.each do |space_type|
|
270
|
-
if space_type_name == (space_type['building_type'] + ' ' + space_type['space_type'])
|
269
|
+
if (space_type['building_type'] + ' ' + space_type_name) == (space_type['building_type'] + ' ' + space_type['space_type'])
|
271
270
|
break if space_type['necb_hvac_system_selection_type'] == '- undefined -'
|
272
271
|
# If there is no service hot water load.. Don't bother adding anything.
|
273
|
-
break if space_type['service_water_heating_peak_flow_per_area'].to_f == 0.0 && space_type['service_water_heating_peak_flow_rate'].to_f == 0.0 || space_type['service_water_heating_schedule'].nil?
|
272
|
+
break if (space_type['service_water_heating_peak_flow_per_area'].to_f == 0.0 && space_type['service_water_heating_peak_flow_rate'].to_f == 0.0) || space_type['service_water_heating_schedule'].nil?
|
274
273
|
|
275
274
|
# If there is a service hot water load collect the space information
|
276
275
|
data = space_type
|
@@ -280,7 +279,6 @@ class NECB2011
|
|
280
279
|
# If there is no service hot water load.. Don't bother adding anything.
|
281
280
|
# Skip space types with no data
|
282
281
|
next if data.nil?
|
283
|
-
|
284
282
|
space_area = OpenStudio.convert(space.floorArea, 'm^2', 'ft^2').get # ft2
|
285
283
|
# Calculate the peak shw flow rate for the space. Peak flow from JSON file is in US Gal/hr/ft^2
|
286
284
|
# space_peak_flow_ind is the peak flow rate for the space while space_peak_flow is the peak flow
|
@@ -0,0 +1,38 @@
|
|
1
|
+
class SystemFuels
|
2
|
+
attr_accessor :name
|
3
|
+
attr_accessor :boiler_fueltype
|
4
|
+
attr_accessor :baseboard_type
|
5
|
+
attr_accessor :mau_type
|
6
|
+
attr_accessor :mau_heating_coil_type
|
7
|
+
attr_accessor :mau_cooling_type
|
8
|
+
attr_accessor :chiller_type
|
9
|
+
attr_accessor :heating_coil_type_sys3
|
10
|
+
attr_accessor :heating_coil_type_sys4
|
11
|
+
attr_accessor :heating_coil_type_sys6
|
12
|
+
attr_accessor :necb_reference_hp
|
13
|
+
attr_accessor :necb_reference_hp_supp_fuel
|
14
|
+
attr_accessor :fan_type
|
15
|
+
attr_accessor :swh_fueltype
|
16
|
+
attr_accessor :ecm_fueltype
|
17
|
+
def set_defaults(standards_data:, primary_heating_fuel:)
|
18
|
+
# Get fuelset.
|
19
|
+
system_fuel_defaults = standards_data['fuel_type_sets'].detect { |fuel_type_set| fuel_type_set['name'] == primary_heating_fuel }
|
20
|
+
raise("fuel_type_sets named #{primary_heating_fuel} not found in fuel_type_sets table.") if system_fuel_defaults.nil?
|
21
|
+
# Assign fuel sources.
|
22
|
+
@name = system_fuel_defaults['name']
|
23
|
+
@boiler_fueltype = system_fuel_defaults['boiler_fueltype']
|
24
|
+
@baseboard_type = system_fuel_defaults['baseboard_type']
|
25
|
+
@mau_type = system_fuel_defaults['mau_type']
|
26
|
+
@mau_cooling_type = system_fuel_defaults['mau_cooling_type']
|
27
|
+
@chiller_type = system_fuel_defaults['chiller_type']
|
28
|
+
@mau_heating_coil_type = system_fuel_defaults['mau_heating_coil_type']
|
29
|
+
@heating_coil_type_sys3 = system_fuel_defaults['heating_coil_type_sys3']
|
30
|
+
@heating_coil_type_sys4 = system_fuel_defaults['heating_coil_type_sys4']
|
31
|
+
@heating_coil_type_sys6 = system_fuel_defaults['heating_coil_type_sys6']
|
32
|
+
@necb_reference_hp = system_fuel_defaults['necb_reference_hp']
|
33
|
+
@necb_reference_hp_supp_fuel = system_fuel_defaults['necb_reference_hp_supp_fuel']
|
34
|
+
@fan_type = system_fuel_defaults['fan_type']
|
35
|
+
@swh_fueltype = system_fuel_defaults['swh_fueltype']
|
36
|
+
@ecm_fueltype = system_fuel_defaults['ecm_fueltype']
|
37
|
+
end
|
38
|
+
end
|