@@ -6,22 +6,22 @@ class OpenStudio::Model::AirTerminalSingleDuctVAVReheat
6
6
# and puts them into this object model in place of the autosized fields.
7
7
# Must have previously completed a run with sql output for this to work.
8
8
def applySizingValues
9
-
9
+
10
10
rated_flow_rate = self . autosizedMaximumAirFlowRate
11
11
if rated_flow_rate . is_initialized
12
- self . setMaximumAirFlowRate ( rated_flow_rate . get )
12
+ self . setMaximumAirFlowRate ( rated_flow_rate . get )
13
13
end
14
-
14
+
15
15
maximum_hot_water_or_steam_flow_rate = self . autosizedMaximumHotWaterOrSteamFlowRate
16
16
if maximum_hot_water_or_steam_flow_rate . is_initialized
17
17
self . setMaximumHotWaterOrSteamFlowRate ( maximum_hot_water_or_steam_flow_rate . get )
18
18
end
19
-
19
+
20
20
maximum_flow_per_zone_floor_area_during_reheat = self . autosizedMaximumFlowPerZoneFloorAreaDuringReheat
21
21
if maximum_flow_per_zone_floor_area_during_reheat . is_initialized
22
- self . setMaximumFlowPerZoneFloorAreaDuringReheat ( maximum_flow_per_zone_floor_area_during_reheat . get )
22
+ self . setMaximumFlowPerZoneFloorAreaDuringReheat ( maximum_flow_per_zone_floor_area_during_reheat . get )
23
23
end
24
-
24
+
25
25
maximum_flow_fraction_during_reheat = self . autosizedMaximumFlowFractionDuringReheat
26
26
if maximum_flow_fraction_during_reheat . is_initialized
27
27
self . setMaximumFlowFractionDuringReheat ( maximum_flow_fraction_during_reheat . get )
@@ -35,33 +35,33 @@ def autosizedMaximumAirFlowRate
35
35
result = OpenStudio ::OptionalDouble . new ( )
36
36
37
37
name = self . name . get . upcase
38
-
38
+
39
39
model = self . model
40
-
40
+
41
41
sql = model . sqlFile
42
-
42
+
43
43
if sql . is_initialized
44
44
sql = sql . get
45
-
46
- query = "SELECT Value
47
- FROM tabulardatawithstrings
48
- WHERE ReportName='ComponentSizingSummary'
49
- AND ReportForString='Entire Facility'
50
- AND TableName='AirTerminal:SingleDuct:VAV:Reheat'
51
- AND RowName='#{ name } '
52
- AND ColumnName='Maximum Air Flow Rate'
45
+
46
+ query = "SELECT Value
47
+ FROM tabulardatawithstrings
48
+ WHERE ReportName='ComponentSizingSummary'
49
+ AND ReportForString='Entire Facility'
50
+ AND TableName='AirTerminal:SingleDuct:VAV:Reheat'
51
+ AND RowName='#{ name } '
52
+ AND ColumnName='Design Size Maximum Air Flow Rate'
53
53
AND Units='m3/s'"
54
-
54
+
55
55
val = sql . execAndReturnFirstDouble ( query )
56
-
56
+
57
57
if val . is_initialized
58
58
result = OpenStudio ::OptionalDouble . new ( val . get )
59
59
end
60
-
60
+
61
61
end
62
62
63
63
return result
64
-
64
+
65
65
end
66
66
67
67
# returns the autosized rated power consumption as an optional double
@@ -70,105 +70,105 @@ def autosizedMaximumHotWaterOrSteamFlowRate
70
70
result = OpenStudio ::OptionalDouble . new ( )
71
71
72
72
name = self . name . get . upcase
73
-
73
+
74
74
model = self . model
75
-
75
+
76
76
sql = model . sqlFile
77
-
77
+
78
78
if sql . is_initialized
79
79
sql = sql . get
80
-
81
- query = "SELECT Value
82
- FROM tabulardatawithstrings
83
- WHERE ReportName='ComponentSizingSummary'
84
- AND ReportForString='Entire Facility'
85
- AND TableName='AirTerminal:SingleDuct:VAV:Reheat'
86
- AND RowName='#{ name } '
87
- AND ColumnName='Maximum Reheat Water Flow Rate'
80
+
81
+ query = "SELECT Value
82
+ FROM tabulardatawithstrings
83
+ WHERE ReportName='ComponentSizingSummary'
84
+ AND ReportForString='Entire Facility'
85
+ AND TableName='AirTerminal:SingleDuct:VAV:Reheat'
86
+ AND RowName='#{ name } '
87
+ AND ColumnName='Design Size Maximum Reheat Water Flow Rate'
88
88
AND Units='m3/s'"
89
-
89
+
90
90
val = sql . execAndReturnFirstDouble ( query )
91
-
91
+
92
92
if val . is_initialized
93
93
result = OpenStudio ::OptionalDouble . new ( val . get )
94
94
end
95
-
95
+
96
96
end
97
97
98
98
return result
99
-
100
- end
101
-
99
+
100
+ end
101
+
102
102
# returns the autosized maximum flow per zone floor area during reheat as an optional double
103
103
def autosizedMaximumFlowPerZoneFloorAreaDuringReheat
104
104
105
105
result = OpenStudio ::OptionalDouble . new ( )
106
106
107
107
name = self . name . get . upcase
108
-
108
+
109
109
model = self . model
110
-
110
+
111
111
sql = model . sqlFile
112
-
112
+
113
113
if sql . is_initialized
114
114
sql = sql . get
115
-
116
- query = "SELECT Value
117
- FROM tabulardatawithstrings
118
- WHERE ReportName='ComponentSizingSummary'
119
- AND ReportForString='Entire Facility'
120
- AND TableName='AirTerminal:SingleDuct:VAV:Reheat'
121
- AND RowName='#{ name } '
122
- AND ColumnName='Maximum Flow per Zone Floor Area during Reheat'
115
+
116
+ query = "SELECT Value
117
+ FROM tabulardatawithstrings
118
+ WHERE ReportName='ComponentSizingSummary'
119
+ AND ReportForString='Entire Facility'
120
+ AND TableName='AirTerminal:SingleDuct:VAV:Reheat'
121
+ AND RowName='#{ name } '
122
+ AND ColumnName='Design Size Maximum Flow per Zone Floor Area during Reheat'
123
123
AND Units='m3/s-m2'"
124
-
124
+
125
125
val = sql . execAndReturnFirstDouble ( query )
126
-
126
+
127
127
if val . is_initialized
128
128
result = OpenStudio ::OptionalDouble . new ( val . get )
129
129
end
130
-
130
+
131
131
end
132
132
133
133
return result
134
-
135
- end
136
-
134
+
135
+ end
136
+
137
137
# returns the autosized maximum flow fraction during reheat as an optional double
138
138
def autosizedMaximumFlowFractionDuringReheat
139
139
140
140
result = OpenStudio ::OptionalDouble . new ( )
141
141
142
142
name = self . name . get . upcase
143
-
143
+
144
144
model = self . model
145
-
145
+
146
146
sql = model . sqlFile
147
-
147
+
148
148
if sql . is_initialized
149
149
sql = sql . get
150
-
151
- query = "SELECT Value
152
- FROM tabulardatawithstrings
153
- WHERE ReportName='ComponentSizingSummary'
154
- AND ReportForString='Entire Facility'
155
- AND TableName='AirTerminal:SingleDuct:VAV:Reheat'
156
- AND RowName='#{ name } '
157
- AND ColumnName='Maximum Flow Fraction during Reheat'"
158
-
150
+
151
+ query = "SELECT Value
152
+ FROM tabulardatawithstrings
153
+ WHERE ReportName='ComponentSizingSummary'
154
+ AND ReportForString='Entire Facility'
155
+ AND TableName='AirTerminal:SingleDuct:VAV:Reheat'
156
+ AND RowName='#{ name } '
157
+ AND ColumnName='Design Size Maximum Flow Fraction during Reheat'"
158
+
159
159
val = sql . execAndReturnFirstDouble ( query )
160
-
160
+
161
161
if val . is_initialized
162
162
result = OpenStudio ::OptionalDouble . new ( val . get )
163
163
end
164
-
164
+
165
165
end
166
166
167
167
return result
168
-
169
- end
170
-
171
-
172
168
173
-
169
+ end
170
+
171
+
172
+
173
+
174
174
end
0 commit comments