GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 83.8% 506 / 0 / 604
Functions: 84.1% 143 / 0 / 170
Branches: 63.3% 389 / 0 / 615

src/model/HeatPumpPlantLoopEIRCooling.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 "HeatPumpPlantLoopEIRCooling.hpp"
7 #include "HeatPumpPlantLoopEIRCooling_Impl.hpp"
8 #include "Model.hpp"
9 #include "Curve.hpp"
10 #include "Curve_Impl.hpp"
11 #include "CurveBiquadratic.hpp"
12 #include "CurveBiquadratic_Impl.hpp"
13 #include "CurveQuadratic.hpp"
14 #include "CurveQuadratic_Impl.hpp"
15 #include "Node.hpp"
16 #include "Node_Impl.hpp"
17
18 #include "HeatPumpPlantLoopEIRHeating.hpp"
19 #include "HeatPumpPlantLoopEIRHeating_Impl.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/IddEnums.hxx>
26 #include <utilities/idd/OS_HeatPump_PlantLoop_EIR_Cooling_FieldEnums.hxx>
27
28 namespace openstudio {
29 namespace model {
30
31 namespace detail {
32
33 14 HeatPumpPlantLoopEIRCooling_Impl::HeatPumpPlantLoopEIRCooling_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle)
34 14 : WaterToWaterComponent_Impl(idfObject, model, keepHandle) {
35
4/6
✓ Branch 1 taken 14 times.
✓ Branch 4 taken 14 times.
✓ Branch 7 taken 14 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 14 times.
✗ Branch 13 not taken.
14 OS_ASSERT(idfObject.iddObject().type() == HeatPumpPlantLoopEIRCooling::iddObjectType());
36 14 }
37
38 2 HeatPumpPlantLoopEIRCooling_Impl::HeatPumpPlantLoopEIRCooling_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model,
39 2 bool keepHandle)
40 2 : WaterToWaterComponent_Impl(other, model, keepHandle) {
41
4/6
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 2 times.
✗ Branch 13 not taken.
2 OS_ASSERT(other.iddObject().type() == HeatPumpPlantLoopEIRCooling::iddObjectType());
42 2 }
43
44 7 HeatPumpPlantLoopEIRCooling_Impl::HeatPumpPlantLoopEIRCooling_Impl(const HeatPumpPlantLoopEIRCooling_Impl& other, Model_Impl* model,
45 7 bool keepHandle)
46 7 : WaterToWaterComponent_Impl(other, model, keepHandle) {}
47
48 ✗ const std::vector<std::string>& HeatPumpPlantLoopEIRCooling_Impl::outputVariableNames() const {
49 static const std::vector<std::string> result{
50 "Heat Pump Part Load Ratio",
51 "Heat Pump Cycling Ratio",
52 "Heat Pump Load Side Heat Transfer Rate",
53 "Heat Pump Load Side Heat Transfer Energy",
54 "Heat Pump Source Side Heat Transfer Rate",
55 "Heat Pump Source Side Heat Transfer Energy",
56 "Heat Pump Load Side Inlet Temperature",
57 "Heat Pump Load Side Outlet Temperature",
58 "Heat Pump Source Side Inlet Temperature",
59 "Heat Pump Source Side Outlet Temperature",
60 "Heat Pump Electricity Rate",
61 "Heat Pump Load Side Mass Flow Rate",
62 "Heat Pump Source Side Mass Flow Rate",
63 "Heat Pump Heat Recovery Heat Transfer Rate",
64 "Heat Pump Heat Recovery Heat Transfer Energy",
65 "Heat Pump Heat Recovery Inlet Temperature",
66 "Heat Pump Heat Recovery Outlet Temperature",
67 "Heat Pump Heat Recovery Mass Flow Rate",
68 "Heat Pump Heat Recovery Operation Status",
69 "Heat Pump Electricity Energy",
70 "Thermosiphon Status",
71 ✗ };
72 ✗ return result;
73 ✗ }
74
75 ✗ IddObjectType HeatPumpPlantLoopEIRCooling_Impl::iddObjectType() const {
76 ✗ return HeatPumpPlantLoopEIRCooling::iddObjectType();
77 }
78
79 93 unsigned HeatPumpPlantLoopEIRCooling_Impl::supplyInletPort() const {
80 93 return OS_HeatPump_PlantLoop_EIR_CoolingFields::LoadSideInletNodeName;
81 }
82
83 63 unsigned HeatPumpPlantLoopEIRCooling_Impl::supplyOutletPort() const {
84 63 return OS_HeatPump_PlantLoop_EIR_CoolingFields::LoadSideOutletNodeName;
85 }
86
87 50 unsigned HeatPumpPlantLoopEIRCooling_Impl::demandInletPort() const {
88 50 return OS_HeatPump_PlantLoop_EIR_CoolingFields::SourceSideInletNodeName;
89 }
90
91 42 unsigned HeatPumpPlantLoopEIRCooling_Impl::demandOutletPort() const {
92 42 return OS_HeatPump_PlantLoop_EIR_CoolingFields::SourceSideOutletNodeName;
93 }
94
95 18 unsigned HeatPumpPlantLoopEIRCooling_Impl::tertiaryInletPort() const {
96 18 return OS_HeatPump_PlantLoop_EIR_CoolingFields::HeatRecoveryInletNodeName;
97 }
98
99 78 unsigned HeatPumpPlantLoopEIRCooling_Impl::tertiaryOutletPort() const {
100 78 return OS_HeatPump_PlantLoop_EIR_CoolingFields::HeatRecoveryOutletNodeName;
101 }
102
103 /** Convenience Function to return the Load Side Water Loop (HeatPump on supply side) **/
104 12 boost::optional<PlantLoop> HeatPumpPlantLoopEIRCooling_Impl::loadSideWaterLoop() const {
105 12 return WaterToWaterComponent_Impl::plantLoop();
106 }
107
108 /** Convenience Function to return the Source Side (Condenser) Water Loop (HeatPump on demand side) **/
109 28 boost::optional<PlantLoop> HeatPumpPlantLoopEIRCooling_Impl::sourceSideWaterLoop() const {
110 28 return WaterToWaterComponent_Impl::secondaryPlantLoop();
111 }
112
113 /** Convenience Function to return the Heat Recovery Loop (HeatPump on demand side - tertiary) **/
114 16 boost::optional<PlantLoop> HeatPumpPlantLoopEIRCooling_Impl::heatRecoveryLoop() const {
115 16 return WaterToWaterComponent_Impl::tertiaryPlantLoop();
116 }
117
118 2 boost::optional<Node> HeatPumpPlantLoopEIRCooling_Impl::sourceSideWaterInletNode() const {
119 2 boost::optional<Node> result;
120
121
3/3
✓ Branch 1 taken 2 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 1 time.
4 if (auto mo = demandInletModelObject()) {
122
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 result = mo->optionalCast<Node>();
123 2 }
124 2 return result;
125 ✗ }
126
127 2 boost::optional<Node> HeatPumpPlantLoopEIRCooling_Impl::sourceSideWaterOutletNode() const {
128 2 boost::optional<Node> result;
129
130
3/3
✓ Branch 1 taken 2 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 1 time.
4 if (auto mo = demandOutletModelObject()) {
131
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 result = mo->optionalCast<Node>();
132 2 }
133 2 return result;
134 ✗ }
135
136 2 boost::optional<Node> HeatPumpPlantLoopEIRCooling_Impl::loadSideWaterInletNode() const {
137 2 boost::optional<Node> result;
138
139
2/3
✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
4 if (auto mo = supplyInletModelObject()) {
140
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 result = mo->optionalCast<Node>();
141 2 }
142 2 return result;
143 ✗ }
144
145 2 boost::optional<Node> HeatPumpPlantLoopEIRCooling_Impl::loadSideWaterOutletNode() const {
146 2 boost::optional<Node> result;
147
148
2/3
✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
4 if (auto mo = supplyOutletModelObject()) {
149
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 result = mo->optionalCast<Node>();
150 2 }
151 2 return result;
152 ✗ }
153
154 ✗ boost::optional<Node> HeatPumpPlantLoopEIRCooling_Impl::heatRecoveryInletNode() const {
155 ✗ boost::optional<Node> result;
156
157 ✗ if (auto mo = tertiaryInletModelObject()) {
158 ✗ result = mo->optionalCast<Node>();
159 ✗ }
160 ✗ return result;
161 ✗ }
162
163 ✗ boost::optional<Node> HeatPumpPlantLoopEIRCooling_Impl::heatRecoveryOutletNode() const {
164 ✗ boost::optional<Node> result;
165
166 ✗ if (auto mo = tertiaryOutletModelObject()) {
167 ✗ result = mo->optionalCast<Node>();
168 ✗ }
169 ✗ return result;
170 ✗ }
171
172 12 bool HeatPumpPlantLoopEIRCooling_Impl::addToNode(Node& node) {
173
174
1/1
✓ Branch 1 taken 12 times.
12 boost::optional<PlantLoop> t_plantLoop = node.plantLoop();
175
176 // If trying to add to a node that is on the demand side of a plant loop
177
1/2
✓ Branch 0 taken 12 times.
✗ Branch 1 not taken.
12 if (t_plantLoop) {
178
5/5
✓ Branch 1 taken 12 times.
✓ Branch 4 taken 12 times.
✓ Branch 7 taken 12 times.
✓ Branch 10 taken 7 times.
✓ Branch 11 taken 5 times.
24 if (t_plantLoop->demandComponent(node.handle())) {
179 // If there is already a source side water Plant Loop
180
3/3
✓ Branch 1 taken 7 times.
✓ Branch 3 taken 3 times.
✓ Branch 4 taken 4 times.
14 if (boost::optional<PlantLoop> ssLoop = this->sourceSideWaterLoop()) {
181 // And it's not the same as the node's loop
182
4/5
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✓ Branch 9 taken 3 times.
✗ Branch 10 not taken.
3 if (t_plantLoop.get() != ssLoop.get()) {
183 // And if there is no generator loop (tertiary)
184
3/3
✓ Branch 1 taken 3 times.
✓ Branch 5 taken 2 times.
✓ Branch 6 taken 1 time.
3 if (!this->heatRecoveryLoop().is_initialized()) {
185 // Then try to add it to the tertiary one
186
7/7
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✓ Branch 10 taken 2 times.
✓ Branch 14 taken 2 times.
✓ Branch 17 taken 2 times.
✓ Branch 20 taken 2 times.
2 LOG(Warn, "Calling addToTertiaryNode to connect it to the tertiary (=Heat Recovery Loop) loop for " << briefDescription());
187
1/1
✓ Branch 1 taken 2 times.
2 return this->addToTertiaryNode(node);
188 }
189 }
190 7 }
191 }
192 }
193
194 // All other cases, call the base class implementation
195 // call the base class implementation to connect the component
196
1/1
✓ Branch 1 taken 10 times.
10 bool ok = WaterToWaterComponent_Impl::addToNode(node);
197
198 // If there's a secondary plant loop, switch the condenser type to "WaterSource"
199
3/3
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 7 times.
✓ Branch 5 taken 3 times.
20 if (this->sourceSideWaterLoop()) {
200
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
14 this->setCondenserType("WaterSource");
201 }
202 10 return ok;
203 12 }
204
205 3 bool HeatPumpPlantLoopEIRCooling_Impl::addToTertiaryNode(Node& node) {
206
207
1/1
✓ Branch 1 taken 3 times.
3 auto t_plantLoop = node.plantLoop();
208
209 // Only accept adding to a node that is on a demand side of a plant loop
210 // Since tertiary here = heat recovery loop (heating)
211
1/2
✓ Branch 0 taken 3 times.
✗ Branch 1 not taken.
3 if (t_plantLoop) {
212
5/5
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✓ Branch 10 taken 2 times.
✓ Branch 11 taken 1 time.
6 if (t_plantLoop->demandComponent(node.handle())) {
213 // Call base class method which accepts both supply and demand
214
1/1
✓ Branch 1 taken 2 times.
2 return WaterToWaterComponent_Impl::addToTertiaryNode(node);
215 } else {
216
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,
217 "Tertiary Loop (Heat Recovery Loop) connections can only be placed on the Demand side (of a Heating Loop), for " << briefDescription());
218 }
219 }
220 1 return false;
221 3 }
222
223 7 bool HeatPumpPlantLoopEIRCooling_Impl::removeFromSecondaryPlantLoop() {
224 // Disconnect the component
225 7 bool ok = WaterToWaterComponent_Impl::removeFromSecondaryPlantLoop();
226
227 // Switch the condenser type back to "AirSource"
228
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
7 this->setCondenserType("AirSource");
229 7 return ok;
230 }
231
232 12 std::string HeatPumpPlantLoopEIRCooling_Impl::condenserType() const {
233
1/1
✓ Branch 1 taken 12 times.
12 boost::optional<std::string> value = getString(OS_HeatPump_PlantLoop_EIR_CoolingFields::CondenserType, true);
234
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 12 times.
✗ Branch 4 not taken.
12 OS_ASSERT(value);
235
2/2
✓ Branch 1 taken 12 times.
✓ Branch 4 taken 12 times.
24 return value.get();
236 12 }
237
238 20 bool HeatPumpPlantLoopEIRCooling_Impl::setCondenserType(const std::string& condenserType) {
239 20 bool ok = false;
240
13/21
✓ Branch 1 taken 20 times.
✓ Branch 4 taken 20 times.
✓ Branch 6 taken 10 times.
✓ Branch 7 taken 10 times.
✓ Branch 9 taken 10 times.
✓ Branch 12 taken 1 time.
✓ Branch 13 taken 9 times.
✓ Branch 14 taken 10 times.
✓ Branch 15 taken 10 times.
✓ Branch 17 taken 20 times.
✗ Branch 18 not taken.
✓ Branch 20 taken 20 times.
✗ Branch 21 not taken.
✓ Branch 22 taken 1 time.
✓ Branch 23 taken 19 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.
70 if (openstudio::istringEqual("AirSource", condenserType) && (this->secondaryPlantLoop())) {
241
8/8
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 13 taken 1 time.
✓ Branch 17 taken 1 time.
✓ Branch 20 taken 1 time.
✓ Branch 23 taken 1 time.
1 LOG(Warn, "Cannot set condenserType to AirSource, HeatPumpPlantLoopEIRCooling '"
242 << this->name() << "' is connected to a Source Side Loop. Use removeFromSecondaryPlantLoop() instead.");
243
13/21
✓ Branch 1 taken 19 times.
✓ Branch 4 taken 19 times.
✓ Branch 6 taken 10 times.
✓ Branch 7 taken 9 times.
✓ Branch 9 taken 10 times.
✓ Branch 12 taken 3 times.
✓ Branch 13 taken 7 times.
✓ Branch 14 taken 10 times.
✓ Branch 15 taken 9 times.
✓ Branch 17 taken 19 times.
✗ Branch 18 not taken.
✓ Branch 20 taken 19 times.
✗ Branch 21 not taken.
✓ Branch 22 taken 3 times.
✓ Branch 23 taken 16 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.
57 } else if (istringEqual("WaterSource", condenserType) && !(this->secondaryPlantLoop())) {
244
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 'WaterSource', HeatPumpPlantLoopEIRCooling '"
245 << this->name() << "' is not connected to a Source Side Loop. Use addToNode(PlantLoop&) instead.");
246 } else {
247 16 ok = setString(OS_HeatPump_PlantLoop_EIR_CoolingFields::CondenserType, condenserType);
248 }
249
250 20 return ok;
251 }
252
253 6 boost::optional<HeatPumpPlantLoopEIRHeating> HeatPumpPlantLoopEIRCooling_Impl::companionHeatingHeatPump() const {
254
1/1
✓ Branch 1 taken 6 times.
12 return getObject<ModelObject>().getModelObjectTarget<HeatPumpPlantLoopEIRHeating>(
255
1/1
✓ Branch 1 taken 6 times.
12 OS_HeatPump_PlantLoop_EIR_CoolingFields::CompanionHeatPumpName);
256 }
257
258 5 boost::optional<double> HeatPumpPlantLoopEIRCooling_Impl::loadSideReferenceFlowRate() const {
259 5 return getDouble(OS_HeatPump_PlantLoop_EIR_CoolingFields::LoadSideReferenceFlowRate, true);
260 }
261
262 8 bool HeatPumpPlantLoopEIRCooling_Impl::isLoadSideReferenceFlowRateAutosized() const {
263 8 bool result = false;
264
1/1
✓ Branch 1 taken 8 times.
8 boost::optional<std::string> value = getString(OS_HeatPump_PlantLoop_EIR_CoolingFields::LoadSideReferenceFlowRate, true);
265
1/2
✓ Branch 0 taken 8 times.
✗ Branch 1 not taken.
8 if (value) {
266
3/3
✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
✓ Branch 7 taken 8 times.
16 result = openstudio::istringEqual(value.get(), "Autosize");
267 }
268 8 return result;
269 8 }
270
271 5 boost::optional<double> HeatPumpPlantLoopEIRCooling_Impl::sourceSideReferenceFlowRate() const {
272 5 return getDouble(OS_HeatPump_PlantLoop_EIR_CoolingFields::SourceSideReferenceFlowRate, true);
273 }
274
275 8 bool HeatPumpPlantLoopEIRCooling_Impl::isSourceSideReferenceFlowRateAutosized() const {
276 8 bool result = false;
277
1/1
✓ Branch 1 taken 8 times.
8 boost::optional<std::string> value = getString(OS_HeatPump_PlantLoop_EIR_CoolingFields::SourceSideReferenceFlowRate, true);
278
1/2
✓ Branch 0 taken 8 times.
✗ Branch 1 not taken.
8 if (value) {
279
3/3
✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
✓ Branch 7 taken 8 times.
16 result = openstudio::istringEqual(value.get(), "Autosize");
280 }
281 8 return result;
282 8 }
283
284 ✗ boost::optional<double> HeatPumpPlantLoopEIRCooling_Impl::heatRecoveryReferenceFlowRate() const {
285 ✗ return getDouble(OS_HeatPump_PlantLoop_EIR_CoolingFields::HeatRecoveryReferenceFlowRate, true);
286 }
287
288 ✗ bool HeatPumpPlantLoopEIRCooling_Impl::isHeatRecoveryReferenceFlowRateAutosized() const {
289 ✗ bool result = false;
290 ✗ boost::optional<std::string> value = getString(OS_HeatPump_PlantLoop_EIR_CoolingFields::HeatRecoveryReferenceFlowRate, true);
291 ✗ if (value) {
292 ✗ result = openstudio::istringEqual(value.get(), "Autosize");
293 }
294 ✗ return result;
295 ✗ }
296
297 5 boost::optional<double> HeatPumpPlantLoopEIRCooling_Impl::referenceCapacity() const {
298 5 return getDouble(OS_HeatPump_PlantLoop_EIR_CoolingFields::ReferenceCapacity, true);
299 }
300
301 8 bool HeatPumpPlantLoopEIRCooling_Impl::isReferenceCapacityAutosized() const {
302 8 bool result = false;
303
1/1
✓ Branch 1 taken 8 times.
8 boost::optional<std::string> value = getString(OS_HeatPump_PlantLoop_EIR_CoolingFields::ReferenceCapacity, true);
304
1/2
✓ Branch 0 taken 8 times.
✗ Branch 1 not taken.
8 if (value) {
305
3/3
✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
✓ Branch 7 taken 8 times.
16 result = openstudio::istringEqual(value.get(), "Autosize");
306 }
307 8 return result;
308 8 }
309
310 5 double HeatPumpPlantLoopEIRCooling_Impl::referenceCoefficientofPerformance() const {
311
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<double> value = getDouble(OS_HeatPump_PlantLoop_EIR_CoolingFields::ReferenceCoefficientofPerformance, true);
312
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
5 OS_ASSERT(value);
313
1/1
✓ Branch 1 taken 5 times.
10 return value.get();
314 }
315
316 5 double HeatPumpPlantLoopEIRCooling_Impl::sizingFactor() const {
317
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<double> value = getDouble(OS_HeatPump_PlantLoop_EIR_CoolingFields::SizingFactor, true);
318
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
5 OS_ASSERT(value);
319
1/1
✓ Branch 1 taken 5 times.
10 return value.get();
320 }
321
322 7 Curve HeatPumpPlantLoopEIRCooling_Impl::capacityModifierFunctionofTemperatureCurve() const {
323
3/3
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 7 taken 7 times.
7 WorkspaceObject wo = getTarget(OS_HeatPump_PlantLoop_EIR_CoolingFields::CapacityModifierFunctionofTemperatureCurveName).get();
324
3/3
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 7 taken 7 times.
14 return wo.optionalCast<Curve>().get();
325 7 }
326
327 7 Curve HeatPumpPlantLoopEIRCooling_Impl::electricInputtoOutputRatioModifierFunctionofTemperatureCurve() const {
328
3/3
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 7 taken 7 times.
7 WorkspaceObject wo = getTarget(OS_HeatPump_PlantLoop_EIR_CoolingFields::ElectricInputtoOutputRatioModifierFunctionofTemperatureCurveName).get();
329
3/3
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 7 taken 7 times.
14 return wo.optionalCast<Curve>().get();
330 7 }
331
332 7 Curve HeatPumpPlantLoopEIRCooling_Impl::electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve() const {
333 WorkspaceObject wo =
334
3/3
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 7 taken 7 times.
7 getTarget(OS_HeatPump_PlantLoop_EIR_CoolingFields::ElectricInputtoOutputRatioModifierFunctionofPartLoadRatioCurveName).get();
335
3/3
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 7 taken 7 times.
14 return wo.optionalCast<Curve>().get();
336 7 }
337
338 5 std::string HeatPumpPlantLoopEIRCooling_Impl::controlType() const {
339
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<std::string> value = getString(OS_HeatPump_PlantLoop_EIR_CoolingFields::ControlType, true);
340
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
5 OS_ASSERT(value);
341
2/2
✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
10 return value.get();
342 5 }
343
344 5 std::string HeatPumpPlantLoopEIRCooling_Impl::flowMode() const {
345
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<std::string> value = getString(OS_HeatPump_PlantLoop_EIR_CoolingFields::FlowMode, true);
346
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
5 OS_ASSERT(value);
347
2/2
✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
10 return value.get();
348 5 }
349
350 5 double HeatPumpPlantLoopEIRCooling_Impl::minimumPartLoadRatio() const {
351
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<double> value = getDouble(OS_HeatPump_PlantLoop_EIR_CoolingFields::MinimumPartLoadRatio, true);
352
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
5 OS_ASSERT(value);
353
1/1
✓ Branch 1 taken 5 times.
10 return value.get();
354 }
355
356 5 double HeatPumpPlantLoopEIRCooling_Impl::minimumSourceInletTemperature() const {
357
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<double> value = getDouble(OS_HeatPump_PlantLoop_EIR_CoolingFields::MinimumSourceInletTemperature, true);
358
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
5 OS_ASSERT(value);
359
1/1
✓ Branch 1 taken 5 times.
10 return value.get();
360 }
361
362 5 double HeatPumpPlantLoopEIRCooling_Impl::maximumSourceInletTemperature() const {
363
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<double> value = getDouble(OS_HeatPump_PlantLoop_EIR_CoolingFields::MaximumSourceInletTemperature, true);
364
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
5 OS_ASSERT(value);
365
1/1
✓ Branch 1 taken 5 times.
10 return value.get();
366 }
367
368 7 boost::optional<Curve> HeatPumpPlantLoopEIRCooling_Impl::minimumSupplyWaterTemperatureCurve() const {
369
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
7 return getObject<ModelObject>().getModelObjectTarget<Curve>(OS_HeatPump_PlantLoop_EIR_CoolingFields::MinimumSupplyWaterTemperatureCurveName);
370 }
371
372 7 boost::optional<Curve> HeatPumpPlantLoopEIRCooling_Impl::maximumSupplyWaterTemperatureCurve() const {
373
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
7 return getObject<ModelObject>().getModelObjectTarget<Curve>(OS_HeatPump_PlantLoop_EIR_CoolingFields::MaximumSupplyWaterTemperatureCurveName);
374 }
375
376 5 double HeatPumpPlantLoopEIRCooling_Impl::maximumHeatRecoveryOutletTemperature() const {
377
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<double> value = getDouble(OS_HeatPump_PlantLoop_EIR_CoolingFields::MaximumHeatRecoveryOutletTemperature, true);
378
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
5 OS_ASSERT(value);
379
1/1
✓ Branch 1 taken 5 times.
10 return value.get();
380 }
381
382 7 boost::optional<Curve> HeatPumpPlantLoopEIRCooling_Impl::heatRecoveryCapacityModifierFunctionofTemperatureCurve() const {
383
1/1
✓ Branch 1 taken 7 times.
14 return getObject<ModelObject>().getModelObjectTarget<Curve>(
384
1/1
✓ Branch 1 taken 7 times.
14 OS_HeatPump_PlantLoop_EIR_CoolingFields::HeatRecoveryCapacityModifierFunctionofTemperatureCurveName);
385 }
386
387 7 boost::optional<Curve> HeatPumpPlantLoopEIRCooling_Impl::heatRecoveryElectricInputtoOutputRatioModifierFunctionofTemperatureCurve() const {
388
1/1
✓ Branch 1 taken 7 times.
14 return getObject<ModelObject>().getModelObjectTarget<Curve>(
389
1/1
✓ Branch 1 taken 7 times.
14 OS_HeatPump_PlantLoop_EIR_CoolingFields::HeatRecoveryElectricInputtoOutputRatioModifierFunctionofTemperatureCurveName);
390 }
391
392 7 boost::optional<Curve> HeatPumpPlantLoopEIRCooling_Impl::thermosiphonCapacityFractionCurve() const {
393
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
7 return getObject<ModelObject>().getModelObjectTarget<Curve>(OS_HeatPump_PlantLoop_EIR_CoolingFields::ThermosiphonCapacityFractionCurveName);
394 }
395
396 5 double HeatPumpPlantLoopEIRCooling_Impl::thermosiphonMinimumTemperatureDifference() const {
397
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<double> value = getDouble(OS_HeatPump_PlantLoop_EIR_CoolingFields::ThermosiphonMinimumTemperatureDifference, true);
398
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
5 OS_ASSERT(value);
399
1/1
✓ Branch 1 taken 5 times.
10 return value.get();
400 }
401
402 4 bool HeatPumpPlantLoopEIRCooling_Impl::setCompanionHeatingHeatPump(const HeatPumpPlantLoopEIRHeating& companionHP) {
403
2/2
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
4 return this->setPointer(OS_HeatPump_PlantLoop_EIR_CoolingFields::CompanionHeatPumpName, companionHP.handle());
404 }
405
406 3 bool HeatPumpPlantLoopEIRCooling_Impl::setLoadSideReferenceFlowRate(double loadSideReferenceFlowRate) {
407 3 return setDouble(OS_HeatPump_PlantLoop_EIR_CoolingFields::LoadSideReferenceFlowRate, loadSideReferenceFlowRate);
408 }
409
410 13 void HeatPumpPlantLoopEIRCooling_Impl::autosizeLoadSideReferenceFlowRate() {
411
2/2
✓ Branch 1 taken 13 times.
✓ Branch 4 taken 13 times.
26 bool result = setString(OS_HeatPump_PlantLoop_EIR_CoolingFields::LoadSideReferenceFlowRate, "Autosize");
412
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 13 times.
13 OS_ASSERT(result);
413 13 }
414
415 3 bool HeatPumpPlantLoopEIRCooling_Impl::setSourceSideReferenceFlowRate(double sourceSideReferenceFlowRate) {
416 3 return setDouble(OS_HeatPump_PlantLoop_EIR_CoolingFields::SourceSideReferenceFlowRate, sourceSideReferenceFlowRate);
417 }
418
419 13 void HeatPumpPlantLoopEIRCooling_Impl::autosizeSourceSideReferenceFlowRate() {
420
2/2
✓ Branch 1 taken 13 times.
✓ Branch 4 taken 13 times.
26 bool result = setString(OS_HeatPump_PlantLoop_EIR_CoolingFields::SourceSideReferenceFlowRate, "Autosize");
421
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 13 times.
13 OS_ASSERT(result);
422 13 }
423
424 ✗ bool HeatPumpPlantLoopEIRCooling_Impl::setHeatRecoveryReferenceFlowRate(double heatRecoveryReferenceFlowRate) {
425 ✗ return setDouble(OS_HeatPump_PlantLoop_EIR_CoolingFields::HeatRecoveryReferenceFlowRate, heatRecoveryReferenceFlowRate);
426 }
427
428 12 void HeatPumpPlantLoopEIRCooling_Impl::autosizeHeatRecoveryReferenceFlowRate() {
429
2/2
✓ Branch 1 taken 12 times.
✓ Branch 4 taken 12 times.
24 bool result = setString(OS_HeatPump_PlantLoop_EIR_CoolingFields::HeatRecoveryReferenceFlowRate, "Autosize");
430
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 12 times.
12 OS_ASSERT(result);
431 12 }
432
433 3 bool HeatPumpPlantLoopEIRCooling_Impl::setReferenceCapacity(double referenceCapacity) {
434 3 return setDouble(OS_HeatPump_PlantLoop_EIR_CoolingFields::ReferenceCapacity, referenceCapacity);
435 }
436
437 13 void HeatPumpPlantLoopEIRCooling_Impl::autosizeReferenceCapacity() {
438
2/2
✓ Branch 1 taken 13 times.
✓ Branch 4 taken 13 times.
26 bool result = setString(OS_HeatPump_PlantLoop_EIR_CoolingFields::ReferenceCapacity, "Autosize");
439
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 13 times.
13 OS_ASSERT(result);
440 13 }
441
442 15 bool HeatPumpPlantLoopEIRCooling_Impl::setReferenceCoefficientofPerformance(double referenceCoefficientofPerformance) {
443 15 return setDouble(OS_HeatPump_PlantLoop_EIR_CoolingFields::ReferenceCoefficientofPerformance, referenceCoefficientofPerformance);
444 }
445
446 15 bool HeatPumpPlantLoopEIRCooling_Impl::setSizingFactor(double sizingFactor) {
447 15 return setDouble(OS_HeatPump_PlantLoop_EIR_CoolingFields::SizingFactor, sizingFactor);
448 }
449
450 15 bool HeatPumpPlantLoopEIRCooling_Impl::setCapacityModifierFunctionofTemperatureCurve(const Curve& capacityModifierFunctionofTemperatureCurve) {
451
1/1
✓ Branch 1 taken 15 times.
15 bool result = setPointer(OS_HeatPump_PlantLoop_EIR_CoolingFields::CapacityModifierFunctionofTemperatureCurveName,
452
1/1
✓ Branch 1 taken 15 times.
15 capacityModifierFunctionofTemperatureCurve.handle());
453 15 return result;
454 }
455
456 15 bool HeatPumpPlantLoopEIRCooling_Impl::setElectricInputtoOutputRatioModifierFunctionofTemperatureCurve(
457 const Curve& electricInputtoOutputRatioModifierFunctionofTemperatureCurve) {
458
1/1
✓ Branch 1 taken 15 times.
15 bool result = setPointer(OS_HeatPump_PlantLoop_EIR_CoolingFields::ElectricInputtoOutputRatioModifierFunctionofTemperatureCurveName,
459
1/1
✓ Branch 1 taken 15 times.
15 electricInputtoOutputRatioModifierFunctionofTemperatureCurve.handle());
460 15 return result;
461 }
462
463 15 bool HeatPumpPlantLoopEIRCooling_Impl::setElectricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve(
464 const Curve& electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve) {
465
1/1
✓ Branch 1 taken 15 times.
15 bool result = setPointer(OS_HeatPump_PlantLoop_EIR_CoolingFields::ElectricInputtoOutputRatioModifierFunctionofPartLoadRatioCurveName,
466
1/1
✓ Branch 1 taken 15 times.
15 electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve.handle());
467 15 return result;
468 }
469
470 14 bool HeatPumpPlantLoopEIRCooling_Impl::setControlType(const std::string& controlType) {
471 14 bool result = setString(OS_HeatPump_PlantLoop_EIR_CoolingFields::ControlType, controlType);
472 14 return result;
473 }
474
475 14 bool HeatPumpPlantLoopEIRCooling_Impl::setFlowMode(const std::string& flowMode) {
476 14 bool result = setString(OS_HeatPump_PlantLoop_EIR_CoolingFields::FlowMode, flowMode);
477 14 return result;
478 }
479
480 14 bool HeatPumpPlantLoopEIRCooling_Impl::setMinimumPartLoadRatio(double minimumPartLoadRatio) {
481 14 return setDouble(OS_HeatPump_PlantLoop_EIR_CoolingFields::MinimumPartLoadRatio, minimumPartLoadRatio);
482 }
483
484 14 bool HeatPumpPlantLoopEIRCooling_Impl::setMinimumSourceInletTemperature(double minimumSourceInletTemperature) {
485 14 return setDouble(OS_HeatPump_PlantLoop_EIR_CoolingFields::MinimumSourceInletTemperature, minimumSourceInletTemperature);
486 }
487
488 14 bool HeatPumpPlantLoopEIRCooling_Impl::setMaximumSourceInletTemperature(double maximumSourceInletTemperature) {
489 14 return setDouble(OS_HeatPump_PlantLoop_EIR_CoolingFields::MaximumSourceInletTemperature, maximumSourceInletTemperature);
490 }
491
492 2 bool HeatPumpPlantLoopEIRCooling_Impl::setMinimumSupplyWaterTemperatureCurve(const Curve& minimumSupplyWaterTemperatureCurve) {
493 bool result =
494
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 setPointer(OS_HeatPump_PlantLoop_EIR_CoolingFields::MinimumSupplyWaterTemperatureCurveName, minimumSupplyWaterTemperatureCurve.handle());
495 2 return result;
496 }
497
498 1 void HeatPumpPlantLoopEIRCooling_Impl::resetMinimumSupplyWaterTemperatureCurve() {
499
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_HeatPump_PlantLoop_EIR_CoolingFields::MinimumSupplyWaterTemperatureCurveName, "");
500
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
501 1 }
502
503 2 bool HeatPumpPlantLoopEIRCooling_Impl::setMaximumSupplyWaterTemperatureCurve(const Curve& maximumSupplyWaterTemperatureCurve) {
504 bool result =
505
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 setPointer(OS_HeatPump_PlantLoop_EIR_CoolingFields::MaximumSupplyWaterTemperatureCurveName, maximumSupplyWaterTemperatureCurve.handle());
506 2 return result;
507 }
508
509 1 void HeatPumpPlantLoopEIRCooling_Impl::resetMaximumSupplyWaterTemperatureCurve() {
510
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_HeatPump_PlantLoop_EIR_CoolingFields::MaximumSupplyWaterTemperatureCurveName, "");
511
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
512 1 }
513
514 14 bool HeatPumpPlantLoopEIRCooling_Impl::setMaximumHeatRecoveryOutletTemperature(double maximumHeatRecoveryOutletTemperature) {
515 14 return setDouble(OS_HeatPump_PlantLoop_EIR_CoolingFields::MaximumHeatRecoveryOutletTemperature, maximumHeatRecoveryOutletTemperature);
516 }
517
518 2 bool HeatPumpPlantLoopEIRCooling_Impl::setHeatRecoveryCapacityModifierFunctionofTemperatureCurve(
519 const Curve& heatRecoveryCapacityModifierFunctionofTemperatureCurve) {
520
1/1
✓ Branch 1 taken 2 times.
2 bool result = setPointer(OS_HeatPump_PlantLoop_EIR_CoolingFields::HeatRecoveryCapacityModifierFunctionofTemperatureCurveName,
521
1/1
✓ Branch 1 taken 2 times.
2 heatRecoveryCapacityModifierFunctionofTemperatureCurve.handle());
522 2 return result;
523 }
524
525 1 void HeatPumpPlantLoopEIRCooling_Impl::resetHeatRecoveryCapacityModifierFunctionofTemperatureCurve() {
526
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_HeatPump_PlantLoop_EIR_CoolingFields::HeatRecoveryCapacityModifierFunctionofTemperatureCurveName, "");
527
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
528 1 }
529
530 2 bool HeatPumpPlantLoopEIRCooling_Impl::setHeatRecoveryElectricInputtoOutputRatioModifierFunctionofTemperatureCurve(
531 const Curve& heatRecoveryElectricInputtoOutputRatioModifierFunctionofTemperatureCurve) {
532
1/1
✓ Branch 1 taken 2 times.
2 bool result = setPointer(OS_HeatPump_PlantLoop_EIR_CoolingFields::HeatRecoveryElectricInputtoOutputRatioModifierFunctionofTemperatureCurveName,
533
1/1
✓ Branch 1 taken 2 times.
2 heatRecoveryElectricInputtoOutputRatioModifierFunctionofTemperatureCurve.handle());
534 2 return result;
535 }
536
537 1 void HeatPumpPlantLoopEIRCooling_Impl::resetHeatRecoveryElectricInputtoOutputRatioModifierFunctionofTemperatureCurve() {
538 bool result =
539
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 setString(OS_HeatPump_PlantLoop_EIR_CoolingFields::HeatRecoveryElectricInputtoOutputRatioModifierFunctionofTemperatureCurveName, "");
540
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
541 1 }
542
543 2 bool HeatPumpPlantLoopEIRCooling_Impl::setThermosiphonCapacityFractionCurve(const Curve& thermosiphonCapacityFractionCurve) {
544 bool result =
545
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 setPointer(OS_HeatPump_PlantLoop_EIR_CoolingFields::ThermosiphonCapacityFractionCurveName, thermosiphonCapacityFractionCurve.handle());
546 2 return result;
547 }
548
549 1 void HeatPumpPlantLoopEIRCooling_Impl::resetThermosiphonCapacityFractionCurve() {
550
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_HeatPump_PlantLoop_EIR_CoolingFields::ThermosiphonCapacityFractionCurveName, "");
551
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
552 1 }
553
554 14 bool HeatPumpPlantLoopEIRCooling_Impl::setThermosiphonMinimumTemperatureDifference(double thermosiphonMinimumTemperatureDifference) {
555 14 return setDouble(OS_HeatPump_PlantLoop_EIR_CoolingFields::ThermosiphonMinimumTemperatureDifference, thermosiphonMinimumTemperatureDifference);
556 }
557
558 ✗ boost::optional<double> HeatPumpPlantLoopEIRCooling_Impl::autosizedLoadSideReferenceFlowRate() const {
559 ✗ return getAutosizedValue("Design Size Load Side Volume Flow Rate", "m3/s");
560 }
561
562 ✗ boost::optional<double> HeatPumpPlantLoopEIRCooling_Impl::autosizedSourceSideReferenceFlowRate() const {
563 ✗ return getAutosizedValue("Design Size Source Side Volume Flow Rate", "m3/s");
564 }
565
566 ✗ boost::optional<double> HeatPumpPlantLoopEIRCooling_Impl::autosizedHeatRecoveryReferenceFlowRate() const {
567 ✗ return getAutosizedValue("Design Size Heat Recovery Side Volume Flow Rate", "m3/s");
568 }
569
570 ✗ boost::optional<double> HeatPumpPlantLoopEIRCooling_Impl::autosizedReferenceCapacity() const {
571 ✗ return getAutosizedValue("Design Size Nominal Capacity", "W");
572 }
573
574 ✗ void HeatPumpPlantLoopEIRCooling_Impl::autosize() {
575 ✗ autosizeLoadSideReferenceFlowRate();
576 ✗ autosizeSourceSideReferenceFlowRate();
577 ✗ autosizeHeatRecoveryReferenceFlowRate();
578 ✗ autosizeReferenceCapacity();
579 ✗ }
580
581 ✗ void HeatPumpPlantLoopEIRCooling_Impl::applySizingValues() {
582 ✗ boost::optional<double> val;
583 ✗ val = autosizedLoadSideReferenceFlowRate();
584 ✗ if (val) {
585 ✗ setLoadSideReferenceFlowRate(val.get());
586 }
587
588 ✗ val = autosizedSourceSideReferenceFlowRate();
589 ✗ if (val) {
590 ✗ setSourceSideReferenceFlowRate(val.get());
591 }
592
593 ✗ val = autosizedHeatRecoveryReferenceFlowRate();
594 ✗ if (val) {
595 ✗ setHeatRecoveryReferenceFlowRate(val.get());
596 }
597
598 ✗ val = autosizedReferenceCapacity();
599 ✗ if (val) {
600 ✗ setReferenceCapacity(val.get());
601 }
602 ✗ }
603
604 10 ComponentType HeatPumpPlantLoopEIRCooling_Impl::componentType() const {
605
1/1
✓ Branch 1 taken 10 times.
10 return ComponentType::Cooling;
606 }
607
608 ✗ std::vector<FuelType> HeatPumpPlantLoopEIRCooling_Impl::coolingFuelTypes() const {
609 ✗ return {FuelType::Electricity};
610 }
611
612 ✗ std::vector<FuelType> HeatPumpPlantLoopEIRCooling_Impl::heatingFuelTypes() const {
613 ✗ return {};
614 }
615
616 ✗ std::vector<AppGFuelType> HeatPumpPlantLoopEIRCooling_Impl::appGHeatingFuelTypes() const {
617 ✗ return {};
618 }
619
620 } // namespace detail
621
622 1 HeatPumpPlantLoopEIRCooling::HeatPumpPlantLoopEIRCooling(const Model& model, const Curve& capacityModifierFunctionofTemperatureCurve,
623 const Curve& electricInputtoOutputRatioModifierFunctionofTemperatureCurve,
624 1 const Curve& electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve)
625 1 : WaterToWaterComponent(HeatPumpPlantLoopEIRCooling::iddObjectType(), model) {
626
1/3
✗ Branch 2 not taken.
✓ Branch 3 taken 1 time.
✗ Branch 5 not taken.
1 OS_ASSERT(getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>());
627
628
1/1
✓ Branch 1 taken 1 time.
1 autosizeLoadSideReferenceFlowRate();
629
1/1
✓ Branch 1 taken 1 time.
1 autosizeSourceSideReferenceFlowRate();
630
1/1
✓ Branch 1 taken 1 time.
1 autosizeHeatRecoveryReferenceFlowRate();
631
1/1
✓ Branch 1 taken 1 time.
1 autosizeReferenceCapacity();
632
633
1/1
✓ Branch 1 taken 1 time.
1 bool ok = setCapacityModifierFunctionofTemperatureCurve(capacityModifierFunctionofTemperatureCurve);
634
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 if (!ok) {
635 ✗ remove();
636 ✗ LOG_AND_THROW("Unable to set " << briefDescription() << "'s capacity modifier function of temperature curve to "
637 << capacityModifierFunctionofTemperatureCurve.briefDescription() << ".");
638 }
639
640
1/1
✓ Branch 1 taken 1 time.
1 ok = setElectricInputtoOutputRatioModifierFunctionofTemperatureCurve(electricInputtoOutputRatioModifierFunctionofTemperatureCurve);
641
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 if (!ok) {
642 ✗ remove();
643 ✗ LOG_AND_THROW("Unable to set " << briefDescription() << "'s electric input to output ratio modifier function of temperature curve to "
644 << electricInputtoOutputRatioModifierFunctionofTemperatureCurve.briefDescription() << ".");
645 }
646
647
1/1
✓ Branch 1 taken 1 time.
1 ok = setElectricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve(electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve);
648
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 if (!ok) {
649 ✗ remove();
650 ✗ LOG_AND_THROW("Unable to set " << briefDescription() << "'s electric input to output ratio modifier function of part load ratio curve to "
651 << electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve.briefDescription() << ".");
652 }
653
654 // Bypass the check by calling setString directly
655
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 setString(OS_HeatPump_PlantLoop_EIR_CoolingFields::CondenserType, "AirSource");
656
657
1/1
✓ Branch 1 taken 1 time.
1 setReferenceCoefficientofPerformance(7.5); // IDD default
658
1/1
✓ Branch 1 taken 1 time.
1 setSizingFactor(1.0);
659
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 setControlType("Load");
660
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 setFlowMode("ConstantFlow");
661
1/1
✓ Branch 1 taken 1 time.
1 setMinimumPartLoadRatio(0.0);
662
1/1
✓ Branch 1 taken 1 time.
1 setMinimumSourceInletTemperature(-100.0);
663
1/1
✓ Branch 1 taken 1 time.
1 setMaximumSourceInletTemperature(100.0);
664
1/1
✓ Branch 1 taken 1 time.
1 setMaximumHeatRecoveryOutletTemperature(60.0);
665
1/1
✓ Branch 1 taken 1 time.
1 setThermosiphonMinimumTemperatureDifference(0.0);
666 1 }
667
668 11 HeatPumpPlantLoopEIRCooling::HeatPumpPlantLoopEIRCooling(const Model& model)
669 11 : WaterToWaterComponent(HeatPumpPlantLoopEIRCooling::iddObjectType(), model) {
670
1/3
✗ Branch 2 not taken.
✓ Branch 3 taken 11 times.
✗ Branch 5 not taken.
11 OS_ASSERT(getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>());
671
672
1/1
✓ Branch 1 taken 11 times.
11 autosizeLoadSideReferenceFlowRate();
673
1/1
✓ Branch 1 taken 11 times.
11 autosizeSourceSideReferenceFlowRate();
674
1/1
✓ Branch 1 taken 11 times.
11 autosizeHeatRecoveryReferenceFlowRate();
675
1/1
✓ Branch 1 taken 11 times.
11 autosizeReferenceCapacity();
676
677 // Note: The default HAS to be AirSource (since it's not connected to a plantLoop...)
678 // But in both PlantLoopHeatPump_EIR_WaterSource.idf and PlantLoopHeatPump_EIR_AirSource.idf, the curves are flatlines
679 // The only difference is the Source Side Flow Rate (m3/s), but here it's autosized anyways
680
681
1/1
✓ Branch 1 taken 11 times.
11 CurveBiquadratic capacityModifierFunctionofTemperatureCurve(model); // PlantLoopHeatPump_EIR_WaterSource.idf
682
1/1
✓ Branch 1 taken 11 times.
11 capacityModifierFunctionofTemperatureCurve.setCoefficient1Constant(1);
683
1/1
✓ Branch 1 taken 11 times.
11 capacityModifierFunctionofTemperatureCurve.setCoefficient2x(0);
684
1/1
✓ Branch 1 taken 11 times.
11 capacityModifierFunctionofTemperatureCurve.setCoefficient3xPOW2(0);
685
1/1
✓ Branch 1 taken 11 times.
11 capacityModifierFunctionofTemperatureCurve.setCoefficient4y(0);
686
1/1
✓ Branch 1 taken 11 times.
11 capacityModifierFunctionofTemperatureCurve.setCoefficient5yPOW2(0);
687
1/1
✓ Branch 1 taken 11 times.
11 capacityModifierFunctionofTemperatureCurve.setCoefficient6xTIMESY(0);
688
1/1
✓ Branch 1 taken 11 times.
11 capacityModifierFunctionofTemperatureCurve.setMinimumValueofx(5);
689
1/1
✓ Branch 1 taken 11 times.
11 capacityModifierFunctionofTemperatureCurve.setMaximumValueofx(10);
690
1/1
✓ Branch 1 taken 11 times.
11 capacityModifierFunctionofTemperatureCurve.setMinimumValueofy(24);
691
1/1
✓ Branch 1 taken 11 times.
11 capacityModifierFunctionofTemperatureCurve.setMaximumValueofy(35);
692
2/2
✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
22 capacityModifierFunctionofTemperatureCurve.setInputUnitTypeforX("Temperature");
693
2/2
✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
11 capacityModifierFunctionofTemperatureCurve.setInputUnitTypeforY("Temperature");
694
1/1
✓ Branch 1 taken 11 times.
11 bool ok = setCapacityModifierFunctionofTemperatureCurve(capacityModifierFunctionofTemperatureCurve);
695
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 11 times.
✗ Branch 3 not taken.
11 OS_ASSERT(ok);
696
697
1/1
✓ Branch 1 taken 11 times.
11 CurveBiquadratic electricInputtoOutputRatioModifierFunctionofTemperatureCurve(model); // PlantLoopHeatPump_EIR_WaterSource.idf
698
1/1
✓ Branch 1 taken 11 times.
11 electricInputtoOutputRatioModifierFunctionofTemperatureCurve.setCoefficient1Constant(1);
699
1/1
✓ Branch 1 taken 11 times.
11 electricInputtoOutputRatioModifierFunctionofTemperatureCurve.setCoefficient2x(0);
700
1/1
✓ Branch 1 taken 11 times.
11 electricInputtoOutputRatioModifierFunctionofTemperatureCurve.setCoefficient3xPOW2(0);
701
1/1
✓ Branch 1 taken 11 times.
11 electricInputtoOutputRatioModifierFunctionofTemperatureCurve.setCoefficient4y(0);
702
1/1
✓ Branch 1 taken 11 times.
11 electricInputtoOutputRatioModifierFunctionofTemperatureCurve.setCoefficient5yPOW2(0);
703
1/1
✓ Branch 1 taken 11 times.
11 electricInputtoOutputRatioModifierFunctionofTemperatureCurve.setCoefficient6xTIMESY(0);
704
1/1
✓ Branch 1 taken 11 times.
11 electricInputtoOutputRatioModifierFunctionofTemperatureCurve.setMinimumValueofx(5);
705
1/1
✓ Branch 1 taken 11 times.
11 electricInputtoOutputRatioModifierFunctionofTemperatureCurve.setMaximumValueofx(10);
706
1/1
✓ Branch 1 taken 11 times.
11 electricInputtoOutputRatioModifierFunctionofTemperatureCurve.setMinimumValueofy(24);
707
1/1
✓ Branch 1 taken 11 times.
11 electricInputtoOutputRatioModifierFunctionofTemperatureCurve.setMaximumValueofy(35);
708
2/2
✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
22 electricInputtoOutputRatioModifierFunctionofTemperatureCurve.setInputUnitTypeforX("Temperature");
709
2/2
✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
11 electricInputtoOutputRatioModifierFunctionofTemperatureCurve.setInputUnitTypeforY("Temperature");
710
1/1
✓ Branch 1 taken 11 times.
11 ok = setElectricInputtoOutputRatioModifierFunctionofTemperatureCurve(electricInputtoOutputRatioModifierFunctionofTemperatureCurve);
711
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 11 times.
✗ Branch 3 not taken.
11 OS_ASSERT(ok);
712
713
1/1
✓ Branch 1 taken 11 times.
11 CurveQuadratic electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve(model); // PlantLoopHeatPump_EIR_WaterSource.idf
714
1/1
✓ Branch 1 taken 11 times.
11 electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve.setCoefficient1Constant(1);
715
1/1
✓ Branch 1 taken 11 times.
11 electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve.setCoefficient2x(0);
716
1/1
✓ Branch 1 taken 11 times.
11 electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve.setCoefficient3xPOW2(0);
717
1/1
✓ Branch 1 taken 11 times.
11 electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve.setMinimumValueofx(0);
718
1/1
✓ Branch 1 taken 11 times.
11 electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve.setMaximumValueofx(1);
719
1/1
✓ Branch 1 taken 11 times.
11 ok = setElectricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve(electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve);
720
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 11 times.
✗ Branch 3 not taken.
11 OS_ASSERT(ok);
721
722 // Bypass the check by calling setString directly
723
2/2
✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
22 setString(OS_HeatPump_PlantLoop_EIR_CoolingFields::CondenserType, "AirSource");
724
725
1/1
✓ Branch 1 taken 11 times.
11 setReferenceCoefficientofPerformance(7.5);
726
1/1
✓ Branch 1 taken 11 times.
11 setSizingFactor(1.0);
727
2/2
✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
22 setControlType("Load");
728
2/2
✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
11 setFlowMode("ConstantFlow");
729
1/1
✓ Branch 1 taken 11 times.
11 setMinimumPartLoadRatio(0.0);
730
1/1
✓ Branch 1 taken 11 times.
11 setMinimumSourceInletTemperature(-100.0);
731
1/1
✓ Branch 1 taken 11 times.
11 setMaximumSourceInletTemperature(100.0);
732
1/1
✓ Branch 1 taken 11 times.
11 setMaximumHeatRecoveryOutletTemperature(60.0);
733
1/1
✓ Branch 1 taken 11 times.
11 setThermosiphonMinimumTemperatureDifference(0.0);
734 11 }
735
736 7627 IddObjectType HeatPumpPlantLoopEIRCooling::iddObjectType() {
737
1/1
✓ Branch 1 taken 7627 times.
7627 return {IddObjectType::OS_HeatPump_PlantLoop_EIR_Cooling};
738 }
739
740 ✗ std::vector<std::string> HeatPumpPlantLoopEIRCooling::condenserTypeValues() {
741 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_HeatPump_PlantLoop_EIR_CoolingFields::CondenserType);
742 }
743
744 ✗ std::vector<std::string> HeatPumpPlantLoopEIRCooling::validCondenserTypeValues() {
745 ✗ return HeatPumpPlantLoopEIRCooling::condenserTypeValues();
746 }
747
748 12 std::string HeatPumpPlantLoopEIRCooling::condenserType() const {
749
1/1
✓ Branch 3 taken 12 times.
12 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->condenserType();
750 }
751
752 6 boost::optional<HeatPumpPlantLoopEIRHeating> HeatPumpPlantLoopEIRCooling::companionHeatingHeatPump() const {
753
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->companionHeatingHeatPump();
754 }
755
756 5 boost::optional<double> HeatPumpPlantLoopEIRCooling::loadSideReferenceFlowRate() const {
757
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->loadSideReferenceFlowRate();
758 }
759
760 8 bool HeatPumpPlantLoopEIRCooling::isLoadSideReferenceFlowRateAutosized() const {
761
1/1
✓ Branch 3 taken 8 times.
8 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->isLoadSideReferenceFlowRateAutosized();
762 }
763
764 5 boost::optional<double> HeatPumpPlantLoopEIRCooling::sourceSideReferenceFlowRate() const {
765
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->sourceSideReferenceFlowRate();
766 }
767
768 8 bool HeatPumpPlantLoopEIRCooling::isSourceSideReferenceFlowRateAutosized() const {
769
1/1
✓ Branch 3 taken 8 times.
8 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->isSourceSideReferenceFlowRateAutosized();
770 }
771
772 ✗ boost::optional<double> HeatPumpPlantLoopEIRCooling::heatRecoveryReferenceFlowRate() const {
773 ✗ return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->heatRecoveryReferenceFlowRate();
774 }
775
776 ✗ bool HeatPumpPlantLoopEIRCooling::isHeatRecoveryReferenceFlowRateAutosized() const {
777 ✗ return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->isHeatRecoveryReferenceFlowRateAutosized();
778 }
779
780 5 boost::optional<double> HeatPumpPlantLoopEIRCooling::referenceCapacity() const {
781
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->referenceCapacity();
782 }
783
784 8 bool HeatPumpPlantLoopEIRCooling::isReferenceCapacityAutosized() const {
785
1/1
✓ Branch 3 taken 8 times.
8 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->isReferenceCapacityAutosized();
786 }
787
788 5 double HeatPumpPlantLoopEIRCooling::referenceCoefficientofPerformance() const {
789
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->referenceCoefficientofPerformance();
790 }
791
792 5 double HeatPumpPlantLoopEIRCooling::sizingFactor() const {
793
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->sizingFactor();
794 }
795
796 7 Curve HeatPumpPlantLoopEIRCooling::capacityModifierFunctionofTemperatureCurve() const {
797
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->capacityModifierFunctionofTemperatureCurve();
798 }
799
800 7 Curve HeatPumpPlantLoopEIRCooling::electricInputtoOutputRatioModifierFunctionofTemperatureCurve() const {
801
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->electricInputtoOutputRatioModifierFunctionofTemperatureCurve();
802 }
803
804 7 Curve HeatPumpPlantLoopEIRCooling::electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve() const {
805
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve();
806 }
807
808 5 std::string HeatPumpPlantLoopEIRCooling::controlType() const {
809
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->controlType();
810 }
811
812 5 std::string HeatPumpPlantLoopEIRCooling::flowMode() const {
813
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->flowMode();
814 }
815
816 5 double HeatPumpPlantLoopEIRCooling::minimumPartLoadRatio() const {
817
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->minimumPartLoadRatio();
818 }
819
820 5 double HeatPumpPlantLoopEIRCooling::minimumSourceInletTemperature() const {
821
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->minimumSourceInletTemperature();
822 }
823
824 5 double HeatPumpPlantLoopEIRCooling::maximumSourceInletTemperature() const {
825
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->maximumSourceInletTemperature();
826 }
827
828 7 boost::optional<Curve> HeatPumpPlantLoopEIRCooling::minimumSupplyWaterTemperatureCurve() const {
829
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->minimumSupplyWaterTemperatureCurve();
830 }
831
832 7 boost::optional<Curve> HeatPumpPlantLoopEIRCooling::maximumSupplyWaterTemperatureCurve() const {
833
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->maximumSupplyWaterTemperatureCurve();
834 }
835
836 5 double HeatPumpPlantLoopEIRCooling::maximumHeatRecoveryOutletTemperature() const {
837
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->maximumHeatRecoveryOutletTemperature();
838 }
839
840 7 boost::optional<Curve> HeatPumpPlantLoopEIRCooling::heatRecoveryCapacityModifierFunctionofTemperatureCurve() const {
841
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->heatRecoveryCapacityModifierFunctionofTemperatureCurve();
842 }
843
844 7 boost::optional<Curve> HeatPumpPlantLoopEIRCooling::heatRecoveryElectricInputtoOutputRatioModifierFunctionofTemperatureCurve() const {
845
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->heatRecoveryElectricInputtoOutputRatioModifierFunctionofTemperatureCurve();
846 }
847
848 7 boost::optional<Curve> HeatPumpPlantLoopEIRCooling::thermosiphonCapacityFractionCurve() const {
849
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->thermosiphonCapacityFractionCurve();
850 }
851
852 5 double HeatPumpPlantLoopEIRCooling::thermosiphonMinimumTemperatureDifference() const {
853
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->thermosiphonMinimumTemperatureDifference();
854 }
855
856 6 bool HeatPumpPlantLoopEIRCooling::setCondenserType(const std::string& condenserType) {
857
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->setCondenserType(condenserType);
858 }
859
860 4 bool HeatPumpPlantLoopEIRCooling::setCompanionHeatingHeatPump(const HeatPumpPlantLoopEIRHeating& companionHP) {
861
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->setCompanionHeatingHeatPump(companionHP);
862 }
863
864 3 bool HeatPumpPlantLoopEIRCooling::setLoadSideReferenceFlowRate(double loadSideReferenceFlowRate) {
865
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->setLoadSideReferenceFlowRate(loadSideReferenceFlowRate);
866 }
867
868 13 void HeatPumpPlantLoopEIRCooling::autosizeLoadSideReferenceFlowRate() {
869
1/1
✓ Branch 3 taken 13 times.
13 getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->autosizeLoadSideReferenceFlowRate();
870 13 }
871
872 3 bool HeatPumpPlantLoopEIRCooling::setSourceSideReferenceFlowRate(double sourceSideReferenceFlowRate) {
873
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->setSourceSideReferenceFlowRate(sourceSideReferenceFlowRate);
874 }
875
876 13 void HeatPumpPlantLoopEIRCooling::autosizeSourceSideReferenceFlowRate() {
877
1/1
✓ Branch 3 taken 13 times.
13 getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->autosizeSourceSideReferenceFlowRate();
878 13 }
879
880 ✗ bool HeatPumpPlantLoopEIRCooling::setHeatRecoveryReferenceFlowRate(double heatRecoveryReferenceFlowRate) {
881 ✗ return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->setHeatRecoveryReferenceFlowRate(heatRecoveryReferenceFlowRate);
882 }
883
884 12 void HeatPumpPlantLoopEIRCooling::autosizeHeatRecoveryReferenceFlowRate() {
885
1/1
✓ Branch 3 taken 12 times.
12 getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->autosizeHeatRecoveryReferenceFlowRate();
886 12 }
887
888 3 bool HeatPumpPlantLoopEIRCooling::setReferenceCapacity(double referenceCapacity) {
889
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->setReferenceCapacity(referenceCapacity);
890 }
891
892 13 void HeatPumpPlantLoopEIRCooling::autosizeReferenceCapacity() {
893
1/1
✓ Branch 3 taken 13 times.
13 getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->autosizeReferenceCapacity();
894 13 }
895
896 15 bool HeatPumpPlantLoopEIRCooling::setReferenceCoefficientofPerformance(double referenceCoefficientofPerformance) {
897
1/1
✓ Branch 3 taken 15 times.
15 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->setReferenceCoefficientofPerformance(referenceCoefficientofPerformance);
898 }
899
900 15 bool HeatPumpPlantLoopEIRCooling::setSizingFactor(double sizingFactor) {
901
1/1
✓ Branch 3 taken 15 times.
15 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->setSizingFactor(sizingFactor);
902 }
903
904 15 bool HeatPumpPlantLoopEIRCooling::setCapacityModifierFunctionofTemperatureCurve(const Curve& capacityModifierFunctionofTemperatureCurve) {
905
1/1
✓ Branch 3 taken 15 times.
30 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->setCapacityModifierFunctionofTemperatureCurve(
906 30 capacityModifierFunctionofTemperatureCurve);
907 }
908
909 15 bool HeatPumpPlantLoopEIRCooling::setElectricInputtoOutputRatioModifierFunctionofTemperatureCurve(
910 const Curve& electricInputtoOutputRatioModifierFunctionofTemperatureCurve) {
911
1/1
✓ Branch 3 taken 15 times.
30 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->setElectricInputtoOutputRatioModifierFunctionofTemperatureCurve(
912 30 electricInputtoOutputRatioModifierFunctionofTemperatureCurve);
913 }
914
915 15 bool HeatPumpPlantLoopEIRCooling::setElectricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve(
916 const Curve& electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve) {
917
1/1
✓ Branch 3 taken 15 times.
30 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->setElectricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve(
918 30 electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve);
919 }
920
921 14 bool HeatPumpPlantLoopEIRCooling::setControlType(const std::string& controlType) {
922
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->setControlType(controlType);
923 }
924
925 14 bool HeatPumpPlantLoopEIRCooling::setFlowMode(const std::string& flowMode) {
926
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->setFlowMode(flowMode);
927 }
928
929 14 bool HeatPumpPlantLoopEIRCooling::setMinimumPartLoadRatio(double minimumPartLoadRatio) {
930
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->setMinimumPartLoadRatio(minimumPartLoadRatio);
931 }
932
933 14 bool HeatPumpPlantLoopEIRCooling::setMinimumSourceInletTemperature(double minimumSourceInletTemperature) {
934
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->setMinimumSourceInletTemperature(minimumSourceInletTemperature);
935 }
936
937 14 bool HeatPumpPlantLoopEIRCooling::setMaximumSourceInletTemperature(double maximumSourceInletTemperature) {
938
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->setMaximumSourceInletTemperature(maximumSourceInletTemperature);
939 }
940
941 2 bool HeatPumpPlantLoopEIRCooling::setMinimumSupplyWaterTemperatureCurve(const Curve& minimumSupplyWaterTemperatureCurve) {
942
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->setMinimumSupplyWaterTemperatureCurve(minimumSupplyWaterTemperatureCurve);
943 }
944
945 1 void HeatPumpPlantLoopEIRCooling::resetMinimumSupplyWaterTemperatureCurve() {
946
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->resetMinimumSupplyWaterTemperatureCurve();
947 1 }
948
949 2 bool HeatPumpPlantLoopEIRCooling::setMaximumSupplyWaterTemperatureCurve(const Curve& maximumSupplyWaterTemperatureCurve) {
950
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->setMaximumSupplyWaterTemperatureCurve(maximumSupplyWaterTemperatureCurve);
951 }
952
953 1 void HeatPumpPlantLoopEIRCooling::resetMaximumSupplyWaterTemperatureCurve() {
954
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->resetMaximumSupplyWaterTemperatureCurve();
955 1 }
956
957 14 bool HeatPumpPlantLoopEIRCooling::setMaximumHeatRecoveryOutletTemperature(double maximumHeatRecoveryOutletTemperature) {
958
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->setMaximumHeatRecoveryOutletTemperature(maximumHeatRecoveryOutletTemperature);
959 }
960
961 2 bool HeatPumpPlantLoopEIRCooling::setHeatRecoveryCapacityModifierFunctionofTemperatureCurve(
962 const Curve& heatRecoveryCapacityModifierFunctionofTemperatureCurve) {
963
1/1
✓ Branch 3 taken 2 times.
4 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->setHeatRecoveryCapacityModifierFunctionofTemperatureCurve(
964 4 heatRecoveryCapacityModifierFunctionofTemperatureCurve);
965 }
966
967 1 void HeatPumpPlantLoopEIRCooling::resetHeatRecoveryCapacityModifierFunctionofTemperatureCurve() {
968
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->resetHeatRecoveryCapacityModifierFunctionofTemperatureCurve();
969 1 }
970
971 2 bool HeatPumpPlantLoopEIRCooling::setHeatRecoveryElectricInputtoOutputRatioModifierFunctionofTemperatureCurve(
972 const Curve& heatRecoveryElectricInputtoOutputRatioModifierFunctionofTemperatureCurve) {
973
1/1
✓ Branch 3 taken 2 times.
4 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->setHeatRecoveryElectricInputtoOutputRatioModifierFunctionofTemperatureCurve(
974 4 heatRecoveryElectricInputtoOutputRatioModifierFunctionofTemperatureCurve);
975 }
976
977 1 void HeatPumpPlantLoopEIRCooling::resetHeatRecoveryElectricInputtoOutputRatioModifierFunctionofTemperatureCurve() {
978
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->resetHeatRecoveryElectricInputtoOutputRatioModifierFunctionofTemperatureCurve();
979 1 }
980
981 2 bool HeatPumpPlantLoopEIRCooling::setThermosiphonCapacityFractionCurve(const Curve& thermosiphonCapacityFractionCurve) {
982
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->setThermosiphonCapacityFractionCurve(thermosiphonCapacityFractionCurve);
983 }
984
985 1 void HeatPumpPlantLoopEIRCooling::resetThermosiphonCapacityFractionCurve() {
986
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->resetThermosiphonCapacityFractionCurve();
987 1 }
988
989 14 bool HeatPumpPlantLoopEIRCooling::setThermosiphonMinimumTemperatureDifference(double thermosiphonMinimumTemperatureDifference) {
990
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->setThermosiphonMinimumTemperatureDifference(thermosiphonMinimumTemperatureDifference);
991 }
992
993 ✗ boost::optional<double> HeatPumpPlantLoopEIRCooling::autosizedLoadSideReferenceFlowRate() const {
994 ✗ return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->autosizedLoadSideReferenceFlowRate();
995 }
996
997 ✗ boost::optional<double> HeatPumpPlantLoopEIRCooling::autosizedSourceSideReferenceFlowRate() const {
998 ✗ return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->autosizedSourceSideReferenceFlowRate();
999 }
1000
1001 ✗ boost::optional<double> HeatPumpPlantLoopEIRCooling::autosizedHeatRecoveryReferenceFlowRate() const {
1002 ✗ return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->autosizedHeatRecoveryReferenceFlowRate();
1003 }
1004
1005 ✗ boost::optional<double> HeatPumpPlantLoopEIRCooling::autosizedReferenceCapacity() const {
1006 ✗ return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->autosizedReferenceCapacity();
1007 }
1008
1009 // Convenience functions
1010 12 boost::optional<PlantLoop> HeatPumpPlantLoopEIRCooling::loadSideWaterLoop() const {
1011
1/1
✓ Branch 3 taken 12 times.
12 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->loadSideWaterLoop();
1012 }
1013
1014 11 boost::optional<PlantLoop> HeatPumpPlantLoopEIRCooling::sourceSideWaterLoop() const {
1015
1/1
✓ Branch 3 taken 11 times.
11 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->sourceSideWaterLoop();
1016 }
1017
1018 13 boost::optional<PlantLoop> HeatPumpPlantLoopEIRCooling::heatRecoveryLoop() const {
1019
1/1
✓ Branch 3 taken 13 times.
13 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->heatRecoveryLoop();
1020 }
1021
1022 2 boost::optional<Node> HeatPumpPlantLoopEIRCooling::sourceSideWaterInletNode() const {
1023
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->sourceSideWaterInletNode();
1024 }
1025
1026 2 boost::optional<Node> HeatPumpPlantLoopEIRCooling::sourceSideWaterOutletNode() const {
1027
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->sourceSideWaterOutletNode();
1028 }
1029
1030 2 boost::optional<Node> HeatPumpPlantLoopEIRCooling::loadSideWaterInletNode() const {
1031
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->loadSideWaterInletNode();
1032 }
1033
1034 2 boost::optional<Node> HeatPumpPlantLoopEIRCooling::loadSideWaterOutletNode() const {
1035
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->loadSideWaterOutletNode();
1036 }
1037
1038 ✗ boost::optional<Node> HeatPumpPlantLoopEIRCooling::heatRecoveryInletNode() const {
1039 ✗ return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->heatRecoveryInletNode();
1040 }
1041
1042 ✗ boost::optional<Node> HeatPumpPlantLoopEIRCooling::heatRecoveryOutletNode() const {
1043 ✗ return getImpl<detail::HeatPumpPlantLoopEIRCooling_Impl>()->heatRecoveryOutletNode();
1044 }
1045
1046 /// @cond
1047 10 HeatPumpPlantLoopEIRCooling::HeatPumpPlantLoopEIRCooling(std::shared_ptr<detail::HeatPumpPlantLoopEIRCooling_Impl> impl)
1048
1/1
✓ Branch 3 taken 10 times.
10 : WaterToWaterComponent(std::move(impl)) {}
1049 /// @endcond
1050
1051 } // namespace model
1052 } // namespace openstudio
1053