openstudio-ee 0.12.3 → 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 +3 -0
- data/Gemfile +7 -8
- data/README.md +1 -0
- data/WORKFLOW_CHANGES.md +74 -0
- data/lib/measures/AddDaylightSensors/measure.rb +79 -79
- data/lib/measures/AddDaylightSensors/measure.xml +4 -4
- data/lib/measures/AddOverhangsByProjectionFactor/measure.rb +38 -41
- data/lib/measures/AddOverhangsByProjectionFactor/measure.xml +4 -4
- data/lib/measures/EnableDemandControlledVentilation/measure.rb +37 -40
- data/lib/measures/EnableDemandControlledVentilation/measure.xml +4 -4
- data/lib/measures/EnableEconomizerControl/measure.rb +36 -37
- data/lib/measures/EnableEconomizerControl/measure.xml +4 -4
- data/lib/measures/GLHEProExportLoadsforGroundHeatExchangerSizing/measure.rb +27 -41
- data/lib/measures/GLHEProExportLoadsforGroundHeatExchangerSizing/measure.xml +4 -4
- data/lib/measures/GLHEProGFunctionImport/measure.rb +11 -15
- data/lib/measures/GLHEProGFunctionImport/measure.xml +4 -4
- data/lib/measures/GLHEProSetupExportLoadsforGroundHeatExchangerSizing/measure.rb +5 -9
- data/lib/measures/GLHEProSetupExportLoadsforGroundHeatExchangerSizing/measure.xml +3 -3
- data/lib/measures/ImproveFanBeltEfficiency/measure.rb +78 -95
- data/lib/measures/ImproveFanBeltEfficiency/measure.xml +6 -6
- data/lib/measures/ImproveMotorEfficiency/measure.rb +75 -100
- data/lib/measures/ImproveMotorEfficiency/measure.xml +6 -6
- data/lib/measures/IncreaseInsulationRValueForExteriorWalls/measure.rb +137 -130
- data/lib/measures/IncreaseInsulationRValueForExteriorWalls/measure.xml +4 -4
- data/lib/measures/IncreaseInsulationRValueForExteriorWallsByPercentage/measure.rb +114 -115
- data/lib/measures/IncreaseInsulationRValueForExteriorWallsByPercentage/measure.xml +3 -3
- data/lib/measures/IncreaseInsulationRValueForRoofs/measure.rb +137 -130
- data/lib/measures/IncreaseInsulationRValueForRoofs/measure.xml +4 -4
- data/lib/measures/IncreaseInsulationRValueForRoofsByPercentage/measure.rb +114 -115
- data/lib/measures/IncreaseInsulationRValueForRoofsByPercentage/measure.xml +3 -3
- data/lib/measures/ReduceElectricEquipmentLoadsByPercentage/measure.rb +69 -63
- data/lib/measures/ReduceElectricEquipmentLoadsByPercentage/measure.xml +6 -6
- data/lib/measures/ReduceLightingLoadsByPercentage/measure.rb +77 -66
- data/lib/measures/ReduceLightingLoadsByPercentage/measure.xml +6 -6
- data/lib/measures/ReduceNightTimeElectricEquipmentLoads/measure.rb +45 -43
- data/lib/measures/ReduceNightTimeElectricEquipmentLoads/measure.xml +4 -4
- data/lib/measures/ReduceNightTimeLightingLoads/measure.rb +45 -43
- data/lib/measures/ReduceNightTimeLightingLoads/measure.xml +4 -4
- data/lib/measures/ReduceSpaceInfiltrationByPercentage/measure.rb +58 -52
- data/lib/measures/ReduceSpaceInfiltrationByPercentage/measure.xml +6 -6
- data/lib/measures/ReduceVentilationByPercentage/measure.rb +49 -46
- data/lib/measures/ReduceVentilationByPercentage/measure.xml +6 -6
- data/lib/measures/add_variable_speed_rtu_control_logic/measure.rb +31 -23
- data/lib/measures/add_variable_speed_rtu_control_logic/measure.xml +4 -4
- data/lib/measures/create_variable_speed_rtu/measure.rb +166 -174
- data/lib/measures/create_variable_speed_rtu/measure.xml +6 -6
- data/lib/measures/fan_assist_night_ventilation/measure.rb +33 -32
- data/lib/measures/fan_assist_night_ventilation/measure.xml +4 -4
- data/lib/measures/nze_hvac/measure.rb +72 -62
- data/lib/measures/nze_hvac/measure.xml +4 -4
- 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 +4 -4
- 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 +10 -8
- data/test-workflow-locally.sh +152 -0
- metadata +64 -35
- data/Jenkinsfile +0 -11
@@ -3,8 +3,8 @@
|
|
3
3
|
<schema_version>3.1</schema_version>
|
4
4
|
<name>enable_demand_controlled_ventilation</name>
|
5
5
|
<uid>3ff4b412-8689-4b11-a588-935c621dc97d</uid>
|
6
|
-
<version_id>
|
7
|
-
<version_modified>2025-
|
6
|
+
<version_id>708475fa-7ed5-4cd0-b329-567329e2d602</version_id>
|
7
|
+
<version_modified>2025-09-25T15:33:42Z</version_modified>
|
8
8
|
<xml_checksum>ECE70A70</xml_checksum>
|
9
9
|
<class_name>EnableDemandControlledVentilation</class_name>
|
10
10
|
<display_name>Enable Demand Controlled Ventilation</display_name>
|
@@ -102,7 +102,7 @@ The cost arguments are user arguments that start with a default of $0.</modeler_
|
|
102
102
|
<filename>measure.rb</filename>
|
103
103
|
<filetype>rb</filetype>
|
104
104
|
<usage_type>script</usage_type>
|
105
|
-
<checksum>
|
105
|
+
<checksum>0F3A5367</checksum>
|
106
106
|
</file>
|
107
107
|
<file>
|
108
108
|
<filename>0320_ModelWithHVAC_01.osm</filename>
|
@@ -114,7 +114,7 @@ The cost arguments are user arguments that start with a default of $0.</modeler_
|
|
114
114
|
<filename>EnableDemandControlledVentilation_Test.rb</filename>
|
115
115
|
<filetype>rb</filetype>
|
116
116
|
<usage_type>test</usage_type>
|
117
|
-
<checksum>
|
117
|
+
<checksum>BAB1432E</checksum>
|
118
118
|
</file>
|
119
119
|
</files>
|
120
120
|
</measure>
|
@@ -10,11 +10,11 @@ class EnableEconomizerControl < OpenStudio::Measure::ModelMeasure
|
|
10
10
|
# define the name that a user will see, this method may be deprecated as
|
11
11
|
# the display name in PAT comes from the name field in measure.xml
|
12
12
|
def name
|
13
|
-
|
13
|
+
'Enable Economizer Control'
|
14
14
|
end
|
15
15
|
|
16
16
|
# define the arguments that the user will input
|
17
|
-
def arguments(
|
17
|
+
def arguments(_model)
|
18
18
|
args = OpenStudio::Measure::OSArgumentVector.new
|
19
19
|
|
20
20
|
# make choice argument economizer control type
|
@@ -38,7 +38,7 @@ class EnableEconomizerControl < OpenStudio::Measure::ModelMeasure
|
|
38
38
|
econoMinDryBulbTemp.setDefaultValue(-148.0)
|
39
39
|
args << econoMinDryBulbTemp
|
40
40
|
|
41
|
-
|
41
|
+
args
|
42
42
|
end
|
43
43
|
|
44
44
|
# define what happens when the measure is cop
|
@@ -46,9 +46,7 @@ class EnableEconomizerControl < OpenStudio::Measure::ModelMeasure
|
|
46
46
|
super(model, runner, user_arguments)
|
47
47
|
|
48
48
|
# use the built-in error checking
|
49
|
-
|
50
|
-
return false
|
51
|
-
end
|
49
|
+
return false unless runner.validateUserArguments(arguments(model), user_arguments)
|
52
50
|
|
53
51
|
# assign the user inputs to variables
|
54
52
|
economizer_type = runner.getStringArgumentValue('economizer_type', user_arguments)
|
@@ -64,11 +62,11 @@ class EnableEconomizerControl < OpenStudio::Measure::ModelMeasure
|
|
64
62
|
|
65
63
|
# 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
|
66
64
|
def neat_numbers(number, roundto = 2) # round to 0 or 2)
|
67
|
-
if roundto == 2
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
65
|
+
number = if roundto == 2
|
66
|
+
format '%.2f', number
|
67
|
+
else
|
68
|
+
number.round
|
69
|
+
end
|
72
70
|
# regex to add commas
|
73
71
|
number.to_s.reverse.gsub(/([0-9]{3}(?=([0-9])))/, '\\1,').reverse
|
74
72
|
end
|
@@ -82,42 +80,43 @@ class EnableEconomizerControl < OpenStudio::Measure::ModelMeasure
|
|
82
80
|
# find AirLoopHVACOutdoorAirSystem on loop
|
83
81
|
air_loop.supplyComponents.each do |supply_component|
|
84
82
|
hVACComponent = supply_component.to_AirLoopHVACOutdoorAirSystem
|
85
|
-
|
86
|
-
hVACComponent = hVACComponent.get
|
83
|
+
next unless hVACComponent.is_initialized
|
87
84
|
|
88
|
-
|
89
|
-
loops_with_outdoor_air = true
|
85
|
+
hVACComponent = hVACComponent.get
|
90
86
|
|
91
|
-
|
92
|
-
|
87
|
+
# set flag that at least one air loop has outdoor air objects
|
88
|
+
loops_with_outdoor_air = true
|
93
89
|
|
94
|
-
|
95
|
-
|
90
|
+
# get ControllerOutdoorAir
|
91
|
+
controller_oa = hVACComponent.getControllerOutdoorAir
|
96
92
|
|
97
|
-
|
98
|
-
|
99
|
-
runner.registerInfo("#{air_loop.name} already has the requested economizer type of #{economizer_type}.")
|
100
|
-
else
|
101
|
-
# store starting economizer type
|
102
|
-
starting_econo_control_type = controller_oa.getEconomizerControlType
|
93
|
+
# get ControllerMechanicalVentilation
|
94
|
+
controller_mv = controller_oa.controllerMechanicalVentilation # not using this
|
103
95
|
|
104
|
-
|
105
|
-
|
96
|
+
if controller_oa.getEconomizerControlType == economizer_type
|
97
|
+
# report info about air loop
|
98
|
+
runner.registerInfo("#{air_loop.name} already has the requested economizer type of #{economizer_type}.")
|
99
|
+
else
|
100
|
+
# store starting economizer type
|
101
|
+
starting_econo_control_type = controller_oa.getEconomizerControlType
|
106
102
|
|
107
|
-
|
108
|
-
|
103
|
+
# set economizer to the requested control type
|
104
|
+
controller_oa.setEconomizerControlType(economizer_type)
|
109
105
|
|
110
|
-
|
106
|
+
# report info about air loop
|
107
|
+
runner.registerInfo("Changing Economizer Control Type on #{air_loop.name} from #{starting_econo_control_type} to #{controller_oa.getEconomizerControlType} and adjusting temperature and enthalpy limits per measure arguments.")
|
111
108
|
|
112
|
-
|
109
|
+
air_loops_changed << air_loop
|
113
110
|
|
114
|
-
|
115
|
-
controller_oa.setEconomizerMaximumLimitDryBulbTemperature(OpenStudio.convert(econoMaxDryBulbTemp, 'F', 'C').get)
|
111
|
+
end
|
116
112
|
|
117
|
-
|
118
|
-
|
113
|
+
# set maximum limit drybulb temperature
|
114
|
+
controller_oa.setEconomizerMaximumLimitDryBulbTemperature(OpenStudio.convert(econoMaxDryBulbTemp, 'F',
|
115
|
+
'C').get)
|
119
116
|
|
120
|
-
|
117
|
+
# set minimum limit drybulb temperature
|
118
|
+
controller_oa.setEconomizerMinimumLimitDryBulbTemperature(OpenStudio.convert(econoMinDryBulbTemp, 'F',
|
119
|
+
'C').get)
|
121
120
|
end
|
122
121
|
end
|
123
122
|
|
@@ -136,7 +135,7 @@ class EnableEconomizerControl < OpenStudio::Measure::ModelMeasure
|
|
136
135
|
# Report the final condition of model
|
137
136
|
runner.registerFinalCondition("#{air_loops_changed.size} air loops now have economizers.")
|
138
137
|
|
139
|
-
|
138
|
+
true
|
140
139
|
end
|
141
140
|
end
|
142
141
|
|
@@ -3,8 +3,8 @@
|
|
3
3
|
<schema_version>3.1</schema_version>
|
4
4
|
<name>enable_economizer_control</name>
|
5
5
|
<uid>f8cc920d-8ae3-411a-922f-e6fed3223c4d</uid>
|
6
|
-
<version_id>
|
7
|
-
<version_modified>2025-
|
6
|
+
<version_id>0a64dc7a-3455-437b-b187-386ad6d373ab</version_id>
|
7
|
+
<version_modified>2025-09-25T15:33:42Z</version_modified>
|
8
8
|
<xml_checksum>ECE70A70</xml_checksum>
|
9
9
|
<class_name>EnableEconomizerControl</class_name>
|
10
10
|
<display_name>Enable Economizer Control</display_name>
|
@@ -159,7 +159,7 @@ The cost arguments are user arguments that start with a default of $0.
|
|
159
159
|
<filename>measure.rb</filename>
|
160
160
|
<filetype>rb</filetype>
|
161
161
|
<usage_type>script</usage_type>
|
162
|
-
<checksum>
|
162
|
+
<checksum>A51BE018</checksum>
|
163
163
|
</file>
|
164
164
|
<file>
|
165
165
|
<filename>0320_ModelWithHVAC_01.osm</filename>
|
@@ -171,7 +171,7 @@ The cost arguments are user arguments that start with a default of $0.
|
|
171
171
|
<filename>measure_Test.rb</filename>
|
172
172
|
<filetype>rb</filetype>
|
173
173
|
<usage_type>test</usage_type>
|
174
|
-
<checksum>
|
174
|
+
<checksum>76136CAF</checksum>
|
175
175
|
</file>
|
176
176
|
</files>
|
177
177
|
</measure>
|
@@ -19,14 +19,12 @@ class GLHEProExportLoadsforGroundHeatExchangerSizing < OpenStudio::Measure::Repo
|
|
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
|
+
'GLHEProExportLoadsforGroundHeatExchangerSizing'
|
23
23
|
end
|
24
24
|
|
25
25
|
# define the arguments that the user will input
|
26
|
-
def arguments(
|
27
|
-
|
28
|
-
|
29
|
-
return args
|
26
|
+
def arguments(_model = nil)
|
27
|
+
OpenStudio::Measure::OSArgumentVector.new
|
30
28
|
end
|
31
29
|
|
32
30
|
def energyPlusOutputRequests(runner, user_arguments)
|
@@ -35,11 +33,9 @@ class GLHEProExportLoadsforGroundHeatExchangerSizing < OpenStudio::Measure::Repo
|
|
35
33
|
result = OpenStudio::IdfObjectVector.new
|
36
34
|
|
37
35
|
# use the built-in error checking
|
38
|
-
unless runner.validateUserArguments(arguments, user_arguments)
|
39
|
-
return result
|
40
|
-
end
|
36
|
+
return result unless runner.validateUserArguments(arguments, user_arguments)
|
41
37
|
|
42
|
-
#
|
38
|
+
# NOTE: these variable requests replace the functionality of GLHEProSetupExportLoadsforGroundHeatExchangerSizing measure
|
43
39
|
|
44
40
|
result << OpenStudio::IdfObject.load('Output:Variable,,District Heating Water Rate,hourly;').get
|
45
41
|
result << OpenStudio::IdfObject.load('Output:Variable,,District Cooling Water Rate,hourly;').get
|
@@ -75,9 +71,7 @@ class GLHEProExportLoadsforGroundHeatExchangerSizing < OpenStudio::Measure::Repo
|
|
75
71
|
super(runner, user_arguments)
|
76
72
|
|
77
73
|
# use the built-in error checking
|
78
|
-
|
79
|
-
return false
|
80
|
-
end
|
74
|
+
return false unless runner.validateUserArguments(arguments, user_arguments)
|
81
75
|
|
82
76
|
# Get the model and sql file
|
83
77
|
model = runner.lastOpenStudioModel
|
@@ -117,20 +111,16 @@ class GLHEProExportLoadsforGroundHeatExchangerSizing < OpenStudio::Measure::Repo
|
|
117
111
|
js_time = js_time.gsub('Sep', '09')
|
118
112
|
js_time = js_time.gsub('Oct', '10')
|
119
113
|
js_time = js_time.gsub('Nov', '11')
|
120
|
-
js_time
|
121
|
-
|
122
|
-
return js_time
|
114
|
+
js_time.gsub('Dec', '12')
|
123
115
|
end
|
124
116
|
|
125
117
|
# Get the weather file (as opposed to design day) run period
|
126
118
|
annEnvPd = nil
|
127
119
|
sql.availableEnvPeriods.each do |envPd|
|
128
120
|
envType = sql.environmentType(envPd)
|
129
|
-
if
|
130
|
-
|
131
|
-
|
132
|
-
end
|
133
|
-
end
|
121
|
+
next if envType.empty?
|
122
|
+
|
123
|
+
annEnvPd = envPd if envType.get == 'WeatherRunPeriod'.to_EnvironmentType
|
134
124
|
end
|
135
125
|
|
136
126
|
# Find the names of all plant loops in the model that contain both a
|
@@ -148,9 +138,7 @@ class GLHEProExportLoadsforGroundHeatExchangerSizing < OpenStudio::Measure::Repo
|
|
148
138
|
end
|
149
139
|
end
|
150
140
|
|
151
|
-
if dist_htg_name && dist_clg_name
|
152
|
-
loop_names << [loop.name.get, dist_htg_name, dist_clg_name]
|
153
|
-
end
|
141
|
+
loop_names << [loop.name.get, dist_htg_name, dist_clg_name] if dist_htg_name && dist_clg_name
|
154
142
|
end
|
155
143
|
|
156
144
|
# Report any loops that were found that appear to be
|
@@ -264,14 +252,12 @@ class GLHEProExportLoadsforGroundHeatExchangerSizing < OpenStudio::Measure::Repo
|
|
264
252
|
graph['title'] = "#{loop_name} - Hourly Heating and Cooling Power"
|
265
253
|
graph['xaxislabel'] = 'Time'
|
266
254
|
graph['yaxislabel'] = 'Power (kBtu/hr)'
|
267
|
-
graph['labels'] = [
|
255
|
+
graph['labels'] = %w[Date Heating Cooling]
|
268
256
|
graph['colors'] = ['#FF5050', '#0066FF']
|
269
257
|
graph['timeseries'] = hourly_vals
|
270
258
|
|
271
259
|
# This measure requires ruby 2.0.0 to create the JSON for the report graph
|
272
|
-
if RUBY_VERSION >= '2.0.0'
|
273
|
-
annualGraphData << graph
|
274
|
-
end
|
260
|
+
annualGraphData << graph if RUBY_VERSION >= '2.0.0'
|
275
261
|
|
276
262
|
# Save out hourly load data to CSV
|
277
263
|
File.open("./Annual Hourly Loads for #{loop_name}.csv", 'w') do |file|
|
@@ -355,15 +341,15 @@ class GLHEProExportLoadsforGroundHeatExchangerSizing < OpenStudio::Measure::Repo
|
|
355
341
|
|
356
342
|
# Save the monthly load data for import into GLHEPro (.gt1)
|
357
343
|
File.open("./Monthly Loads for #{loop_name}.gt1", 'w') do |file|
|
358
|
-
file.puts 'Clg/Htg Consumption (kBtu),'\
|
359
|
-
"#{mon_clg_cons.join(',')},"\
|
360
|
-
"#{ann_clg_cons},"\
|
361
|
-
"#{mon_htg_cons.join(',')},"\
|
344
|
+
file.puts 'Clg/Htg Consumption (kBtu),' \
|
345
|
+
"#{mon_clg_cons.join(',')}," \
|
346
|
+
"#{ann_clg_cons}," \
|
347
|
+
"#{mon_htg_cons.join(',')}," \
|
362
348
|
"#{ann_htg_cons}"
|
363
|
-
file.puts 'Clg/Htg Demand (Btuh),'\
|
364
|
-
"#{mon_clg_dmd.join(',')},"\
|
365
|
-
"#{ann_clg_dmd},"\
|
366
|
-
"#{mon_htg_dmd.join(',')},"\
|
349
|
+
file.puts 'Clg/Htg Demand (Btuh),' \
|
350
|
+
"#{mon_clg_dmd.join(',')}," \
|
351
|
+
"#{ann_clg_dmd}," \
|
352
|
+
"#{mon_htg_dmd.join(',')}," \
|
367
353
|
"#{ann_htg_dmd}"
|
368
354
|
end
|
369
355
|
|
@@ -381,11 +367,11 @@ class GLHEProExportLoadsforGroundHeatExchangerSizing < OpenStudio::Measure::Repo
|
|
381
367
|
|
382
368
|
# Read in the HTML report template
|
383
369
|
html_in_path = "#{File.dirname(__FILE__)}/resources/report.html.in"
|
384
|
-
if File.exist?(html_in_path)
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
370
|
+
html_in_path = if File.exist?(html_in_path)
|
371
|
+
html_in_path
|
372
|
+
else
|
373
|
+
"#{File.dirname(__FILE__)}/report.html.in"
|
374
|
+
end
|
389
375
|
html_in = ''
|
390
376
|
File.open(html_in_path, 'r') do |file|
|
391
377
|
html_in = file.read
|
@@ -410,7 +396,7 @@ class GLHEProExportLoadsforGroundHeatExchangerSizing < OpenStudio::Measure::Repo
|
|
410
396
|
# Close the sql file
|
411
397
|
sql.close
|
412
398
|
|
413
|
-
|
399
|
+
true
|
414
400
|
end
|
415
401
|
end
|
416
402
|
|
@@ -3,8 +3,8 @@
|
|
3
3
|
<schema_version>3.1</schema_version>
|
4
4
|
<name>glhe_pro_export_loadsfor_ground_heat_exchanger_sizing</name>
|
5
5
|
<uid>7bb0ce67-cffb-4ef6-b7fb-093c7c43e263</uid>
|
6
|
-
<version_id>
|
7
|
-
<version_modified>2025-
|
6
|
+
<version_id>f6942ed0-43ab-4423-86f1-1ef38469a968</version_id>
|
7
|
+
<version_modified>2025-09-25T15:33:42Z</version_modified>
|
8
8
|
<xml_checksum>2C8A3EEF</xml_checksum>
|
9
9
|
<class_name>GLHEProExportLoadsforGroundHeatExchangerSizing</class_name>
|
10
10
|
<display_name>GLHEProExportLoadsforGroundHeatExchangerSizing</display_name>
|
@@ -134,7 +134,7 @@
|
|
134
134
|
<filename>measure.rb</filename>
|
135
135
|
<filetype>rb</filetype>
|
136
136
|
<usage_type>script</usage_type>
|
137
|
-
<checksum>
|
137
|
+
<checksum>86B7579E</checksum>
|
138
138
|
</file>
|
139
139
|
<file>
|
140
140
|
<filename>report.html.in</filename>
|
@@ -152,7 +152,7 @@
|
|
152
152
|
<filename>GLHEProExportLoadsforGroundHeatExchangerSizing_Test.rb</filename>
|
153
153
|
<filetype>rb</filetype>
|
154
154
|
<usage_type>test</usage_type>
|
155
|
-
<checksum>
|
155
|
+
<checksum>AB9FCD20</checksum>
|
156
156
|
</file>
|
157
157
|
<file>
|
158
158
|
<filename>USA_CO_Golden-NREL.724666_TMY3.epw</filename>
|
@@ -19,7 +19,7 @@ class GLHEProGFunctionImport < 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
|
+
'GLHEProGFunctionImport'
|
23
23
|
end
|
24
24
|
|
25
25
|
# define the arguments that the user will input
|
@@ -57,7 +57,7 @@ class GLHEProGFunctionImport < OpenStudio::Measure::ModelMeasure
|
|
57
57
|
object.setDisplayName('Select plant loop to add GLHX to')
|
58
58
|
args << object
|
59
59
|
|
60
|
-
|
60
|
+
args
|
61
61
|
end
|
62
62
|
|
63
63
|
# define what happens when the measure is run
|
@@ -65,16 +65,14 @@ class GLHEProGFunctionImport < OpenStudio::Measure::ModelMeasure
|
|
65
65
|
super(model, runner, user_arguments)
|
66
66
|
|
67
67
|
# Use the built-in error checking
|
68
|
-
|
69
|
-
return false
|
70
|
-
end
|
68
|
+
return false unless runner.validateUserArguments(arguments(model), user_arguments)
|
71
69
|
|
72
70
|
# Assign the user inputs to variables
|
73
71
|
g_function_path = runner.getStringArgumentValue('g_function_path', user_arguments)
|
74
72
|
object = runner.getOptionalWorkspaceObjectChoiceValue('object', user_arguments, model)
|
75
73
|
|
76
74
|
# Check to make sure the g function file exists
|
77
|
-
|
75
|
+
unless File.exist?(g_function_path)
|
78
76
|
runner.registerError("The G Function file '#{g_function_path}' could not be found.")
|
79
77
|
return false
|
80
78
|
end
|
@@ -89,17 +87,15 @@ class GLHEProGFunctionImport < OpenStudio::Measure::ModelMeasure
|
|
89
87
|
runner.registerError("The selected loop with handle '#{handle}' was not found in the model. It may have been removed by another measure.")
|
90
88
|
end
|
91
89
|
return false
|
90
|
+
elsif object.get.to_PlantLoop.is_initialized
|
91
|
+
loop = object.get.to_PlantLoop.get
|
92
92
|
else
|
93
|
-
|
94
|
-
|
95
|
-
else
|
96
|
-
runner.registerError('Script Error - argument not showing up as loop.')
|
97
|
-
return false
|
98
|
-
end
|
93
|
+
runner.registerError('Script Error - argument not showing up as loop.')
|
94
|
+
return false
|
99
95
|
end
|
100
96
|
|
101
97
|
# Check the location of the GFunction
|
102
|
-
|
98
|
+
unless File.exist?(g_function_path)
|
103
99
|
runner.registerError("Coulnd't find the G Function file. Check file path and try again: '#{g_function_path}'.")
|
104
100
|
end
|
105
101
|
|
@@ -178,7 +174,7 @@ class GLHEProGFunctionImport < OpenStudio::Measure::ModelMeasure
|
|
178
174
|
|
179
175
|
# Add the G Function pairs after removing all old ones
|
180
176
|
glhx.removeAllGFunctions
|
181
|
-
pair_range = 22..(76 * 2 + 22 - 2) # Pairs start on field 22
|
177
|
+
pair_range = 22..((76 * 2) + 22 - 2) # Pairs start on field 22
|
182
178
|
pair_range.step(2) do |i|
|
183
179
|
lntts = glhx_idf.getDouble(i)
|
184
180
|
gfnc = glhx_idf.getDouble(i + 1)
|
@@ -193,7 +189,7 @@ class GLHEProGFunctionImport < OpenStudio::Measure::ModelMeasure
|
|
193
189
|
glhx.addGFunction(lntts, gfnc)
|
194
190
|
end
|
195
191
|
|
196
|
-
|
192
|
+
true
|
197
193
|
end
|
198
194
|
end
|
199
195
|
|
@@ -3,8 +3,8 @@
|
|
3
3
|
<schema_version>3.1</schema_version>
|
4
4
|
<name>glhe_pro_g_function_import</name>
|
5
5
|
<uid>001536d4-5048-4bc7-a327-57852f33c263</uid>
|
6
|
-
<version_id>
|
7
|
-
<version_modified>2025-
|
6
|
+
<version_id>342cf1e3-cef2-4ce1-aa76-a04aa4d92788</version_id>
|
7
|
+
<version_modified>2025-09-25T15:33:42Z</version_modified>
|
8
8
|
<xml_checksum>4435983D</xml_checksum>
|
9
9
|
<class_name>GLHEProGFunctionImport</class_name>
|
10
10
|
<display_name>GLHEProGFunctionImport</display_name>
|
@@ -71,13 +71,13 @@
|
|
71
71
|
<filename>measure.rb</filename>
|
72
72
|
<filetype>rb</filetype>
|
73
73
|
<usage_type>script</usage_type>
|
74
|
-
<checksum>
|
74
|
+
<checksum>49E95B56</checksum>
|
75
75
|
</file>
|
76
76
|
<file>
|
77
77
|
<filename>GLHEProGFunctionImport_Test.rb</filename>
|
78
78
|
<filetype>rb</filetype>
|
79
79
|
<usage_type>test</usage_type>
|
80
|
-
<checksum>
|
80
|
+
<checksum>4092679A</checksum>
|
81
81
|
</file>
|
82
82
|
</files>
|
83
83
|
</measure>
|
@@ -16,14 +16,12 @@ class GLHEProSetupExportLoadsforGroundHeatExchangerSizing < OpenStudio::Measure:
|
|
16
16
|
# define the name that a user will see, this method may be deprecated as
|
17
17
|
# the display name in PAT comes from the name field in measure.xml
|
18
18
|
def name
|
19
|
-
|
19
|
+
'GLHEProSetupExportLoadsforGroundHeatExchangerSizing'
|
20
20
|
end
|
21
21
|
|
22
22
|
# define the arguments that the user will input
|
23
|
-
def arguments(
|
24
|
-
|
25
|
-
|
26
|
-
return args
|
23
|
+
def arguments(_model)
|
24
|
+
OpenStudio::Measure::OSArgumentVector.new
|
27
25
|
end
|
28
26
|
|
29
27
|
# define what happens when the measure is run
|
@@ -31,9 +29,7 @@ class GLHEProSetupExportLoadsforGroundHeatExchangerSizing < OpenStudio::Measure:
|
|
31
29
|
super(model, runner, user_arguments)
|
32
30
|
|
33
31
|
# use the built-in error checking
|
34
|
-
|
35
|
-
return false
|
36
|
-
end
|
32
|
+
return false unless runner.validateUserArguments(arguments(model), user_arguments)
|
37
33
|
|
38
34
|
# Define the reporting frequency
|
39
35
|
reporting_frequency = 'hourly'
|
@@ -67,7 +63,7 @@ class GLHEProSetupExportLoadsforGroundHeatExchangerSizing < OpenStudio::Measure:
|
|
67
63
|
end
|
68
64
|
end
|
69
65
|
|
70
|
-
|
66
|
+
true
|
71
67
|
end
|
72
68
|
end
|
73
69
|
|
@@ -3,8 +3,8 @@
|
|
3
3
|
<schema_version>3.1</schema_version>
|
4
4
|
<name>glhe_pro_setup_export_loadsfor_ground_heat_exchanger_sizing</name>
|
5
5
|
<uid>9fd3ea9b-ed9f-423a-95dd-fb2bcea0d641</uid>
|
6
|
-
<version_id>
|
7
|
-
<version_modified>2025-
|
6
|
+
<version_id>afd0593a-7d83-4a91-8475-6d7b8af2a06e</version_id>
|
7
|
+
<version_modified>2025-09-25T15:33:42Z</version_modified>
|
8
8
|
<xml_checksum>9DEA48C0</xml_checksum>
|
9
9
|
<class_name>GLHEProSetupExportLoadsforGroundHeatExchangerSizing</class_name>
|
10
10
|
<display_name>GLHEProSetupExportLoadsforGroundHeatExchangerSizing</display_name>
|
@@ -66,7 +66,7 @@
|
|
66
66
|
<filename>measure.rb</filename>
|
67
67
|
<filetype>rb</filetype>
|
68
68
|
<usage_type>script</usage_type>
|
69
|
-
<checksum>
|
69
|
+
<checksum>AA22CE65</checksum>
|
70
70
|
</file>
|
71
71
|
</files>
|
72
72
|
</measure>
|