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,554 +1,554 @@
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
-
21
- module BTAP
22
- module MPC
23
- class MPC
24
-
25
- #set hourly setpoint values
26
- #"E:\\Montreal2\\ZonalLevel\\", #analysis folder
27
- #"C:\\osruby\\lib\\basic_ideal_loads.osm", #model file.
28
- #"Z:\\MPC Chipmunk Model\\Weather Files\\CAN_PQ_Montreal.Intl.AP.716270_CWEC\\CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw" #standard_weather_file
29
-
30
- #This method initializes.
31
- #@author phylroy.lopez@nrcan.gc.ca
32
- #@param model_file [OpenStudio::model::Model] A model object
33
- #@param weather_file [String] path to a weather file
34
- #@param analysis_folder [String] path to analysis folder
35
- def initialize (
36
- model_file,
37
- weather_file,
38
- analysis_folder)
39
-
40
- @model_file, @weather_file, @analysis_folder = model_file, weather_file, analysis_folder
41
-
42
-
43
- self.miso_zonal_analysis(@analysis_folder, #analysis folder
44
- @model_file, #model file.
45
- @weather_file #standard_weather_file
46
- )
47
-
48
- self.miso_building_analysis(@analysis_folder, #analysis folder
49
- @model_file, #model file.
50
- @weather_file #standard_weather_file
51
- )
52
-
53
-
54
- end
55
-
56
- #This method creates the schedules.
57
- #@author phylroy.lopez@nrcan.gc.ca
58
- #@param model [OpenStudio::model::Model] A model object
59
- def create_schedules(model)
60
-
61
- #Create cooling temperature schedule
62
-
63
- cool_sched_ruleset = BTAP::Resources::Schedules::create_annual_ruleset_schedule_detailed(model, "mpc_cooling_day", "TEMPERATURE",[
64
- [
65
- ["Jan-01","Dec-31"],["M","T","W","TH","F","S","SN"],
66
- [
67
- [ "5:00", 18.0 ],
68
- [ "9:00", 21.0 ],
69
- [ "15:00", 23.0 ],
70
- [ "18:00", 21.0 ],
71
- [ "24:00", 18.0 ]
72
- ]
73
- ]
74
- ]
75
- )
76
-
77
- #Create cooling temperature schedule
78
- heat_sched_ruleset = BTAP::Resources::Schedules::create_annual_ruleset_schedule_detailed(model, "mpc_cooling_day", "TEMPERATURE",[
79
- [
80
- ["Jan-01","Dec-31"],["M","T","W","TH","F","S","SN"],
81
- [
82
- [ "5:00", 18.0 ],
83
- [ "9:00", 21.0 ],
84
- [ "15:00", 23.0 ],
85
- [ "18:00", 21.0 ],
86
- [ "24:00", 18.0 ]
87
- ]
88
- ]
89
- ]
90
- )
91
-
92
- heat_sched_ruleset21 = BTAP::Resources::Schedules::create_annual_constant_ruleset_schedule(model, "mpc_cooling_day21","TEMPERATURE",21.0)
93
- cool_sched_ruleset21 = BTAP::Resources::Schedules::create_annual_constant_ruleset_schedule(model, "mpc_heating_day21","TEMPERATURE",21.0)
94
-
95
- @hourlyArrayValues21 =
96
- [
97
- Array.new(24){21}, #Weekday
98
- Array.new(24){21}, #Sat
99
- Array.new(24){21}, #Sun
100
- ]
101
-
102
- @hourly_noheatingArrayValues =
103
- [
104
- Array.new(24){-60}, #Weekday
105
- Array.new(24){-60}, #Sat
106
- Array.new(24){-60}, #Sun
107
- ]
108
-
109
- @hourly_nocoolingArrayValues =
110
- [
111
- Array.new(24){200}, #Weekday
112
- Array.new(24){200}, #Sat
113
- Array.new(24){200}, #Sun
114
- ]
115
- #model.add_standard_schedules()
116
-
117
- no_cool_sched_ruleset = BTAP::Resources::Schedules::create_annual_ruleset_schedule(model,"mpc_no_cooling_day","TEMPERATURE",@hourly_nocoolingArrayValues)
118
- no_heat_sched_ruleset = BTAP::Resources::Schedules::create_annual_ruleset_schedule(model,"mpc_no_heating_day","TEMPERATURE",@hourly_noheatingArrayValues)
119
-
120
- @mpc_heat_cool = BTAP::Resources::Schedules::create_annual_thermostat_setpoint_dual_setpoint(model,"mpc_heat_cool_set",heat_sched_ruleset,cool_sched_ruleset)
121
- @mpc_no_cooling = BTAP::Resources::Schedules::create_annual_thermostat_setpoint_dual_setpoint(model,"mpc_no_cooling_set",heat_sched_ruleset,no_cool_sched_ruleset)
122
- @mpc_no_heating = BTAP::Resources::Schedules::create_annual_thermostat_setpoint_dual_setpoint(model,"mpc_no_heating_set",no_heat_sched_ruleset,cool_sched_ruleset)
123
- @mpc_no_heat_cool = BTAP::Resources::Schedules::create_annual_thermostat_setpoint_dual_setpoint(model,"mpc_no_heat_cool_set",no_heat_sched_ruleset,no_cool_sched_ruleset)
124
- @mpc_21C_setpoint = BTAP::Resources::Schedules::create_annual_thermostat_setpoint_dual_setpoint(model,"mpc_21C_setpoint",heat_sched_ruleset21,cool_sched_ruleset21)
125
- end
126
-
127
- #This method sets the output variables.
128
- #@author phylroy.lopez@nrcan.gc.ca
129
- #@param model [OpenStudio::model::Model] A model object
130
- def set_output_variables(model)
131
- output_variable_array =
132
- [
133
-
134
- "Site Outdoor Air Drybulb Temperature",
135
- "Site Outdoor Air Dewpoint Temperature",
136
- "Site Outdoor Air Wetbulb Temperature",
137
- "Site Outdoor Air Humidity Ratio",
138
- "Site Outdoor Air Relative Humidity",
139
- "Site Outdoor Air Barometric Pressure",
140
- "Site Wind Speed",
141
- "Site Wind Direction",
142
- "Site Sky Temperature",
143
- "Site Horizontal Infrared Radiation Rate per Area",
144
- "Site Diffuse Solar Radiation Rate per Area",
145
- "Site Direct Solar Radiation Rate per Area",
146
- "Site Precipitation Depth",
147
- "Site Ground Reflected Solar Radiation Rate per Area",
148
- "Site Ground Temperature",
149
- "Site Surface Ground Temperature",
150
- "Site Deep Ground Temperature",
151
- "Site Simple Factor Model Ground Temperature",
152
- "Site Outdoor Air Enthalpy",
153
- "Site Outdoor Air Density",
154
- "Site Solar Azimuth Angle",
155
- "Site Solar Altitude Angle",
156
- "Site Solar Hour Angle",
157
- "Site Rain Status",
158
- "Site Snow on Ground Status",
159
- "Site Exterior Horizontal Sky Illuminance",
160
- "Site Exterior Horizontal Beam Illuminance",
161
- "Site Exterior Beam Normal Illuminance",
162
- "Site Sky Diffuse Solar Radiation Luminous Efficacy",
163
- "Site Beam Solar Radiation Luminous Efficacy",
164
- "Site Daylighting Model Sky Clearness",
165
- "Site Daylighting Model Sky Brightness",
166
- "Site Daylight Saving Time Status",
167
- "Site Day Type Index",
168
- "Site Mains Water Temperature",
169
- "Zone Operative Temperature",
170
- "Zone Windows Total Transmitted Solar Radiation Energy",
171
- "Zone Ideal Loads Zone Total Heating Energy",
172
- "Zone Ideal Loads Zone Total Cooling Energy",
173
- "Zone Total Internal Total Heating Energy",
174
- "Zone Total Internal Total Heating Rate",
175
- "Zone List Sensible Heating Energy",
176
- "Zone List Sensible Cooling Energy",
177
- "Zone List Sensible Heating Rate",
178
- "Zone List Sensible Cooling Rate",
179
- "Cooling Coil Total Cooling Rate",
180
- "Cooling Coil Total Cooling Energy",
181
- "Cooling Coil Sensible Cooling Rate",
182
- "Cooling Coil Sensible Cooling Energy",
183
- "Cooling Coil Latent Cooling Rate",
184
- "Cooling Coil Latent Cooling Energy",
185
- "Cooling Coil Electric Power",
186
- "Cooling Coil Electric Energy",
187
- "Cooling Coil Runtime Fraction",
188
- "Air System Cooling Coil Total Cooling Energy",
189
- "Air System Total Cooling Energy"
190
-
191
- ]
192
- BTAP::Reports::clear_output_variables(model)
193
- BTAP::Reports::set_output_variables(model, "Timestep", output_variable_array)
194
- end
195
-
196
- #This method creates the weather file.
197
- #@author phylroy.lopez@nrcan.gc.ca
198
- #@param weather_file [String] path to a weather file
199
- def create_weather_files(weather_file)
200
- #no solar file.
201
- @solar_radiation_off_temp_normal = @analysis_folder + "/solar_radiation_off_temp_normal.epw"
202
- @radiation_off_temp_normal = @analysis_folder + "/no_solar.epw"
203
- @solar_radiation_only_temp_constant = @analysis_folder + "/const_temp.epw"
204
- @all_off = @analysis_folder + "/all_off.epw"
205
- @original_file = @analysis_folder + "/orig.epw"
206
- @solar_radiation_off_temp_minus_10C = @analysis_folder + "/solar_radiation_off_temp_minus_10C.epw"
207
-
208
- BTAP::Environment::WeatherFile.new(weather_file).writetofile(@original_file)
209
-
210
- BTAP::Environment::WeatherFile.new(weather_file).
211
- eliminate_percipitation().
212
- eliminate_wind().
213
- eliminate_only_solar_radiation().
214
- writetofile(@solar_radiation_off_temp_normal)
215
-
216
- BTAP::Environment::WeatherFile.new(weather_file).setConstantDryandDewPointTemperatureHumidityAndPressure("-10.0","-17.9","49","102590").
217
- eliminate_percipitation().
218
- eliminate_wind().
219
- eliminate_only_solar_radiation().
220
- writetofile(@solar_radiation_off_temp_minus_10C)
221
-
222
- BTAP::Environment::WeatherFile.new(weather_file).eliminate_all_radiation().
223
- eliminate_percipitation().
224
- eliminate_wind().
225
- writetofile(@radiation_off_temp_normal)
226
-
227
- BTAP::Environment::WeatherFile.new(weather_file).setConstantDryandDewPointTemperatureHumidityAndPressure().
228
- eliminate_percipitation().
229
- eliminate_all_radiation_except_solar().
230
- eliminate_wind.writetofile(@solar_radiation_only_temp_constant)
231
-
232
- BTAP::Environment::WeatherFile.new(weather_file).eliminate_all_radiation().
233
- eliminate_percipitation().
234
- eliminate_wind.setConstantDryandDewPointTemperatureHumidityAndPressure().
235
- writetofile(@all_off)
236
- end
237
-
238
- #This method miso building generation and returns a model array.
239
- #@author phylroy.lopez@nrcan.gc.ca
240
- #@param model [OpenStudio::model::Model] A model object
241
- #@param standard_weather_file [String] path to a weather file
242
- #@return [model_array<String>]
243
- def miso_building_generation(model,standard_weather_file)
244
- self.set_output_variables(model)
245
- self.create_weather_files(standard_weather_file)
246
- self.create_schedules(model)
247
- model_array = Array.new()
248
-
249
-
250
- #Set global charecteristics.
251
- model.getSimulationControl.setMaximumNumberofWarmupDays(100)
252
- model.getSimulationControl.setMinimumNumberofWarmupDays(100)
253
-
254
- # GBase no hvac
255
- gbaseModel = BTAP::FileIO::deep_copy(model)
256
- gbaseModel.building.get.setName("Gbase")
257
- BTAP::Site::set_weather_file(gbaseModel, @original_file)
258
- BTAP::Resources::HVAC::clear_all_hvac_from_model(gbaseModel)
259
- gbaseModel.getThermalZones.sort.each do |thermalzone|
260
- thermalzone.setUseIdealAirLoads(true)
261
- end
262
- ground_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition( gbaseModel.getSurfaces, ["Ground"] )
263
- BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gbaseModel , ground_surfaces, "Adiabatic")
264
- model_array.push(gbaseModel)
265
-
266
-
267
- # Gfloating
268
- gfloatModel = BTAP::FileIO::deep_copy(model)
269
- gfloatModel.building.get.setName("Gfloating")
270
- BTAP::Site::set_weather_file(gfloatModel, @original_file)
271
- BTAP::Resources::HVAC::clear_all_hvac_from_model(gfloatModel)
272
- gfloatModel.getThermalZones.sort.each do |thermalzone|
273
- thermalzone.setThermostatSetpointDualSetpoint(@mpc_no_heat_cool)
274
- thermalzone.setUseIdealAirLoads(true)
275
- end
276
- ground_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition( gfloatModel.getSurfaces, ["Ground"] )
277
- BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gfloatModel , ground_surfaces, "Adiabatic")
278
- model_array.push(gfloatModel)
279
-
280
-
281
-
282
-
283
- # # Gideal
284
- # gidealModel = BTAP::FileIO::deep_copy(model)
285
- # gidealModel.building.get.setName("Gideal")
286
- # BTAP::Site::set_weather_file(gidealModel, @original_file)
287
- # gidealModel.getThermalZones.sort.each do |thermalzone|
288
- # thermalzone.setThermostatSetpointDualSetpoint(@mpc_21C_setpoint)
289
- # end
290
- # ground_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition( gidealModel.getSurfaces, ["Ground"] )
291
- # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gidealModel , ground_surfaces, "Adiabatic")
292
- # model_array.push(gidealModel)
293
-
294
- #
295
- #
296
- # # Gadiabatic
297
- # gadiabaticModel = BTAP::FileIO::deep_copy(model)
298
- # gadiabaticModel.building.get.setName("Gadiabatic")
299
- # BTAP::Site::set_weather_file(gadiabaticModel, @original_file)
300
- # gadiabaticModel.getThermalZones.sort.each { |thermalzone| thermalzone.setThermostatSetpointDualSetpoint(@mpc_21C_setpoint)}
301
- # self.set_internal_gains_to_zero(gadiabaticModel)
302
- # outdoor_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition(gadiabaticModel.getSurfaces, ["Outdoors"])
303
- # BTAP::Geometry::Surfaces::set_surfaces_construction_conductance(outdoor_surfaces, 1/200)
304
- # ground_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition( gadiabaticModel.getSurfaces, ["Ground"] )
305
- # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gadiabaticModel , ground_surfaces, "Adiabatic")
306
- # model_array.push(gadiabaticModel)
307
- #
308
- #
309
- # # Gsteadystate
310
- # gsteadystateModel = BTAP::FileIO::deep_copy(model)
311
- # gsteadystateModel.building.get.setName("Gsteadystate")
312
- # BTAP::Site::set_weather_file(gsteadystateModel, @all_off)
313
- # self.set_internal_gains_to_zero(gsteadystateModel)
314
- # gsteadystateModel.getThermalZones.sort.each { |thermalzone| thermalzone.setThermostatSetpointDualSetpoint(@mpc_21C_setpoint)}
315
- # ground_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition( gsteadystateModel.getSurfaces, ["Ground"] )
316
- # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gsteadystateModel , ground_surfaces, "Adiabatic")
317
- # model_array.push(gsteadystateModel)
318
- #
319
- #
320
- # # Gig
321
- # gigModel = BTAP::FileIO::deep_copy(model)
322
- # gigModel.building.get.setName("Gig")
323
- # BTAP::Site::set_weather_file(gigModel, @all_off)
324
- # gigModel.getThermalZones.sort.each { |thermalzone| thermalzone.setThermostatSetpointDualSetpoint(@mpc_no_heat_cool)}
325
- # ground_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition( gigModel.getSurfaces, ["Ground"] )
326
- # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gigModel , ground_surfaces, "Adiabatic")
327
- # model_array.push(gigModel)
328
- #
329
- #
330
- # # Gsg
331
- # gsgModel = BTAP::FileIO::deep_copy(model)
332
- # gsgModel.building.get.setName("Gsg")
333
- # BTAP::Site::set_weather_file( gsgModel,@solar_radiation_only_temp_constant)
334
- # self.set_internal_gains_to_zero(gsgModel)
335
- # gsgModel.getThermalZones.sort.each { |thermalzone| thermalzone.setThermostatSetpointDualSetpoint(@mpc_no_heat_cool)}
336
- # ground_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition( gsgModel.getSurfaces, ["Ground"] )
337
- # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gsgModel , ground_surfaces, "Adiabatic")
338
- # model_array.push(gsgModel)
339
- #
340
- #
341
- # # Gext
342
- # gextModel = BTAP::FileIO::deep_copy(model)
343
- # gextModel.building.get.setName("Gext")
344
- # BTAP::Site::set_weather_file( gextModel,@solar_radiation_off_temp_normal )
345
- # self.set_internal_gains_to_zero(gextModel)
346
- # gextModel.getThermalZones.sort.each { |thermalzone| thermalzone.setThermostatSetpointDualSetpoint(@mpc_no_heat_cool)}
347
- # ground_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition( gextModel.getSurfaces, ["Ground"] )
348
- # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gextModel , ground_surfaces, "Adiabatic")
349
- # model_array.push(gextModel)
350
- #
351
- # # Gh
352
- # ghModel = BTAP::FileIO::deep_copy(model)
353
- # ghModel.building.get.setName("Gh")
354
- # BTAP::Site::set_weather_file(ghModel,@all_off )
355
- # self.set_internal_gains_to_zero(ghModel)
356
- # ghModel.getThermalZones.sort.each { |thermalzone| thermalzone.setThermostatSetpointDualSetpoint(@mpc_no_cooling)}
357
- # ground_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition( ghModel.getSurfaces, ["Ground"] )
358
- # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( ghModel , ground_surfaces, "Adiabatic")
359
- # model_array.push(ghModel)
360
- #
361
- # # Gc
362
- # gcModel = BTAP::FileIO::deep_copy(model)
363
- # gcModel.building.get.setName("Gc")
364
- # BTAP::Site::set_weather_file(gcModel,@solar_radiation_off_temp_normal)
365
- # self.set_internal_gains_to_zero(gcModel)
366
- # gcModel.getThermalZones.sort.each { |thermalzone| thermalzone.setThermostatSetpointDualSetpoint(@mpc_no_heating)}
367
- # ground_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition( gcModel.getSurfaces, ["Ground"] )
368
- # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gcModel , ground_surfaces, "Adiabatic")
369
- # model_array.push(gcModel)
370
- #
371
- # # Goff
372
- # goffModel = BTAP::FileIO::deep_copy(model)
373
- # goffModel.building.get.setName("Goff")
374
- # BTAP::Site::set_weather_file(goffModel,@all_off)
375
- # self.set_internal_gains_to_zero(goffModel)
376
- # BTAP::Resources::SpaceLoads::ScaleLoads::scale_inflitration_loads(goffModel, 0.0)
377
- # ground_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition( goffModel.getSurfaces, ["Ground"] )
378
- # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( goffModel , ground_surfaces, "Adiabatic")
379
- # goffModel.getThermalZones.sort.each { |thermalzone| thermalzone.setThermostatSetpointDualSetpoint(@mpc_no_heat_cool)}
380
- # model_array.push(goffModel)
381
-
382
-
383
- return model_array
384
- end
385
-
386
- #This method miso building analysis.
387
- #@author phylroy.lopez@nrcan.gc.ca
388
- #@param model_file [OpenStudio::model::Model] A model object
389
- #@param folder_name [String] path to a folder
390
- #@param standard_weather_file [String] path to a weather file
391
- def miso_building_analysis(folder_name,model_file,standard_weather_file)
392
- model = BTAP::FileIO::load_osm(model_file)
393
- BTAP::Geometry::enumerate_spaces_model(model)
394
- BTAP::Geometry::rename_zones_based_on_spaces(model)
395
- BTAP::Geometry::prefix_equipment_with_zone_name(model)
396
- #since this is a one to one relationship of space to zone.Name them the same
397
- model.getSpaces.sort.each do |space|
398
- space.thermalZone.get.setName(space.name.get)
399
- end
400
- #set run period to a week
401
- BTAP::SimulationSettings::set_run_period(model,1,1,12,31)
402
- #create models
403
- miso_building_generation(model,standard_weather_file).each do |new_model|
404
- BTAP::FileIO::get_name(new_model)
405
- save_file_name = "#{folder_name}/#{BTAP::FileIO::get_name(new_model)}.osm"
406
- BTAP::FileIO::save_osm(new_model, save_file_name)
407
- end
408
- end
409
-
410
- #This method miso zonal analysis.
411
- #@author phylroy.lopez@nrcan.gc.ca
412
- #@param model_file [OpenStudio::model::Model] A model object
413
- #@param folder_name [String] path to a folder
414
- #@param standard_weather_file [String] path to a weather file
415
- def miso_zonal_analysis(folder_name,model_file,standard_weather_file)
416
-
417
- model = BTAP::FileIO::load_osm(model_file)
418
- BTAP::Geometry::enumerate_spaces_model(model)
419
- BTAP::Geometry::rename_zones_based_on_spaces(model)
420
- BTAP::Geometry::prefix_equipment_with_zone_name(model)
421
- #since this is a one to one relationship of space to zone.Name them the same
422
- model.getSpaces.sort.each do |space|
423
- space.thermalZone.get.setName(space.name.get)
424
- end
425
- #set run period to a week
426
- BTAP::SimulationSettings::set_run_period(model,1,1,12,31)
427
- miso_zonal_generation(model,standard_weather_file).each do |new_model|
428
- BTAP::FileIO::get_name(new_model)
429
- save_file_name = "#{folder_name}/#{BTAP::FileIO::get_name(new_model)}.osm"
430
- BTAP::FileIO::save_osm(new_model, save_file_name)
431
- end
432
- end
433
-
434
- #This method miso zonal generation and returns a model array.
435
- #@author phylroy.lopez@nrcan.gc.ca
436
- #@param model[OpenStudio::model::Model] A model object
437
- #@param standard_weather_file [String] path to a weather file
438
- #@return [model_array<String>]
439
- def miso_zonal_generation(model,standard_weather_file)
440
- self.create_weather_files(standard_weather_file)
441
- self.create_schedules(model)
442
- model_array = Array.new()
443
-
444
- #model.clear_output_variables()
445
- self.set_output_variables(model)
446
- model.getSimulationControl.setMaximumNumberofWarmupDays(100)
447
- model.getSimulationControl.setMinimumNumberofWarmupDays(100)
448
- #create the array of models to run.
449
- model_array = Array.new()
450
- #get the number of thermal zones in the model
451
- num_of_thermal_zones = model.getThermalZones.size
452
-
453
- #change ground surfaces to adiabatic
454
- ground_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition( model.getSurfaces, ["Ground"] )
455
- BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( model , ground_surfaces, "Adiabatic")
456
-
457
-
458
-
459
- #iterate through each zone.
460
- (0..num_of_thermal_zones-1).each do |zone_number|
461
- #
462
- # # Gsg Solar gains
463
- # gsgModel = BTAP::FileIO::deep_copy(model)
464
- # thermal_zones = gsgModel.getThermalZones
465
- # gsgModel.building.get.setName("Gsg-" + thermal_zones[zone_number].name.get)
466
- # BTAP::Site::set_weather_file(gsgModel,@solar_radiation_only_temp_constant )
467
- # self.set_internal_gains_to_zero(gsgModel)
468
- # thermal_zones[zone_number].setThermostatSetpointDualSetpoint(@mpc_no_heat_cool)
469
- # zone_surfaces = BTAP::Geometry::Surfaces::get_surfaces_from_thermal_zones([thermal_zones[zone_number]])
470
- # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gsgModel ,BTAP::Geometry::Surfaces::filter_by_boundary_condition( zone_surfaces, ["Surface"] ) , "Adiabatic")
471
- # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gsgModel , BTAP::Geometry::Surfaces::filter_by_boundary_condition( gsgModel.getSurfaces, ["Ground"] ) , "Adiabatic")
472
- # model_array.push(gsgModel)
473
- #
474
- #
475
- # # Gig - internal gains
476
- # gigModel = BTAP::FileIO::deep_copy(model)
477
- # thermal_zones = gigModel.getThermalZones
478
- # gigModel.building.get.setName("Gig-" + thermal_zones[zone_number].name.get)
479
- # BTAP::Site::set_weather_file(gigModel,@all_off )
480
- # thermal_zones[zone_number].setThermostatSetpointDualSetpoint(@mpc_no_heat_cool)
481
- # zone_surfaces = BTAP::Geometry::Surfaces::get_surfaces_from_thermal_zones([thermal_zones[zone_number]])
482
- # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gigModel ,BTAP::Geometry::Surfaces::filter_by_boundary_condition( zone_surfaces, ["Surface"] ) , "Adiabatic")
483
- # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gigModel , BTAP::Geometry::Surfaces::filter_by_boundary_condition( gigModel.getSurfaces, ["Ground"] ) , "Adiabatic")
484
- # model_array.push(gigModel)
485
- #
486
- #
487
- # # Gext external gains
488
- # gextModel = BTAP::FileIO::deep_copy(model)
489
- # thermal_zones = gextModel.getThermalZones
490
- # gextModel.building.get.setName("Gext-" + thermal_zones[zone_number].name.get)
491
- # BTAP::Site::set_weather_file(gextModel,@solar_radiation_off_temp_normal )
492
- # self.set_internal_gains_to_zero(gextModel)
493
- # thermal_zones[zone_number].setThermostatSetpointDualSetpoint(@mpc_no_heat_cool)
494
- # zone_surfaces = BTAP::Geometry::Surfaces::get_surfaces_from_thermal_zones([thermal_zones[zone_number]])
495
- # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gextModel ,BTAP::Geometry::Surfaces::filter_by_boundary_condition( zone_surfaces, ["Surface"] ) , "Adiabatic")
496
- # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gextModel , BTAP::Geometry::Surfaces::filter_by_boundary_condition( gextModel.getSurfaces, ["Ground"] ) , "Adiabatic")
497
- # model_array.push(gextModel)
498
- #
499
- # # Gh - no cooling
500
- # ghModel = BTAP::FileIO::deep_copy(model)
501
- # thermal_zones = ghModel.getThermalZones
502
- # ghModel.building.get.setName("Gh-" + thermal_zones[zone_number].name.get)
503
- # BTAP::Site::set_weather_file(ghModel,@all_off )
504
- # self.set_internal_gains_to_zero(ghModel)
505
- # thermal_zones[zone_number].setThermostatSetpointDualSetpoint(@mpc_no_cooling)
506
- # zone_surfaces = BTAP::Geometry::Surfaces::get_surfaces_from_thermal_zones([thermal_zones[zone_number]])
507
- # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( ghModel ,BTAP::Geometry::Surfaces::filter_by_boundary_condition( zone_surfaces, ["Surface"] ) , "Adiabatic")
508
- # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( ghModel , BTAP::Geometry::Surfaces::filter_by_boundary_condition( ghModel.getSurfaces, ["Ground"] ) , "Adiabatic")
509
- # model_array.push(ghModel)
510
- #
511
- # # Gc no heating
512
- # gcModel = BTAP::FileIO::deep_copy(model)
513
- # thermal_zones = gcModel.getThermalZones
514
- # gcModel.building.get.setName("Gc-" + thermal_zones[zone_number].name.get)
515
- # BTAP::Site::set_weather_file(gcModel, @solar_radiation_off_temp_normal)
516
- # self.set_internal_gains_to_zero(gcModel)
517
- # thermal_zones[zone_number].setThermostatSetpointDualSetpoint(@mpc_no_heating)
518
- # zone_surfaces = BTAP::Geometry::Surfaces::get_surfaces_from_thermal_zones([thermal_zones[zone_number]])
519
- # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gcModel ,BTAP::Geometry::Surfaces::filter_by_boundary_condition( zone_surfaces, ["Surface"] ) , "Adiabatic")
520
- # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gcModel , BTAP::Geometry::Surfaces::filter_by_boundary_condition( gcModel.getSurfaces, ["Ground"] ) , "Adiabatic")
521
- # model_array.push(gcModel)
522
-
523
- # # Gideal
524
- # gidealModel = BTAP::FileIO::deep_copy(model)
525
- # thermal_zones = gidealModel.getThermalZones
526
- # gidealModel.building.get.setName("Gideal-" + thermal_zones[zone_number].name.get)
527
- # BTAP::Site::set_weather_file( gidealModel, @original_file )
528
- # thermal_zones[zone_number].setThermostatSetpointDualSetpoint(@mpc_21C_setpoint)
529
- # zone_surfaces = BTAP::Geometry::Surfaces::get_surfaces_from_thermal_zones([thermal_zones[zone_number]])
530
- # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gidealModel ,BTAP::Geometry::Surfaces::filter_by_boundary_condition( zone_surfaces, ["Surface"] ) , "Adiabatic")
531
- # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gidealModel , BTAP::Geometry::Surfaces::filter_by_boundary_condition( gidealModel.getSurfaces, ["Ground"] ) , "Adiabatic")
532
- # model_array.push(gidealModel)
533
- #
534
- # # Gfloating
535
- # gfloatModel = BTAP::FileIO::deep_copy(model)
536
- # thermal_zones = gfloatModel.getThermalZones
537
- # gfloatModel.building.get.setName("Gfloating-" + thermal_zones[zone_number].name.get)
538
- # BTAP::Site::set_weather_file(gfloatModel, @original_file)
539
- # thermal_zones[zone_number].setThermostatSetpointDualSetpoint(@mpc_no_heat_cool)
540
- # ground_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition( gfloatModel.getSurfaces, ["Ground"] )
541
- # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gfloatModel , ground_surfaces, "Adiabatic")
542
- # model_array.push(gfloatModel)
543
-
544
- end
545
- return model_array
546
- end
547
-
548
- def set_internal_gains_to_zero(model)
549
- BTAP::Resources::SpaceLoads::remove_all_casual_loads(model)
550
- end
551
- end
552
-
553
- end
554
- 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
+ #
21
+ # module BTAP
22
+ # module MPC
23
+ # class MPC
24
+ #
25
+ # #set hourly setpoint values
26
+ # #"E:\\Montreal2\\ZonalLevel\\", #analysis folder
27
+ # #"C:\\osruby\\lib\\basic_ideal_loads.osm", #model file.
28
+ # #"Z:\\MPC Chipmunk Model\\Weather Files\\CAN_PQ_Montreal.Intl.AP.716270_CWEC\\CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw" #standard_weather_file
29
+ #
30
+ # #This method initializes.
31
+ # #@author phylroy.lopez@nrcan.gc.ca
32
+ # #@param model_file [OpenStudio::model::Model] A model object
33
+ # #@param weather_file [String] path to a weather file
34
+ # #@param analysis_folder [String] path to analysis folder
35
+ # def initialize (
36
+ # model_file,
37
+ # weather_file,
38
+ # analysis_folder)
39
+ #
40
+ # @model_file, @weather_file, @analysis_folder = model_file, weather_file, analysis_folder
41
+ #
42
+ #
43
+ # self.miso_zonal_analysis(@analysis_folder, #analysis folder
44
+ # @model_file, #model file.
45
+ # @weather_file #standard_weather_file
46
+ # )
47
+ #
48
+ # self.miso_building_analysis(@analysis_folder, #analysis folder
49
+ # @model_file, #model file.
50
+ # @weather_file #standard_weather_file
51
+ # )
52
+ #
53
+ #
54
+ # end
55
+ #
56
+ # #This method creates the schedules.
57
+ # #@author phylroy.lopez@nrcan.gc.ca
58
+ # #@param model [OpenStudio::model::Model] A model object
59
+ # def create_schedules(model)
60
+ #
61
+ # #Create cooling temperature schedule
62
+ #
63
+ # cool_sched_ruleset = BTAP::Resources::Schedules::create_annual_ruleset_schedule_detailed(model, "mpc_cooling_day", "TEMPERATURE",[
64
+ # [
65
+ # ["Jan-01","Dec-31"],["M","T","W","TH","F","S","SN"],
66
+ # [
67
+ # [ "5:00", 18.0 ],
68
+ # [ "9:00", 21.0 ],
69
+ # [ "15:00", 23.0 ],
70
+ # [ "18:00", 21.0 ],
71
+ # [ "24:00", 18.0 ]
72
+ # ]
73
+ # ]
74
+ # ]
75
+ # )
76
+ #
77
+ # #Create cooling temperature schedule
78
+ # heat_sched_ruleset = BTAP::Resources::Schedules::create_annual_ruleset_schedule_detailed(model, "mpc_cooling_day", "TEMPERATURE",[
79
+ # [
80
+ # ["Jan-01","Dec-31"],["M","T","W","TH","F","S","SN"],
81
+ # [
82
+ # [ "5:00", 18.0 ],
83
+ # [ "9:00", 21.0 ],
84
+ # [ "15:00", 23.0 ],
85
+ # [ "18:00", 21.0 ],
86
+ # [ "24:00", 18.0 ]
87
+ # ]
88
+ # ]
89
+ # ]
90
+ # )
91
+ #
92
+ # heat_sched_ruleset21 = BTAP::Resources::Schedules::create_annual_constant_ruleset_schedule(model, "mpc_cooling_day21","TEMPERATURE",21.0)
93
+ # cool_sched_ruleset21 = BTAP::Resources::Schedules::create_annual_constant_ruleset_schedule(model, "mpc_heating_day21","TEMPERATURE",21.0)
94
+ #
95
+ # @hourlyArrayValues21 =
96
+ # [
97
+ # Array.new(24){21}, #Weekday
98
+ # Array.new(24){21}, #Sat
99
+ # Array.new(24){21}, #Sun
100
+ # ]
101
+ #
102
+ # @hourly_noheatingArrayValues =
103
+ # [
104
+ # Array.new(24){-60}, #Weekday
105
+ # Array.new(24){-60}, #Sat
106
+ # Array.new(24){-60}, #Sun
107
+ # ]
108
+ #
109
+ # @hourly_nocoolingArrayValues =
110
+ # [
111
+ # Array.new(24){200}, #Weekday
112
+ # Array.new(24){200}, #Sat
113
+ # Array.new(24){200}, #Sun
114
+ # ]
115
+ # #model.add_standard_schedules()
116
+ #
117
+ # no_cool_sched_ruleset = BTAP::Resources::Schedules::create_annual_ruleset_schedule(model,"mpc_no_cooling_day","TEMPERATURE",@hourly_nocoolingArrayValues)
118
+ # no_heat_sched_ruleset = BTAP::Resources::Schedules::create_annual_ruleset_schedule(model,"mpc_no_heating_day","TEMPERATURE",@hourly_noheatingArrayValues)
119
+ #
120
+ # @mpc_heat_cool = BTAP::Resources::Schedules::create_annual_thermostat_setpoint_dual_setpoint(model,"mpc_heat_cool_set",heat_sched_ruleset,cool_sched_ruleset)
121
+ # @mpc_no_cooling = BTAP::Resources::Schedules::create_annual_thermostat_setpoint_dual_setpoint(model,"mpc_no_cooling_set",heat_sched_ruleset,no_cool_sched_ruleset)
122
+ # @mpc_no_heating = BTAP::Resources::Schedules::create_annual_thermostat_setpoint_dual_setpoint(model,"mpc_no_heating_set",no_heat_sched_ruleset,cool_sched_ruleset)
123
+ # @mpc_no_heat_cool = BTAP::Resources::Schedules::create_annual_thermostat_setpoint_dual_setpoint(model,"mpc_no_heat_cool_set",no_heat_sched_ruleset,no_cool_sched_ruleset)
124
+ # @mpc_21C_setpoint = BTAP::Resources::Schedules::create_annual_thermostat_setpoint_dual_setpoint(model,"mpc_21C_setpoint",heat_sched_ruleset21,cool_sched_ruleset21)
125
+ # end
126
+ #
127
+ # #This method sets the output variables.
128
+ # #@author phylroy.lopez@nrcan.gc.ca
129
+ # #@param model [OpenStudio::model::Model] A model object
130
+ # def set_output_variables(model)
131
+ # output_variable_array =
132
+ # [
133
+ #
134
+ # "Site Outdoor Air Drybulb Temperature",
135
+ # "Site Outdoor Air Dewpoint Temperature",
136
+ # "Site Outdoor Air Wetbulb Temperature",
137
+ # "Site Outdoor Air Humidity Ratio",
138
+ # "Site Outdoor Air Relative Humidity",
139
+ # "Site Outdoor Air Barometric Pressure",
140
+ # "Site Wind Speed",
141
+ # "Site Wind Direction",
142
+ # "Site Sky Temperature",
143
+ # "Site Horizontal Infrared Radiation Rate per Area",
144
+ # "Site Diffuse Solar Radiation Rate per Area",
145
+ # "Site Direct Solar Radiation Rate per Area",
146
+ # "Site Precipitation Depth",
147
+ # "Site Ground Reflected Solar Radiation Rate per Area",
148
+ # "Site Ground Temperature",
149
+ # "Site Surface Ground Temperature",
150
+ # "Site Deep Ground Temperature",
151
+ # "Site Simple Factor Model Ground Temperature",
152
+ # "Site Outdoor Air Enthalpy",
153
+ # "Site Outdoor Air Density",
154
+ # "Site Solar Azimuth Angle",
155
+ # "Site Solar Altitude Angle",
156
+ # "Site Solar Hour Angle",
157
+ # "Site Rain Status",
158
+ # "Site Snow on Ground Status",
159
+ # "Site Exterior Horizontal Sky Illuminance",
160
+ # "Site Exterior Horizontal Beam Illuminance",
161
+ # "Site Exterior Beam Normal Illuminance",
162
+ # "Site Sky Diffuse Solar Radiation Luminous Efficacy",
163
+ # "Site Beam Solar Radiation Luminous Efficacy",
164
+ # "Site Daylighting Model Sky Clearness",
165
+ # "Site Daylighting Model Sky Brightness",
166
+ # "Site Daylight Saving Time Status",
167
+ # "Site Day Type Index",
168
+ # "Site Mains Water Temperature",
169
+ # "Zone Operative Temperature",
170
+ # "Zone Windows Total Transmitted Solar Radiation Energy",
171
+ # "Zone Ideal Loads Zone Total Heating Energy",
172
+ # "Zone Ideal Loads Zone Total Cooling Energy",
173
+ # "Zone Total Internal Total Heating Energy",
174
+ # "Zone Total Internal Total Heating Rate",
175
+ # "Zone List Sensible Heating Energy",
176
+ # "Zone List Sensible Cooling Energy",
177
+ # "Zone List Sensible Heating Rate",
178
+ # "Zone List Sensible Cooling Rate",
179
+ # "Cooling Coil Total Cooling Rate",
180
+ # "Cooling Coil Total Cooling Energy",
181
+ # "Cooling Coil Sensible Cooling Rate",
182
+ # "Cooling Coil Sensible Cooling Energy",
183
+ # "Cooling Coil Latent Cooling Rate",
184
+ # "Cooling Coil Latent Cooling Energy",
185
+ # "Cooling Coil Electric Power",
186
+ # "Cooling Coil Electric Energy",
187
+ # "Cooling Coil Runtime Fraction",
188
+ # "Air System Cooling Coil Total Cooling Energy",
189
+ # "Air System Total Cooling Energy"
190
+ #
191
+ # ]
192
+ # BTAP::Reports::clear_output_variables(model)
193
+ # BTAP::Reports::set_output_variables(model, "Timestep", output_variable_array)
194
+ # end
195
+ #
196
+ # #This method creates the weather file.
197
+ # #@author phylroy.lopez@nrcan.gc.ca
198
+ # #@param weather_file [String] path to a weather file
199
+ # def create_weather_files(weather_file)
200
+ # #no solar file.
201
+ # @solar_radiation_off_temp_normal = @analysis_folder + "/solar_radiation_off_temp_normal.epw"
202
+ # @radiation_off_temp_normal = @analysis_folder + "/no_solar.epw"
203
+ # @solar_radiation_only_temp_constant = @analysis_folder + "/const_temp.epw"
204
+ # @all_off = @analysis_folder + "/all_off.epw"
205
+ # @original_file = @analysis_folder + "/orig.epw"
206
+ # @solar_radiation_off_temp_minus_10C = @analysis_folder + "/solar_radiation_off_temp_minus_10C.epw"
207
+ #
208
+ # BTAP::Environment::WeatherFile.new(weather_file).writetofile(@original_file)
209
+ #
210
+ # BTAP::Environment::WeatherFile.new(weather_file).
211
+ # eliminate_percipitation().
212
+ # eliminate_wind().
213
+ # eliminate_only_solar_radiation().
214
+ # writetofile(@solar_radiation_off_temp_normal)
215
+ #
216
+ # BTAP::Environment::WeatherFile.new(weather_file).setConstantDryandDewPointTemperatureHumidityAndPressure("-10.0","-17.9","49","102590").
217
+ # eliminate_percipitation().
218
+ # eliminate_wind().
219
+ # eliminate_only_solar_radiation().
220
+ # writetofile(@solar_radiation_off_temp_minus_10C)
221
+ #
222
+ # BTAP::Environment::WeatherFile.new(weather_file).eliminate_all_radiation().
223
+ # eliminate_percipitation().
224
+ # eliminate_wind().
225
+ # writetofile(@radiation_off_temp_normal)
226
+ #
227
+ # BTAP::Environment::WeatherFile.new(weather_file).setConstantDryandDewPointTemperatureHumidityAndPressure().
228
+ # eliminate_percipitation().
229
+ # eliminate_all_radiation_except_solar().
230
+ # eliminate_wind.writetofile(@solar_radiation_only_temp_constant)
231
+ #
232
+ # BTAP::Environment::WeatherFile.new(weather_file).eliminate_all_radiation().
233
+ # eliminate_percipitation().
234
+ # eliminate_wind.setConstantDryandDewPointTemperatureHumidityAndPressure().
235
+ # writetofile(@all_off)
236
+ # end
237
+ #
238
+ # #This method miso building generation and returns a model array.
239
+ # #@author phylroy.lopez@nrcan.gc.ca
240
+ # #@param model [OpenStudio::model::Model] A model object
241
+ # #@param standard_weather_file [String] path to a weather file
242
+ # #@return [model_array<String>]
243
+ # def miso_building_generation(model,standard_weather_file)
244
+ # self.set_output_variables(model)
245
+ # self.create_weather_files(standard_weather_file)
246
+ # self.create_schedules(model)
247
+ # model_array = Array.new()
248
+ #
249
+ #
250
+ # #Set global charecteristics.
251
+ # model.getSimulationControl.setMaximumNumberofWarmupDays(100)
252
+ # model.getSimulationControl.setMinimumNumberofWarmupDays(100)
253
+ #
254
+ # # GBase no hvac
255
+ # gbaseModel = BTAP::FileIO::deep_copy(model)
256
+ # gbaseModel.building.get.setName("Gbase")
257
+ # BTAP::Site::set_weather_file(gbaseModel, @original_file)
258
+ # BTAP::Resources::HVAC::clear_all_hvac_from_model(gbaseModel)
259
+ # gbaseModel.getThermalZones.sort.each do |thermalzone|
260
+ # thermalzone.setUseIdealAirLoads(true)
261
+ # end
262
+ # ground_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition( gbaseModel.getSurfaces, ["Ground"] )
263
+ # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gbaseModel , ground_surfaces, "Adiabatic")
264
+ # model_array.push(gbaseModel)
265
+ #
266
+ #
267
+ # # Gfloating
268
+ # gfloatModel = BTAP::FileIO::deep_copy(model)
269
+ # gfloatModel.building.get.setName("Gfloating")
270
+ # BTAP::Site::set_weather_file(gfloatModel, @original_file)
271
+ # BTAP::Resources::HVAC::clear_all_hvac_from_model(gfloatModel)
272
+ # gfloatModel.getThermalZones.sort.each do |thermalzone|
273
+ # thermalzone.setThermostatSetpointDualSetpoint(@mpc_no_heat_cool)
274
+ # thermalzone.setUseIdealAirLoads(true)
275
+ # end
276
+ # ground_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition( gfloatModel.getSurfaces, ["Ground"] )
277
+ # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gfloatModel , ground_surfaces, "Adiabatic")
278
+ # model_array.push(gfloatModel)
279
+ #
280
+ #
281
+ #
282
+ #
283
+ # # # Gideal
284
+ # # gidealModel = BTAP::FileIO::deep_copy(model)
285
+ # # gidealModel.building.get.setName("Gideal")
286
+ # # BTAP::Site::set_weather_file(gidealModel, @original_file)
287
+ # # gidealModel.getThermalZones.sort.each do |thermalzone|
288
+ # # thermalzone.setThermostatSetpointDualSetpoint(@mpc_21C_setpoint)
289
+ # # end
290
+ # # ground_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition( gidealModel.getSurfaces, ["Ground"] )
291
+ # # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gidealModel , ground_surfaces, "Adiabatic")
292
+ # # model_array.push(gidealModel)
293
+ #
294
+ # #
295
+ # #
296
+ # # # Gadiabatic
297
+ # # gadiabaticModel = BTAP::FileIO::deep_copy(model)
298
+ # # gadiabaticModel.building.get.setName("Gadiabatic")
299
+ # # BTAP::Site::set_weather_file(gadiabaticModel, @original_file)
300
+ # # gadiabaticModel.getThermalZones.sort.each { |thermalzone| thermalzone.setThermostatSetpointDualSetpoint(@mpc_21C_setpoint)}
301
+ # # self.set_internal_gains_to_zero(gadiabaticModel)
302
+ # # outdoor_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition(gadiabaticModel.getSurfaces, ["Outdoors"])
303
+ # # BTAP::Geometry::Surfaces::set_surfaces_construction_conductance(outdoor_surfaces, 1/200)
304
+ # # ground_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition( gadiabaticModel.getSurfaces, ["Ground"] )
305
+ # # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gadiabaticModel , ground_surfaces, "Adiabatic")
306
+ # # model_array.push(gadiabaticModel)
307
+ # #
308
+ # #
309
+ # # # Gsteadystate
310
+ # # gsteadystateModel = BTAP::FileIO::deep_copy(model)
311
+ # # gsteadystateModel.building.get.setName("Gsteadystate")
312
+ # # BTAP::Site::set_weather_file(gsteadystateModel, @all_off)
313
+ # # self.set_internal_gains_to_zero(gsteadystateModel)
314
+ # # gsteadystateModel.getThermalZones.sort.each { |thermalzone| thermalzone.setThermostatSetpointDualSetpoint(@mpc_21C_setpoint)}
315
+ # # ground_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition( gsteadystateModel.getSurfaces, ["Ground"] )
316
+ # # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gsteadystateModel , ground_surfaces, "Adiabatic")
317
+ # # model_array.push(gsteadystateModel)
318
+ # #
319
+ # #
320
+ # # # Gig
321
+ # # gigModel = BTAP::FileIO::deep_copy(model)
322
+ # # gigModel.building.get.setName("Gig")
323
+ # # BTAP::Site::set_weather_file(gigModel, @all_off)
324
+ # # gigModel.getThermalZones.sort.each { |thermalzone| thermalzone.setThermostatSetpointDualSetpoint(@mpc_no_heat_cool)}
325
+ # # ground_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition( gigModel.getSurfaces, ["Ground"] )
326
+ # # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gigModel , ground_surfaces, "Adiabatic")
327
+ # # model_array.push(gigModel)
328
+ # #
329
+ # #
330
+ # # # Gsg
331
+ # # gsgModel = BTAP::FileIO::deep_copy(model)
332
+ # # gsgModel.building.get.setName("Gsg")
333
+ # # BTAP::Site::set_weather_file( gsgModel,@solar_radiation_only_temp_constant)
334
+ # # self.set_internal_gains_to_zero(gsgModel)
335
+ # # gsgModel.getThermalZones.sort.each { |thermalzone| thermalzone.setThermostatSetpointDualSetpoint(@mpc_no_heat_cool)}
336
+ # # ground_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition( gsgModel.getSurfaces, ["Ground"] )
337
+ # # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gsgModel , ground_surfaces, "Adiabatic")
338
+ # # model_array.push(gsgModel)
339
+ # #
340
+ # #
341
+ # # # Gext
342
+ # # gextModel = BTAP::FileIO::deep_copy(model)
343
+ # # gextModel.building.get.setName("Gext")
344
+ # # BTAP::Site::set_weather_file( gextModel,@solar_radiation_off_temp_normal )
345
+ # # self.set_internal_gains_to_zero(gextModel)
346
+ # # gextModel.getThermalZones.sort.each { |thermalzone| thermalzone.setThermostatSetpointDualSetpoint(@mpc_no_heat_cool)}
347
+ # # ground_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition( gextModel.getSurfaces, ["Ground"] )
348
+ # # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gextModel , ground_surfaces, "Adiabatic")
349
+ # # model_array.push(gextModel)
350
+ # #
351
+ # # # Gh
352
+ # # ghModel = BTAP::FileIO::deep_copy(model)
353
+ # # ghModel.building.get.setName("Gh")
354
+ # # BTAP::Site::set_weather_file(ghModel,@all_off )
355
+ # # self.set_internal_gains_to_zero(ghModel)
356
+ # # ghModel.getThermalZones.sort.each { |thermalzone| thermalzone.setThermostatSetpointDualSetpoint(@mpc_no_cooling)}
357
+ # # ground_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition( ghModel.getSurfaces, ["Ground"] )
358
+ # # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( ghModel , ground_surfaces, "Adiabatic")
359
+ # # model_array.push(ghModel)
360
+ # #
361
+ # # # Gc
362
+ # # gcModel = BTAP::FileIO::deep_copy(model)
363
+ # # gcModel.building.get.setName("Gc")
364
+ # # BTAP::Site::set_weather_file(gcModel,@solar_radiation_off_temp_normal)
365
+ # # self.set_internal_gains_to_zero(gcModel)
366
+ # # gcModel.getThermalZones.sort.each { |thermalzone| thermalzone.setThermostatSetpointDualSetpoint(@mpc_no_heating)}
367
+ # # ground_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition( gcModel.getSurfaces, ["Ground"] )
368
+ # # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gcModel , ground_surfaces, "Adiabatic")
369
+ # # model_array.push(gcModel)
370
+ # #
371
+ # # # Goff
372
+ # # goffModel = BTAP::FileIO::deep_copy(model)
373
+ # # goffModel.building.get.setName("Goff")
374
+ # # BTAP::Site::set_weather_file(goffModel,@all_off)
375
+ # # self.set_internal_gains_to_zero(goffModel)
376
+ # # BTAP::Resources::SpaceLoads::ScaleLoads::scale_inflitration_loads(goffModel, 0.0)
377
+ # # ground_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition( goffModel.getSurfaces, ["Ground"] )
378
+ # # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( goffModel , ground_surfaces, "Adiabatic")
379
+ # # goffModel.getThermalZones.sort.each { |thermalzone| thermalzone.setThermostatSetpointDualSetpoint(@mpc_no_heat_cool)}
380
+ # # model_array.push(goffModel)
381
+ #
382
+ #
383
+ # return model_array
384
+ # end
385
+ #
386
+ # #This method miso building analysis.
387
+ # #@author phylroy.lopez@nrcan.gc.ca
388
+ # #@param model_file [OpenStudio::model::Model] A model object
389
+ # #@param folder_name [String] path to a folder
390
+ # #@param standard_weather_file [String] path to a weather file
391
+ # def miso_building_analysis(folder_name,model_file,standard_weather_file)
392
+ # model = BTAP::FileIO::load_osm(model_file)
393
+ # BTAP::Geometry::enumerate_spaces_model(model)
394
+ # BTAP::Geometry::rename_zones_based_on_spaces(model)
395
+ # BTAP::Geometry::prefix_equipment_with_zone_name(model)
396
+ # #since this is a one to one relationship of space to zone.Name them the same
397
+ # model.getSpaces.sort.each do |space|
398
+ # space.thermalZone.get.setName(space.name.get)
399
+ # end
400
+ # #set run period to a week
401
+ # BTAP::SimulationSettings::set_run_period(model,1,1,12,31)
402
+ # #create models
403
+ # miso_building_generation(model,standard_weather_file).each do |new_model|
404
+ # BTAP::FileIO::get_name(new_model)
405
+ # save_file_name = "#{folder_name}/#{BTAP::FileIO::get_name(new_model)}.osm"
406
+ # BTAP::FileIO::save_osm(new_model, save_file_name)
407
+ # end
408
+ # end
409
+ #
410
+ # #This method miso zonal analysis.
411
+ # #@author phylroy.lopez@nrcan.gc.ca
412
+ # #@param model_file [OpenStudio::model::Model] A model object
413
+ # #@param folder_name [String] path to a folder
414
+ # #@param standard_weather_file [String] path to a weather file
415
+ # def miso_zonal_analysis(folder_name,model_file,standard_weather_file)
416
+ #
417
+ # model = BTAP::FileIO::load_osm(model_file)
418
+ # BTAP::Geometry::enumerate_spaces_model(model)
419
+ # BTAP::Geometry::rename_zones_based_on_spaces(model)
420
+ # BTAP::Geometry::prefix_equipment_with_zone_name(model)
421
+ # #since this is a one to one relationship of space to zone.Name them the same
422
+ # model.getSpaces.sort.each do |space|
423
+ # space.thermalZone.get.setName(space.name.get)
424
+ # end
425
+ # #set run period to a week
426
+ # BTAP::SimulationSettings::set_run_period(model,1,1,12,31)
427
+ # miso_zonal_generation(model,standard_weather_file).each do |new_model|
428
+ # BTAP::FileIO::get_name(new_model)
429
+ # save_file_name = "#{folder_name}/#{BTAP::FileIO::get_name(new_model)}.osm"
430
+ # BTAP::FileIO::save_osm(new_model, save_file_name)
431
+ # end
432
+ # end
433
+ #
434
+ # #This method miso zonal generation and returns a model array.
435
+ # #@author phylroy.lopez@nrcan.gc.ca
436
+ # #@param model[OpenStudio::model::Model] A model object
437
+ # #@param standard_weather_file [String] path to a weather file
438
+ # #@return [model_array<String>]
439
+ # def miso_zonal_generation(model,standard_weather_file)
440
+ # self.create_weather_files(standard_weather_file)
441
+ # self.create_schedules(model)
442
+ # model_array = Array.new()
443
+ #
444
+ # #model.clear_output_variables()
445
+ # self.set_output_variables(model)
446
+ # model.getSimulationControl.setMaximumNumberofWarmupDays(100)
447
+ # model.getSimulationControl.setMinimumNumberofWarmupDays(100)
448
+ # #create the array of models to run.
449
+ # model_array = Array.new()
450
+ # #get the number of thermal zones in the model
451
+ # num_of_thermal_zones = model.getThermalZones.size
452
+ #
453
+ # #change ground surfaces to adiabatic
454
+ # ground_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition( model.getSurfaces, ["Ground"] )
455
+ # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( model , ground_surfaces, "Adiabatic")
456
+ #
457
+ #
458
+ #
459
+ # #iterate through each zone.
460
+ # (0..num_of_thermal_zones-1).each do |zone_number|
461
+ # #
462
+ # # # Gsg Solar gains
463
+ # # gsgModel = BTAP::FileIO::deep_copy(model)
464
+ # # thermal_zones = gsgModel.getThermalZones
465
+ # # gsgModel.building.get.setName("Gsg-" + thermal_zones[zone_number].name.get)
466
+ # # BTAP::Site::set_weather_file(gsgModel,@solar_radiation_only_temp_constant )
467
+ # # self.set_internal_gains_to_zero(gsgModel)
468
+ # # thermal_zones[zone_number].setThermostatSetpointDualSetpoint(@mpc_no_heat_cool)
469
+ # # zone_surfaces = BTAP::Geometry::Surfaces::get_surfaces_from_thermal_zones([thermal_zones[zone_number]])
470
+ # # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gsgModel ,BTAP::Geometry::Surfaces::filter_by_boundary_condition( zone_surfaces, ["Surface"] ) , "Adiabatic")
471
+ # # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gsgModel , BTAP::Geometry::Surfaces::filter_by_boundary_condition( gsgModel.getSurfaces, ["Ground"] ) , "Adiabatic")
472
+ # # model_array.push(gsgModel)
473
+ # #
474
+ # #
475
+ # # # Gig - internal gains
476
+ # # gigModel = BTAP::FileIO::deep_copy(model)
477
+ # # thermal_zones = gigModel.getThermalZones
478
+ # # gigModel.building.get.setName("Gig-" + thermal_zones[zone_number].name.get)
479
+ # # BTAP::Site::set_weather_file(gigModel,@all_off )
480
+ # # thermal_zones[zone_number].setThermostatSetpointDualSetpoint(@mpc_no_heat_cool)
481
+ # # zone_surfaces = BTAP::Geometry::Surfaces::get_surfaces_from_thermal_zones([thermal_zones[zone_number]])
482
+ # # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gigModel ,BTAP::Geometry::Surfaces::filter_by_boundary_condition( zone_surfaces, ["Surface"] ) , "Adiabatic")
483
+ # # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gigModel , BTAP::Geometry::Surfaces::filter_by_boundary_condition( gigModel.getSurfaces, ["Ground"] ) , "Adiabatic")
484
+ # # model_array.push(gigModel)
485
+ # #
486
+ # #
487
+ # # # Gext external gains
488
+ # # gextModel = BTAP::FileIO::deep_copy(model)
489
+ # # thermal_zones = gextModel.getThermalZones
490
+ # # gextModel.building.get.setName("Gext-" + thermal_zones[zone_number].name.get)
491
+ # # BTAP::Site::set_weather_file(gextModel,@solar_radiation_off_temp_normal )
492
+ # # self.set_internal_gains_to_zero(gextModel)
493
+ # # thermal_zones[zone_number].setThermostatSetpointDualSetpoint(@mpc_no_heat_cool)
494
+ # # zone_surfaces = BTAP::Geometry::Surfaces::get_surfaces_from_thermal_zones([thermal_zones[zone_number]])
495
+ # # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gextModel ,BTAP::Geometry::Surfaces::filter_by_boundary_condition( zone_surfaces, ["Surface"] ) , "Adiabatic")
496
+ # # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gextModel , BTAP::Geometry::Surfaces::filter_by_boundary_condition( gextModel.getSurfaces, ["Ground"] ) , "Adiabatic")
497
+ # # model_array.push(gextModel)
498
+ # #
499
+ # # # Gh - no cooling
500
+ # # ghModel = BTAP::FileIO::deep_copy(model)
501
+ # # thermal_zones = ghModel.getThermalZones
502
+ # # ghModel.building.get.setName("Gh-" + thermal_zones[zone_number].name.get)
503
+ # # BTAP::Site::set_weather_file(ghModel,@all_off )
504
+ # # self.set_internal_gains_to_zero(ghModel)
505
+ # # thermal_zones[zone_number].setThermostatSetpointDualSetpoint(@mpc_no_cooling)
506
+ # # zone_surfaces = BTAP::Geometry::Surfaces::get_surfaces_from_thermal_zones([thermal_zones[zone_number]])
507
+ # # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( ghModel ,BTAP::Geometry::Surfaces::filter_by_boundary_condition( zone_surfaces, ["Surface"] ) , "Adiabatic")
508
+ # # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( ghModel , BTAP::Geometry::Surfaces::filter_by_boundary_condition( ghModel.getSurfaces, ["Ground"] ) , "Adiabatic")
509
+ # # model_array.push(ghModel)
510
+ # #
511
+ # # # Gc no heating
512
+ # # gcModel = BTAP::FileIO::deep_copy(model)
513
+ # # thermal_zones = gcModel.getThermalZones
514
+ # # gcModel.building.get.setName("Gc-" + thermal_zones[zone_number].name.get)
515
+ # # BTAP::Site::set_weather_file(gcModel, @solar_radiation_off_temp_normal)
516
+ # # self.set_internal_gains_to_zero(gcModel)
517
+ # # thermal_zones[zone_number].setThermostatSetpointDualSetpoint(@mpc_no_heating)
518
+ # # zone_surfaces = BTAP::Geometry::Surfaces::get_surfaces_from_thermal_zones([thermal_zones[zone_number]])
519
+ # # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gcModel ,BTAP::Geometry::Surfaces::filter_by_boundary_condition( zone_surfaces, ["Surface"] ) , "Adiabatic")
520
+ # # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gcModel , BTAP::Geometry::Surfaces::filter_by_boundary_condition( gcModel.getSurfaces, ["Ground"] ) , "Adiabatic")
521
+ # # model_array.push(gcModel)
522
+ #
523
+ # # # Gideal
524
+ # # gidealModel = BTAP::FileIO::deep_copy(model)
525
+ # # thermal_zones = gidealModel.getThermalZones
526
+ # # gidealModel.building.get.setName("Gideal-" + thermal_zones[zone_number].name.get)
527
+ # # BTAP::Site::set_weather_file( gidealModel, @original_file )
528
+ # # thermal_zones[zone_number].setThermostatSetpointDualSetpoint(@mpc_21C_setpoint)
529
+ # # zone_surfaces = BTAP::Geometry::Surfaces::get_surfaces_from_thermal_zones([thermal_zones[zone_number]])
530
+ # # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gidealModel ,BTAP::Geometry::Surfaces::filter_by_boundary_condition( zone_surfaces, ["Surface"] ) , "Adiabatic")
531
+ # # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gidealModel , BTAP::Geometry::Surfaces::filter_by_boundary_condition( gidealModel.getSurfaces, ["Ground"] ) , "Adiabatic")
532
+ # # model_array.push(gidealModel)
533
+ # #
534
+ # # # Gfloating
535
+ # # gfloatModel = BTAP::FileIO::deep_copy(model)
536
+ # # thermal_zones = gfloatModel.getThermalZones
537
+ # # gfloatModel.building.get.setName("Gfloating-" + thermal_zones[zone_number].name.get)
538
+ # # BTAP::Site::set_weather_file(gfloatModel, @original_file)
539
+ # # thermal_zones[zone_number].setThermostatSetpointDualSetpoint(@mpc_no_heat_cool)
540
+ # # ground_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition( gfloatModel.getSurfaces, ["Ground"] )
541
+ # # BTAP::Geometry::Surfaces::set_surfaces_boundary_condition( gfloatModel , ground_surfaces, "Adiabatic")
542
+ # # model_array.push(gfloatModel)
543
+ #
544
+ # end
545
+ # return model_array
546
+ # end
547
+ #
548
+ # def set_internal_gains_to_zero(model)
549
+ # BTAP::Resources::SpaceLoads::remove_all_casual_loads(model)
550
+ # end
551
+ # end
552
+ #
553
+ # end
554
+ # end