openstudio-calibration 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (218) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +29 -0
  3. data/CHANGELOG.md +14 -0
  4. data/Gemfile +20 -0
  5. data/Jenkinsfile +6 -0
  6. data/LICENSE.md +27 -0
  7. data/README.md +33 -0
  8. data/Rakefile +50 -0
  9. data/doc_templates/LICENSE.md +27 -0
  10. data/doc_templates/README.md.erb +42 -0
  11. data/doc_templates/copyright_erb.txt +36 -0
  12. data/doc_templates/copyright_js.txt +4 -0
  13. data/doc_templates/copyright_ruby.txt +34 -0
  14. data/lib/files/.gitkeep +0 -0
  15. data/lib/measures/AddMonthlyJSONUtilityData/LICENSE.md +27 -0
  16. data/lib/measures/AddMonthlyJSONUtilityData/README.md +96 -0
  17. data/lib/measures/AddMonthlyJSONUtilityData/README.md.erb +42 -0
  18. data/lib/measures/AddMonthlyJSONUtilityData/measure.rb +280 -0
  19. data/lib/measures/AddMonthlyJSONUtilityData/measure.xml +163 -0
  20. data/lib/measures/AddMonthlyUtilityData/LICENSE.md +27 -0
  21. data/lib/measures/AddMonthlyUtilityData/README.md +64 -0
  22. data/lib/measures/AddMonthlyUtilityData/README.md.erb +42 -0
  23. data/lib/measures/AddMonthlyUtilityData/measure.rb +312 -0
  24. data/lib/measures/AddMonthlyUtilityData/measure.xml +115 -0
  25. data/lib/measures/AddMonthlyUtilityData/tests/AddMonthlyUtilityData_Test.rb +88 -0
  26. data/lib/measures/AddMonthlyUtilityData/tests/electric_billed_usages.json +198 -0
  27. data/lib/measures/AddMonthlyUtilityData/tests/gas_billed_usages.json +198 -0
  28. data/lib/measures/CalibrationReports/LICENSE.md +27 -0
  29. data/lib/measures/CalibrationReports/README.md +26 -0
  30. data/lib/measures/CalibrationReports/README.md.erb +42 -0
  31. data/lib/measures/CalibrationReports/measure.rb +511 -0
  32. data/lib/measures/CalibrationReports/measure.xml +98 -0
  33. data/lib/measures/CalibrationReports/resources/report.html.in +379 -0
  34. data/lib/measures/CalibrationReports/tests/CalibrationReports_Test.rb +523 -0
  35. data/lib/measures/CalibrationReports/tests/ExampleModel.osm +10497 -0
  36. data/lib/measures/CalibrationReports/tests/ExampleModelNoDemandInput.osm +10560 -0
  37. data/lib/measures/CalibrationReports/tests/ExampleModelNoGasInput.osm +10456 -0
  38. data/lib/measures/CalibrationReports/tests/USA_CO_Golden-NREL.724666_TMY3.epw +8768 -0
  39. data/lib/measures/CalibrationReportsEnhanced/LICENSE.md +27 -0
  40. data/lib/measures/CalibrationReportsEnhanced/README.md +143 -0
  41. data/lib/measures/CalibrationReportsEnhanced/README.md.erb +42 -0
  42. data/lib/measures/CalibrationReportsEnhanced/measure.rb +798 -0
  43. data/lib/measures/CalibrationReportsEnhanced/measure.xml +372 -0
  44. data/lib/measures/CalibrationReportsEnhanced/resources/report.html.in +380 -0
  45. data/lib/measures/CalibrationReportsEnhanced/tests/CalibrationReportsEnhanced_Test.rb +734 -0
  46. data/lib/measures/CalibrationReportsEnhanced/tests/ExampleModel.osm +10497 -0
  47. data/lib/measures/CalibrationReportsEnhanced/tests/ExampleModel_FuelOil.osm +12740 -0
  48. data/lib/measures/CalibrationReportsEnhanced/tests/USA_CO_Golden-NREL.724666_TMY3.epw +8768 -0
  49. data/lib/measures/CalibrationReportsEnhanced21/LICENSE.md +27 -0
  50. data/lib/measures/CalibrationReportsEnhanced21/README.md +109 -0
  51. data/lib/measures/CalibrationReportsEnhanced21/README.md.erb +42 -0
  52. data/lib/measures/CalibrationReportsEnhanced21/measure.rb +690 -0
  53. data/lib/measures/CalibrationReportsEnhanced21/measure.xml +269 -0
  54. data/lib/measures/CalibrationReportsEnhanced21/resources/report.html.in +380 -0
  55. data/lib/measures/CoilCoolingDXSingleSpeedMultiplier/LICENSE.md +27 -0
  56. data/lib/measures/CoilCoolingDXSingleSpeedMultiplier/README.md +48 -0
  57. data/lib/measures/CoilCoolingDXSingleSpeedMultiplier/README.md.erb +42 -0
  58. data/lib/measures/CoilCoolingDXSingleSpeedMultiplier/measure.rb +237 -0
  59. data/lib/measures/CoilCoolingDXSingleSpeedMultiplier/measure.xml +93 -0
  60. data/lib/measures/CoilCoolingDXSingleSpeedPercentChange/LICENSE.md +27 -0
  61. data/lib/measures/CoilCoolingDXSingleSpeedPercentChange/README.md +48 -0
  62. data/lib/measures/CoilCoolingDXSingleSpeedPercentChange/README.md.erb +42 -0
  63. data/lib/measures/CoilCoolingDXSingleSpeedPercentChange/measure.rb +228 -0
  64. data/lib/measures/CoilCoolingDXSingleSpeedPercentChange/measure.xml +93 -0
  65. data/lib/measures/CoilCoolingDXTwoSpeedMultiplier/LICENSE.md +27 -0
  66. data/lib/measures/CoilCoolingDXTwoSpeedMultiplier/README.md +64 -0
  67. data/lib/measures/CoilCoolingDXTwoSpeedMultiplier/README.md.erb +42 -0
  68. data/lib/measures/CoilCoolingDXTwoSpeedMultiplier/measure.rb +280 -0
  69. data/lib/measures/CoilCoolingDXTwoSpeedMultiplier/measure.xml +111 -0
  70. data/lib/measures/CoilCoolingDXTwoSpeedPercentChange/LICENSE.md +27 -0
  71. data/lib/measures/CoilCoolingDXTwoSpeedPercentChange/README.md +64 -0
  72. data/lib/measures/CoilCoolingDXTwoSpeedPercentChange/README.md.erb +42 -0
  73. data/lib/measures/CoilCoolingDXTwoSpeedPercentChange/measure.rb +270 -0
  74. data/lib/measures/CoilCoolingDXTwoSpeedPercentChange/measure.xml +111 -0
  75. data/lib/measures/CoilCoolingWaterMultiplier/LICENSE.md +27 -0
  76. data/lib/measures/CoilCoolingWaterMultiplier/README.md +80 -0
  77. data/lib/measures/CoilCoolingWaterMultiplier/README.md.erb +42 -0
  78. data/lib/measures/CoilCoolingWaterMultiplier/measure.rb +324 -0
  79. data/lib/measures/CoilCoolingWaterMultiplier/measure.xml +129 -0
  80. data/lib/measures/CoilCoolingWaterPercentChange/LICENSE.md +27 -0
  81. data/lib/measures/CoilCoolingWaterPercentChange/README.md +80 -0
  82. data/lib/measures/CoilCoolingWaterPercentChange/README.md.erb +42 -0
  83. data/lib/measures/CoilCoolingWaterPercentChange/measure.rb +311 -0
  84. data/lib/measures/CoilCoolingWaterPercentChange/measure.xml +129 -0
  85. data/lib/measures/CoilHeatingElectricMultiplier/LICENSE.md +27 -0
  86. data/lib/measures/CoilHeatingElectricMultiplier/README.md +48 -0
  87. data/lib/measures/CoilHeatingElectricMultiplier/README.md.erb +42 -0
  88. data/lib/measures/CoilHeatingElectricMultiplier/measure.rb +240 -0
  89. data/lib/measures/CoilHeatingElectricMultiplier/measure.xml +93 -0
  90. data/lib/measures/CoilHeatingElectricPercentChange/LICENSE.md +27 -0
  91. data/lib/measures/CoilHeatingElectricPercentChange/README.md +48 -0
  92. data/lib/measures/CoilHeatingElectricPercentChange/README.md.erb +42 -0
  93. data/lib/measures/CoilHeatingElectricPercentChange/measure.rb +231 -0
  94. data/lib/measures/CoilHeatingElectricPercentChange/measure.xml +93 -0
  95. data/lib/measures/CoilHeatingGasMultiplier/LICENSE.md +27 -0
  96. data/lib/measures/CoilHeatingGasMultiplier/README.md +64 -0
  97. data/lib/measures/CoilHeatingGasMultiplier/README.md.erb +42 -0
  98. data/lib/measures/CoilHeatingGasMultiplier/measure.rb +282 -0
  99. data/lib/measures/CoilHeatingGasMultiplier/measure.xml +111 -0
  100. data/lib/measures/CoilHeatingGasPercentChange/LICENSE.md +27 -0
  101. data/lib/measures/CoilHeatingGasPercentChange/README.md +64 -0
  102. data/lib/measures/CoilHeatingGasPercentChange/README.md.erb +42 -0
  103. data/lib/measures/CoilHeatingGasPercentChange/measure.rb +271 -0
  104. data/lib/measures/CoilHeatingGasPercentChange/measure.xml +111 -0
  105. data/lib/measures/CoilHeatingWaterMultiplier/LICENSE.md +27 -0
  106. data/lib/measures/CoilHeatingWaterMultiplier/README.md +48 -0
  107. data/lib/measures/CoilHeatingWaterMultiplier/README.md.erb +42 -0
  108. data/lib/measures/CoilHeatingWaterMultiplier/measure.rb +235 -0
  109. data/lib/measures/CoilHeatingWaterMultiplier/measure.xml +93 -0
  110. data/lib/measures/CoilHeatingWaterPercentChange/LICENSE.md +27 -0
  111. data/lib/measures/CoilHeatingWaterPercentChange/README.md +48 -0
  112. data/lib/measures/CoilHeatingWaterPercentChange/README.md.erb +42 -0
  113. data/lib/measures/CoilHeatingWaterPercentChange/measure.rb +226 -0
  114. data/lib/measures/CoilHeatingWaterPercentChange/measure.xml +93 -0
  115. data/lib/measures/ConstructionLayerZeroMaterialProperties/LICENSE.md +27 -0
  116. data/lib/measures/ConstructionLayerZeroMaterialProperties/README.md +88 -0
  117. data/lib/measures/ConstructionLayerZeroMaterialProperties/README.md.erb +42 -0
  118. data/lib/measures/ConstructionLayerZeroMaterialProperties/measure.rb +221 -0
  119. data/lib/measures/ConstructionLayerZeroMaterialProperties/measure.xml +194 -0
  120. data/lib/measures/ElectricBaseboardEfficiencyAndCapacity/LICENSE.md +27 -0
  121. data/lib/measures/ElectricBaseboardEfficiencyAndCapacity/README.md +40 -0
  122. data/lib/measures/ElectricBaseboardEfficiencyAndCapacity/README.md.erb +42 -0
  123. data/lib/measures/ElectricBaseboardEfficiencyAndCapacity/measure.rb +102 -0
  124. data/lib/measures/ElectricBaseboardEfficiencyAndCapacity/measure.xml +78 -0
  125. data/lib/measures/ExteriorWallThermalPropertiesMultiplier/LICENSE.md +27 -0
  126. data/lib/measures/ExteriorWallThermalPropertiesMultiplier/README.md +48 -0
  127. data/lib/measures/ExteriorWallThermalPropertiesMultiplier/README.md.erb +42 -0
  128. data/lib/measures/ExteriorWallThermalPropertiesMultiplier/measure.rb +263 -0
  129. data/lib/measures/ExteriorWallThermalPropertiesMultiplier/measure.xml +97 -0
  130. data/lib/measures/ExteriorWallThermalPropertiesPercentChange/LICENSE.md +27 -0
  131. data/lib/measures/ExteriorWallThermalPropertiesPercentChange/README.md +48 -0
  132. data/lib/measures/ExteriorWallThermalPropertiesPercentChange/README.md.erb +42 -0
  133. data/lib/measures/ExteriorWallThermalPropertiesPercentChange/measure.rb +253 -0
  134. data/lib/measures/ExteriorWallThermalPropertiesPercentChange/measure.xml +97 -0
  135. data/lib/measures/FansMultiplier/LICENSE.md +27 -0
  136. data/lib/measures/FansMultiplier/README.md +64 -0
  137. data/lib/measures/FansMultiplier/README.md.erb +42 -0
  138. data/lib/measures/FansMultiplier/measure.rb +297 -0
  139. data/lib/measures/FansMultiplier/measure.xml +166 -0
  140. data/lib/measures/FansPercentChange/LICENSE.md +27 -0
  141. data/lib/measures/FansPercentChange/README.md +64 -0
  142. data/lib/measures/FansPercentChange/README.md.erb +42 -0
  143. data/lib/measures/FansPercentChange/measure.rb +286 -0
  144. data/lib/measures/FansPercentChange/measure.xml +166 -0
  145. data/lib/measures/GeneralCalibrationMeasureMultiplier/LICENSE.md +27 -0
  146. data/lib/measures/GeneralCalibrationMeasureMultiplier/README.md +112 -0
  147. data/lib/measures/GeneralCalibrationMeasureMultiplier/README.md.erb +42 -0
  148. data/lib/measures/GeneralCalibrationMeasureMultiplier/measure.rb +639 -0
  149. data/lib/measures/GeneralCalibrationMeasureMultiplier/measure.xml +229 -0
  150. data/lib/measures/GeneralCalibrationMeasurePercentChange/LICENSE.md +27 -0
  151. data/lib/measures/GeneralCalibrationMeasurePercentChange/README.md +112 -0
  152. data/lib/measures/GeneralCalibrationMeasurePercentChange/README.md.erb +42 -0
  153. data/lib/measures/GeneralCalibrationMeasurePercentChange/measure.rb +756 -0
  154. data/lib/measures/GeneralCalibrationMeasurePercentChange/measure.xml +229 -0
  155. data/lib/measures/HardSizeHvac/LICENSE.md +27 -0
  156. data/lib/measures/HardSizeHvac/README.md +26 -0
  157. data/lib/measures/HardSizeHvac/README.md.erb +42 -0
  158. data/lib/measures/HardSizeHvac/measure.rb +88 -0
  159. data/lib/measures/HardSizeHvac/measure.xml +81 -0
  160. data/lib/measures/MaalkaMonthlyJSONUtilityData/LICENSE.md +27 -0
  161. data/lib/measures/MaalkaMonthlyJSONUtilityData/README.md +104 -0
  162. data/lib/measures/MaalkaMonthlyJSONUtilityData/README.md.erb +42 -0
  163. data/lib/measures/MaalkaMonthlyJSONUtilityData/measure.rb +304 -0
  164. data/lib/measures/MaalkaMonthlyJSONUtilityData/measure.xml +216 -0
  165. data/lib/measures/RValueOfInsulationForConstructionMultiplier/LICENSE.md +27 -0
  166. data/lib/measures/RValueOfInsulationForConstructionMultiplier/README.md +40 -0
  167. data/lib/measures/RValueOfInsulationForConstructionMultiplier/README.md.erb +42 -0
  168. data/lib/measures/RValueOfInsulationForConstructionMultiplier/measure.rb +196 -0
  169. data/lib/measures/RValueOfInsulationForConstructionMultiplier/measure.xml +132 -0
  170. data/lib/measures/RValueOfInsulationForConstructionPercentageChange/LICENSE.md +27 -0
  171. data/lib/measures/RValueOfInsulationForConstructionPercentageChange/README.md +40 -0
  172. data/lib/measures/RValueOfInsulationForConstructionPercentageChange/README.md.erb +42 -0
  173. data/lib/measures/RValueOfInsulationForConstructionPercentageChange/measure.rb +189 -0
  174. data/lib/measures/RValueOfInsulationForConstructionPercentageChange/measure.xml +132 -0
  175. data/lib/measures/RoofThermalPropertiesMultiplier/LICENSE.md +27 -0
  176. data/lib/measures/RoofThermalPropertiesMultiplier/README.md +48 -0
  177. data/lib/measures/RoofThermalPropertiesMultiplier/README.md.erb +42 -0
  178. data/lib/measures/RoofThermalPropertiesMultiplier/measure.rb +263 -0
  179. data/lib/measures/RoofThermalPropertiesMultiplier/measure.xml +97 -0
  180. data/lib/measures/RoofThermalPropertiesPercentChange/LICENSE.md +27 -0
  181. data/lib/measures/RoofThermalPropertiesPercentChange/README.md +48 -0
  182. data/lib/measures/RoofThermalPropertiesPercentChange/README.md.erb +42 -0
  183. data/lib/measures/RoofThermalPropertiesPercentChange/measure.rb +253 -0
  184. data/lib/measures/RoofThermalPropertiesPercentChange/measure.xml +97 -0
  185. data/lib/measures/TimeseriesObjectiveFunction/LICENSE.md +27 -0
  186. data/lib/measures/TimeseriesObjectiveFunction/README.md +207 -0
  187. data/lib/measures/TimeseriesObjectiveFunction/README.md.erb +42 -0
  188. data/lib/measures/TimeseriesObjectiveFunction/measure.rb +748 -0
  189. data/lib/measures/TimeseriesObjectiveFunction/measure.xml +435 -0
  190. data/lib/measures/TimeseriesObjectiveFunction/resources/report.html.erb +288 -0
  191. data/lib/measures/TimeseriesPlot/LICENSE.md +27 -0
  192. data/lib/measures/TimeseriesPlot/README.md +56 -0
  193. data/lib/measures/TimeseriesPlot/README.md.erb +42 -0
  194. data/lib/measures/TimeseriesPlot/measure.rb +302 -0
  195. data/lib/measures/TimeseriesPlot/measure.xml +137 -0
  196. data/lib/measures/TimeseriesPlot/resources/report.html.erb +270 -0
  197. data/lib/measures/WaterHeaterMixedMultiplier/LICENSE.md +27 -0
  198. data/lib/measures/WaterHeaterMixedMultiplier/README.md +64 -0
  199. data/lib/measures/WaterHeaterMixedMultiplier/README.md.erb +42 -0
  200. data/lib/measures/WaterHeaterMixedMultiplier/measure.rb +255 -0
  201. data/lib/measures/WaterHeaterMixedMultiplier/measure.xml +180 -0
  202. data/lib/measures/WaterHeaterMixedPercentChange/LICENSE.md +27 -0
  203. data/lib/measures/WaterHeaterMixedPercentChange/README.md +64 -0
  204. data/lib/measures/WaterHeaterMixedPercentChange/README.md.erb +42 -0
  205. data/lib/measures/WaterHeaterMixedPercentChange/measure.rb +245 -0
  206. data/lib/measures/WaterHeaterMixedPercentChange/measure.xml +180 -0
  207. data/lib/measures/zone_report/LICENSE.md +27 -0
  208. data/lib/measures/zone_report/README.md +26 -0
  209. data/lib/measures/zone_report/README.md.erb +42 -0
  210. data/lib/measures/zone_report/measure.rb +706 -0
  211. data/lib/measures/zone_report/measure.xml +67 -0
  212. data/lib/measures/zone_report/resources/report.html.in +342 -0
  213. data/lib/openstudio-calibration-measures.rb +36 -0
  214. data/lib/openstudio/calibration_measures.rb +37 -0
  215. data/lib/openstudio/calibration_measures/extension.rb +49 -0
  216. data/lib/openstudio/calibration_measures/version.rb +40 -0
  217. data/openstudio-calibration.gemspec +30 -0
  218. metadata +331 -0
@@ -0,0 +1,88 @@
1
+
2
+
3
+ ###### (Automatically generated documentation)
4
+
5
+ # Change Parameters Of Material (Layer 0 of Construction)
6
+
7
+ ## Description
8
+ This measure changes properties of Layer 0 for a specific construction.
9
+
10
+ ## Modeler Description
11
+ This measure changes the Layer 0 properties of Thickness, Density, Thermal Absorptance, Solar Absorptance, Visible Absoptance, Thermal Conductivity, Specific Heat.
12
+
13
+ ## Measure Type
14
+ ModelMeasure
15
+
16
+ ## Taxonomy
17
+
18
+
19
+ ## Arguments
20
+
21
+
22
+ ### Choose a Construction to Alter.
23
+
24
+ **Name:** construction,
25
+ **Type:** Choice,
26
+ **Units:** ,
27
+ **Required:** true,
28
+ **Model Dependent:** false
29
+
30
+ ### Thickness of Layer 0
31
+ Set Thickness of Layer 0. 0 value means do not change from default.
32
+ **Name:** thickness,
33
+ **Type:** Double,
34
+ **Units:** m,
35
+ **Required:** true,
36
+ **Model Dependent:** false
37
+
38
+ ### Density of Layer 0
39
+ Set Density of Layer 0. 0 value means do not change from default.
40
+ **Name:** density,
41
+ **Type:** Double,
42
+ **Units:** kg/m^3,
43
+ **Required:** true,
44
+ **Model Dependent:** false
45
+
46
+ ### Thermal Absorptance of Layer 0
47
+ Set Thermal Absorptance of Layer 0. 0 value means do not change from default.
48
+ **Name:** thermal_absorptance,
49
+ **Type:** Double,
50
+ **Units:** fraction,
51
+ **Required:** true,
52
+ **Model Dependent:** false
53
+
54
+ ### Solar Absorptance of Layer 0
55
+ Set Solar Absorptance of Layer 0. 0 value means do not change from default.
56
+ **Name:** solar_absorptance,
57
+ **Type:** Double,
58
+ **Units:** fraction,
59
+ **Required:** true,
60
+ **Model Dependent:** false
61
+
62
+ ### Visible Absorptance of Layer 0
63
+ Set Visible Absorptance of Layer 0. 0 value means do not change from default.
64
+ **Name:** visible_absorptance,
65
+ **Type:** Double,
66
+ **Units:** fraction,
67
+ **Required:** true,
68
+ **Model Dependent:** false
69
+
70
+ ### Thermal Conductivity of Layer 0
71
+ Set Thermal Conductivity of Layer 0. 0 value means do not change from default.
72
+ **Name:** thermal_conductivity,
73
+ **Type:** Double,
74
+ **Units:** W/(m*K),
75
+ **Required:** true,
76
+ **Model Dependent:** false
77
+
78
+ ### Specific Heat of Layer 0
79
+ Set Specific Heat of Layer 0. 0 value means do not change from default.
80
+ **Name:** specific_heat,
81
+ **Type:** Double,
82
+ **Units:** J/(kg*K),
83
+ **Required:** true,
84
+ **Model Dependent:** false
85
+
86
+
87
+
88
+
@@ -0,0 +1,42 @@
1
+ <%#= README.md.erb is used to auto-generate README.md. %>
2
+ <%#= To manually maintain README.md throw away README.md.erb and manually edit README.md %>
3
+ ###### (Automatically generated documentation)
4
+
5
+ # <%= name %>
6
+
7
+ ## Description
8
+ <%= description %>
9
+
10
+ ## Modeler Description
11
+ <%= modelerDescription %>
12
+
13
+ ## Measure Type
14
+ <%= measureType %>
15
+
16
+ ## Taxonomy
17
+ <%= taxonomy %>
18
+
19
+ ## Arguments
20
+
21
+ <% arguments.each do |argument| %>
22
+ ### <%= argument[:display_name] %>
23
+ <%= argument[:description] %>
24
+ **Name:** <%= argument[:name] %>,
25
+ **Type:** <%= argument[:type] %>,
26
+ **Units:** <%= argument[:units] %>,
27
+ **Required:** <%= argument[:required] %>,
28
+ **Model Dependent:** <%= argument[:model_dependent] %>
29
+ <% end %>
30
+
31
+ <% if arguments.size == 0 %>
32
+ <%= "This measure does not have any user arguments" %>
33
+ <% end %>
34
+
35
+ <% if outputs.size > 0 %>
36
+ ## Outputs
37
+ <% output_names = [] %>
38
+ <% outputs.each do |output| %>
39
+ <% output_names << output[:display_name] %>
40
+ <% end %>
41
+ <%= output_names.join(", ") %>
42
+ <% end %>
@@ -0,0 +1,221 @@
1
+ # *******************************************************************************
2
+ # OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
3
+ # All rights reserved.
4
+ # Redistribution and use in source and binary forms, with or without
5
+ # modification, are permitted provided that the following conditions are met:
6
+ #
7
+ # (1) Redistributions of source code must retain the above copyright notice,
8
+ # this list of conditions and the following disclaimer.
9
+ #
10
+ # (2) Redistributions in binary form must reproduce the above copyright notice,
11
+ # this list of conditions and the following disclaimer in the documentation
12
+ # and/or other materials provided with the distribution.
13
+ #
14
+ # (3) Neither the name of the copyright holder nor the names of any contributors
15
+ # may be used to endorse or promote products derived from this software without
16
+ # specific prior written permission from the respective party.
17
+ #
18
+ # (4) Other than as required in clauses (1) and (2), distributions in any form
19
+ # of modifications or other derivative works may not use the "OpenStudio"
20
+ # trademark, "OS", "os", or any other confusingly similar designation without
21
+ # specific prior written permission from Alliance for Sustainable Energy, LLC.
22
+ #
23
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS
24
+ # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
25
+ # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26
+ # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE
27
+ # UNITED STATES GOVERNMENT, OR THE UNITED STATES DEPARTMENT OF ENERGY, NOR ANY OF
28
+ # THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
29
+ # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
30
+ # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31
+ # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
32
+ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33
+ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
+ # *******************************************************************************
35
+
36
+ # start the measure
37
+ class ConstructionLayerZeroMaterialProperties < OpenStudio::Measure::ModelMeasure
38
+ # define the name that a user will see
39
+ def name
40
+ 'Change Parameters Of Material (Layer 0 of Construction)'
41
+ end
42
+
43
+ # human readable description
44
+ def description
45
+ 'This measure changes properties of Layer 0 for a specific construction.'
46
+ end
47
+
48
+ # human readable description of modeling approach
49
+ def modeler_description
50
+ 'This measure changes the Layer 0 properties of Thickness, Density, Thermal Absorptance, Solar Absorptance, Visible Absoptance, Thermal Conductivity, Specific Heat.'
51
+ end
52
+
53
+ # define the arguments that the user will input
54
+ def arguments(model)
55
+ args = OpenStudio::Measure::OSArgumentVector.new
56
+
57
+ # populate choice argument for constructions that are applied to surfaces in the model
58
+ construction_handles = OpenStudio::StringVector.new
59
+ construction_display_names = OpenStudio::StringVector.new
60
+
61
+ # putting space types and names into hash
62
+ construction_args = model.getConstructions
63
+ construction_args_hash = {}
64
+ construction_args.each do |construction_arg|
65
+ construction_args_hash[construction_arg.name.to_s] = construction_arg
66
+ end
67
+
68
+ # looping through sorted hash of constructions
69
+ construction_args_hash.sort.map do |key, value|
70
+ # only include if construction is used on surface
71
+ if value.getNetArea > 0
72
+ construction_handles << value.handle.to_s
73
+ construction_display_names << key
74
+ end
75
+ end
76
+
77
+ # make an argument for construction
78
+ construction = OpenStudio::Measure::OSArgument.makeChoiceArgument('construction', construction_handles, construction_display_names, true)
79
+ construction.setDisplayName('Choose a Construction to Alter.')
80
+ args << construction
81
+
82
+ # make an argument thickness
83
+ thickness = OpenStudio::Measure::OSArgument.makeDoubleArgument('thickness', true)
84
+ thickness.setDisplayName('Thickness of Layer 0')
85
+ thickness.setDescription('Set Thickness of Layer 0. 0 value means do not change from default.')
86
+ thickness.setDefaultValue(0)
87
+ thickness.setUnits('m')
88
+ args << thickness
89
+
90
+ # make an argument density
91
+ density = OpenStudio::Measure::OSArgument.makeDoubleArgument('density', true)
92
+ density.setDisplayName('Density of Layer 0')
93
+ density.setDescription('Set Density of Layer 0. 0 value means do not change from default.')
94
+ density.setUnits('kg/m^3')
95
+ density.setDefaultValue(0)
96
+ args << density
97
+
98
+ # make an argument thermal_absorptance
99
+ thermal_absorptance = OpenStudio::Measure::OSArgument.makeDoubleArgument('thermal_absorptance', true)
100
+ thermal_absorptance.setDisplayName('Thermal Absorptance of Layer 0')
101
+ thermal_absorptance.setDescription('Set Thermal Absorptance of Layer 0. 0 value means do not change from default.')
102
+ thermal_absorptance.setUnits('fraction')
103
+ thermal_absorptance.setDefaultValue(0)
104
+ args << thermal_absorptance
105
+
106
+ # make an argument solar_absorptance
107
+ solar_absorptance = OpenStudio::Measure::OSArgument.makeDoubleArgument('solar_absorptance', true)
108
+ solar_absorptance.setDisplayName('Solar Absorptance of Layer 0')
109
+ solar_absorptance.setDescription('Set Solar Absorptance of Layer 0. 0 value means do not change from default.')
110
+ solar_absorptance.setUnits('fraction')
111
+ solar_absorptance.setDefaultValue(0)
112
+ args << solar_absorptance
113
+
114
+ # make an argument visible_absorptance
115
+ visible_absorptance = OpenStudio::Measure::OSArgument.makeDoubleArgument('visible_absorptance', true)
116
+ visible_absorptance.setDisplayName('Visible Absorptance of Layer 0')
117
+ visible_absorptance.setDescription('Set Visible Absorptance of Layer 0. 0 value means do not change from default.')
118
+ visible_absorptance.setUnits('fraction')
119
+ visible_absorptance.setDefaultValue(0)
120
+ args << visible_absorptance
121
+
122
+ # make an argument conductivity
123
+ thermal_conductivity = OpenStudio::Measure::OSArgument.makeDoubleArgument('thermal_conductivity', true)
124
+ thermal_conductivity.setDisplayName('Thermal Conductivity of Layer 0')
125
+ thermal_conductivity.setDescription('Set Thermal Conductivity of Layer 0. 0 value means do not change from default.')
126
+ thermal_conductivity.setDefaultValue(0)
127
+ thermal_conductivity.setUnits('W/(m*K)')
128
+ args << thermal_conductivity
129
+
130
+ # make an argument specific_heat
131
+ specific_heat = OpenStudio::Measure::OSArgument.makeDoubleArgument('specific_heat', true)
132
+ specific_heat.setDisplayName('Specific Heat of Layer 0')
133
+ specific_heat.setDescription('Set Specific Heat of Layer 0. 0 value means do not change from default.')
134
+ specific_heat.setUnits('J/(kg*K)')
135
+ specific_heat.setDefaultValue(0)
136
+ args << specific_heat
137
+
138
+ args
139
+ end # end the arguments method
140
+
141
+ # define what happens when the measure is run
142
+ def run(model, runner, user_arguments)
143
+ super(model, runner, user_arguments)
144
+
145
+ # use the built-in error checking
146
+ unless runner.validateUserArguments(arguments(model), user_arguments)
147
+ return false
148
+ end
149
+
150
+ # assign the user inputs to variables
151
+ construction = runner.getOptionalWorkspaceObjectChoiceValue('construction', user_arguments, model) # model is passed in because of argument type
152
+ thermal_absorptance = runner.getDoubleArgumentValue('thermal_absorptance', user_arguments)
153
+ solar_absorptance = runner.getDoubleArgumentValue('solar_absorptance', user_arguments)
154
+ visible_absorptance = runner.getDoubleArgumentValue('visible_absorptance', user_arguments)
155
+ thermal_conductivity = runner.getDoubleArgumentValue('thermal_conductivity', user_arguments)
156
+ specific_heat = runner.getDoubleArgumentValue('specific_heat', user_arguments)
157
+ thickness = runner.getDoubleArgumentValue('thickness', user_arguments)
158
+ density = runner.getDoubleArgumentValue('density', user_arguments)
159
+
160
+ # check the construction for reasonableness
161
+ if construction.empty?
162
+ handle = runner.getStringArgumentValue('construction', user_arguments)
163
+ if handle.empty?
164
+ runner.registerError('No construction was chosen.')
165
+ else
166
+ runner.registerError("The selected construction with handle '#{handle}' was not found in the model. It may have been removed by another measure.")
167
+ end
168
+ return false
169
+ else
170
+ if !construction.get.to_Construction.empty?
171
+ construction = construction.get.to_Construction.get
172
+ else
173
+ runner.registerError('Script Error - argument not showing up as construction.')
174
+ return false
175
+ end
176
+ end # end of if construction.empty?
177
+
178
+ initial_r_value_ip = OpenStudio.convert(1.0 / construction.thermalConductance.to_f, 'm^2*K/W', 'ft^2*h*R/Btu')
179
+ runner.registerInitialCondition("The Initial R-value of #{construction.name} is #{initial_r_value_ip} (ft^2*h*R/Btu).")
180
+ runner.registerValue('initial_r_value_ip', initial_r_value_ip.to_f, 'ft^2*h*R/Btu')
181
+ # get layers
182
+ layers = construction.layers
183
+
184
+ # steel layer is always first layer
185
+ layer = layers[0].to_StandardOpaqueMaterial.get
186
+ runner.registerInfo("Initial thermal_absorptance: #{layer.thermalAbsorptance}")
187
+ runner.registerInfo("Initial solar_absorptance: #{layer.solarAbsorptance}")
188
+ runner.registerInfo("Initial visible_absorptance: #{layer.visibleAbsorptance}")
189
+ runner.registerInfo("Initial thermal_conductivity: #{layer.thermalConductivity}")
190
+ runner.registerInfo("Initial specific_heat: #{layer.specificHeat}")
191
+ runner.registerInfo("Initial thickness: #{layer.thickness}")
192
+ runner.registerInfo("Initial density: #{layer.density}")
193
+
194
+ # set layer properties
195
+ layer.setThermalAbsorptance(thermal_absorptance) if thermal_absorptance != 0
196
+ layer.setSolarAbsorptance(solar_absorptance) if solar_absorptance != 0
197
+ layer.setVisibleAbsorptance(visible_absorptance) if visible_absorptance != 0
198
+ layer.setThermalConductivity(thermal_conductivity) if thermal_conductivity != 0
199
+ layer.setSpecificHeat(specific_heat) if specific_heat != 0
200
+ layer.setThickness(thickness) if thickness != 0
201
+ layer.setDensity(density) if density != 0
202
+
203
+ runner.registerInfo("Final thermal_absorptance: #{layer.thermalAbsorptance}")
204
+ runner.registerInfo("Final solar_absorptance: #{layer.solarAbsorptance}")
205
+ runner.registerInfo("Final visible_absorptance: #{layer.visibleAbsorptance}")
206
+ runner.registerInfo("Final thermal_conductivity: #{layer.thermalConductivity}")
207
+ runner.registerInfo("Final specific_heat: #{layer.specificHeat}")
208
+ runner.registerInfo("Final thickness: #{layer.thickness}")
209
+ runner.registerInfo("Final density: #{layer.density}")
210
+
211
+ # report initial condition
212
+ final_r_value_ip = OpenStudio.convert(1 / construction.thermalConductance.to_f, 'm^2*K/W', 'ft^2*h*R/Btu')
213
+ runner.registerFinalCondition("The Final R-value of #{construction.name} is #{final_r_value_ip} (ft^2*h*R/Btu).")
214
+ runner.registerValue('final_r_value_ip', final_r_value_ip.to_f, 'ft^2*h*R/Btu')
215
+
216
+ true
217
+ end # end the run method
218
+ end # end the measure
219
+
220
+ # this allows the measure to be used by the application
221
+ ConstructionLayerZeroMaterialProperties.new.registerWithApplication
@@ -0,0 +1,194 @@
1
+ <measure>
2
+ <schema_version>3.0</schema_version>
3
+ <name>construction_layer_zero_material_properties</name>
4
+ <uid>3c7a6751-bb54-4600-9410-8f042e1a413b</uid>
5
+ <version_id>14b11c2b-63aa-4064-835f-fb57bb4a7af5</version_id>
6
+ <version_modified>20200325T030943Z</version_modified>
7
+ <xml_checksum>0BF71A3E</xml_checksum>
8
+ <class_name>ConstructionLayerZeroMaterialProperties</class_name>
9
+ <display_name>Change Parameters Of Material (Layer 0 of Construction)</display_name>
10
+ <description>This measure changes properties of Layer 0 for a specific construction.</description>
11
+ <modeler_description>This measure changes the Layer 0 properties of Thickness, Density, Thermal Absorptance, Solar Absorptance, Visible Absoptance, Thermal Conductivity, Specific Heat.</modeler_description>
12
+ <arguments>
13
+ <argument>
14
+ <name>construction</name>
15
+ <display_name>Choose a Construction to Alter.</display_name>
16
+ <type>Choice</type>
17
+ <required>true</required>
18
+ <model_dependent>false</model_dependent>
19
+ </argument>
20
+ <argument>
21
+ <name>thickness</name>
22
+ <display_name>Thickness of Layer 0</display_name>
23
+ <description>Set Thickness of Layer 0. 0 value means do not change from default.</description>
24
+ <type>Double</type>
25
+ <units>m</units>
26
+ <required>true</required>
27
+ <model_dependent>false</model_dependent>
28
+ <default_value>0</default_value>
29
+ </argument>
30
+ <argument>
31
+ <name>density</name>
32
+ <display_name>Density of Layer 0</display_name>
33
+ <description>Set Density of Layer 0. 0 value means do not change from default.</description>
34
+ <type>Double</type>
35
+ <units>kg/m^3</units>
36
+ <required>true</required>
37
+ <model_dependent>false</model_dependent>
38
+ <default_value>0</default_value>
39
+ </argument>
40
+ <argument>
41
+ <name>thermal_absorptance</name>
42
+ <display_name>Thermal Absorptance of Layer 0</display_name>
43
+ <description>Set Thermal Absorptance of Layer 0. 0 value means do not change from default.</description>
44
+ <type>Double</type>
45
+ <units>fraction</units>
46
+ <required>true</required>
47
+ <model_dependent>false</model_dependent>
48
+ <default_value>0</default_value>
49
+ </argument>
50
+ <argument>
51
+ <name>solar_absorptance</name>
52
+ <display_name>Solar Absorptance of Layer 0</display_name>
53
+ <description>Set Solar Absorptance of Layer 0. 0 value means do not change from default.</description>
54
+ <type>Double</type>
55
+ <units>fraction</units>
56
+ <required>true</required>
57
+ <model_dependent>false</model_dependent>
58
+ <default_value>0</default_value>
59
+ </argument>
60
+ <argument>
61
+ <name>visible_absorptance</name>
62
+ <display_name>Visible Absorptance of Layer 0</display_name>
63
+ <description>Set Visible Absorptance of Layer 0. 0 value means do not change from default.</description>
64
+ <type>Double</type>
65
+ <units>fraction</units>
66
+ <required>true</required>
67
+ <model_dependent>false</model_dependent>
68
+ <default_value>0</default_value>
69
+ </argument>
70
+ <argument>
71
+ <name>thermal_conductivity</name>
72
+ <display_name>Thermal Conductivity of Layer 0</display_name>
73
+ <description>Set Thermal Conductivity of Layer 0. 0 value means do not change from default.</description>
74
+ <type>Double</type>
75
+ <units>W/(m*K)</units>
76
+ <required>true</required>
77
+ <model_dependent>false</model_dependent>
78
+ <default_value>0</default_value>
79
+ </argument>
80
+ <argument>
81
+ <name>specific_heat</name>
82
+ <display_name>Specific Heat of Layer 0</display_name>
83
+ <description>Set Specific Heat of Layer 0. 0 value means do not change from default.</description>
84
+ <type>Double</type>
85
+ <units>J/(kg*K)</units>
86
+ <required>true</required>
87
+ <model_dependent>false</model_dependent>
88
+ <default_value>0</default_value>
89
+ </argument>
90
+ </arguments>
91
+ <outputs/>
92
+ <provenances/>
93
+ <tags>
94
+ <tag>Envelope.Opaque</tag>
95
+ </tags>
96
+ <attributes>
97
+ <attribute>
98
+ <name>Measure Function</name>
99
+ <value>Measure</value>
100
+ <datatype>string</datatype>
101
+ </attribute>
102
+ <attribute>
103
+ <name>Requires EnergyPlus Results</name>
104
+ <value>false</value>
105
+ <datatype>boolean</datatype>
106
+ </attribute>
107
+ <attribute>
108
+ <name>Uses SketchUp API</name>
109
+ <value>false</value>
110
+ <datatype>boolean</datatype>
111
+ </attribute>
112
+ <attribute>
113
+ <name>Measure Type</name>
114
+ <value>ModelMeasure</value>
115
+ <datatype>string</datatype>
116
+ </attribute>
117
+ <attribute>
118
+ <name>Intended Software Tool</name>
119
+ <value>Apply Measure Now</value>
120
+ <datatype>string</datatype>
121
+ </attribute>
122
+ <attribute>
123
+ <name>Intended Software Tool</name>
124
+ <value>OpenStudio Application</value>
125
+ <datatype>string</datatype>
126
+ </attribute>
127
+ <attribute>
128
+ <name>Intended Software Tool</name>
129
+ <value>Parametric Analysis Tool</value>
130
+ <datatype>string</datatype>
131
+ </attribute>
132
+ <attribute>
133
+ <name>Intended Software Tool</name>
134
+ <value>Analysis Spreadsheet</value>
135
+ <datatype>string</datatype>
136
+ </attribute>
137
+ <attribute>
138
+ <name>Intended Use Case</name>
139
+ <value>Model Articulation</value>
140
+ <datatype>string</datatype>
141
+ </attribute>
142
+ <attribute>
143
+ <name>Intended Use Case</name>
144
+ <value>Calibration</value>
145
+ <datatype>string</datatype>
146
+ </attribute>
147
+ <attribute>
148
+ <name>Intended Use Case</name>
149
+ <value>Sensitivity Analysis</value>
150
+ <datatype>string</datatype>
151
+ </attribute>
152
+ <attribute>
153
+ <name>Intended Use Case</name>
154
+ <value>New Construction EE</value>
155
+ <datatype>string</datatype>
156
+ </attribute>
157
+ <attribute>
158
+ <name>Intended Use Case</name>
159
+ <value>Retrofit EE</value>
160
+ <datatype>string</datatype>
161
+ </attribute>
162
+ </attributes>
163
+ <files>
164
+ <file>
165
+ <filename>LICENSE.md</filename>
166
+ <filetype>md</filetype>
167
+ <usage_type>license</usage_type>
168
+ <checksum>E0468DD6</checksum>
169
+ </file>
170
+ <file>
171
+ <filename>README.md.erb</filename>
172
+ <filetype>erb</filetype>
173
+ <usage_type>readmeerb</usage_type>
174
+ <checksum>703C9964</checksum>
175
+ </file>
176
+ <file>
177
+ <filename>README.md</filename>
178
+ <filetype>md</filetype>
179
+ <usage_type>readme</usage_type>
180
+ <checksum>7D40EF5C</checksum>
181
+ </file>
182
+ <file>
183
+ <version>
184
+ <software_program>OpenStudio</software_program>
185
+ <identifier>2.1.0</identifier>
186
+ <min_compatible>2.1.0</min_compatible>
187
+ </version>
188
+ <filename>measure.rb</filename>
189
+ <filetype>rb</filetype>
190
+ <usage_type>script</usage_type>
191
+ <checksum>B8221E83</checksum>
192
+ </file>
193
+ </files>
194
+ </measure>