GCC Code Coverage Report


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

src/model/ChillerElectricReformulatedEIR.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_CHILLERELECTRICREFORMULATEDEIR_HPP
7 #define MODEL_CHILLERELECTRICREFORMULATEDEIR_HPP
8
9 #include "ModelAPI.hpp"
10 #include "WaterToWaterComponent.hpp"
11
12 namespace openstudio {
13
14 namespace model {
15
16 class Curve;
17 class Schedule;
18 class Node;
19
20 namespace detail {
21
22 class ChillerElectricReformulatedEIR_Impl;
23
24 } // namespace detail
25
26 /** ChillerElectricReformulatedEIR is a StraightComponent that wraps the OpenStudio IDD object
27 * 'OS:Chiller:Electric:EIR'. */
28 class MODEL_API ChillerElectricReformulatedEIR : public WaterToWaterComponent
29 {
30 public:
31 /**
32 *
33 *\param model the Model to put the chiller in
34 *\param CCFofT Cooling Capacity as a Function of Temp
35 *\param EItoCORFofT Electric Input to Cooling Output Ratio as a Function of Temp
36 *\param EItoCORFofPLR Electric Input to Cooling Output Ratio as a Function of Partial Load Ratio
37 */
38 explicit ChillerElectricReformulatedEIR(const Model& model, const Curve& CCFofT, const Curve& EItoCORFofT, const Curve& EItoCORFofPLR);
39
40 explicit ChillerElectricReformulatedEIR(const Model& model);
41
42 15 virtual ~ChillerElectricReformulatedEIR() override = default;
43 // Default the copy and move operators because the virtual dtor is explicit
44 ✗ ChillerElectricReformulatedEIR(const ChillerElectricReformulatedEIR& other) = default;
45 ✗ ChillerElectricReformulatedEIR(ChillerElectricReformulatedEIR&& other) = default;
46 ✗ ChillerElectricReformulatedEIR& operator=(const ChillerElectricReformulatedEIR&) = default;
47 ✗ ChillerElectricReformulatedEIR& operator=(ChillerElectricReformulatedEIR&&) = default;
48
49 //@}
50
51 static IddObjectType iddObjectType();
52
53 static std::vector<std::string> validChillerFlowModeValues();
54
55 static std::vector<std::string> validCondenserFlowControlValues();
56
57 static std::vector<std::string> validElectricInputToCoolingOutputRatioFunctionOfPLRTypeValues();
58
59 /** @name Getters */
60 //@{
61
62 boost::optional<double> referenceCapacity() const;
63
64 bool isReferenceCapacityAutosized() const;
65
66 double referenceCOP() const;
67
68 double referenceLeavingChilledWaterTemperature() const;
69
70 bool isReferenceLeavingChilledWaterTemperatureDefaulted() const;
71
72 double referenceLeavingCondenserWaterTemperature() const;
73
74 bool isReferenceLeavingCondenserWaterTemperatureDefaulted() const;
75
76 boost::optional<double> referenceChilledWaterFlowRate() const;
77
78 bool isReferenceChilledWaterFlowRateAutosized() const;
79
80 boost::optional<double> referenceCondenserWaterFlowRate() const;
81
82 bool isReferenceCondenserWaterFlowRateAutosized() const;
83
84 Curve coolingCapacityFunctionOfTemperature() const;
85
86 Curve electricInputToCoolingOutputRatioFunctionOfTemperature() const;
87
88 std::string electricInputToCoolingOutputRatioFunctionOfPLRType() const;
89
90 Curve electricInputToCoolingOutputRatioFunctionOfPLR() const;
91
92 double minimumPartLoadRatio() const;
93
94 bool isMinimumPartLoadRatioDefaulted() const;
95
96 double maximumPartLoadRatio() const;
97
98 bool isMaximumPartLoadRatioDefaulted() const;
99
100 double optimumPartLoadRatio() const;
101
102 bool isOptimumPartLoadRatioDefaulted() const;
103
104 double minimumUnloadingRatio() const;
105
106 bool isMinimumUnloadingRatioDefaulted() const;
107
108 double fractionofCompressorElectricConsumptionRejectedbyCondenser() const;
109
110 bool isFractionofCompressorElectricConsumptionRejectedbyCondenserDefaulted() const;
111
112 double leavingChilledWaterLowerTemperatureLimit() const;
113
114 bool isLeavingChilledWaterLowerTemperatureLimitDefaulted() const;
115
116 std::string chillerFlowMode() const;
117
118 bool isChillerFlowModeDefaulted() const;
119
120 boost::optional<double> designHeatRecoveryWaterFlowRate() const;
121
122 bool isDesignHeatRecoveryWaterFlowRateAutosized() const;
123
124 double sizingFactor() const;
125
126 bool isSizingFactorDefaulted() const;
127
128 double condenserHeatRecoveryRelativeCapacityFraction() const;
129
130 boost::optional<Schedule> heatRecoveryInletHighTemperatureLimitSchedule() const;
131
132 boost::optional<Node> heatRecoveryLeavingTemperatureSetpointNode() const;
133
134 std::string endUseSubcategory() const;
135
136 std::string condenserFlowControl() const;
137
138 boost::optional<Curve> condenserLoopFlowRateFractionFunctionofLoopPartLoadRatioCurve() const;
139
140 boost::optional<Schedule> temperatureDifferenceAcrossCondenserSchedule() const;
141
142 double condenserMinimumFlowFraction() const;
143
144 boost::optional<Curve> thermosiphonCapacityFractionCurve() const;
145
146 double thermosiphonMinimumTemperatureDifference() const;
147
148 //@}
149 /** @name Setters */
150 //@{
151
152 bool setReferenceCapacity(boost::optional<double> referenceCapacity);
153
154 bool setReferenceCapacity(double referenceCapacity);
155
156 void autosizeReferenceCapacity();
157
158 bool setReferenceCOP(double referenceCOP);
159
160 bool setReferenceLeavingChilledWaterTemperature(double referenceLeavingChilledWaterTemperature);
161
162 void resetReferenceLeavingChilledWaterTemperature();
163
164 bool setReferenceLeavingCondenserWaterTemperature(double referenceLeavingCondenserWaterTemperature);
165
166 void resetReferenceLeavingCondenserWaterTemperature();
167
168 bool setReferenceChilledWaterFlowRate(boost::optional<double> referenceChilledWaterFlowRate);
169
170 bool setReferenceChilledWaterFlowRate(double referenceChilledWaterFlowRate);
171
172 void resetReferenceChilledWaterFlowRate();
173
174 void autosizeReferenceChilledWaterFlowRate();
175
176 bool setReferenceCondenserWaterFlowRate(boost::optional<double> referenceCondenserWaterFlowRate);
177
178 bool setReferenceCondenserWaterFlowRate(double referenceCondenserWaterFlowRate);
179
180 void resetReferenceCondenserWaterFlowRate();
181
182 void autosizeReferenceCondenserWaterFlowRate();
183
184 bool setCoolingCapacityFunctionOfTemperature(const Curve&);
185
186 bool setElectricInputToCoolingOutputRatioFunctionOfTemperature(const Curve&);
187
188 bool setElectricInputToCoolingOutputRatioFunctionOfPLRType(const std::string& electricInputToCoolingOutputRatioFunctionOfPLRType);
189
190 void resetElectricInputToCoolingOutputRatioFunctionOfPLRType();
191
192 bool setElectricInputToCoolingOutputRatioFunctionOfPLR(const Curve&);
193
194 bool setMinimumPartLoadRatio(double minimumPartLoadRatio);
195
196 void resetMinimumPartLoadRatio();
197
198 bool setMaximumPartLoadRatio(double maximumPartLoadRatio);
199
200 void resetMaximumPartLoadRatio();
201
202 bool setOptimumPartLoadRatio(double optimumPartLoadRatio);
203
204 void resetOptimumPartLoadRatio();
205
206 bool setMinimumUnloadingRatio(double minimumUnloadingRatio);
207
208 void resetMinimumUnloadingRatio();
209
210 bool setFractionofCompressorElectricConsumptionRejectedbyCondenser(double fractionofCompressorElectricConsumptionRejectedbyCondenser);
211
212 void resetFractionofCompressorElectricConsumptionRejectedbyCondenser();
213
214 bool setLeavingChilledWaterLowerTemperatureLimit(double leavingChilledWaterLowerTemperatureLimit);
215
216 void resetLeavingChilledWaterLowerTemperatureLimit();
217
218 bool setChillerFlowMode(const std::string& chillerFlowMode);
219
220 void resetChillerFlowMode();
221
222 bool setDesignHeatRecoveryWaterFlowRate(double designHeatRecoveryWaterFlowRate);
223
224 void autosizeDesignHeatRecoveryWaterFlowRate();
225
226 bool setSizingFactor(double sizingFactor);
227
228 void resetSizingFactor();
229
230 bool setCondenserHeatRecoveryRelativeCapacityFraction(double condenserHeatRecoveryRelativeCapacityFraction);
231
232 bool setHeatRecoveryInletHighTemperatureLimitSchedule(Schedule& s);
233 void resetHeatRecoveryInletHighTemperatureLimitSchedule();
234
235 bool setHeatRecoveryLeavingTemperatureSetpointNode(const Node& node);
236 void resetHeatRecoveryLeavingTemperatureSetpointNode();
237
238 bool setEndUseSubcategory(const std::string& endUseSubcategory);
239
240 bool setCondenserFlowControl(const std::string& condenserFlowControl);
241
242 bool setCondenserLoopFlowRateFractionFunctionofLoopPartLoadRatioCurve(const Curve& condenserLoopFlowRateFractionFunctionofLoopPartLoadRatioCurve);
243 void resetCondenserLoopFlowRateFractionFunctionofLoopPartLoadRatioCurve();
244
245 bool setTemperatureDifferenceAcrossCondenserSchedule(Schedule& temperatureDifferenceAcrossCondenserSchedule);
246 void resetTemperatureDifferenceAcrossCondenserSchedule();
247
248 bool setCondenserMinimumFlowFraction(double condenserMinimumFlowFraction);
249
250 bool setThermosiphonCapacityFractionCurve(const Curve& thermosiphonCapacityFractionCurve);
251 void resetThermosiphonCapacityFractionCurve();
252
253 bool setThermosiphonMinimumTemperatureDifference(double thermosiphonMinimumTemperatureDifference);
254
255 //@}
256 /** @name Other */
257 //@{
258 //
259
260 boost::optional<double> autosizedReferenceCapacity() const;
261
262 boost::optional<double> autosizedReferenceChilledWaterFlowRate() const;
263
264 boost::optional<double> autosizedReferenceCondenserWaterFlowRate() const;
265
266 boost::optional<double> autosizedDesignHeatRecoveryWaterFlowRate() const;
267
268 /** Convenience Function to return the Chilled Water Loop (chiller on supply) **/
269 boost::optional<PlantLoop> chilledWaterLoop() const;
270 // Same as supplyInletModelObject, but cast to a Node
271 boost::optional<Node> chilledWaterInletNode() const;
272 boost::optional<Node> chilledWaterOutletNode() const;
273
274 /** Convenience Function to return the Condenser Water Loop (chiller on demand side) **/
275 boost::optional<PlantLoop> condenserWaterLoop() const;
276 boost::optional<Node> condenserInletNode() const;
277 boost::optional<Node> condenserOutletNode() const;
278
279 /** Convenience Function to return the Heat Recovery Loop (chiller on demand side - tertiary) **/
280 boost::optional<PlantLoop> heatRecoveryLoop() const;
281 boost::optional<Node> heatRecoveryInletNode() const;
282 boost::optional<Node> heatRecoveryOutletNode() const;
283
284 //@}
285 protected:
286 /// @cond
287 using ImplType = detail::ChillerElectricReformulatedEIR_Impl;
288
289 friend class Model;
290 friend class openstudio::IdfObject;
291
292 explicit ChillerElectricReformulatedEIR(std::shared_ptr<detail::ChillerElectricReformulatedEIR_Impl> impl);
293
294 /// @endcond
295 private:
296 REGISTER_LOGGER("openstudio.model.ChillerElectricReformulatedEIR");
297 };
298
299 /** \relates ChillerElectricReformulatedEIR*/
300 using OptionalChillerElectricReformulatedEIR = boost::optional<ChillerElectricReformulatedEIR>;
301
302 /** \relates ChillerElectricReformulatedEIR*/
303 using ChillerElectricReformulatedEIRVector = std::vector<ChillerElectricReformulatedEIR>;
304
305 } // namespace model
306
307 } // namespace openstudio
308
309 #endif // MODEL_CHILLERELECTRICREFORMULATEDEIR_HPP
310