openstudio-ee 0.12.0 → 0.12.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.coverage +0 -0
- data/.github/workflows/test-with-openstudio.yml +109 -74
- data/.gitignore +21 -0
- data/.rubocop.yml +15 -2
- data/CHANGELOG.md +12 -0
- data/Gemfile +7 -8
- data/README.md +5 -1
- data/WORKFLOW_CHANGES.md +74 -0
- data/doc_templates/LICENSE.md +1 -1
- data/lib/measures/AddDaylightSensors/measure.rb +79 -79
- data/lib/measures/AddDaylightSensors/measure.xml +5 -5
- data/lib/measures/AddOverhangsByProjectionFactor/measure.rb +38 -41
- data/lib/measures/AddOverhangsByProjectionFactor/measure.xml +5 -5
- data/lib/measures/EnableDemandControlledVentilation/measure.rb +37 -40
- data/lib/measures/EnableDemandControlledVentilation/measure.xml +5 -5
- data/lib/measures/EnableEconomizerControl/measure.rb +36 -37
- data/lib/measures/EnableEconomizerControl/measure.xml +5 -5
- data/lib/measures/GLHEProExportLoadsforGroundHeatExchangerSizing/measure.rb +27 -41
- data/lib/measures/GLHEProExportLoadsforGroundHeatExchangerSizing/measure.xml +5 -5
- data/lib/measures/GLHEProGFunctionImport/measure.rb +11 -15
- data/lib/measures/GLHEProGFunctionImport/measure.xml +5 -5
- data/lib/measures/GLHEProSetupExportLoadsforGroundHeatExchangerSizing/measure.rb +5 -9
- data/lib/measures/GLHEProSetupExportLoadsforGroundHeatExchangerSizing/measure.xml +4 -4
- data/lib/measures/ImproveFanBeltEfficiency/measure.rb +78 -95
- data/lib/measures/ImproveFanBeltEfficiency/measure.xml +7 -7
- data/lib/measures/ImproveMotorEfficiency/measure.rb +75 -100
- data/lib/measures/ImproveMotorEfficiency/measure.xml +7 -7
- data/lib/measures/IncreaseInsulationRValueForExteriorWalls/measure.rb +137 -130
- data/lib/measures/IncreaseInsulationRValueForExteriorWalls/measure.xml +5 -5
- data/lib/measures/IncreaseInsulationRValueForExteriorWallsByPercentage/measure.rb +114 -115
- data/lib/measures/IncreaseInsulationRValueForExteriorWallsByPercentage/measure.xml +4 -4
- data/lib/measures/IncreaseInsulationRValueForRoofs/measure.rb +137 -130
- data/lib/measures/IncreaseInsulationRValueForRoofs/measure.xml +5 -5
- data/lib/measures/IncreaseInsulationRValueForRoofsByPercentage/measure.rb +114 -115
- data/lib/measures/IncreaseInsulationRValueForRoofsByPercentage/measure.xml +4 -4
- data/lib/measures/ReduceElectricEquipmentLoadsByPercentage/measure.rb +69 -63
- data/lib/measures/ReduceElectricEquipmentLoadsByPercentage/measure.xml +7 -7
- data/lib/measures/ReduceLightingLoadsByPercentage/measure.rb +77 -66
- data/lib/measures/ReduceLightingLoadsByPercentage/measure.xml +7 -7
- data/lib/measures/ReduceNightTimeElectricEquipmentLoads/measure.rb +45 -43
- data/lib/measures/ReduceNightTimeElectricEquipmentLoads/measure.xml +5 -5
- data/lib/measures/ReduceNightTimeLightingLoads/measure.rb +45 -43
- data/lib/measures/ReduceNightTimeLightingLoads/measure.xml +5 -5
- data/lib/measures/ReduceSpaceInfiltrationByPercentage/measure.rb +58 -52
- data/lib/measures/ReduceSpaceInfiltrationByPercentage/measure.xml +7 -7
- data/lib/measures/ReduceVentilationByPercentage/measure.rb +49 -46
- data/lib/measures/ReduceVentilationByPercentage/measure.xml +7 -7
- data/lib/measures/add_variable_speed_rtu_control_logic/measure.rb +31 -23
- data/lib/measures/add_variable_speed_rtu_control_logic/measure.xml +5 -5
- data/lib/measures/create_variable_speed_rtu/measure.rb +166 -174
- data/lib/measures/create_variable_speed_rtu/measure.xml +7 -7
- data/lib/measures/fan_assist_night_ventilation/measure.rb +33 -32
- data/lib/measures/fan_assist_night_ventilation/measure.xml +5 -5
- data/lib/measures/nze_hvac/measure.rb +72 -62
- data/lib/measures/nze_hvac/measure.xml +5 -5
- data/lib/measures/replace_water_heater_mixed_with_thermal_storage_chilled_water/measure.rb +16 -19
- data/lib/measures/replace_water_heater_mixed_with_thermal_storage_chilled_water/measure.xml +5 -5
- data/lib/measures/window_enhancement/LICENSE.md +14 -0
- data/lib/measures/window_enhancement/README.md +112 -0
- data/lib/measures/window_enhancement/docs/.gitkeep +0 -0
- data/lib/measures/window_enhancement/measure.py +386 -0
- data/lib/measures/window_enhancement/measure.xml +128 -0
- data/lib/measures/window_enhancement/resources/EC3_lookup.py +321 -0
- data/lib/measures/window_enhancement/resources/Test_API.py +32 -0
- data/lib/measures/window_enhancement/resources/__pycache__/EC3_lookup.cpython-39.pyc +0 -0
- data/lib/measures/window_enhancement/resources/__pycache__/Original_EC3_lookup.py +322 -0
- data/lib/measures/window_enhancement/resources/__pycache__/Test_API.cpython-39.pyc +0 -0
- data/lib/measures/window_enhancement/resources/calculate_perimeter.py +39 -0
- data/lib/measures/window_enhancement/test_output.log +39 -0
- data/lib/openstudio/ee_measures/version.rb +1 -1
- data/openstudio-ee.gemspec +11 -9
- data/test-workflow-locally.sh +152 -0
- metadata +66 -37
- data/Jenkinsfile +0 -11
@@ -19,7 +19,7 @@ class ReduceVentilationByPercentage < OpenStudio::Measure::ModelMeasure
|
|
19
19
|
# define the name that a user will see, this method may be deprecated as
|
20
20
|
# the display name in PAT comes from the name field in measure.xml
|
21
21
|
def name
|
22
|
-
|
22
|
+
'ReduceVentilationByPercentage'
|
23
23
|
end
|
24
24
|
|
25
25
|
# define the arguments that the user will input
|
@@ -40,7 +40,7 @@ class ReduceVentilationByPercentage < OpenStudio::Measure::ModelMeasure
|
|
40
40
|
# looping through sorted hash of model objects
|
41
41
|
space_type_args_hash.sort.map do |key, value|
|
42
42
|
# only include if space type is used in the model
|
43
|
-
|
43
|
+
unless value.spaces.empty?
|
44
44
|
space_type_handles << value.handle.to_s
|
45
45
|
space_type_display_names << key
|
46
46
|
end
|
@@ -52,20 +52,23 @@ class ReduceVentilationByPercentage < OpenStudio::Measure::ModelMeasure
|
|
52
52
|
space_type_display_names << '*Entire Building*'
|
53
53
|
|
54
54
|
# make a choice argument for space type
|
55
|
-
space_type = OpenStudio::Measure::OSArgument.makeChoiceArgument('space_type', space_type_handles,
|
55
|
+
space_type = OpenStudio::Measure::OSArgument.makeChoiceArgument('space_type', space_type_handles,
|
56
|
+
space_type_display_names)
|
56
57
|
space_type.setDisplayName('Apply the Measure to a Specific Space Type or to the Entire Model.')
|
57
58
|
space_type.setDefaultValue('*Entire Building*') # if no space type is chosen this will run on the entire building
|
58
59
|
args << space_type
|
59
60
|
|
60
61
|
# make an argument for reduction percentage
|
61
|
-
design_spec_outdoor_air_reduction_percent = OpenStudio::Measure::OSArgument.makeDoubleArgument(
|
62
|
+
design_spec_outdoor_air_reduction_percent = OpenStudio::Measure::OSArgument.makeDoubleArgument(
|
63
|
+
'design_spec_outdoor_air_reduction_percent', true
|
64
|
+
)
|
62
65
|
design_spec_outdoor_air_reduction_percent.setDisplayName('Design Specification Outdoor Air Reduction (%).')
|
63
66
|
design_spec_outdoor_air_reduction_percent.setDefaultValue(30.0)
|
64
67
|
args << design_spec_outdoor_air_reduction_percent
|
65
68
|
|
66
69
|
# no cost required to reduce required amount of outdoor air. Cost increase or decrease will relate to system sizing and ongoing energy use due to change in outdoor air provided.
|
67
70
|
|
68
|
-
|
71
|
+
args
|
69
72
|
end
|
70
73
|
|
71
74
|
# define what happens when the measure is run
|
@@ -73,13 +76,13 @@ class ReduceVentilationByPercentage < OpenStudio::Measure::ModelMeasure
|
|
73
76
|
super(model, runner, user_arguments)
|
74
77
|
|
75
78
|
# use the built-in error checking
|
76
|
-
|
77
|
-
return false
|
78
|
-
end
|
79
|
+
return false unless runner.validateUserArguments(arguments(model), user_arguments)
|
79
80
|
|
80
81
|
# assign the user inputs to variables
|
81
82
|
object = runner.getOptionalWorkspaceObjectChoiceValue('space_type', user_arguments, model)
|
82
|
-
design_spec_outdoor_air_reduction_percent = runner.getDoubleArgumentValue(
|
83
|
+
design_spec_outdoor_air_reduction_percent = runner.getDoubleArgumentValue(
|
84
|
+
'design_spec_outdoor_air_reduction_percent', user_arguments
|
85
|
+
)
|
83
86
|
|
84
87
|
# check the space_type for reasonableness and see if measure should run on space type or on the entire building
|
85
88
|
apply_to_building = false
|
@@ -92,15 +95,13 @@ class ReduceVentilationByPercentage < OpenStudio::Measure::ModelMeasure
|
|
92
95
|
runner.registerError("The selected space type with handle '#{handle}' was not found in the model. It may have been removed by another measure.")
|
93
96
|
end
|
94
97
|
return false
|
98
|
+
elsif !object.get.to_SpaceType.empty?
|
99
|
+
space_type = object.get.to_SpaceType.get
|
100
|
+
elsif !object.get.to_Building.empty?
|
101
|
+
apply_to_building = true
|
95
102
|
else
|
96
|
-
|
97
|
-
|
98
|
-
elsif !object.get.to_Building.empty?
|
99
|
-
apply_to_building = true
|
100
|
-
else
|
101
|
-
runner.registerError('Script Error - argument not showing up as space type or building.')
|
102
|
-
return false
|
103
|
-
end
|
103
|
+
runner.registerError('Script Error - argument not showing up as space type or building.')
|
104
|
+
return false
|
104
105
|
end
|
105
106
|
|
106
107
|
# check the design_spec_outdoor_air_reduction_percent and for reasonableness
|
@@ -119,11 +120,11 @@ class ReduceVentilationByPercentage < OpenStudio::Measure::ModelMeasure
|
|
119
120
|
|
120
121
|
# helper to make numbers pretty (converts 4125001.25641 to 4,125,001.26 or 4,125,001). The definition be called through this measure.
|
121
122
|
def neat_numbers(number, roundto = 2) # round to 0 or 2)
|
122
|
-
if roundto == 2
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
123
|
+
number = if roundto == 2
|
124
|
+
format '%.2f', number
|
125
|
+
else
|
126
|
+
number.round
|
127
|
+
end
|
127
128
|
# regex to add commas
|
128
129
|
number.to_s.reverse.gsub(/([0-9]{3}(?=([0-9])))/, '\\1,').reverse
|
129
130
|
end
|
@@ -136,10 +137,10 @@ class ReduceVentilationByPercentage < OpenStudio::Measure::ModelMeasure
|
|
136
137
|
altered_instances = 0
|
137
138
|
|
138
139
|
# reporting initial condition of model
|
139
|
-
if
|
140
|
-
runner.registerInitialCondition("The initial model contained #{design_spec_outdoor_air_objects.size} design specification outdoor air objects.")
|
141
|
-
else
|
140
|
+
if design_spec_outdoor_air_objects.empty?
|
142
141
|
runner.registerInitialCondition('The initial model did not contain any design specification outdoor air.')
|
142
|
+
else
|
143
|
+
runner.registerInitialCondition("The initial model contained #{design_spec_outdoor_air_objects.size} design specification outdoor air objects.")
|
143
144
|
end
|
144
145
|
|
145
146
|
# get space types in model
|
@@ -157,22 +158,21 @@ class ReduceVentilationByPercentage < OpenStudio::Measure::ModelMeasure
|
|
157
158
|
design_spec_outdoor_air_objects.each do |design_spec_outdoor_air_object|
|
158
159
|
direct_use_count = design_spec_outdoor_air_object.directUseCount
|
159
160
|
next if direct_use_count <= 1
|
161
|
+
|
160
162
|
direct_uses = design_spec_outdoor_air_object.sources
|
161
163
|
original_cloned = false
|
162
164
|
|
163
165
|
# adjust count test for direct uses that are component data
|
164
166
|
direct_uses.each do |direct_use|
|
165
167
|
component_data_source = direct_use.to_ComponentData
|
166
|
-
|
167
|
-
direct_use_count -= 1
|
168
|
-
end
|
168
|
+
direct_use_count -= 1 unless component_data_source.empty?
|
169
169
|
end
|
170
170
|
next if direct_use_count <= 1
|
171
171
|
|
172
172
|
direct_uses.each do |direct_use|
|
173
173
|
# clone and hookup design spec OA
|
174
174
|
space_type_source = direct_use.to_SpaceType
|
175
|
-
|
175
|
+
unless space_type_source.empty?
|
176
176
|
space_type_source = space_type_source.get
|
177
177
|
cloned_object = design_spec_outdoor_air_object.clone
|
178
178
|
space_type_source.setDesignSpecificationOutdoorAir(cloned_object.to_DesignSpecificationOutdoorAir.get)
|
@@ -180,12 +180,12 @@ class ReduceVentilationByPercentage < OpenStudio::Measure::ModelMeasure
|
|
180
180
|
end
|
181
181
|
|
182
182
|
space_source = direct_use.to_Space
|
183
|
-
if
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
183
|
+
next if space_source.empty?
|
184
|
+
|
185
|
+
space_source = space_source.get
|
186
|
+
cloned_object = design_spec_outdoor_air_object.clone
|
187
|
+
space_source.setDesignSpecificationOutdoorAir(cloned_object.to_DesignSpecificationOutdoorAir.get)
|
188
|
+
original_cloned = true
|
189
189
|
end
|
190
190
|
|
191
191
|
# delete the now unused design spec OA
|
@@ -196,15 +196,15 @@ class ReduceVentilationByPercentage < OpenStudio::Measure::ModelMeasure
|
|
196
196
|
end
|
197
197
|
|
198
198
|
# def to alter performance and life cycle costs of objects
|
199
|
-
def alter_performance(object, design_spec_outdoor_air_reduction_percent,
|
199
|
+
def alter_performance(object, design_spec_outdoor_air_reduction_percent, _runner)
|
200
200
|
# edit instance based on percentage reduction
|
201
201
|
instance = object
|
202
202
|
|
203
203
|
# not checking if fields are empty because these are optional like values for space infiltration are.
|
204
|
-
new_outdoor_air_per_person = instance.setOutdoorAirFlowperPerson(instance.outdoorAirFlowperPerson - instance.outdoorAirFlowperPerson * design_spec_outdoor_air_reduction_percent * 0.01)
|
205
|
-
new_outdoor_air_per_floor_area = instance.setOutdoorAirFlowperFloorArea(instance.outdoorAirFlowperFloorArea - instance.outdoorAirFlowperFloorArea * design_spec_outdoor_air_reduction_percent * 0.01)
|
206
|
-
new_outdoor_air_ach = instance.setOutdoorAirFlowAirChangesperHour(instance.outdoorAirFlowAirChangesperHour - instance.outdoorAirFlowAirChangesperHour * design_spec_outdoor_air_reduction_percent * 0.01)
|
207
|
-
new_outdoor_air_rate = instance.setOutdoorAirFlowRate(instance.outdoorAirFlowRate - instance.outdoorAirFlowRate * design_spec_outdoor_air_reduction_percent * 0.01)
|
204
|
+
new_outdoor_air_per_person = instance.setOutdoorAirFlowperPerson(instance.outdoorAirFlowperPerson - (instance.outdoorAirFlowperPerson * design_spec_outdoor_air_reduction_percent * 0.01))
|
205
|
+
new_outdoor_air_per_floor_area = instance.setOutdoorAirFlowperFloorArea(instance.outdoorAirFlowperFloorArea - (instance.outdoorAirFlowperFloorArea * design_spec_outdoor_air_reduction_percent * 0.01))
|
206
|
+
new_outdoor_air_ach = instance.setOutdoorAirFlowAirChangesperHour(instance.outdoorAirFlowAirChangesperHour - (instance.outdoorAirFlowAirChangesperHour * design_spec_outdoor_air_reduction_percent * 0.01))
|
207
|
+
new_outdoor_air_rate = instance.setOutdoorAirFlowRate(instance.outdoorAirFlowRate - (instance.outdoorAirFlowRate * design_spec_outdoor_air_reduction_percent * 0.01))
|
208
208
|
end
|
209
209
|
|
210
210
|
# array of instances to change
|
@@ -213,16 +213,15 @@ class ReduceVentilationByPercentage < OpenStudio::Measure::ModelMeasure
|
|
213
213
|
# loop through space types
|
214
214
|
space_types.each do |space_type|
|
215
215
|
next if space_type.spaces.size <= 0
|
216
|
+
|
216
217
|
instances_array << space_type.designSpecificationOutdoorAir
|
217
218
|
end
|
218
219
|
|
219
220
|
# get spaces in model
|
220
221
|
if apply_to_building
|
221
222
|
spaces = model.getSpaces
|
222
|
-
|
223
|
-
|
224
|
-
spaces = space_type.spaces # only run on a single space type
|
225
|
-
end
|
223
|
+
elsif !space_type.spaces.empty?
|
224
|
+
spaces = space_type.spaces
|
226
225
|
end
|
227
226
|
|
228
227
|
spaces.each do |space|
|
@@ -233,10 +232,12 @@ class ReduceVentilationByPercentage < OpenStudio::Measure::ModelMeasure
|
|
233
232
|
|
234
233
|
instances_array.each do |instance|
|
235
234
|
next if instance.empty?
|
235
|
+
|
236
236
|
instance = instance.get
|
237
237
|
|
238
238
|
# only continue if this instance has not been processed yet
|
239
239
|
next if instance_processed.include? instance
|
240
|
+
|
240
241
|
instance_processed << instance
|
241
242
|
|
242
243
|
# call def to alter performance and life cycle costs
|
@@ -253,9 +254,11 @@ class ReduceVentilationByPercentage < OpenStudio::Measure::ModelMeasure
|
|
253
254
|
|
254
255
|
# report final condition
|
255
256
|
affected_area_ip = OpenStudio.convert(affected_area_si, 'm^2', 'ft^2').get
|
256
|
-
runner.registerFinalCondition("#{altered_instances} design specification outdoor air objects in the model were altered affecting #{neat_numbers(
|
257
|
+
runner.registerFinalCondition("#{altered_instances} design specification outdoor air objects in the model were altered affecting #{neat_numbers(
|
258
|
+
affected_area_ip, 0
|
259
|
+
)}(ft^2).")
|
257
260
|
|
258
|
-
|
261
|
+
true
|
259
262
|
end
|
260
263
|
end
|
261
264
|
|
@@ -3,8 +3,8 @@
|
|
3
3
|
<schema_version>3.1</schema_version>
|
4
4
|
<name>reduce_ventilation_by_percentage</name>
|
5
5
|
<uid>f0859a47-fddf-4962-9035-2f9fc9d6e283</uid>
|
6
|
-
<version_id>
|
7
|
-
<version_modified>
|
6
|
+
<version_id>7ed22a03-048f-434d-b7ad-23600275e8d8</version_id>
|
7
|
+
<version_modified>2025-09-25T15:33:42Z</version_modified>
|
8
8
|
<xml_checksum>ECE70A70</xml_checksum>
|
9
9
|
<class_name>ReduceVentilationByPercentage</class_name>
|
10
10
|
<display_name>ReduceVentilationByPercentage</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>{ae8a6595-172d-452d-8afc-2bfc8f03b75f}</default_value>
|
21
21
|
<choices>
|
22
22
|
<choice>
|
23
|
-
<value>{
|
23
|
+
<value>{ae8a6595-172d-452d-8afc-2bfc8f03b75f}</value>
|
24
24
|
<display_name>*Entire Building*</display_name>
|
25
25
|
</choice>
|
26
26
|
</choices>
|
@@ -56,7 +56,7 @@
|
|
56
56
|
<filename>LICENSE.md</filename>
|
57
57
|
<filetype>md</filetype>
|
58
58
|
<usage_type>license</usage_type>
|
59
|
-
<checksum>
|
59
|
+
<checksum>FFCBFF29</checksum>
|
60
60
|
</file>
|
61
61
|
<file>
|
62
62
|
<filename>README.md</filename>
|
@@ -79,7 +79,7 @@
|
|
79
79
|
<filename>measure.rb</filename>
|
80
80
|
<filetype>rb</filetype>
|
81
81
|
<usage_type>script</usage_type>
|
82
|
-
<checksum>
|
82
|
+
<checksum>F3271DBA</checksum>
|
83
83
|
</file>
|
84
84
|
<file>
|
85
85
|
<filename>EnvelopeAndLoadTestModel_01.osm</filename>
|
@@ -91,7 +91,7 @@
|
|
91
91
|
<filename>ReduceVentilationByPercentage_Test.rb</filename>
|
92
92
|
<filetype>rb</filetype>
|
93
93
|
<usage_type>test</usage_type>
|
94
|
-
<checksum>
|
94
|
+
<checksum>10C306DB</checksum>
|
95
95
|
</file>
|
96
96
|
</files>
|
97
97
|
</measure>
|
@@ -12,17 +12,17 @@
|
|
12
12
|
class AddVariableSpeedRTUControlLogic < OpenStudio::Measure::EnergyPlusMeasure
|
13
13
|
# human readable name
|
14
14
|
def name
|
15
|
-
|
15
|
+
'Add Variable Speed RTU Control Logic'
|
16
16
|
end
|
17
17
|
|
18
18
|
# human readable description
|
19
19
|
def description
|
20
|
-
|
20
|
+
'This measure adds control logic for a variable-speed RTU to the model. The control logic is responsible for staging the fan in response to the amount of heating/cooling required. It is meant to be paired specifically with the Create Variable Speed RTU OpenStudio measure. Users enter the fan flow rate fractions for up to nine different stages: ventilation, up to four cooling stages, and up to four heating stages. The measure examines the amount of heating/cooling required at each time step, identifies which heating/cooling stage is required to supply that amount of heating/cooling, and modifies the fan flow accordingly. This measure allows users to identify the impact of different fan flow control strategies.'
|
21
21
|
end
|
22
22
|
|
23
23
|
# human readable description of modeling approach
|
24
24
|
def modeler_description
|
25
|
-
|
25
|
+
"This measure inserts EMS code for each airloop found to contain an AirLoopHVAC:UnitarySystem object. It is meant to be paired specifically with the Create Variable Speed RTU OpenStudio measure.
|
26
26
|
|
27
27
|
Users can select the fan mass flow fractions for up to nine stages (ventilation, two or four cooling, and two or four heating). The default control logic is as follows:
|
28
28
|
When the unit is ventilating (heating and cooling coil energy is zero), the fan flow rate is set to 40% of nominal.
|
@@ -35,7 +35,7 @@ The measure is set up so that a separate block of EMS code is inserted for each
|
|
35
35
|
end
|
36
36
|
|
37
37
|
# define the arguments that the user will input
|
38
|
-
def arguments(
|
38
|
+
def arguments(_workspace)
|
39
39
|
args = OpenStudio::Measure::OSArgumentVector.new
|
40
40
|
|
41
41
|
# make an argument for ventilation fan speed fraction
|
@@ -45,54 +45,62 @@ The measure is set up so that a separate block of EMS code is inserted for each
|
|
45
45
|
args << vent_fan_speed
|
46
46
|
|
47
47
|
# make an argument for stage_one cooling fan speed fraction
|
48
|
-
stage_one_cooling_fan_speed = OpenStudio::Measure::OSArgument.makeDoubleArgument('stage_one_cooling_fan_speed',
|
48
|
+
stage_one_cooling_fan_speed = OpenStudio::Measure::OSArgument.makeDoubleArgument('stage_one_cooling_fan_speed',
|
49
|
+
false)
|
49
50
|
stage_one_cooling_fan_speed.setDisplayName('Fan speed fraction during stage one DX cooling.')
|
50
51
|
stage_one_cooling_fan_speed.setDefaultValue(0.4)
|
51
52
|
args << stage_one_cooling_fan_speed
|
52
53
|
|
53
54
|
# make an argument for stage_two cooling fan speed fraction
|
54
|
-
stage_two_cooling_fan_speed = OpenStudio::Measure::OSArgument.makeDoubleArgument('stage_two_cooling_fan_speed',
|
55
|
+
stage_two_cooling_fan_speed = OpenStudio::Measure::OSArgument.makeDoubleArgument('stage_two_cooling_fan_speed',
|
56
|
+
false)
|
55
57
|
stage_two_cooling_fan_speed.setDisplayName('Fan speed fraction during stage two DX cooling.')
|
56
58
|
stage_two_cooling_fan_speed.setDefaultValue(0.5)
|
57
59
|
args << stage_two_cooling_fan_speed
|
58
60
|
|
59
61
|
# make an argument for stage_three cooling fan speed fraction
|
60
|
-
stage_three_cooling_fan_speed = OpenStudio::Measure::OSArgument.makeDoubleArgument('stage_three_cooling_fan_speed',
|
62
|
+
stage_three_cooling_fan_speed = OpenStudio::Measure::OSArgument.makeDoubleArgument('stage_three_cooling_fan_speed',
|
63
|
+
false)
|
61
64
|
stage_three_cooling_fan_speed.setDisplayName('Fan speed fraction during stage three DX cooling. Not used for two-speed systems.')
|
62
65
|
stage_three_cooling_fan_speed.setDefaultValue(0.75)
|
63
66
|
args << stage_three_cooling_fan_speed
|
64
67
|
|
65
68
|
# make an argument for stage_four cooling fan speed fraction
|
66
|
-
stage_four_cooling_fan_speed = OpenStudio::Measure::OSArgument.makeDoubleArgument('stage_four_cooling_fan_speed',
|
69
|
+
stage_four_cooling_fan_speed = OpenStudio::Measure::OSArgument.makeDoubleArgument('stage_four_cooling_fan_speed',
|
70
|
+
false)
|
67
71
|
stage_four_cooling_fan_speed.setDisplayName('Fan speed fraction during stage four DX cooling. Not used for two-speed systems.')
|
68
72
|
stage_four_cooling_fan_speed.setDefaultValue(1.0)
|
69
73
|
args << stage_four_cooling_fan_speed
|
70
74
|
|
71
75
|
# make an argument for stage_one heating fan speed fraction
|
72
|
-
stage_one_heating_fan_speed = OpenStudio::Measure::OSArgument.makeDoubleArgument('stage_one_heating_fan_speed',
|
76
|
+
stage_one_heating_fan_speed = OpenStudio::Measure::OSArgument.makeDoubleArgument('stage_one_heating_fan_speed',
|
77
|
+
false)
|
73
78
|
stage_one_heating_fan_speed.setDisplayName('Fan speed fraction during stage one DX heating.')
|
74
79
|
stage_one_heating_fan_speed.setDefaultValue(0.4)
|
75
80
|
args << stage_one_heating_fan_speed
|
76
81
|
|
77
82
|
# make an argument for stage_two heating fan speed fraction
|
78
|
-
stage_two_heating_fan_speed = OpenStudio::Measure::OSArgument.makeDoubleArgument('stage_two_heating_fan_speed',
|
83
|
+
stage_two_heating_fan_speed = OpenStudio::Measure::OSArgument.makeDoubleArgument('stage_two_heating_fan_speed',
|
84
|
+
false)
|
79
85
|
stage_two_heating_fan_speed.setDisplayName('Fan speed fraction during stage two DX heating.')
|
80
86
|
stage_two_heating_fan_speed.setDefaultValue(0.5)
|
81
87
|
args << stage_two_heating_fan_speed
|
82
88
|
|
83
89
|
# make an argument for stage_three heating fan speed fraction
|
84
|
-
stage_three_heating_fan_speed = OpenStudio::Measure::OSArgument.makeDoubleArgument('stage_three_heating_fan_speed',
|
90
|
+
stage_three_heating_fan_speed = OpenStudio::Measure::OSArgument.makeDoubleArgument('stage_three_heating_fan_speed',
|
91
|
+
false)
|
85
92
|
stage_three_heating_fan_speed.setDisplayName('Fan speed fraction during stage three DX heating. Not used for two-speed systems.')
|
86
93
|
stage_three_heating_fan_speed.setDefaultValue(0.75)
|
87
94
|
args << stage_three_heating_fan_speed
|
88
95
|
|
89
96
|
# make an argument for stage_four heating fan speed fraction
|
90
|
-
stage_four_heating_fan_speed = OpenStudio::Measure::OSArgument.makeDoubleArgument('stage_four_heating_fan_speed',
|
97
|
+
stage_four_heating_fan_speed = OpenStudio::Measure::OSArgument.makeDoubleArgument('stage_four_heating_fan_speed',
|
98
|
+
false)
|
91
99
|
stage_four_heating_fan_speed.setDisplayName('Fan speed fraction during stage four DX heating. Not used for two-speed systems.')
|
92
100
|
stage_four_heating_fan_speed.setDefaultValue(1.0)
|
93
101
|
args << stage_four_heating_fan_speed
|
94
102
|
|
95
|
-
|
103
|
+
args
|
96
104
|
end
|
97
105
|
|
98
106
|
# define what happens when the measure is run
|
@@ -100,19 +108,19 @@ The measure is set up so that a separate block of EMS code is inserted for each
|
|
100
108
|
super(workspace, runner, user_arguments)
|
101
109
|
|
102
110
|
# use the built-in error checking
|
103
|
-
|
104
|
-
return false
|
105
|
-
end
|
111
|
+
return false unless runner.validateUserArguments(arguments(workspace), user_arguments)
|
106
112
|
|
107
113
|
# Assign the user inputs to variables
|
108
114
|
vent_fan_speed = runner.getOptionalDoubleArgumentValue('vent_fan_speed', user_arguments)
|
109
115
|
stage_one_cooling_fan_speed = runner.getOptionalDoubleArgumentValue('stage_one_cooling_fan_speed', user_arguments)
|
110
116
|
stage_two_cooling_fan_speed = runner.getOptionalDoubleArgumentValue('stage_two_cooling_fan_speed', user_arguments)
|
111
|
-
stage_three_cooling_fan_speed = runner.getOptionalDoubleArgumentValue('stage_three_cooling_fan_speed',
|
117
|
+
stage_three_cooling_fan_speed = runner.getOptionalDoubleArgumentValue('stage_three_cooling_fan_speed',
|
118
|
+
user_arguments)
|
112
119
|
stage_four_cooling_fan_speed = runner.getOptionalDoubleArgumentValue('stage_four_cooling_fan_speed', user_arguments)
|
113
120
|
stage_one_heating_fan_speed = runner.getOptionalDoubleArgumentValue('stage_one_heating_fan_speed', user_arguments)
|
114
121
|
stage_two_heating_fan_speed = runner.getOptionalDoubleArgumentValue('stage_two_heating_fan_speed', user_arguments)
|
115
|
-
stage_three_heating_fan_speed = runner.getOptionalDoubleArgumentValue('stage_three_heating_fan_speed',
|
122
|
+
stage_three_heating_fan_speed = runner.getOptionalDoubleArgumentValue('stage_three_heating_fan_speed',
|
123
|
+
user_arguments)
|
116
124
|
stage_four_heating_fan_speed = runner.getOptionalDoubleArgumentValue('stage_four_heating_fan_speed', user_arguments)
|
117
125
|
|
118
126
|
if vent_fan_speed.empty?
|
@@ -263,7 +271,7 @@ The measure is set up so that a separate block of EMS code is inserted for each
|
|
263
271
|
selected_heating_coils = workspace.getObjectsByType(air_loop_heating_coil_type.to_s.to_IddObjectType)
|
264
272
|
selected_heating_coils.each do |heating_coil|
|
265
273
|
hc_name_test = heating_coil.getString(0, true).get
|
266
|
-
puts hc_name_test
|
274
|
+
puts hc_name_test
|
267
275
|
if "#{hc_name_test}.to_s" == "#{air_loop_heating_coil}.to_s"
|
268
276
|
if air_loop_heating_coil_type.to_s == 'Coil:Heating:Gas'
|
269
277
|
selected_heating_coil_outlet_node = heating_coil.getString(5, true).get
|
@@ -297,7 +305,7 @@ The measure is set up so that a separate block of EMS code is inserted for each
|
|
297
305
|
selected_setpoint_manager.each do |setpoint_manager|
|
298
306
|
setpoint_manager_setpoint_node_name = setpoint_manager.getString(7, true).get
|
299
307
|
if selected_heating_coil_outlet_node.to_s == setpoint_manager_setpoint_node_name
|
300
|
-
puts selected_heating_coil_outlet_node
|
308
|
+
puts selected_heating_coil_outlet_node
|
301
309
|
setpoint_manager.setString(7, "#{revised_air_loop_name}_NodeList")
|
302
310
|
end
|
303
311
|
end
|
@@ -490,7 +498,7 @@ The measure is set up so that a separate block of EMS code is inserted for each
|
|
490
498
|
SET #{revised_fan_name}_mass_flow_actuator = Timestep_Fan_Mass_Flow, !- Added for test of two actuator code
|
491
499
|
ENDIF;
|
492
500
|
"
|
493
|
-
|
501
|
+
end
|
494
502
|
end
|
495
503
|
|
496
504
|
# Add EMS code to the model
|
@@ -519,8 +527,8 @@ The measure is set up so that a separate block of EMS code is inserted for each
|
|
519
527
|
wsObject = workspace.addObject(object)
|
520
528
|
end
|
521
529
|
|
522
|
-
|
523
|
-
end # end the run method
|
530
|
+
true
|
531
|
+
end # end the run method
|
524
532
|
end # end the measure
|
525
533
|
|
526
534
|
# register the measure to be used by the application
|
@@ -3,8 +3,8 @@
|
|
3
3
|
<schema_version>3.1</schema_version>
|
4
4
|
<name>add_variable_speed_rtu_control_logic</name>
|
5
5
|
<uid>7d0aebdd-58c5-4e0e-9217-5dbdc82886fd</uid>
|
6
|
-
<version_id>
|
7
|
-
<version_modified>
|
6
|
+
<version_id>8b199bc7-b1a0-4ec9-8255-a9086779973d</version_id>
|
7
|
+
<version_modified>2025-09-25T15:33:42Z</version_modified>
|
8
8
|
<xml_checksum>A310923F</xml_checksum>
|
9
9
|
<class_name>AddVariableSpeedRTUControlLogic</class_name>
|
10
10
|
<display_name>Add Variable Speed RTU Control Logic</display_name>
|
@@ -130,7 +130,7 @@ The measure is set up so that a separate block of EMS code is inserted for each
|
|
130
130
|
<filename>LICENSE.md</filename>
|
131
131
|
<filetype>md</filetype>
|
132
132
|
<usage_type>license</usage_type>
|
133
|
-
<checksum>
|
133
|
+
<checksum>FFCBFF29</checksum>
|
134
134
|
</file>
|
135
135
|
<file>
|
136
136
|
<filename>README.md</filename>
|
@@ -153,13 +153,13 @@ The measure is set up so that a separate block of EMS code is inserted for each
|
|
153
153
|
<filename>measure.rb</filename>
|
154
154
|
<filetype>rb</filetype>
|
155
155
|
<usage_type>script</usage_type>
|
156
|
-
<checksum>
|
156
|
+
<checksum>5399B45F</checksum>
|
157
157
|
</file>
|
158
158
|
<file>
|
159
159
|
<filename>add_variable_speed_rtu_control_logic_test.rb</filename>
|
160
160
|
<filetype>rb</filetype>
|
161
161
|
<usage_type>test</usage_type>
|
162
|
-
<checksum>
|
162
|
+
<checksum>FC202144</checksum>
|
163
163
|
</file>
|
164
164
|
</files>
|
165
165
|
</measure>
|