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.
Files changed (226) hide show
  1. checksums.yaml +4 -4
  2. data/data/geometry/ASHRAESuperMarket.json +29 -38
  3. data/data/standards/OpenStudio_Standards-deer-ALL-comstock(space_types).xlsx +0 -0
  4. data/data/standards/metadata_units_OpenStudio_Standards-deer-ALL-comstockspace_types.csv +172 -0
  5. data/data/standards/test_performance_expected_dd_results.csv +12 -12
  6. data/lib/openstudio-standards/btap/analysis.rb +389 -389
  7. data/lib/openstudio-standards/btap/bridging.rb +2099 -0
  8. data/lib/openstudio-standards/btap/btap.model.rb +717 -717
  9. data/lib/openstudio-standards/btap/btap.rb +33 -30
  10. data/lib/openstudio-standards/btap/economics.rb +1163 -1163
  11. data/lib/openstudio-standards/btap/envelope.rb +4 -4
  12. data/lib/openstudio-standards/btap/equest.rb +2524 -2524
  13. data/lib/openstudio-standards/btap/fileio.rb +9 -0
  14. data/lib/openstudio-standards/btap/measures.rb +1515 -1515
  15. data/lib/openstudio-standards/btap/mpc.rb +554 -554
  16. data/lib/openstudio-standards/btap/reporting.rb +287 -287
  17. data/lib/openstudio-standards/btap/simmanager.rb +759 -759
  18. data/lib/openstudio-standards/btap/spaceloads.rb +439 -439
  19. data/lib/openstudio-standards/btap/spacetypes.rb +113 -113
  20. data/lib/openstudio-standards/btap/utilities.rb +134 -134
  21. data/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVAC.rb +8 -83
  22. data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingWater.rb +3 -99
  23. data/lib/openstudio-standards/hvac_sizing/Siz.HeatingCoolingFuels.rb +81 -75
  24. data/lib/openstudio-standards/hvac_sizing/Siz.Model.rb +7 -306
  25. data/lib/openstudio-standards/hvac_sizing/Siz.ThermalZone.rb +70 -98
  26. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.Model.rb +41 -14
  27. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Model.rb +40 -14
  28. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SuperMarket.rb +1 -23
  29. data/lib/openstudio-standards/prototypes/common/objects/Prototype.ServiceWaterHeating.rb +93 -4
  30. data/lib/openstudio-standards/prototypes/common/objects/Prototype.hvac_systems.rb +13 -0
  31. data/lib/openstudio-standards/prototypes/common/objects/Prototype.refrigeration.rb +5 -4
  32. data/lib/openstudio-standards/prototypes/common/objects/Prototype.utilities.rb +24 -4
  33. data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +18 -2
  34. data/lib/openstudio-standards/standards/Standards.BoilerHotWater.rb +18 -0
  35. data/lib/openstudio-standards/standards/Standards.CoilCoolingDXSingleSpeed.rb +13 -10
  36. data/lib/openstudio-standards/standards/Standards.CoilDX.rb +5 -3
  37. data/lib/openstudio-standards/standards/Standards.CoilHeatingDXSingleSpeed.rb +11 -8
  38. data/lib/openstudio-standards/standards/Standards.Construction.rb +1 -1
  39. data/lib/openstudio-standards/standards/Standards.Model.rb +68 -52
  40. data/lib/openstudio-standards/standards/Standards.PlantLoop.rb +2 -2
  41. data/lib/openstudio-standards/standards/Standards.Space.rb +16 -18
  42. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.ref_cases.json +510 -0
  43. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.refrigeration_compressors.json +18 -0
  44. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.refrigeration_walkins.json +410 -0
  45. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.spc_typ.json +2 -2
  46. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.ref_cases.json +510 -0
  47. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.refrigeration_compressors.json +18 -0
  48. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.refrigeration_walkins.json +410 -0
  49. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.spc_typ.json +2 -2
  50. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.ref_cases.json +510 -0
  51. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.refrigeration_compressors.json +18 -0
  52. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.refrigeration_walkins.json +410 -0
  53. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.spc_typ.json +2 -2
  54. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.ref_cases.json +510 -0
  55. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.refrigeration_compressors.json +18 -0
  56. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.refrigeration_walkins.json +410 -0
  57. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.spc_typ.json +2 -2
  58. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.spc_typ.json +2 -2
  59. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.spc_typ.json +2 -2
  60. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.AirLoopHVAC.rb +9 -0
  61. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.Model.rb +2 -0
  62. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.rb +4 -3
  63. data/lib/openstudio-standards/standards/deer/deer_1985/comstock_deer_1985/data/comstock_deer_1985.spc_typ.json +405 -405
  64. data/lib/openstudio-standards/standards/deer/deer_1996/comstock_deer_1996/data/comstock_deer_1996.spc_typ.json +405 -405
  65. data/lib/openstudio-standards/standards/deer/deer_2003/comstock_deer_2003/data/comstock_deer_2003.spc_typ.json +405 -405
  66. data/lib/openstudio-standards/standards/deer/deer_2003/deer_2003.ThermalZone.rb +21 -0
  67. data/lib/openstudio-standards/standards/deer/deer_2007/comstock_deer_2007/data/comstock_deer_2007.spc_typ.json +405 -405
  68. data/lib/openstudio-standards/standards/deer/deer_2007/deer_2007.ThermalZone.rb +21 -0
  69. data/lib/openstudio-standards/standards/deer/deer_2011/comstock_deer_2011/data/comstock_deer_2011.spc_typ.json +405 -405
  70. data/lib/openstudio-standards/standards/deer/deer_2011/deer_2011.ThermalZone.rb +21 -0
  71. data/lib/openstudio-standards/standards/deer/deer_2014/comstock_deer_2014/data/comstock_deer_2014.spc_typ.json +405 -405
  72. data/lib/openstudio-standards/standards/deer/deer_2014/deer_2014.ThermalZone.rb +21 -0
  73. data/lib/openstudio-standards/standards/deer/deer_2015/comstock_deer_2015/data/comstock_deer_2015.spc_typ.json +405 -405
  74. data/lib/openstudio-standards/standards/deer/deer_2015/deer_2015.ThermalZone.rb +21 -0
  75. data/lib/openstudio-standards/standards/deer/deer_2017/comstock_deer_2017/data/comstock_deer_2017.spc_typ.json +405 -405
  76. data/lib/openstudio-standards/standards/deer/deer_2017/deer_2017.ThermalZone.rb +21 -0
  77. data/lib/openstudio-standards/standards/deer/deer_2020/comstock_deer_2020/data/comstock_deer_2020.spc_typ.json +405 -405
  78. data/lib/openstudio-standards/standards/deer/deer_2020/deer_2020.AirLoopHVAC.rb +8 -0
  79. data/lib/openstudio-standards/standards/deer/deer_2020/deer_2020.ThermalZone.rb +21 -0
  80. data/lib/openstudio-standards/standards/deer/deer_2025/comstock_deer_2025/data/comstock_deer_2025.spc_typ.json +405 -405
  81. data/lib/openstudio-standards/standards/deer/deer_2030/comstock_deer_2030/data/comstock_deer_2030.spc_typ.json +405 -405
  82. data/lib/openstudio-standards/standards/deer/deer_2035/comstock_deer_2035/data/comstock_deer_2035.spc_typ.json +405 -405
  83. data/lib/openstudio-standards/standards/deer/deer_2040/comstock_deer_2040/data/comstock_deer_2040.spc_typ.json +405 -405
  84. data/lib/openstudio-standards/standards/deer/deer_2045/comstock_deer_2045/data/comstock_deer_2045.spc_typ.json +405 -405
  85. data/lib/openstudio-standards/standards/deer/deer_2050/comstock_deer_2050/data/comstock_deer_2050.spc_typ.json +405 -405
  86. data/lib/openstudio-standards/standards/deer/deer_2055/comstock_deer_2055/data/comstock_deer_2055.spc_typ.json +405 -405
  87. data/lib/openstudio-standards/standards/deer/deer_2060/comstock_deer_2060/data/comstock_deer_2060.spc_typ.json +405 -405
  88. data/lib/openstudio-standards/standards/deer/deer_2065/comstock_deer_2065/data/comstock_deer_2065.spc_typ.json +405 -405
  89. data/lib/openstudio-standards/standards/deer/deer_2070/comstock_deer_2070/data/comstock_deer_2070.spc_typ.json +405 -405
  90. data/lib/openstudio-standards/standards/deer/deer_2075/comstock_deer_2075/data/comstock_deer_2075.spc_typ.json +405 -405
  91. data/lib/openstudio-standards/standards/deer/deer_pre_1975/comstock_deer_pre_1975/data/comstock_deer_pre_1975.spc_typ.json +405 -405
  92. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/btap_pre1980.rb +1 -1
  93. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_3_and_8_single_speed.rb +3 -1
  94. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_4.rb +3 -1
  95. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_6.rb +2 -2
  96. data/lib/openstudio-standards/standards/necb/ECMS/data/curves.json +233 -0
  97. data/lib/openstudio-standards/standards/necb/ECMS/data/unitary_acs.json +180 -0
  98. data/lib/openstudio-standards/standards/necb/ECMS/ecms.rb +6 -1
  99. data/lib/openstudio-standards/standards/necb/ECMS/hvac_systems.rb +807 -258
  100. data/lib/openstudio-standards/standards/necb/NECB2011/autozone.rb +102 -66
  101. data/lib/openstudio-standards/standards/necb/NECB2011/data/fuel_type_sets.json +85 -8
  102. data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/HighriseApartment.osm +2483 -992
  103. data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/LowriseApartment.osm +4 -336
  104. data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/MidriseApartment.osm +228 -231
  105. data/lib/openstudio-standards/standards/necb/NECB2011/data/heat_pumps_heating.json +12 -18
  106. data/lib/openstudio-standards/standards/necb/NECB2011/data/space_type_unit_definitions.txt +76 -0
  107. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_1_multi_speed.rb +6 -1
  108. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_1_single_speed.rb +111 -24
  109. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_2_and_5.rb +1 -0
  110. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_multi_speed.rb +3 -1
  111. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_single_speed.rb +64 -16
  112. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_4.rb +61 -17
  113. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_6.rb +128 -0
  114. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb +252 -23
  115. data/lib/openstudio-standards/standards/necb/NECB2011/necb_2011.rb +316 -20
  116. data/lib/openstudio-standards/standards/necb/NECB2011/qaqc/necb_qaqc.rb +1 -1
  117. data/lib/openstudio-standards/standards/necb/NECB2011/service_water_heating.rb +3 -5
  118. data/lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb +38 -0
  119. data/lib/openstudio-standards/standards/necb/NECB2015/data/heat_pumps_heating.json +16 -24
  120. data/lib/openstudio-standards/standards/necb/NECB2015/hvac_systems.rb +48 -25
  121. data/lib/openstudio-standards/standards/necb/NECB2020/building_envelope.rb +3 -3
  122. data/lib/openstudio-standards/standards/necb/NECB2020/data/chillers.json +36 -19
  123. data/lib/openstudio-standards/standards/necb/NECB2020/data/furnaces.json +19 -4
  124. data/lib/openstudio-standards/standards/necb/NECB2020/data/heat_pumps.json +20 -40
  125. data/lib/openstudio-standards/standards/necb/NECB2020/data/heat_pumps_heating.json +74 -36
  126. data/lib/openstudio-standards/standards/necb/NECB2020/necb_2020.rb +0 -2
  127. data/lib/openstudio-standards/standards/necb/NECB2020/service_water_heating.rb +123 -56
  128. data/lib/openstudio-standards/standards/necb/common/btap_data.rb +124 -2
  129. data/lib/openstudio-standards/standards/necb/common/btap_datapoint.rb +15 -2
  130. data/lib/openstudio-standards/standards/necb/common/necb_reference_runs.csv +1 -1
  131. data/lib/openstudio-standards/utilities/simulation.rb +1 -1
  132. data/lib/openstudio-standards/version.rb +1 -1
  133. data/lib/openstudio-standards/weather/Weather.stat_file.rb +33 -1
  134. data/lib/openstudio-standards.rb +1 -0
  135. metadata +14 -121
  136. data/data/standards/OpenStudio_Standards-ashrae_90_1.xlsx +0 -0
  137. data/data/weather/CAN_ON_Kingston.AP.718200_TMYx.2004-2018.ddy +0 -2342
  138. data/data/weather/CAN_ON_Kingston.AP.718200_TMYx.2004-2018.epw +0 -8768
  139. data/data/weather/CAN_ON_Kingston.AP.718200_TMYx.2004-2018.stat +0 -700
  140. data/data/weather/CAN_ON_Region.of.Waterloo.Intl.AP.713680_TMYx.2004-2018.ddy +0 -2342
  141. data/data/weather/CAN_ON_Region.of.Waterloo.Intl.AP.713680_TMYx.2004-2018.epw +0 -8768
  142. data/data/weather/CAN_ON_Region.of.Waterloo.Intl.AP.713680_TMYx.2004-2018.stat +0 -700
  143. data/data/weather/CAN_ON_Sarnia-Hadfield.AP.717040_TMYx.2004-2018.ddy +0 -2342
  144. data/data/weather/CAN_ON_Sarnia-Hadfield.AP.717040_TMYx.2004-2018.epw +0 -8768
  145. data/data/weather/CAN_ON_Sarnia-Hadfield.AP.717040_TMYx.2004-2018.stat +0 -700
  146. data/data/weather/CAN_QC_Gatineau.AP.716279_TMYx.2004-2018.ddy +0 -276
  147. data/data/weather/CAN_QC_Gatineau.AP.716279_TMYx.2004-2018.epw +0 -8768
  148. data/data/weather/CAN_QC_Gatineau.AP.716279_TMYx.2004-2018.stat +0 -611
  149. data/data/weather/CAN_QC_Granby.710367_TMYx.2004-2018.ddy +0 -276
  150. data/data/weather/CAN_QC_Granby.710367_TMYx.2004-2018.epw +0 -8768
  151. data/data/weather/CAN_QC_Granby.710367_TMYx.2004-2018.stat +0 -610
  152. data/data/weather/CAN_QC_Sherbrooke.AP.716100_TMYx.2004-2018.ddy +0 -2342
  153. data/data/weather/CAN_QC_Sherbrooke.AP.716100_TMYx.2004-2018.epw +0 -8768
  154. data/data/weather/CAN_QC_Sherbrooke.AP.716100_TMYx.2004-2018.stat +0 -700
  155. data/data/weather/CAN_QC_Trois.Rivieres.717240_TMYx.2004-2018.ddy +0 -2342
  156. data/data/weather/CAN_QC_Trois.Rivieres.717240_TMYx.2004-2018.epw +0 -8768
  157. data/data/weather/CAN_QC_Trois.Rivieres.717240_TMYx.2004-2018.stat +0 -700
  158. data/lib/openstudio-standards/hvac_sizing/Siz.AirConditionerVariableRefrigerantFlow.rb +0 -81
  159. data/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitaryHeatCoolVAVChngByp.rb +0 -27
  160. data/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitaryHeatPumpAirToAir.rb +0 -69
  161. data/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.rb +0 -178
  162. data/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitarySystem.rb +0 -27
  163. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctConstVolCooledBeam.rb +0 -27
  164. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctConstVolFourPipeInduction.rb +0 -27
  165. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctConstVolReheat.rb +0 -27
  166. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctParallelPIUReheat.rb +0 -67
  167. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctSeriesPIUReheat.rb +0 -27
  168. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctUncontrolled.rb +0 -30
  169. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVHeatAndCoolNoReheat.rb +0 -27
  170. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVHeatAndCoolReheat.rb +0 -27
  171. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVNoReheat.rb +0 -68
  172. data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVReheat.rb +0 -68
  173. data/lib/openstudio-standards/hvac_sizing/Siz.BoilerHotWater.rb +0 -42
  174. data/lib/openstudio-standards/hvac_sizing/Siz.BoilerSteam.rb +0 -27
  175. data/lib/openstudio-standards/hvac_sizing/Siz.ChillerElectricEIR.rb +0 -58
  176. data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXMultiSpeed.rb +0 -171
  177. data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXSingleSpeed.rb +0 -56
  178. data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXTwoSpeed.rb +0 -89
  179. data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXVariableRefrigerantFlow.rb +0 -50
  180. data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingWaterToAirHeatPumpEquationFit.rb +0 -69
  181. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDXMultiSpeed.rb +0 -120
  182. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDXSingleSpeed.rb +0 -56
  183. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDXVariableRefrigerantFlow.rb +0 -41
  184. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDesuperheater.rb +0 -27
  185. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingElectric.rb +0 -30
  186. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingGas.rb +0 -30
  187. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingGasMultiStage.rb +0 -68
  188. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWater.rb +0 -61
  189. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWaterToAirHeatPumpEquationFit.rb +0 -57
  190. data/lib/openstudio-standards/hvac_sizing/Siz.CoilWaterHeatingDesuperheater.rb +0 -27
  191. data/lib/openstudio-standards/hvac_sizing/Siz.ControllerOutdoorAir.rb +0 -59
  192. data/lib/openstudio-standards/hvac_sizing/Siz.ControllerWaterCoil.rb +0 -49
  193. data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerSingleSpeed.rb +0 -90
  194. data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerTwoSpeed.rb +0 -83
  195. data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerVariableSpeed.rb +0 -57
  196. data/lib/openstudio-standards/hvac_sizing/Siz.DistrictCooling.rb +0 -27
  197. data/lib/openstudio-standards/hvac_sizing/Siz.DistrictHeating.rb +0 -27
  198. data/lib/openstudio-standards/hvac_sizing/Siz.EvaporativeCoolerDirectResearchSpecial.rb +0 -27
  199. data/lib/openstudio-standards/hvac_sizing/Siz.EvaporativeCoolerIndirectResearchSpecial.rb +0 -27
  200. data/lib/openstudio-standards/hvac_sizing/Siz.EvaporativeFluidCoolerSingleSpeed.rb +0 -27
  201. data/lib/openstudio-standards/hvac_sizing/Siz.FanConstantVolume.rb +0 -29
  202. data/lib/openstudio-standards/hvac_sizing/Siz.FanOnOff.rb +0 -27
  203. data/lib/openstudio-standards/hvac_sizing/Siz.FanVariableVolume.rb +0 -29
  204. data/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsConstantSpeed.rb +0 -55
  205. data/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsVariableSpeed.rb +0 -55
  206. data/lib/openstudio-standards/hvac_sizing/Siz.HeatExchangerAirToAirSensibleAndLatent.rb +0 -38
  207. data/lib/openstudio-standards/hvac_sizing/Siz.HeatExchangerFluidToFluid.rb +0 -27
  208. data/lib/openstudio-standards/hvac_sizing/Siz.HumidifierSteamElectric.rb +0 -27
  209. data/lib/openstudio-standards/hvac_sizing/Siz.PlantLoop.rb +0 -42
  210. data/lib/openstudio-standards/hvac_sizing/Siz.PumpConstantSpeed.rb +0 -59
  211. data/lib/openstudio-standards/hvac_sizing/Siz.PumpVariableSpeed.rb +0 -59
  212. data/lib/openstudio-standards/hvac_sizing/Siz.SizingSystem.rb +0 -48
  213. data/lib/openstudio-standards/hvac_sizing/Siz.WaterHeaterMixed.rb +0 -16
  214. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACBaseboardConvectiveElectric.rb +0 -27
  215. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACBaseboardConvectiveWater.rb +0 -27
  216. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACFourPipeFanCoil.rb +0 -27
  217. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACHighTemperatureRadiant.rb +0 -27
  218. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACIdealLoadsAirSystem.rb +0 -27
  219. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACLowTempRadiantConstFlow.rb +0 -27
  220. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACLowTempRadiantVarFlow.rb +0 -27
  221. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACLowTemperatureRadiantElectric.rb +0 -27
  222. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACPackagedTerminalAirConditioner.rb +0 -88
  223. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACPackagedTerminalHeatPump.rb +0 -88
  224. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACTerminalUnitVariableRefrigerantFlow.rb +0 -104
  225. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACUnitHeater.rb +0 -27
  226. data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACWaterToAirHeatPump.rb +0 -27
@@ -1,439 +1,439 @@
1
- # *********************************************************************
2
- # * Copyright (c) 2008-2015, Natural Resources Canada
3
- # * All rights reserved.
4
- # *
5
- # * This library is free software; you can redistribute it and/or
6
- # * modify it under the terms of the GNU Lesser General Public
7
- # * License as published by the Free Software Foundation; either
8
- # * version 2.1 of the License, or (at your option) any later version.
9
- # *
10
- # * This library is distributed in the hope that it will be useful,
11
- # * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
- # * Lesser General Public License for more details.
14
- # *
15
- # * You should have received a copy of the GNU Lesser General Public
16
- # * License along with this library; if not, write to the Free Software
17
- # * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
- # **********************************************************************/
19
-
20
- require "#{File.dirname(__FILE__)}/btap"
21
-
22
-
23
- module BTAP
24
- module Resources #Resources
25
-
26
-
27
- # This module contains methods that relate to Materials, Constructions and Construction Sets
28
-
29
- module SpaceLoads # BTAP::Resources::SpaceLoads
30
- #Not sure if we need this.
31
-
32
-
33
- #Test SpaceLoads Module
34
- if __FILE__ == $0
35
- require 'test/unit'
36
- class SpaceLoadsTests < Test::Unit::TestCase
37
-
38
- #This method will test the creation of all loads.
39
- #@author phylroy.lopez@nrcan.gc.ca
40
- def test_create_all_loads()
41
- model = OpenStudio::Model::Model.new()
42
- people = BTAP::Resources::SpaceLoads::create_people_load(model,"people_load_test")
43
- lights = BTAP::Resources::SpaceLoads::create_lighting_load(model,"lights_load_test")
44
- electric = BTAP::Resources::SpaceLoads::create_electric_load(model,"electric_load_test")
45
- hotwater = BTAP::Resources::SpaceLoads::create_hotwater_load(model,"hotwater_load_test")
46
- oa_load = BTAP::Resources::SpaceLoads::create_oa_load(model,"oa_load_test")
47
- infiltration_load = BTAP::Resources::SpaceLoads::create_infiltration_load(model,"infiltration_load_test")
48
- #Check to see if the objects were really created.
49
- assert( !(people.to_People.empty?))
50
- assert( !(lights.to_Lights.empty?))
51
- assert( !(electric.to_ElectricEquipment.empty?))
52
- assert( !(hotwater.to_HotWaterEquipment.empty?))
53
- assert( !(oa_load.to_DesignSpecificationOutdoorAir.empty?))
54
- assert( !(infiltration_load.to_SpaceInfiltrationDesignFlowRate.empty?))
55
-
56
- end
57
- end
58
- end # End Test SpaceLoads
59
-
60
-
61
-
62
- module ScaleLoads
63
-
64
- #This method will scale people loads.
65
- #@author phylroy.lopez@nrcan.gc.ca
66
- #@param model [OpenStudio::model::Model] A model object
67
- #@param factor [Float]
68
- def self.scale_people_loads( model, factor )
69
- model.getPeoples.sort.each do |item|
70
- item.setMultiplier( item.multiplier * factor )
71
- end
72
- end
73
-
74
- #This method will scale people loads schedule.
75
- #@author phylroy.lopez@nrcan.gc.ca
76
- #@param model [OpenStudio::model::Model] A model object
77
- #@param a_coef [Float]
78
- #@param b_coef [Float]
79
- #@param c_coef [Float]
80
- #@param time_shift [Float]
81
- #@param time_sign [Float]
82
- def self.scale_people_loads_schedule( model, a_coef, b_coef, c_coef,time_shift = nil, time_sign = nil )
83
- model.getPeoples.sort.each do |item|
84
- #Do an in-place modification of the schedule.
85
- BTAP::Resources::Schedules::modify_schedule!(model, item.schedule, a_coef, b_coef, c_coef, time_shift, time_sign )
86
- end
87
- end
88
-
89
- #This method will scale lighting loads.
90
- #@author phylroy.lopez@nrcan.gc.ca
91
- #@param model [OpenStudio::model::Model] A model object
92
- #@param factor [Float]
93
- def self.scale_lighting_loads( model, factor )
94
- model.getLightss.sort.each do |item|
95
- item.setMultiplier( item.multiplier * factor )
96
- end
97
- end
98
-
99
- #This method will scale lighting loads schedule.
100
- #@author phylroy.lopez@nrcan.gc.ca
101
- #@param model [OpenStudio::model::Model] A model object
102
- #@param a_coef [Float]
103
- #@param b_coef [Float]
104
- #@param c_coef [Float]
105
- #@param time_shift [Float]
106
- #@param time_sign [Float]
107
- def self.scale_lighting_loads_schedule( model, a_coef, b_coef, c_coef,time_shift = nil, time_sign = nil )
108
- model.getLightss.sort.each do |item|
109
- #Do an in-place modification of the schedule.
110
- BTAP::Resources::Schedules::modify_schedule!(model, item.schedule, a_coef, b_coef, c_coef, time_shift, time_sign)
111
- end
112
- end
113
-
114
- #This method will scale electrical loads.
115
- #@author phylroy.lopez@nrcan.gc.ca
116
- #@param model [OpenStudio::model::Model] A model object
117
- #@param factor [Float]
118
- def self.scale_electrical_loads( model, factor )
119
- model.getElectricEquipments.sort.each do |item|
120
- item.setMultiplier( item.multiplier * factor )
121
- end
122
- end
123
-
124
- #This method will scale electrical loads schedule.
125
- #@author phylroy.lopez@nrcan.gc.ca
126
- #@param model [OpenStudio::model::Model] A model object
127
- #@param a_coef [Float]
128
- #@param b_coef [Float]
129
- #@param c_coef [Float]
130
- #@param time_shift [Float]
131
- #@param time_sign [Float]
132
- def self.scale_electrical_loads_schedule( model, a_coef, b_coef, c_coef,time_shift = nil, time_sign = nil )
133
- model.getElectricEquipments.sort.each do |item|
134
- BTAP::Resources::Schedules::modify_schedule!(model, item.schedule, a_coef, b_coef, c_coef, time_shift, time_sign )
135
- end
136
- end
137
-
138
- #This method will scale hotwater loads.
139
- #@author phylroy.lopez@nrcan.gc.ca
140
- #@param model [OpenStudio::model::Model] A model object
141
- #@param factor [Float]
142
- def self.scale_hot_water_loads( model, factor )
143
- model.getHotWaterEquipments.sort.each do |item|
144
- item.setMultiplier( item.multiplier * factor )
145
- end
146
- end
147
-
148
- #This method will scale Outdoor Air loads.
149
- #@author phylroy.lopez@nrcan.gc.ca
150
- #@param model [OpenStudio::model::Model] A model object
151
- #@param factor [Float]
152
- def self.scale_oa_loads( model, factor )
153
- model.getDesignSpecificationOutdoorAirs.sort.each do |oa_def|
154
- oa_def.setOutdoorAirFlowperPerson(oa_def.outdoorAirFlowperPerson * factor ) unless oa_def.isOutdoorAirFlowperPersonDefaulted
155
- oa_def.setOutdoorAirFlowperFloorArea(oa_def.outdoorAirFlowperFloorArea * factor) unless oa_def.isOutdoorAirFlowperFloorAreaDefaulted
156
- oa_def.setOutdoorAirFlowRate(oa_def.outdoorAirFlowRate * factor) unless oa_def.isOutdoorAirFlowRateDefaulted
157
- oa_def.setOutdoorAirFlowAirChangesperHour(oa_def.outdoorAirFlowAirChangesperHour * factor ) unless oa_def.isOutdoorAirFlowAirChangesperHourDefaulted
158
- end
159
- end
160
-
161
- #This method will scale infiltration loads.
162
- #@author phylroy.lopez@nrcan.gc.ca
163
- #@param model [OpenStudio::model::Model] A model object
164
- #@param factor [Float]
165
- def self.scale_inflitration_loads( model, factor )
166
- model.getSpaceInfiltrationDesignFlowRates.sort.each do |infiltration_load|
167
- infiltration_load.setDesignFlowRate( infiltration_load.designFlowRate.get * factor ) unless infiltration_load.designFlowRate.empty?
168
- infiltration_load.setFlowperSpaceFloorArea( infiltration_load.flowperSpaceFloorArea.get * factor ) unless infiltration_load.flowperSpaceFloorArea.empty?
169
- infiltration_load.setFlowperExteriorSurfaceArea( infiltration_load.flowperExteriorSurfaceArea.get * factor ) unless infiltration_load.flowperExteriorSurfaceArea.empty?
170
- infiltration_load.setAirChangesperHour( infiltration_load.airChangesperHour.get * factor ) unless infiltration_load.airChangesperHour.empty?
171
- end
172
- end
173
-
174
- #This method will set the infiltration magnitude.
175
- #@author phylroy.lopez@nrcan.gc.ca
176
- #@param model [OpenStudio::model::Model] A model object
177
- #@param setDesignFlowRate [Float]
178
- #@param setFlowperSpaceFloorArea [Float]
179
- #@param setFlowperExteriorSurfaceArea [Float]
180
- #@param setAirChangesperHour [Float]
181
- #@return [String] table
182
- def self.set_inflitration_magnitude( model, setDesignFlowRate,setFlowperSpaceFloorArea,setFlowperExteriorSurfaceArea,setAirChangesperHour )
183
-
184
- table = "name,infiltration_method,infiltration_design_flow_rate,infiltration_flow_per_space,infiltration_flow_per_exterior_area,infiltration_air_changes_per_hour\n"
185
- model.getSpaceInfiltrationDesignFlowRates.sort.each do |infiltration_load|
186
- infiltration_load.setAirChangesperHour(setAirChangesperHour ) unless setAirChangesperHour.nil?
187
- infiltration_load.setDesignFlowRate( setDesignFlowRate ) unless setDesignFlowRate.nil?
188
- infiltration_load.setFlowperSpaceFloorArea(setFlowperSpaceFloorArea ) unless setFlowperSpaceFloorArea.nil?
189
- infiltration_load.setFlowperExteriorSurfaceArea(setFlowperExteriorSurfaceArea ) unless setFlowperExteriorSurfaceArea.nil?
190
- table << infiltration_load.name.get.to_s << ","
191
- table << infiltration_load.designFlowRateCalculationMethod << ","
192
- infiltration_load.airChangesperHour.empty? ? ach = "NA" : ach = infiltration_load.airChangesperHour.get
193
- infiltration_load.designFlowRate.empty? ? dfr = "NA" : dfr = infiltration_load.designFlowRate.get
194
- infiltration_load.flowperSpaceFloorArea.empty? ? fsfa = "NA" : fsfa = infiltration_load.flowperSpaceFloorArea.get
195
- infiltration_load.flowperExteriorSurfaceArea.empty? ? fesa = "NA" : fesa = infiltration_load.flowperExteriorSurfaceArea.get
196
- table << "#{ach},#{dfr},#{fsfa},#{fesa}\n"
197
- end
198
- return table
199
- end
200
- end
201
-
202
-
203
- #This method removes people loads from the model.
204
- #@author phylroy.lopez@nrcan.gc.ca
205
- #@param model [OpenStudio::model::Model] A model object
206
- def self.remove_all_people_loads(model)
207
- model.getPeoples.sort.each {|people| people.remove}
208
- model.getPeopleDefinitions.sort.each {|people| people.remove}
209
- end
210
-
211
-
212
- #This method created people loads from the model.
213
- #@author phylroy.lopez@nrcan.gc.ca
214
- #@param model [OpenStudio::model::Model] A model object
215
- #@param people_name [String]
216
- #@param floor_area_per_person [Float]
217
- #@param multiplier [Float]
218
- #@param schedule [Float]
219
- #@return [String] people
220
- def self.create_people_load(model,people_name,floor_area_per_person = 0.0, multiplier = 1.0 , schedule ="")
221
- raise("People \"#{people_name}\" already exists. Please use a different name") unless model.getPeopleByName(people_name).empty?
222
- peopledef = OpenStudio::Model::PeopleDefinition.new(model)
223
- peopledef.setName(people_name + "-def" )
224
- peopledef.setSpaceFloorAreaperPerson(floor_area_per_person)
225
- peopledef.setFractionRadiant(0.3000)
226
- people = OpenStudio::Model::People.new(peopledef)
227
- people.setName(people_name )
228
- people.setMultiplier(multiplier)
229
- activity_sched = model.getScheduleRulesetByName("activity 120W")
230
- if activity_sched.empty?
231
- people.setActivityLevelSchedule(Resources::Schedules::create_annual_constant_ruleset_schedule(model,"activity 120W","ACTIVITY",120.0))
232
- else
233
- people.setActivityLevelSchedule( activity_sched.get)
234
- end
235
- #this will override default schedule if given.
236
- people.setNumberofPeopleSchedule( BTAP::Common::validate_array(model,schedule,"ScheduleRuleset").first )unless schedule == ""
237
- return people
238
- end
239
-
240
- #This method removes light loads from model.
241
- #@author phylroy.lopez@nrcan.gc.ca
242
- #@param model [OpenStudio::model::Model] A model object
243
- def self.remove_all_light_loads(model)
244
- model.getLightss.sort.each {|item| item.remove}
245
- model.getLightsDefinitions.sort.each {|item| item.remove}
246
- end
247
-
248
- #This method created people loads from the model.
249
- #@author phylroy.lopez@nrcan.gc.ca
250
- #@param model [OpenStudio::model::Model] A model object
251
- #@param light_name [String]
252
- #@param light_watts_per_floor_area [Float]
253
- #@param multiplier [Float]
254
- #@param schedule [Float]
255
- #@return [String] lights
256
- def self.create_lighting_load(model,light_name,light_watts_per_floor_area= 0.0, multiplier = 1.0 ,schedule ="" )
257
- raise("Light #{name} already exists. Please use a different name") unless model.getLightsByName(light_name).empty?
258
- lightsdef = OpenStudio::Model::LightsDefinition.new(model)
259
- lightsdef.setWattsperSpaceFloorArea(light_watts_per_floor_area)
260
- lightsdef.setName(light_name + "-def" )
261
- lights = OpenStudio::Model::Lights.new(lightsdef)
262
- lights.setName(light_name )
263
- lights.setMultiplier(multiplier)
264
- lights.setSchedule( BTAP::Common::validate_array(model,schedule,"ScheduleRuleset").first ) unless "" == schedule
265
- return lights
266
- end
267
-
268
-
269
- #This method removes elec loads from model.
270
- #@author phylroy.lopez@nrcan.gc.ca
271
- #@param model [OpenStudio::model::Model] A model object
272
- def self.remove_all_electric_loads(model)
273
- model.getElectricEquipments.sort.each {|item| item.remove}
274
- model.getElectricEquipmentDefinitions.sort.each {|item| item.remove}
275
- end
276
-
277
-
278
- #This method created people loads from the model.
279
- #@author phylroy.lopez@nrcan.gc.ca
280
- #@param model [OpenStudio::model::Model] A model object
281
- #@param elec_name [String]
282
- #@param elec_watts_per_floor_area [Float]
283
- #@param multiplier [Float]
284
- #@param schedule [Float]
285
- #@return [String] elec
286
- def self.create_electric_load(model,elec_name,elec_watts_per_floor_area = 0.0, multiplier = 1.0 ,schedule ="")
287
- raise("ElectricEquipment #{name} already exists. Please use a different name") unless model.getElectricEquipmentByName(elec_name).empty?
288
- elecdef = OpenStudio::Model::ElectricEquipmentDefinition.new(model)
289
- elecdef.setWattsperSpaceFloorArea(elec_watts_per_floor_area)
290
- elecdef.setName(elec_name + "-def" )
291
- elec = OpenStudio::Model::ElectricEquipment.new(elecdef)
292
- elec.setName(elec_name )
293
- elec.setMultiplier(multiplier)
294
- elec.setSchedule( BTAP::Common::validate_array(model,people_schedule,"ScheduleRuleset").first ) unless schedule == ""
295
- return elec
296
- end
297
-
298
- #This method removes hot water loads from model.
299
- #@author phylroy.lopez@nrcan.gc.ca
300
- #@param model [OpenStudio::model::Model] A model object
301
- def self.remove_all_hot_water_loads(model)
302
- model.getHotWaterEquipments.sort.each {|item| item.remove}
303
- model.getHotWaterEquipmentDefinitions.sort.each {|item| item.remove}
304
- end
305
-
306
- #This method creats hot water load.
307
- #@author phylroy.lopez@nrcan.gc.ca
308
- #@param model [OpenStudio::model::Model] A model object
309
- #@param hot_water_name [String]
310
- #@param hot_water_watts_per_floor_area [Float]
311
- #@param multiplier [Float]
312
- #@param schedule [Float]
313
- #@return [String] hotwater
314
- def self.create_hotwater_load(model,hot_water_name,hot_water_watts_per_floor_area = 0.0,multiplier = 1.0 ,schedule ="")
315
- raise("HotWaterEquipment #{name} already exists. Please use a different name") unless model.getHotWaterEquipmentByName(hot_water_name).empty?
316
- hotwaterdef = OpenStudio::Model::HotWaterEquipmentDefinition.new(model)
317
- hotwaterdef.setWattsperSpaceFloorArea(hot_water_watts_per_floor_area)
318
- hotwaterdef.setName(hot_water_name + "-def")
319
- hotwater = OpenStudio::Model::HotWaterEquipment.new(hotwaterdef)
320
- hotwater.setName(hot_water_name )
321
- hotwater.setMultiplier(multiplier)
322
- hotwater.setSchedule( BTAP::Common::validate_array(model,schedule,"ScheduleRuleset").first ) unless schedule == ""
323
- return hotwater
324
- end
325
-
326
-
327
- #This method removes all design specification OA from model.
328
- #@author phylroy.lopez@nrcan.gc.ca
329
- #@param model [OpenStudio::model::Model] A model object
330
- def self.remove_all_DesignSpecificationOutdoorAir(model)
331
- model.getDesignSpecificationOutdoorAirs.sort.each { |item| item.remove }
332
- end
333
-
334
-
335
- #This method removes all space infiltration design flow rate OA from model.
336
- #@author phylroy.lopez@nrcan.gc.ca
337
- #@param model [OpenStudio::model::Model] A model object
338
- def self.remove_all_SpaceInfiltrationDesignFlowRate(model)
339
- OpenStudio::Model::SpaceInfiltrationDesignFlowRate
340
- model.getSpaceInfiltrationDesignFlowRates.sort.each { |item| item.remove }
341
- end
342
-
343
- #This method creats hot water load.
344
- #@author phylroy.lopez@nrcan.gc.ca
345
- #@param model [OpenStudio::model::Model] A model object
346
- #@param oa_name [String]
347
- #@param oa_person [Fixnum]
348
- #@param oa_area [Fixnum]
349
- #@param oa_ach [Fixnum]
350
- #@param oa_flowrate [Fixnum]
351
- #@param method [String]
352
- #@param schedule [Float]
353
- #@return [OpenStudio::model::Model] oa_def
354
- def self.create_oa_load(model,oa_name,oa_person = 0 ,oa_area = 0, oa_ach = 0, oa_flowrate = 0, method = "Maximum",schedule = nil)
355
- raise("DesignSpecificationOutdoorAir #{name} already exists. Please use a different name") unless model.getDesignSpecificationOutdoorAirByName( oa_name ).empty?
356
- #units are in m3/s for flow and m2 for area.
357
- #The method must be either Flow/Person,Flow/Area,Flow/Zone,AirChanges/Hour,Sum,Maximum.
358
- #Defaults to the maximum calculated value
359
- raise ("outdoor air method argument #{method} is not valid") unless OpenStudio::Model::DesignSpecificationOutdoorAir::validOutdoorAirMethodValues.include?(method)
360
- #Find a DesignSpecificationOutdoorAir object if one of the same title is not found. Then we will create it.
361
- oa_def = OpenStudio::Model::DesignSpecificationOutdoorAir.new(model)
362
- oa_def.setOutdoorAirMethod(method)
363
- oa_def.setOutdoorAirFlowperPerson(oa_person)
364
- oa_def.setOutdoorAirFlowperFloorArea(oa_area)
365
- oa_def.setOutdoorAirFlowRate(oa_flowrate)
366
- oa_def.setOutdoorAirFlowAirChangesperHour(oa_ach)
367
- oa_def.setName(oa_name )
368
- oa_def.setOutdoorAirFlowRateFractionSchedule( BTAP::Common::validate_array(model,schedule,"ScheduleRuleset").first ) unless schedule.nil?
369
- return oa_def
370
- end
371
-
372
-
373
-
374
- #This method removes infiltration from model..
375
- #@author phylroy.lopez@nrcan.gc.ca
376
- #@param model [OpenStudio::model::Model] A model object
377
- def self.remove_all_SpaceInfiltrationDesignFlowRates(model)
378
- model.getSpaceInfiltrationDesignFlowRates.sort.each { |item| item.remove }
379
- end
380
-
381
- #This method creates infiltration load.
382
- #NECB infiltration rate is 0.25L/s/m2 or 0.00025 m3/s/m2
383
- #@author phylroy.lopez@nrcan.gc.ca
384
- #@param model [OpenStudio::model::Model] A model object
385
- #@return [String] infiltration_load
386
- def self.create_infiltration_load(model,
387
- infil_name,
388
- value = 0.00025 ,
389
- method = "Flow/ExteriorArea" ,
390
- schedule = BTAP::Resources::Schedules::StandardSchedules::Fraction::always_on(model),
391
- setConstantTermCoefficient = 1.0,
392
- setTemperatureTermCoefficient = 0.0,
393
- setVelocityTermCoefficient = 0.0,
394
- setVelocitySquaredTermCoefficient = 0.0 )
395
- #units are in m3/s for flow and m2 for area.
396
- #The method must be either Flow/Person,Flow/Area,Flow/Zone,AirChanges/Hour,Sum,Maximum.
397
- #Defaults to the maximum calculated value
398
- #units are in m3/s for flow and m2 for area.
399
- #The method must be either Flow/Space, Flow/Area,Flow/ExteriorArea,AirChanges/Hour,Sum,Maximum.
400
- #Defaults to the maximum calculated value
401
- raise("SpaceInfiltrationDesignFlowRate #{name} already exists. Please use a different name") unless model.getSpaceInfiltrationDesignFlowRateByName( infil_name ).empty?
402
- raise("infiltration method #{method} is not a part of accepted values such as: #{OpenStudio::Model::SpaceInfiltrationDesignFlowRate::validDesignFlowRateCalculationMethodValues.join(",")}") unless OpenStudio::Model::SpaceInfiltrationDesignFlowRate::validDesignFlowRateCalculationMethodValues.include?(method)
403
-
404
- infiltration_load = OpenStudio::Model::SpaceInfiltrationDesignFlowRate.new(model)
405
- infiltration_load.setName(infil_name )
406
- infiltration_load.setDesignFlowRate(value) if method == "Flow/Space"
407
- infiltration_load.setFlowperSpaceFloorArea(value) if method == "Flow/Area"
408
- infiltration_load.setFlowperExteriorWallArea(value) if method == "Flow/ExteriorWallArea"
409
- infiltration_load.setFlowperExteriorSurfaceArea(value) if method == "Flow/ExteriorArea"
410
- infiltration_load.setAirChangesperHour(value) if method == "AirChanges/Hour"
411
- infiltration_load.setConstantTermCoefficient(setConstantTermCoefficient)
412
- infiltration_load.setTemperatureTermCoefficient(setTemperatureTermCoefficient)
413
- infiltration_load.setVelocityTermCoefficient(setVelocityTermCoefficient)
414
- infiltration_load.setVelocitySquaredTermCoefficient(setVelocitySquaredTermCoefficient)
415
- infiltration_load.setSchedule( BTAP::Common::validate_array(model,schedule,"ScheduleRuleset").first )
416
-
417
- return infiltration_load
418
- end
419
-
420
- #This method removes all loads from model.
421
- #@author phylroy.lopez@nrcan.gc.ca
422
- #@param model [OpenStudio::model::Model] A model object
423
- def self.remove_all_casual_loads(model)
424
- self.remove_all_people_loads(model)
425
- self.remove_all_light_loads(model)
426
- self.remove_all_electric_loads(model)
427
- self.remove_all_hot_water_loads(model)
428
- end
429
-
430
- #This method removes all space loads from model.
431
- #@author phylroy.lopez@nrcan.gc.ca
432
- #@param model [OpenStudio::model::Model] A model object
433
- def self.remove_all_SpaceLoads(model)
434
- model.getSpaceLoads.sort.each { |item| item.remove }
435
- model.getSpaceLoadDefinitions.sort.each { |item| item.remove }
436
- end
437
- end #module SpaceLoads
438
- end #module Resources
439
- end
1
+ # # *********************************************************************
2
+ # # * Copyright (c) 2008-2015, Natural Resources Canada
3
+ # # * All rights reserved.
4
+ # # *
5
+ # # * This library is free software; you can redistribute it and/or
6
+ # # * modify it under the terms of the GNU Lesser General Public
7
+ # # * License as published by the Free Software Foundation; either
8
+ # # * version 2.1 of the License, or (at your option) any later version.
9
+ # # *
10
+ # # * This library is distributed in the hope that it will be useful,
11
+ # # * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ # # * Lesser General Public License for more details.
14
+ # # *
15
+ # # * You should have received a copy of the GNU Lesser General Public
16
+ # # * License along with this library; if not, write to the Free Software
17
+ # # * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
+ # # **********************************************************************/
19
+ #
20
+ # require "#{File.dirname(__FILE__)}/btap"
21
+ #
22
+ #
23
+ # module BTAP
24
+ # module Resources #Resources
25
+ #
26
+ #
27
+ # # This module contains methods that relate to Materials, Constructions and Construction Sets
28
+ #
29
+ # module SpaceLoads # BTAP::Resources::SpaceLoads
30
+ # #Not sure if we need this.
31
+ #
32
+ #
33
+ # #Test SpaceLoads Module
34
+ # if __FILE__ == $0
35
+ # require 'test/unit'
36
+ # class SpaceLoadsTests < Test::Unit::TestCase
37
+ #
38
+ # #This method will test the creation of all loads.
39
+ # #@author phylroy.lopez@nrcan.gc.ca
40
+ # def test_create_all_loads()
41
+ # model = OpenStudio::Model::Model.new()
42
+ # people = BTAP::Resources::SpaceLoads::create_people_load(model,"people_load_test")
43
+ # lights = BTAP::Resources::SpaceLoads::create_lighting_load(model,"lights_load_test")
44
+ # electric = BTAP::Resources::SpaceLoads::create_electric_load(model,"electric_load_test")
45
+ # hotwater = BTAP::Resources::SpaceLoads::create_hotwater_load(model,"hotwater_load_test")
46
+ # oa_load = BTAP::Resources::SpaceLoads::create_oa_load(model,"oa_load_test")
47
+ # infiltration_load = BTAP::Resources::SpaceLoads::create_infiltration_load(model,"infiltration_load_test")
48
+ # #Check to see if the objects were really created.
49
+ # assert( !(people.to_People.empty?))
50
+ # assert( !(lights.to_Lights.empty?))
51
+ # assert( !(electric.to_ElectricEquipment.empty?))
52
+ # assert( !(hotwater.to_HotWaterEquipment.empty?))
53
+ # assert( !(oa_load.to_DesignSpecificationOutdoorAir.empty?))
54
+ # assert( !(infiltration_load.to_SpaceInfiltrationDesignFlowRate.empty?))
55
+ #
56
+ # end
57
+ # end
58
+ # end # End Test SpaceLoads
59
+ #
60
+ #
61
+ #
62
+ # module ScaleLoads
63
+ #
64
+ # #This method will scale people loads.
65
+ # #@author phylroy.lopez@nrcan.gc.ca
66
+ # #@param model [OpenStudio::model::Model] A model object
67
+ # #@param factor [Float]
68
+ # def self.scale_people_loads( model, factor )
69
+ # model.getPeoples.sort.each do |item|
70
+ # item.setMultiplier( item.multiplier * factor )
71
+ # end
72
+ # end
73
+ #
74
+ # #This method will scale people loads schedule.
75
+ # #@author phylroy.lopez@nrcan.gc.ca
76
+ # #@param model [OpenStudio::model::Model] A model object
77
+ # #@param a_coef [Float]
78
+ # #@param b_coef [Float]
79
+ # #@param c_coef [Float]
80
+ # #@param time_shift [Float]
81
+ # #@param time_sign [Float]
82
+ # def self.scale_people_loads_schedule( model, a_coef, b_coef, c_coef,time_shift = nil, time_sign = nil )
83
+ # model.getPeoples.sort.each do |item|
84
+ # #Do an in-place modification of the schedule.
85
+ # BTAP::Resources::Schedules::modify_schedule!(model, item.schedule, a_coef, b_coef, c_coef, time_shift, time_sign )
86
+ # end
87
+ # end
88
+ #
89
+ # #This method will scale lighting loads.
90
+ # #@author phylroy.lopez@nrcan.gc.ca
91
+ # #@param model [OpenStudio::model::Model] A model object
92
+ # #@param factor [Float]
93
+ # def self.scale_lighting_loads( model, factor )
94
+ # model.getLightss.sort.each do |item|
95
+ # item.setMultiplier( item.multiplier * factor )
96
+ # end
97
+ # end
98
+ #
99
+ # #This method will scale lighting loads schedule.
100
+ # #@author phylroy.lopez@nrcan.gc.ca
101
+ # #@param model [OpenStudio::model::Model] A model object
102
+ # #@param a_coef [Float]
103
+ # #@param b_coef [Float]
104
+ # #@param c_coef [Float]
105
+ # #@param time_shift [Float]
106
+ # #@param time_sign [Float]
107
+ # def self.scale_lighting_loads_schedule( model, a_coef, b_coef, c_coef,time_shift = nil, time_sign = nil )
108
+ # model.getLightss.sort.each do |item|
109
+ # #Do an in-place modification of the schedule.
110
+ # BTAP::Resources::Schedules::modify_schedule!(model, item.schedule, a_coef, b_coef, c_coef, time_shift, time_sign)
111
+ # end
112
+ # end
113
+ #
114
+ # #This method will scale electrical loads.
115
+ # #@author phylroy.lopez@nrcan.gc.ca
116
+ # #@param model [OpenStudio::model::Model] A model object
117
+ # #@param factor [Float]
118
+ # def self.scale_electrical_loads( model, factor )
119
+ # model.getElectricEquipments.sort.each do |item|
120
+ # item.setMultiplier( item.multiplier * factor )
121
+ # end
122
+ # end
123
+ #
124
+ # #This method will scale electrical loads schedule.
125
+ # #@author phylroy.lopez@nrcan.gc.ca
126
+ # #@param model [OpenStudio::model::Model] A model object
127
+ # #@param a_coef [Float]
128
+ # #@param b_coef [Float]
129
+ # #@param c_coef [Float]
130
+ # #@param time_shift [Float]
131
+ # #@param time_sign [Float]
132
+ # def self.scale_electrical_loads_schedule( model, a_coef, b_coef, c_coef,time_shift = nil, time_sign = nil )
133
+ # model.getElectricEquipments.sort.each do |item|
134
+ # BTAP::Resources::Schedules::modify_schedule!(model, item.schedule, a_coef, b_coef, c_coef, time_shift, time_sign )
135
+ # end
136
+ # end
137
+ #
138
+ # #This method will scale hotwater loads.
139
+ # #@author phylroy.lopez@nrcan.gc.ca
140
+ # #@param model [OpenStudio::model::Model] A model object
141
+ # #@param factor [Float]
142
+ # def self.scale_hot_water_loads( model, factor )
143
+ # model.getHotWaterEquipments.sort.each do |item|
144
+ # item.setMultiplier( item.multiplier * factor )
145
+ # end
146
+ # end
147
+ #
148
+ # #This method will scale Outdoor Air loads.
149
+ # #@author phylroy.lopez@nrcan.gc.ca
150
+ # #@param model [OpenStudio::model::Model] A model object
151
+ # #@param factor [Float]
152
+ # def self.scale_oa_loads( model, factor )
153
+ # model.getDesignSpecificationOutdoorAirs.sort.each do |oa_def|
154
+ # oa_def.setOutdoorAirFlowperPerson(oa_def.outdoorAirFlowperPerson * factor ) unless oa_def.isOutdoorAirFlowperPersonDefaulted
155
+ # oa_def.setOutdoorAirFlowperFloorArea(oa_def.outdoorAirFlowperFloorArea * factor) unless oa_def.isOutdoorAirFlowperFloorAreaDefaulted
156
+ # oa_def.setOutdoorAirFlowRate(oa_def.outdoorAirFlowRate * factor) unless oa_def.isOutdoorAirFlowRateDefaulted
157
+ # oa_def.setOutdoorAirFlowAirChangesperHour(oa_def.outdoorAirFlowAirChangesperHour * factor ) unless oa_def.isOutdoorAirFlowAirChangesperHourDefaulted
158
+ # end
159
+ # end
160
+ #
161
+ # #This method will scale infiltration loads.
162
+ # #@author phylroy.lopez@nrcan.gc.ca
163
+ # #@param model [OpenStudio::model::Model] A model object
164
+ # #@param factor [Float]
165
+ # def self.scale_inflitration_loads( model, factor )
166
+ # model.getSpaceInfiltrationDesignFlowRates.sort.each do |infiltration_load|
167
+ # infiltration_load.setDesignFlowRate( infiltration_load.designFlowRate.get * factor ) unless infiltration_load.designFlowRate.empty?
168
+ # infiltration_load.setFlowperSpaceFloorArea( infiltration_load.flowperSpaceFloorArea.get * factor ) unless infiltration_load.flowperSpaceFloorArea.empty?
169
+ # infiltration_load.setFlowperExteriorSurfaceArea( infiltration_load.flowperExteriorSurfaceArea.get * factor ) unless infiltration_load.flowperExteriorSurfaceArea.empty?
170
+ # infiltration_load.setAirChangesperHour( infiltration_load.airChangesperHour.get * factor ) unless infiltration_load.airChangesperHour.empty?
171
+ # end
172
+ # end
173
+ #
174
+ # #This method will set the infiltration magnitude.
175
+ # #@author phylroy.lopez@nrcan.gc.ca
176
+ # #@param model [OpenStudio::model::Model] A model object
177
+ # #@param setDesignFlowRate [Float]
178
+ # #@param setFlowperSpaceFloorArea [Float]
179
+ # #@param setFlowperExteriorSurfaceArea [Float]
180
+ # #@param setAirChangesperHour [Float]
181
+ # #@return [String] table
182
+ # def self.set_inflitration_magnitude( model, setDesignFlowRate,setFlowperSpaceFloorArea,setFlowperExteriorSurfaceArea,setAirChangesperHour )
183
+ #
184
+ # table = "name,infiltration_method,infiltration_design_flow_rate,infiltration_flow_per_space,infiltration_flow_per_exterior_area,infiltration_air_changes_per_hour\n"
185
+ # model.getSpaceInfiltrationDesignFlowRates.sort.each do |infiltration_load|
186
+ # infiltration_load.setAirChangesperHour(setAirChangesperHour ) unless setAirChangesperHour.nil?
187
+ # infiltration_load.setDesignFlowRate( setDesignFlowRate ) unless setDesignFlowRate.nil?
188
+ # infiltration_load.setFlowperSpaceFloorArea(setFlowperSpaceFloorArea ) unless setFlowperSpaceFloorArea.nil?
189
+ # infiltration_load.setFlowperExteriorSurfaceArea(setFlowperExteriorSurfaceArea ) unless setFlowperExteriorSurfaceArea.nil?
190
+ # table << infiltration_load.name.get.to_s << ","
191
+ # table << infiltration_load.designFlowRateCalculationMethod << ","
192
+ # infiltration_load.airChangesperHour.empty? ? ach = "NA" : ach = infiltration_load.airChangesperHour.get
193
+ # infiltration_load.designFlowRate.empty? ? dfr = "NA" : dfr = infiltration_load.designFlowRate.get
194
+ # infiltration_load.flowperSpaceFloorArea.empty? ? fsfa = "NA" : fsfa = infiltration_load.flowperSpaceFloorArea.get
195
+ # infiltration_load.flowperExteriorSurfaceArea.empty? ? fesa = "NA" : fesa = infiltration_load.flowperExteriorSurfaceArea.get
196
+ # table << "#{ach},#{dfr},#{fsfa},#{fesa}\n"
197
+ # end
198
+ # return table
199
+ # end
200
+ # end
201
+ #
202
+ #
203
+ # #This method removes people loads from the model.
204
+ # #@author phylroy.lopez@nrcan.gc.ca
205
+ # #@param model [OpenStudio::model::Model] A model object
206
+ # def self.remove_all_people_loads(model)
207
+ # model.getPeoples.sort.each {|people| people.remove}
208
+ # model.getPeopleDefinitions.sort.each {|people| people.remove}
209
+ # end
210
+ #
211
+ #
212
+ # #This method created people loads from the model.
213
+ # #@author phylroy.lopez@nrcan.gc.ca
214
+ # #@param model [OpenStudio::model::Model] A model object
215
+ # #@param people_name [String]
216
+ # #@param floor_area_per_person [Float]
217
+ # #@param multiplier [Float]
218
+ # #@param schedule [Float]
219
+ # #@return [String] people
220
+ # def self.create_people_load(model,people_name,floor_area_per_person = 0.0, multiplier = 1.0 , schedule ="")
221
+ # raise("People \"#{people_name}\" already exists. Please use a different name") unless model.getPeopleByName(people_name).empty?
222
+ # peopledef = OpenStudio::Model::PeopleDefinition.new(model)
223
+ # peopledef.setName(people_name + "-def" )
224
+ # peopledef.setSpaceFloorAreaperPerson(floor_area_per_person)
225
+ # peopledef.setFractionRadiant(0.3000)
226
+ # people = OpenStudio::Model::People.new(peopledef)
227
+ # people.setName(people_name )
228
+ # people.setMultiplier(multiplier)
229
+ # activity_sched = model.getScheduleRulesetByName("activity 120W")
230
+ # if activity_sched.empty?
231
+ # people.setActivityLevelSchedule(Resources::Schedules::create_annual_constant_ruleset_schedule(model,"activity 120W","ACTIVITY",120.0))
232
+ # else
233
+ # people.setActivityLevelSchedule( activity_sched.get)
234
+ # end
235
+ # #this will override default schedule if given.
236
+ # people.setNumberofPeopleSchedule( BTAP::Common::validate_array(model,schedule,"ScheduleRuleset").first )unless schedule == ""
237
+ # return people
238
+ # end
239
+ #
240
+ # #This method removes light loads from model.
241
+ # #@author phylroy.lopez@nrcan.gc.ca
242
+ # #@param model [OpenStudio::model::Model] A model object
243
+ # def self.remove_all_light_loads(model)
244
+ # model.getLightss.sort.each {|item| item.remove}
245
+ # model.getLightsDefinitions.sort.each {|item| item.remove}
246
+ # end
247
+ #
248
+ # #This method created people loads from the model.
249
+ # #@author phylroy.lopez@nrcan.gc.ca
250
+ # #@param model [OpenStudio::model::Model] A model object
251
+ # #@param light_name [String]
252
+ # #@param light_watts_per_floor_area [Float]
253
+ # #@param multiplier [Float]
254
+ # #@param schedule [Float]
255
+ # #@return [String] lights
256
+ # def self.create_lighting_load(model,light_name,light_watts_per_floor_area= 0.0, multiplier = 1.0 ,schedule ="" )
257
+ # raise("Light #{name} already exists. Please use a different name") unless model.getLightsByName(light_name).empty?
258
+ # lightsdef = OpenStudio::Model::LightsDefinition.new(model)
259
+ # lightsdef.setWattsperSpaceFloorArea(light_watts_per_floor_area)
260
+ # lightsdef.setName(light_name + "-def" )
261
+ # lights = OpenStudio::Model::Lights.new(lightsdef)
262
+ # lights.setName(light_name )
263
+ # lights.setMultiplier(multiplier)
264
+ # lights.setSchedule( BTAP::Common::validate_array(model,schedule,"ScheduleRuleset").first ) unless "" == schedule
265
+ # return lights
266
+ # end
267
+ #
268
+ #
269
+ # #This method removes elec loads from model.
270
+ # #@author phylroy.lopez@nrcan.gc.ca
271
+ # #@param model [OpenStudio::model::Model] A model object
272
+ # def self.remove_all_electric_loads(model)
273
+ # model.getElectricEquipments.sort.each {|item| item.remove}
274
+ # model.getElectricEquipmentDefinitions.sort.each {|item| item.remove}
275
+ # end
276
+ #
277
+ #
278
+ # #This method created people loads from the model.
279
+ # #@author phylroy.lopez@nrcan.gc.ca
280
+ # #@param model [OpenStudio::model::Model] A model object
281
+ # #@param elec_name [String]
282
+ # #@param elec_watts_per_floor_area [Float]
283
+ # #@param multiplier [Float]
284
+ # #@param schedule [Float]
285
+ # #@return [String] elec
286
+ # def self.create_electric_load(model,elec_name,elec_watts_per_floor_area = 0.0, multiplier = 1.0 ,schedule ="")
287
+ # raise("ElectricEquipment #{name} already exists. Please use a different name") unless model.getElectricEquipmentByName(elec_name).empty?
288
+ # elecdef = OpenStudio::Model::ElectricEquipmentDefinition.new(model)
289
+ # elecdef.setWattsperSpaceFloorArea(elec_watts_per_floor_area)
290
+ # elecdef.setName(elec_name + "-def" )
291
+ # elec = OpenStudio::Model::ElectricEquipment.new(elecdef)
292
+ # elec.setName(elec_name )
293
+ # elec.setMultiplier(multiplier)
294
+ # elec.setSchedule( BTAP::Common::validate_array(model,people_schedule,"ScheduleRuleset").first ) unless schedule == ""
295
+ # return elec
296
+ # end
297
+ #
298
+ # #This method removes hot water loads from model.
299
+ # #@author phylroy.lopez@nrcan.gc.ca
300
+ # #@param model [OpenStudio::model::Model] A model object
301
+ # def self.remove_all_hot_water_loads(model)
302
+ # model.getHotWaterEquipments.sort.each {|item| item.remove}
303
+ # model.getHotWaterEquipmentDefinitions.sort.each {|item| item.remove}
304
+ # end
305
+ #
306
+ # #This method creats hot water load.
307
+ # #@author phylroy.lopez@nrcan.gc.ca
308
+ # #@param model [OpenStudio::model::Model] A model object
309
+ # #@param hot_water_name [String]
310
+ # #@param hot_water_watts_per_floor_area [Float]
311
+ # #@param multiplier [Float]
312
+ # #@param schedule [Float]
313
+ # #@return [String] hotwater
314
+ # def self.create_hotwater_load(model,hot_water_name,hot_water_watts_per_floor_area = 0.0,multiplier = 1.0 ,schedule ="")
315
+ # raise("HotWaterEquipment #{name} already exists. Please use a different name") unless model.getHotWaterEquipmentByName(hot_water_name).empty?
316
+ # hotwaterdef = OpenStudio::Model::HotWaterEquipmentDefinition.new(model)
317
+ # hotwaterdef.setWattsperSpaceFloorArea(hot_water_watts_per_floor_area)
318
+ # hotwaterdef.setName(hot_water_name + "-def")
319
+ # hotwater = OpenStudio::Model::HotWaterEquipment.new(hotwaterdef)
320
+ # hotwater.setName(hot_water_name )
321
+ # hotwater.setMultiplier(multiplier)
322
+ # hotwater.setSchedule( BTAP::Common::validate_array(model,schedule,"ScheduleRuleset").first ) unless schedule == ""
323
+ # return hotwater
324
+ # end
325
+ #
326
+ #
327
+ # #This method removes all design specification OA from model.
328
+ # #@author phylroy.lopez@nrcan.gc.ca
329
+ # #@param model [OpenStudio::model::Model] A model object
330
+ # def self.remove_all_DesignSpecificationOutdoorAir(model)
331
+ # model.getDesignSpecificationOutdoorAirs.sort.each { |item| item.remove }
332
+ # end
333
+ #
334
+ #
335
+ # #This method removes all space infiltration design flow rate OA from model.
336
+ # #@author phylroy.lopez@nrcan.gc.ca
337
+ # #@param model [OpenStudio::model::Model] A model object
338
+ # def self.remove_all_SpaceInfiltrationDesignFlowRate(model)
339
+ # OpenStudio::Model::SpaceInfiltrationDesignFlowRate
340
+ # model.getSpaceInfiltrationDesignFlowRates.sort.each { |item| item.remove }
341
+ # end
342
+ #
343
+ # #This method creats hot water load.
344
+ # #@author phylroy.lopez@nrcan.gc.ca
345
+ # #@param model [OpenStudio::model::Model] A model object
346
+ # #@param oa_name [String]
347
+ # #@param oa_person [Fixnum]
348
+ # #@param oa_area [Fixnum]
349
+ # #@param oa_ach [Fixnum]
350
+ # #@param oa_flowrate [Fixnum]
351
+ # #@param method [String]
352
+ # #@param schedule [Float]
353
+ # #@return [OpenStudio::model::Model] oa_def
354
+ # def self.create_oa_load(model,oa_name,oa_person = 0 ,oa_area = 0, oa_ach = 0, oa_flowrate = 0, method = "Maximum",schedule = nil)
355
+ # raise("DesignSpecificationOutdoorAir #{name} already exists. Please use a different name") unless model.getDesignSpecificationOutdoorAirByName( oa_name ).empty?
356
+ # #units are in m3/s for flow and m2 for area.
357
+ # #The method must be either Flow/Person,Flow/Area,Flow/Zone,AirChanges/Hour,Sum,Maximum.
358
+ # #Defaults to the maximum calculated value
359
+ # raise ("outdoor air method argument #{method} is not valid") unless OpenStudio::Model::DesignSpecificationOutdoorAir::validOutdoorAirMethodValues.include?(method)
360
+ # #Find a DesignSpecificationOutdoorAir object if one of the same title is not found. Then we will create it.
361
+ # oa_def = OpenStudio::Model::DesignSpecificationOutdoorAir.new(model)
362
+ # oa_def.setOutdoorAirMethod(method)
363
+ # oa_def.setOutdoorAirFlowperPerson(oa_person)
364
+ # oa_def.setOutdoorAirFlowperFloorArea(oa_area)
365
+ # oa_def.setOutdoorAirFlowRate(oa_flowrate)
366
+ # oa_def.setOutdoorAirFlowAirChangesperHour(oa_ach)
367
+ # oa_def.setName(oa_name )
368
+ # oa_def.setOutdoorAirFlowRateFractionSchedule( BTAP::Common::validate_array(model,schedule,"ScheduleRuleset").first ) unless schedule.nil?
369
+ # return oa_def
370
+ # end
371
+ #
372
+ #
373
+ #
374
+ # #This method removes infiltration from model..
375
+ # #@author phylroy.lopez@nrcan.gc.ca
376
+ # #@param model [OpenStudio::model::Model] A model object
377
+ # def self.remove_all_SpaceInfiltrationDesignFlowRates(model)
378
+ # model.getSpaceInfiltrationDesignFlowRates.sort.each { |item| item.remove }
379
+ # end
380
+ #
381
+ # #This method creates infiltration load.
382
+ # #NECB infiltration rate is 0.25L/s/m2 or 0.00025 m3/s/m2
383
+ # #@author phylroy.lopez@nrcan.gc.ca
384
+ # #@param model [OpenStudio::model::Model] A model object
385
+ # #@return [String] infiltration_load
386
+ # def self.create_infiltration_load(model,
387
+ # infil_name,
388
+ # value = 0.00025 ,
389
+ # method = "Flow/ExteriorArea" ,
390
+ # schedule = BTAP::Resources::Schedules::StandardSchedules::Fraction::always_on(model),
391
+ # setConstantTermCoefficient = 1.0,
392
+ # setTemperatureTermCoefficient = 0.0,
393
+ # setVelocityTermCoefficient = 0.0,
394
+ # setVelocitySquaredTermCoefficient = 0.0 )
395
+ # #units are in m3/s for flow and m2 for area.
396
+ # #The method must be either Flow/Person,Flow/Area,Flow/Zone,AirChanges/Hour,Sum,Maximum.
397
+ # #Defaults to the maximum calculated value
398
+ # #units are in m3/s for flow and m2 for area.
399
+ # #The method must be either Flow/Space, Flow/Area,Flow/ExteriorArea,AirChanges/Hour,Sum,Maximum.
400
+ # #Defaults to the maximum calculated value
401
+ # raise("SpaceInfiltrationDesignFlowRate #{name} already exists. Please use a different name") unless model.getSpaceInfiltrationDesignFlowRateByName( infil_name ).empty?
402
+ # raise("infiltration method #{method} is not a part of accepted values such as: #{OpenStudio::Model::SpaceInfiltrationDesignFlowRate::validDesignFlowRateCalculationMethodValues.join(",")}") unless OpenStudio::Model::SpaceInfiltrationDesignFlowRate::validDesignFlowRateCalculationMethodValues.include?(method)
403
+ #
404
+ # infiltration_load = OpenStudio::Model::SpaceInfiltrationDesignFlowRate.new(model)
405
+ # infiltration_load.setName(infil_name )
406
+ # infiltration_load.setDesignFlowRate(value) if method == "Flow/Space"
407
+ # infiltration_load.setFlowperSpaceFloorArea(value) if method == "Flow/Area"
408
+ # infiltration_load.setFlowperExteriorWallArea(value) if method == "Flow/ExteriorWallArea"
409
+ # infiltration_load.setFlowperExteriorSurfaceArea(value) if method == "Flow/ExteriorArea"
410
+ # infiltration_load.setAirChangesperHour(value) if method == "AirChanges/Hour"
411
+ # infiltration_load.setConstantTermCoefficient(setConstantTermCoefficient)
412
+ # infiltration_load.setTemperatureTermCoefficient(setTemperatureTermCoefficient)
413
+ # infiltration_load.setVelocityTermCoefficient(setVelocityTermCoefficient)
414
+ # infiltration_load.setVelocitySquaredTermCoefficient(setVelocitySquaredTermCoefficient)
415
+ # infiltration_load.setSchedule( BTAP::Common::validate_array(model,schedule,"ScheduleRuleset").first )
416
+ #
417
+ # return infiltration_load
418
+ # end
419
+ #
420
+ # #This method removes all loads from model.
421
+ # #@author phylroy.lopez@nrcan.gc.ca
422
+ # #@param model [OpenStudio::model::Model] A model object
423
+ # def self.remove_all_casual_loads(model)
424
+ # self.remove_all_people_loads(model)
425
+ # self.remove_all_light_loads(model)
426
+ # self.remove_all_electric_loads(model)
427
+ # self.remove_all_hot_water_loads(model)
428
+ # end
429
+ #
430
+ # #This method removes all space loads from model.
431
+ # #@author phylroy.lopez@nrcan.gc.ca
432
+ # #@param model [OpenStudio::model::Model] A model object
433
+ # def self.remove_all_SpaceLoads(model)
434
+ # model.getSpaceLoads.sort.each { |item| item.remove }
435
+ # model.getSpaceLoadDefinitions.sort.each { |item| item.remove }
436
+ # end
437
+ # end #module SpaceLoads
438
+ # end #module Resources
439
+ # end