GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 67.0% 437 / 0 / 652
Functions: 66.5% 113 / 0 / 170
Branches: 50.7% 300 / 0 / 592

src/model/CoilHeatingDXSingleSpeed.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 "CoilHeatingDXSingleSpeed.hpp"
7 #include "CoilHeatingDXSingleSpeed_Impl.hpp"
8 #include "Schedule.hpp"
9 #include "Schedule_Impl.hpp"
10 #include "Model.hpp"
11 #include "Model_Impl.hpp"
12 #include "Curve.hpp"
13 #include "Curve_Impl.hpp"
14 #include "CurveBiquadratic.hpp"
15 #include "CurveBiquadratic_Impl.hpp"
16 #include "CurveCubic.hpp"
17 #include "CurveCubic_Impl.hpp"
18 #include "CurveQuadratic.hpp"
19 #include "CurveQuadratic_Impl.hpp"
20 #include "AirLoopHVACUnitaryHeatPumpAirToAir.hpp"
21 #include "AirLoopHVACUnitaryHeatPumpAirToAir_Impl.hpp"
22 #include "AirLoopHVACOutdoorAirSystem.hpp"
23 #include "AirLoopHVACOutdoorAirSystem_Impl.hpp"
24 #include "AirLoopHVACUnitarySystem.hpp"
25 #include "AirLoopHVACUnitarySystem_Impl.hpp"
26 #include "AirLoopHVACUnitaryHeatCoolVAVChangeoverBypass.hpp"
27 #include "AirLoopHVACUnitaryHeatCoolVAVChangeoverBypass_Impl.hpp"
28 #include "ZoneHVACComponent.hpp"
29 #include "ZoneHVACComponent_Impl.hpp"
30 #include "ZoneHVACPackagedTerminalHeatPump.hpp"
31 #include "ZoneHVACPackagedTerminalHeatPump_Impl.hpp"
32 #include "Node.hpp"
33 #include "Node_Impl.hpp"
34 #include "AirLoopHVAC.hpp"
35 #include "AirLoopHVAC_Impl.hpp"
36 #include "AirflowNetworkEquivalentDuct.hpp"
37 #include "AirflowNetworkEquivalentDuct_Impl.hpp"
38 #include <utilities/idd/IddFactory.hxx>
39
40 #include <utilities/idd/OS_Coil_Heating_DX_SingleSpeed_FieldEnums.hxx>
41 #include <utilities/idd/IddEnums.hxx>
42 #include "../utilities/core/Assert.hpp"
43 #include "../utilities/data/DataEnums.hpp"
44
45 #include "../utilities/core/DeprecatedHelpers.hpp" // For deprecation
46
47 namespace openstudio {
48 namespace model {
49
50 namespace detail {
51
52 54 CoilHeatingDXSingleSpeed_Impl::CoilHeatingDXSingleSpeed_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle)
53 54 : StraightComponent_Impl(idfObject, model, keepHandle) {
54
4/6
✓ Branch 1 taken 54 times.
✓ Branch 4 taken 54 times.
✓ Branch 7 taken 54 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 54 times.
✗ Branch 13 not taken.
54 OS_ASSERT(idfObject.iddObject().type() == CoilHeatingDXSingleSpeed::iddObjectType());
55 54 }
56
57 9 CoilHeatingDXSingleSpeed_Impl::CoilHeatingDXSingleSpeed_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model,
58 9 bool keepHandle)
59 9 : StraightComponent_Impl(other, model, keepHandle) {
60
4/6
✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
✓ Branch 7 taken 9 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 9 times.
✗ Branch 13 not taken.
9 OS_ASSERT(other.iddObject().type() == CoilHeatingDXSingleSpeed::iddObjectType());
61 9 }
62
63 28 CoilHeatingDXSingleSpeed_Impl::CoilHeatingDXSingleSpeed_Impl(const CoilHeatingDXSingleSpeed_Impl& other, Model_Impl* model, bool keepHandle)
64 28 : StraightComponent_Impl(other, model, keepHandle) {}
65
66 ✗ const std::vector<std::string>& CoilHeatingDXSingleSpeed_Impl::outputVariableNames() const {
67 static const std::vector<std::string> result{"Heating Coil Heating Rate",
68 "Heating Coil Heating Energy",
69 "Heating Coil Electricity Rate",
70 "Heating Coil Electricity Energy",
71 "Heating Coil Defrost Electricity Rate",
72 "Heating Coil Defrost Electricity Energy",
73 "Heating Coil Crankcase Heater Electricity Rate",
74 "Heating Coil Crankcase Heater Electricity Energy",
75 ✗ "Heating Coil Runtime Fraction"};
76 ✗ return result;
77 ✗ }
78
79 90 IddObjectType CoilHeatingDXSingleSpeed_Impl::iddObjectType() const {
80 90 return CoilHeatingDXSingleSpeed::iddObjectType();
81 }
82
83 ✗ std::vector<ScheduleTypeKey> CoilHeatingDXSingleSpeed_Impl::getScheduleTypeKeys(const Schedule& schedule) const {
84 ✗ std::vector<ScheduleTypeKey> result;
85 ✗ UnsignedVector fieldIndices = getSourceIndices(schedule.handle());
86 ✗ UnsignedVector::const_iterator b(fieldIndices.begin());
87 ✗ UnsignedVector::const_iterator e(fieldIndices.end());
88 ✗ if (std::find(b, e, OS_Coil_Heating_DX_SingleSpeedFields::AvailabilityScheduleName) != e) {
89 ✗ result.push_back(ScheduleTypeKey("CoilHeatingDXSingleSpeed", "Availability"));
90 }
91 ✗ return result;
92 ✗ }
93
94 1 boost::optional<double> CoilHeatingDXSingleSpeed_Impl::ratedTotalHeatingCapacity() const {
95 1 return getDouble(OS_Coil_Heating_DX_SingleSpeedFields::RatedTotalHeatingCapacity, true);
96 }
97
98 22 bool CoilHeatingDXSingleSpeed_Impl::isRatedTotalHeatingCapacityAutosized() const {
99 22 bool result = false;
100
1/1
✓ Branch 1 taken 22 times.
22 boost::optional<std::string> value = getString(OS_Coil_Heating_DX_SingleSpeedFields::RatedTotalHeatingCapacity, true);
101
1/2
✓ Branch 0 taken 22 times.
✗ Branch 1 not taken.
22 if (value) {
102
3/3
✓ Branch 1 taken 22 times.
✓ Branch 4 taken 22 times.
✓ Branch 7 taken 22 times.
44 result = openstudio::istringEqual(value.get(), "Autosize");
103 }
104 22 return result;
105 22 }
106
107 22 double CoilHeatingDXSingleSpeed_Impl::ratedCOP() const {
108
1/1
✓ Branch 1 taken 22 times.
22 boost::optional<double> value = getDouble(OS_Coil_Heating_DX_SingleSpeedFields::RatedCOP, true);
109
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 22 times.
✗ Branch 4 not taken.
22 OS_ASSERT(value);
110
1/1
✓ Branch 1 taken 22 times.
44 return value.get();
111 }
112
113 1 boost::optional<double> CoilHeatingDXSingleSpeed_Impl::ratedAirFlowRate() const {
114 1 return getDouble(OS_Coil_Heating_DX_SingleSpeedFields::RatedAirFlowRate, true);
115 }
116
117 22 bool CoilHeatingDXSingleSpeed_Impl::isRatedAirFlowRateAutosized() const {
118 22 bool result = false;
119
1/1
✓ Branch 1 taken 22 times.
22 boost::optional<std::string> value = getString(OS_Coil_Heating_DX_SingleSpeedFields::RatedAirFlowRate, true);
120
1/2
✓ Branch 0 taken 22 times.
✗ Branch 1 not taken.
22 if (value) {
121
3/3
✓ Branch 1 taken 22 times.
✓ Branch 4 taken 22 times.
✓ Branch 7 taken 22 times.
44 result = openstudio::istringEqual(value.get(), "Autosize");
122 }
123 22 return result;
124 22 }
125
126 22 double CoilHeatingDXSingleSpeed_Impl::minimumOutdoorDryBulbTemperatureforCompressorOperation() const {
127
1/1
✓ Branch 1 taken 22 times.
22 boost::optional<double> value = getDouble(OS_Coil_Heating_DX_SingleSpeedFields::MinimumOutdoorDryBulbTemperatureforCompressorOperation, true);
128
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 22 times.
✗ Branch 4 not taken.
22 OS_ASSERT(value);
129
1/1
✓ Branch 1 taken 22 times.
44 return value.get();
130 }
131
132 ✗ bool CoilHeatingDXSingleSpeed_Impl::isMinimumOutdoorDryBulbTemperatureforCompressorOperationDefaulted() const {
133 ✗ return isEmpty(OS_Coil_Heating_DX_SingleSpeedFields::MinimumOutdoorDryBulbTemperatureforCompressorOperation);
134 }
135
136 22 double CoilHeatingDXSingleSpeed_Impl::maximumOutdoorDryBulbTemperatureforDefrostOperation() const {
137
1/1
✓ Branch 1 taken 22 times.
22 boost::optional<double> value = getDouble(OS_Coil_Heating_DX_SingleSpeedFields::MaximumOutdoorDryBulbTemperatureforDefrostOperation, true);
138
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 22 times.
✗ Branch 4 not taken.
22 OS_ASSERT(value);
139
1/1
✓ Branch 1 taken 22 times.
44 return value.get();
140 }
141
142 ✗ bool CoilHeatingDXSingleSpeed_Impl::isMaximumOutdoorDryBulbTemperatureforDefrostOperationDefaulted() const {
143 ✗ return isEmpty(OS_Coil_Heating_DX_SingleSpeedFields::MaximumOutdoorDryBulbTemperatureforDefrostOperation);
144 }
145
146 22 double CoilHeatingDXSingleSpeed_Impl::crankcaseHeaterCapacity() const {
147
1/1
✓ Branch 1 taken 22 times.
22 boost::optional<double> value = getDouble(OS_Coil_Heating_DX_SingleSpeedFields::CrankcaseHeaterCapacity, true);
148
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 22 times.
✗ Branch 4 not taken.
22 OS_ASSERT(value);
149
1/1
✓ Branch 1 taken 22 times.
44 return value.get();
150 }
151
152 ✗ bool CoilHeatingDXSingleSpeed_Impl::isCrankcaseHeaterCapacityDefaulted() const {
153 ✗ return isEmpty(OS_Coil_Heating_DX_SingleSpeedFields::CrankcaseHeaterCapacity);
154 }
155
156 22 double CoilHeatingDXSingleSpeed_Impl::maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation() const {
157 boost::optional<double> value =
158
1/1
✓ Branch 1 taken 22 times.
22 getDouble(OS_Coil_Heating_DX_SingleSpeedFields::MaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation, true);
159
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 22 times.
✗ Branch 4 not taken.
22 OS_ASSERT(value);
160
1/1
✓ Branch 1 taken 22 times.
44 return value.get();
161 }
162
163 ✗ bool CoilHeatingDXSingleSpeed_Impl::isMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperationDefaulted() const {
164 ✗ return isEmpty(OS_Coil_Heating_DX_SingleSpeedFields::MaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation);
165 }
166
167 22 std::string CoilHeatingDXSingleSpeed_Impl::defrostStrategy() const {
168
1/1
✓ Branch 1 taken 22 times.
22 boost::optional<std::string> value = getString(OS_Coil_Heating_DX_SingleSpeedFields::DefrostStrategy, true);
169
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 22 times.
✗ Branch 4 not taken.
22 OS_ASSERT(value);
170
2/2
✓ Branch 1 taken 22 times.
✓ Branch 4 taken 22 times.
44 return value.get();
171 22 }
172
173 ✗ bool CoilHeatingDXSingleSpeed_Impl::isDefrostStrategyDefaulted() const {
174 ✗ return isEmpty(OS_Coil_Heating_DX_SingleSpeedFields::DefrostStrategy);
175 }
176
177 22 std::string CoilHeatingDXSingleSpeed_Impl::defrostControl() const {
178
1/1
✓ Branch 1 taken 22 times.
22 boost::optional<std::string> value = getString(OS_Coil_Heating_DX_SingleSpeedFields::DefrostControl, true);
179
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 22 times.
✗ Branch 4 not taken.
22 OS_ASSERT(value);
180
2/2
✓ Branch 1 taken 22 times.
✓ Branch 4 taken 22 times.
44 return value.get();
181 22 }
182
183 ✗ bool CoilHeatingDXSingleSpeed_Impl::isDefrostControlDefaulted() const {
184 ✗ return isEmpty(OS_Coil_Heating_DX_SingleSpeedFields::DefrostControl);
185 }
186
187 22 double CoilHeatingDXSingleSpeed_Impl::defrostTimePeriodFraction() const {
188
1/1
✓ Branch 1 taken 22 times.
22 boost::optional<double> value = getDouble(OS_Coil_Heating_DX_SingleSpeedFields::DefrostTimePeriodFraction, true);
189
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 22 times.
✗ Branch 4 not taken.
22 OS_ASSERT(value);
190
1/1
✓ Branch 1 taken 22 times.
44 return value.get();
191 }
192
193 ✗ bool CoilHeatingDXSingleSpeed_Impl::isDefrostTimePeriodFractionDefaulted() const {
194 ✗ return isEmpty(OS_Coil_Heating_DX_SingleSpeedFields::DefrostTimePeriodFraction);
195 }
196
197 22 boost::optional<double> CoilHeatingDXSingleSpeed_Impl::resistiveDefrostHeaterCapacity() const {
198 22 return getDouble(OS_Coil_Heating_DX_SingleSpeedFields::ResistiveDefrostHeaterCapacity, true);
199 }
200
201 ✗ bool CoilHeatingDXSingleSpeed_Impl::isResistiveDefrostHeaterCapacityDefaulted() const {
202 ✗ return isEmpty(OS_Coil_Heating_DX_SingleSpeedFields::ResistiveDefrostHeaterCapacity);
203 }
204
205 22 bool CoilHeatingDXSingleSpeed_Impl::isResistiveDefrostHeaterCapacityAutosized() const {
206 22 bool result = false;
207
1/1
✓ Branch 1 taken 22 times.
22 boost::optional<std::string> value = getString(OS_Coil_Heating_DX_SingleSpeedFields::ResistiveDefrostHeaterCapacity, true);
208
1/2
✓ Branch 0 taken 22 times.
✗ Branch 1 not taken.
22 if (value) {
209
3/3
✓ Branch 1 taken 22 times.
✓ Branch 4 taken 22 times.
✓ Branch 7 taken 22 times.
44 result = openstudio::istringEqual(value.get(), "Autosize");
210 }
211 22 return result;
212 22 }
213
214 1 bool CoilHeatingDXSingleSpeed_Impl::setRatedTotalHeatingCapacity(boost::optional<double> ratedTotalHeatingCapacity) {
215 1 bool result = false;
216
1/2
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
1 if (ratedTotalHeatingCapacity) {
217 1 result = setDouble(OS_Coil_Heating_DX_SingleSpeedFields::RatedTotalHeatingCapacity, ratedTotalHeatingCapacity.get());
218 } else {
219 ✗ result = setString(OS_Coil_Heating_DX_SingleSpeedFields::RatedTotalHeatingCapacity, "");
220 }
221 1 return result;
222 }
223
224 45 void CoilHeatingDXSingleSpeed_Impl::autosizeRatedTotalHeatingCapacity() {
225
2/2
✓ Branch 1 taken 45 times.
✓ Branch 4 taken 45 times.
90 bool result = setString(OS_Coil_Heating_DX_SingleSpeedFields::RatedTotalHeatingCapacity, "Autosize");
226
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 45 times.
45 OS_ASSERT(result);
227 45 }
228
229 46 bool CoilHeatingDXSingleSpeed_Impl::setRatedCOP(double ratedCOP) {
230 46 bool result = setDouble(OS_Coil_Heating_DX_SingleSpeedFields::RatedCOP, ratedCOP);
231 46 return result;
232 }
233
234 1 bool CoilHeatingDXSingleSpeed_Impl::setRatedAirFlowRate(boost::optional<double> ratedAirFlowRate) {
235 1 bool result = false;
236
1/2
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
1 if (ratedAirFlowRate) {
237 1 result = setDouble(OS_Coil_Heating_DX_SingleSpeedFields::RatedAirFlowRate, ratedAirFlowRate.get());
238 } else {
239 ✗ result = setString(OS_Coil_Heating_DX_SingleSpeedFields::RatedAirFlowRate, "");
240 }
241 1 return result;
242 }
243
244 45 void CoilHeatingDXSingleSpeed_Impl::autosizeRatedAirFlowRate() {
245
2/2
✓ Branch 1 taken 45 times.
✓ Branch 4 taken 45 times.
90 bool result = setString(OS_Coil_Heating_DX_SingleSpeedFields::RatedAirFlowRate, "Autosize");
246
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 45 times.
45 OS_ASSERT(result);
247 45 }
248
249 1 bool CoilHeatingDXSingleSpeed_Impl::setMinimumOutdoorDryBulbTemperatureforCompressorOperation(
250 double minimumOutdoorDryBulbTemperatureforCompressorOperation) {
251 1 bool result = setDouble(OS_Coil_Heating_DX_SingleSpeedFields::MinimumOutdoorDryBulbTemperatureforCompressorOperation,
252 minimumOutdoorDryBulbTemperatureforCompressorOperation);
253 1 return result;
254 }
255
256 ✗ void CoilHeatingDXSingleSpeed_Impl::resetMinimumOutdoorDryBulbTemperatureforCompressorOperation() {
257 ✗ bool result = setString(OS_Coil_Heating_DX_SingleSpeedFields::MinimumOutdoorDryBulbTemperatureforCompressorOperation, "");
258 ✗ OS_ASSERT(result);
259 ✗ }
260
261 1 bool CoilHeatingDXSingleSpeed_Impl::setMaximumOutdoorDryBulbTemperatureforDefrostOperation(
262 double maximumOutdoorDryBulbTemperatureforDefrostOperation) {
263 1 bool result = setDouble(OS_Coil_Heating_DX_SingleSpeedFields::MaximumOutdoorDryBulbTemperatureforDefrostOperation,
264 maximumOutdoorDryBulbTemperatureforDefrostOperation);
265 1 return result;
266 }
267
268 ✗ void CoilHeatingDXSingleSpeed_Impl::resetMaximumOutdoorDryBulbTemperatureforDefrostOperation() {
269 ✗ bool result = setString(OS_Coil_Heating_DX_SingleSpeedFields::MaximumOutdoorDryBulbTemperatureforDefrostOperation, "");
270 ✗ OS_ASSERT(result);
271 ✗ }
272
273 1 bool CoilHeatingDXSingleSpeed_Impl::setCrankcaseHeaterCapacity(double crankcaseHeaterCapacity) {
274 1 bool result = setDouble(OS_Coil_Heating_DX_SingleSpeedFields::CrankcaseHeaterCapacity, crankcaseHeaterCapacity);
275 1 return result;
276 }
277
278 ✗ void CoilHeatingDXSingleSpeed_Impl::resetCrankcaseHeaterCapacity() {
279 ✗ bool result = setString(OS_Coil_Heating_DX_SingleSpeedFields::CrankcaseHeaterCapacity, "");
280 ✗ OS_ASSERT(result);
281 ✗ }
282
283 1 bool CoilHeatingDXSingleSpeed_Impl::setMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation(
284 double maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation) {
285 1 bool result = setDouble(OS_Coil_Heating_DX_SingleSpeedFields::MaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation,
286 maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation);
287 1 return result;
288 }
289
290 ✗ void CoilHeatingDXSingleSpeed_Impl::resetMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation() {
291 ✗ bool result = setString(OS_Coil_Heating_DX_SingleSpeedFields::MaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation, "");
292 ✗ OS_ASSERT(result);
293 ✗ }
294
295 46 bool CoilHeatingDXSingleSpeed_Impl::setDefrostStrategy(const std::string& defrostStrategy) {
296 46 bool result = setString(OS_Coil_Heating_DX_SingleSpeedFields::DefrostStrategy, defrostStrategy);
297 46 return result;
298 }
299
300 ✗ void CoilHeatingDXSingleSpeed_Impl::resetDefrostStrategy() {
301 ✗ bool result = setString(OS_Coil_Heating_DX_SingleSpeedFields::DefrostStrategy, "");
302 ✗ OS_ASSERT(result);
303 ✗ }
304
305 46 bool CoilHeatingDXSingleSpeed_Impl::setDefrostControl(const std::string& defrostControl) {
306 46 bool result = setString(OS_Coil_Heating_DX_SingleSpeedFields::DefrostControl, defrostControl);
307 46 return result;
308 }
309
310 ✗ void CoilHeatingDXSingleSpeed_Impl::resetDefrostControl() {
311 ✗ bool result = setString(OS_Coil_Heating_DX_SingleSpeedFields::DefrostControl, "");
312 ✗ OS_ASSERT(result);
313 ✗ }
314
315 46 bool CoilHeatingDXSingleSpeed_Impl::setDefrostTimePeriodFraction(double defrostTimePeriodFraction) {
316 46 bool result = setDouble(OS_Coil_Heating_DX_SingleSpeedFields::DefrostTimePeriodFraction, defrostTimePeriodFraction);
317 46 return result;
318 }
319
320 ✗ void CoilHeatingDXSingleSpeed_Impl::resetDefrostTimePeriodFraction() {
321 ✗ bool result = setString(OS_Coil_Heating_DX_SingleSpeedFields::DefrostTimePeriodFraction, "");
322 ✗ OS_ASSERT(result);
323 ✗ }
324
325 46 bool CoilHeatingDXSingleSpeed_Impl::setResistiveDefrostHeaterCapacity(boost::optional<double> resistiveDefrostHeaterCapacity) {
326 46 bool result = false;
327
1/2
✓ Branch 0 taken 46 times.
✗ Branch 1 not taken.
46 if (resistiveDefrostHeaterCapacity) {
328 46 result = setDouble(OS_Coil_Heating_DX_SingleSpeedFields::ResistiveDefrostHeaterCapacity, resistiveDefrostHeaterCapacity.get());
329 } else {
330 ✗ result = setString(OS_Coil_Heating_DX_SingleSpeedFields::ResistiveDefrostHeaterCapacity, "");
331 }
332 46 return result;
333 }
334
335 ✗ void CoilHeatingDXSingleSpeed_Impl::resetResistiveDefrostHeaterCapacity() {
336 ✗ bool result = setString(OS_Coil_Heating_DX_SingleSpeedFields::ResistiveDefrostHeaterCapacity, "");
337 ✗ OS_ASSERT(result);
338 ✗ }
339
340 ✗ void CoilHeatingDXSingleSpeed_Impl::autosizeResistiveDefrostHeaterCapacity() {
341 ✗ bool result = setString(OS_Coil_Heating_DX_SingleSpeedFields::ResistiveDefrostHeaterCapacity, "Autosize");
342 ✗ OS_ASSERT(result);
343 ✗ }
344
345 109 unsigned CoilHeatingDXSingleSpeed_Impl::inletPort() const {
346 109 return OS_Coil_Heating_DX_SingleSpeedFields::AirInletNodeName;
347 }
348
349 62 unsigned CoilHeatingDXSingleSpeed_Impl::outletPort() const {
350 62 return OS_Coil_Heating_DX_SingleSpeedFields::AirOutletNodeName;
351 }
352
353 23 Schedule CoilHeatingDXSingleSpeed_Impl::availabilitySchedule() const {
354 boost::optional<Schedule> value =
355
2/2
✓ Branch 1 taken 23 times.
✓ Branch 4 taken 23 times.
23 getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_Coil_Heating_DX_SingleSpeedFields::AvailabilityScheduleName);
356
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 23 times.
23 if (!value) {
357 // it is an error if we get here, however we don't want to crash
358 // so we hook up to global always on schedule
359 ✗ LOG(Error, "Required availability schedule not set, using 'Always On' schedule");
360 ✗ value = this->model().alwaysOnDiscreteSchedule();
361 ✗ OS_ASSERT(value);
362 ✗ const_cast<CoilHeatingDXSingleSpeed_Impl*>(this)->setAvailabilitySchedule(*value);
363 ✗ value = getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_Coil_Heating_DX_SingleSpeedFields::AvailabilityScheduleName);
364 }
365
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 23 times.
✗ Branch 4 not taken.
23 OS_ASSERT(value);
366
2/2
✓ Branch 1 taken 23 times.
✓ Branch 4 taken 23 times.
46 return value.get();
367 23 }
368
369 46 bool CoilHeatingDXSingleSpeed_Impl::setAvailabilitySchedule(Schedule& schedule) {
370
3/3
✓ Branch 1 taken 46 times.
✓ Branch 4 taken 46 times.
✓ Branch 7 taken 46 times.
184 bool result = setSchedule(OS_Coil_Heating_DX_SingleSpeedFields::AvailabilityScheduleName, "CoilHeatingDXSingleSpeed", "Availability", schedule);
371 46 return result;
372 }
373
374 // Curves
375
376 44 Curve CoilHeatingDXSingleSpeed_Impl::totalHeatingCapacityFunctionofTemperatureCurve() const {
377 44 boost::optional<Curve> curve;
378
379
2/2
✓ Branch 1 taken 44 times.
✓ Branch 4 taken 44 times.
88 curve = getObject<ModelObject>().getModelObjectTarget<Curve>(
380 44 OS_Coil_Heating_DX_SingleSpeedFields::TotalHeatingCapacityFunctionofTemperatureCurveName);
381
382
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 44 times.
✗ Branch 4 not taken.
44 OS_ASSERT(curve);
383
384
2/2
✓ Branch 1 taken 44 times.
✓ Branch 4 taken 44 times.
88 return curve.get();
385 44 }
386
387 44 Curve CoilHeatingDXSingleSpeed_Impl::totalHeatingCapacityFunctionofFlowFractionCurve() const {
388 44 boost::optional<Curve> curve;
389
390
2/2
✓ Branch 1 taken 44 times.
✓ Branch 4 taken 44 times.
88 curve = getObject<ModelObject>().getModelObjectTarget<Curve>(
391 44 OS_Coil_Heating_DX_SingleSpeedFields::TotalHeatingCapacityFunctionofFlowFractionCurveName);
392
393
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 44 times.
✗ Branch 4 not taken.
44 OS_ASSERT(curve);
394
395
2/2
✓ Branch 1 taken 44 times.
✓ Branch 4 taken 44 times.
88 return curve.get();
396 44 }
397
398 44 Curve CoilHeatingDXSingleSpeed_Impl::energyInputRatioFunctionofTemperatureCurve() const {
399 44 boost::optional<Curve> curve;
400
401 curve =
402
2/2
✓ Branch 1 taken 44 times.
✓ Branch 4 taken 44 times.
44 getObject<ModelObject>().getModelObjectTarget<Curve>(OS_Coil_Heating_DX_SingleSpeedFields::EnergyInputRatioFunctionofTemperatureCurveName);
403
404
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 44 times.
✗ Branch 4 not taken.
44 OS_ASSERT(curve);
405
406
2/2
✓ Branch 1 taken 44 times.
✓ Branch 4 taken 44 times.
88 return curve.get();
407 44 }
408
409 44 Curve CoilHeatingDXSingleSpeed_Impl::energyInputRatioFunctionofFlowFractionCurve() const {
410 44 boost::optional<Curve> curve;
411
412 curve =
413
2/2
✓ Branch 1 taken 44 times.
✓ Branch 4 taken 44 times.
44 getObject<ModelObject>().getModelObjectTarget<Curve>(OS_Coil_Heating_DX_SingleSpeedFields::EnergyInputRatioFunctionofFlowFractionCurveName);
414
415
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 44 times.
✗ Branch 4 not taken.
44 OS_ASSERT(curve);
416
417
2/2
✓ Branch 1 taken 44 times.
✓ Branch 4 taken 44 times.
88 return curve.get();
418 44 }
419
420 44 Curve CoilHeatingDXSingleSpeed_Impl::partLoadFractionCorrelationCurve() const {
421 44 boost::optional<Curve> curve;
422
423
2/2
✓ Branch 1 taken 44 times.
✓ Branch 4 taken 44 times.
44 curve = getObject<ModelObject>().getModelObjectTarget<Curve>(OS_Coil_Heating_DX_SingleSpeedFields::PartLoadFractionCorrelationCurveName);
424
425
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 44 times.
✗ Branch 4 not taken.
44 OS_ASSERT(curve);
426
427
2/2
✓ Branch 1 taken 44 times.
✓ Branch 4 taken 44 times.
88 return curve.get();
428 44 }
429
430 22 boost::optional<Curve> CoilHeatingDXSingleSpeed_Impl::defrostEnergyInputRatioFunctionofTemperatureCurve() const {
431 22 boost::optional<Curve> curve;
432
433
2/2
✓ Branch 1 taken 22 times.
✓ Branch 4 taken 22 times.
44 curve = getObject<ModelObject>().getModelObjectTarget<Curve>(
434 22 OS_Coil_Heating_DX_SingleSpeedFields::DefrostEnergyInputRatioFunctionofTemperatureCurveName);
435
436 22 return curve;
437 ✗ }
438
439 // A5 , \field Total Heating Capacity Function of Temperature Curve Name
440 45 bool CoilHeatingDXSingleSpeed_Impl::setTotalHeatingCapacityFunctionofTemperatureCurve(const Curve& curve) {
441
2/2
✓ Branch 1 taken 45 times.
✓ Branch 4 taken 45 times.
45 return setPointer(OS_Coil_Heating_DX_SingleSpeedFields::TotalHeatingCapacityFunctionofTemperatureCurveName, curve.handle());
442 }
443
444 // A6 , \field Total Heating Capacity Function of Flow Fraction Curve Name
445 45 bool CoilHeatingDXSingleSpeed_Impl::setTotalHeatingCapacityFunctionofFlowFractionCurve(const Curve& curve) {
446
2/2
✓ Branch 1 taken 45 times.
✓ Branch 4 taken 45 times.
45 return setPointer(OS_Coil_Heating_DX_SingleSpeedFields::TotalHeatingCapacityFunctionofFlowFractionCurveName, curve.handle());
447 }
448
449 // A7 , \field Energy Input Ratio Function of Temperature Curve Name
450 45 bool CoilHeatingDXSingleSpeed_Impl::setEnergyInputRatioFunctionofTemperatureCurve(const Curve& curve) {
451
2/2
✓ Branch 1 taken 45 times.
✓ Branch 4 taken 45 times.
45 return setPointer(OS_Coil_Heating_DX_SingleSpeedFields::EnergyInputRatioFunctionofTemperatureCurveName, curve.handle());
452 }
453
454 // A8 , \field Energy Input Ratio Function of Flow Fraction Curve Name
455 45 bool CoilHeatingDXSingleSpeed_Impl::setEnergyInputRatioFunctionofFlowFractionCurve(const Curve& curve) {
456
2/2
✓ Branch 1 taken 45 times.
✓ Branch 4 taken 45 times.
45 return setPointer(OS_Coil_Heating_DX_SingleSpeedFields::EnergyInputRatioFunctionofFlowFractionCurveName, curve.handle());
457 }
458
459 // A9 , \field Part Load Fraction Correlation Curve Name
460 45 bool CoilHeatingDXSingleSpeed_Impl::setPartLoadFractionCorrelationCurve(const Curve& curve) {
461
2/2
✓ Branch 1 taken 45 times.
✓ Branch 4 taken 45 times.
45 return setPointer(OS_Coil_Heating_DX_SingleSpeedFields::PartLoadFractionCorrelationCurveName, curve.handle());
462 }
463
464 // A10, \field Defrost Energy Input Ratio Function of Temperature Curve Name
465 1 bool CoilHeatingDXSingleSpeed_Impl::setDefrostEnergyInputRatioFunctionofTemperatureCurve(const boost::optional<Curve> curve) {
466 1 bool accepted = false;
467
468 //first, check if a curve was actually passed in
469
1/2
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
1 if (curve) {
470 //then, check if the curve is of the appropriate type. if not, accepted stays false
471
3/3
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
1 accepted = setPointer(OS_Coil_Heating_DX_SingleSpeedFields::DefrostEnergyInputRatioFunctionofTemperatureCurveName, curve->handle());
472 }
473 //if no curve was passed in, then set it to "" (this is to accomodate the reset method)
474 else {
475 ✗ setString(OS_Coil_Heating_DX_SingleSpeedFields::DefrostEnergyInputRatioFunctionofTemperatureCurveName, "");
476 ✗ accepted = true;
477 }
478
479 1 return accepted;
480 }
481
482 43 boost::optional<Curve> CoilHeatingDXSingleSpeed_Impl::crankcaseHeaterCapacityFunctionofTemperatureCurve() const {
483
1/1
✓ Branch 1 taken 43 times.
86 return getObject<ModelObject>().getModelObjectTarget<Curve>(
484
1/1
✓ Branch 1 taken 43 times.
86 OS_Coil_Heating_DX_SingleSpeedFields::CrankcaseHeaterCapacityFunctionofTemperatureCurveName);
485 }
486
487 1 bool CoilHeatingDXSingleSpeed_Impl::setCrankcaseHeaterCapacityFunctionofTemperatureCurve(const Curve& curve) {
488
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 const bool result = setPointer(OS_Coil_Heating_DX_SingleSpeedFields::CrankcaseHeaterCapacityFunctionofTemperatureCurveName, curve.handle());
489 1 return result;
490 }
491
492 ✗ void CoilHeatingDXSingleSpeed_Impl::resetCrankcaseHeaterCapacityFunctionofTemperatureCurve() {
493 ✗ const bool result = setString(OS_Coil_Heating_DX_SingleSpeedFields::CrankcaseHeaterCapacityFunctionofTemperatureCurveName, "");
494 ✗ OS_ASSERT(result);
495 ✗ }
496
497 3 ModelObject CoilHeatingDXSingleSpeed_Impl::clone(Model model) const {
498
3/3
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
3 auto newCoil = StraightComponent_Impl::clone(model).cast<CoilHeatingDXSingleSpeed>();
499
500 6 return std::move(newCoil);
501 3 }
502
503 20 boost::optional<HVACComponent> CoilHeatingDXSingleSpeed_Impl::containingHVACComponent() const {
504 // AirLoopHVACUnitarySystem
505
2/2
✓ Branch 1 taken 20 times.
✓ Branch 4 taken 20 times.
20 std::vector<AirLoopHVACUnitarySystem> airLoopHVACUnitarySystems = this->model().getConcreteModelObjects<AirLoopHVACUnitarySystem>();
506
507
2/2
✓ Branch 5 taken 19 times.
✓ Branch 6 taken 1 time.
20 for (const auto& airLoopHVACUnitarySystem : airLoopHVACUnitarySystems) {
508
2/3
✓ Branch 1 taken 19 times.
✓ Branch 3 taken 19 times.
✗ Branch 4 not taken.
38 if (boost::optional<HVACComponent> heatingCoil = airLoopHVACUnitarySystem.heatingCoil()) {
509
5/6
✓ Branch 1 taken 19 times.
✓ Branch 4 taken 19 times.
✓ Branch 7 taken 19 times.
✓ Branch 10 taken 19 times.
✓ Branch 12 taken 19 times.
✗ Branch 13 not taken.
19 if (heatingCoil->handle() == this->handle()) {
510
1/1
✓ Branch 1 taken 19 times.
19 return airLoopHVACUnitarySystem;
511 }
512 19 }
513 }
514
515 // AirLoopHVACUnitaryHeatCoolVAVChangeoverBypass
516 std::vector<AirLoopHVACUnitaryHeatCoolVAVChangeoverBypass> bypassSystems =
517
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 this->model().getConcreteModelObjects<AirLoopHVACUnitaryHeatCoolVAVChangeoverBypass>();
518
519
1/2
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
1 for (const auto& bypassSystem : bypassSystems) {
520 ✗ if (boost::optional<HVACComponent> heatingCoil = bypassSystem.heatingCoil()) {
521 ✗ if (heatingCoil->handle() == this->handle()) {
522 ✗ return bypassSystem;
523 }
524 ✗ }
525 }
526
527 // AirLoopHVACUnitaryHeatPumpAirToAir
528
529 1 std::vector<AirLoopHVACUnitaryHeatPumpAirToAir> airLoopHVACUnitaryHeatPumpAirToAirs;
530
531
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 airLoopHVACUnitaryHeatPumpAirToAirs = this->model().getConcreteModelObjects<AirLoopHVACUnitaryHeatPumpAirToAir>();
532
533
1/2
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
1 for (const auto& airLoopHVACUnitaryHeatPumpAirToAir : airLoopHVACUnitaryHeatPumpAirToAirs) {
534 ✗ if (boost::optional<HVACComponent> coil = airLoopHVACUnitaryHeatPumpAirToAir.heatingCoil()) {
535 ✗ if (coil->handle() == this->handle()) {
536 ✗ return airLoopHVACUnitaryHeatPumpAirToAir;
537 }
538 ✗ }
539 }
540
541 1 return boost::none;
542 20 }
543
544 1 boost::optional<ZoneHVACComponent> CoilHeatingDXSingleSpeed_Impl::containingZoneHVACComponent() const {
545 // ZoneHVACPackagedTerminalHeatPump
546
547 1 std::vector<ZoneHVACPackagedTerminalHeatPump> zoneHVACPackagedTerminalHeatPumps;
548
549
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 zoneHVACPackagedTerminalHeatPumps = this->model().getConcreteModelObjects<ZoneHVACPackagedTerminalHeatPump>();
550
551
1/2
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
1 for (const auto& zoneHVACPackagedTerminalHeatPump : zoneHVACPackagedTerminalHeatPumps) {
552 ✗ if (boost::optional<HVACComponent> coil = zoneHVACPackagedTerminalHeatPump.heatingCoil()) {
553 ✗ if (coil->handle() == this->handle()) {
554 ✗ return zoneHVACPackagedTerminalHeatPump;
555 }
556 ✗ }
557 }
558
559 1 return boost::none;
560 1 }
561
562 21 std::vector<ModelObject> CoilHeatingDXSingleSpeed_Impl::children() const {
563 21 std::vector<ModelObject> result;
564
565
2/2
✓ Branch 1 taken 21 times.
✓ Branch 4 taken 21 times.
21 result.push_back(totalHeatingCapacityFunctionofTemperatureCurve());
566
2/2
✓ Branch 1 taken 21 times.
✓ Branch 4 taken 21 times.
21 result.push_back(totalHeatingCapacityFunctionofFlowFractionCurve());
567
2/2
✓ Branch 1 taken 21 times.
✓ Branch 4 taken 21 times.
21 result.push_back(energyInputRatioFunctionofTemperatureCurve());
568
2/2
✓ Branch 1 taken 21 times.
✓ Branch 4 taken 21 times.
21 result.push_back(energyInputRatioFunctionofFlowFractionCurve());
569
2/2
✓ Branch 1 taken 21 times.
✓ Branch 4 taken 21 times.
21 result.push_back(partLoadFractionCorrelationCurve());
570
3/3
✓ Branch 1 taken 21 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 20 times.
42 if (auto c_ = crankcaseHeaterCapacityFunctionofTemperatureCurve()) {
571
2/2
✓ Branch 1 taken 1 time.
✓ Branch 5 taken 1 time.
1 result.emplace_back(std::move(*c_));
572 21 }
573
574 std::vector<AirflowNetworkEquivalentDuct> myAFNItems =
575
3/3
✓ Branch 1 taken 21 times.
✓ Branch 4 taken 21 times.
✓ Branch 7 taken 21 times.
21 getObject<ModelObject>().getModelObjectSources<AirflowNetworkEquivalentDuct>(AirflowNetworkEquivalentDuct::iddObjectType());
576
1/1
✓ Branch 5 taken 21 times.
21 result.insert(result.end(), myAFNItems.begin(), myAFNItems.end());
577
578 42 return result;
579 21 }
580
581 ✗ boost::optional<ModelObject> CoilHeatingDXSingleSpeed_Impl::availabilityScheduleAsModelObject() const {
582 ✗ OptionalModelObject result = availabilitySchedule();
583 ✗ return result;
584 }
585
586 ✗ bool CoilHeatingDXSingleSpeed_Impl::setAvailabilityScheduleAsModelObject(const boost::optional<ModelObject>& modelObject) {
587 ✗ if (modelObject) {
588 ✗ OptionalSchedule intermediate = modelObject->optionalCast<Schedule>();
589 ✗ if (intermediate) {
590 ✗ Schedule schedule(*intermediate);
591 ✗ return setAvailabilitySchedule(schedule);
592 ✗ }
593 ✗ }
594 ✗ return false;
595 }
596
597 9 bool CoilHeatingDXSingleSpeed_Impl::addToNode(Node& node) {
598
3/3
✓ Branch 1 taken 9 times.
✓ Branch 3 taken 6 times.
✓ Branch 4 taken 3 times.
18 if (boost::optional<AirLoopHVAC> airLoop = node.airLoopHVAC()) {
599
5/5
✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
✓ Branch 7 taken 6 times.
✓ Branch 11 taken 5 times.
✓ Branch 12 taken 1 time.
6 if (!airLoop->demandComponent(node.handle())) {
600
1/1
✓ Branch 1 taken 5 times.
5 return StraightComponent_Impl::addToNode(node);
601 }
602 9 }
603
604
3/3
✓ Branch 1 taken 4 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 3 times.
8 if (auto oa = node.airLoopHVACOutdoorAirSystem()) {
605
1/1
✓ Branch 1 taken 1 time.
1 return StraightComponent_Impl::addToNode(node);
606 4 }
607
608 3 return false;
609 }
610
611 24 double CoilHeatingDXSingleSpeed_Impl::ratedSupplyFanPowerPerVolumeFlowRate2017() const {
612
1/1
✓ Branch 1 taken 24 times.
24 boost::optional<double> value = getDouble(OS_Coil_Heating_DX_SingleSpeedFields::RatedSupplyFanPowerPerVolumeFlowRate2017, true);
613
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 24 times.
✗ Branch 4 not taken.
24 OS_ASSERT(value);
614
1/1
✓ Branch 1 taken 24 times.
48 return value.get();
615 }
616
617 47 bool CoilHeatingDXSingleSpeed_Impl::setRatedSupplyFanPowerPerVolumeFlowRate2017(double ratedSupplyFanPowerPerVolumeFlowRate2017) {
618 bool result =
619 47 setDouble(OS_Coil_Heating_DX_SingleSpeedFields::RatedSupplyFanPowerPerVolumeFlowRate2017, ratedSupplyFanPowerPerVolumeFlowRate2017);
620 47 return result;
621 }
622
623 24 double CoilHeatingDXSingleSpeed_Impl::ratedSupplyFanPowerPerVolumeFlowRate2023() const {
624
1/1
✓ Branch 1 taken 24 times.
24 boost::optional<double> value = getDouble(OS_Coil_Heating_DX_SingleSpeedFields::RatedSupplyFanPowerPerVolumeFlowRate2023, true);
625
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 24 times.
✗ Branch 4 not taken.
24 OS_ASSERT(value);
626
1/1
✓ Branch 1 taken 24 times.
48 return value.get();
627 }
628
629 47 bool CoilHeatingDXSingleSpeed_Impl::setRatedSupplyFanPowerPerVolumeFlowRate2023(double ratedSupplyFanPowerPerVolumeFlowRate2023) {
630 bool result =
631 47 setDouble(OS_Coil_Heating_DX_SingleSpeedFields::RatedSupplyFanPowerPerVolumeFlowRate2023, ratedSupplyFanPowerPerVolumeFlowRate2023);
632 47 return result;
633 }
634
635 ✗ AirflowNetworkEquivalentDuct CoilHeatingDXSingleSpeed_Impl::getAirflowNetworkEquivalentDuct(double length, double diameter) {
636 ✗ boost::optional<AirflowNetworkEquivalentDuct> opt = airflowNetworkEquivalentDuct();
637 ✗ if (opt) {
638 ✗ if (opt->airPathLength() != length) {
639 ✗ opt->setAirPathLength(length);
640 }
641 ✗ if (opt->airPathHydraulicDiameter() != diameter) {
642 ✗ opt->setAirPathHydraulicDiameter(diameter);
643 }
644 }
645 ✗ return AirflowNetworkEquivalentDuct(model(), length, diameter, handle());
646 ✗ }
647
648 ✗ boost::optional<AirflowNetworkEquivalentDuct> CoilHeatingDXSingleSpeed_Impl::airflowNetworkEquivalentDuct() const {
649 std::vector<AirflowNetworkEquivalentDuct> myAFN =
650 ✗ getObject<ModelObject>().getModelObjectSources<AirflowNetworkEquivalentDuct>(AirflowNetworkEquivalentDuct::iddObjectType());
651 ✗ auto count = myAFN.size();
652 ✗ if (count == 1) {
653 ✗ return myAFN[0];
654 ✗ } else if (count > 1) {
655 ✗ LOG(Warn, briefDescription() << " has more than one AirflowNetwork EquivalentDuct attached, returning first.");
656 ✗ return myAFN[0];
657 }
658 ✗ return boost::none;
659 ✗ }
660
661 ✗ boost::optional<double> CoilHeatingDXSingleSpeed_Impl::autosizedRatedTotalHeatingCapacity() const {
662 ✗ return getAutosizedValue("Design Size Gross Rated Heating Capacity", "W");
663 }
664
665 ✗ boost::optional<double> CoilHeatingDXSingleSpeed_Impl::autosizedRatedAirFlowRate() const {
666 ✗ return getAutosizedValue("Design Size Rated Air Flow Rate", "m3/s");
667 }
668
669 ✗ boost::optional<double> CoilHeatingDXSingleSpeed_Impl::autosizedResistiveDefrostHeaterCapacity() const {
670 ✗ return getAutosizedValue("Design Size Resistive Defrost Heater Capacity", "W");
671 }
672
673 ✗ void CoilHeatingDXSingleSpeed_Impl::autosize() {
674 ✗ autosizeRatedTotalHeatingCapacity();
675 ✗ autosizeRatedAirFlowRate();
676 ✗ autosizeResistiveDefrostHeaterCapacity();
677 ✗ }
678
679 ✗ void CoilHeatingDXSingleSpeed_Impl::applySizingValues() {
680 ✗ boost::optional<double> val;
681 ✗ val = autosizedRatedTotalHeatingCapacity();
682 ✗ if (val) {
683 ✗ setRatedTotalHeatingCapacity(val.get());
684 }
685
686 ✗ val = autosizedRatedAirFlowRate();
687 ✗ if (val) {
688 ✗ setRatedAirFlowRate(val.get());
689 }
690
691 ✗ val = autosizedResistiveDefrostHeaterCapacity();
692 ✗ if (val) {
693 ✗ setResistiveDefrostHeaterCapacity(val.get());
694 }
695 ✗ }
696
697 1 ComponentType CoilHeatingDXSingleSpeed_Impl::componentType() const {
698
1/1
✓ Branch 1 taken 1 time.
1 return ComponentType::Heating;
699 }
700
701 1 std::vector<FuelType> CoilHeatingDXSingleSpeed_Impl::coolingFuelTypes() const {
702 1 return {};
703 }
704
705 3 std::vector<FuelType> CoilHeatingDXSingleSpeed_Impl::heatingFuelTypes() const {
706
1/1
✓ Branch 1 taken 3 times.
9 return {FuelType::Electricity};
707 }
708
709 3 std::vector<AppGFuelType> CoilHeatingDXSingleSpeed_Impl::appGHeatingFuelTypes() const {
710
1/1
✓ Branch 1 taken 3 times.
9 return {AppGFuelType::HeatPump};
711 }
712
713 } // namespace detail
714
715 13 CoilHeatingDXSingleSpeed::CoilHeatingDXSingleSpeed(const Model& model, Schedule& availabilitySchedule,
716 Curve& totalHeatingCapacityFunctionofTemperatureCurve,
717 Curve& totalHeatingCapacityFunctionofFlowFractionCurve,
718 Curve& energyInputRatioFunctionofTemperatureCurve,
719 13 Curve& energyInputRatioFunctionofFlowFractionCurve, Curve& partLoadFractionCorrelationCurve)
720 13 : StraightComponent(CoilHeatingDXSingleSpeed::iddObjectType(), model) {
721
1/3
✗ Branch 2 not taken.
✓ Branch 3 taken 13 times.
✗ Branch 5 not taken.
13 OS_ASSERT(getImpl<detail::CoilHeatingDXSingleSpeed_Impl>());
722
723
1/1
✓ Branch 1 taken 13 times.
13 setAvailabilitySchedule(availabilitySchedule);
724
725
1/1
✓ Branch 1 taken 13 times.
13 setTotalHeatingCapacityFunctionofTemperatureCurve(totalHeatingCapacityFunctionofTemperatureCurve);
726
727
1/1
✓ Branch 1 taken 13 times.
13 setTotalHeatingCapacityFunctionofFlowFractionCurve(totalHeatingCapacityFunctionofFlowFractionCurve);
728
729
1/1
✓ Branch 1 taken 13 times.
13 setEnergyInputRatioFunctionofTemperatureCurve(energyInputRatioFunctionofTemperatureCurve);
730
731
1/1
✓ Branch 1 taken 13 times.
13 setEnergyInputRatioFunctionofFlowFractionCurve(energyInputRatioFunctionofFlowFractionCurve);
732
733
1/1
✓ Branch 1 taken 13 times.
13 setPartLoadFractionCorrelationCurve(partLoadFractionCorrelationCurve);
734
735
1/1
✓ Branch 1 taken 13 times.
13 autosizeRatedTotalHeatingCapacity();
736
737
1/1
✓ Branch 1 taken 13 times.
13 autosizeRatedAirFlowRate();
738
739
1/1
✓ Branch 1 taken 13 times.
13 setRatedSupplyFanPowerPerVolumeFlowRate2017(773.3);
740
741
1/1
✓ Branch 1 taken 13 times.
13 setRatedSupplyFanPowerPerVolumeFlowRate2023(934.4);
742
743
1/1
✓ Branch 1 taken 13 times.
13 setRatedCOP(5.0);
744
745
2/2
✓ Branch 1 taken 13 times.
✓ Branch 4 taken 13 times.
26 setDefrostStrategy("Resistive");
746
747
2/2
✓ Branch 1 taken 13 times.
✓ Branch 4 taken 13 times.
13 setDefrostControl("Timed");
748
749
1/1
✓ Branch 1 taken 13 times.
13 setDefrostTimePeriodFraction(0.166667);
750
751
1/1
✓ Branch 1 taken 13 times.
13 setResistiveDefrostHeaterCapacity(2000.0);
752 13 }
753
754 32 CoilHeatingDXSingleSpeed::CoilHeatingDXSingleSpeed(const Model& model) : StraightComponent(CoilHeatingDXSingleSpeed::iddObjectType(), model) {
755
1/3
✗ Branch 2 not taken.
✓ Branch 3 taken 32 times.
✗ Branch 5 not taken.
32 OS_ASSERT(getImpl<detail::CoilHeatingDXSingleSpeed_Impl>());
756
757
1/1
✓ Branch 1 taken 32 times.
32 auto availabilitySchedule = model.alwaysOnDiscreteSchedule();
758
1/1
✓ Branch 1 taken 32 times.
32 setAvailabilitySchedule(availabilitySchedule);
759
760
1/1
✓ Branch 1 taken 32 times.
32 CurveCubic totalHeatingCapacityFunctionofTemperatureCurve(model);
761
1/1
✓ Branch 1 taken 32 times.
32 totalHeatingCapacityFunctionofTemperatureCurve.setCoefficient1Constant(0.758746);
762
1/1
✓ Branch 1 taken 32 times.
32 totalHeatingCapacityFunctionofTemperatureCurve.setCoefficient2x(0.027626);
763
1/1
✓ Branch 1 taken 32 times.
32 totalHeatingCapacityFunctionofTemperatureCurve.setCoefficient3xPOW2(0.000148716);
764
1/1
✓ Branch 1 taken 32 times.
32 totalHeatingCapacityFunctionofTemperatureCurve.setCoefficient4xPOW3(0.0000034992);
765
1/1
✓ Branch 1 taken 32 times.
32 totalHeatingCapacityFunctionofTemperatureCurve.setMinimumValueofx(-20.0);
766
1/1
✓ Branch 1 taken 32 times.
32 totalHeatingCapacityFunctionofTemperatureCurve.setMaximumValueofx(20.0);
767
768
1/1
✓ Branch 1 taken 32 times.
32 CurveCubic totalHeatingCapacityFunctionofFlowFractionCurve(model);
769
1/1
✓ Branch 1 taken 32 times.
32 totalHeatingCapacityFunctionofFlowFractionCurve.setCoefficient1Constant(0.84);
770
1/1
✓ Branch 1 taken 32 times.
32 totalHeatingCapacityFunctionofFlowFractionCurve.setCoefficient2x(0.16);
771
1/1
✓ Branch 1 taken 32 times.
32 totalHeatingCapacityFunctionofFlowFractionCurve.setCoefficient3xPOW2(0.0);
772
1/1
✓ Branch 1 taken 32 times.
32 totalHeatingCapacityFunctionofFlowFractionCurve.setCoefficient4xPOW3(0.0);
773
1/1
✓ Branch 1 taken 32 times.
32 totalHeatingCapacityFunctionofFlowFractionCurve.setMinimumValueofx(0.5);
774
1/1
✓ Branch 1 taken 32 times.
32 totalHeatingCapacityFunctionofFlowFractionCurve.setMaximumValueofx(1.5);
775
776
1/1
✓ Branch 1 taken 32 times.
32 CurveCubic energyInputRatioFunctionofTemperatureCurve(model);
777
1/1
✓ Branch 1 taken 32 times.
32 energyInputRatioFunctionofTemperatureCurve.setCoefficient1Constant(1.19248);
778
1/1
✓ Branch 1 taken 32 times.
32 energyInputRatioFunctionofTemperatureCurve.setCoefficient2x(-0.0300438);
779
1/1
✓ Branch 1 taken 32 times.
32 energyInputRatioFunctionofTemperatureCurve.setCoefficient3xPOW2(0.00103745);
780
1/1
✓ Branch 1 taken 32 times.
32 energyInputRatioFunctionofTemperatureCurve.setCoefficient4xPOW3(-0.000023328);
781
1/1
✓ Branch 1 taken 32 times.
32 energyInputRatioFunctionofTemperatureCurve.setMinimumValueofx(-20.0);
782
1/1
✓ Branch 1 taken 32 times.
32 energyInputRatioFunctionofTemperatureCurve.setMaximumValueofx(20.0);
783
784
1/1
✓ Branch 1 taken 32 times.
32 CurveQuadratic energyInputRatioFunctionofFlowFractionCurve(model);
785
1/1
✓ Branch 1 taken 32 times.
32 energyInputRatioFunctionofFlowFractionCurve.setCoefficient1Constant(1.3824);
786
1/1
✓ Branch 1 taken 32 times.
32 energyInputRatioFunctionofFlowFractionCurve.setCoefficient2x(-0.4336);
787
1/1
✓ Branch 1 taken 32 times.
32 energyInputRatioFunctionofFlowFractionCurve.setCoefficient3xPOW2(0.0512);
788
1/1
✓ Branch 1 taken 32 times.
32 energyInputRatioFunctionofFlowFractionCurve.setMinimumValueofx(0.0);
789
1/1
✓ Branch 1 taken 32 times.
32 energyInputRatioFunctionofFlowFractionCurve.setMaximumValueofx(1.0);
790
791
1/1
✓ Branch 1 taken 32 times.
32 CurveQuadratic partLoadFractionCorrelationCurve(model);
792
1/1
✓ Branch 1 taken 32 times.
32 partLoadFractionCorrelationCurve.setCoefficient1Constant(0.75);
793
1/1
✓ Branch 1 taken 32 times.
32 partLoadFractionCorrelationCurve.setCoefficient2x(0.25);
794
1/1
✓ Branch 1 taken 32 times.
32 partLoadFractionCorrelationCurve.setCoefficient3xPOW2(0.0);
795
1/1
✓ Branch 1 taken 32 times.
32 partLoadFractionCorrelationCurve.setMinimumValueofx(0.0);
796
1/1
✓ Branch 1 taken 32 times.
32 partLoadFractionCorrelationCurve.setMaximumValueofx(1.0);
797
798
1/1
✓ Branch 1 taken 32 times.
32 setTotalHeatingCapacityFunctionofTemperatureCurve(totalHeatingCapacityFunctionofTemperatureCurve);
799
800
1/1
✓ Branch 1 taken 32 times.
32 setTotalHeatingCapacityFunctionofFlowFractionCurve(totalHeatingCapacityFunctionofFlowFractionCurve);
801
802
1/1
✓ Branch 1 taken 32 times.
32 setEnergyInputRatioFunctionofTemperatureCurve(energyInputRatioFunctionofTemperatureCurve);
803
804
1/1
✓ Branch 1 taken 32 times.
32 setEnergyInputRatioFunctionofFlowFractionCurve(energyInputRatioFunctionofFlowFractionCurve);
805
806
1/1
✓ Branch 1 taken 32 times.
32 setPartLoadFractionCorrelationCurve(partLoadFractionCorrelationCurve);
807
808
1/1
✓ Branch 1 taken 32 times.
32 autosizeRatedTotalHeatingCapacity();
809
810
1/1
✓ Branch 1 taken 32 times.
32 autosizeRatedAirFlowRate();
811
812
1/1
✓ Branch 1 taken 32 times.
32 setRatedSupplyFanPowerPerVolumeFlowRate2017(773.3);
813
814
1/1
✓ Branch 1 taken 32 times.
32 setRatedSupplyFanPowerPerVolumeFlowRate2023(934.4);
815
816
1/1
✓ Branch 1 taken 32 times.
32 setRatedCOP(5.0);
817
818
2/2
✓ Branch 1 taken 32 times.
✓ Branch 4 taken 32 times.
64 setDefrostStrategy("Resistive");
819
820
2/2
✓ Branch 1 taken 32 times.
✓ Branch 4 taken 32 times.
32 setDefrostControl("Timed");
821
822
1/1
✓ Branch 1 taken 32 times.
32 setDefrostTimePeriodFraction(0.166667);
823
824
1/1
✓ Branch 1 taken 32 times.
32 setResistiveDefrostHeaterCapacity(2000.0);
825 32 }
826
827 7927 IddObjectType CoilHeatingDXSingleSpeed::iddObjectType() {
828
1/1
✓ Branch 1 taken 7927 times.
7927 IddObjectType result(IddObjectType::OS_Coil_Heating_DX_SingleSpeed);
829 7927 return result;
830 }
831
832 ✗ std::vector<std::string> CoilHeatingDXSingleSpeed::validDefrostStrategyValues() {
833 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_Coil_Heating_DX_SingleSpeedFields::DefrostStrategy);
834 }
835
836 ✗ std::vector<std::string> CoilHeatingDXSingleSpeed::validDefrostControlValues() {
837 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_Coil_Heating_DX_SingleSpeedFields::DefrostControl);
838 }
839
840 1 boost::optional<double> CoilHeatingDXSingleSpeed::ratedTotalHeatingCapacity() const {
841
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->ratedTotalHeatingCapacity();
842 }
843
844 22 bool CoilHeatingDXSingleSpeed::isRatedTotalHeatingCapacityAutosized() const {
845
1/1
✓ Branch 3 taken 22 times.
22 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->isRatedTotalHeatingCapacityAutosized();
846 }
847
848 22 double CoilHeatingDXSingleSpeed::ratedCOP() const {
849
1/1
✓ Branch 3 taken 22 times.
22 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->ratedCOP();
850 }
851
852 1 boost::optional<double> CoilHeatingDXSingleSpeed::ratedAirFlowRate() const {
853
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->ratedAirFlowRate();
854 }
855
856 22 bool CoilHeatingDXSingleSpeed::isRatedAirFlowRateAutosized() const {
857
1/1
✓ Branch 3 taken 22 times.
22 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->isRatedAirFlowRateAutosized();
858 }
859
860 22 double CoilHeatingDXSingleSpeed::minimumOutdoorDryBulbTemperatureforCompressorOperation() const {
861
1/1
✓ Branch 3 taken 22 times.
22 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->minimumOutdoorDryBulbTemperatureforCompressorOperation();
862 }
863
864 ✗ bool CoilHeatingDXSingleSpeed::isMinimumOutdoorDryBulbTemperatureforCompressorOperationDefaulted() const {
865 ✗ return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->isMinimumOutdoorDryBulbTemperatureforCompressorOperationDefaulted();
866 }
867
868 22 double CoilHeatingDXSingleSpeed::maximumOutdoorDryBulbTemperatureforDefrostOperation() const {
869
1/1
✓ Branch 3 taken 22 times.
22 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->maximumOutdoorDryBulbTemperatureforDefrostOperation();
870 }
871
872 ✗ bool CoilHeatingDXSingleSpeed::isMaximumOutdoorDryBulbTemperatureforDefrostOperationDefaulted() const {
873 ✗ return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->isMaximumOutdoorDryBulbTemperatureforDefrostOperationDefaulted();
874 }
875
876 22 double CoilHeatingDXSingleSpeed::crankcaseHeaterCapacity() const {
877
1/1
✓ Branch 3 taken 22 times.
22 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->crankcaseHeaterCapacity();
878 }
879
880 ✗ bool CoilHeatingDXSingleSpeed::isCrankcaseHeaterCapacityDefaulted() const {
881 ✗ return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->isCrankcaseHeaterCapacityDefaulted();
882 }
883
884 22 double CoilHeatingDXSingleSpeed::maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation() const {
885
1/1
✓ Branch 3 taken 22 times.
22 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation();
886 }
887
888 ✗ bool CoilHeatingDXSingleSpeed::isMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperationDefaulted() const {
889 ✗ return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->isMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperationDefaulted();
890 }
891
892 22 std::string CoilHeatingDXSingleSpeed::defrostStrategy() const {
893
1/1
✓ Branch 3 taken 22 times.
22 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->defrostStrategy();
894 }
895
896 ✗ bool CoilHeatingDXSingleSpeed::isDefrostStrategyDefaulted() const {
897 ✗ return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->isDefrostStrategyDefaulted();
898 }
899
900 22 std::string CoilHeatingDXSingleSpeed::defrostControl() const {
901
1/1
✓ Branch 3 taken 22 times.
22 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->defrostControl();
902 }
903
904 ✗ bool CoilHeatingDXSingleSpeed::isDefrostControlDefaulted() const {
905 ✗ return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->isDefrostControlDefaulted();
906 }
907
908 22 double CoilHeatingDXSingleSpeed::defrostTimePeriodFraction() const {
909
1/1
✓ Branch 3 taken 22 times.
22 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->defrostTimePeriodFraction();
910 }
911
912 ✗ bool CoilHeatingDXSingleSpeed::isDefrostTimePeriodFractionDefaulted() const {
913 ✗ return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->isDefrostTimePeriodFractionDefaulted();
914 }
915
916 22 boost::optional<double> CoilHeatingDXSingleSpeed::resistiveDefrostHeaterCapacity() const {
917
1/1
✓ Branch 3 taken 22 times.
22 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->resistiveDefrostHeaterCapacity();
918 }
919
920 ✗ bool CoilHeatingDXSingleSpeed::isResistiveDefrostHeaterCapacityDefaulted() const {
921 ✗ return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->isResistiveDefrostHeaterCapacityDefaulted();
922 }
923
924 22 bool CoilHeatingDXSingleSpeed::isResistiveDefrostHeaterCapacityAutosized() const {
925
1/1
✓ Branch 3 taken 22 times.
22 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->isResistiveDefrostHeaterCapacityAutosized();
926 }
927
928 1 bool CoilHeatingDXSingleSpeed::setRatedTotalHeatingCapacity(double ratedTotalHeatingCapacity) {
929
2/2
✓ Branch 3 taken 1 time.
✓ Branch 6 taken 1 time.
1 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->setRatedTotalHeatingCapacity(ratedTotalHeatingCapacity);
930 }
931
932 45 void CoilHeatingDXSingleSpeed::autosizeRatedTotalHeatingCapacity() {
933
1/1
✓ Branch 3 taken 45 times.
45 getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->autosizeRatedTotalHeatingCapacity();
934 45 }
935
936 46 bool CoilHeatingDXSingleSpeed::setRatedCOP(double ratedCOP) {
937
1/1
✓ Branch 3 taken 46 times.
46 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->setRatedCOP(ratedCOP);
938 }
939
940 1 bool CoilHeatingDXSingleSpeed::setRatedAirFlowRate(double ratedAirFlowRate) {
941
2/2
✓ Branch 3 taken 1 time.
✓ Branch 6 taken 1 time.
1 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->setRatedAirFlowRate(ratedAirFlowRate);
942 }
943
944 45 void CoilHeatingDXSingleSpeed::autosizeRatedAirFlowRate() {
945
1/1
✓ Branch 3 taken 45 times.
45 getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->autosizeRatedAirFlowRate();
946 45 }
947
948 1 bool CoilHeatingDXSingleSpeed::setMinimumOutdoorDryBulbTemperatureforCompressorOperation(
949 double minimumOutdoorDryBulbTemperatureforCompressorOperation) {
950
1/1
✓ Branch 3 taken 1 time.
2 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->setMinimumOutdoorDryBulbTemperatureforCompressorOperation(
951 2 minimumOutdoorDryBulbTemperatureforCompressorOperation);
952 }
953
954 ✗ void CoilHeatingDXSingleSpeed::resetMinimumOutdoorDryBulbTemperatureforCompressorOperation() {
955 ✗ getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->resetMinimumOutdoorDryBulbTemperatureforCompressorOperation();
956 ✗ }
957
958 1 bool CoilHeatingDXSingleSpeed::setMaximumOutdoorDryBulbTemperatureforDefrostOperation(double maximumOutdoorDryBulbTemperatureforDefrostOperation) {
959
1/1
✓ Branch 3 taken 1 time.
2 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->setMaximumOutdoorDryBulbTemperatureforDefrostOperation(
960 2 maximumOutdoorDryBulbTemperatureforDefrostOperation);
961 }
962
963 ✗ void CoilHeatingDXSingleSpeed::resetMaximumOutdoorDryBulbTemperatureforDefrostOperation() {
964 ✗ getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->resetMaximumOutdoorDryBulbTemperatureforDefrostOperation();
965 ✗ }
966
967 1 bool CoilHeatingDXSingleSpeed::setCrankcaseHeaterCapacity(double crankcaseHeaterCapacity) {
968
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->setCrankcaseHeaterCapacity(crankcaseHeaterCapacity);
969 }
970
971 ✗ void CoilHeatingDXSingleSpeed::resetCrankcaseHeaterCapacity() {
972 ✗ getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->resetCrankcaseHeaterCapacity();
973 ✗ }
974
975 1 bool CoilHeatingDXSingleSpeed::setMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation(
976 double maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation) {
977
1/1
✓ Branch 3 taken 1 time.
2 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->setMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation(
978 2 maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation);
979 }
980
981 ✗ void CoilHeatingDXSingleSpeed::resetMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation() {
982 ✗ getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->resetMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation();
983 ✗ }
984
985 46 bool CoilHeatingDXSingleSpeed::setDefrostStrategy(const std::string& defrostStrategy) {
986
1/1
✓ Branch 3 taken 46 times.
46 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->setDefrostStrategy(defrostStrategy);
987 }
988
989 ✗ void CoilHeatingDXSingleSpeed::resetDefrostStrategy() {
990 ✗ getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->resetDefrostStrategy();
991 ✗ }
992
993 46 bool CoilHeatingDXSingleSpeed::setDefrostControl(const std::string& defrostControl) {
994
1/1
✓ Branch 3 taken 46 times.
46 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->setDefrostControl(defrostControl);
995 }
996
997 ✗ void CoilHeatingDXSingleSpeed::resetDefrostControl() {
998 ✗ getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->resetDefrostControl();
999 ✗ }
1000
1001 46 bool CoilHeatingDXSingleSpeed::setDefrostTimePeriodFraction(double defrostTimePeriodFraction) {
1002
1/1
✓ Branch 3 taken 46 times.
46 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->setDefrostTimePeriodFraction(defrostTimePeriodFraction);
1003 }
1004
1005 ✗ void CoilHeatingDXSingleSpeed::resetDefrostTimePeriodFraction() {
1006 ✗ getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->resetDefrostTimePeriodFraction();
1007 ✗ }
1008
1009 46 bool CoilHeatingDXSingleSpeed::setResistiveDefrostHeaterCapacity(double resistiveDefrostHeaterCapacity) {
1010
2/2
✓ Branch 3 taken 46 times.
✓ Branch 6 taken 46 times.
46 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->setResistiveDefrostHeaterCapacity(resistiveDefrostHeaterCapacity);
1011 }
1012
1013 ✗ void CoilHeatingDXSingleSpeed::resetResistiveDefrostHeaterCapacity() {
1014 ✗ getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->resetResistiveDefrostHeaterCapacity();
1015 ✗ }
1016
1017 ✗ void CoilHeatingDXSingleSpeed::autosizeResistiveDefrostHeaterCapacity() {
1018 ✗ getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->autosizeResistiveDefrostHeaterCapacity();
1019 ✗ }
1020
1021 23 Schedule CoilHeatingDXSingleSpeed::availabilitySchedule() const {
1022
1/1
✓ Branch 3 taken 23 times.
23 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->availabilitySchedule();
1023 }
1024
1025 46 bool CoilHeatingDXSingleSpeed::setAvailabilitySchedule(Schedule& schedule) {
1026
1/1
✓ Branch 3 taken 46 times.
46 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->setAvailabilitySchedule(schedule);
1027 }
1028
1029 // Get Curves
1030
1031 23 Curve CoilHeatingDXSingleSpeed::totalHeatingCapacityFunctionofTemperatureCurve() const {
1032
1/1
✓ Branch 3 taken 23 times.
23 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->totalHeatingCapacityFunctionofTemperatureCurve();
1033 }
1034
1035 23 Curve CoilHeatingDXSingleSpeed::totalHeatingCapacityFunctionofFlowFractionCurve() const {
1036
1/1
✓ Branch 3 taken 23 times.
23 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->totalHeatingCapacityFunctionofFlowFractionCurve();
1037 }
1038
1039 23 Curve CoilHeatingDXSingleSpeed::energyInputRatioFunctionofTemperatureCurve() const {
1040
1/1
✓ Branch 3 taken 23 times.
23 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->energyInputRatioFunctionofTemperatureCurve();
1041 }
1042
1043 23 Curve CoilHeatingDXSingleSpeed::energyInputRatioFunctionofFlowFractionCurve() const {
1044
1/1
✓ Branch 3 taken 23 times.
23 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->energyInputRatioFunctionofFlowFractionCurve();
1045 }
1046
1047 23 Curve CoilHeatingDXSingleSpeed::partLoadFractionCorrelationCurve() const {
1048
1/1
✓ Branch 3 taken 23 times.
23 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->partLoadFractionCorrelationCurve();
1049 }
1050
1051 22 boost::optional<Curve> CoilHeatingDXSingleSpeed::defrostEnergyInputRatioFunctionofTemperatureCurve() const {
1052
1/1
✓ Branch 3 taken 22 times.
22 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->defrostEnergyInputRatioFunctionofTemperatureCurve();
1053 }
1054
1055 // Set Curves
1056
1057 45 bool CoilHeatingDXSingleSpeed::setTotalHeatingCapacityFunctionofTemperatureCurve(const Curve& curve) {
1058
1/1
✓ Branch 3 taken 45 times.
45 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->setTotalHeatingCapacityFunctionofTemperatureCurve(curve);
1059 }
1060
1061 45 bool CoilHeatingDXSingleSpeed::setTotalHeatingCapacityFunctionofFlowFractionCurve(const Curve& curve) {
1062
1/1
✓ Branch 3 taken 45 times.
45 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->setTotalHeatingCapacityFunctionofFlowFractionCurve(curve);
1063 }
1064
1065 45 bool CoilHeatingDXSingleSpeed::setEnergyInputRatioFunctionofTemperatureCurve(const Curve& curve) {
1066
1/1
✓ Branch 3 taken 45 times.
45 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->setEnergyInputRatioFunctionofTemperatureCurve(curve);
1067 }
1068
1069 45 bool CoilHeatingDXSingleSpeed::setEnergyInputRatioFunctionofFlowFractionCurve(const Curve& curve) {
1070
1/1
✓ Branch 3 taken 45 times.
45 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->setEnergyInputRatioFunctionofFlowFractionCurve(curve);
1071 }
1072
1073 45 bool CoilHeatingDXSingleSpeed::setPartLoadFractionCorrelationCurve(const Curve& curve) {
1074
1/1
✓ Branch 3 taken 45 times.
45 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->setPartLoadFractionCorrelationCurve(curve);
1075 }
1076
1077 1 bool CoilHeatingDXSingleSpeed::setDefrostEnergyInputRatioFunctionofTemperatureCurve(const Curve& curve) {
1078
2/2
✓ Branch 3 taken 1 time.
✓ Branch 6 taken 1 time.
1 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->setDefrostEnergyInputRatioFunctionofTemperatureCurve(curve);
1079 }
1080
1081 ✗ void CoilHeatingDXSingleSpeed::resetDefrostEnergyInputRatioFunctionofTemperatureCurve() {
1082 ✗ getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->setDefrostEnergyInputRatioFunctionofTemperatureCurve(boost::none);
1083 ✗ }
1084
1085 24 double CoilHeatingDXSingleSpeed::ratedSupplyFanPowerPerVolumeFlowRate2017() const {
1086
1/1
✓ Branch 3 taken 24 times.
24 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->ratedSupplyFanPowerPerVolumeFlowRate2017();
1087 }
1088
1089 47 bool CoilHeatingDXSingleSpeed::setRatedSupplyFanPowerPerVolumeFlowRate2017(double ratedSupplyFanPowerPerVolumeFlowRate2017) {
1090
1/1
✓ Branch 3 taken 47 times.
47 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->setRatedSupplyFanPowerPerVolumeFlowRate2017(ratedSupplyFanPowerPerVolumeFlowRate2017);
1091 }
1092
1093 24 double CoilHeatingDXSingleSpeed::ratedSupplyFanPowerPerVolumeFlowRate2023() const {
1094
1/1
✓ Branch 3 taken 24 times.
24 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->ratedSupplyFanPowerPerVolumeFlowRate2023();
1095 }
1096
1097 47 bool CoilHeatingDXSingleSpeed::setRatedSupplyFanPowerPerVolumeFlowRate2023(double ratedSupplyFanPowerPerVolumeFlowRate2023) {
1098
1/1
✓ Branch 3 taken 47 times.
47 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->setRatedSupplyFanPowerPerVolumeFlowRate2023(ratedSupplyFanPowerPerVolumeFlowRate2023);
1099 }
1100
1101 22 boost::optional<Curve> CoilHeatingDXSingleSpeed::crankcaseHeaterCapacityFunctionofTemperatureCurve() const {
1102
1/1
✓ Branch 3 taken 22 times.
22 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->crankcaseHeaterCapacityFunctionofTemperatureCurve();
1103 }
1104
1105 1 bool CoilHeatingDXSingleSpeed::setCrankcaseHeaterCapacityFunctionofTemperatureCurve(const Curve& curve) {
1106
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->setCrankcaseHeaterCapacityFunctionofTemperatureCurve(curve);
1107 }
1108
1109 ✗ void CoilHeatingDXSingleSpeed::resetCrankcaseHeaterCapacityFunctionofTemperatureCurve() {
1110 ✗ getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->resetCrankcaseHeaterCapacityFunctionofTemperatureCurve();
1111 ✗ }
1112
1113 ✗ AirflowNetworkEquivalentDuct CoilHeatingDXSingleSpeed::getAirflowNetworkEquivalentDuct(double length, double diameter) {
1114 ✗ return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->getAirflowNetworkEquivalentDuct(length, diameter);
1115 }
1116
1117 ✗ boost::optional<AirflowNetworkEquivalentDuct> CoilHeatingDXSingleSpeed::airflowNetworkEquivalentDuct() const {
1118 ✗ return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->airflowNetworkEquivalentDuct();
1119 }
1120
1121 ✗ boost::optional<double> CoilHeatingDXSingleSpeed::autosizedRatedTotalHeatingCapacity() const {
1122 ✗ return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->autosizedRatedTotalHeatingCapacity();
1123 }
1124
1125 ✗ boost::optional<double> CoilHeatingDXSingleSpeed::autosizedRatedAirFlowRate() const {
1126 ✗ return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->autosizedRatedAirFlowRate();
1127 }
1128
1129 ✗ boost::optional<double> CoilHeatingDXSingleSpeed::autosizedResistiveDefrostHeaterCapacity() const {
1130 ✗ return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->autosizedResistiveDefrostHeaterCapacity();
1131 }
1132
1133 /// @cond
1134 33 CoilHeatingDXSingleSpeed::CoilHeatingDXSingleSpeed(std::shared_ptr<detail::CoilHeatingDXSingleSpeed_Impl> impl)
1135
1/1
✓ Branch 3 taken 33 times.
33 : StraightComponent(std::move(impl)) {}
1136
1137 // DEPRECATED
1138 ✗ double CoilHeatingDXSingleSpeed::ratedSupplyFanPowerPerVolumeFlowRate() const {
1139 ✗ DEPRECATED_AT_MSG(3, 5, 0, "Use ratedSupplyFanPowerPerVolumeFlowRate2017 instead.");
1140 ✗ return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->ratedSupplyFanPowerPerVolumeFlowRate2017();
1141 }
1142
1143 ✗ bool CoilHeatingDXSingleSpeed::setRatedSupplyFanPowerPerVolumeFlowRate(double ratedSupplyFanPowerPerVolumeFlowRate) {
1144 ✗ DEPRECATED_AT_MSG(3, 5, 0, "Use setRatedSupplyFanPowerPerVolumeFlowRate2017 instead.");
1145 ✗ return getImpl<detail::CoilHeatingDXSingleSpeed_Impl>()->setRatedSupplyFanPowerPerVolumeFlowRate2017(ratedSupplyFanPowerPerVolumeFlowRate);
1146 }
1147
1148 /// @endcond
1149
1150 } // namespace model
1151
1152 } // namespace openstudio
1153