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/RefrigerationSystem.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_REFRIGERATIONSYSTEM_HPP
7 #define MODEL_REFRIGERATIONSYSTEM_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ModelObject.hpp"
11
12 namespace openstudio {
13
14 namespace model {
15
16 class RefrigerationAirChiller;
17 class RefrigerationCase;
18 class RefrigerationCompressor;
19 class RefrigerationWalkIn;
20 class RefrigerationSecondarySystem;
21 class RefrigerationCondenserCascade;
22 class RefrigerationSubcoolerLiquidSuction;
23 class RefrigerationSubcoolerMechanical;
24 class ThermalZone;
25
26 namespace detail {
27
28 class RefrigerationSystem_Impl;
29
30 } // namespace detail
31
32 /** RefrigerationSystem is a ModelObject that wraps the OpenStudio IDD object 'OS:Refrigeration:System'. */
33 class MODEL_API RefrigerationSystem : public ModelObject
34 {
35 public:
36 /** @name Constructors and Destructors */
37 //@{
38
39 explicit RefrigerationSystem(const Model& model);
40
41 552 virtual ~RefrigerationSystem() override = default;
42 // Default the copy and move operators because the virtual dtor is explicit
43 55 RefrigerationSystem(const RefrigerationSystem& other) = default;
44 205 RefrigerationSystem(RefrigerationSystem&& other) = default;
45 ✗ RefrigerationSystem& operator=(const RefrigerationSystem&) = default;
46 ✗ RefrigerationSystem& operator=(RefrigerationSystem&&) = default;
47
48 //@}
49
50 static IddObjectType iddObjectType();
51
52 static std::vector<std::string> refrigerationSystemWorkingFluidTypeValues();
53
54 static std::vector<std::string> suctionTemperatureControlTypeValues();
55
56 static std::vector<std::string> intercoolerTypeValues();
57
58 // RefrigerationCase will be removed from any ModelObjectList it is already on. Clone the case if you want it on several.
59 bool addCase(const RefrigerationCase& refrigerationCase);
60
61 // Removes child from the list, but does not remove the child object itself
62 void removeCase(const RefrigerationCase& refrigerationCase);
63
64 // Removes all child object from the list, but does not remove the children themselves
65 void removeAllCases();
66
67 std::vector<RefrigerationCase> cases() const;
68
69 // RefrigerationWalkIn will be removed from any ModelObjectList it is already on. Clone the walkin if you want it on several.
70 bool addWalkin(const RefrigerationWalkIn& refrigerationWalkin);
71
72 // Removes child from the list, but does not remove the child object itself
73 void removeWalkin(const RefrigerationWalkIn& refrigerationWalkin);
74
75 // Removes all child object from the list, but does not remove the children themselves
76 void removeAllWalkins();
77
78 std::vector<RefrigerationWalkIn> walkins() const;
79
80 // Compressor will be removed from any ModelObjectList (either as a compressor or high stage compressor) it is already on.
81 // Clone the walkin if you want it on several.
82 bool addCompressor(const RefrigerationCompressor& compressor);
83
84 // Removes child from the list, but does not remove the child object itself
85 void removeCompressor(const RefrigerationCompressor& compressor);
86
87 // Removes all child object from the list, but does not remove the children themselves
88 void removeAllCompressors();
89
90 std::vector<RefrigerationCompressor> compressors() const;
91
92 // Compressor will be removed from any ModelObjectList (either as a compressor or high stage compressor) it is already on.
93 // Clone the walkin if you want it on several.
94 bool addHighStageCompressor(const RefrigerationCompressor& highStageCompressor);
95
96 // Removes child from the list, but does not remove the child object itself
97 void removeHighStageCompressor(const RefrigerationCompressor& highStageCompressor);
98
99 // Removes all child object from the list, but does not remove the children themselves
100 void removeAllHighStageCompressors();
101
102 std::vector<RefrigerationCompressor> highStageCompressors() const;
103
104 // RefrigerationSecondarySystem will be removed from any ModelObjectList it is already on. Clone it if you want it on several.
105 bool addSecondarySystemLoad(const RefrigerationSecondarySystem& refrigerationSecondarySystem);
106
107 // Removes child from the list, but does not remove the child object itself
108 void removeSecondarySystemLoad(const RefrigerationSecondarySystem& refrigerationSecondarySystem);
109
110 // Removes all child object from the list, but does not remove the children themselves
111 void removeAllSecondarySystemLoads();
112
113 std::vector<RefrigerationSecondarySystem> secondarySystemLoads() const;
114
115 // RefrigerationCondenserCascade will be removed from any ModelObjectList it is already on. Clone it if you want it on several.
116 bool addCascadeCondenserLoad(const RefrigerationCondenserCascade& refrigerationCondenserCascade);
117
118 // Removes child from the list, but does not remove the child object itself
119 void removeCascadeCondenserLoad(const RefrigerationCondenserCascade& refrigerationCondenserCascade);
120
121 // Removes all child object from the list, but does not remove the children themselves
122 void removeAllCascadeCondenserLoads();
123
124 std::vector<RefrigerationCondenserCascade> cascadeCondenserLoads() const;
125
126 // RefrigerationAirChiller will be removed from any ModelObjectList it is already on. Clone it if you want it on several.
127 bool addAirChiller(const RefrigerationAirChiller& airChiller);
128
129 // Removes child from the list, but does not remove the child object itself
130 void removeAirChiller(const RefrigerationAirChiller& airChiller);
131
132 // Removes all child object from the list, but does not remove the children themselves
133 void removeAllAirChillers();
134
135 std::vector<RefrigerationAirChiller> airChillers() const;
136
137 /** @name Getters */
138 //@{
139
140 boost::optional<ModelObject> refrigerationCondenser() const;
141
142 double minimumCondensingTemperature() const;
143
144 std::string refrigerationSystemWorkingFluidType() const;
145
146 std::string suctionTemperatureControlType() const;
147
148 bool isSuctionTemperatureControlTypeDefaulted() const;
149
150 boost::optional<RefrigerationSubcoolerMechanical> mechanicalSubcooler() const;
151
152 boost::optional<RefrigerationSubcoolerLiquidSuction> liquidSuctionHeatExchangerSubcooler() const;
153
154 double sumUASuctionPiping() const;
155
156 bool isSumUASuctionPipingDefaulted() const;
157
158 boost::optional<ThermalZone> suctionPipingZone() const;
159
160 std::string endUseSubcategory() const;
161
162 bool isEndUseSubcategoryDefaulted() const;
163
164 std::string numberofCompressorStages() const;
165
166 std::string intercoolerType() const;
167
168 bool isIntercoolerTypeDefaulted() const;
169
170 double shellandCoilIntercoolerEffectiveness() const;
171
172 bool isShellandCoilIntercoolerEffectivenessDefaulted() const;
173
174 //@}
175 /** @name Setters */
176 //@{
177
178 /** \fn bool setRefrigerationCondenser(const ModelObject& refrigerationCondenser)
179 \brief Sets the refrigeration condenser for this refrigeration system. Will remove it from any existing Refrigeration System (unicity enforced)
180 \param[in] refrigerationCondenser The refrigeration condenser.
181
182 Valid inputs: \n
183 \ref RefrigerationCondenserAirCooled \n
184 \ref RefrigerationCondenserCascade \n
185 \ref RefrigerationCondenserEvaporativeCooled \n
186 \ref RefrigerationCondenserWaterCooled \n
187 */
188 bool setRefrigerationCondenser(const ModelObject& refrigerationCondenser);
189
190 void resetRefrigerationCondenser();
191
192 bool setMinimumCondensingTemperature(double minimumCondensingTemperature);
193
194 bool setRefrigerationSystemWorkingFluidType(const std::string& refrigerationSystemWorkingFluidType);
195
196 bool setSuctionTemperatureControlType(const std::string& suctionTemperatureControlType);
197
198 void resetSuctionTemperatureControlType();
199
200 // Will remove it from any existing Refrigeration System (unicity enforced)
201 bool setMechanicalSubcooler(const RefrigerationSubcoolerMechanical& refrigerationSubcoolerMechanical);
202
203 void resetMechanicalSubcooler();
204
205 // Will remove it from any existing Refrigeration System (unicity enforced)
206 bool setLiquidSuctionHeatExchangerSubcooler(const RefrigerationSubcoolerLiquidSuction& refrigerationSubcoolerLiquidSuction);
207
208 void resetLiquidSuctionHeatExchangerSubcooler();
209
210 bool setSumUASuctionPiping(double sumUASuctionPiping);
211
212 void resetSumUASuctionPiping();
213
214 bool setSuctionPipingZone(const ThermalZone& thermalZone);
215
216 void resetSuctionPipingZone();
217
218 bool setEndUseSubcategory(const std::string& endUseSubcategory);
219
220 void resetEndUseSubcategory();
221
222 bool setIntercoolerType(const std::string& intercoolerType);
223
224 void resetIntercoolerType();
225
226 bool setShellandCoilIntercoolerEffectiveness(double shellandCoilIntercoolerEffectiveness);
227
228 void resetShellandCoilIntercoolerEffectiveness();
229
230 //@}
231 /** @name Other */
232 //@{
233
234 //@}
235 protected:
236 /// @cond
237 using ImplType = detail::RefrigerationSystem_Impl;
238
239 explicit RefrigerationSystem(std::shared_ptr<detail::RefrigerationSystem_Impl> impl);
240
241 friend class detail::RefrigerationSystem_Impl;
242 friend class Model;
243 friend class IdfObject;
244 friend class openstudio::detail::IdfObject_Impl;
245 /// @endcond
246 private:
247 REGISTER_LOGGER("openstudio.model.RefrigerationSystem");
248 };
249
250 /** \relates RefrigerationSystem*/
251 using OptionalRefrigerationSystem = boost::optional<RefrigerationSystem>;
252
253 /** \relates RefrigerationSystem*/
254 using RefrigerationSystemVector = std::vector<RefrigerationSystem>;
255
256 } // namespace model
257 } // namespace openstudio
258
259 #endif // MODEL_REFRIGERATIONSYSTEM_HPP
260