GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 60.0% 3 / 0 / 5
Functions: 60.0% 3 / 0 / 5
Branches: -% 0 / 0 / 0

src/model/SizingSystem.hpp
Line Branch Exec Source
1 /***********************************************************************************************************************
2 * OpenStudio(R), Copyright (c) Alliance for Energy Innovation, LLC.
3 * See also https://openstudio.net/license
4 ***********************************************************************************************************************/
5
6 #ifndef MODEL_SIZINGSYSTEM_HPP
7 #define MODEL_SIZINGSYSTEM_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ModelObject.hpp"
11
12 namespace openstudio {
13
14 namespace model {
15
16 class AirLoopHVAC;
17
18 namespace detail {
19
20 class SizingSystem_Impl;
21 class AirLoopHVAC_Impl;
22
23 } // namespace detail
24
25 /** SizingSystem is a ModelObject that wraps the OpenStudio IDD object 'OS:Sizing:System'. */
26 class MODEL_API SizingSystem : public ModelObject
27 {
28 public:
29 explicit SizingSystem(const Model& model, const AirLoopHVAC& airLoopHVAC);
30
31 3249 virtual ~SizingSystem() override = default;
32 // Default the copy and move operators because the virtual dtor is explicit
33 1401 SizingSystem(const SizingSystem& other) = default;
34 471 SizingSystem(SizingSystem&& other) = default;
35 ✗ SizingSystem& operator=(const SizingSystem&) = default;
36 ✗ SizingSystem& operator=(SizingSystem&&) = default;
37
38 static IddObjectType iddObjectType();
39
40 static std::vector<std::string> validTypeofLoadtoSizeOnValues();
41
42 static std::vector<std::string> validSizingOptionValues();
43
44 static std::vector<std::string> validCoolingDesignAirFlowMethodValues();
45
46 static std::vector<std::string> validHeatingDesignAirFlowMethodValues();
47
48 static std::vector<std::string> validSystemOutdoorAirMethodValues();
49
50 static std::vector<std::string> heatingCoilSizingMethodValues();
51
52 std::string typeofLoadtoSizeOn() const;
53
54 bool isTypeofLoadtoSizeOnDefaulted() const;
55
56 boost::optional<double> designOutdoorAirFlowRate() const;
57
58 bool isDesignOutdoorAirFlowRateDefaulted() const;
59
60 bool isDesignOutdoorAirFlowRateAutosized() const;
61
62 boost::optional<double> centralHeatingMaximumSystemAirFlowRatio() const;
63
64 bool isCentralHeatingMaximumSystemAirFlowRatioDefaulted() const;
65
66 bool isCentralHeatingMaximumSystemAirFlowRatioAutosized() const;
67
68 double preheatDesignTemperature() const;
69
70 double preheatDesignHumidityRatio() const;
71
72 double precoolDesignTemperature() const;
73
74 double precoolDesignHumidityRatio() const;
75
76 double centralCoolingDesignSupplyAirTemperature() const;
77
78 double centralHeatingDesignSupplyAirTemperature() const;
79
80 /** In EnergyPlus 8.3.0 and above this property maps to the EnergyPlus field "Type of Zone Sum to Use" **/
81 std::string sizingOption() const;
82
83 bool isSizingOptionDefaulted() const;
84
85 bool allOutdoorAirinCooling() const;
86
87 bool isAllOutdoorAirinCoolingDefaulted() const;
88
89 bool allOutdoorAirinHeating() const;
90
91 bool isAllOutdoorAirinHeatingDefaulted() const;
92
93 double centralCoolingDesignSupplyAirHumidityRatio() const;
94
95 bool isCentralCoolingDesignSupplyAirHumidityRatioDefaulted() const;
96
97 double centralHeatingDesignSupplyAirHumidityRatio() const;
98
99 bool isCentralHeatingDesignSupplyAirHumidityRatioDefaulted() const;
100
101 /** In EnergyPlus 8.3.0 and above this property maps to the EnergyPlus field "Cooling Supply Air Flow Rate Method" **/
102 std::string coolingDesignAirFlowMethod() const;
103
104 bool isCoolingDesignAirFlowMethodDefaulted() const;
105
106 /** In EnergyPlus 8.3.0 and above this property maps to the EnergyPlus field "Cooling Supply Air Flow Rate" **/
107 double coolingDesignAirFlowRate() const;
108
109 bool isCoolingDesignAirFlowRateDefaulted() const;
110
111 /** In EnergyPlus 8.3.0 and above this property maps to the EnergyPlus field "Heating Supply Air Flow Rate Method" **/
112 std::string heatingDesignAirFlowMethod() const;
113
114 bool isHeatingDesignAirFlowMethodDefaulted() const;
115
116 /** In EnergyPlus 8.3.0 and above this property maps to the EnergyPlus field "Heating Supply Air Flow Rate" **/
117 double heatingDesignAirFlowRate() const;
118
119 bool isHeatingDesignAirFlowRateDefaulted() const;
120
121 std::string systemOutdoorAirMethod() const;
122
123 bool isSystemOutdoorAirMethodDefaulted() const;
124
125 double zoneMaximumOutdoorAirFraction() const;
126
127 double coolingSupplyAirFlowRatePerFloorArea() const;
128
129 double coolingFractionofAutosizedCoolingSupplyAirFlowRate() const;
130
131 double coolingSupplyAirFlowRatePerUnitCoolingCapacity() const;
132
133 double heatingSupplyAirFlowRatePerFloorArea() const;
134
135 double heatingFractionofAutosizedHeatingSupplyAirFlowRate() const;
136
137 double heatingFractionofAutosizedCoolingSupplyAirFlowRate() const;
138
139 double heatingSupplyAirFlowRatePerUnitHeatingCapacity() const;
140
141 std::string coolingDesignCapacityMethod() const;
142
143 boost::optional<double> coolingDesignCapacity() const;
144
145 bool isCoolingDesignCapacityAutosized() const;
146
147 double coolingDesignCapacityPerFloorArea() const;
148
149 double fractionofAutosizedCoolingDesignCapacity() const;
150
151 std::string heatingDesignCapacityMethod() const;
152
153 boost::optional<double> heatingDesignCapacity() const;
154
155 bool isHeatingDesignCapacityAutosized() const;
156
157 double heatingDesignCapacityPerFloorArea() const;
158
159 double fractionofAutosizedHeatingDesignCapacity() const;
160
161 std::string centralCoolingCapacityControlMethod() const;
162
163 boost::optional<double> occupantDiversity() const;
164
165 bool isOccupantDiversityAutosized() const;
166
167 std::string heatingCoilSizingMethod() const;
168
169 double maximumHeatingCapacityToCoolingCapacitySizingRatio() const;
170
171 bool setTypeofLoadtoSizeOn(const std::string& typeofLoadtoSizeOn);
172
173 void resetTypeofLoadtoSizeOn();
174
175 bool setDesignOutdoorAirFlowRate(double designOutdoorAirFlowRate);
176
177 void resetDesignOutdoorAirFlowRate();
178
179 void autosizeDesignOutdoorAirFlowRate();
180
181 bool setCentralHeatingMaximumSystemAirFlowRatio(double centralHeatingMaximumSystemAirFlowRatio);
182
183 void resetCentralHeatingMaximumSystemAirFlowRatio();
184
185 void autosizeCentralHeatingMaximumSystemAirFlowRatio();
186
187 bool setPreheatDesignTemperature(double preheatDesignTemperature);
188
189 bool setPreheatDesignHumidityRatio(double preheatDesignHumidityRatio);
190
191 bool setPrecoolDesignTemperature(double precoolDesignTemperature);
192
193 bool setPrecoolDesignHumidityRatio(double precoolDesignHumidityRatio);
194
195 bool setCentralCoolingDesignSupplyAirTemperature(double centralCoolingDesignSupplyAirTemperature);
196
197 bool setCentralHeatingDesignSupplyAirTemperature(double centralHeatingDesignSupplyAirTemperature);
198
199 bool setSizingOption(const std::string& sizingOption);
200
201 void resetSizingOption();
202
203 bool setAllOutdoorAirinCooling(bool allOutdoorAirinCooling);
204
205 void resetAllOutdoorAirinCooling();
206
207 bool setAllOutdoorAirinHeating(bool allOutdoorAirinHeating);
208
209 void resetAllOutdoorAirinHeating();
210
211 bool setCentralCoolingDesignSupplyAirHumidityRatio(double centralCoolingDesignSupplyAirHumidityRatio);
212
213 void resetCentralCoolingDesignSupplyAirHumidityRatio();
214
215 bool setCentralHeatingDesignSupplyAirHumidityRatio(double centralHeatingDesignSupplyAirHumidityRatio);
216
217 void resetCentralHeatingDesignSupplyAirHumidityRatio();
218
219 bool setCoolingDesignAirFlowMethod(const std::string& coolingDesignAirFlowMethod);
220
221 void resetCoolingDesignAirFlowMethod();
222
223 bool setCoolingDesignAirFlowRate(double coolingDesignAirFlowRate);
224
225 void resetCoolingDesignAirFlowRate();
226
227 bool setHeatingDesignAirFlowMethod(const std::string& heatingDesignAirFlowMethod);
228
229 void resetHeatingDesignAirFlowMethod();
230
231 bool setHeatingDesignAirFlowRate(double heatingDesignAirFlowRate);
232
233 void resetHeatingDesignAirFlowRate();
234
235 bool setSystemOutdoorAirMethod(const std::string& systemOutdoorAirMethod);
236
237 void resetSystemOutdoorAirMethod();
238
239 bool setZoneMaximumOutdoorAirFraction(double zoneMaximumOutdoorAirFraction);
240
241 bool setCoolingSupplyAirFlowRatePerFloorArea(double coolingSupplyAirFlowRatePerFloorArea);
242
243 bool setCoolingFractionofAutosizedCoolingSupplyAirFlowRate(double coolingFractionofAutosizedCoolingSupplyAirFlowRate);
244
245 bool setCoolingSupplyAirFlowRatePerUnitCoolingCapacity(double coolingSupplyAirFlowRatePerUnitCoolingCapacity);
246
247 bool setHeatingSupplyAirFlowRatePerFloorArea(double heatingSupplyAirFlowRatePerFloorArea);
248
249 bool setHeatingFractionofAutosizedHeatingSupplyAirFlowRate(double heatingFractionofAutosizedHeatingSupplyAirFlowRate);
250
251 bool setHeatingFractionofAutosizedCoolingSupplyAirFlowRate(double heatingFractionofAutosizedCoolingSupplyAirFlowRate);
252
253 bool setHeatingSupplyAirFlowRatePerUnitHeatingCapacity(double heatingSupplyAirFlowRatePerUnitHeatingCapacity);
254
255 bool setCoolingDesignCapacityMethod(const std::string& coolingDesignCapacityMethod);
256
257 bool setCoolingDesignCapacity(double coolingDesignCapacity);
258
259 void autosizeCoolingDesignCapacity();
260
261 bool setCoolingDesignCapacityPerFloorArea(double coolingDesignCapacityPerFloorArea);
262
263 bool setFractionofAutosizedCoolingDesignCapacity(double fractionofAutosizedCoolingDesignCapacity);
264
265 bool setHeatingDesignCapacityMethod(const std::string& heatingDesignCapacityMethod);
266
267 bool setHeatingDesignCapacity(double heatingDesignCapacity);
268
269 void autosizeHeatingDesignCapacity();
270
271 bool setHeatingDesignCapacityPerFloorArea(double heatingDesignCapacityPerFloorArea);
272
273 bool setFractionofAutosizedHeatingDesignCapacity(double fractionofAutosizedHeatingDesignCapacity);
274
275 bool setCentralCoolingCapacityControlMethod(const std::string& centralCoolingCapacityControlMethod);
276
277 bool setOccupantDiversity(double occupantDiversity);
278
279 void autosizeOccupantDiversity();
280
281 bool setHeatingCoilSizingMethod(const std::string& heatingCoilSizingMethod);
282
283 bool setMaximumHeatingCapacityToCoolingCapacitySizingRatio(double maximumHeatingCapacityToCoolingCapacitySizingRatio);
284
285 AirLoopHVAC airLoopHVAC() const;
286
287 boost::optional<double> autosizedDesignOutdoorAirFlowRate() const;
288 boost::optional<double> autosizedCentralHeatingMaximumSystemAirFlowRatio() const;
289 boost::optional<double> autosizedCoolingDesignCapacity() const;
290 boost::optional<double> autosizedHeatingDesignCapacity() const;
291 boost::optional<double> autosizedOccupantDiversity() const;
292
293 void autosize();
294
295 void applySizingValues();
296
297 protected:
298 /// @cond
299
300 bool setAirLoopHVAC(const AirLoopHVAC& airLoopHVAC);
301
302 using ImplType = detail::SizingSystem_Impl;
303
304 explicit SizingSystem(std::shared_ptr<detail::SizingSystem_Impl> impl);
305
306 friend class detail::SizingSystem_Impl;
307 friend class Model;
308 friend class IdfObject;
309 friend class AirLoopHVAC;
310 friend class detail::AirLoopHVAC_Impl;
311 friend class openstudio::detail::IdfObject_Impl;
312
313 /// @endcond
314
315 private:
316 REGISTER_LOGGER("openstudio.model.SizingSystem");
317 };
318
319 /** \relates SizingSystem*/
320 using OptionalSizingSystem = boost::optional<SizingSystem>;
321
322 /** \relates SizingSystem*/
323 using SizingSystemVector = std::vector<SizingSystem>;
324
325 } // namespace model
326
327 } // namespace openstudio
328
329 #endif // MODEL_SIZINGSYSTEM_HPP
330