GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 72.2% 302 / 0 / 418
Functions: 67.6% 75 / 0 / 111
Branches: 64.7% 330 / 0 / 510

src/model/CoilWaterHeatingDesuperheater.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 "CoilWaterHeatingDesuperheater.hpp"
7 #include "CoilWaterHeatingDesuperheater_Impl.hpp"
8
9 #include "Schedule.hpp"
10 #include "Schedule_Impl.hpp"
11 #include "CurveBiquadratic.hpp"
12 #include "CurveBiquadratic_Impl.hpp"
13 #include "HVACComponent.hpp"
14 #include "HVACComponent_Impl.hpp"
15 #include "WaterHeaterMixed.hpp"
16 #include "WaterHeaterMixed_Impl.hpp"
17 #include "WaterHeaterStratified.hpp"
18 #include "WaterHeaterStratified_Impl.hpp"
19 #include "WaterToWaterComponent.hpp"
20 #include "WaterToWaterComponent_Impl.hpp"
21 #include "Node.hpp"
22 #include "Node_Impl.hpp"
23 #include "Model.hpp"
24 #include "Model_Impl.hpp"
25 #include "ScheduleTypeLimits.hpp"
26 #include "ScheduleTypeRegistry.hpp"
27
28 #include <utilities/idd/OS_Coil_WaterHeating_Desuperheater_FieldEnums.hxx>
29 #include <utilities/idd/IddEnums.hxx>
30
31 #include "../utilities/core/Assert.hpp"
32 #include "../utilities/data/DataEnums.hpp"
33
34 namespace openstudio {
35 namespace model {
36
37 namespace detail {
38
39 15 CoilWaterHeatingDesuperheater_Impl::CoilWaterHeatingDesuperheater_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle)
40 15 : StraightComponent_Impl(idfObject, model, keepHandle) {
41
4/6
✓ Branch 1 taken 15 times.
✓ Branch 4 taken 15 times.
✓ Branch 7 taken 15 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 15 times.
✗ Branch 13 not taken.
15 OS_ASSERT(idfObject.iddObject().type() == CoilWaterHeatingDesuperheater::iddObjectType());
42 15 }
43
44 ✗ CoilWaterHeatingDesuperheater_Impl::CoilWaterHeatingDesuperheater_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model,
45 ✗ bool keepHandle)
46 ✗ : StraightComponent_Impl(other, model, keepHandle) {
47 ✗ OS_ASSERT(other.iddObject().type() == CoilWaterHeatingDesuperheater::iddObjectType());
48 ✗ }
49
50 19 CoilWaterHeatingDesuperheater_Impl::CoilWaterHeatingDesuperheater_Impl(const CoilWaterHeatingDesuperheater_Impl& other, Model_Impl* model,
51 19 bool keepHandle)
52 19 : StraightComponent_Impl(other, model, keepHandle) {}
53
54 ✗ const std::vector<std::string>& CoilWaterHeatingDesuperheater_Impl::outputVariableNames() const {
55 static const std::vector<std::string> result{// TODO: scraped from I/O ref, but should double check here... (gut feeling (c) JM)
56 "Water Heater Part Load Ratio",
57 "Water Heater Heating Rate",
58 "Water Heater Heating Energy",
59 "Water Heater Pump Electricity Rate",
60 "Water Heater Pump Electricity Energy",
61 "Water Heater Heat Reclaim Efficiency Modifier Multiplier",
62 "Water Heater On Cycle Parasitic Electricity Rate",
63 "Water Heater On Cycle Parasitic Electricity Energy",
64 "Water Heater Off Cycle Parasitic Electricity Rate",
65 ✗ "Water Heater Off Cycle Parasitic Electricity Energy"};
66 ✗ return result;
67 ✗ }
68
69 ✗ IddObjectType CoilWaterHeatingDesuperheater_Impl::iddObjectType() const {
70 ✗ return CoilWaterHeatingDesuperheater::iddObjectType();
71 }
72
73 ✗ std::vector<ScheduleTypeKey> CoilWaterHeatingDesuperheater_Impl::getScheduleTypeKeys(const Schedule& schedule) const {
74 ✗ std::vector<ScheduleTypeKey> result;
75 ✗ UnsignedVector fieldIndices = getSourceIndices(schedule.handle());
76 ✗ UnsignedVector::const_iterator b(fieldIndices.begin());
77 ✗ UnsignedVector::const_iterator e(fieldIndices.end());
78 ✗ if (std::find(b, e, OS_Coil_WaterHeating_DesuperheaterFields::AvailabilityScheduleName) != e) {
79 ✗ result.emplace_back("CoilWaterHeatingDesuperheater", "Availability");
80 }
81 ✗ if (std::find(b, e, OS_Coil_WaterHeating_DesuperheaterFields::SetpointTemperatureScheduleName) != e) {
82 ✗ result.emplace_back("CoilWaterHeatingDesuperheater", "Setpoint Temperature");
83 }
84 ✗ return result;
85 ✗ }
86
87 35 unsigned CoilWaterHeatingDesuperheater_Impl::inletPort() const {
88 35 return OS_Coil_WaterHeating_DesuperheaterFields::WaterInletNodeName;
89 }
90
91 35 unsigned CoilWaterHeatingDesuperheater_Impl::outletPort() const {
92 35 return OS_Coil_WaterHeating_DesuperheaterFields::WaterOutletNodeName;
93 }
94
95 4 ModelObject CoilWaterHeatingDesuperheater_Impl::clone(Model model) const {
96
3/3
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
4 auto modelObjectClone = ModelObject_Impl::clone(model).cast<CoilWaterHeatingDesuperheater>(); // NOLINT
97
98
1/1
✓ Branch 1 taken 4 times.
4 modelObjectClone.resetHeatingSource();
99
100 8 return std::move(modelObjectClone);
101 4 }
102
103 ✗ std::vector<IddObjectType> CoilWaterHeatingDesuperheater_Impl::allowableChildTypes() const {
104 ✗ return {IddObjectType::OS_Curve_Biquadratic};
105 }
106
107 15 std::vector<ModelObject> CoilWaterHeatingDesuperheater_Impl::children() const {
108 15 std::vector<ModelObject> result;
109 15 boost::optional<CurveBiquadratic> intermediate;
110
3/3
✓ Branch 1 taken 15 times.
✓ Branch 5 taken 3 times.
✓ Branch 6 taken 12 times.
30 if ((intermediate = heatReclaimEfficiencyFunctionofTemperatureCurve())) {
111
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
3 result.push_back(*intermediate);
112 }
113 30 return result;
114 15 }
115
116 8 bool CoilWaterHeatingDesuperheater_Impl::addToNode(Node& /*node*/) {
117 8 return false;
118 }
119
120 4 std::vector<IdfObject> CoilWaterHeatingDesuperheater_Impl::remove() {
121 4 removeFromHeatRejectionTarget();
122 4 return StraightComponent_Impl::remove();
123 }
124
125 15 boost::optional<ModelObject> CoilWaterHeatingDesuperheater_Impl::heatRejectionTarget() const {
126 15 boost::optional<ModelObject> inletHeatRejectionTarget;
127 15 boost::optional<ModelObject> outletHeatRejectionTarget;
128
2/2
✓ Branch 1 taken 15 times.
✓ Branch 4 taken 15 times.
15 auto desuperheater = this->getObject<ModelObject>().cast<StraightComponent>();
129
3/3
✓ Branch 1 taken 15 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 13 times.
30 if (boost::optional<ModelObject> outletModelObject = desuperheater.outletModelObject()) {
130
3/4
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 6 taken 2 times.
✗ Branch 7 not taken.
4 if (boost::optional<Node> outletNode = outletModelObject->optionalCast<Node>()) {
131
3/4
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 6 taken 2 times.
✗ Branch 7 not taken.
4 if (boost::optional<ModelObject> heatRejectionTarget = outletNode->outletModelObject()) {
132
1/1
✓ Branch 1 taken 2 times.
2 outletHeatRejectionTarget = heatRejectionTarget;
133 2 }
134 2 }
135 15 }
136
3/3
✓ Branch 1 taken 15 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 13 times.
30 if (boost::optional<ModelObject> inletModelObject = desuperheater.inletModelObject()) {
137
3/4
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 6 taken 2 times.
✗ Branch 7 not taken.
4 if (boost::optional<Node> inletNode = inletModelObject->optionalCast<Node>()) {
138
3/4
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 6 taken 2 times.
✗ Branch 7 not taken.
4 if (boost::optional<ModelObject> heatRejectionTarget = inletNode->inletModelObject()) {
139
1/1
✓ Branch 1 taken 2 times.
2 inletHeatRejectionTarget = heatRejectionTarget;
140 2 }
141 2 }
142 15 }
143
9/11
✓ Branch 0 taken 2 times.
✓ Branch 1 taken 13 times.
✓ Branch 2 taken 2 times.
✗ Branch 3 not taken.
✓ Branch 5 taken 2 times.
✓ Branch 8 taken 2 times.
✓ Branch 11 taken 2 times.
✓ Branch 13 taken 2 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 2 times.
✓ Branch 16 taken 13 times.
17 if (inletHeatRejectionTarget && outletHeatRejectionTarget && (inletHeatRejectionTarget.get() == outletHeatRejectionTarget.get())) {
144 2 return inletHeatRejectionTarget;
145 }
146 13 return boost::none;
147 15 }
148
149 5 bool CoilWaterHeatingDesuperheater_Impl::addToHeatRejectionTarget(const ModelObject& heatRejectionTarget) {
150 5 bool validChoice = false;
151
2/2
✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
5 if ((heatRejectionTarget.iddObjectType() == openstudio::IddObjectType::OS_WaterHeater_Mixed)
152
6/8
✓ Branch 0 taken 2 times.
✓ Branch 1 taken 3 times.
✓ Branch 3 taken 2 times.
✓ Branch 6 taken 2 times.
✓ Branch 9 taken 2 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 5 times.
✗ Branch 12 not taken.
5 || (heatRejectionTarget.iddObjectType() == openstudio::IddObjectType::OS_WaterHeater_Stratified)) {
153 5 validChoice = true;
154 }
155
156
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 5 times.
5 if (!validChoice) {
157 ✗ return false;
158 }
159
160
2/3
✓ Branch 1 taken 5 times.
✓ Branch 3 taken 5 times.
✗ Branch 4 not taken.
10 if (boost::optional<WaterToWaterComponent> _heatRejectionTarget = heatRejectionTarget.optionalCast<WaterToWaterComponent>()) {
161
1/1
✓ Branch 1 taken 5 times.
5 Model _model = this->model();
162
1/1
✓ Branch 1 taken 5 times.
5 Node node1(_model);
163
1/1
✓ Branch 1 taken 5 times.
5 Node node2(_model);
164
165
5/5
✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
✓ Branch 10 taken 5 times.
✓ Branch 13 taken 5 times.
5 _model.connect(this->getObject<ModelObject>(), this->outletPort(), node1, node1.inletPort());
166
7/7
✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
✓ Branch 10 taken 5 times.
✓ Branch 13 taken 5 times.
✓ Branch 16 taken 5 times.
✓ Branch 19 taken 5 times.
5 _model.connect(node1, node1.outletPort(), *_heatRejectionTarget, _heatRejectionTarget->demandInletPort());
167
168
7/7
✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
✓ Branch 10 taken 5 times.
✓ Branch 13 taken 5 times.
✓ Branch 16 taken 5 times.
✓ Branch 19 taken 5 times.
5 _model.connect(*_heatRejectionTarget, _heatRejectionTarget->demandOutletPort(), node2, node2.inletPort());
169
5/5
✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
✓ Branch 10 taken 5 times.
✓ Branch 13 taken 5 times.
5 _model.connect(node2, node2.outletPort(), this->getObject<ModelObject>(), this->inletPort());
170
171 5 return true;
172 10 }
173 ✗ return false;
174 }
175
176 4 void CoilWaterHeatingDesuperheater_Impl::removeFromHeatRejectionTarget() {
177
1/1
✓ Branch 1 taken 4 times.
4 Model _model = this->model();
178
3/3
✓ Branch 1 taken 4 times.
✓ Branch 3 taken 3 times.
✓ Branch 4 taken 1 time.
8 if (boost::optional<ModelObject> outletModelObject = this->outletModelObject()) {
179
3/4
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 6 taken 3 times.
✗ Branch 7 not taken.
6 if (boost::optional<Node> node = outletModelObject->optionalCast<Node>()) {
180
5/5
✓ 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.
3 _model.disconnect(*node, node->outletPort());
181
5/5
✓ 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.
3 _model.disconnect(*node, node->inletPort());
182
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
3 node->remove();
183 3 }
184 4 }
185
3/3
✓ Branch 1 taken 4 times.
✓ Branch 3 taken 3 times.
✓ Branch 4 taken 1 time.
8 if (boost::optional<ModelObject> inletModelObject = this->inletModelObject()) {
186
3/4
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 6 taken 3 times.
✗ Branch 7 not taken.
6 if (boost::optional<Node> node = inletModelObject->optionalCast<Node>()) {
187
5/5
✓ 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.
3 _model.disconnect(*node, node->outletPort());
188
5/5
✓ 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.
3 _model.disconnect(*node, node->inletPort());
189
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
3 node->remove();
190 3 }
191 4 }
192 4 }
193
194 11 Schedule CoilWaterHeatingDesuperheater_Impl::availabilitySchedule() const {
195 boost::optional<Schedule> value =
196
2/2
✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
11 getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_Coil_WaterHeating_DesuperheaterFields::AvailabilityScheduleName);
197
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 11 times.
11 if (!value) {
198 ✗ LOG_AND_THROW(briefDescription() << " does not have an Availability Schedule attached.");
199 }
200
2/2
✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
22 return value.get();
201 11 }
202
203 11 Schedule CoilWaterHeatingDesuperheater_Impl::setpointTemperatureSchedule() const {
204
1/1
✓ Branch 1 taken 11 times.
11 boost::optional<Schedule> value = optionalSetpointTemperatureSchedule();
205
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 11 times.
11 if (!value) {
206 ✗ LOG_AND_THROW(briefDescription() << " does not have an Setpoint Temperature Schedule attached.");
207 }
208
2/2
✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
22 return value.get();
209 11 }
210
211 14 double CoilWaterHeatingDesuperheater_Impl::deadBandTemperatureDifference() const {
212
1/1
✓ Branch 1 taken 14 times.
14 boost::optional<double> value = getDouble(OS_Coil_WaterHeating_DesuperheaterFields::DeadBandTemperatureDifference, true);
213
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 14 times.
✗ Branch 4 not taken.
14 OS_ASSERT(value);
214
1/1
✓ Branch 1 taken 14 times.
28 return value.get();
215 }
216
217 ✗ bool CoilWaterHeatingDesuperheater_Impl::isDeadBandTemperatureDifferenceDefaulted() const {
218 ✗ return isEmpty(OS_Coil_WaterHeating_DesuperheaterFields::DeadBandTemperatureDifference);
219 }
220
221 41 boost::optional<double> CoilWaterHeatingDesuperheater_Impl::ratedHeatReclaimRecoveryEfficiency() const {
222 41 return getDouble(OS_Coil_WaterHeating_DesuperheaterFields::RatedHeatReclaimRecoveryEfficiency, true);
223 }
224
225 14 double CoilWaterHeatingDesuperheater_Impl::ratedInletWaterTemperature() const {
226
1/1
✓ Branch 1 taken 14 times.
14 boost::optional<double> value = getDouble(OS_Coil_WaterHeating_DesuperheaterFields::RatedInletWaterTemperature, true);
227
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 14 times.
✗ Branch 4 not taken.
14 OS_ASSERT(value);
228
1/1
✓ Branch 1 taken 14 times.
28 return value.get();
229 }
230
231 14 double CoilWaterHeatingDesuperheater_Impl::ratedOutdoorAirTemperature() const {
232
1/1
✓ Branch 1 taken 14 times.
14 boost::optional<double> value = getDouble(OS_Coil_WaterHeating_DesuperheaterFields::RatedOutdoorAirTemperature, true);
233
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 14 times.
✗ Branch 4 not taken.
14 OS_ASSERT(value);
234
1/1
✓ Branch 1 taken 14 times.
28 return value.get();
235 }
236
237 14 double CoilWaterHeatingDesuperheater_Impl::maximumInletWaterTemperatureforHeatReclaim() const {
238
1/1
✓ Branch 1 taken 14 times.
14 boost::optional<double> value = getDouble(OS_Coil_WaterHeating_DesuperheaterFields::MaximumInletWaterTemperatureforHeatReclaim, true);
239
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 14 times.
✗ Branch 4 not taken.
14 OS_ASSERT(value);
240
1/1
✓ Branch 1 taken 14 times.
28 return value.get();
241 }
242
243 30 boost::optional<CurveBiquadratic> CoilWaterHeatingDesuperheater_Impl::heatReclaimEfficiencyFunctionofTemperatureCurve() const {
244
1/1
✓ Branch 1 taken 30 times.
60 return getObject<ModelObject>().getModelObjectTarget<CurveBiquadratic>(
245
1/1
✓ Branch 1 taken 30 times.
60 OS_Coil_WaterHeating_DesuperheaterFields::HeatReclaimEfficiencyFunctionofTemperatureCurveName);
246 }
247
248 26 boost::optional<ModelObject> CoilWaterHeatingDesuperheater_Impl::heatingSource() const {
249
2/2
✓ Branch 1 taken 26 times.
✓ Branch 4 taken 26 times.
26 return getObject<ModelObject>().getModelObjectTarget<ModelObject>(OS_Coil_WaterHeating_DesuperheaterFields::HeatingSourceName);
250 }
251
252 14 double CoilWaterHeatingDesuperheater_Impl::waterFlowRate() const {
253
1/1
✓ Branch 1 taken 14 times.
14 boost::optional<double> value = getDouble(OS_Coil_WaterHeating_DesuperheaterFields::WaterFlowRate, true);
254
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 14 times.
✗ Branch 4 not taken.
14 OS_ASSERT(value);
255
1/1
✓ Branch 1 taken 14 times.
28 return value.get();
256 }
257
258 14 double CoilWaterHeatingDesuperheater_Impl::waterPumpPower() const {
259
1/1
✓ Branch 1 taken 14 times.
14 boost::optional<double> value = getDouble(OS_Coil_WaterHeating_DesuperheaterFields::WaterPumpPower, true);
260
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 14 times.
✗ Branch 4 not taken.
14 OS_ASSERT(value);
261
1/1
✓ Branch 1 taken 14 times.
28 return value.get();
262 }
263
264 ✗ bool CoilWaterHeatingDesuperheater_Impl::isWaterPumpPowerDefaulted() const {
265 ✗ return isEmpty(OS_Coil_WaterHeating_DesuperheaterFields::WaterPumpPower);
266 }
267
268 14 double CoilWaterHeatingDesuperheater_Impl::fractionofPumpHeattoWater() const {
269
1/1
✓ Branch 1 taken 14 times.
14 boost::optional<double> value = getDouble(OS_Coil_WaterHeating_DesuperheaterFields::FractionofPumpHeattoWater, true);
270
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 14 times.
✗ Branch 4 not taken.
14 OS_ASSERT(value);
271
1/1
✓ Branch 1 taken 14 times.
28 return value.get();
272 }
273
274 ✗ bool CoilWaterHeatingDesuperheater_Impl::isFractionofPumpHeattoWaterDefaulted() const {
275 ✗ return isEmpty(OS_Coil_WaterHeating_DesuperheaterFields::FractionofPumpHeattoWater);
276 }
277
278 14 double CoilWaterHeatingDesuperheater_Impl::onCycleParasiticElectricLoad() const {
279
1/1
✓ Branch 1 taken 14 times.
14 boost::optional<double> value = getDouble(OS_Coil_WaterHeating_DesuperheaterFields::OnCycleParasiticElectricLoad, true);
280
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 14 times.
✗ Branch 4 not taken.
14 OS_ASSERT(value);
281
1/1
✓ Branch 1 taken 14 times.
28 return value.get();
282 }
283
284 ✗ bool CoilWaterHeatingDesuperheater_Impl::isOnCycleParasiticElectricLoadDefaulted() const {
285 ✗ return isEmpty(OS_Coil_WaterHeating_DesuperheaterFields::OnCycleParasiticElectricLoad);
286 }
287
288 14 double CoilWaterHeatingDesuperheater_Impl::offCycleParasiticElectricLoad() const {
289
1/1
✓ Branch 1 taken 14 times.
14 boost::optional<double> value = getDouble(OS_Coil_WaterHeating_DesuperheaterFields::OffCycleParasiticElectricLoad, true);
290
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 14 times.
✗ Branch 4 not taken.
14 OS_ASSERT(value);
291
1/1
✓ Branch 1 taken 14 times.
28 return value.get();
292 }
293
294 ✗ bool CoilWaterHeatingDesuperheater_Impl::isOffCycleParasiticElectricLoadDefaulted() const {
295 ✗ return isEmpty(OS_Coil_WaterHeating_DesuperheaterFields::OffCycleParasiticElectricLoad);
296 }
297
298 14 bool CoilWaterHeatingDesuperheater_Impl::setAvailabilitySchedule(Schedule& schedule) {
299 bool result =
300
3/3
✓ Branch 1 taken 14 times.
✓ Branch 4 taken 14 times.
✓ Branch 7 taken 14 times.
56 setSchedule(OS_Coil_WaterHeating_DesuperheaterFields::AvailabilityScheduleName, "CoilWaterHeatingDesuperheater", "Availability", schedule);
301 14 return result;
302 }
303
304 ✗ void CoilWaterHeatingDesuperheater_Impl::resetAvailabilitySchedule() {
305 ✗ bool result = setString(OS_Coil_WaterHeating_DesuperheaterFields::AvailabilityScheduleName, "");
306 ✗ OS_ASSERT(result);
307 ✗ }
308
309 15 bool CoilWaterHeatingDesuperheater_Impl::setSetpointTemperatureSchedule(Schedule& schedule) {
310
3/3
✓ Branch 1 taken 15 times.
✓ Branch 4 taken 15 times.
✓ Branch 7 taken 15 times.
60 bool result = setSchedule(OS_Coil_WaterHeating_DesuperheaterFields::SetpointTemperatureScheduleName, "CoilWaterHeatingDesuperheater",
311 "Setpoint Temperature", schedule);
312 15 return result;
313 }
314
315 16 bool CoilWaterHeatingDesuperheater_Impl::setDeadBandTemperatureDifference(double deadBandTemperatureDifference) {
316 16 bool result = setDouble(OS_Coil_WaterHeating_DesuperheaterFields::DeadBandTemperatureDifference, deadBandTemperatureDifference);
317 16 return result;
318 }
319
320 ✗ void CoilWaterHeatingDesuperheater_Impl::resetDeadBandTemperatureDifference() {
321 ✗ bool result = setString(OS_Coil_WaterHeating_DesuperheaterFields::DeadBandTemperatureDifference, "");
322 ✗ OS_ASSERT(result);
323 ✗ }
324
325 16 bool CoilWaterHeatingDesuperheater_Impl::setRatedInletWaterTemperature(double ratedInletWaterTemperature) {
326 16 bool result = setDouble(OS_Coil_WaterHeating_DesuperheaterFields::RatedInletWaterTemperature, ratedInletWaterTemperature);
327
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 16 times.
16 OS_ASSERT(result);
328 16 return result;
329 }
330
331 16 bool CoilWaterHeatingDesuperheater_Impl::setRatedOutdoorAirTemperature(double ratedOutdoorAirTemperature) {
332 16 bool result = setDouble(OS_Coil_WaterHeating_DesuperheaterFields::RatedOutdoorAirTemperature, ratedOutdoorAirTemperature);
333
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 16 times.
16 OS_ASSERT(result);
334 16 return result;
335 }
336
337 16 bool CoilWaterHeatingDesuperheater_Impl::setMaximumInletWaterTemperatureforHeatReclaim(double maximumInletWaterTemperatureforHeatReclaim) {
338 bool result =
339 16 setDouble(OS_Coil_WaterHeating_DesuperheaterFields::MaximumInletWaterTemperatureforHeatReclaim, maximumInletWaterTemperatureforHeatReclaim);
340
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 16 times.
16 OS_ASSERT(result);
341 16 return result;
342 }
343
344 5 bool CoilWaterHeatingDesuperheater_Impl::setHeatReclaimEfficiencyFunctionofTemperatureCurve(const CurveBiquadratic& curveBiquadratic) {
345 bool result =
346
2/2
✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
5 setPointer(OS_Coil_WaterHeating_DesuperheaterFields::HeatReclaimEfficiencyFunctionofTemperatureCurveName, curveBiquadratic.handle());
347 5 return result;
348 }
349
350 ✗ void CoilWaterHeatingDesuperheater_Impl::resetHeatReclaimEfficiencyFunctionofTemperatureCurve() {
351 ✗ bool result = setString(OS_Coil_WaterHeating_DesuperheaterFields::HeatReclaimEfficiencyFunctionofTemperatureCurveName, "");
352 ✗ OS_ASSERT(result);
353 ✗ }
354
355 10 bool CoilWaterHeatingDesuperheater_Impl::setRatedHeatReclaimRecoveryEfficiency(double ratedHeatReclaimRecoveryEfficiency) {
356
357
3/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 4 times.
✓ Branch 4 taken 6 times.
20 if (auto heatingSource_ = heatingSource()) {
358
359
2/2
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
4 auto heatingSourceIddObjectType = heatingSource_->iddObjectType();
360
1/1
✓ Branch 1 taken 4 times.
4 if ((heatingSourceIddObjectType == IddObjectType::OS_Refrigeration_Condenser_AirCooled)
361
2/3
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✗ Branch 5 not taken.
2 || (heatingSourceIddObjectType == IddObjectType::OS_Refrigeration_Condenser_EvaporativeCooled)
362
6/7
✓ Branch 0 taken 2 times.
✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 2 times.
✓ Branch 8 taken 2 times.
✓ Branch 9 taken 2 times.
6 || (heatingSourceIddObjectType == IddObjectType::OS_Refrigeration_Condenser_WaterCooled)) {
363
2/2
✓ Branch 0 taken 1 time.
✓ Branch 1 taken 1 time.
2 if (ratedHeatReclaimRecoveryEfficiency > 0.9) {
364
11/11
✓ 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 16 taken 1 time.
✓ Branch 19 taken 1 time.
✓ Branch 22 taken 1 time.
✓ Branch 27 taken 1 time.
✓ Branch 30 taken 1 time.
✓ Branch 33 taken 1 time.
1 LOG(Error, briefDescription() << ": Rated Heat Reclaim Recovery Efficiency must be"
365 << " <= 0.9 when Heating Source Object Type = " << heatingSourceIddObjectType.valueDescription() << ".");
366 2 return false;
367 }
368 } else {
369
2/2
✓ Branch 0 taken 1 time.
✓ Branch 1 taken 1 time.
2 if (ratedHeatReclaimRecoveryEfficiency > 0.3) {
370
11/11
✓ 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 16 taken 1 time.
✓ Branch 19 taken 1 time.
✓ Branch 22 taken 1 time.
✓ Branch 27 taken 1 time.
✓ Branch 30 taken 1 time.
✓ Branch 33 taken 1 time.
1 LOG(Error, briefDescription() << ": Rated Heat Reclaim Recovery Efficiency must be"
371 << " <= 0.3 when Heating Source Object Type = " << heatingSourceIddObjectType.valueDescription() << ".");
372 1 return false;
373 }
374 }
375 10 }
376
377 8 bool result = setDouble(OS_Coil_WaterHeating_DesuperheaterFields::RatedHeatReclaimRecoveryEfficiency, ratedHeatReclaimRecoveryEfficiency);
378 8 return result;
379 }
380
381 ✗ void CoilWaterHeatingDesuperheater_Impl::resetRatedHeatReclaimRecoveryEfficiency() {
382 ✗ bool result = setString(OS_Coil_WaterHeating_DesuperheaterFields::RatedHeatReclaimRecoveryEfficiency, "");
383 ✗ OS_ASSERT(result);
384 ✗ }
385
386 18 bool CoilWaterHeatingDesuperheater_Impl::setHeatingSource(const ModelObject& heatingSource) {
387
2/2
✓ Branch 1 taken 18 times.
✓ Branch 4 taken 18 times.
18 bool result = setPointer(OS_Coil_WaterHeating_DesuperheaterFields::HeatingSourceName, heatingSource.handle());
388
389
3/3
✓ Branch 1 taken 18 times.
✓ Branch 3 taken 15 times.
✓ Branch 4 taken 3 times.
36 if (boost::optional<double> ratedHeatReclaimRecoveryEfficiency_ = this->ratedHeatReclaimRecoveryEfficiency()) {
390
1/1
✓ Branch 1 taken 15 times.
15 auto heatingSourceIddObjectType = heatingSource.iddObjectType();
391
1/1
✓ Branch 1 taken 15 times.
15 if ((heatingSourceIddObjectType == IddObjectType::OS_Refrigeration_Condenser_AirCooled)
392
3/3
✓ Branch 1 taken 11 times.
✓ Branch 4 taken 10 times.
✓ Branch 5 taken 1 time.
11 || (heatingSourceIddObjectType == IddObjectType::OS_Refrigeration_Condenser_EvaporativeCooled)
393
7/7
✓ Branch 0 taken 11 times.
✓ Branch 1 taken 4 times.
✓ Branch 3 taken 10 times.
✓ Branch 6 taken 1 time.
✓ Branch 7 taken 9 times.
✓ Branch 8 taken 6 times.
✓ Branch 9 taken 9 times.
26 || (heatingSourceIddObjectType == IddObjectType::OS_Refrigeration_Condenser_WaterCooled)) {
394
2/3
✓ Branch 1 taken 6 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 6 times.
6 if (ratedHeatReclaimRecoveryEfficiency_.get() > 0.9) {
395 ✗ LOG(Error, briefDescription() << ": Rated Heat Reclaim Recovery Efficiency must be" << " <= 0.9 when Heating Source Object Type = "
396 << heatingSourceIddObjectType.valueDescription() << ". Resetting it to the default of 0.8.");
397 // setDouble to avoid a double check
398 // setRatedHeatReclaimRecoveryEfficiency(0.8);
399 ✗ setDouble(OS_Coil_WaterHeating_DesuperheaterFields::RatedHeatReclaimRecoveryEfficiency, 0.8);
400 }
401 } else {
402
3/3
✓ Branch 1 taken 9 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 8 times.
9 if (ratedHeatReclaimRecoveryEfficiency_.get() > 0.3) {
403
11/11
✓ 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 16 taken 1 time.
✓ Branch 19 taken 1 time.
✓ Branch 22 taken 1 time.
✓ Branch 27 taken 1 time.
✓ Branch 30 taken 1 time.
✓ Branch 33 taken 1 time.
1 LOG(Error, briefDescription() << ": Rated Heat Reclaim Recovery Efficiency must be" << " <= 0.3 when Heating Source Object Type = "
404 << heatingSourceIddObjectType.valueDescription() << ". Resetting it to the default of 0.25.");
405 // setRatedHeatReclaimRecoveryEfficiency(0.25);
406
1/1
✓ Branch 1 taken 1 time.
1 setDouble(OS_Coil_WaterHeating_DesuperheaterFields::RatedHeatReclaimRecoveryEfficiency, 0.25);
407 }
408 }
409 }
410
411 18 return result;
412 }
413
414 4 void CoilWaterHeatingDesuperheater_Impl::resetHeatingSource() {
415
2/2
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
8 bool result = setString(OS_Coil_WaterHeating_DesuperheaterFields::HeatingSourceName, "");
416
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
4 OS_ASSERT(result);
417 4 }
418
419 16 bool CoilWaterHeatingDesuperheater_Impl::setWaterFlowRate(double waterFlowRate) {
420 16 bool result = setDouble(OS_Coil_WaterHeating_DesuperheaterFields::WaterFlowRate, waterFlowRate);
421 16 return result;
422 }
423
424 16 bool CoilWaterHeatingDesuperheater_Impl::setWaterPumpPower(double waterPumpPower) {
425 16 bool result = setDouble(OS_Coil_WaterHeating_DesuperheaterFields::WaterPumpPower, waterPumpPower);
426 16 return result;
427 }
428
429 ✗ void CoilWaterHeatingDesuperheater_Impl::resetWaterPumpPower() {
430 ✗ bool result = setString(OS_Coil_WaterHeating_DesuperheaterFields::WaterPumpPower, "");
431 ✗ OS_ASSERT(result);
432 ✗ }
433
434 16 bool CoilWaterHeatingDesuperheater_Impl::setFractionofPumpHeattoWater(double fractionofPumpHeattoWater) {
435 16 bool result = setDouble(OS_Coil_WaterHeating_DesuperheaterFields::FractionofPumpHeattoWater, fractionofPumpHeattoWater);
436 16 return result;
437 }
438
439 ✗ void CoilWaterHeatingDesuperheater_Impl::resetFractionofPumpHeattoWater() {
440 ✗ bool result = setString(OS_Coil_WaterHeating_DesuperheaterFields::FractionofPumpHeattoWater, "");
441 ✗ OS_ASSERT(result);
442 ✗ }
443
444 16 bool CoilWaterHeatingDesuperheater_Impl::setOnCycleParasiticElectricLoad(double onCycleParasiticElectricLoad) {
445 16 bool result = setDouble(OS_Coil_WaterHeating_DesuperheaterFields::OnCycleParasiticElectricLoad, onCycleParasiticElectricLoad);
446 16 return result;
447 }
448
449 ✗ void CoilWaterHeatingDesuperheater_Impl::resetOnCycleParasiticElectricLoad() {
450 ✗ bool result = setString(OS_Coil_WaterHeating_DesuperheaterFields::OnCycleParasiticElectricLoad, "");
451 ✗ OS_ASSERT(result);
452 ✗ }
453
454 16 bool CoilWaterHeatingDesuperheater_Impl::setOffCycleParasiticElectricLoad(double offCycleParasiticElectricLoad) {
455 16 bool result = setDouble(OS_Coil_WaterHeating_DesuperheaterFields::OffCycleParasiticElectricLoad, offCycleParasiticElectricLoad);
456 16 return result;
457 }
458
459 ✗ void CoilWaterHeatingDesuperheater_Impl::resetOffCycleParasiticElectricLoad() {
460 ✗ bool result = setString(OS_Coil_WaterHeating_DesuperheaterFields::OffCycleParasiticElectricLoad, "");
461 ✗ OS_ASSERT(result);
462 ✗ }
463
464 11 boost::optional<Schedule> CoilWaterHeatingDesuperheater_Impl::optionalSetpointTemperatureSchedule() const {
465
2/2
✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
11 return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_Coil_WaterHeating_DesuperheaterFields::SetpointTemperatureScheduleName);
466 }
467
468 // boost::optional<HVACComponent> CoilWaterHeatingDesuperheater_Impl::tank() const {
469 // return getObject<ModelObject>().getModelObjectTarget<HVACComponent>(OS_Coil_WaterHeating_DesuperheaterFields::TankName);
470 // boost::optional<HVACComponent> value = optionalTank();
471 // if (!value) {
472 // LOG_AND_THROW(briefDescription() << " does not have an Tank attached.");
473 // }
474 // return value.get();
475 // }
476
477 // boost::optional<HVACComponent> CoilWaterHeatingDesuperheater_Impl::optionalTank() const {
478 // return getObject<ModelObject>().getModelObjectTarget<HVACComponent>(OS_Coil_WaterHeating_DesuperheaterFields::TankName);
479 // }
480
481 // bool CoilWaterHeatingDesuperheater_Impl::setTank(const HVACComponent& waterHeater) {
482 // bool result = setPointer(OS_Coil_WaterHeating_DesuperheaterFields::TankName, waterHeater.handle());
483 // if (result) addToWaterHeater(waterHeater);
484 // return result;
485 // }
486
487 ✗ ComponentType CoilWaterHeatingDesuperheater_Impl::componentType() const {
488 ✗ return ComponentType::Heating;
489 }
490
491 ✗ std::vector<FuelType> CoilWaterHeatingDesuperheater_Impl::coolingFuelTypes() const {
492 ✗ return {};
493 }
494
495 ✗ std::vector<FuelType> CoilWaterHeatingDesuperheater_Impl::heatingFuelTypes() const {
496 ✗ return {FuelType::Electricity};
497 }
498
499 ✗ std::vector<AppGFuelType> CoilWaterHeatingDesuperheater_Impl::appGHeatingFuelTypes() const {
500 ✗ return {AppGFuelType::HeatPump}; // TODO: openstudio-standards uses Electric
501 }
502
503 } // namespace detail
504
505 15 CoilWaterHeatingDesuperheater::CoilWaterHeatingDesuperheater(const Model& model, Schedule& setpointTemperatureSchedule)
506 15 : StraightComponent(CoilWaterHeatingDesuperheater::iddObjectType(), model) {
507
1/3
✗ Branch 2 not taken.
✓ Branch 3 taken 15 times.
✗ Branch 5 not taken.
15 OS_ASSERT(getImpl<detail::CoilWaterHeatingDesuperheater_Impl>());
508
509 // That's the only bit that's user-specified and could be expected to really throw
510
1/1
✓ Branch 1 taken 15 times.
15 bool ok = setSetpointTemperatureSchedule(setpointTemperatureSchedule);
511
2/2
✓ Branch 0 taken 1 time.
✓ Branch 1 taken 14 times.
15 if (!ok) {
512
1/1
✓ Branch 1 taken 1 time.
1 remove();
513
25/25
✓ 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 16 taken 1 time.
✓ Branch 19 taken 1 time.
✓ Branch 22 taken 1 time.
✓ Branch 27 taken 1 time.
✓ Branch 30 taken 1 time.
✓ Branch 33 taken 1 time.
✓ Branch 39 taken 1 time.
✓ Branch 42 taken 1 time.
✓ Branch 45 taken 1 time.
✓ Branch 48 taken 1 time.
✓ Branch 51 taken 1 time.
✓ Branch 54 taken 1 time.
✓ Branch 57 taken 1 time.
✓ Branch 60 taken 1 time.
✓ Branch 63 taken 1 time.
✓ Branch 66 taken 1 time.
✓ Branch 69 taken 1 time.
✓ Branch 72 taken 1 time.
✓ Branch 78 taken 1 time.
✓ Branch 81 taken 1 time.
1 LOG_AND_THROW("Unable to set " << briefDescription() << "'s Setpoint Temperature Schedule to " << setpointTemperatureSchedule.briefDescription()
514 << ".");
515 }
516
517 // All of the below is expected to work so an OS_ASSERT is good enough
518
1/1
✓ Branch 1 taken 14 times.
14 Schedule availabilitySchedule = model.alwaysOnDiscreteSchedule();
519
1/1
✓ Branch 1 taken 14 times.
14 ok = setAvailabilitySchedule(availabilitySchedule);
520
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 14 times.
✗ Branch 3 not taken.
14 OS_ASSERT(ok);
521
1/1
✓ Branch 1 taken 14 times.
14 ok = setDeadBandTemperatureDifference(5.0);
522
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 14 times.
✗ Branch 3 not taken.
14 OS_ASSERT(ok);
523
1/1
✓ Branch 1 taken 14 times.
14 setRatedInletWaterTemperature(50.0);
524
1/1
✓ Branch 1 taken 14 times.
14 setRatedOutdoorAirTemperature(35.0);
525
1/1
✓ Branch 1 taken 14 times.
14 setMaximumInletWaterTemperatureforHeatReclaim(60.0);
526
1/1
✓ Branch 1 taken 14 times.
14 ok = setWaterFlowRate(0.0001);
527
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 14 times.
✗ Branch 3 not taken.
14 OS_ASSERT(ok);
528
1/1
✓ Branch 1 taken 14 times.
14 ok = setWaterPumpPower(100.0);
529
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 14 times.
✗ Branch 3 not taken.
14 OS_ASSERT(ok);
530
1/1
✓ Branch 1 taken 14 times.
14 ok = setFractionofPumpHeattoWater(0.2);
531
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 14 times.
✗ Branch 3 not taken.
14 OS_ASSERT(ok);
532
1/1
✓ Branch 1 taken 14 times.
14 ok = setOnCycleParasiticElectricLoad(0.0);
533
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 14 times.
✗ Branch 3 not taken.
14 OS_ASSERT(ok);
534
1/1
✓ Branch 1 taken 14 times.
14 ok = setOffCycleParasiticElectricLoad(0.0);
535
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 14 times.
✗ Branch 3 not taken.
14 OS_ASSERT(ok);
536 15 }
537
538 7766 IddObjectType CoilWaterHeatingDesuperheater::iddObjectType() {
539
1/1
✓ Branch 1 taken 7766 times.
7766 return {IddObjectType::OS_Coil_WaterHeating_Desuperheater};
540 }
541
542 15 boost::optional<ModelObject> CoilWaterHeatingDesuperheater::heatRejectionTarget() const {
543
1/1
✓ Branch 3 taken 15 times.
15 return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->heatRejectionTarget();
544 }
545
546 5 bool CoilWaterHeatingDesuperheater::addToHeatRejectionTarget(const ModelObject& heatRejectionTarget) {
547
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->addToHeatRejectionTarget(heatRejectionTarget);
548 }
549
550 ✗ void CoilWaterHeatingDesuperheater::removeFromHeatRejectionTarget() {
551 ✗ return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->removeFromHeatRejectionTarget();
552 }
553
554 11 Schedule CoilWaterHeatingDesuperheater::availabilitySchedule() const {
555
1/1
✓ Branch 3 taken 11 times.
11 return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->availabilitySchedule();
556 }
557
558 11 Schedule CoilWaterHeatingDesuperheater::setpointTemperatureSchedule() const {
559
1/1
✓ Branch 3 taken 11 times.
11 return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->setpointTemperatureSchedule();
560 }
561
562 14 double CoilWaterHeatingDesuperheater::deadBandTemperatureDifference() const {
563
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->deadBandTemperatureDifference();
564 }
565
566 ✗ bool CoilWaterHeatingDesuperheater::isDeadBandTemperatureDifferenceDefaulted() const {
567 ✗ return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->isDeadBandTemperatureDifferenceDefaulted();
568 }
569
570 23 boost::optional<double> CoilWaterHeatingDesuperheater::ratedHeatReclaimRecoveryEfficiency() const {
571
1/1
✓ Branch 3 taken 23 times.
23 return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->ratedHeatReclaimRecoveryEfficiency();
572 }
573
574 14 double CoilWaterHeatingDesuperheater::ratedInletWaterTemperature() const {
575
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->ratedInletWaterTemperature();
576 }
577
578 14 double CoilWaterHeatingDesuperheater::ratedOutdoorAirTemperature() const {
579
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->ratedOutdoorAirTemperature();
580 }
581
582 14 double CoilWaterHeatingDesuperheater::maximumInletWaterTemperatureforHeatReclaim() const {
583
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->maximumInletWaterTemperatureforHeatReclaim();
584 }
585
586 15 boost::optional<CurveBiquadratic> CoilWaterHeatingDesuperheater::heatReclaimEfficiencyFunctionofTemperatureCurve() const {
587
1/1
✓ Branch 3 taken 15 times.
15 return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->heatReclaimEfficiencyFunctionofTemperatureCurve();
588 }
589
590 // boost::optional<HVACComponent> CoilWaterHeatingDesuperheater::tank() const {
591 // return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->tank();
592 // }
593
594 16 boost::optional<ModelObject> CoilWaterHeatingDesuperheater::heatingSource() const {
595
1/1
✓ Branch 3 taken 16 times.
16 return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->heatingSource();
596 }
597
598 14 double CoilWaterHeatingDesuperheater::waterFlowRate() const {
599
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->waterFlowRate();
600 }
601
602 14 double CoilWaterHeatingDesuperheater::waterPumpPower() const {
603
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->waterPumpPower();
604 }
605
606 ✗ bool CoilWaterHeatingDesuperheater::isWaterPumpPowerDefaulted() const {
607 ✗ return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->isWaterPumpPowerDefaulted();
608 }
609
610 14 double CoilWaterHeatingDesuperheater::fractionofPumpHeattoWater() const {
611
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->fractionofPumpHeattoWater();
612 }
613
614 ✗ bool CoilWaterHeatingDesuperheater::isFractionofPumpHeattoWaterDefaulted() const {
615 ✗ return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->isFractionofPumpHeattoWaterDefaulted();
616 }
617
618 14 double CoilWaterHeatingDesuperheater::onCycleParasiticElectricLoad() const {
619
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->onCycleParasiticElectricLoad();
620 }
621
622 ✗ bool CoilWaterHeatingDesuperheater::isOnCycleParasiticElectricLoadDefaulted() const {
623 ✗ return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->isOnCycleParasiticElectricLoadDefaulted();
624 }
625
626 14 double CoilWaterHeatingDesuperheater::offCycleParasiticElectricLoad() const {
627
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->offCycleParasiticElectricLoad();
628 }
629
630 ✗ bool CoilWaterHeatingDesuperheater::isOffCycleParasiticElectricLoadDefaulted() const {
631 ✗ return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->isOffCycleParasiticElectricLoadDefaulted();
632 }
633
634 14 bool CoilWaterHeatingDesuperheater::setAvailabilitySchedule(Schedule& schedule) {
635
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->setAvailabilitySchedule(schedule);
636 }
637
638 ✗ void CoilWaterHeatingDesuperheater::resetAvailabilitySchedule() {
639 ✗ getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->resetAvailabilitySchedule();
640 ✗ }
641
642 15 bool CoilWaterHeatingDesuperheater::setSetpointTemperatureSchedule(Schedule& schedule) {
643
1/1
✓ Branch 3 taken 15 times.
15 return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->setSetpointTemperatureSchedule(schedule);
644 }
645
646 16 bool CoilWaterHeatingDesuperheater::setDeadBandTemperatureDifference(double deadBandTemperatureDifference) {
647
1/1
✓ Branch 3 taken 16 times.
16 return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->setDeadBandTemperatureDifference(deadBandTemperatureDifference);
648 }
649
650 ✗ void CoilWaterHeatingDesuperheater::resetDeadBandTemperatureDifference() {
651 ✗ getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->resetDeadBandTemperatureDifference();
652 ✗ }
653
654 10 bool CoilWaterHeatingDesuperheater::setRatedHeatReclaimRecoveryEfficiency(double ratedHeatReclaimRecoveryEfficiency) {
655
1/1
✓ Branch 3 taken 10 times.
10 return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->setRatedHeatReclaimRecoveryEfficiency(ratedHeatReclaimRecoveryEfficiency);
656 }
657
658 ✗ void CoilWaterHeatingDesuperheater::resetRatedHeatReclaimRecoveryEfficiency() {
659 ✗ getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->resetRatedHeatReclaimRecoveryEfficiency();
660 ✗ }
661
662 16 bool CoilWaterHeatingDesuperheater::setRatedInletWaterTemperature(double ratedInletWaterTemperature) {
663
1/1
✓ Branch 3 taken 16 times.
16 return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->setRatedInletWaterTemperature(ratedInletWaterTemperature);
664 }
665
666 16 bool CoilWaterHeatingDesuperheater::setRatedOutdoorAirTemperature(double ratedOutdoorAirTemperature) {
667
1/1
✓ Branch 3 taken 16 times.
16 return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->setRatedOutdoorAirTemperature(ratedOutdoorAirTemperature);
668 }
669
670 16 bool CoilWaterHeatingDesuperheater::setMaximumInletWaterTemperatureforHeatReclaim(double maximumInletWaterTemperatureforHeatReclaim) {
671
1/1
✓ Branch 3 taken 16 times.
32 return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->setMaximumInletWaterTemperatureforHeatReclaim(
672 32 maximumInletWaterTemperatureforHeatReclaim);
673 }
674
675 5 bool CoilWaterHeatingDesuperheater::setHeatReclaimEfficiencyFunctionofTemperatureCurve(const CurveBiquadratic& curveBiquadratic) {
676
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->setHeatReclaimEfficiencyFunctionofTemperatureCurve(curveBiquadratic);
677 }
678
679 ✗ void CoilWaterHeatingDesuperheater::resetHeatReclaimEfficiencyFunctionofTemperatureCurve() {
680 ✗ getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->resetHeatReclaimEfficiencyFunctionofTemperatureCurve();
681 ✗ }
682
683 // bool CoilWaterHeatingDesuperheater::setTank(const HVACComponent& waterHeater) {
684 // return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->setTank(waterHeater);
685 // }
686
687 18 bool CoilWaterHeatingDesuperheater::setHeatingSource(const ModelObject& heatingSource) {
688
1/1
✓ Branch 3 taken 18 times.
18 return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->setHeatingSource(heatingSource);
689 }
690
691 4 void CoilWaterHeatingDesuperheater::resetHeatingSource() {
692
1/1
✓ Branch 3 taken 4 times.
4 getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->resetHeatingSource();
693 4 }
694
695 16 bool CoilWaterHeatingDesuperheater::setWaterFlowRate(double waterFlowRate) {
696
1/1
✓ Branch 3 taken 16 times.
16 return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->setWaterFlowRate(waterFlowRate);
697 }
698
699 16 bool CoilWaterHeatingDesuperheater::setWaterPumpPower(double waterPumpPower) {
700
1/1
✓ Branch 3 taken 16 times.
16 return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->setWaterPumpPower(waterPumpPower);
701 }
702
703 ✗ void CoilWaterHeatingDesuperheater::resetWaterPumpPower() {
704 ✗ getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->resetWaterPumpPower();
705 ✗ }
706
707 16 bool CoilWaterHeatingDesuperheater::setFractionofPumpHeattoWater(double fractionofPumpHeattoWater) {
708
1/1
✓ Branch 3 taken 16 times.
16 return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->setFractionofPumpHeattoWater(fractionofPumpHeattoWater);
709 }
710
711 ✗ void CoilWaterHeatingDesuperheater::resetFractionofPumpHeattoWater() {
712 ✗ getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->resetFractionofPumpHeattoWater();
713 ✗ }
714
715 16 bool CoilWaterHeatingDesuperheater::setOnCycleParasiticElectricLoad(double onCycleParasiticElectricLoad) {
716
1/1
✓ Branch 3 taken 16 times.
16 return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->setOnCycleParasiticElectricLoad(onCycleParasiticElectricLoad);
717 }
718
719 ✗ void CoilWaterHeatingDesuperheater::resetOnCycleParasiticElectricLoad() {
720 ✗ getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->resetOnCycleParasiticElectricLoad();
721 ✗ }
722
723 16 bool CoilWaterHeatingDesuperheater::setOffCycleParasiticElectricLoad(double offCycleParasiticElectricLoad) {
724
1/1
✓ Branch 3 taken 16 times.
16 return getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->setOffCycleParasiticElectricLoad(offCycleParasiticElectricLoad);
725 }
726
727 ✗ void CoilWaterHeatingDesuperheater::resetOffCycleParasiticElectricLoad() {
728 ✗ getImpl<detail::CoilWaterHeatingDesuperheater_Impl>()->resetOffCycleParasiticElectricLoad();
729 ✗ }
730
731 /// @cond
732 22 CoilWaterHeatingDesuperheater::CoilWaterHeatingDesuperheater(std::shared_ptr<detail::CoilWaterHeatingDesuperheater_Impl> impl)
733
1/1
✓ Branch 3 taken 22 times.
22 : StraightComponent(std::move(impl)) {}
734 /// @endcond
735
736 } // namespace model
737 } // namespace openstudio
738