openstudio-calibration 0.9.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile +1 -1
- data/Jenkinsfile +1 -1
- data/Rakefile +3 -0
- data/lib/measures/AddMonthlyJSONUtilityData/measure.rb +3 -3
- data/lib/measures/AddMonthlyJSONUtilityData/measure.xml +3 -3
- data/lib/measures/AddMonthlyUtilityData/measure.xml +8 -8
- data/lib/measures/CalibrationReports/measure.rb +1 -3
- data/lib/measures/CalibrationReports/measure.xml +4 -4
- data/lib/measures/CalibrationReportsEnhanced/measure.rb +21 -22
- data/lib/measures/CalibrationReportsEnhanced/measure.xml +4 -4
- data/lib/measures/CoilCoolingDXSingleSpeedMultiplier/measure.rb +12 -12
- data/lib/measures/CoilCoolingDXSingleSpeedMultiplier/measure.xml +5 -5
- data/lib/measures/CoilCoolingDXSingleSpeedPercentChange/measure.rb +12 -12
- data/lib/measures/CoilCoolingDXSingleSpeedPercentChange/measure.xml +5 -5
- data/lib/measures/CoilCoolingDXTwoSpeedMultiplier/measure.rb +21 -23
- data/lib/measures/CoilCoolingDXTwoSpeedMultiplier/measure.xml +5 -5
- data/lib/measures/CoilCoolingDXTwoSpeedPercentChange/measure.rb +21 -23
- data/lib/measures/CoilCoolingDXTwoSpeedPercentChange/measure.xml +5 -5
- data/lib/measures/CoilCoolingWaterMultiplier/measure.rb +33 -43
- data/lib/measures/CoilCoolingWaterMultiplier/measure.xml +5 -5
- data/lib/measures/CoilCoolingWaterPercentChange/measure.rb +33 -43
- data/lib/measures/CoilCoolingWaterPercentChange/measure.xml +5 -5
- data/lib/measures/CoilHeatingElectricMultiplier/measure.rb +8 -8
- data/lib/measures/CoilHeatingElectricMultiplier/measure.xml +5 -5
- data/lib/measures/CoilHeatingElectricPercentChange/measure.rb +8 -8
- data/lib/measures/CoilHeatingElectricPercentChange/measure.xml +5 -5
- data/lib/measures/CoilHeatingGasMultiplier/measure.rb +8 -8
- data/lib/measures/CoilHeatingGasMultiplier/measure.xml +5 -5
- data/lib/measures/CoilHeatingGasPercentChange/measure.rb +8 -8
- data/lib/measures/CoilHeatingGasPercentChange/measure.xml +5 -5
- data/lib/measures/CoilHeatingWaterMultiplier/measure.rb +13 -15
- data/lib/measures/CoilHeatingWaterMultiplier/measure.xml +5 -5
- data/lib/measures/CoilHeatingWaterPercentChange/measure.rb +13 -15
- data/lib/measures/CoilHeatingWaterPercentChange/measure.xml +5 -5
- data/lib/measures/ConstructionLayerZeroMaterialProperties/measure.rb +4 -4
- data/lib/measures/ConstructionLayerZeroMaterialProperties/measure.xml +3 -3
- data/lib/measures/ExteriorWallThermalPropertiesMultiplier/measure.rb +8 -5
- data/lib/measures/ExteriorWallThermalPropertiesMultiplier/measure.xml +9 -9
- data/lib/measures/ExteriorWallThermalPropertiesPercentChange/measure.rb +8 -5
- data/lib/measures/ExteriorWallThermalPropertiesPercentChange/measure.xml +9 -9
- data/lib/measures/FansMultiplier/measure.rb +8 -8
- data/lib/measures/FansMultiplier/measure.xml +5 -5
- data/lib/measures/FansPercentChange/measure.rb +8 -8
- data/lib/measures/FansPercentChange/measure.xml +5 -5
- data/lib/measures/GeneralCalibrationMeasureMultiplier/measure.rb +2 -2
- data/lib/measures/GeneralCalibrationMeasureMultiplier/measure.xml +7 -7
- data/lib/measures/GeneralCalibrationMeasurePercentChange/measure.rb +2 -2
- data/lib/measures/GeneralCalibrationMeasurePercentChange/measure.xml +7 -7
- data/lib/measures/HardSizeHvac/measure.rb +2 -4
- data/lib/measures/HardSizeHvac/measure.xml +4 -4
- data/lib/measures/RValueOfInsulationForConstructionMultiplier/measure.rb +7 -9
- data/lib/measures/RValueOfInsulationForConstructionMultiplier/measure.xml +3 -3
- data/lib/measures/RValueOfInsulationForConstructionPercentageChange/measure.rb +7 -9
- data/lib/measures/RValueOfInsulationForConstructionPercentageChange/measure.xml +3 -3
- data/lib/measures/RoofThermalPropertiesMultiplier/measure.rb +8 -5
- data/lib/measures/RoofThermalPropertiesMultiplier/measure.xml +9 -9
- data/lib/measures/RoofThermalPropertiesPercentChange/measure.rb +8 -5
- data/lib/measures/RoofThermalPropertiesPercentChange/measure.xml +9 -9
- data/lib/measures/TimeseriesObjectiveFunction/measure.rb +26 -23
- data/lib/measures/TimeseriesObjectiveFunction/measure.xml +10 -15
- data/lib/measures/TimeseriesObjectiveFunction/resources/report.html.erb +3 -0
- data/lib/measures/TimeseriesPlot/measure.rb +1 -3
- data/lib/measures/TimeseriesPlot/measure.xml +13 -13
- data/lib/measures/TimeseriesPlot/resources/report.html.erb +3 -0
- data/lib/measures/WaterHeaterMixedMultiplier/measure.rb +17 -22
- data/lib/measures/WaterHeaterMixedMultiplier/measure.xml +5 -5
- data/lib/measures/WaterHeaterMixedPercentChange/measure.rb +17 -22
- data/lib/measures/WaterHeaterMixedPercentChange/measure.xml +5 -5
- data/lib/measures/inspect_and_edit_parametric_schedules/measure.rb +13 -11
- data/lib/measures/inspect_and_edit_parametric_schedules/measure.xml +29 -29
- data/lib/measures/shift_hours_of_operation/measure.rb +31 -29
- data/lib/measures/shift_hours_of_operation/measure.xml +51 -37
- data/lib/openstudio/calibration/version.rb +1 -1
- data/openstudio-calibration.gemspec +13 -6
- metadata +69 -13
@@ -58,6 +58,7 @@ class CoilHeatingGasPercentChange < OpenStudio::Measure::ModelMeasure
|
|
58
58
|
components = value.supplyComponents
|
59
59
|
components.each do |component|
|
60
60
|
next if component.to_CoilHeatingGas.empty?
|
61
|
+
|
61
62
|
show_loop = true
|
62
63
|
loop_handles << component.handle.to_s
|
63
64
|
loop_display_names << component.name.to_s
|
@@ -180,13 +181,11 @@ class CoilHeatingGasPercentChange < OpenStudio::Measure::ModelMeasure
|
|
180
181
|
coils.each do |coil|
|
181
182
|
altered_coil = false
|
182
183
|
# coil_capacity_perc_change
|
183
|
-
if coil_capacity_perc_change != 0.0
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
altered_coil = true
|
189
|
-
end
|
184
|
+
if coil_capacity_perc_change != 0.0 && coil.nominalCapacity.is_initialized
|
185
|
+
runner.registerInfo("Applying nominalCapacity #{coil_capacity_perc_change} Percent Change to #{coil.name.get}.")
|
186
|
+
coil.setNominalCapacity(coil.nominalCapacity.get + coil.nominalCapacity.get * coil_capacity_perc_change * 0.01)
|
187
|
+
altered_capacity << coil.handle.to_s
|
188
|
+
altered_coil = true
|
190
189
|
end
|
191
190
|
|
192
191
|
# modify coil_efficiency_perc_change
|
@@ -219,10 +218,11 @@ class CoilHeatingGasPercentChange < OpenStudio::Measure::ModelMeasure
|
|
219
218
|
end
|
220
219
|
|
221
220
|
next unless altered_coil
|
221
|
+
|
222
222
|
altered_coils << coil.handle.to_s
|
223
223
|
change_name(coil, coil_parasitic_gas_perc_change, coil_efficiency_perc_change, coil_parasitic_electric_perc_change, coil_capacity_perc_change)
|
224
224
|
runner.registerInfo("coil name changed to: #{coil.name.get}")
|
225
|
-
end
|
225
|
+
end
|
226
226
|
|
227
227
|
# na if nothing in model to look at
|
228
228
|
if altered_coils.empty?
|
@@ -3,8 +3,8 @@
|
|
3
3
|
<schema_version>3.0</schema_version>
|
4
4
|
<name>coil_heating_gas_percent_change</name>
|
5
5
|
<uid>8589af79-cfe7-45fb-9c79-e7b95e5fb02f</uid>
|
6
|
-
<version_id>
|
7
|
-
<version_modified>
|
6
|
+
<version_id>2d3164ef-dac5-48a6-ac7e-64a6e54e1ab2</version_id>
|
7
|
+
<version_modified>20240428T231345Z</version_modified>
|
8
8
|
<xml_checksum>1F3D2430</xml_checksum>
|
9
9
|
<class_name>CoilHeatingGasPercentChange</class_name>
|
10
10
|
<display_name>Heating Coils Gas Percent Change</display_name>
|
@@ -17,10 +17,10 @@
|
|
17
17
|
<type>Choice</type>
|
18
18
|
<required>true</required>
|
19
19
|
<model_dependent>false</model_dependent>
|
20
|
-
<default_value>{
|
20
|
+
<default_value>{7a7f95eb-f729-4e94-b6b2-b88ba068f2e0}</default_value>
|
21
21
|
<choices>
|
22
22
|
<choice>
|
23
|
-
<value>{
|
23
|
+
<value>{7a7f95eb-f729-4e94-b6b2-b88ba068f2e0}</value>
|
24
24
|
<display_name>*All Gas Heating Coils*</display_name>
|
25
25
|
</choice>
|
26
26
|
<choice>
|
@@ -106,7 +106,7 @@
|
|
106
106
|
<filename>measure.rb</filename>
|
107
107
|
<filetype>rb</filetype>
|
108
108
|
<usage_type>script</usage_type>
|
109
|
-
<checksum>
|
109
|
+
<checksum>2E389481</checksum>
|
110
110
|
</file>
|
111
111
|
</files>
|
112
112
|
</measure>
|
@@ -57,6 +57,7 @@ class CoilHeatingWaterMultiplier < OpenStudio::Measure::ModelMeasure
|
|
57
57
|
components = value.supplyComponents
|
58
58
|
components.each do |component|
|
59
59
|
next if component.to_CoilHeatingWater.empty?
|
60
|
+
|
60
61
|
show_loop = true
|
61
62
|
loop_handles << component.handle.to_s
|
62
63
|
loop_display_names << component.name.to_s
|
@@ -163,30 +164,27 @@ class CoilHeatingWaterMultiplier < OpenStudio::Measure::ModelMeasure
|
|
163
164
|
coils.each do |coil|
|
164
165
|
altered_coil = false
|
165
166
|
# coil_capacity_multiplier
|
166
|
-
if coil_capacity_multiplier != 1.0
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
altered_coil = true
|
172
|
-
end
|
167
|
+
if coil_capacity_multiplier != 1.0 && coil.ratedCapacity.is_initialized
|
168
|
+
runner.registerInfo("Applying ratedCapacity #{coil_capacity_multiplier}x multiplier to #{coil.name.get}.")
|
169
|
+
coil.setRatedCapacity(coil.ratedCapacity.get * coil_capacity_multiplier)
|
170
|
+
altered_capacity << coil.handle.to_s
|
171
|
+
altered_coil = true
|
173
172
|
end
|
174
173
|
|
175
174
|
# modify ua_factor
|
176
|
-
if ua_factor != 1.0
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
altered_coil = true
|
182
|
-
end
|
175
|
+
if ua_factor != 1.0 && coil.uFactorTimesAreaValue.is_initialized
|
176
|
+
runner.registerInfo("Applying uFactorTimesAreaValue #{ua_factor}x multiplier to #{coil.name.get}.")
|
177
|
+
coil.setUFactorTimesAreaValue(coil.uFactorTimesAreaValue.get * ua_factor)
|
178
|
+
altered_coilefficiency << coil.handle.to_s
|
179
|
+
altered_coil = true
|
183
180
|
end
|
184
181
|
|
185
182
|
next unless altered_coil
|
183
|
+
|
186
184
|
altered_coils << coil.handle.to_s
|
187
185
|
change_name(coil, ua_factor, coil_capacity_multiplier)
|
188
186
|
runner.registerInfo("coil name changed to: #{coil.name.get}")
|
189
|
-
end
|
187
|
+
end
|
190
188
|
|
191
189
|
# na if nothing in model to look at
|
192
190
|
if altered_coils.empty?
|
@@ -3,8 +3,8 @@
|
|
3
3
|
<schema_version>3.0</schema_version>
|
4
4
|
<name>coil_heating_water_multiplier</name>
|
5
5
|
<uid>48c50a83-4092-4f2b-9968-8c820759f321</uid>
|
6
|
-
<version_id>
|
7
|
-
<version_modified>
|
6
|
+
<version_id>602ecd8c-6385-41ce-b67c-823a6be2a13c</version_id>
|
7
|
+
<version_modified>20240428T231345Z</version_modified>
|
8
8
|
<xml_checksum>1F3D2430</xml_checksum>
|
9
9
|
<class_name>CoilHeatingWaterMultiplier</class_name>
|
10
10
|
<display_name>Heating Coils Water Multiplier</display_name>
|
@@ -17,10 +17,10 @@
|
|
17
17
|
<type>Choice</type>
|
18
18
|
<required>true</required>
|
19
19
|
<model_dependent>false</model_dependent>
|
20
|
-
<default_value>{
|
20
|
+
<default_value>{bc82c988-32c1-407e-912d-90c1dfca838a}</default_value>
|
21
21
|
<choices>
|
22
22
|
<choice>
|
23
|
-
<value>{
|
23
|
+
<value>{bc82c988-32c1-407e-912d-90c1dfca838a}</value>
|
24
24
|
<display_name>*All Water Heating Coils*</display_name>
|
25
25
|
</choice>
|
26
26
|
<choice>
|
@@ -88,7 +88,7 @@
|
|
88
88
|
<filename>measure.rb</filename>
|
89
89
|
<filetype>rb</filetype>
|
90
90
|
<usage_type>script</usage_type>
|
91
|
-
<checksum>
|
91
|
+
<checksum>3343F97A</checksum>
|
92
92
|
</file>
|
93
93
|
</files>
|
94
94
|
</measure>
|
@@ -50,6 +50,7 @@ class CoilHeatingWaterPercentChange < OpenStudio::Measure::ModelMeasure
|
|
50
50
|
components = value.supplyComponents
|
51
51
|
components.each do |component|
|
52
52
|
next if component.to_CoilHeatingWater.empty?
|
53
|
+
|
53
54
|
show_loop = true
|
54
55
|
loop_handles << component.handle.to_s
|
55
56
|
loop_display_names << component.name.to_s
|
@@ -154,30 +155,27 @@ class CoilHeatingWaterPercentChange < OpenStudio::Measure::ModelMeasure
|
|
154
155
|
coils.each do |coil|
|
155
156
|
altered_coil = false
|
156
157
|
# coil_capacity_perc_change
|
157
|
-
if coil_capacity_perc_change != 0.0
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
altered_coil = true
|
163
|
-
end
|
158
|
+
if coil_capacity_perc_change != 0.0 && coil.ratedCapacity.is_initialized
|
159
|
+
runner.registerInfo("Applying ratedCapacity #{coil_capacity_perc_change} Percent Change to #{coil.name.get}.")
|
160
|
+
coil.setRatedCapacity(coil.ratedCapacity.get + coil.ratedCapacity.get * coil_capacity_perc_change * 0.01)
|
161
|
+
altered_capacity << coil.handle.to_s
|
162
|
+
altered_coil = true
|
164
163
|
end
|
165
164
|
|
166
165
|
# modify ua_factor
|
167
|
-
if ua_factor != 0.0
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
altered_coil = true
|
173
|
-
end
|
166
|
+
if ua_factor != 0.0 && coil.uFactorTimesAreaValue.is_initialized
|
167
|
+
runner.registerInfo("Applying uFactorTimesAreaValue #{ua_factor} Percent Change to #{coil.name.get}.")
|
168
|
+
coil.setUFactorTimesAreaValue(coil.uFactorTimesAreaValue.get + coil.uFactorTimesAreaValue.get * ua_factor * 0.01)
|
169
|
+
altered_coilefficiency << coil.handle.to_s
|
170
|
+
altered_coil = true
|
174
171
|
end
|
175
172
|
|
176
173
|
next unless altered_coil
|
174
|
+
|
177
175
|
altered_coils << coil.handle.to_s
|
178
176
|
change_name(coil, ua_factor, coil_capacity_perc_change)
|
179
177
|
runner.registerInfo("coil name changed to: #{coil.name.get}")
|
180
|
-
end
|
178
|
+
end
|
181
179
|
|
182
180
|
# na if nothing in model to look at
|
183
181
|
if altered_coils.empty?
|
@@ -3,8 +3,8 @@
|
|
3
3
|
<schema_version>3.0</schema_version>
|
4
4
|
<name>coil_heating_water_percent_change</name>
|
5
5
|
<uid>85674ff6-4fdc-463f-9695-36bf6c6a2608</uid>
|
6
|
-
<version_id>
|
7
|
-
<version_modified>
|
6
|
+
<version_id>a71ee86a-c7c4-45bb-adea-d896d4bfe83b</version_id>
|
7
|
+
<version_modified>20240428T231345Z</version_modified>
|
8
8
|
<xml_checksum>1F3D2430</xml_checksum>
|
9
9
|
<class_name>CoilHeatingWaterPercentChange</class_name>
|
10
10
|
<display_name>Heating Coils Water Percent Change</display_name>
|
@@ -17,10 +17,10 @@
|
|
17
17
|
<type>Choice</type>
|
18
18
|
<required>true</required>
|
19
19
|
<model_dependent>false</model_dependent>
|
20
|
-
<default_value>{
|
20
|
+
<default_value>{1d183cf3-6a81-43a8-af94-c3b67971c32c}</default_value>
|
21
21
|
<choices>
|
22
22
|
<choice>
|
23
|
-
<value>{
|
23
|
+
<value>{1d183cf3-6a81-43a8-af94-c3b67971c32c}</value>
|
24
24
|
<display_name>*All Water Heating Coils*</display_name>
|
25
25
|
</choice>
|
26
26
|
<choice>
|
@@ -88,7 +88,7 @@
|
|
88
88
|
<filename>measure.rb</filename>
|
89
89
|
<filetype>rb</filetype>
|
90
90
|
<usage_type>script</usage_type>
|
91
|
-
<checksum>
|
91
|
+
<checksum>4B3483F9</checksum>
|
92
92
|
</file>
|
93
93
|
</files>
|
94
94
|
</measure>
|
@@ -106,7 +106,7 @@ class ConstructionLayerZeroMaterialProperties < OpenStudio::Measure::ModelMeasur
|
|
106
106
|
args << specific_heat
|
107
107
|
|
108
108
|
args
|
109
|
-
end
|
109
|
+
end
|
110
110
|
|
111
111
|
# define what happens when the measure is run
|
112
112
|
def run(model, runner, user_arguments)
|
@@ -143,7 +143,7 @@ class ConstructionLayerZeroMaterialProperties < OpenStudio::Measure::ModelMeasur
|
|
143
143
|
runner.registerError('Script Error - argument not showing up as construction.')
|
144
144
|
return false
|
145
145
|
end
|
146
|
-
end
|
146
|
+
end
|
147
147
|
|
148
148
|
initial_r_value_ip = OpenStudio.convert(1.0 / construction.thermalConductance.to_f, 'm^2*K/W', 'ft^2*h*R/Btu')
|
149
149
|
runner.registerInitialCondition("The Initial R-value of #{construction.name} is #{initial_r_value_ip} (ft^2*h*R/Btu).")
|
@@ -184,8 +184,8 @@ class ConstructionLayerZeroMaterialProperties < OpenStudio::Measure::ModelMeasur
|
|
184
184
|
runner.registerValue('final_r_value_ip', final_r_value_ip.to_f, 'ft^2*h*R/Btu')
|
185
185
|
|
186
186
|
true
|
187
|
-
end
|
188
|
-
end
|
187
|
+
end
|
188
|
+
end
|
189
189
|
|
190
190
|
# this allows the measure to be used by the application
|
191
191
|
ConstructionLayerZeroMaterialProperties.new.registerWithApplication
|
@@ -3,8 +3,8 @@
|
|
3
3
|
<schema_version>3.0</schema_version>
|
4
4
|
<name>construction_layer_zero_material_properties</name>
|
5
5
|
<uid>3c7a6751-bb54-4600-9410-8f042e1a413b</uid>
|
6
|
-
<version_id>
|
7
|
-
<version_modified>
|
6
|
+
<version_id>897e934d-1780-4fa7-8db2-ec27fd857ea0</version_id>
|
7
|
+
<version_modified>20240428T231344Z</version_modified>
|
8
8
|
<xml_checksum>0BF71A3E</xml_checksum>
|
9
9
|
<class_name>ConstructionLayerZeroMaterialProperties</class_name>
|
10
10
|
<display_name>Change Parameters Of Material (Layer 0 of Construction)</display_name>
|
@@ -189,7 +189,7 @@
|
|
189
189
|
<filename>measure.rb</filename>
|
190
190
|
<filetype>rb</filetype>
|
191
191
|
<usage_type>script</usage_type>
|
192
|
-
<checksum>
|
192
|
+
<checksum>29E8078F</checksum>
|
193
193
|
</file>
|
194
194
|
</files>
|
195
195
|
</measure>
|
@@ -21,7 +21,8 @@ class ExteriorWallThermalPropertiesMultiplier < OpenStudio::Measure::ModelMeasur
|
|
21
21
|
end
|
22
22
|
|
23
23
|
# short def to make numbers pretty (converts 4125001.25641 to 4,125,001.26 or 4,125,001). The definition be called through this measure
|
24
|
-
|
24
|
+
# round to 0 or 2)
|
25
|
+
def neat_numbers(number, roundto = 2)
|
25
26
|
number = if roundto == 2
|
26
27
|
format '%.2f', number
|
27
28
|
else
|
@@ -29,7 +30,7 @@ class ExteriorWallThermalPropertiesMultiplier < OpenStudio::Measure::ModelMeasur
|
|
29
30
|
end
|
30
31
|
# regex to add commas
|
31
32
|
number.to_s.reverse.gsub(/([0-9]{3}(?=([0-9])))/, '\\1,').reverse
|
32
|
-
end
|
33
|
+
end
|
33
34
|
|
34
35
|
# helper to make it easier to do unit conversions on the fly
|
35
36
|
def unit_helper(number, from_unit_string, to_unit_string)
|
@@ -64,7 +65,7 @@ class ExteriorWallThermalPropertiesMultiplier < OpenStudio::Measure::ModelMeasur
|
|
64
65
|
args << thermal_mass_mult
|
65
66
|
|
66
67
|
args
|
67
|
-
end
|
68
|
+
end
|
68
69
|
|
69
70
|
# define what happens when the measure is run
|
70
71
|
def run(model, runner, user_arguments)
|
@@ -89,6 +90,7 @@ class ExteriorWallThermalPropertiesMultiplier < OpenStudio::Measure::ModelMeasur
|
|
89
90
|
exterior_surface_constructions = []
|
90
91
|
surfaces.each do |surface|
|
91
92
|
next unless surface.outsideBoundaryCondition == 'Outdoors' && surface.surfaceType == 'Wall'
|
93
|
+
|
92
94
|
exterior_surfaces << surface
|
93
95
|
exterior_surface_const = surface.construction.get
|
94
96
|
# only add construction if it hasn't been added yet
|
@@ -155,6 +157,7 @@ class ExteriorWallThermalPropertiesMultiplier < OpenStudio::Measure::ModelMeasur
|
|
155
157
|
end
|
156
158
|
initial_sol_abs.each_index do |index1|
|
157
159
|
next unless initial_sol_abs[index1]
|
160
|
+
|
158
161
|
desired_sol_abs[index1] = initial_sol_abs[index1] * solar_abs_mult
|
159
162
|
if desired_sol_abs[index1] > 1
|
160
163
|
desired_sol_abs[index1] = 1
|
@@ -226,8 +229,8 @@ class ExteriorWallThermalPropertiesMultiplier < OpenStudio::Measure::ModelMeasur
|
|
226
229
|
runner.registerFinalCondition("Applied R #{r_value_mult.round(1)}x Solar #{solar_abs_mult.round(1)}x Therm #{thermal_mass_mult.round(1)}x change")
|
227
230
|
|
228
231
|
true
|
229
|
-
end
|
230
|
-
end
|
232
|
+
end
|
233
|
+
end
|
231
234
|
|
232
235
|
# this allows the measure to be used by the application
|
233
236
|
ExteriorWallThermalPropertiesMultiplier.new.registerWithApplication
|
@@ -3,8 +3,8 @@
|
|
3
3
|
<schema_version>3.0</schema_version>
|
4
4
|
<name>exterior_wall_thermal_properties_multiplier</name>
|
5
5
|
<uid>6ab39cf2-1f9e-4570-a797-360a814aaa74</uid>
|
6
|
-
<version_id>
|
7
|
-
<version_modified>
|
6
|
+
<version_id>684ac24d-dc00-4718-95a6-f0b4de85366c</version_id>
|
7
|
+
<version_modified>20240428T231344Z</version_modified>
|
8
8
|
<xml_checksum>EB1A0C08</xml_checksum>
|
9
9
|
<class_name>ExteriorWallThermalPropertiesMultiplier</class_name>
|
10
10
|
<display_name>Exterior Wall Thermal Properties Multiplier</display_name>
|
@@ -88,6 +88,12 @@
|
|
88
88
|
<usage_type>license</usage_type>
|
89
89
|
<checksum>BFFB1AA6</checksum>
|
90
90
|
</file>
|
91
|
+
<file>
|
92
|
+
<filename>ExteriorWallThermalPropertiesMultiplier_test.rb</filename>
|
93
|
+
<filetype>rb</filetype>
|
94
|
+
<usage_type>test</usage_type>
|
95
|
+
<checksum>593F94D8</checksum>
|
96
|
+
</file>
|
91
97
|
<file>
|
92
98
|
<version>
|
93
99
|
<software_program>OpenStudio</software_program>
|
@@ -97,13 +103,7 @@
|
|
97
103
|
<filename>measure.rb</filename>
|
98
104
|
<filetype>rb</filetype>
|
99
105
|
<usage_type>script</usage_type>
|
100
|
-
<checksum>
|
101
|
-
</file>
|
102
|
-
<file>
|
103
|
-
<filename>ExteriorWallThermalPropertiesMultiplier_test.rb</filename>
|
104
|
-
<filetype>rb</filetype>
|
105
|
-
<usage_type>test</usage_type>
|
106
|
-
<checksum>593F94D8</checksum>
|
106
|
+
<checksum>9267EE80</checksum>
|
107
107
|
</file>
|
108
108
|
</files>
|
109
109
|
</measure>
|
@@ -21,7 +21,8 @@ class ExteriorWallThermalPropertiesPercentChange < OpenStudio::Measure::ModelMea
|
|
21
21
|
end
|
22
22
|
|
23
23
|
# short def to make numbers pretty (converts 4125001.25641 to 4,125,001.26 or 4,125,001). The definition be called through this measure
|
24
|
-
|
24
|
+
# round to 0 or 2)
|
25
|
+
def neat_numbers(number, roundto = 2)
|
25
26
|
number = if roundto == 2
|
26
27
|
format '%.2f', number
|
27
28
|
else
|
@@ -29,7 +30,7 @@ class ExteriorWallThermalPropertiesPercentChange < OpenStudio::Measure::ModelMea
|
|
29
30
|
end
|
30
31
|
# regex to add commas
|
31
32
|
number.to_s.reverse.gsub(/([0-9]{3}(?=([0-9])))/, '\\1,').reverse
|
32
|
-
end
|
33
|
+
end
|
33
34
|
|
34
35
|
# helper to make it easier to do unit conversions on the fly
|
35
36
|
def unit_helper(number, from_unit_string, to_unit_string)
|
@@ -57,7 +58,7 @@ class ExteriorWallThermalPropertiesPercentChange < OpenStudio::Measure::ModelMea
|
|
57
58
|
args << thermal_mass_perc_change
|
58
59
|
|
59
60
|
args
|
60
|
-
end
|
61
|
+
end
|
61
62
|
|
62
63
|
# define what happens when the measure is run
|
63
64
|
def run(model, runner, user_arguments)
|
@@ -79,6 +80,7 @@ class ExteriorWallThermalPropertiesPercentChange < OpenStudio::Measure::ModelMea
|
|
79
80
|
exterior_surface_constructions = []
|
80
81
|
surfaces.each do |surface|
|
81
82
|
next unless surface.outsideBoundaryCondition == 'Outdoors' && surface.surfaceType == 'Wall'
|
83
|
+
|
82
84
|
exterior_surfaces << surface
|
83
85
|
exterior_surface_const = surface.construction.get
|
84
86
|
# only add construction if it hasn't been added yet
|
@@ -145,6 +147,7 @@ class ExteriorWallThermalPropertiesPercentChange < OpenStudio::Measure::ModelMea
|
|
145
147
|
end
|
146
148
|
initial_sol_abs.each_index do |index1|
|
147
149
|
next unless initial_sol_abs[index1]
|
150
|
+
|
148
151
|
desired_sol_abs[index1] = initial_sol_abs[index1] + initial_sol_abs[index1] * solar_abs_perc_change * 0.01
|
149
152
|
if desired_sol_abs[index1] > 1
|
150
153
|
desired_sol_abs[index1] = 1
|
@@ -216,8 +219,8 @@ class ExteriorWallThermalPropertiesPercentChange < OpenStudio::Measure::ModelMea
|
|
216
219
|
runner.registerFinalCondition("Applied R #{r_value_perc_change.round(1)} Solar #{solar_abs_perc_change.round(1)} Therm #{thermal_mass_perc_change.round(1)} Percent change")
|
217
220
|
|
218
221
|
true
|
219
|
-
end
|
220
|
-
end
|
222
|
+
end
|
223
|
+
end
|
221
224
|
|
222
225
|
# this allows the measure to be used by the application
|
223
226
|
ExteriorWallThermalPropertiesPercentChange.new.registerWithApplication
|
@@ -3,8 +3,8 @@
|
|
3
3
|
<schema_version>3.0</schema_version>
|
4
4
|
<name>exterior_wall_thermal_properties_percent_change</name>
|
5
5
|
<uid>6ab39cf2-1f9e-4570-a797-360a814aaa64</uid>
|
6
|
-
<version_id>
|
7
|
-
<version_modified>
|
6
|
+
<version_id>53318158-d762-4c16-bbc4-3e84fb7179f9</version_id>
|
7
|
+
<version_modified>20240428T231344Z</version_modified>
|
8
8
|
<xml_checksum>EB1A0C08</xml_checksum>
|
9
9
|
<class_name>ExteriorWallThermalPropertiesPercentChange</class_name>
|
10
10
|
<display_name>Exterior Wall Thermal Percent Change</display_name>
|
@@ -88,6 +88,12 @@
|
|
88
88
|
<usage_type>license</usage_type>
|
89
89
|
<checksum>BFFB1AA6</checksum>
|
90
90
|
</file>
|
91
|
+
<file>
|
92
|
+
<filename>ExteriorWallThermalPropertiesMultiplier_test.rb</filename>
|
93
|
+
<filetype>rb</filetype>
|
94
|
+
<usage_type>test</usage_type>
|
95
|
+
<checksum>5AA3C07C</checksum>
|
96
|
+
</file>
|
91
97
|
<file>
|
92
98
|
<version>
|
93
99
|
<software_program>OpenStudio</software_program>
|
@@ -97,13 +103,7 @@
|
|
97
103
|
<filename>measure.rb</filename>
|
98
104
|
<filetype>rb</filetype>
|
99
105
|
<usage_type>script</usage_type>
|
100
|
-
<checksum>
|
101
|
-
</file>
|
102
|
-
<file>
|
103
|
-
<filename>ExteriorWallThermalPropertiesMultiplier_test.rb</filename>
|
104
|
-
<filetype>rb</filetype>
|
105
|
-
<usage_type>test</usage_type>
|
106
|
-
<checksum>5AA3C07C</checksum>
|
106
|
+
<checksum>DC101DDE</checksum>
|
107
107
|
</file>
|
108
108
|
</files>
|
109
109
|
</measure>
|
@@ -75,6 +75,7 @@ class FansMultiplier < OpenStudio::Measure::ModelMeasure
|
|
75
75
|
loop_display_names << component.name.to_s
|
76
76
|
end
|
77
77
|
next if component.to_FanOnOff.empty?
|
78
|
+
|
78
79
|
show_loop = true
|
79
80
|
loop_handles << component.handle.to_s
|
80
81
|
loop_display_names << component.name.to_s
|
@@ -211,13 +212,11 @@ class FansMultiplier < OpenStudio::Measure::ModelMeasure
|
|
211
212
|
fans.each do |fan|
|
212
213
|
altered_fan = false
|
213
214
|
# modify max flowrate
|
214
|
-
if max_flowrate_multiplier != 1.0
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
altered_fan = true
|
220
|
-
end
|
215
|
+
if max_flowrate_multiplier != 1.0 && fan.maximumFlowRate.is_initialized
|
216
|
+
runner.registerInfo("Applying #{max_flowrate_multiplier}x multiplier to #{fan.name.get}.")
|
217
|
+
fan.setMaximumFlowRate(fan.maximumFlowRate * max_flowrate_multiplier)
|
218
|
+
altered_maxflow << fan.handle.to_s
|
219
|
+
altered_fan = true
|
221
220
|
end
|
222
221
|
|
223
222
|
# modify fan_efficiency_multiplier
|
@@ -245,10 +244,11 @@ class FansMultiplier < OpenStudio::Measure::ModelMeasure
|
|
245
244
|
end
|
246
245
|
|
247
246
|
next unless altered_fan
|
247
|
+
|
248
248
|
altered_fans << fan.handle.to_s
|
249
249
|
change_name(fan, max_flowrate_multiplier, fan_efficiency_multiplier, pressure_rise_multiplier, motor_efficiency_multiplier)
|
250
250
|
runner.registerInfo("Fan name changed to: #{fan.name.get}")
|
251
|
-
end
|
251
|
+
end
|
252
252
|
|
253
253
|
# na if nothing in model to look at
|
254
254
|
if altered_fans.empty?
|
@@ -3,8 +3,8 @@
|
|
3
3
|
<schema_version>3.0</schema_version>
|
4
4
|
<name>fans_multiplier</name>
|
5
5
|
<uid>af156383-cfe2-4798-b581-08a4cccb8877</uid>
|
6
|
-
<version_id>
|
7
|
-
<version_modified>
|
6
|
+
<version_id>5a102688-08bb-40fc-8553-3e098a2937d6</version_id>
|
7
|
+
<version_modified>20240428T231344Z</version_modified>
|
8
8
|
<xml_checksum>3C1DA54F</xml_checksum>
|
9
9
|
<class_name>FansMultiplier</class_name>
|
10
10
|
<display_name>Fans Multiplier</display_name>
|
@@ -17,10 +17,10 @@
|
|
17
17
|
<type>Choice</type>
|
18
18
|
<required>true</required>
|
19
19
|
<model_dependent>false</model_dependent>
|
20
|
-
<default_value>{
|
20
|
+
<default_value>{465ccf73-8c04-4fcd-89db-33e6f8748056}</default_value>
|
21
21
|
<choices>
|
22
22
|
<choice>
|
23
|
-
<value>{
|
23
|
+
<value>{465ccf73-8c04-4fcd-89db-33e6f8748056}</value>
|
24
24
|
<display_name>*All Fans*</display_name>
|
25
25
|
</choice>
|
26
26
|
<choice>
|
@@ -162,7 +162,7 @@
|
|
162
162
|
<filename>measure.rb</filename>
|
163
163
|
<filetype>rb</filetype>
|
164
164
|
<usage_type>script</usage_type>
|
165
|
-
<checksum>
|
165
|
+
<checksum>58640E33</checksum>
|
166
166
|
</file>
|
167
167
|
</files>
|
168
168
|
</measure>
|
@@ -68,6 +68,7 @@ class FansPercentChange < OpenStudio::Measure::ModelMeasure
|
|
68
68
|
loop_display_names << component.name.to_s
|
69
69
|
end
|
70
70
|
next if component.to_FanOnOff.empty?
|
71
|
+
|
71
72
|
show_loop = true
|
72
73
|
loop_handles << component.handle.to_s
|
73
74
|
loop_display_names << component.name.to_s
|
@@ -200,13 +201,11 @@ class FansPercentChange < OpenStudio::Measure::ModelMeasure
|
|
200
201
|
fans.each do |fan|
|
201
202
|
altered_fan = false
|
202
203
|
# modify max flowrate
|
203
|
-
if max_flowrate_perc_change != 0.0
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
altered_fan = true
|
209
|
-
end
|
204
|
+
if max_flowrate_perc_change != 0.0 && fan.maximumFlowRate.is_initialized
|
205
|
+
runner.registerInfo("Applying #{max_flowrate_perc_change} Percent Change to #{fan.name.get}.")
|
206
|
+
fan.setMaximumFlowRate(fan.maximumFlowRate + fan.maximumFlowRate * max_flowrate_perc_change * 0.01)
|
207
|
+
altered_maxflow << fan.handle.to_s
|
208
|
+
altered_fan = true
|
210
209
|
end
|
211
210
|
|
212
211
|
# modify fan_efficiency_perc_change
|
@@ -234,10 +233,11 @@ class FansPercentChange < OpenStudio::Measure::ModelMeasure
|
|
234
233
|
end
|
235
234
|
|
236
235
|
next unless altered_fan
|
236
|
+
|
237
237
|
altered_fans << fan.handle.to_s
|
238
238
|
change_name(fan, max_flowrate_perc_change, fan_efficiency_perc_change, pressure_rise_perc_change, motor_efficiency_perc_change)
|
239
239
|
runner.registerInfo("Fan name changed to: #{fan.name.get}")
|
240
|
-
end
|
240
|
+
end
|
241
241
|
|
242
242
|
# na if nothing in model to look at
|
243
243
|
if altered_fans.empty?
|
@@ -3,8 +3,8 @@
|
|
3
3
|
<schema_version>3.0</schema_version>
|
4
4
|
<name>fans_percent_change</name>
|
5
5
|
<uid>4c13a935-976b-4d54-bf7f-a4064fb6e11d</uid>
|
6
|
-
<version_id>
|
7
|
-
<version_modified>
|
6
|
+
<version_id>2929a54f-a286-455e-86a9-dbb09d274c8c</version_id>
|
7
|
+
<version_modified>20240428T231345Z</version_modified>
|
8
8
|
<xml_checksum>3C1DA54F</xml_checksum>
|
9
9
|
<class_name>FansPercentChange</class_name>
|
10
10
|
<display_name>Fans Percent Change</display_name>
|
@@ -17,10 +17,10 @@
|
|
17
17
|
<type>Choice</type>
|
18
18
|
<required>true</required>
|
19
19
|
<model_dependent>false</model_dependent>
|
20
|
-
<default_value>{
|
20
|
+
<default_value>{4bd31cd1-3d84-4d87-9ef0-1bee2b72e933}</default_value>
|
21
21
|
<choices>
|
22
22
|
<choice>
|
23
|
-
<value>{
|
23
|
+
<value>{4bd31cd1-3d84-4d87-9ef0-1bee2b72e933}</value>
|
24
24
|
<display_name>*All Fans*</display_name>
|
25
25
|
</choice>
|
26
26
|
<choice>
|
@@ -162,7 +162,7 @@
|
|
162
162
|
<filename>measure.rb</filename>
|
163
163
|
<filetype>rb</filetype>
|
164
164
|
<usage_type>script</usage_type>
|
165
|
-
<checksum>
|
165
|
+
<checksum>EC0A96E0</checksum>
|
166
166
|
</file>
|
167
167
|
</files>
|
168
168
|
</measure>
|
@@ -414,7 +414,7 @@ class GeneralCalibrationMeasureMultiplier < OpenStudio::Measure::ModelMeasure
|
|
414
414
|
runner.registerInfo("Skipping change to #{internalmass.name.get}")
|
415
415
|
end
|
416
416
|
end
|
417
|
-
end
|
417
|
+
end
|
418
418
|
|
419
419
|
runner.registerInfo("altered_lights_objects: #{altered_lights_objects}")
|
420
420
|
runner.registerInfo("altered_luminaires_objects: #{altered_luminaires_objects}")
|
@@ -580,7 +580,7 @@ class GeneralCalibrationMeasureMultiplier < OpenStudio::Measure::ModelMeasure
|
|
580
580
|
runner.registerInfo("Skipping change to #{internalmass.name.get}")
|
581
581
|
end
|
582
582
|
end
|
583
|
-
end
|
583
|
+
end
|
584
584
|
|
585
585
|
runner.registerInfo("altered_lights_objects: #{altered_lights_objects}")
|
586
586
|
runner.registerInfo("altered_luminaires_objects: #{altered_luminaires_objects}")
|