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 32 ChillerElectricEIR_Impl::ChillerElectricEIR_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle)
33 32 : WaterToWaterComponent_Impl(idfObject, model, keepHandle) {
34
4/6
✓ Branch 1 taken 32 times.
✓ Branch 4 taken 32 times.
✓ Branch 7 taken 32 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 32 times.
✗ Branch 13 not taken.
32 OS_ASSERT(idfObject.iddObject().type() == ChillerElectricEIR::iddObjectType());
35 32 }
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 4 double ChillerElectricEIR_Impl::referenceLeavingChilledWaterTemperature() const {
123
1/1
✓ Branch 1 taken 4 times.
4 boost::optional<double> value = getDouble(OS_Chiller_Electric_EIRFields::ReferenceLeavingChilledWaterTemperature, true);
124
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
4 OS_ASSERT(value);
125
1/1
✓ Branch 1 taken 4 times.
8 return value.get();
126 }
127
128 3 bool ChillerElectricEIR_Impl::isReferenceLeavingChilledWaterTemperatureDefaulted() const {
129 3 return isEmpty(OS_Chiller_Electric_EIRFields::ReferenceLeavingChilledWaterTemperature);
130 }
131
132 4 double ChillerElectricEIR_Impl::referenceEnteringCondenserFluidTemperature() const {
133
1/1
✓ Branch 1 taken 4 times.
4 boost::optional<double> value = getDouble(OS_Chiller_Electric_EIRFields::ReferenceEnteringCondenserFluidTemperature, true);
134
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
4 OS_ASSERT(value);
135
1/1
✓ Branch 1 taken 4 times.
8 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 15 Curve ChillerElectricEIR_Impl::coolingCapacityFunctionOfTemperature() const {
169
3/3
✓ Branch 1 taken 15 times.
✓ Branch 4 taken 15 times.
✓ Branch 7 taken 15 times.
15 WorkspaceObject wo = getTarget(OS_Chiller_Electric_EIRFields::CoolingCapacityFunctionofTemperatureCurveName).get();
170
3/3
✓ Branch 1 taken 15 times.
✓ Branch 4 taken 15 times.
✓ Branch 7 taken 15 times.
30 return wo.optionalCast<Curve>().get();
171 15 }
172
173 15 Curve ChillerElectricEIR_Impl::electricInputToCoolingOutputRatioFunctionOfTemperature() const {
174
3/3
✓ Branch 1 taken 15 times.
✓ Branch 4 taken 15 times.
✓ Branch 7 taken 15 times.
15 WorkspaceObject wo = getTarget(OS_Chiller_Electric_EIRFields::ElectricInputtoCoolingOutputRatioFunctionofTemperatureCurveName).get();
175
3/3
✓ Branch 1 taken 15 times.
✓ Branch 4 taken 15 times.
✓ Branch 7 taken 15 times.
30 return wo.optionalCast<Curve>().get();
176 15 }
177
178 22 Curve ChillerElectricEIR_Impl::electricInputToCoolingOutputRatioFunctionOfPLR() const {
179
3/3
✓ Branch 1 taken 22 times.
✓ Branch 4 taken 22 times.
✓ Branch 7 taken 22 times.
22 WorkspaceObject wo = getTarget(OS_Chiller_Electric_EIRFields::ElectricInputtoCoolingOutputRatioFunctionofPartLoadRatioCurveName).get();
180
3/3
✓ Branch 1 taken 22 times.
✓ Branch 4 taken 22 times.
✓ Branch 7 taken 22 times.
44 return wo.optionalCast<Curve>().get();
181 22 }
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 32 void ChillerElectricEIR_Impl::autosizeReferenceCapacity() {
325
2/2
✓ Branch 1 taken 32 times.
✓ Branch 4 taken 32 times.
64 bool result = setString(OS_Chiller_Electric_EIRFields::ReferenceCapacity, "Autosize");
326
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 32 times.
32 OS_ASSERT(result);
327 32 }
328
329 6 bool ChillerElectricEIR_Impl::setReferenceCapacity(double referenceCapacity) {
330 6 return setDouble(OS_Chiller_Electric_EIRFields::ReferenceCapacity, referenceCapacity);
331 }
332
333 37 bool ChillerElectricEIR_Impl::setReferenceCOP(double referenceCOP) {
334 37 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 32 void ChillerElectricEIR_Impl::autosizeReferenceChilledWaterFlowRate() {
373
2/2
✓ Branch 1 taken 32 times.
✓ Branch 4 taken 32 times.
64 bool result = setString(OS_Chiller_Electric_EIRFields::ReferenceChilledWaterFlowRate, "Autosize");
374
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 32 times.
32 OS_ASSERT(result);
375 32 }
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 32 bool ChillerElectricEIR_Impl::setCoolingCapacityFunctionOfTemperature(const Curve& curve) {
406
4/5
✓ Branch 1 taken 32 times.
✓ Branch 4 taken 32 times.
✓ Branch 7 taken 32 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 32 times.
32 if (model() != curve.model()) {
407 ✗ return false;
408 }
409
2/2
✓ Branch 1 taken 32 times.
✓ Branch 4 taken 32 times.
32 return this->setPointer(OS_Chiller_Electric_EIRFields::CoolingCapacityFunctionofTemperatureCurveName, curve.handle());
410 }
411
412 32 bool ChillerElectricEIR_Impl::setElectricInputToCoolingOutputRatioFunctionOfTemperature(const Curve& curve) {
413
4/5
✓ Branch 1 taken 32 times.
✓ Branch 4 taken 32 times.
✓ Branch 7 taken 32 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 32 times.
32 if (model() != curve.model()) {
414 ✗ return false;
415 }
416
2/2
✓ Branch 1 taken 32 times.
✓ Branch 4 taken 32 times.
32 return this->setPointer(OS_Chiller_Electric_EIRFields::ElectricInputtoCoolingOutputRatioFunctionofTemperatureCurveName, curve.handle());
417 }
418
419 34 bool ChillerElectricEIR_Impl::setElectricInputToCoolingOutputRatioFunctionOfPLR(const Curve& curve) {
420
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()) {
421 ✗ return false;
422 }
423
2/2
✓ Branch 1 taken 34 times.
✓ Branch 4 taken 34 times.
34 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 32 void ChillerElectricEIR_Impl::autosizeDesignHeatRecoveryWaterFlowRate() {
534
2/2
✓ Branch 1 taken 32 times.
✓ Branch 4 taken 32 times.
64 bool result = setString(OS_Chiller_Electric_EIRFields::DesignHeatRecoveryWaterFlowRate, "Autosize");
535
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 32 times.
32 OS_ASSERT(result);
536 32 }
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 34 bool ChillerElectricEIR_Impl::setBasinHeaterSetpointTemperature(double basinHeaterSetpointTemperature) {
557 34 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 32 void ChillerElectricEIR_Impl::resetBasinHeaterSchedule() {
602
2/2
✓ Branch 1 taken 32 times.
✓ Branch 4 taken 32 times.
64 bool result = setString(OS_Chiller_Electric_EIRFields::BasinHeaterOperatingScheduleName, "");
603
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 32 times.
32 OS_ASSERT(result);
604 32 }
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 33 bool ChillerElectricEIR_Impl::setEndUseSubcategory(const std::string& endUseSubcategory) {
820 33 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 34 bool ChillerElectricEIR_Impl::setCondenserHeatRecoveryRelativeCapacityFraction(double condenserHeatRecoveryRelativeCapacityFraction) {
830 bool result =
831 34 setDouble(OS_Chiller_Electric_EIRFields::CondenserHeatRecoveryRelativeCapacityFraction, condenserHeatRecoveryRelativeCapacityFraction);
832 // OS_ASSERT(result);
833 34 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 32 void ChillerElectricEIR_Impl::resetHeatRecoveryInletHighTemperatureLimitSchedule() {
848
2/2
✓ Branch 1 taken 32 times.
✓ Branch 4 taken 32 times.
64 bool result = setString(OS_Chiller_Electric_EIRFields::HeatRecoveryInletHighTemperatureLimitScheduleName, "");
849
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 32 times.
32 OS_ASSERT(result);
850 32 }
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 31 void ChillerElectricEIR_Impl::resetHeatRecoveryLeavingTemperatureSetpointNode() {
861
2/2
✓ Branch 1 taken 31 times.
✓ Branch 4 taken 31 times.
62 bool result = setString(OS_Chiller_Electric_EIRFields::HeatRecoveryLeavingTemperatureSetpointNodeName, "");
862
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 31 times.
31 OS_ASSERT(result);
863 31 }
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 34 bool ChillerElectricEIR_Impl::setCondenserFlowControl(const std::string& condenserFlowControl) {
897 34 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 33 bool ChillerElectricEIR_Impl::setCondenserMinimumFlowFraction(double condenserMinimumFlowFraction) {
924 33 bool result = setDouble(OS_Chiller_Electric_EIRFields::CondenserMinimumFlowFraction, condenserMinimumFlowFraction);
925 33 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 34 bool ChillerElectricEIR_Impl::setThermosiphonMinimumTemperatureDifference(double thermosiphonMinimumTemperatureDifference) {
939 34 bool result = setDouble(OS_Chiller_Electric_EIRFields::ThermosiphonMinimumTemperatureDifference, thermosiphonMinimumTemperatureDifference);
940 34 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 14 ChillerElectricEIR::ChillerElectricEIR(const Model& model) : WaterToWaterComponent(ChillerElectricEIR::iddObjectType(), model) {
1000
1/3
✗ Branch 2 not taken.
✓ Branch 3 taken 14 times.
✗ Branch 5 not taken.
14 OS_ASSERT(getImpl<detail::ChillerElectricEIR_Impl>());
1001
1002
1/1
✓ Branch 1 taken 14 times.
14 CurveBiquadratic ccFofT(model);
1003
1/1
✓ Branch 1 taken 14 times.
14 ccFofT.setCoefficient1Constant(1.0215158);
1004
1/1
✓ Branch 1 taken 14 times.
14 ccFofT.setCoefficient2x(0.037035864);
1005
1/1
✓ Branch 1 taken 14 times.
14 ccFofT.setCoefficient3xPOW2(0.0002332476);
1006
1/1
✓ Branch 1 taken 14 times.
14 ccFofT.setCoefficient4y(-0.003894048);
1007
1/1
✓ Branch 1 taken 14 times.
14 ccFofT.setCoefficient5yPOW2(-6.52536e-005);
1008
1/1
✓ Branch 1 taken 14 times.
14 ccFofT.setCoefficient6xTIMESY(-0.0002680452);
1009
1/1
✓ Branch 1 taken 14 times.
14 ccFofT.setMinimumValueofx(5.0);
1010
1/1
✓ Branch 1 taken 14 times.
14 ccFofT.setMaximumValueofx(10.0);
1011
1/1
✓ Branch 1 taken 14 times.
14 ccFofT.setMinimumValueofy(24.0);
1012
1/1
✓ Branch 1 taken 14 times.
14 ccFofT.setMaximumValueofy(35.0);
1013
1014
1/1
✓ Branch 1 taken 14 times.
14 CurveBiquadratic eirToCorfOfT(model);
1015
1/1
✓ Branch 1 taken 14 times.
14 eirToCorfOfT.setCoefficient1Constant(0.70176857);
1016
1/1
✓ Branch 1 taken 14 times.
14 eirToCorfOfT.setCoefficient2x(-0.00452016);
1017
1/1
✓ Branch 1 taken 14 times.
14 eirToCorfOfT.setCoefficient3xPOW2(0.0005331096);
1018
1/1
✓ Branch 1 taken 14 times.
14 eirToCorfOfT.setCoefficient4y(-0.005498208);
1019
1/1
✓ Branch 1 taken 14 times.
14 eirToCorfOfT.setCoefficient5yPOW2(0.0005445792);
1020
1/1
✓ Branch 1 taken 14 times.
14 eirToCorfOfT.setCoefficient6xTIMESY(-0.0007290324);
1021
1/1
✓ Branch 1 taken 14 times.
14 eirToCorfOfT.setMinimumValueofx(5.0);
1022
1/1
✓ Branch 1 taken 14 times.
14 eirToCorfOfT.setMaximumValueofx(10.0);
1023
1/1
✓ Branch 1 taken 14 times.
14 eirToCorfOfT.setMinimumValueofy(24.0);
1024
1/1
✓ Branch 1 taken 14 times.
14 eirToCorfOfT.setMaximumValueofy(35.0);
1025
1026
1/1
✓ Branch 1 taken 14 times.
14 CurveQuadratic eirToCorfOfPlr(model);
1027
1/1
✓ Branch 1 taken 14 times.
14 eirToCorfOfPlr.setCoefficient1Constant(0.06369119);
1028
1/1
✓ Branch 1 taken 14 times.
14 eirToCorfOfPlr.setCoefficient2x(0.58488832);
1029
1/1
✓ Branch 1 taken 14 times.
14 eirToCorfOfPlr.setCoefficient3xPOW2(0.35280274);
1030
1/1
✓ Branch 1 taken 14 times.
14 eirToCorfOfPlr.setMinimumValueofx(0.0);
1031
1/1
✓ Branch 1 taken 14 times.
14 eirToCorfOfPlr.setMaximumValueofx(1.0);
1032
1033
1/1
✓ Branch 1 taken 14 times.
14 setCoolingCapacityFunctionOfTemperature(ccFofT);
1034
1/1
✓ Branch 1 taken 14 times.
14 setElectricInputToCoolingOutputRatioFunctionOfTemperature(eirToCorfOfT);
1035
1/1
✓ Branch 1 taken 14 times.
14 setElectricInputToCoolingOutputRatioFunctionOfPLR(eirToCorfOfPlr);
1036
1037
2/4
✓ Branch 1 taken 14 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 14 times.
✗ Branch 6 not taken.
14 OS_ASSERT(setReferenceCOP(5.5));
1038
1039
1/1
✓ Branch 1 taken 14 times.
14 autosizeReferenceCapacity();
1040
1/1
✓ Branch 1 taken 14 times.
14 autosizeReferenceChilledWaterFlowRate();
1041 // autosizeReferenceCondenserFluidFlowRate();
1042
1/1
✓ Branch 1 taken 14 times.
14 autosizeDesignHeatRecoveryWaterFlowRate();
1043
1044 // setSizingFactor(1.0);
1045 // setBasinHeaterCapacity(0.0);
1046
1047
1/1
✓ Branch 1 taken 14 times.
14 setBasinHeaterSetpointTemperature(10.0); // Note: the IDD has a default of 2.0...
1048
1/1
✓ Branch 1 taken 14 times.
14 resetBasinHeaterSchedule();
1049
1/1
✓ Branch 1 taken 14 times.
14 setCondenserHeatRecoveryRelativeCapacityFraction(1.0);
1050
1/1
✓ Branch 1 taken 14 times.
14 resetHeatRecoveryLeavingTemperatureSetpointNode();
1051
1/1
✓ Branch 1 taken 14 times.
14 resetHeatRecoveryInletHighTemperatureLimitSchedule();
1052
1053
2/2
✓ Branch 1 taken 14 times.
✓ Branch 4 taken 14 times.
28 setEndUseSubcategory("General");
1054
2/2
✓ Branch 1 taken 14 times.
✓ Branch 4 taken 14 times.
14 setCondenserFlowControl("ConstantFlow");
1055
1/1
✓ Branch 1 taken 14 times.
14 setCondenserMinimumFlowFraction(0.2);
1056
1/1
✓ Branch 1 taken 14 times.
14 setThermosiphonMinimumTemperatureDifference(0.0);
1057 14 }
1058
1059 7672 IddObjectType ChillerElectricEIR::iddObjectType() {
1060
1/1
✓ Branch 1 taken 7672 times.
7672 IddObjectType result(IddObjectType::OS_Chiller_Electric_EIR);
1061 7672 return result;
1062 }
1063
1064 ✗ std::vector<std::string> ChillerElectricEIR::validCondenserTypeValues() {
1065 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_Chiller_Electric_EIRFields::CondenserType);
1066 }
1067
1068 ✗ std::vector<std::string> ChillerElectricEIR::validChillerFlowModeValues() {
1069 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_Chiller_Electric_EIRFields::ChillerFlowMode);
1070 }
1071
1072 ✗ std::vector<std::string> ChillerElectricEIR::validCondenserFlowControlValues() {
1073 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_Chiller_Electric_EIRFields::CondenserFlowControl);
1074 }
1075
1076 5 boost::optional<double> ChillerElectricEIR::referenceCapacity() const {
1077
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->referenceCapacity();
1078 }
1079
1080 5 bool ChillerElectricEIR::isReferenceCapacityAutosized() const {
1081
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->isReferenceCapacityAutosized();
1082 }
1083
1084 5 double ChillerElectricEIR::referenceCOP() const {
1085
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->referenceCOP();
1086 }
1087
1088 4 double ChillerElectricEIR::referenceLeavingChilledWaterTemperature() const {
1089
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::ChillerElectricEIR_Impl>()->referenceLeavingChilledWaterTemperature();
1090 }
1091
1092 3 bool ChillerElectricEIR::isReferenceLeavingChilledWaterTemperatureDefaulted() const {
1093
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->isReferenceLeavingChilledWaterTemperatureDefaulted();
1094 }
1095
1096 4 double ChillerElectricEIR::referenceEnteringCondenserFluidTemperature() const {
1097
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::ChillerElectricEIR_Impl>()->referenceEnteringCondenserFluidTemperature();
1098 }
1099
1100 3 bool ChillerElectricEIR::isReferenceEnteringCondenserFluidTemperatureDefaulted() const {
1101
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->isReferenceEnteringCondenserFluidTemperatureDefaulted();
1102 }
1103
1104 5 boost::optional<double> ChillerElectricEIR::referenceChilledWaterFlowRate() const {
1105
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->referenceChilledWaterFlowRate();
1106 }
1107
1108 5 bool ChillerElectricEIR::isReferenceChilledWaterFlowRateAutosized() const {
1109
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->isReferenceChilledWaterFlowRateAutosized();
1110 }
1111
1112 5 boost::optional<double> ChillerElectricEIR::referenceCondenserFluidFlowRate() const {
1113
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->referenceCondenserFluidFlowRate();
1114 }
1115
1116 6 bool ChillerElectricEIR::isReferenceCondenserFluidFlowRateAutosized() const {
1117
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::ChillerElectricEIR_Impl>()->isReferenceCondenserFluidFlowRateAutosized();
1118 }
1119
1120 32 bool ChillerElectricEIR::setCoolingCapacityFunctionOfTemperature(const Curve& curve) {
1121
1/1
✓ Branch 3 taken 32 times.
32 return getImpl<detail::ChillerElectricEIR_Impl>()->setCoolingCapacityFunctionOfTemperature(curve);
1122 }
1123
1124 32 bool ChillerElectricEIR::setElectricInputToCoolingOutputRatioFunctionOfTemperature(const Curve& curve) {
1125
1/1
✓ Branch 3 taken 32 times.
32 return getImpl<detail::ChillerElectricEIR_Impl>()->setElectricInputToCoolingOutputRatioFunctionOfTemperature(curve);
1126 }
1127
1128 34 bool ChillerElectricEIR::setElectricInputToCoolingOutputRatioFunctionOfPLR(const Curve& curve) {
1129
1/1
✓ Branch 3 taken 34 times.
34 return getImpl<detail::ChillerElectricEIR_Impl>()->setElectricInputToCoolingOutputRatioFunctionOfPLR(curve);
1130 }
1131
1132 7 Curve ChillerElectricEIR::coolingCapacityFunctionOfTemperature() const {
1133
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::ChillerElectricEIR_Impl>()->coolingCapacityFunctionOfTemperature();
1134 }
1135
1136 7 Curve ChillerElectricEIR::electricInputToCoolingOutputRatioFunctionOfTemperature() const {
1137
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::ChillerElectricEIR_Impl>()->electricInputToCoolingOutputRatioFunctionOfTemperature();
1138 }
1139
1140 14 Curve ChillerElectricEIR::electricInputToCoolingOutputRatioFunctionOfPLR() const {
1141
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::ChillerElectricEIR_Impl>()->electricInputToCoolingOutputRatioFunctionOfPLR();
1142 }
1143
1144 5 double ChillerElectricEIR::minimumPartLoadRatio() const {
1145
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->minimumPartLoadRatio();
1146 }
1147
1148 3 bool ChillerElectricEIR::isMinimumPartLoadRatioDefaulted() const {
1149
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->isMinimumPartLoadRatioDefaulted();
1150 }
1151
1152 5 double ChillerElectricEIR::maximumPartLoadRatio() const {
1153
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->maximumPartLoadRatio();
1154 }
1155
1156 3 bool ChillerElectricEIR::isMaximumPartLoadRatioDefaulted() const {
1157
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->isMaximumPartLoadRatioDefaulted();
1158 }
1159
1160 5 double ChillerElectricEIR::optimumPartLoadRatio() const {
1161
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->optimumPartLoadRatio();
1162 }
1163
1164 3 bool ChillerElectricEIR::isOptimumPartLoadRatioDefaulted() const {
1165
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->isOptimumPartLoadRatioDefaulted();
1166 }
1167
1168 5 double ChillerElectricEIR::minimumUnloadingRatio() const {
1169
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->minimumUnloadingRatio();
1170 }
1171
1172 3 bool ChillerElectricEIR::isMinimumUnloadingRatioDefaulted() const {
1173
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->isMinimumUnloadingRatioDefaulted();
1174 }
1175
1176 16 std::string ChillerElectricEIR::condenserType() const {
1177
1/1
✓ Branch 3 taken 16 times.
16 return getImpl<detail::ChillerElectricEIR_Impl>()->condenserType();
1178 }
1179
1180 ✗ bool ChillerElectricEIR::isCondenserTypeDefaulted() const {
1181 ✗ return getImpl<detail::ChillerElectricEIR_Impl>()->isCondenserTypeDefaulted();
1182 }
1183
1184 5 double ChillerElectricEIR::condenserFanPowerRatio() const {
1185
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->condenserFanPowerRatio();
1186 }
1187
1188 3 bool ChillerElectricEIR::isCondenserFanPowerRatioDefaulted() const {
1189
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->isCondenserFanPowerRatioDefaulted();
1190 }
1191
1192 5 double ChillerElectricEIR::fractionofCompressorElectricConsumptionRejectedbyCondenser() const {
1193
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->fractionofCompressorElectricConsumptionRejectedbyCondenser();
1194 }
1195
1196 3 bool ChillerElectricEIR::isFractionofCompressorElectricConsumptionRejectedbyCondenserDefaulted() const {
1197
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->isFractionofCompressorElectricConsumptionRejectedbyCondenserDefaulted();
1198 }
1199
1200 5 double ChillerElectricEIR::leavingChilledWaterLowerTemperatureLimit() const {
1201
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->leavingChilledWaterLowerTemperatureLimit();
1202 }
1203
1204 3 bool ChillerElectricEIR::isLeavingChilledWaterLowerTemperatureLimitDefaulted() const {
1205
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->isLeavingChilledWaterLowerTemperatureLimitDefaulted();
1206 }
1207
1208 6 std::string ChillerElectricEIR::chillerFlowMode() const {
1209
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::ChillerElectricEIR_Impl>()->chillerFlowMode();
1210 }
1211
1212 3 bool ChillerElectricEIR::isChillerFlowModeDefaulted() const {
1213
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->isChillerFlowModeDefaulted();
1214 }
1215
1216 5 boost::optional<double> ChillerElectricEIR::designHeatRecoveryWaterFlowRate() const {
1217
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->designHeatRecoveryWaterFlowRate();
1218 }
1219
1220 3 bool ChillerElectricEIR::isDesignHeatRecoveryWaterFlowRateAutosized() const {
1221
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->isDesignHeatRecoveryWaterFlowRateAutosized();
1222 }
1223
1224 5 double ChillerElectricEIR::sizingFactor() const {
1225
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->sizingFactor();
1226 }
1227
1228 3 bool ChillerElectricEIR::isSizingFactorDefaulted() const {
1229
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->isSizingFactorDefaulted();
1230 }
1231
1232 5 double ChillerElectricEIR::basinHeaterCapacity() const {
1233
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->basinHeaterCapacity();
1234 }
1235
1236 3 bool ChillerElectricEIR::isBasinHeaterCapacityDefaulted() const {
1237
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->isBasinHeaterCapacityDefaulted();
1238 }
1239
1240 7 double ChillerElectricEIR::basinHeaterSetpointTemperature() const {
1241
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::ChillerElectricEIR_Impl>()->basinHeaterSetpointTemperature();
1242 }
1243
1244 3 bool ChillerElectricEIR::isBasinHeaterSetpointTemperatureDefaulted() const {
1245
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->isBasinHeaterSetpointTemperatureDefaulted();
1246 }
1247
1248 ✗ bool ChillerElectricEIR::setReferenceCapacity(boost::optional<double> referenceCapacity) {
1249 ✗ return getImpl<detail::ChillerElectricEIR_Impl>()->setReferenceCapacity(referenceCapacity);
1250 }
1251
1252 6 bool ChillerElectricEIR::setReferenceCapacity(double referenceCapacity) {
1253
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::ChillerElectricEIR_Impl>()->setReferenceCapacity(referenceCapacity);
1254 }
1255
1256 32 void ChillerElectricEIR::autosizeReferenceCapacity() {
1257
1/1
✓ Branch 3 taken 32 times.
32 getImpl<detail::ChillerElectricEIR_Impl>()->autosizeReferenceCapacity();
1258 32 }
1259
1260 37 bool ChillerElectricEIR::setReferenceCOP(double referenceCOP) {
1261
1/1
✓ Branch 3 taken 37 times.
37 return getImpl<detail::ChillerElectricEIR_Impl>()->setReferenceCOP(referenceCOP);
1262 }
1263
1264 2 bool ChillerElectricEIR::setReferenceLeavingChilledWaterTemperature(double referenceLeavingChilledWaterTemperature) {
1265
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::ChillerElectricEIR_Impl>()->setReferenceLeavingChilledWaterTemperature(referenceLeavingChilledWaterTemperature);
1266 }
1267
1268 1 void ChillerElectricEIR::resetReferenceLeavingChilledWaterTemperature() {
1269
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetReferenceLeavingChilledWaterTemperature();
1270 1 }
1271
1272 5 bool ChillerElectricEIR::setReferenceEnteringCondenserFluidTemperature(double referenceEnteringCondenserFluidTemperature) {
1273
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->setReferenceEnteringCondenserFluidTemperature(referenceEnteringCondenserFluidTemperature);
1274 }
1275
1276 1 void ChillerElectricEIR::resetReferenceEnteringCondenserFluidTemperature() {
1277
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetReferenceEnteringCondenserFluidTemperature();
1278 1 }
1279
1280 ✗ bool ChillerElectricEIR::setReferenceChilledWaterFlowRate(boost::optional<double> referenceChilledWaterFlowRate) {
1281 ✗ return getImpl<detail::ChillerElectricEIR_Impl>()->setReferenceChilledWaterFlowRate(referenceChilledWaterFlowRate);
1282 }
1283
1284 6 bool ChillerElectricEIR::setReferenceChilledWaterFlowRate(double referenceChilledWaterFlowRate) {
1285
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::ChillerElectricEIR_Impl>()->setReferenceChilledWaterFlowRate(referenceChilledWaterFlowRate);
1286 }
1287
1288 ✗ void ChillerElectricEIR::resetReferenceChilledWaterFlowRate() {
1289 ✗ getImpl<detail::ChillerElectricEIR_Impl>()->resetReferenceChilledWaterFlowRate();
1290 ✗ }
1291
1292 32 void ChillerElectricEIR::autosizeReferenceChilledWaterFlowRate() {
1293
1/1
✓ Branch 3 taken 32 times.
32 getImpl<detail::ChillerElectricEIR_Impl>()->autosizeReferenceChilledWaterFlowRate();
1294 32 }
1295
1296 ✗ bool ChillerElectricEIR::setReferenceCondenserFluidFlowRate(boost::optional<double> referenceCondenserFluidFlowRate) {
1297 ✗ return getImpl<detail::ChillerElectricEIR_Impl>()->setReferenceCondenserFluidFlowRate(referenceCondenserFluidFlowRate);
1298 }
1299
1300 4 bool ChillerElectricEIR::setReferenceCondenserFluidFlowRate(double referenceCondenserFluidFlowRate) {
1301
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::ChillerElectricEIR_Impl>()->setReferenceCondenserFluidFlowRate(referenceCondenserFluidFlowRate);
1302 }
1303
1304 1 void ChillerElectricEIR::resetReferenceCondenserFluidFlowRate() {
1305
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetReferenceCondenserFluidFlowRate();
1306 1 }
1307
1308 1 void ChillerElectricEIR::autosizeReferenceCondenserFluidFlowRate() {
1309
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->autosizeReferenceCondenserFluidFlowRate();
1310 1 }
1311
1312 6 bool ChillerElectricEIR::setMinimumPartLoadRatio(double minimumPartLoadRatio) {
1313
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::ChillerElectricEIR_Impl>()->setMinimumPartLoadRatio(minimumPartLoadRatio);
1314 }
1315
1316 1 void ChillerElectricEIR::resetMinimumPartLoadRatio() {
1317
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetMinimumPartLoadRatio();
1318 1 }
1319
1320 3 bool ChillerElectricEIR::setMaximumPartLoadRatio(double maximumPartLoadRatio) {
1321
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->setMaximumPartLoadRatio(maximumPartLoadRatio);
1322 }
1323
1324 1 void ChillerElectricEIR::resetMaximumPartLoadRatio() {
1325
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetMaximumPartLoadRatio();
1326 1 }
1327
1328 3 bool ChillerElectricEIR::setOptimumPartLoadRatio(double optimumPartLoadRatio) {
1329
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->setOptimumPartLoadRatio(optimumPartLoadRatio);
1330 }
1331
1332 1 void ChillerElectricEIR::resetOptimumPartLoadRatio() {
1333
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetOptimumPartLoadRatio();
1334 1 }
1335
1336 6 bool ChillerElectricEIR::setMinimumUnloadingRatio(double minimumUnloadingRatio) {
1337
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::ChillerElectricEIR_Impl>()->setMinimumUnloadingRatio(minimumUnloadingRatio);
1338 }
1339
1340 1 void ChillerElectricEIR::resetMinimumUnloadingRatio() {
1341
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetMinimumUnloadingRatio();
1342 1 }
1343
1344 11 bool ChillerElectricEIR::setCondenserType(const std::string& condenserType) {
1345
1/1
✓ Branch 3 taken 11 times.
11 return getImpl<detail::ChillerElectricEIR_Impl>()->setCondenserType(condenserType);
1346 }
1347
1348 ✗ void ChillerElectricEIR::resetCondenserType() {
1349 ✗ getImpl<detail::ChillerElectricEIR_Impl>()->resetCondenserType();
1350 ✗ }
1351
1352 3 bool ChillerElectricEIR::setCondenserFanPowerRatio(double condenserFanPowerRatio) {
1353
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->setCondenserFanPowerRatio(condenserFanPowerRatio);
1354 }
1355
1356 1 void ChillerElectricEIR::resetCondenserFanPowerRatio() {
1357
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetCondenserFanPowerRatio();
1358 1 }
1359
1360 3 bool ChillerElectricEIR::setFractionofCompressorElectricConsumptionRejectedbyCondenser(
1361 double fractionofCompressorElectricConsumptionRejectedbyCondenser) {
1362
1/1
✓ Branch 3 taken 3 times.
6 return getImpl<detail::ChillerElectricEIR_Impl>()->setFractionofCompressorElectricConsumptionRejectedbyCondenser(
1363 6 fractionofCompressorElectricConsumptionRejectedbyCondenser);
1364 }
1365
1366 1 void ChillerElectricEIR::resetFractionofCompressorElectricConsumptionRejectedbyCondenser() {
1367
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetFractionofCompressorElectricConsumptionRejectedbyCondenser();
1368 1 }
1369
1370 2 bool ChillerElectricEIR::setLeavingChilledWaterLowerTemperatureLimit(double leavingChilledWaterLowerTemperatureLimit) {
1371
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::ChillerElectricEIR_Impl>()->setLeavingChilledWaterLowerTemperatureLimit(leavingChilledWaterLowerTemperatureLimit);
1372 }
1373
1374 1 void ChillerElectricEIR::resetLeavingChilledWaterLowerTemperatureLimit() {
1375
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetLeavingChilledWaterLowerTemperatureLimit();
1376 1 }
1377
1378 3 bool ChillerElectricEIR::setChillerFlowMode(const std::string& chillerFlowMode) {
1379
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->setChillerFlowMode(chillerFlowMode);
1380 }
1381
1382 1 void ChillerElectricEIR::resetChillerFlowMode() {
1383
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetChillerFlowMode();
1384 1 }
1385
1386 3 bool ChillerElectricEIR::setDesignHeatRecoveryWaterFlowRate(double designHeatRecoveryWaterFlowRate) {
1387
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->setDesignHeatRecoveryWaterFlowRate(designHeatRecoveryWaterFlowRate);
1388 }
1389
1390 32 void ChillerElectricEIR::autosizeDesignHeatRecoveryWaterFlowRate() {
1391
1/1
✓ Branch 3 taken 32 times.
32 getImpl<detail::ChillerElectricEIR_Impl>()->autosizeDesignHeatRecoveryWaterFlowRate();
1392 32 }
1393
1394 3 bool ChillerElectricEIR::setSizingFactor(double sizingFactor) {
1395
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->setSizingFactor(sizingFactor);
1396 }
1397
1398 1 void ChillerElectricEIR::resetSizingFactor() {
1399
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetSizingFactor();
1400 1 }
1401
1402 3 bool ChillerElectricEIR::setBasinHeaterCapacity(double basinHeaterCapacity) {
1403
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ChillerElectricEIR_Impl>()->setBasinHeaterCapacity(basinHeaterCapacity);
1404 }
1405
1406 1 void ChillerElectricEIR::resetBasinHeaterCapacity() {
1407
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetBasinHeaterCapacity();
1408 1 }
1409
1410 34 bool ChillerElectricEIR::setBasinHeaterSetpointTemperature(double basinHeaterSetpointTemperature) {
1411
1/1
✓ Branch 3 taken 34 times.
34 return getImpl<detail::ChillerElectricEIR_Impl>()->setBasinHeaterSetpointTemperature(basinHeaterSetpointTemperature);
1412 }
1413
1414 1 void ChillerElectricEIR::resetBasinHeaterSetpointTemperature() {
1415
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetBasinHeaterSetpointTemperature();
1416 1 }
1417
1418 2 bool ChillerElectricEIR::setBasinHeaterSchedule(Schedule& schedule) {
1419
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::ChillerElectricEIR_Impl>()->setBasinHeaterSchedule(schedule);
1420 }
1421
1422 32 void ChillerElectricEIR::resetBasinHeaterSchedule() {
1423
1/1
✓ Branch 3 taken 32 times.
32 getImpl<detail::ChillerElectricEIR_Impl>()->resetBasinHeaterSchedule();
1424 32 }
1425
1426 6 boost::optional<Schedule> ChillerElectricEIR::basinHeaterSchedule() const {
1427
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::ChillerElectricEIR_Impl>()->basinHeaterSchedule();
1428 }
1429
1430 5 std::string ChillerElectricEIR::endUseSubcategory() const {
1431
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->endUseSubcategory();
1432 }
1433
1434 33 bool ChillerElectricEIR::setEndUseSubcategory(const std::string& endUseSubcategory) {
1435
1/1
✓ Branch 3 taken 33 times.
33 return getImpl<detail::ChillerElectricEIR_Impl>()->setEndUseSubcategory(endUseSubcategory);
1436 }
1437
1438 5 double ChillerElectricEIR::condenserHeatRecoveryRelativeCapacityFraction() const {
1439
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->condenserHeatRecoveryRelativeCapacityFraction();
1440 }
1441
1442 34 bool ChillerElectricEIR::setCondenserHeatRecoveryRelativeCapacityFraction(double condenserHeatRecoveryRelativeCapacityFraction) {
1443
1/1
✓ Branch 3 taken 34 times.
68 return getImpl<detail::ChillerElectricEIR_Impl>()->setCondenserHeatRecoveryRelativeCapacityFraction(
1444 68 condenserHeatRecoveryRelativeCapacityFraction);
1445 }
1446
1447 6 boost::optional<Schedule> ChillerElectricEIR::heatRecoveryInletHighTemperatureLimitSchedule() const {
1448
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::ChillerElectricEIR_Impl>()->heatRecoveryInletHighTemperatureLimitSchedule();
1449 }
1450
1451 2 bool ChillerElectricEIR::setHeatRecoveryInletHighTemperatureLimitSchedule(Schedule& s) {
1452
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::ChillerElectricEIR_Impl>()->setHeatRecoveryInletHighTemperatureLimitSchedule(s);
1453 }
1454
1455 32 void ChillerElectricEIR::resetHeatRecoveryInletHighTemperatureLimitSchedule() {
1456
1/1
✓ Branch 3 taken 32 times.
32 getImpl<detail::ChillerElectricEIR_Impl>()->resetHeatRecoveryInletHighTemperatureLimitSchedule();
1457 32 }
1458
1459 5 boost::optional<Node> ChillerElectricEIR::heatRecoveryLeavingTemperatureSetpointNode() const {
1460
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->heatRecoveryLeavingTemperatureSetpointNode();
1461 }
1462
1463 2 bool ChillerElectricEIR::setHeatRecoveryLeavingTemperatureSetpointNode(const Node& node) {
1464
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::ChillerElectricEIR_Impl>()->setHeatRecoveryLeavingTemperatureSetpointNode(node);
1465 }
1466
1467 31 void ChillerElectricEIR::resetHeatRecoveryLeavingTemperatureSetpointNode() {
1468
1/1
✓ Branch 3 taken 31 times.
31 getImpl<detail::ChillerElectricEIR_Impl>()->resetHeatRecoveryLeavingTemperatureSetpointNode();
1469 31 }
1470
1471 5 std::string ChillerElectricEIR::condenserFlowControl() const {
1472
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->condenserFlowControl();
1473 }
1474
1475 6 boost::optional<Curve> ChillerElectricEIR::condenserLoopFlowRateFractionFunctionofLoopPartLoadRatioCurve() const {
1476
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::ChillerElectricEIR_Impl>()->condenserLoopFlowRateFractionFunctionofLoopPartLoadRatioCurve();
1477 }
1478
1479 6 boost::optional<Schedule> ChillerElectricEIR::temperatureDifferenceAcrossCondenserSchedule() const {
1480
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::ChillerElectricEIR_Impl>()->temperatureDifferenceAcrossCondenserSchedule();
1481 }
1482
1483 5 double ChillerElectricEIR::condenserMinimumFlowFraction() const {
1484
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->condenserMinimumFlowFraction();
1485 }
1486
1487 6 boost::optional<Curve> ChillerElectricEIR::thermosiphonCapacityFractionCurve() const {
1488
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::ChillerElectricEIR_Impl>()->thermosiphonCapacityFractionCurve();
1489 }
1490
1491 5 double ChillerElectricEIR::thermosiphonMinimumTemperatureDifference() const {
1492
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::ChillerElectricEIR_Impl>()->thermosiphonMinimumTemperatureDifference();
1493 }
1494
1495 34 bool ChillerElectricEIR::setCondenserFlowControl(const std::string& condenserFlowControl) {
1496
1/1
✓ Branch 3 taken 34 times.
34 return getImpl<detail::ChillerElectricEIR_Impl>()->setCondenserFlowControl(condenserFlowControl);
1497 }
1498
1499 2 bool ChillerElectricEIR::setCondenserLoopFlowRateFractionFunctionofLoopPartLoadRatioCurve(
1500 const Curve& condenserLoopFlowRateFractionFunctionofLoopPartLoadRatioCurve) {
1501
1/1
✓ Branch 3 taken 2 times.
4 return getImpl<detail::ChillerElectricEIR_Impl>()->setCondenserLoopFlowRateFractionFunctionofLoopPartLoadRatioCurve(
1502 4 condenserLoopFlowRateFractionFunctionofLoopPartLoadRatioCurve);
1503 }
1504
1505 1 void ChillerElectricEIR::resetCondenserLoopFlowRateFractionFunctionofLoopPartLoadRatioCurve() {
1506
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetCondenserLoopFlowRateFractionFunctionofLoopPartLoadRatioCurve();
1507 1 }
1508
1509 2 bool ChillerElectricEIR::setTemperatureDifferenceAcrossCondenserSchedule(Schedule& temperatureDifferenceAcrossCondenserSchedule) {
1510
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::ChillerElectricEIR_Impl>()->setTemperatureDifferenceAcrossCondenserSchedule(temperatureDifferenceAcrossCondenserSchedule);
1511 }
1512
1513 1 void ChillerElectricEIR::resetTemperatureDifferenceAcrossCondenserSchedule() {
1514
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetTemperatureDifferenceAcrossCondenserSchedule();
1515 1 }
1516
1517 33 bool ChillerElectricEIR::setCondenserMinimumFlowFraction(double condenserMinimumFlowFraction) {
1518
1/1
✓ Branch 3 taken 33 times.
33 return getImpl<detail::ChillerElectricEIR_Impl>()->setCondenserMinimumFlowFraction(condenserMinimumFlowFraction);
1519 }
1520
1521 2 bool ChillerElectricEIR::setThermosiphonCapacityFractionCurve(const Curve& thermosiphonCapacityFractionCurve) {
1522
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::ChillerElectricEIR_Impl>()->setThermosiphonCapacityFractionCurve(thermosiphonCapacityFractionCurve);
1523 }
1524
1525 1 void ChillerElectricEIR::resetThermosiphonCapacityFractionCurve() {
1526
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ChillerElectricEIR_Impl>()->resetThermosiphonCapacityFractionCurve();
1527 1 }
1528
1529 34 bool ChillerElectricEIR::setThermosiphonMinimumTemperatureDifference(double thermosiphonMinimumTemperatureDifference) {
1530
1/1
✓ Branch 3 taken 34 times.
34 return getImpl<detail::ChillerElectricEIR_Impl>()->setThermosiphonMinimumTemperatureDifference(thermosiphonMinimumTemperatureDifference);
1531 }
1532
1533 /// @cond
1534
1/1
✓ Branch 3 taken 8 times.
8 ChillerElectricEIR::ChillerElectricEIR(std::shared_ptr<detail::ChillerElectricEIR_Impl> impl) : WaterToWaterComponent(std::move(impl)) {}
1535
1536 /// @endcond
1537
1538 // Convenience functions
1539 15 boost::optional<PlantLoop> ChillerElectricEIR::chilledWaterLoop() const {
1540
1/1
✓ Branch 3 taken 15 times.
15 return getImpl<detail::ChillerElectricEIR_Impl>()->chilledWaterLoop();
1541 }
1542
1543 ✗ boost::optional<Node> ChillerElectricEIR::chilledWaterInletNode() const {
1544 ✗ return getImpl<detail::ChillerElectricEIR_Impl>()->chilledWaterInletNode();
1545 }
1546
1547 ✗ boost::optional<Node> ChillerElectricEIR::chilledWaterOutletNode() const {
1548 ✗ return getImpl<detail::ChillerElectricEIR_Impl>()->chilledWaterOutletNode();
1549 }
1550
1551 14 boost::optional<PlantLoop> ChillerElectricEIR::condenserWaterLoop() const {
1552
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::ChillerElectricEIR_Impl>()->condenserWaterLoop();
1553 }
1554
1555 ✗ boost::optional<Node> ChillerElectricEIR::condenserInletNode() const {
1556 ✗ return getImpl<detail::ChillerElectricEIR_Impl>()->condenserInletNode();
1557 }
1558
1559 ✗ boost::optional<Node> ChillerElectricEIR::condenserOutletNode() const {
1560 ✗ return getImpl<detail::ChillerElectricEIR_Impl>()->condenserOutletNode();
1561 }
1562
1563 18 boost::optional<PlantLoop> ChillerElectricEIR::heatRecoveryLoop() const {
1564
1/1
✓ Branch 3 taken 18 times.
18 return getImpl<detail::ChillerElectricEIR_Impl>()->heatRecoveryLoop();
1565 }
1566
1567 ✗ boost::optional<Node> ChillerElectricEIR::heatRecoveryInletNode() const {
1568 ✗ return getImpl<detail::ChillerElectricEIR_Impl>()->heatRecoveryInletNode();
1569 }
1570
1571 ✗ boost::optional<Node> ChillerElectricEIR::heatRecoveryOutletNode() const {
1572 ✗ return getImpl<detail::ChillerElectricEIR_Impl>()->heatRecoveryOutletNode();
1573 }
1574
1575 ✗ boost::optional<double> ChillerElectricEIR::autosizedReferenceCapacity() const {
1576 ✗ return getImpl<detail::ChillerElectricEIR_Impl>()->autosizedReferenceCapacity();
1577 }
1578
1579 ✗ boost::optional<double> ChillerElectricEIR::autosizedReferenceChilledWaterFlowRate() const {
1580 ✗ return getImpl<detail::ChillerElectricEIR_Impl>()->autosizedReferenceChilledWaterFlowRate();
1581 }
1582
1583 ✗ boost::optional<double> ChillerElectricEIR::autosizedReferenceCondenserFluidFlowRate() const {
1584 ✗ return getImpl<detail::ChillerElectricEIR_Impl>()->autosizedReferenceCondenserFluidFlowRate();
1585 }
1586
1587 ✗ boost::optional<double> ChillerElectricEIR::autosizedDesignHeatRecoveryWaterFlowRate() const {
1588 ✗ return getImpl<detail::ChillerElectricEIR_Impl>()->autosizedDesignHeatRecoveryWaterFlowRate();
1589 }
1590
1591 } // namespace model
1592 } // namespace openstudio
1593