GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 82.5% 773 / 0 / 937
Functions: 85.6% 243 / 0 / 284
Branches: 67.1% 547 / 0 / 815

src/model/ChillerElectricEIR.cpp
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 #include "Model.hpp"
7 #include "ChillerElectricEIR.hpp"
8 #include "ChillerElectricEIR_Impl.hpp"
9 #include "CurveBiquadratic.hpp"
10 #include "CurveBiquadratic_Impl.hpp"
11 #include "CurveQuadratic.hpp"
12 #include "CurveQuadratic_Impl.hpp"
13 #include "Curve.hpp"
14 #include "Curve_Impl.hpp"
15 #include "Schedule.hpp"
16 #include "Schedule_Impl.hpp"
17 #include "Node.hpp"
18 #include "Node_Impl.hpp"
19 #include "PlantLoop.hpp"
20
21 #include "../utilities/core/Assert.hpp"
22 #include "../utilities/data/DataEnums.hpp"
23
24 #include <utilities/idd/IddFactory.hxx>
25 #include <utilities/idd/OS_Chiller_Electric_EIR_FieldEnums.hxx>
26 #include <utilities/idd/IddEnums.hxx>
27 namespace openstudio {
28 namespace model {
29
30 namespace detail {
31
32 34 ChillerElectricEIR_Impl::ChillerElectricEIR_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle)
33 34 : WaterToWaterComponent_Impl(idfObject, model, keepHandle) {
34
4/6
✓ Branch 1 taken 34 times.
✓ Branch 4 taken 34 times.
✓ Branch 7 taken 34 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 34 times.
✗ Branch 13 not taken.
34 OS_ASSERT(idfObject.iddObject().type() == ChillerElectricEIR::iddObjectType());
35 34 }
36
37 1 ChillerElectricEIR_Impl::ChillerElectricEIR_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle)
38 1 : WaterToWaterComponent_Impl(other, model, keepHandle) {
39
4/6
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✗ Branch 10 not taken.
✓ Branch 11 taken 1 time.
✗ Branch 13 not taken.
1 OS_ASSERT(other.iddObject().type() == ChillerElectricEIR::iddObjectType());
40 1 }
41
42 5 ChillerElectricEIR_Impl::ChillerElectricEIR_Impl(const ChillerElectricEIR_Impl& other, Model_Impl* model, bool keepHandle)
43 5 : WaterToWaterComponent_Impl(other, model, keepHandle) {}
44
45 ✗ const std::vector<std::string>& ChillerElectricEIR_Impl::outputVariableNames() const {
46 static const std::vector<std::string> result{
47 "Chiller Electricity Rate",
48 "Chiller Electricity Energy",
49 "Chiller Evaporator Cooling Rate",
50 "Chiller Evaporator Cooling Energy",
51 "Chiller Evaporator Inlet Temperature",
52 "Chiller Evaporator Outlet Temperature",
53 "Chiller Evaporator Mass Flow Rate",
54 "Chiller COP",
55 "Chiller Condenser Heat Transfer Rate",
56 "Chiller Condenser Heat Transfer Energy",
57 "Chiller Part Load Ratio",
58 "Chiller Cycling Ratio",
59 "Chiller False Load Heat Transfer Rate",
60 "Chiller False Load Heat Transfer Energy",
61 "Chiller Basin Heater Electricity Energy",
62 "Chiller Basin Heater Electricity Rate",
63 "Chiller Capacity Temperature Modifier Multiplier",
64 "Chiller Condenser Fan Electricity Energy",
65 "Chiller Condenser Fan Electricity Rate",
66 "Chiller Condenser Inlet Temperature",
67 "Chiller Condenser Mass Flow Rate",
68 "Chiller Condenser Outlet Temperature",
69 "Chiller EIR Part Load Modifier Multiplier",
70 "Chiller EIR Temperature Modifier Multiplier",
71 "Chiller Effective Heat Rejection Temperature",
72 "Chiller Evaporative Condenser Mains Supply Water Volume",
73 "Chiller Evaporative Condenser Water Volume",
74 "Chiller Heat Recovery Inlet Temperature",
75 "Chiller Heat Recovery Mass Flow Rate",
76 "Chiller Heat Recovery Outlet Temperature",
77 "Chiller Total Recovered Heat Energy",
78 "Chiller Total Recovered Heat Rate",
79 "Thermosiphon Status",
80 ✗ };
81 ✗ return result;
82 ✗ }
83
84 9 IddObjectType ChillerElectricEIR_Impl::iddObjectType() const {
85 9 return ChillerElectricEIR::iddObjectType();
86 }
87
88 ✗ std::vector<ScheduleTypeKey> ChillerElectricEIR_Impl::getScheduleTypeKeys(const Schedule& schedule) const {
89 ✗ std::vector<ScheduleTypeKey> result;
90 ✗ UnsignedVector fieldIndices = getSourceIndices(schedule.handle());
91 ✗ UnsignedVector::const_iterator b(fieldIndices.begin());
92 ✗ UnsignedVector::const_iterator e(fieldIndices.end());
93 ✗ if (std::find(b, e, OS_Chiller_Electric_EIRFields::BasinHeaterOperatingScheduleName) != e) {
94 ✗ result.emplace_back("ChillerElectricEIR", "Basin Heater Operating");
95 ✗ } else if (std::find(b, e, OS_Chiller_Electric_EIRFields::HeatRecoveryInletHighTemperatureLimitScheduleName) != e) {
96 ✗ result.emplace_back("ChillerElectricEIR", "Heat Recovery Inlet High Temperature Limit");
97 ✗ } else if (std::find(b, e, OS_Chiller_Electric_EIRFields::TemperatureDifferenceAcrossCondenserScheduleName) != e) {
98 ✗ result.emplace_back("ChillerElectricEIR", "Temperature Difference Across Condenser");
99 }
100 ✗ return result;
101 ✗ }
102
103 5 boost::optional<double> ChillerElectricEIR_Impl::referenceCapacity() const {
104 5 return getDouble(OS_Chiller_Electric_EIRFields::ReferenceCapacity, true);
105 }
106
107 5 bool ChillerElectricEIR_Impl::isReferenceCapacityAutosized() const {
108 5 bool result = false;
109
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<std::string> value = getString(OS_Chiller_Electric_EIRFields::ReferenceCapacity, true);
110
1/2
✓ Branch 0 taken 5 times.
✗ Branch 1 not taken.
5 if (value) {
111
3/3
✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
10 result = openstudio::istringEqual(value.get(), "Autosize");
112 }
113 5 return result;
114 5 }
115
116 5 double ChillerElectricEIR_Impl::referenceCOP() const {
117
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<double> value = getDouble(OS_Chiller_Electric_EIRFields::ReferenceCOP, true);
118
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
5 OS_ASSERT(value);
119
1/1
✓ Branch 1 taken 5 times.
10 return value.get();
120 }
121
122 6 double ChillerElectricEIR_Impl::referenceLeavingChilledWaterTemperature() const {
123
1/1
✓ Branch 1 taken 6 times.
6 boost::optional<double> value = getDouble(OS_Chiller_Electric_EIRFields::ReferenceLeavingChilledWaterTemperature, true);
124
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 6 times.
✗ Branch 4 not taken.
6 OS_ASSERT(value);
125
1/1
✓ Branch 1 taken 6 times.
12 return value.get();
126 }
127
128 3 bool ChillerElectricEIR_Impl::isReferenceLeavingChilledWaterTemperatureDefaulted() const {
129 3 return isEmpty(OS_Chiller_Electric_EIRFields::ReferenceLeavingChilledWaterTemperature);
130 }
131
132 6 double ChillerElectricEIR_Impl::referenceEnteringCondenserFluidTemperature() const {
133
1/1
✓ Branch 1 taken 6 times.
6 boost::optional<double> value = getDouble(OS_Chiller_Electric_EIRFields::ReferenceEnteringCondenserFluidTemperature, true);
134
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 6 times.
✗ Branch 4 not taken.
6 OS_ASSERT(value);
135
1/1
✓ Branch 1 taken 6 times.
12 return value.get();
136 }
137
138 3 bool ChillerElectricEIR_Impl::isReferenceEnteringCondenserFluidTemperatureDefaulted() const {
139 3 return isEmpty(OS_Chiller_Electric_EIRFields::ReferenceEnteringCondenserFluidTemperature);
140 }
141
142 5 boost::optional<double> ChillerElectricEIR_Impl::referenceChilledWaterFlowRate() const {
143 5 return getDouble(OS_Chiller_Electric_EIRFields::ReferenceChilledWaterFlowRate, true);
144 }
145
146 5 bool ChillerElectricEIR_Impl::isReferenceChilledWaterFlowRateAutosized() const {
147 5 bool result = false;
148
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<std::string> value = getString(OS_Chiller_Electric_EIRFields::ReferenceChilledWaterFlowRate, true);
149
1/2
✓ Branch 0 taken 5 times.
✗ Branch 1 not taken.
5 if (value) {
150
3/3
✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
10 result = openstudio::istringEqual(value.get(), "Autosize");
151 }
152 5 return result;
153 5 }
154
155 5 boost::optional<double> ChillerElectricEIR_Impl::referenceCondenserFluidFlowRate() const {
156 5 return getDouble(OS_Chiller_Electric_EIRFields::ReferenceCondenserFluidFlowRate, true);
157 }
158
159 6 bool ChillerElectricEIR_Impl::isReferenceCondenserFluidFlowRateAutosized() const {
160 6 bool result = false;
161
1/1
✓ Branch 1 taken 6 times.
6 boost::optional<std::string> value = getString(OS_Chiller_Electric_EIRFields::ReferenceCondenserFluidFlowRate, true);
162
1/2
✓ Branch 0 taken 6 times.
✗ Branch 1 not taken.
6 if (value) {
163
3/3
✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
✓ Branch 7 taken 6 times.
12 result = openstudio::istringEqual(value.get(), "Autosize");
164 }
165 6 return result;
166 6 }
167
168 17 Curve ChillerElectricEIR_Impl::coolingCapacityFunctionOfTemperature() const {
169
3/3
✓ Branch 1 taken 17 times.
✓ Branch 4 taken 17 times.
✓ Branch 7 taken 17 times.
17 WorkspaceObject wo = getTarget(OS_Chiller_Electric_EIRFields::CoolingCapacityFunctionofTemperatureCurveName).get();
170
3/3
✓ Branch 1 taken 17 times.
✓ Branch 4 taken 17 times.
✓ Branch 7 taken 17 times.
34 return wo.optionalCast<Curve>().get();
171 17 }
172
173 17 Curve ChillerElectricEIR_Impl::electricInputToCoolingOutputRatioFunctionOfTemperature() const {
174
3/3
✓ Branch 1 taken 17 times.
✓ Branch 4 taken 17 times.
✓ Branch 7 taken 17 times.
17 WorkspaceObject wo = getTarget(OS_Chiller_Electric_EIRFields::ElectricInputtoCoolingOutputRatioFunctionofTemperatureCurveName).get();
175
3/3
✓ Branch 1 taken 17 times.
✓ Branch 4 taken 17 times.
✓ Branch 7 taken 17 times.
34 return wo.optionalCast<Curve>().get();
176 17 }
177
178 24 Curve ChillerElectricEIR_Impl::electricInputToCoolingOutputRatioFunctionOfPLR() const {
179
3/3
✓ Branch 1 taken 24 times.
✓ Branch 4 taken 24 times.
✓ Branch 7 taken 24 times.
24 WorkspaceObject wo = getTarget(OS_Chiller_Electric_EIRFields::ElectricInputtoCoolingOutputRatioFunctionofPartLoadRatioCurveName).get();
180
3/3
✓ Branch 1 taken 24 times.
✓ Branch 4 taken 24 times.
✓ Branch 7 taken 24 times.
48 return wo.optionalCast<Curve>().get();
181 24 }
182
183 5 double ChillerElectricEIR_Impl::minimumPartLoadRatio() const {
184
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<double> value = getDouble(OS_Chiller_Electric_EIRFields::MinimumPartLoadRatio, true);
185
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
5 OS_ASSERT(value);
186
1/1
✓ Branch 1 taken 5 times.
10 return value.get();
187 }
188
189 3 bool ChillerElectricEIR_Impl::isMinimumPartLoadRatioDefaulted() const {
190 3 return isEmpty(OS_Chiller_Electric_EIRFields::MinimumPartLoadRatio);
191 }
192
193 5 double ChillerElectricEIR_Impl::maximumPartLoadRatio() const {
194
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<double> value = getDouble(OS_Chiller_Electric_EIRFields::MaximumPartLoadRatio, true);
195
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
5 OS_ASSERT(value);
196
1/1
✓ Branch 1 taken 5 times.
10 return value.get();
197 }
198
199 3 bool ChillerElectricEIR_Impl::isMaximumPartLoadRatioDefaulted() const {
200 3 return isEmpty(OS_Chiller_Electric_EIRFields::MaximumPartLoadRatio);
201 }
202
203 5 double ChillerElectricEIR_Impl::optimumPartLoadRatio() const {
204
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<double> value = getDouble(OS_Chiller_Electric_EIRFields::OptimumPartLoadRatio, true);
205
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
5 OS_ASSERT(value);
206
1/1
✓ Branch 1 taken 5 times.
10 return value.get();
207 }
208
209 3 bool ChillerElectricEIR_Impl::isOptimumPartLoadRatioDefaulted() const {
210 3 return isEmpty(OS_Chiller_Electric_EIRFields::OptimumPartLoadRatio);
211 }
212
213 5 double ChillerElectricEIR_Impl::minimumUnloadingRatio() const {
214
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<double> value = getDouble(OS_Chiller_Electric_EIRFields::MinimumUnloadingRatio, true);
215
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
5 OS_ASSERT(value);
216
1/1
✓ Branch 1 taken 5 times.
10 return value.get();
217 }
218
219 3 bool ChillerElectricEIR_Impl::isMinimumUnloadingRatioDefaulted() const {
220 3 return isEmpty(OS_Chiller_Electric_EIRFields::MinimumUnloadingRatio);
221 }
222
223 16 std::string ChillerElectricEIR_Impl::condenserType() const {
224
1/1
✓ Branch 1 taken 16 times.
16 boost::optional<std::string> value = getString(OS_Chiller_Electric_EIRFields::CondenserType, true);
225
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 16 times.
✗ Branch 4 not taken.
16 OS_ASSERT(value);
226
2/2
✓ Branch 1 taken 16 times.
✓ Branch 4 taken 16 times.
32 return value.get();
227 16 }
228
229 ✗ bool ChillerElectricEIR_Impl::isCondenserTypeDefaulted() const {
230 ✗ return isEmpty(OS_Chiller_Electric_EIRFields::CondenserType);
231 }
232
233 5 double ChillerElectricEIR_Impl::condenserFanPowerRatio() const {
234
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<double> value = getDouble(OS_Chiller_Electric_EIRFields::CondenserFanPowerRatio, true);
235
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
5 OS_ASSERT(value);
236
1/1
✓ Branch 1 taken 5 times.
10 return value.get();
237 }
238
239 3 bool ChillerElectricEIR_Impl::isCondenserFanPowerRatioDefaulted() const {
240 3 return isEmpty(OS_Chiller_Electric_EIRFields::CondenserFanPowerRatio);
241 }
242
243 5 double ChillerElectricEIR_Impl::fractionofCompressorElectricConsumptionRejectedbyCondenser() const {
244
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<double> value = getDouble(OS_Chiller_Electric_EIRFields::FractionofCompressorElectricConsumptionRejectedbyCondenser, true);
245
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
5 OS_ASSERT(value);
246
1/1
✓ Branch 1 taken 5 times.
10 return value.get();
247 }
248
249 3 bool ChillerElectricEIR_Impl::isFractionofCompressorElectricConsumptionRejectedbyCondenserDefaulted() const {
250 3 return isEmpty(OS_Chiller_Electric_EIRFields::FractionofCompressorElectricConsumptionRejectedbyCondenser);
251 }
252
253 5 double ChillerElectricEIR_Impl::leavingChilledWaterLowerTemperatureLimit() const {
254
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<double> value = getDouble(OS_Chiller_Electric_EIRFields::LeavingChilledWaterLowerTemperatureLimit, true);
255
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
5 OS_ASSERT(value);
256
1/1
✓ Branch 1 taken 5 times.
10 return value.get();
257 }
258
259 3 bool ChillerElectricEIR_Impl::isLeavingChilledWaterLowerTemperatureLimitDefaulted() const {
260 3 return isEmpty(OS_Chiller_Electric_EIRFields::LeavingChilledWaterLowerTemperatureLimit);
261 }
262
263 6 std::string ChillerElectricEIR_Impl::chillerFlowMode() const {
264
1/1
✓ Branch 1 taken 6 times.
6 boost::optional<std::string> value = getString(OS_Chiller_Electric_EIRFields::ChillerFlowMode, true);
265
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 6 times.
✗ Branch 4 not taken.
6 OS_ASSERT(value);
266
2/2
✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
12 return value.get();
267 6 }
268
269 3 bool ChillerElectricEIR_Impl::isChillerFlowModeDefaulted() const {
270 3 return isEmpty(OS_Chiller_Electric_EIRFields::ChillerFlowMode);
271 }
272
273 5 boost::optional<double> ChillerElectricEIR_Impl::designHeatRecoveryWaterFlowRate() const {
274 5 return getDouble(OS_Chiller_Electric_EIRFields::DesignHeatRecoveryWaterFlowRate, true);
275 }
276
277 3 bool ChillerElectricEIR_Impl::isDesignHeatRecoveryWaterFlowRateAutosized() const {
278 3 bool result = false;
279
1/1
✓ Branch 1 taken 3 times.
3 boost::optional<std::string> value = getString(OS_Chiller_Electric_EIRFields::DesignHeatRecoveryWaterFlowRate, true);
280
1/2
✓ Branch 0 taken 3 times.
✗ Branch 1 not taken.
3 if (value) {
281
3/3
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
6 result = openstudio::istringEqual(value.get(), "Autosize");
282 }
283 3 return result;
284 3 }
285
286 5 double ChillerElectricEIR_Impl::sizingFactor() const {
287
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<double> value = getDouble(OS_Chiller_Electric_EIRFields::SizingFactor, true);
288
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
5 OS_ASSERT(value);
289
1/1
✓ Branch 1 taken 5 times.
10 return value.get();
290 }
291
292 3 bool ChillerElectricEIR_Impl::isSizingFactorDefaulted() const {
293 3 return isEmpty(OS_Chiller_Electric_EIRFields::SizingFactor);
294 }
295
296 5 double ChillerElectricEIR_Impl::basinHeaterCapacity() const {
297
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<double> value = getDouble(OS_Chiller_Electric_EIRFields::BasinHeaterCapacity, true);
298
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
5 OS_ASSERT(value);
299
1/1
✓ Branch 1 taken 5 times.
10 return value.get();
300 }
301
302 3 bool ChillerElectricEIR_Impl::isBasinHeaterCapacityDefaulted() const {
303 3 return isEmpty(OS_Chiller_Electric_EIRFields::BasinHeaterCapacity);
304 }
305
306 7 double ChillerElectricEIR_Impl::basinHeaterSetpointTemperature() const {
307
1/1
✓ Branch 1 taken 7 times.
7 boost::optional<double> value = getDouble(OS_Chiller_Electric_EIRFields::BasinHeaterSetpointTemperature, true);
308
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 7 times.
✗ Branch 4 not taken.
7 OS_ASSERT(value);
309
1/1
✓ Branch 1 taken 7 times.
14 return value.get();
310 }
311
312 3 bool ChillerElectricEIR_Impl::isBasinHeaterSetpointTemperatureDefaulted() const {
313 3 return isEmpty(OS_Chiller_Electric_EIRFields::BasinHeaterSetpointTemperature);
314 }
315
316 ✗ bool ChillerElectricEIR_Impl::setReferenceCapacity(boost::optional<double> referenceCapacity) {
317 ✗ bool result = false;
318 ✗ if (referenceCapacity) {
319 ✗ result = setDouble(OS_Chiller_Electric_EIRFields::ReferenceCapacity, referenceCapacity.get());
320 }
321 ✗ return result;
322 }
323
324 34 void ChillerElectricEIR_Impl::autosizeReferenceCapacity() {
325
2/2
✓ Branch 1 taken 34 times.
✓ Branch 4 taken 34 times.
68 bool result = setString(OS_Chiller_Electric_EIRFields::ReferenceCapacity, "Autosize");
326
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 34 times.
34 OS_ASSERT(result);
327 34 }
328
329 6 bool ChillerElectricEIR_Impl::setReferenceCapacity(double referenceCapacity) {
330 6 return setDouble(OS_Chiller_Electric_EIRFields::ReferenceCapacity, referenceCapacity);
331 }
332
333 39 bool ChillerElectricEIR_Impl::setReferenceCOP(double referenceCOP) {
334 39 return setDouble(OS_Chiller_Electric_EIRFields::ReferenceCOP, referenceCOP);
335 }
336
337 2 bool ChillerElectricEIR_Impl::setReferenceLeavingChilledWaterTemperature(double referenceLeavingChilledWaterTemperature) {
338 2 bool result = setDouble(OS_Chiller_Electric_EIRFields::ReferenceLeavingChilledWaterTemperature, referenceLeavingChilledWaterTemperature);
339
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 2 times.
2 OS_ASSERT(result);
340 2 return result;
341 }
342
343 1 void ChillerElectricEIR_Impl::resetReferenceLeavingChilledWaterTemperature() {
344
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Chiller_Electric_EIRFields::ReferenceLeavingChilledWaterTemperature, "");
345
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
346 1 }
347
348 5 bool ChillerElectricEIR_Impl::setReferenceEnteringCondenserFluidTemperature(double referenceEnteringCondenserFluidTemperature) {
349 5 bool result = setDouble(OS_Chiller_Electric_EIRFields::ReferenceEnteringCondenserFluidTemperature, referenceEnteringCondenserFluidTemperature);
350
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 5 times.
5 OS_ASSERT(result);
351 5 return result;
352 }
353
354 1 void ChillerElectricEIR_Impl::resetReferenceEnteringCondenserFluidTemperature() {
355
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Chiller_Electric_EIRFields::ReferenceEnteringCondenserFluidTemperature, "");
356
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
357 1 }
358
359 ✗ bool ChillerElectricEIR_Impl::setReferenceChilledWaterFlowRate(boost::optional<double> referenceChilledWaterFlowRate) {
360 ✗ bool result = false;
361 ✗ if (referenceChilledWaterFlowRate) {
362 ✗ result = setDouble(OS_Chiller_Electric_EIRFields::ReferenceChilledWaterFlowRate, referenceChilledWaterFlowRate.get());
363 }
364 ✗ return result;
365 }
366
367 ✗ void ChillerElectricEIR_Impl::resetReferenceChilledWaterFlowRate() {
368 ✗ bool result = setString(OS_Chiller_Electric_EIRFields::ReferenceChilledWaterFlowRate, "");
369 ✗ OS_ASSERT(result);
370 ✗ }
371
372 34 void ChillerElectricEIR_Impl::autosizeReferenceChilledWaterFlowRate() {
373
2/2
✓ Branch 1 taken 34 times.
✓ Branch 4 taken 34 times.
68 bool result = setString(OS_Chiller_Electric_EIRFields::ReferenceChilledWaterFlowRate, "Autosize");
374
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 34 times.
34 OS_ASSERT(result);
375 34 }
376
377 6 bool ChillerElectricEIR_Impl::setReferenceChilledWaterFlowRate(double referenceChilledWaterFlowRate) {
378 6 bool result = setDouble(OS_Chiller_Electric_EIRFields::ReferenceChilledWaterFlowRate, referenceChilledWaterFlowRate);
379 6 return result;
380 }
381
382 ✗ bool ChillerElectricEIR_Impl::setReferenceCondenserFluidFlowRate(boost::optional<double> referenceCondenserFluidFlowRate) {
383 ✗ bool result = false;
384 ✗ if (referenceCondenserFluidFlowRate) {
385 ✗ result = setDouble(OS_Chiller_Electric_EIRFields::ReferenceCondenserFluidFlowRate, referenceCondenserFluidFlowRate.get());
386 }
387 ✗ return result;
388 }
389
390 1 void ChillerElectricEIR_Impl::resetReferenceCondenserFluidFlowRate() {
391
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Chiller_Electric_EIRFields::ReferenceCondenserFluidFlowRate, "");
392
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
393 1 }
394
395 1 void ChillerElectricEIR_Impl::autosizeReferenceCondenserFluidFlowRate() {
396
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Chiller_Electric_EIRFields::ReferenceCondenserFluidFlowRate, "Autosize");
397
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
398 1 }
399
400 4 bool ChillerElectricEIR_Impl::setReferenceCondenserFluidFlowRate(double referenceCondenserFluidFlowRate) {
401 4 bool result = setDouble(OS_Chiller_Electric_EIRFields::ReferenceCondenserFluidFlowRate, referenceCondenserFluidFlowRate);
402 4 return result;
403 }
404
405 34 bool ChillerElectricEIR_Impl::setCoolingCapacityFunctionOfTemperature(const Curve& curve) {
406
4/5
✓ Branch 1 taken 34 times.
✓ Branch 4 taken 34 times.
✓ Branch 7 taken 34 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 34 times.
34 if (model() != curve.model()) {
407 ✗ return false;
408 }
409
2/2
✓ Branch 1 taken 34 times.
✓ Branch 4 taken 34 times.
34 return this->setPointer(OS_Chiller_Electric_EIRFields::CoolingCapacityFunctionofTemperatureCurveName, curve.handle());
410 }
411
412 34 bool ChillerElectricEIR_Impl::setElectricInputToCoolingOutputRatioFunctionOfTemperature(const Curve& curve) {
413
4/5
✓ Branch 1 taken 34 times.
✓ Branch 4 taken 34 times.
✓ Branch 7 taken 34 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 34 times.
34 if (model() != curve.model()) {
414 ✗ return false;
415 }
416
2/2
✓ Branch 1 taken 34 times.
✓ Branch 4 taken 34 times.
34 return this->setPointer(OS_Chiller_Electric_EIRFields::ElectricInputtoCoolingOutputRatioFunctionofTemperatureCurveName, curve.handle());
417 }
418
419 36 bool ChillerElectricEIR_Impl::setElectricInputToCoolingOutputRatioFunctionOfPLR(const Curve& curve) {
420
4/5
✓ Branch 1 taken 36 times.
✓ Branch 4 taken 36 times.
✓ Branch 7 taken 36 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 36 times.
36 if (model() != curve.model()) {
421 ✗ return false;
422 }
423
2/2
✓ Branch 1 taken 36 times.
✓ Branch 4 taken 36 times.
36 return this->setPointer(OS_Chiller_Electric_EIRFields::ElectricInputtoCoolingOutputRatioFunctionofPartLoadRatioCurveName, curve.handle());
424 }
425
426 6 bool ChillerElectricEIR_Impl::setMinimumPartLoadRatio(double minimumPartLoadRatio) {
427 6 return setDouble(OS_Chiller_Electric_EIRFields::MinimumPartLoadRatio, minimumPartLoadRatio);
428 }
429
430 1 void ChillerElectricEIR_Impl::resetMinimumPartLoadRatio() {
431
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Chiller_Electric_EIRFields::MinimumPartLoadRatio, "");
432
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
433 1 }
434
435 3 bool ChillerElectricEIR_Impl::setMaximumPartLoadRatio(double maximumPartLoadRatio) {
436 3 return setDouble(OS_Chiller_Electric_EIRFields::MaximumPartLoadRatio, maximumPartLoadRatio);
437 }
438
439 1 void ChillerElectricEIR_Impl::resetMaximumPartLoadRatio() {
440
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Chiller_Electric_EIRFields::MaximumPartLoadRatio, "");
441
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
442 1 }
443
444 3 bool ChillerElectricEIR_Impl::setOptimumPartLoadRatio(double optimumPartLoadRatio) {
445 3 return setDouble(OS_Chiller_Electric_EIRFields::OptimumPartLoadRatio, optimumPartLoadRatio);
446 }
447
448 1 void ChillerElectricEIR_Impl::resetOptimumPartLoadRatio() {
449
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Chiller_Electric_EIRFields::OptimumPartLoadRatio, "");
450
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
451 1 }
452
453 6 bool ChillerElectricEIR_Impl::setMinimumUnloadingRatio(double minimumUnloadingRatio) {
454 6 return setDouble(OS_Chiller_Electric_EIRFields::MinimumUnloadingRatio, minimumUnloadingRatio);
455 }
456
457 1 void ChillerElectricEIR_Impl::resetMinimumUnloadingRatio() {
458
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Chiller_Electric_EIRFields::MinimumUnloadingRatio, "");
459
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
460 1 }
461
462 53 bool ChillerElectricEIR_Impl::setCondenserType(const std::string& condenserType) {
463 53 bool ok = false;
464
21/33
✓ Branch 1 taken 53 times.
✓ Branch 4 taken 53 times.
✓ Branch 6 taken 26 times.
✓ Branch 7 taken 27 times.
✓ Branch 9 taken 26 times.
✓ Branch 12 taken 26 times.
✓ Branch 14 taken 4 times.
✓ Branch 15 taken 22 times.
✓ Branch 17 taken 31 times.
✓ Branch 20 taken 2 times.
✓ Branch 21 taken 29 times.
✓ Branch 22 taken 31 times.
✓ Branch 23 taken 22 times.
✓ Branch 25 taken 26 times.
✓ Branch 26 taken 27 times.
✓ Branch 28 taken 26 times.
✓ Branch 29 taken 27 times.
✓ Branch 30 taken 53 times.
✗ Branch 31 not taken.
✓ Branch 33 taken 53 times.
✗ Branch 34 not taken.
✓ Branch 35 taken 2 times.
✓ Branch 36 taken 51 times.
✗ Branch 37 not taken.
✗ Branch 38 not taken.
✗ Branch 40 not taken.
✗ Branch 41 not taken.
✗ Branch 43 not taken.
✗ Branch 44 not taken.
✗ Branch 45 not taken.
✗ Branch 46 not taken.
✗ Branch 48 not taken.
✗ Branch 49 not taken.
242 if ((istringEqual("AirCooled", condenserType) || istringEqual("EvaporativelyCooled", condenserType)) && (this->secondaryPlantLoop())) {
465
8/8
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✓ Branch 10 taken 2 times.
✓ Branch 13 taken 2 times.
✓ Branch 17 taken 2 times.
✓ Branch 20 taken 2 times.
✓ Branch 23 taken 2 times.
2 LOG(Warn,
466 "Cannot set condenserType to AirCooled or EvaporativelyCooled, chiller '" << this->name() << "' is connected to a secondaryPlantLoop");
467
13/21
✓ Branch 1 taken 51 times.
✓ Branch 4 taken 51 times.
✓ Branch 6 taken 22 times.
✓ Branch 7 taken 29 times.
✓ Branch 9 taken 22 times.
✓ Branch 12 taken 3 times.
✓ Branch 13 taken 19 times.
✓ Branch 14 taken 22 times.
✓ Branch 15 taken 29 times.
✓ Branch 17 taken 51 times.
✗ Branch 18 not taken.
✓ Branch 20 taken 51 times.
✗ Branch 21 not taken.
✓ Branch 22 taken 3 times.
✓ Branch 23 taken 48 times.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
✗ Branch 27 not taken.
✗ Branch 28 not taken.
✗ Branch 30 not taken.
✗ Branch 31 not taken.
153 } else if (istringEqual("WaterCooled", condenserType) && !(this->secondaryPlantLoop())) {
468
8/8
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✓ Branch 10 taken 3 times.
✓ Branch 13 taken 3 times.
✓ Branch 17 taken 3 times.
✓ Branch 20 taken 3 times.
✓ Branch 23 taken 3 times.
3 LOG(Warn, "Cannot set condenserType to 'WaterCooled', chiller '" << this->name() << "' is not connected to a secondaryPlantLoop");
469 } else {
470 48 ok = setString(OS_Chiller_Electric_EIRFields::CondenserType, condenserType);
471 }
472
473 53 return ok;
474 }
475
476 ✗ void ChillerElectricEIR_Impl::resetCondenserType() {
477 ✗ bool result = setString(OS_Chiller_Electric_EIRFields::CondenserType, "");
478 ✗ OS_ASSERT(result);
479 ✗ }
480
481 3 bool ChillerElectricEIR_Impl::setCondenserFanPowerRatio(double condenserFanPowerRatio) {
482 3 return setDouble(OS_Chiller_Electric_EIRFields::CondenserFanPowerRatio, condenserFanPowerRatio);
483 }
484
485 1 void ChillerElectricEIR_Impl::resetCondenserFanPowerRatio() {
486
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Chiller_Electric_EIRFields::CondenserFanPowerRatio, "");
487
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
488 1 }
489
490 3 bool ChillerElectricEIR_Impl::setFractionofCompressorElectricConsumptionRejectedbyCondenser(
491 double fractionofCompressorElectricConsumptionRejectedbyCondenser) {
492 3 return setDouble(OS_Chiller_Electric_EIRFields::FractionofCompressorElectricConsumptionRejectedbyCondenser,
493 3 fractionofCompressorElectricConsumptionRejectedbyCondenser);
494 }
495
496 1 void ChillerElectricEIR_Impl::resetFractionofCompressorElectricConsumptionRejectedbyCondenser() {
497
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Chiller_Electric_EIRFields::FractionofCompressorElectricConsumptionRejectedbyCondenser, "");
498
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
499 1 }
500
501 2 bool ChillerElectricEIR_Impl::setLeavingChilledWaterLowerTemperatureLimit(double leavingChilledWaterLowerTemperatureLimit) {
502 2 bool result = setDouble(OS_Chiller_Electric_EIRFields::LeavingChilledWaterLowerTemperatureLimit, leavingChilledWaterLowerTemperatureLimit);
503
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 2 times.
2 OS_ASSERT(result);
504 2 return result;
505 }
506
507 1 void ChillerElectricEIR_Impl::resetLeavingChilledWaterLowerTemperatureLimit() {
508
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Chiller_Electric_EIRFields::LeavingChilledWaterLowerTemperatureLimit, "");
509
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
510 1 }
511
512 3 bool ChillerElectricEIR_Impl::setChillerFlowMode(const std::string& chillerFlowMode) {
513 3 bool result = false;
514
3/4
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✗ Branch 7 not taken.
✓ Branch 8 taken 3 times.
6 if (istringEqual(chillerFlowMode, "VariableFlow")) {
515 // Support legacy key
516 ✗ result = setString(OS_Chiller_Electric_EIRFields::ChillerFlowMode, "LeavingSetpointModulated");
517 } else {
518 3 result = setString(OS_Chiller_Electric_EIRFields::ChillerFlowMode, chillerFlowMode);
519 }
520
521 3 return result;
522 }
523
524 1 void ChillerElectricEIR_Impl::resetChillerFlowMode() {
525
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Chiller_Electric_EIRFields::ChillerFlowMode, "");
526
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
527 1 }
528
529 3 bool ChillerElectricEIR_Impl::setDesignHeatRecoveryWaterFlowRate(double designHeatRecoveryWaterFlowRate) {
530 3 return setDouble(OS_Chiller_Electric_EIRFields::DesignHeatRecoveryWaterFlowRate, designHeatRecoveryWaterFlowRate);
531 }
532
533 34 void ChillerElectricEIR_Impl::autosizeDesignHeatRecoveryWaterFlowRate() {
534
2/2
✓ Branch 1 taken 34 times.
✓ Branch 4 taken 34 times.
68 bool result = setString(OS_Chiller_Electric_EIRFields::DesignHeatRecoveryWaterFlowRate, "Autosize");
535
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 34 times.
34 OS_ASSERT(result);
536 34 }
537
538 3 bool ChillerElectricEIR_Impl::setSizingFactor(double sizingFactor) {
539 3 return setDouble(OS_Chiller_Electric_EIRFields::SizingFactor, sizingFactor);
540 }
541
542 1 void ChillerElectricEIR_Impl::resetSizingFactor() {
543
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Chiller_Electric_EIRFields::SizingFactor, "");
544
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
545 1 }
546
547 3 bool ChillerElectricEIR_Impl::setBasinHeaterCapacity(double basinHeaterCapacity) {
548 3 return setDouble(OS_Chiller_Electric_EIRFields::BasinHeaterCapacity, basinHeaterCapacity);
549 }
550
551 1 void ChillerElectricEIR_Impl::resetBasinHeaterCapacity() {
552
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Chiller_Electric_EIRFields::BasinHeaterCapacity, "");
553
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
554 1 }
555
556 36 bool ChillerElectricEIR_Impl::setBasinHeaterSetpointTemperature(double basinHeaterSetpointTemperature) {
557 36 return setDouble(OS_Chiller_Electric_EIRFields::BasinHeaterSetpointTemperature, basinHeaterSetpointTemperature);
558 }
559
560 1 void ChillerElectricEIR_Impl::resetBasinHeaterSetpointTemperature() {
561
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Chiller_Electric_EIRFields::BasinHeaterSetpointTemperature, "");
562
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
563 1 }
564
565 748 unsigned ChillerElectricEIR_Impl::supplyInletPort() const {
566 748 return OS_Chiller_Electric_EIRFields::ChilledWaterInletNodeName;
567 }
568
569 495 unsigned ChillerElectricEIR_Impl::supplyOutletPort() const {
570 495 return OS_Chiller_Electric_EIRFields::ChilledWaterOutletNodeName;
571 }
572
573 299 unsigned ChillerElectricEIR_Impl::demandInletPort() const {
574 299 return OS_Chiller_Electric_EIRFields::CondenserInletNodeName;
575 }
576
577 292 unsigned ChillerElectricEIR_Impl::demandOutletPort() const {
578 292 return OS_Chiller_Electric_EIRFields::CondenserOutletNodeName;
579 }
580
581 34 unsigned ChillerElectricEIR_Impl::tertiaryInletPort() const {
582 34 return OS_Chiller_Electric_EIRFields::HeatRecoveryInletNodeName;
583 }
584
585 212 unsigned ChillerElectricEIR_Impl::tertiaryOutletPort() const {
586 212 return OS_Chiller_Electric_EIRFields::HeatRecoveryOutletNodeName;
587 }
588
589 1 ModelObject ChillerElectricEIR_Impl::clone(Model model) const {
590
3/3
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
1 auto chiller = WaterToWaterComponent_Impl::clone(model).cast<ChillerElectricEIR>();
591
592 2 return std::move(chiller);
593 1 }
594
595 2 bool ChillerElectricEIR_Impl::setBasinHeaterSchedule(Schedule& schedule) {
596 bool result =
597
3/3
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
8 setSchedule(OS_Chiller_Electric_EIRFields::BasinHeaterOperatingScheduleName, "ChillerElectricEIR", "Basin Heater Operating", schedule);
598 2 return result;
599 }
600
601 34 void ChillerElectricEIR_Impl::resetBasinHeaterSchedule() {
602
2/2
✓ Branch 1 taken 34 times.
✓ Branch 4 taken 34 times.
68 bool result = setString(OS_Chiller_Electric_EIRFields::BasinHeaterOperatingScheduleName, "");
603
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 34 times.
34 OS_ASSERT(result);
604 34 }
605
606 6 boost::optional<Schedule> ChillerElectricEIR_Impl::basinHeaterSchedule() const {
607
2/2
✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
6 return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_Chiller_Electric_EIRFields::BasinHeaterOperatingScheduleName);
608 }
609
610 8 std::vector<ModelObject> ChillerElectricEIR_Impl::children() const {
611 8 std::vector<ModelObject> result;
612
1/1
✓ Branch 1 taken 8 times.
8 result.reserve(5);
613
614
2/2
✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
8 result.push_back(coolingCapacityFunctionOfTemperature());
615
2/2
✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
8 result.push_back(electricInputToCoolingOutputRatioFunctionOfTemperature());
616
2/2
✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
8 result.push_back(electricInputToCoolingOutputRatioFunctionOfPLR());
617
3/3
✓ Branch 1 taken 8 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 7 times.
16 if (auto curve_ = condenserLoopFlowRateFractionFunctionofLoopPartLoadRatioCurve()) {
618
2/2
✓ Branch 1 taken 1 time.
✓ Branch 5 taken 1 time.
1 result.emplace_back(std::move(*curve_));
619 8 }
620
3/3
✓ Branch 1 taken 8 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 7 times.
16 if (auto curve_ = thermosiphonCapacityFractionCurve()) {
621
2/2
✓ Branch 1 taken 1 time.
✓ Branch 5 taken 1 time.
1 result.emplace_back(std::move(*curve_));
622 8 }
623 8 return result;
624 ✗ }
625
626 /** Convenience Function to return the Chilled Water Loop (chiller on supply) **/
627 15 boost::optional<PlantLoop> ChillerElectricEIR_Impl::chilledWaterLoop() const {
628 15 return WaterToWaterComponent_Impl::plantLoop();
629 }
630
631 /** Convenience Function to return the Condenser Water Loop (chiller on demand side) **/
632 75 boost::optional<PlantLoop> ChillerElectricEIR_Impl::condenserWaterLoop() const {
633 75 return WaterToWaterComponent_Impl::secondaryPlantLoop();
634 }
635
636 /** Convenience Function to return the Heat Recovery Loop **/
637 23 boost::optional<PlantLoop> ChillerElectricEIR_Impl::heatRecoveryLoop() const {
638 23 return WaterToWaterComponent_Impl::tertiaryPlantLoop();
639 }
640
641 ✗ boost::optional<Node> ChillerElectricEIR_Impl::chilledWaterInletNode() const {
642 ✗ if (auto mo_ = supplyInletModelObject()) {
643 ✗ return mo_->optionalCast<Node>();
644 ✗ }
645 ✗ return boost::none;
646 }
647
648 ✗ boost::optional<Node> ChillerElectricEIR_Impl::chilledWaterOutletNode() const {
649 ✗ if (auto mo_ = supplyOutletModelObject()) {
650 ✗ return mo_->optionalCast<Node>();
651 ✗ }
652 ✗ return boost::none;
653 }
654
655 ✗ boost::optional<Node> ChillerElectricEIR_Impl::condenserInletNode() const {
656 ✗ if (auto mo_ = demandInletModelObject()) {
657 ✗ return mo_->optionalCast<Node>();
658 ✗ }
659 ✗ return boost::none;
660 }
661
662 ✗ boost::optional<Node> ChillerElectricEIR_Impl::condenserOutletNode() const {
663 ✗ if (auto mo_ = demandOutletModelObject()) {
664 ✗ return mo_->optionalCast<Node>();
665 ✗ }
666 ✗ return boost::none;
667 }
668
669 ✗ boost::optional<Node> ChillerElectricEIR_Impl::heatRecoveryInletNode() const {
670 ✗ if (auto mo_ = tertiaryInletModelObject()) {
671 ✗ return mo_->optionalCast<Node>();
672 ✗ }
673 ✗ return boost::none;
674 }
675
676 ✗ boost::optional<Node> ChillerElectricEIR_Impl::heatRecoveryOutletNode() const {
677 ✗ if (auto mo_ = tertiaryOutletModelObject()) {
678 ✗ return mo_->optionalCast<Node>();
679 ✗ }
680 ✗ return boost::none;
681 }
682
683 40 bool ChillerElectricEIR_Impl::addToNode(Node& node) {
684
685
1/1
✓ Branch 1 taken 40 times.
40 boost::optional<PlantLoop> t_plantLoop = node.plantLoop();
686
687 // If trying to add to a node that is on the demand side of a plant loop
688
1/2
✓ Branch 0 taken 40 times.
✗ Branch 1 not taken.
40 if (t_plantLoop) {
689
5/5
✓ Branch 1 taken 40 times.
✓ Branch 4 taken 40 times.
✓ Branch 7 taken 40 times.
✓ Branch 10 taken 20 times.
✓ Branch 11 taken 20 times.
80 if (t_plantLoop->demandComponent(node.handle())) {
690 // If there is already a condenser water Plant Loop
691
3/3
✓ Branch 1 taken 20 times.
✓ Branch 3 taken 5 times.
✓ Branch 4 taken 15 times.
40 if (boost::optional<PlantLoop> cndLoop = this->condenserWaterLoop()) {
692 // And it's not the same as the node's loop
693
4/5
✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
✓ Branch 9 taken 5 times.
✗ Branch 10 not taken.
5 if (t_plantLoop.get() != cndLoop.get()) {
694 // And if there is no generator loop (tertiary)
695
3/3
✓ Branch 1 taken 5 times.
✓ Branch 5 taken 4 times.
✓ Branch 6 taken 1 time.
5 if (!this->heatRecoveryLoop().is_initialized()) {
696 // Then try to add it to the tertiary one
697
7/7
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
✓ Branch 10 taken 4 times.
✓ Branch 14 taken 4 times.
✓ Branch 17 taken 4 times.
✓ Branch 20 taken 4 times.
4 LOG(Warn, "Calling addToTertiaryNode to connect it to the tertiary (=Heat Recovery Loop) loop for " << briefDescription());
698
1/1
✓ Branch 1 taken 4 times.
4 return this->addToTertiaryNode(node);
699 }
700 }
701 20 }
702 }
703 }
704
705 // All other cases, call the base class implementation
706 // Connect the component
707
1/1
✓ Branch 1 taken 36 times.
36 bool ok = WaterToWaterComponent_Impl::addToNode(node);
708
709 // If there's a secondary plant loop, switch the condenser type to "WaterCooled"
710
3/3
✓ Branch 1 taken 36 times.
✓ Branch 4 taken 19 times.
✓ Branch 5 taken 17 times.
72 if (this->condenserWaterLoop()) {
711
2/2
✓ Branch 1 taken 19 times.
✓ Branch 4 taken 19 times.
38 this->setCondenserType("WaterCooled");
712 }
713 36 return ok;
714 40 }
715
716 6 bool ChillerElectricEIR_Impl::addToTertiaryNode(Node& node) {
717
1/1
✓ Branch 1 taken 6 times.
6 auto _model = node.model();
718
1/1
✓ Branch 1 taken 6 times.
6 auto t_plantLoop = node.plantLoop();
719
720 // Only accept adding to a node that is on a demand side of a plant loop
721 // Since tertiary here = heat recovery loop (heating)
722
1/2
✓ Branch 0 taken 6 times.
✗ Branch 1 not taken.
6 if (t_plantLoop) {
723
5/5
✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
✓ Branch 7 taken 6 times.
✓ Branch 10 taken 5 times.
✓ Branch 11 taken 1 time.
12 if (t_plantLoop->demandComponent(node.handle())) {
724 // Call base class method which accepts both supply and demand
725
1/1
✓ Branch 1 taken 5 times.
5 return WaterToWaterComponent_Impl::addToTertiaryNode(node);
726 } else {
727
7/7
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 14 taken 1 time.
✓ Branch 17 taken 1 time.
✓ Branch 20 taken 1 time.
1 LOG(Info,
728 "Tertiary Loop (Heat Recovery Loop) connections can only be placed on the Demand side (of a Heating Loop), for " << briefDescription());
729 }
730 }
731 1 return false;
732 6 }
733
734 23 bool ChillerElectricEIR_Impl::removeFromSecondaryPlantLoop() {
735 // Disconnect the component
736 23 bool ok = WaterToWaterComponent_Impl::removeFromSecondaryPlantLoop();
737
738 // Switch the condenser type to "AirCooled"
739
2/2
✓ Branch 1 taken 23 times.
✓ Branch 4 taken 23 times.
23 this->setCondenserType("AirCooled");
740 23 return ok;
741 }
742
743 ✗ boost::optional<ModelObject> ChillerElectricEIR_Impl::basinHeaterScheduleAsModelObject() const {
744 ✗ OptionalModelObject result;
745 ✗ OptionalSchedule intermediate = basinHeaterSchedule();
746 ✗ if (intermediate) {
747 ✗ result = *intermediate;
748 }
749 ✗ return result;
750 ✗ }
751
752 ✗ bool ChillerElectricEIR_Impl::setBasinHeaterScheduleAsModelObject(const boost::optional<ModelObject>& modelObject) {
753 ✗ if (modelObject) {
754 ✗ OptionalSchedule intermediate = modelObject->optionalCast<Schedule>();
755 ✗ if (intermediate) {
756 ✗ Schedule schedule(*intermediate);
757 ✗ return setBasinHeaterSchedule(schedule);
758 ✗ } else {
759 ✗ return false;
760 }
761 ✗ } else {
762 ✗ resetBasinHeaterSchedule();
763 }
764 ✗ return true;
765 }
766
767 ✗ boost::optional<double> ChillerElectricEIR_Impl::autosizedReferenceCapacity() const {
768 ✗ return getAutosizedValue("Design Size Reference Capacity", "W");
769 }
770
771 ✗ boost::optional<double> ChillerElectricEIR_Impl::autosizedReferenceChilledWaterFlowRate() const {
772 ✗ return getAutosizedValue("Design Size Reference Chilled Water Flow Rate", "m3/s");
773 }
774
775 ✗ boost::optional<double> ChillerElectricEIR_Impl::autosizedReferenceCondenserFluidFlowRate() const {
776 ✗ return getAutosizedValue("Design Size Reference Condenser Fluid Flow Rate", "m3/s");
777 }
778
779 ✗ boost::optional<double> ChillerElectricEIR_Impl::autosizedDesignHeatRecoveryWaterFlowRate() const {
780 ✗ return getAutosizedValue("Design Size Heat Recovery Water Flow Rate", "m3/s");
781 }
782
783 ✗ void ChillerElectricEIR_Impl::autosize() {
784 ✗ autosizeReferenceCapacity();
785 ✗ autosizeReferenceChilledWaterFlowRate();
786 ✗ autosizeReferenceCondenserFluidFlowRate();
787 ✗ autosizeDesignHeatRecoveryWaterFlowRate();
788 ✗ }
789
790 ✗ void ChillerElectricEIR_Impl::applySizingValues() {
791 ✗ boost::optional<double> val;
792 ✗ val = autosizedReferenceCapacity();
793 ✗ if (val) {
794 ✗ setReferenceCapacity(val.get());
795 }
796
797 ✗ val = autosizedReferenceChilledWaterFlowRate();
798 ✗ if (val) {
799 ✗ setReferenceChilledWaterFlowRate(val.get());
800 }
801
802 ✗ val = autosizedReferenceCondenserFluidFlowRate();
803 ✗ if (val) {
804 ✗ setReferenceCondenserFluidFlowRate(val.get());
805 }
806
807 ✗ val = autosizedDesignHeatRecoveryWaterFlowRate();
808 ✗ if (val) {
809 ✗ setDesignHeatRecoveryWaterFlowRate(val.get());
810 }
811 ✗ }
812
813 5 std::string ChillerElectricEIR_Impl::endUseSubcategory() const {
814
1/1
✓ Branch 1 taken 5 times.
5 auto value = getString(OS_Chiller_Electric_EIRFields::EndUseSubcategory, true);
815
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
5 OS_ASSERT(value);
816
2/2
✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
10 return value.get();
817 5 }
818
819 35 bool ChillerElectricEIR_Impl::setEndUseSubcategory(const std::string& endUseSubcategory) {
820 35 return setString(OS_Chiller_Electric_EIRFields::EndUseSubcategory, endUseSubcategory);
821 }
822
823 5 double ChillerElectricEIR_Impl::condenserHeatRecoveryRelativeCapacityFraction() const {
824
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<double> value = getDouble(OS_Chiller_Electric_EIRFields::CondenserHeatRecoveryRelativeCapacityFraction, true);
825
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
5 OS_ASSERT(value);
826
1/1
✓ Branch 1 taken 5 times.
10 return value.get();
827 }
828
829 36 bool ChillerElectricEIR_Impl::setCondenserHeatRecoveryRelativeCapacityFraction(double condenserHeatRecoveryRelativeCapacityFraction) {
830 bool result =
831 36 setDouble(OS_Chiller_Electric_EIRFields::CondenserHeatRecoveryRelativeCapacityFraction, condenserHeatRecoveryRelativeCapacityFraction);
832 // OS_ASSERT(result);
833 36 return result;
834 }
835
836 6 boost::optional<Schedule> ChillerElectricEIR_Impl::heatRecoveryInletHighTemperatureLimitSchedule() const {
837
1/1
✓ Branch 1 taken 6 times.
12 return getObject<ModelObject>().getModelObjectTarget<Schedule>(
838
1/1
✓ Branch 1 taken 6 times.
12 OS_Chiller_Electric_EIRFields::HeatRecoveryInletHighTemperatureLimitScheduleName);
839 }
840
841 2 bool ChillerElectricEIR_Impl::setHeatRecoveryInletHighTemperatureLimitSchedule(Schedule& schedule) {
842
3/3
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
8 bool result = setSchedule(OS_Chiller_Electric_EIRFields::HeatRecoveryInletHighTemperatureLimitScheduleName, "ChillerElectricEIR",
843 "Heat Recovery Inlet High Temperature Limit", schedule);
844 2 return result;
845 }
846
847 34 void ChillerElectricEIR_Impl::resetHeatRecoveryInletHighTemperatureLimitSchedule() {
848
2/2
✓ Branch 1 taken 34 times.
✓ Branch 4 taken 34 times.
68 bool result = setString(OS_Chiller_Electric_EIRFields::HeatRecoveryInletHighTemperatureLimitScheduleName, "");
849
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 34 times.
34 OS_ASSERT(result);
850 34 }
851
852 5 boost::optional<Node> ChillerElectricEIR_Impl::heatRecoveryLeavingTemperatureSetpointNode() const {
853
2/2
✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
5 return getObject<ModelObject>().getModelObjectTarget<Node>(OS_Chiller_Electric_EIRFields::HeatRecoveryLeavingTemperatureSetpointNodeName);
854 }
855
856 2 bool ChillerElectricEIR_Impl::setHeatRecoveryLeavingTemperatureSetpointNode(const Node& node) {
857
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 return setPointer(OS_Chiller_Electric_EIRFields::HeatRecoveryLeavingTemperatureSetpointNodeName, node.handle());
858 }
859
860 33 void ChillerElectricEIR_Impl::resetHeatRecoveryLeavingTemperatureSetpointNode() {
861
2/2
✓ Branch 1 taken 33 times.
✓ Branch 4 taken 33 times.
66 bool result = setString(OS_Chiller_Electric_EIRFields::HeatRecoveryLeavingTemperatureSetpointNodeName, "");
862
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 33 times.
33 OS_ASSERT(result);
863 33 }
864
865 5 std::string ChillerElectricEIR_Impl::condenserFlowControl() const {
866
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<std::string> value = getString(OS_Chiller_Electric_EIRFields::CondenserFlowControl, true);
867
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
5 OS_ASSERT(value);
868
2/2
✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
10 return value.get();
869 5 }
870
871 14 boost::optional<Curve> ChillerElectricEIR_Impl::condenserLoopFlowRateFractionFunctionofLoopPartLoadRatioCurve() const {
872
1/1
✓ Branch 1 taken 14 times.
28 return getObject<ModelObject>().getModelObjectTarget<Curve>(
873
1/1
✓ Branch 1 taken 14 times.
28 OS_Chiller_Electric_EIRFields::CondenserLoopFlowRateFractionFunctionofLoopPartLoadRatioCurveName);
874 }
875
876 6 boost::optional<Schedule> ChillerElectricEIR_Impl::temperatureDifferenceAcrossCondenserSchedule() const {
877
2/2
✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
6 return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_Chiller_Electric_EIRFields::TemperatureDifferenceAcrossCondenserScheduleName);
878 }
879
880 5 double ChillerElectricEIR_Impl::condenserMinimumFlowFraction() const {
881
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<double> value = getDouble(OS_Chiller_Electric_EIRFields::CondenserMinimumFlowFraction, true);
882
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
5 OS_ASSERT(value);
883
1/1
✓ Branch 1 taken 5 times.
10 return value.get();
884 }
885
886 14 boost::optional<Curve> ChillerElectricEIR_Impl::thermosiphonCapacityFractionCurve() const {
887
2/2
✓ Branch 1 taken 14 times.
✓ Branch 4 taken 14 times.
14 return getObject<ModelObject>().getModelObjectTarget<Curve>(OS_Chiller_Electric_EIRFields::ThermosiphonCapacityFractionCurveName);
888 }
889
890 5 double ChillerElectricEIR_Impl::thermosiphonMinimumTemperatureDifference() const {
891
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<double> value = getDouble(OS_Chiller_Electric_EIRFields::ThermosiphonMinimumTemperatureDifference, true);
892
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
5 OS_ASSERT(value);
893
1/1
✓ Branch 1 taken 5 times.
10 return value.get();
894 }
895
896 36 bool ChillerElectricEIR_Impl::setCondenserFlowControl(const std::string& condenserFlowControl) {
897 36 return setString(OS_Chiller_Electric_EIRFields::CondenserFlowControl, condenserFlowControl);
898 }
899
900 2 bool ChillerElectricEIR_Impl::setCondenserLoopFlowRateFractionFunctionofLoopPartLoadRatioCurve(
901 const Curve& condenserLoopFlowRateFractionFunctionofLoopPartLoadRatioCurve) {
902
1/1
✓ Branch 1 taken 2 times.
2 bool result = setPointer(OS_Chiller_Electric_EIRFields::CondenserLoopFlowRateFractionFunctionofLoopPartLoadRatioCurveName,
903
1/1
✓ Branch 1 taken 2 times.
2 condenserLoopFlowRateFractionFunctionofLoopPartLoadRatioCurve.handle());
904 2 return result;
905 }
906
907 1 void ChillerElectricEIR_Impl::resetCondenserLoopFlowRateFractionFunctionofLoopPartLoadRatioCurve() {
908
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Chiller_Electric_EIRFields::CondenserLoopFlowRateFractionFunctionofLoopPartLoadRatioCurveName, "");
909
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
910 1 }
911
912 2 bool ChillerElectricEIR_Impl::setTemperatureDifferenceAcrossCondenserSchedule(Schedule& temperatureDifferenceAcrossCondenserSchedule) {
913
3/3
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
8 bool result = setSchedule(OS_Chiller_Electric_EIRFields::TemperatureDifferenceAcrossCondenserScheduleName, "ChillerElectricEIR",
914 "Temperature Difference Across Condenser", temperatureDifferenceAcrossCondenserSchedule);
915 2 return result;
916 }
917
918 1 void ChillerElectricEIR_Impl::resetTemperatureDifferenceAcrossCondenserSchedule() {
919
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Chiller_Electric_EIRFields::TemperatureDifferenceAcrossCondenserScheduleName, "");
920
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
921 1 }
922
923 35 bool ChillerElectricEIR_Impl::setCondenserMinimumFlowFraction(double condenserMinimumFlowFraction) {
924 35 bool result = setDouble(OS_Chiller_Electric_EIRFields::CondenserMinimumFlowFraction, condenserMinimumFlowFraction);
925 35 return result;
926 }
927
928 2 bool ChillerElectricEIR_Impl::setThermosiphonCapacityFractionCurve(const Curve& thermosiphonCapacityFractionCurve) {
929
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 bool result = setPointer(OS_Chiller_Electric_EIRFields::ThermosiphonCapacityFractionCurveName, thermosiphonCapacityFractionCurve.handle());
930 2 return result;
931 }
932
933 1 void ChillerElectricEIR_Impl::resetThermosiphonCapacityFractionCurve() {
934
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Chiller_Electric_EIRFields::ThermosiphonCapacityFractionCurveName, "");
935
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
936 1 }
937
938 36 bool ChillerElectricEIR_Impl::setThermosiphonMinimumTemperatureDifference(double thermosiphonMinimumTemperatureDifference) {
939 36 bool result = setDouble(OS_Chiller_Electric_EIRFields::ThermosiphonMinimumTemperatureDifference, thermosiphonMinimumTemperatureDifference);
940 36 return result;
941 }
942
943 14 ComponentType ChillerElectricEIR_Impl::componentType() const {
944
1/1
✓ Branch 1 taken 14 times.
14 return ComponentType::Cooling;
945 }
946
947 5 std::vector<FuelType> ChillerElectricEIR_Impl::coolingFuelTypes() const {
948 5 std::set<FuelType> result;
949
2/2
✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
5 result.insert(FuelType::Electricity);
950
3/3
✓ Branch 1 taken 5 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 3 times.
10 if (auto p_ = condenserWaterLoop()) {
951
4/4
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 11 taken 1 time.
✓ Branch 12 taken 2 times.
3 for (auto ft : p_->coolingFuelTypes()) {
952
1/1
✓ Branch 1 taken 1 time.
1 result.insert(ft);
953 2 }
954 5 }
955
1/1
✓ Branch 3 taken 5 times.
15 return {result.begin(), result.end()};
956 5 }
957
958 1 std::vector<FuelType> ChillerElectricEIR_Impl::heatingFuelTypes() const {
959 1 return {};
960 }
961
962 1 std::vector<AppGFuelType> ChillerElectricEIR_Impl::appGHeatingFuelTypes() const {
963 1 return {};
964 }
965
966 } // namespace detail
967
968 17 ChillerElectricEIR::ChillerElectricEIR(const Model& model, const Curve& CCFofT, const Curve& EItoCORFofT, const Curve& EItoCORFofPLR)
969 17 : WaterToWaterComponent(ChillerElectricEIR::iddObjectType(), model) {
970
1/3
✗ Branch 2 not taken.
✓ Branch 3 taken 17 times.
✗ Branch 5 not taken.
17 OS_ASSERT(getImpl<detail::ChillerElectricEIR_Impl>());
971
972
2/4
✓ Branch 1 taken 17 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 17 times.
✗ Branch 6 not taken.
17 OS_ASSERT(setCoolingCapacityFunctionOfTemperature(CCFofT));
973
2/4
✓ Branch 1 taken 17 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 17 times.
✗ Branch 6 not taken.
17 OS_ASSERT(setElectricInputToCoolingOutputRatioFunctionOfTemperature(EItoCORFofT));
974
2/4
✓ Branch 1 taken 17 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 17 times.
✗ Branch 6 not taken.
17 OS_ASSERT(setElectricInputToCoolingOutputRatioFunctionOfPLR(EItoCORFofPLR));
975
2/4
✓ Branch 1 taken 17 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 17 times.
✗ Branch 6 not taken.
17 OS_ASSERT(setReferenceCOP(5.5));
976
977
1/1
✓ Branch 1 taken 17 times.
17 autosizeReferenceCapacity();
978
1/1
✓ Branch 1 taken 17 times.
17 autosizeReferenceChilledWaterFlowRate();
979 // autosizeReferenceCondenserFluidFlowRate();
980
1/1
✓ Branch 1 taken 17 times.
17 autosizeDesignHeatRecoveryWaterFlowRate();
981
982 // setSizingFactor(1.0);
983 // setBasinHeaterCapacity(0.0);
984
985
1/1
✓ Branch 1 taken 17 times.
17 setBasinHeaterSetpointTemperature(10.0); // Note: the IDD has a default of 2.0...
986
987
1/1
✓ Branch 1 taken 17 times.
17 resetBasinHeaterSchedule();
988
989
1/1
✓ Branch 1 taken 17 times.
17 setCondenserHeatRecoveryRelativeCapacityFraction(1.0);
990
1/1
✓ Branch 1 taken 17 times.
17 resetHeatRecoveryLeavingTemperatureSetpointNode();
991
1/1
✓ Branch 1 taken 17 times.
17 resetHeatRecoveryInletHighTemperatureLimitSchedule();
992
993
2/2
✓ Branch 1 taken 17 times.
✓ Branch 4 taken 17 times.
34 setEndUseSubcategory("General");
994
2/2
✓ Branch 1 taken 17 times.
✓ Branch 4 taken 17 times.
17 setCondenserFlowControl("ConstantFlow");
995
1/1
✓ Branch 1 taken 17 times.
17 setCondenserMinimumFlowFraction(0.2);
996
1/1
✓ Branch 1 taken 17 times.
17 setThermosiphonMinimumTemperatureDifference(0.0);
997 17 }
998
999 16 ChillerElectricEIR::ChillerElectricEIR(const Model& model) : WaterToWaterComponent(ChillerElectricEIR::iddObjectType(), model) {
1000
1/3
✗ Branch 2 not taken.
✓ Branch 3 taken 16 times.
✗ Branch 5 not taken.
16 OS_ASSERT(getImpl<detail::ChillerElectricEIR_Impl>());
1001
1002 // Both of the following test files have capft and eirft curves with the ctor values below:
1003 // - DOAS_wNeutralSupplyAir_wFanCoilUnits.idf
1004 // - WaterCooledChillerWithVSCondenserControl.idf
1005 // But the curves are unused in the test files.
1006
1007 // The following test files have curve values shown in the E+ documentation:
1008 // - ElectricEIRChiller.idf (WaterCooled)
1009 // - ElectricEIRChillerHeatRecoveryAuto.idf (WaterCooled)
1010 // - ElectricEIRChiller_EvapCooledCondenser.idf (EvaporativelyCooled)
1011
1012
1/1
✓ Branch 1 taken 16 times.
16 CurveBiquadratic ccFofT(model);
1013
1/1
✓ Branch 1 taken 16 times.
16 ccFofT.setCoefficient1Constant(1.0215158);
1014
1/1
✓ Branch 1 taken 16 times.
16 ccFofT.setCoefficient2x(0.037035864);
1015
1/1
✓ Branch 1 taken 16 times.
16 ccFofT.setCoefficient3xPOW2(0.0002332476);
1016
1/1
✓ Branch 1 taken 16 times.
16 ccFofT.setCoefficient4y(-0.003894048);
1017
1/1
✓ Branch 1 taken 16 times.
16 ccFofT.setCoefficient5yPOW2(-6.52536e-005);
1018
1/1
✓ Branch 1 taken 16 times.
16 ccFofT.setCoefficient6xTIMESY(-0.0002680452);
1019
1/1
✓ Branch 1 taken 16 times.
16 ccFofT.setMinimumValueofx(5.0);
1020
1/1
✓ Branch 1 taken 16 times.
16 ccFofT.setMaximumValueofx(10.0);
1021
1/1
✓ Branch 1 taken 16 times.
16 ccFofT.setMinimumValueofy(24.0);
1022
1/1
✓ Branch 1 taken 16 times.
16 ccFofT.setMaximumValueofy(35.0);
1023
1024
1/1
✓ Branch 1 taken 16 times.
16 CurveBiquadratic eirToCorfOfT(model);
1025
1/1
✓ Branch 1 taken 16 times.
16 eirToCorfOfT.setCoefficient1Constant(0.70176857);
1026
1/1
✓ Branch 1 taken 16 times.
16 eirToCorfOfT.setCoefficient2x(-0.00452016);
1027
1/1
✓ Branch 1 taken 16 times.
16 eirToCorfOfT.setCoefficient3xPOW2(0.0005331096);
1028
1/1
✓ Branch 1 taken 16 times.
16 eirToCorfOfT.setCoefficient4y(-0.005498208);
1029
1/1
✓ Branch 1 taken 16 times.
16 eirToCorfOfT.setCoefficient5yPOW2(0.0005445792);
1030
1/1
✓ Branch 1 taken 16 times.
16 eirToCorfOfT.setCoefficient6xTIMESY(-0.0007290324);
1031
1/1
✓ Branch 1 taken 16 times.
16 eirToCorfOfT.setMinimumValueofx(5.0);
1032
1/1
✓ Branch 1 taken 16 times.
16 eirToCorfOfT.setMaximumValueofx(10.0);
1033
1/1
✓ Branch 1 taken 16 times.
16 eirToCorfOfT.setMinimumValueofy(24.0);
1034
1/1
✓ Branch 1 taken 16 times.
16 eirToCorfOfT.setMaximumValueofy(35.0);
1035
1036
1/1
✓ Branch 1 taken 16 times.
16 CurveQuadratic eirToCorfOfPlr(model);
1037
1/1
✓ Branch 1 taken 16 times.
16 eirToCorfOfPlr.setCoefficient1Constant(0.06369119);
1038
1/1
✓ Branch 1 taken 16 times.
16 eirToCorfOfPlr.setCoefficient2x(0.58488832);
1039
1/1
✓ Branch 1 taken 16 times.
16 eirToCorfOfPlr.setCoefficient3xPOW2(0.35280274);
1040
1/1
✓ Branch 1 taken 16 times.
16 eirToCorfOfPlr.setMinimumValueofx(0.0);
1041
1/1
✓ Branch 1 taken 16 times.
16 eirToCorfOfPlr.setMaximumValueofx(1.0);
1042
1043
1/1
✓ Branch 1 taken 16 times.
16 setCoolingCapacityFunctionOfTemperature(ccFofT);
1044
1/1
✓ Branch 1 taken 16 times.
16 setElectricInputToCoolingOutputRatioFunctionOfTemperature(eirToCorfOfT);
1045
1/1
✓ Branch 1 taken 16 times.
16 setElectricInputToCoolingOutputRatioFunctionOfPLR(eirToCorfOfPlr);
1046
1047
2/4
✓ Branch 1 taken 16 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 16 times.
✗ Branch 6 not taken.
16 OS_ASSERT(setReferenceCOP(5.5));
1048
1049
1/1
✓ Branch 1 taken 16 times.
16 autosizeReferenceCapacity();
1050
1/1
✓ Branch 1 taken 16 times.
16 autosizeReferenceChilledWaterFlowRate();
1051 // autosizeReferenceCondenserFluidFlowRate();
1052
1/1
✓ Branch 1 taken 16 times.
16 autosizeDesignHeatRecoveryWaterFlowRate();
1053
1054 // setSizingFactor(1.0);
1055 // setBasinHeaterCapacity(0.0);
1056
1057
1/1
✓ Branch 1 taken 16 times.
16 setBasinHeaterSetpointTemperature(10.0); // Note: the IDD has a default of 2.0...
1058
1/1
✓ Branch 1 taken 16 times.
16 resetBasinHeaterSchedule();
1059
1/1
✓ Branch 1 taken 16 times.
16 setCondenserHeatRecoveryRelativeCapacityFraction(1.0);
1060
1/1
✓ Branch 1 taken 16 times.
16 resetHeatRecoveryLeavingTemperatureSetpointNode();
1061
1/1
✓ Branch 1 taken 16 times.
16 resetHeatRecoveryInletHighTemperatureLimitSchedule();
1062
1063
2/2
✓ Branch 1 taken 16 times.
✓ Branch 4 taken 16 times.
32 setEndUseSubcategory("General");
1064
2/2
✓ Branch 1 taken 16 times.
✓ Branch 4 taken 16 times.
16 setCondenserFlowControl("ConstantFlow");
1065
1/1
✓ Branch 1 taken 16 times.
16 setCondenserMinimumFlowFraction(0.2);
1066
1/1
✓ Branch 1 taken 16 times.
16 setThermosiphonMinimumTemperatureDifference(0.0);
1067 16 }
1068
1069 7716 IddObjectType ChillerElectricEIR::iddObjectType() {
1070
1/1
✓ Branch 1 taken 7716 times.
7716 IddObjectType result(IddObjectType::OS_Chiller_Electric_EIR);
1071 7716 return result;
1072 }
1073
1074 ✗ std::vector<std::string> ChillerElectricEIR::validCondenserTypeValues() {
1075 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_Chiller_Electric_EIRFields::CondenserType);
1076 }
1077
1078 ✗ std::vector<std::string> ChillerElectricEIR::validChillerFlowModeValues() {
1079 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_Chiller_Electric_EIRFields::ChillerFlowMode);
1080 }
1081
1082 ✗ std::vector<std::string> ChillerElectricEIR::validCondenserFlowControlValues() {
1083 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_Chiller_Electric_EIRFields::CondenserFlowControl);
1084 }
1085
1086 5 boost::optional<double> ChillerElectricEIR::referenceCapacity() const {
1087
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->referenceCapacity();
1088 }
1089
1090 5 bool ChillerElectricEIR::isReferenceCapacityAutosized() const {
1091
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->isReferenceCapacityAutosized();
1092 }
1093
1094 5 double ChillerElectricEIR::referenceCOP() const {
1095
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->referenceCOP();
1096 }
1097
1098 6 double ChillerElectricEIR::referenceLeavingChilledWaterTemperature() const {
1099
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::ChillerElectricEIR_Impl>()->referenceLeavingChilledWaterTemperature();
1100 }
1101
1102 3 bool ChillerElectricEIR::isReferenceLeavingChilledWaterTemperatureDefaulted() const {
1103
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->isReferenceLeavingChilledWaterTemperatureDefaulted();
1104 }
1105
1106 6 double ChillerElectricEIR::referenceEnteringCondenserFluidTemperature() const {
1107
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::ChillerElectricEIR_Impl>()->referenceEnteringCondenserFluidTemperature();
1108 }
1109
1110 3 bool ChillerElectricEIR::isReferenceEnteringCondenserFluidTemperatureDefaulted() const {
1111
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->isReferenceEnteringCondenserFluidTemperatureDefaulted();
1112 }
1113
1114 5 boost::optional<double> ChillerElectricEIR::referenceChilledWaterFlowRate() const {
1115
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->referenceChilledWaterFlowRate();
1116 }
1117
1118 5 bool ChillerElectricEIR::isReferenceChilledWaterFlowRateAutosized() const {
1119
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->isReferenceChilledWaterFlowRateAutosized();
1120 }
1121
1122 5 boost::optional<double> ChillerElectricEIR::referenceCondenserFluidFlowRate() const {
1123
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->referenceCondenserFluidFlowRate();
1124 }
1125
1126 6 bool ChillerElectricEIR::isReferenceCondenserFluidFlowRateAutosized() const {
1127
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::ChillerElectricEIR_Impl>()->isReferenceCondenserFluidFlowRateAutosized();
1128 }
1129
1130 34 bool ChillerElectricEIR::setCoolingCapacityFunctionOfTemperature(const Curve& curve) {
1131
1/1
✓ Branch 3 taken 34 times.
34 return getImpl<detail::ChillerElectricEIR_Impl>()->setCoolingCapacityFunctionOfTemperature(curve);
1132 }
1133
1134 34 bool ChillerElectricEIR::setElectricInputToCoolingOutputRatioFunctionOfTemperature(const Curve& curve) {
1135
1/1
✓ Branch 3 taken 34 times.
34 return getImpl<detail::ChillerElectricEIR_Impl>()->setElectricInputToCoolingOutputRatioFunctionOfTemperature(curve);
1136 }
1137
1138 36 bool ChillerElectricEIR::setElectricInputToCoolingOutputRatioFunctionOfPLR(const Curve& curve) {
1139
1/1
✓ Branch 3 taken 36 times.
36 return getImpl<detail::ChillerElectricEIR_Impl>()->setElectricInputToCoolingOutputRatioFunctionOfPLR(curve);
1140 }
1141
1142 9 Curve ChillerElectricEIR::coolingCapacityFunctionOfTemperature() const {
1143
1/1
✓ Branch 3 taken 9 times.
9 return getImpl<detail::ChillerElectricEIR_Impl>()->coolingCapacityFunctionOfTemperature();
1144 }
1145
1146 9 Curve ChillerElectricEIR::electricInputToCoolingOutputRatioFunctionOfTemperature() const {
1147
1/1
✓ Branch 3 taken 9 times.
9 return getImpl<detail::ChillerElectricEIR_Impl>()->electricInputToCoolingOutputRatioFunctionOfTemperature();
1148 }
1149
1150 16 Curve ChillerElectricEIR::electricInputToCoolingOutputRatioFunctionOfPLR() const {
1151
1/1
✓ Branch 3 taken 16 times.
16 return getImpl<detail::ChillerElectricEIR_Impl>()->electricInputToCoolingOutputRatioFunctionOfPLR();
1152 }
1153
1154 5 double ChillerElectricEIR::minimumPartLoadRatio() const {
1155
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->minimumPartLoadRatio();
1156 }
1157
1158 3 bool ChillerElectricEIR::isMinimumPartLoadRatioDefaulted() const {
1159
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->isMinimumPartLoadRatioDefaulted();
1160 }
1161
1162 5 double ChillerElectricEIR::maximumPartLoadRatio() const {
1163
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->maximumPartLoadRatio();
1164 }
1165
1166 3 bool ChillerElectricEIR::isMaximumPartLoadRatioDefaulted() const {
1167
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->isMaximumPartLoadRatioDefaulted();
1168 }
1169
1170 5 double ChillerElectricEIR::optimumPartLoadRatio() const {
1171
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->optimumPartLoadRatio();
1172 }
1173
1174 3 bool ChillerElectricEIR::isOptimumPartLoadRatioDefaulted() const {
1175
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->isOptimumPartLoadRatioDefaulted();
1176 }
1177
1178 5 double ChillerElectricEIR::minimumUnloadingRatio() const {
1179
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->minimumUnloadingRatio();
1180 }
1181
1182 3 bool ChillerElectricEIR::isMinimumUnloadingRatioDefaulted() const {
1183
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->isMinimumUnloadingRatioDefaulted();
1184 }
1185
1186 16 std::string ChillerElectricEIR::condenserType() const {
1187
1/1
✓ Branch 3 taken 16 times.
16 return getImpl<detail::ChillerElectricEIR_Impl>()->condenserType();
1188 }
1189
1190 ✗ bool ChillerElectricEIR::isCondenserTypeDefaulted() const {
1191 ✗ return getImpl<detail::ChillerElectricEIR_Impl>()->isCondenserTypeDefaulted();
1192 }
1193
1194 5 double ChillerElectricEIR::condenserFanPowerRatio() const {
1195
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->condenserFanPowerRatio();
1196 }
1197
1198 3 bool ChillerElectricEIR::isCondenserFanPowerRatioDefaulted() const {
1199
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->isCondenserFanPowerRatioDefaulted();
1200 }
1201
1202 5 double ChillerElectricEIR::fractionofCompressorElectricConsumptionRejectedbyCondenser() const {
1203
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->fractionofCompressorElectricConsumptionRejectedbyCondenser();
1204 }
1205
1206 3 bool ChillerElectricEIR::isFractionofCompressorElectricConsumptionRejectedbyCondenserDefaulted() const {
1207
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->isFractionofCompressorElectricConsumptionRejectedbyCondenserDefaulted();
1208 }
1209
1210 5 double ChillerElectricEIR::leavingChilledWaterLowerTemperatureLimit() const {
1211
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->leavingChilledWaterLowerTemperatureLimit();
1212 }
1213
1214 3 bool ChillerElectricEIR::isLeavingChilledWaterLowerTemperatureLimitDefaulted() const {
1215
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->isLeavingChilledWaterLowerTemperatureLimitDefaulted();
1216 }
1217
1218 6 std::string ChillerElectricEIR::chillerFlowMode() const {
1219
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::ChillerElectricEIR_Impl>()->chillerFlowMode();
1220 }
1221
1222 3 bool ChillerElectricEIR::isChillerFlowModeDefaulted() const {
1223
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->isChillerFlowModeDefaulted();
1224 }
1225
1226 5 boost::optional<double> ChillerElectricEIR::designHeatRecoveryWaterFlowRate() const {
1227
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->designHeatRecoveryWaterFlowRate();
1228 }
1229
1230 3 bool ChillerElectricEIR::isDesignHeatRecoveryWaterFlowRateAutosized() const {
1231
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->isDesignHeatRecoveryWaterFlowRateAutosized();
1232 }
1233
1234 5 double ChillerElectricEIR::sizingFactor() const {
1235
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->sizingFactor();
1236 }
1237
1238 3 bool ChillerElectricEIR::isSizingFactorDefaulted() const {
1239
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->isSizingFactorDefaulted();
1240 }
1241
1242 5 double ChillerElectricEIR::basinHeaterCapacity() const {
1243
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->basinHeaterCapacity();
1244 }
1245
1246 3 bool ChillerElectricEIR::isBasinHeaterCapacityDefaulted() const {
1247
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->isBasinHeaterCapacityDefaulted();
1248 }
1249
1250 7 double ChillerElectricEIR::basinHeaterSetpointTemperature() const {
1251
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::ChillerElectricEIR_Impl>()->basinHeaterSetpointTemperature();
1252 }
1253
1254 3 bool ChillerElectricEIR::isBasinHeaterSetpointTemperatureDefaulted() const {
1255
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->isBasinHeaterSetpointTemperatureDefaulted();
1256 }
1257
1258 ✗ bool ChillerElectricEIR::setReferenceCapacity(boost::optional<double> referenceCapacity) {
1259 ✗ return getImpl<detail::ChillerElectricEIR_Impl>()->setReferenceCapacity(referenceCapacity);
1260 }
1261
1262 6 bool ChillerElectricEIR::setReferenceCapacity(double referenceCapacity) {
1263
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::ChillerElectricEIR_Impl>()->setReferenceCapacity(referenceCapacity);
1264 }
1265
1266 34 void ChillerElectricEIR::autosizeReferenceCapacity() {
1267
1/1
✓ Branch 3 taken 34 times.
34 getImpl<detail::ChillerElectricEIR_Impl>()->autosizeReferenceCapacity();
1268 34 }
1269
1270 39 bool ChillerElectricEIR::setReferenceCOP(double referenceCOP) {
1271
1/1
✓ Branch 3 taken 39 times.
39 return getImpl<detail::ChillerElectricEIR_Impl>()->setReferenceCOP(referenceCOP);
1272 }
1273
1274 2 bool ChillerElectricEIR::setReferenceLeavingChilledWaterTemperature(double referenceLeavingChilledWaterTemperature) {
1275
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::ChillerElectricEIR_Impl>()->setReferenceLeavingChilledWaterTemperature(referenceLeavingChilledWaterTemperature);
1276 }
1277
1278 1 void ChillerElectricEIR::resetReferenceLeavingChilledWaterTemperature() {
1279
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetReferenceLeavingChilledWaterTemperature();
1280 1 }
1281
1282 5 bool ChillerElectricEIR::setReferenceEnteringCondenserFluidTemperature(double referenceEnteringCondenserFluidTemperature) {
1283
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->setReferenceEnteringCondenserFluidTemperature(referenceEnteringCondenserFluidTemperature);
1284 }
1285
1286 1 void ChillerElectricEIR::resetReferenceEnteringCondenserFluidTemperature() {
1287
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetReferenceEnteringCondenserFluidTemperature();
1288 1 }
1289
1290 ✗ bool ChillerElectricEIR::setReferenceChilledWaterFlowRate(boost::optional<double> referenceChilledWaterFlowRate) {
1291 ✗ return getImpl<detail::ChillerElectricEIR_Impl>()->setReferenceChilledWaterFlowRate(referenceChilledWaterFlowRate);
1292 }
1293
1294 6 bool ChillerElectricEIR::setReferenceChilledWaterFlowRate(double referenceChilledWaterFlowRate) {
1295
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::ChillerElectricEIR_Impl>()->setReferenceChilledWaterFlowRate(referenceChilledWaterFlowRate);
1296 }
1297
1298 ✗ void ChillerElectricEIR::resetReferenceChilledWaterFlowRate() {
1299 ✗ getImpl<detail::ChillerElectricEIR_Impl>()->resetReferenceChilledWaterFlowRate();
1300 ✗ }
1301
1302 34 void ChillerElectricEIR::autosizeReferenceChilledWaterFlowRate() {
1303
1/1
✓ Branch 3 taken 34 times.
34 getImpl<detail::ChillerElectricEIR_Impl>()->autosizeReferenceChilledWaterFlowRate();
1304 34 }
1305
1306 ✗ bool ChillerElectricEIR::setReferenceCondenserFluidFlowRate(boost::optional<double> referenceCondenserFluidFlowRate) {
1307 ✗ return getImpl<detail::ChillerElectricEIR_Impl>()->setReferenceCondenserFluidFlowRate(referenceCondenserFluidFlowRate);
1308 }
1309
1310 4 bool ChillerElectricEIR::setReferenceCondenserFluidFlowRate(double referenceCondenserFluidFlowRate) {
1311
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::ChillerElectricEIR_Impl>()->setReferenceCondenserFluidFlowRate(referenceCondenserFluidFlowRate);
1312 }
1313
1314 1 void ChillerElectricEIR::resetReferenceCondenserFluidFlowRate() {
1315
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetReferenceCondenserFluidFlowRate();
1316 1 }
1317
1318 1 void ChillerElectricEIR::autosizeReferenceCondenserFluidFlowRate() {
1319
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->autosizeReferenceCondenserFluidFlowRate();
1320 1 }
1321
1322 6 bool ChillerElectricEIR::setMinimumPartLoadRatio(double minimumPartLoadRatio) {
1323
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::ChillerElectricEIR_Impl>()->setMinimumPartLoadRatio(minimumPartLoadRatio);
1324 }
1325
1326 1 void ChillerElectricEIR::resetMinimumPartLoadRatio() {
1327
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetMinimumPartLoadRatio();
1328 1 }
1329
1330 3 bool ChillerElectricEIR::setMaximumPartLoadRatio(double maximumPartLoadRatio) {
1331
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->setMaximumPartLoadRatio(maximumPartLoadRatio);
1332 }
1333
1334 1 void ChillerElectricEIR::resetMaximumPartLoadRatio() {
1335
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetMaximumPartLoadRatio();
1336 1 }
1337
1338 3 bool ChillerElectricEIR::setOptimumPartLoadRatio(double optimumPartLoadRatio) {
1339
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->setOptimumPartLoadRatio(optimumPartLoadRatio);
1340 }
1341
1342 1 void ChillerElectricEIR::resetOptimumPartLoadRatio() {
1343
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetOptimumPartLoadRatio();
1344 1 }
1345
1346 6 bool ChillerElectricEIR::setMinimumUnloadingRatio(double minimumUnloadingRatio) {
1347
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::ChillerElectricEIR_Impl>()->setMinimumUnloadingRatio(minimumUnloadingRatio);
1348 }
1349
1350 1 void ChillerElectricEIR::resetMinimumUnloadingRatio() {
1351
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetMinimumUnloadingRatio();
1352 1 }
1353
1354 11 bool ChillerElectricEIR::setCondenserType(const std::string& condenserType) {
1355
1/1
✓ Branch 3 taken 11 times.
11 return getImpl<detail::ChillerElectricEIR_Impl>()->setCondenserType(condenserType);
1356 }
1357
1358 ✗ void ChillerElectricEIR::resetCondenserType() {
1359 ✗ getImpl<detail::ChillerElectricEIR_Impl>()->resetCondenserType();
1360 ✗ }
1361
1362 3 bool ChillerElectricEIR::setCondenserFanPowerRatio(double condenserFanPowerRatio) {
1363
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->setCondenserFanPowerRatio(condenserFanPowerRatio);
1364 }
1365
1366 1 void ChillerElectricEIR::resetCondenserFanPowerRatio() {
1367
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetCondenserFanPowerRatio();
1368 1 }
1369
1370 3 bool ChillerElectricEIR::setFractionofCompressorElectricConsumptionRejectedbyCondenser(
1371 double fractionofCompressorElectricConsumptionRejectedbyCondenser) {
1372
1/1
✓ Branch 3 taken 3 times.
6 return getImpl<detail::ChillerElectricEIR_Impl>()->setFractionofCompressorElectricConsumptionRejectedbyCondenser(
1373 6 fractionofCompressorElectricConsumptionRejectedbyCondenser);
1374 }
1375
1376 1 void ChillerElectricEIR::resetFractionofCompressorElectricConsumptionRejectedbyCondenser() {
1377
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetFractionofCompressorElectricConsumptionRejectedbyCondenser();
1378 1 }
1379
1380 2 bool ChillerElectricEIR::setLeavingChilledWaterLowerTemperatureLimit(double leavingChilledWaterLowerTemperatureLimit) {
1381
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::ChillerElectricEIR_Impl>()->setLeavingChilledWaterLowerTemperatureLimit(leavingChilledWaterLowerTemperatureLimit);
1382 }
1383
1384 1 void ChillerElectricEIR::resetLeavingChilledWaterLowerTemperatureLimit() {
1385
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetLeavingChilledWaterLowerTemperatureLimit();
1386 1 }
1387
1388 3 bool ChillerElectricEIR::setChillerFlowMode(const std::string& chillerFlowMode) {
1389
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->setChillerFlowMode(chillerFlowMode);
1390 }
1391
1392 1 void ChillerElectricEIR::resetChillerFlowMode() {
1393
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetChillerFlowMode();
1394 1 }
1395
1396 3 bool ChillerElectricEIR::setDesignHeatRecoveryWaterFlowRate(double designHeatRecoveryWaterFlowRate) {
1397
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->setDesignHeatRecoveryWaterFlowRate(designHeatRecoveryWaterFlowRate);
1398 }
1399
1400 34 void ChillerElectricEIR::autosizeDesignHeatRecoveryWaterFlowRate() {
1401
1/1
✓ Branch 3 taken 34 times.
34 getImpl<detail::ChillerElectricEIR_Impl>()->autosizeDesignHeatRecoveryWaterFlowRate();
1402 34 }
1403
1404 3 bool ChillerElectricEIR::setSizingFactor(double sizingFactor) {
1405
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->setSizingFactor(sizingFactor);
1406 }
1407
1408 1 void ChillerElectricEIR::resetSizingFactor() {
1409
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetSizingFactor();
1410 1 }
1411
1412 3 bool ChillerElectricEIR::setBasinHeaterCapacity(double basinHeaterCapacity) {
1413
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->setBasinHeaterCapacity(basinHeaterCapacity);
1414 }
1415
1416 1 void ChillerElectricEIR::resetBasinHeaterCapacity() {
1417
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetBasinHeaterCapacity();
1418 1 }
1419
1420 36 bool ChillerElectricEIR::setBasinHeaterSetpointTemperature(double basinHeaterSetpointTemperature) {
1421
1/1
✓ Branch 3 taken 36 times.
36 return getImpl<detail::ChillerElectricEIR_Impl>()->setBasinHeaterSetpointTemperature(basinHeaterSetpointTemperature);
1422 }
1423
1424 1 void ChillerElectricEIR::resetBasinHeaterSetpointTemperature() {
1425
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetBasinHeaterSetpointTemperature();
1426 1 }
1427
1428 2 bool ChillerElectricEIR::setBasinHeaterSchedule(Schedule& schedule) {
1429
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::ChillerElectricEIR_Impl>()->setBasinHeaterSchedule(schedule);
1430 }
1431
1432 34 void ChillerElectricEIR::resetBasinHeaterSchedule() {
1433
1/1
✓ Branch 3 taken 34 times.
34 getImpl<detail::ChillerElectricEIR_Impl>()->resetBasinHeaterSchedule();
1434 34 }
1435
1436 6 boost::optional<Schedule> ChillerElectricEIR::basinHeaterSchedule() const {
1437
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::ChillerElectricEIR_Impl>()->basinHeaterSchedule();
1438 }
1439
1440 5 std::string ChillerElectricEIR::endUseSubcategory() const {
1441
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->endUseSubcategory();
1442 }
1443
1444 35 bool ChillerElectricEIR::setEndUseSubcategory(const std::string& endUseSubcategory) {
1445
1/1
✓ Branch 3 taken 35 times.
35 return getImpl<detail::ChillerElectricEIR_Impl>()->setEndUseSubcategory(endUseSubcategory);
1446 }
1447
1448 5 double ChillerElectricEIR::condenserHeatRecoveryRelativeCapacityFraction() const {
1449
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->condenserHeatRecoveryRelativeCapacityFraction();
1450 }
1451
1452 36 bool ChillerElectricEIR::setCondenserHeatRecoveryRelativeCapacityFraction(double condenserHeatRecoveryRelativeCapacityFraction) {
1453
1/1
✓ Branch 3 taken 36 times.
72 return getImpl<detail::ChillerElectricEIR_Impl>()->setCondenserHeatRecoveryRelativeCapacityFraction(
1454 72 condenserHeatRecoveryRelativeCapacityFraction);
1455 }
1456
1457 6 boost::optional<Schedule> ChillerElectricEIR::heatRecoveryInletHighTemperatureLimitSchedule() const {
1458
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::ChillerElectricEIR_Impl>()->heatRecoveryInletHighTemperatureLimitSchedule();
1459 }
1460
1461 2 bool ChillerElectricEIR::setHeatRecoveryInletHighTemperatureLimitSchedule(Schedule& s) {
1462
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::ChillerElectricEIR_Impl>()->setHeatRecoveryInletHighTemperatureLimitSchedule(s);
1463 }
1464
1465 34 void ChillerElectricEIR::resetHeatRecoveryInletHighTemperatureLimitSchedule() {
1466
1/1
✓ Branch 3 taken 34 times.
34 getImpl<detail::ChillerElectricEIR_Impl>()->resetHeatRecoveryInletHighTemperatureLimitSchedule();
1467 34 }
1468
1469 5 boost::optional<Node> ChillerElectricEIR::heatRecoveryLeavingTemperatureSetpointNode() const {
1470
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->heatRecoveryLeavingTemperatureSetpointNode();
1471 }
1472
1473 2 bool ChillerElectricEIR::setHeatRecoveryLeavingTemperatureSetpointNode(const Node& node) {
1474
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::ChillerElectricEIR_Impl>()->setHeatRecoveryLeavingTemperatureSetpointNode(node);
1475 }
1476
1477 33 void ChillerElectricEIR::resetHeatRecoveryLeavingTemperatureSetpointNode() {
1478
1/1
✓ Branch 3 taken 33 times.
33 getImpl<detail::ChillerElectricEIR_Impl>()->resetHeatRecoveryLeavingTemperatureSetpointNode();
1479 33 }
1480
1481 5 std::string ChillerElectricEIR::condenserFlowControl() const {
1482
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->condenserFlowControl();
1483 }
1484
1485 6 boost::optional<Curve> ChillerElectricEIR::condenserLoopFlowRateFractionFunctionofLoopPartLoadRatioCurve() const {
1486
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::ChillerElectricEIR_Impl>()->condenserLoopFlowRateFractionFunctionofLoopPartLoadRatioCurve();
1487 }
1488
1489 6 boost::optional<Schedule> ChillerElectricEIR::temperatureDifferenceAcrossCondenserSchedule() const {
1490
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::ChillerElectricEIR_Impl>()->temperatureDifferenceAcrossCondenserSchedule();
1491 }
1492
1493 5 double ChillerElectricEIR::condenserMinimumFlowFraction() const {
1494
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->condenserMinimumFlowFraction();
1495 }
1496
1497 6 boost::optional<Curve> ChillerElectricEIR::thermosiphonCapacityFractionCurve() const {
1498
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::ChillerElectricEIR_Impl>()->thermosiphonCapacityFractionCurve();
1499 }
1500
1501 5 double ChillerElectricEIR::thermosiphonMinimumTemperatureDifference() const {
1502
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->thermosiphonMinimumTemperatureDifference();
1503 }
1504
1505 36 bool ChillerElectricEIR::setCondenserFlowControl(const std::string& condenserFlowControl) {
1506
1/1
✓ Branch 3 taken 36 times.
36 return getImpl<detail::ChillerElectricEIR_Impl>()->setCondenserFlowControl(condenserFlowControl);
1507 }
1508
1509 2 bool ChillerElectricEIR::setCondenserLoopFlowRateFractionFunctionofLoopPartLoadRatioCurve(
1510 const Curve& condenserLoopFlowRateFractionFunctionofLoopPartLoadRatioCurve) {
1511
1/1
✓ Branch 3 taken 2 times.
4 return getImpl<detail::ChillerElectricEIR_Impl>()->setCondenserLoopFlowRateFractionFunctionofLoopPartLoadRatioCurve(
1512 4 condenserLoopFlowRateFractionFunctionofLoopPartLoadRatioCurve);
1513 }
1514
1515 1 void ChillerElectricEIR::resetCondenserLoopFlowRateFractionFunctionofLoopPartLoadRatioCurve() {
1516
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetCondenserLoopFlowRateFractionFunctionofLoopPartLoadRatioCurve();
1517 1 }
1518
1519 2 bool ChillerElectricEIR::setTemperatureDifferenceAcrossCondenserSchedule(Schedule& temperatureDifferenceAcrossCondenserSchedule) {
1520
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::ChillerElectricEIR_Impl>()->setTemperatureDifferenceAcrossCondenserSchedule(temperatureDifferenceAcrossCondenserSchedule);
1521 }
1522
1523 1 void ChillerElectricEIR::resetTemperatureDifferenceAcrossCondenserSchedule() {
1524
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetTemperatureDifferenceAcrossCondenserSchedule();
1525 1 }
1526
1527 35 bool ChillerElectricEIR::setCondenserMinimumFlowFraction(double condenserMinimumFlowFraction) {
1528
1/1
✓ Branch 3 taken 35 times.
35 return getImpl<detail::ChillerElectricEIR_Impl>()->setCondenserMinimumFlowFraction(condenserMinimumFlowFraction);
1529 }
1530
1531 2 bool ChillerElectricEIR::setThermosiphonCapacityFractionCurve(const Curve& thermosiphonCapacityFractionCurve) {
1532
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::ChillerElectricEIR_Impl>()->setThermosiphonCapacityFractionCurve(thermosiphonCapacityFractionCurve);
1533 }
1534
1535 1 void ChillerElectricEIR::resetThermosiphonCapacityFractionCurve() {
1536
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetThermosiphonCapacityFractionCurve();
1537 1 }
1538
1539 36 bool ChillerElectricEIR::setThermosiphonMinimumTemperatureDifference(double thermosiphonMinimumTemperatureDifference) {
1540
1/1
✓ Branch 3 taken 36 times.
36 return getImpl<detail::ChillerElectricEIR_Impl>()->setThermosiphonMinimumTemperatureDifference(thermosiphonMinimumTemperatureDifference);
1541 }
1542
1543 /// @cond
1544
1/1
✓ Branch 3 taken 8 times.
8 ChillerElectricEIR::ChillerElectricEIR(std::shared_ptr<detail::ChillerElectricEIR_Impl> impl) : WaterToWaterComponent(std::move(impl)) {}
1545
1546 /// @endcond
1547
1548 // Convenience functions
1549 15 boost::optional<PlantLoop> ChillerElectricEIR::chilledWaterLoop() const {
1550
1/1
✓ Branch 3 taken 15 times.
15 return getImpl<detail::ChillerElectricEIR_Impl>()->chilledWaterLoop();
1551 }
1552
1553 ✗ boost::optional<Node> ChillerElectricEIR::chilledWaterInletNode() const {
1554 ✗ return getImpl<detail::ChillerElectricEIR_Impl>()->chilledWaterInletNode();
1555 }
1556
1557 ✗ boost::optional<Node> ChillerElectricEIR::chilledWaterOutletNode() const {
1558 ✗ return getImpl<detail::ChillerElectricEIR_Impl>()->chilledWaterOutletNode();
1559 }
1560
1561 14 boost::optional<PlantLoop> ChillerElectricEIR::condenserWaterLoop() const {
1562
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::ChillerElectricEIR_Impl>()->condenserWaterLoop();
1563 }
1564
1565 ✗ boost::optional<Node> ChillerElectricEIR::condenserInletNode() const {
1566 ✗ return getImpl<detail::ChillerElectricEIR_Impl>()->condenserInletNode();
1567 }
1568
1569 ✗ boost::optional<Node> ChillerElectricEIR::condenserOutletNode() const {
1570 ✗ return getImpl<detail::ChillerElectricEIR_Impl>()->condenserOutletNode();
1571 }
1572
1573 18 boost::optional<PlantLoop> ChillerElectricEIR::heatRecoveryLoop() const {
1574
1/1
✓ Branch 3 taken 18 times.
18 return getImpl<detail::ChillerElectricEIR_Impl>()->heatRecoveryLoop();
1575 }
1576
1577 ✗ boost::optional<Node> ChillerElectricEIR::heatRecoveryInletNode() const {
1578 ✗ return getImpl<detail::ChillerElectricEIR_Impl>()->heatRecoveryInletNode();
1579 }
1580
1581 ✗ boost::optional<Node> ChillerElectricEIR::heatRecoveryOutletNode() const {
1582 ✗ return getImpl<detail::ChillerElectricEIR_Impl>()->heatRecoveryOutletNode();
1583 }
1584
1585 ✗ boost::optional<double> ChillerElectricEIR::autosizedReferenceCapacity() const {
1586 ✗ return getImpl<detail::ChillerElectricEIR_Impl>()->autosizedReferenceCapacity();
1587 }
1588
1589 ✗ boost::optional<double> ChillerElectricEIR::autosizedReferenceChilledWaterFlowRate() const {
1590 ✗ return getImpl<detail::ChillerElectricEIR_Impl>()->autosizedReferenceChilledWaterFlowRate();
1591 }
1592
1593 ✗ boost::optional<double> ChillerElectricEIR::autosizedReferenceCondenserFluidFlowRate() const {
1594 ✗ return getImpl<detail::ChillerElectricEIR_Impl>()->autosizedReferenceCondenserFluidFlowRate();
1595 }
1596
1597 ✗ boost::optional<double> ChillerElectricEIR::autosizedDesignHeatRecoveryWaterFlowRate() const {
1598 ✗ return getImpl<detail::ChillerElectricEIR_Impl>()->autosizedDesignHeatRecoveryWaterFlowRate();
1599 }
1600
1601 } // namespace model
1602 } // namespace openstudio
1603