GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 60.4% 244 / 0 / 404
Functions: 70.2% 59 / 0 / 84
Branches: 36.6% 155 / 0 / 424

src/model/CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit.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 "CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit.hpp"
7 #include "CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl.hpp"
8
9 #include "Curve.hpp"
10 #include "Curve_Impl.hpp"
11 #include "CurveQuadratic.hpp"
12 #include "CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData.hpp"
13 #include "CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData_Impl.hpp"
14 #include "ModelObjectList.hpp"
15 #include "ModelObjectList_Impl.hpp"
16 #include "ZoneHVACComponent.hpp"
17 #include "HVACComponent.hpp"
18 #include "ZoneHVACWaterToAirHeatPump.hpp"
19 #include "ZoneHVACWaterToAirHeatPump_Impl.hpp"
20 #include "AirLoopHVACUnitarySystem.hpp"
21 #include "AirLoopHVACUnitarySystem_Impl.hpp"
22 #include "AirflowNetworkEquivalentDuct.hpp"
23 #include "AirflowNetworkEquivalentDuct_Impl.hpp"
24 #include "Model.hpp"
25 #include "Model_Impl.hpp"
26 #include "Node.hpp"
27 #include "Node_Impl.hpp"
28 #include "Schedule.hpp"
29 #include "Schedule_Impl.hpp"
30 #include "ScheduleTypeRegistry.hpp"
31
32 #include <utilities/idd/OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFit_FieldEnums.hxx>
33
34 #include <utilities/idd/IddEnums.hxx>
35 #include "../utilities/core/Assert.hpp"
36 #include "../utilities/data/DataEnums.hpp"
37 #include "../utilities/idf/WorkspaceExtensibleGroup.hpp"
38
39 namespace openstudio {
40 namespace model {
41
42 namespace detail {
43
44 11 CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl(const IdfObject& idfObject,
45 Model_Impl* model,
46 11 bool keepHandle)
47 11 : WaterToAirComponent_Impl(idfObject, model, keepHandle) {
48
4/6
✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
✓ Branch 7 taken 11 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 11 times.
✗ Branch 13 not taken.
11 OS_ASSERT(idfObject.iddObject().type() == CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::iddObjectType());
49 11 }
50
51 5 CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl(
52 5 const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle)
53 5 : WaterToAirComponent_Impl(other, model, keepHandle) {
54
4/6
✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 5 times.
✗ Branch 13 not taken.
5 OS_ASSERT(other.iddObject().type() == CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::iddObjectType());
55 5 }
56
57 3 CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl(
58 3 const CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl& other, Model_Impl* model, bool keepHandle)
59 3 : WaterToAirComponent_Impl(other, model, keepHandle) {}
60
61 ✗ const std::vector<std::string>& CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::outputVariableNames() const {
62 static const std::vector<std::string> result{"Heating Coil Electricity Rate",
63 "Heating Coil Heating Rate",
64 "Heating Coil Sensible Heating Rate",
65 "Heating Coil Source Side Heat Transfer Rate",
66 "Heating Coil Part Load Ratio",
67 "Heating Coil Runtime Fraction",
68 "Heating Coil Air Mass Flow Rate",
69 "Heating Coil Air Inlet Temperature",
70 "Heating Coil Air Inlet Humidity Ratio",
71 "Heating Coil Air Outlet Temperature",
72 "Heating Coil Air Outlet Humidity Ratio",
73 "Heating Coil Source Side Mass Flow Rate",
74 "Heating Coil Source Side Inlet Temperature",
75 "Heating Coil Source Side Outlet Temperature",
76 "Heating Coil Upper Speed Level",
77 "Heating Coil Neighboring Speed Levels Ratio",
78 "Heating Coil Recoverable Heat Transfer Rate",
79 "Heating Coil Electricity Energy",
80 "Heating Coil Heating Energy",
81 ✗ "Heating Coil Source Side Heat Transfer Energy"};
82 ✗ return result;
83 ✗ }
84
85 4 IddObjectType CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::iddObjectType() const {
86 4 return CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::iddObjectType();
87 }
88
89 ✗ std::vector<ScheduleTypeKey> CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::getScheduleTypeKeys(const Schedule& schedule) const {
90 ✗ std::vector<ScheduleTypeKey> result;
91 ✗ UnsignedVector fieldIndices = getSourceIndices(schedule.handle());
92 ✗ UnsignedVector::const_iterator b(fieldIndices.begin());
93 ✗ UnsignedVector::const_iterator e(fieldIndices.end());
94 ✗ if (std::find(b, e, OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFitFields::AvailabilityScheduleName) != e) {
95 ✗ result.push_back(ScheduleTypeKey("CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit", "Availability Schedule"));
96 }
97 ✗ return result;
98 ✗ }
99
100 3 unsigned CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::airInletPort() const {
101 3 return OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFitFields::IndoorAirInletNodeName;
102 }
103
104 3 unsigned CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::airOutletPort() const {
105 3 return OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFitFields::IndoorAirOutletNodeName;
106 }
107
108 9 unsigned CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::waterInletPort() const {
109 9 return OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFitFields::WatertoRefrigerantHXWaterInletNodeName;
110 }
111
112 9 unsigned CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::waterOutletPort() const {
113 9 return OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFitFields::WatertoRefrigerantHXWaterOutletNodeName;
114 }
115
116 5 boost::optional<Schedule> CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::optionalAvailabilitySchedule() const {
117
1/1
✓ Branch 1 taken 5 times.
10 return getObject<ModelObject>().getModelObjectTarget<Schedule>(
118
1/1
✓ Branch 1 taken 5 times.
10 OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFitFields::AvailabilityScheduleName);
119 }
120
121 5 Schedule CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::availabilitySchedule() const {
122
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<Schedule> value = optionalAvailabilitySchedule();
123
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
5 if (!value) {
124 // it is an error if we get here, however we don't want to crash
125 // so we hook up to global always on schedule
126 ✗ LOG(Error, "Required availability schedule not set, using 'Always On' schedule");
127 ✗ value = this->model().alwaysOnDiscreteSchedule();
128 ✗ OS_ASSERT(value);
129 ✗ const_cast<CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl*>(this)->setAvailabilitySchedule(*value);
130 ✗ value = optionalAvailabilitySchedule();
131 }
132
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
5 OS_ASSERT(value);
133
2/2
✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
10 return value.get();
134 5 }
135
136 3 int CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::nominalSpeedLevel() const {
137
1/1
✓ Branch 1 taken 3 times.
3 boost::optional<int> value = getInt(OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFitFields::NominalSpeedLevel, true);
138
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 3 times.
✗ Branch 4 not taken.
3 OS_ASSERT(value);
139
1/1
✓ Branch 1 taken 3 times.
6 return value.get();
140 }
141
142 1 boost::optional<double> CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::ratedHeatingCapacityAtSelectedNominalSpeedLevel() const {
143 1 return getDouble(OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFitFields::RatedHeatingCapacityAtSelectedNominalSpeedLevel, true);
144 }
145
146 3 bool CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::isRatedHeatingCapacityAtSelectedNominalSpeedLevelAutosized() const {
147 3 bool result = false;
148 boost::optional<std::string> value =
149
1/1
✓ Branch 1 taken 3 times.
3 getString(OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFitFields::RatedHeatingCapacityAtSelectedNominalSpeedLevel, true);
150
1/2
✓ Branch 0 taken 3 times.
✗ Branch 1 not taken.
3 if (value) {
151
3/3
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
6 result = openstudio::istringEqual(value.get(), "autosize");
152 }
153 3 return result;
154 3 }
155
156 1 boost::optional<double> CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::ratedAirFlowRateAtSelectedNominalSpeedLevel() const {
157 1 return getDouble(OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFitFields::RatedAirFlowRateAtSelectedNominalSpeedLevel, true);
158 }
159
160 3 bool CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::isRatedAirFlowRateAtSelectedNominalSpeedLevelAutosized() const {
161 3 bool result = false;
162 boost::optional<std::string> value =
163
1/1
✓ Branch 1 taken 3 times.
3 getString(OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFitFields::RatedAirFlowRateAtSelectedNominalSpeedLevel, true);
164
1/2
✓ Branch 0 taken 3 times.
✗ Branch 1 not taken.
3 if (value) {
165
3/3
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
6 result = openstudio::istringEqual(value.get(), "autosize");
166 }
167 3 return result;
168 3 }
169
170 1 boost::optional<double> CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::ratedWaterFlowRateAtSelectedNominalSpeedLevel() const {
171 1 return getDouble(OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFitFields::RatedWaterFlowRateAtSelectedNominalSpeedLevel, true);
172 }
173
174 3 bool CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::isRatedWaterFlowRateAtSelectedNominalSpeedLevelAutosized() const {
175 3 bool result = false;
176 boost::optional<std::string> value =
177
1/1
✓ Branch 1 taken 3 times.
3 getString(OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFitFields::RatedWaterFlowRateAtSelectedNominalSpeedLevel, true);
178
1/2
✓ Branch 0 taken 3 times.
✗ Branch 1 not taken.
3 if (value) {
179
3/3
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
6 result = openstudio::istringEqual(value.get(), "autosize");
180 }
181 3 return result;
182 3 }
183
184 8 Curve CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::energyPartLoadFractionCurve() const {
185
1/1
✓ Branch 1 taken 8 times.
8 boost::optional<Curve> value = optionalEnergyPartLoadFractionCurve();
186
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 8 times.
8 if (!value) {
187 ✗ LOG_AND_THROW(briefDescription() << " does not have an Energy Part Load Fraction Curve attached.");
188 }
189
2/2
✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
16 return value.get();
190 8 }
191
192 7 bool CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::setAvailabilitySchedule(Schedule& schedule) {
193
3/3
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 7 taken 7 times.
28 bool result = setSchedule(OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFitFields::AvailabilityScheduleName,
194 "CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit", "Availability Schedule", schedule);
195 7 return result;
196 }
197
198 7 bool CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::setNominalSpeedLevel(int nominalSpeedLevel) {
199 7 bool result = setInt(OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFitFields::NominalSpeedLevel, nominalSpeedLevel);
200
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 7 times.
7 OS_ASSERT(result);
201 7 return result;
202 }
203
204 1 bool CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::setRatedHeatingCapacityAtSelectedNominalSpeedLevel(
205 boost::optional<double> ratedHeatingCapacityAtSelectedNominalSpeedLevel) {
206 1 bool result(false);
207
1/2
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
1 if (ratedHeatingCapacityAtSelectedNominalSpeedLevel) {
208 1 result = setDouble(OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFitFields::RatedHeatingCapacityAtSelectedNominalSpeedLevel,
209 1 ratedHeatingCapacityAtSelectedNominalSpeedLevel.get());
210 }
211
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
212 1 return result;
213 }
214
215 6 void CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::autosizeRatedHeatingCapacityAtSelectedNominalSpeedLevel() {
216 bool result =
217
2/2
✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
12 setString(OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFitFields::RatedHeatingCapacityAtSelectedNominalSpeedLevel, "autosize");
218
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
6 OS_ASSERT(result);
219 6 }
220
221 1 bool CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::setRatedAirFlowRateAtSelectedNominalSpeedLevel(
222 boost::optional<double> ratedAirFlowRateAtSelectedNominalSpeedLevel) {
223 1 bool result(false);
224
1/2
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
1 if (ratedAirFlowRateAtSelectedNominalSpeedLevel) {
225 1 result = setDouble(OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFitFields::RatedAirFlowRateAtSelectedNominalSpeedLevel,
226 1 ratedAirFlowRateAtSelectedNominalSpeedLevel.get());
227 }
228
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
229 1 return result;
230 }
231
232 6 void CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::autosizeRatedAirFlowRateAtSelectedNominalSpeedLevel() {
233 bool result =
234
2/2
✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
12 setString(OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFitFields::RatedAirFlowRateAtSelectedNominalSpeedLevel, "autosize");
235
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
6 OS_ASSERT(result);
236 6 }
237
238 1 bool CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::setRatedWaterFlowRateAtSelectedNominalSpeedLevel(
239 boost::optional<double> ratedWaterFlowRateAtSelectedNominalSpeedLevel) {
240 1 bool result(false);
241
1/2
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
1 if (ratedWaterFlowRateAtSelectedNominalSpeedLevel) {
242 1 result = setDouble(OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFitFields::RatedWaterFlowRateAtSelectedNominalSpeedLevel,
243 1 ratedWaterFlowRateAtSelectedNominalSpeedLevel.get());
244 }
245
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
246 1 return result;
247 }
248
249 6 void CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::autosizeRatedWaterFlowRateAtSelectedNominalSpeedLevel() {
250 bool result =
251
2/2
✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
12 setString(OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFitFields::RatedWaterFlowRateAtSelectedNominalSpeedLevel, "autosize");
252
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
6 OS_ASSERT(result);
253 6 }
254
255 6 bool CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::setEnergyPartLoadFractionCurve(const Curve& curve) {
256
2/2
✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
6 bool result = setPointer(OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFitFields::EnergyPartLoadFractionCurveName, curve.handle());
257 6 return result;
258 }
259
260 8 boost::optional<Curve> CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::optionalEnergyPartLoadFractionCurve() const {
261
1/1
✓ Branch 1 taken 8 times.
16 return getObject<ModelObject>().getModelObjectTarget<Curve>(
262
1/1
✓ Branch 1 taken 8 times.
16 OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFitFields::EnergyPartLoadFractionCurveName);
263 }
264
265 ✗ ModelObject CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::clone(Model model) const {
266 ✗ auto newCoil = WaterToAirComponent_Impl::clone(model).cast<CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit>();
267
268 ✗ if (auto speedDataList = this->speedDataList()) {
269 ✗ auto speedDataListClone = speedDataList->clone(model).cast<ModelObjectList>();
270 ✗ newCoil.getImpl<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl>()->setSpeedDataList(speedDataListClone);
271 ✗ }
272
273 ✗ return std::move(newCoil);
274 ✗ }
275
276 4 std::vector<ModelObject> CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::children() const {
277 4 std::vector<ModelObject> children;
278
279
3/3
✓ Branch 1 taken 4 times.
✓ Branch 3 taken 3 times.
✓ Branch 4 taken 1 time.
8 if (auto const _stageDataList = speedDataList()) {
280
4/4
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 11 taken 12 times.
✓ Branch 12 taken 3 times.
15 for (const auto& mo : _stageDataList->modelObjects()) {
281
1/1
✓ Branch 1 taken 12 times.
12 children.push_back(mo);
282 3 }
283 4 }
284
285
2/2
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
4 children.push_back(energyPartLoadFractionCurve());
286
287 std::vector<AirflowNetworkEquivalentDuct> myAFNItems =
288
3/3
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
4 getObject<ModelObject>().getModelObjectSources<AirflowNetworkEquivalentDuct>(AirflowNetworkEquivalentDuct::iddObjectType());
289
1/1
✓ Branch 5 taken 4 times.
4 children.insert(children.end(), myAFNItems.begin(), myAFNItems.end());
290
291 8 return children;
292 4 }
293
294 1 std::vector<openstudio::IdfObject> CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::remove() {
295
1/2
✓ Branch 1 taken 1 time.
✗ Branch 2 not taken.
1 if (isRemovable()) {
296
2/3
✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
2 if (auto _stageDataList = speedDataList()) {
297
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 _stageDataList->remove();
298 1 }
299 1 return WaterToAirComponent_Impl::remove();
300 }
301
302 ✗ return {};
303 }
304
305 3 boost::optional<HVACComponent> CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::containingHVACComponent() const {
306 // AirLoopHVACUnitarySystem
307
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
3 auto const airLoopHVACUnitarySystems = this->model().getConcreteModelObjects<AirLoopHVACUnitarySystem>();
308
309
1/2
✗ Branch 5 not taken.
✓ Branch 6 taken 3 times.
3 for (const auto& airLoopHVACUnitarySystem : airLoopHVACUnitarySystems) {
310 ✗ if (boost::optional<HVACComponent> heatingCoil = airLoopHVACUnitarySystem.heatingCoil()) {
311 ✗ if (heatingCoil->handle() == this->handle()) {
312 ✗ return airLoopHVACUnitarySystem;
313 }
314 ✗ }
315 }
316 3 return boost::none;
317 3 }
318
319 3 boost::optional<ZoneHVACComponent> CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::containingZoneHVACComponent() const {
320 // ZoneHVACWaterToAirHeatPump
321
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
3 auto const zoneHVACWaterToAirHeatPumps = this->model().getConcreteModelObjects<ZoneHVACWaterToAirHeatPump>();
322
323
1/2
✗ Branch 5 not taken.
✓ Branch 6 taken 3 times.
3 for (const auto& zoneHVACWaterToAirHeatPump : zoneHVACWaterToAirHeatPumps) {
324 ✗ if (boost::optional<HVACComponent> coil = zoneHVACWaterToAirHeatPump.heatingCoil()) {
325 ✗ if (coil->handle() == this->handle()) {
326 ✗ return zoneHVACWaterToAirHeatPump;
327 }
328 ✗ }
329 }
330
331 3 return boost::none;
332 3 }
333
334 25 boost::optional<ModelObjectList> CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::speedDataList() const {
335
1/1
✓ Branch 1 taken 25 times.
50 return getObject<ModelObject>().getModelObjectTarget<ModelObjectList>(
336
1/1
✓ Branch 1 taken 25 times.
50 OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFitFields::SpeedDataList);
337 }
338
339 13 bool CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::addSpeed(
340 const CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData& speed) {
341
1/1
✓ Branch 1 taken 13 times.
13 auto modelObjectList = speedDataList();
342
1/2
✓ Branch 0 taken 13 times.
✗ Branch 1 not taken.
13 if (modelObjectList) {
343
2/2
✓ Branch 1 taken 13 times.
✓ Branch 4 taken 13 times.
13 return modelObjectList->addModelObject(speed);
344 }
345 ✗ return false;
346 13 }
347
348 ✗ void CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::removeSpeed(
349 const CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData& speed) {
350 ✗ auto modelObjectList = speedDataList();
351 ✗ if (modelObjectList) {
352 ✗ modelObjectList->removeModelObject(speed);
353 }
354 ✗ }
355
356 ✗ void CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::removeAllSpeeds() {
357 ✗ auto modelObjectList = speedDataList();
358 ✗ if (modelObjectList) {
359 ✗ auto const modelObjects = modelObjectList->modelObjects();
360
361 ✗ for (const auto& elem : modelObjects) {
362 ✗ auto const modelObject = elem.optionalCast<CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData>();
363 ✗ if (modelObject) {
364 ✗ modelObjectList->removeModelObject(elem);
365 }
366 ✗ }
367 ✗ }
368 ✗ }
369
370 std::vector<CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData>
371 7 CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::speeds() const {
372 7 std::vector<CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData> result;
373
1/1
✓ Branch 1 taken 7 times.
7 auto const modelObjectList = speedDataList();
374
1/2
✓ Branch 0 taken 7 times.
✗ Branch 1 not taken.
7 if (modelObjectList) {
375
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
7 auto const modelObjects = modelObjectList->modelObjects();
376
377
2/2
✓ Branch 5 taken 26 times.
✓ Branch 6 taken 7 times.
33 for (const auto& elem : modelObjects) {
378
1/1
✓ Branch 1 taken 26 times.
26 auto const modelObject = elem.optionalCast<CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData>();
379
1/2
✓ Branch 0 taken 26 times.
✗ Branch 1 not taken.
26 if (modelObject) {
380
2/2
✓ Branch 1 taken 26 times.
✓ Branch 4 taken 26 times.
26 result.push_back(modelObject.get());
381 }
382 26 }
383 7 }
384 14 return result;
385 7 }
386
387 6 bool CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::setSpeedDataList(const boost::optional<ModelObjectList>& modelObjectList) {
388 6 bool result(false);
389
1/2
✓ Branch 0 taken 6 times.
✗ Branch 1 not taken.
6 if (modelObjectList) {
390
3/3
✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
✓ Branch 7 taken 6 times.
6 result = setPointer(OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFitFields::SpeedDataList, modelObjectList.get().handle());
391 } else {
392 ✗ resetSpeedDataList();
393 ✗ result = true;
394 }
395 6 return result;
396 }
397
398 ✗ void CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::resetSpeedDataList() {
399 ✗ bool result = setString(OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFitFields::SpeedDataList, "");
400 ✗ OS_ASSERT(result);
401 ✗ }
402
403 ✗ AirflowNetworkEquivalentDuct CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::getAirflowNetworkEquivalentDuct(double length,
404 double diameter) {
405 ✗ boost::optional<AirflowNetworkEquivalentDuct> opt = airflowNetworkEquivalentDuct();
406 ✗ if (opt) {
407 ✗ if (opt->airPathLength() != length) {
408 ✗ opt->setAirPathLength(length);
409 }
410 ✗ if (opt->airPathHydraulicDiameter() != diameter) {
411 ✗ opt->setAirPathHydraulicDiameter(diameter);
412 }
413 }
414 ✗ return AirflowNetworkEquivalentDuct(model(), length, diameter, handle());
415 ✗ }
416
417 ✗ boost::optional<AirflowNetworkEquivalentDuct> CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::airflowNetworkEquivalentDuct() const {
418 std::vector<AirflowNetworkEquivalentDuct> myAFN =
419 ✗ getObject<ModelObject>().getModelObjectSources<AirflowNetworkEquivalentDuct>(AirflowNetworkEquivalentDuct::iddObjectType());
420 ✗ auto count = myAFN.size();
421 ✗ if (count == 1) {
422 ✗ return myAFN[0];
423 ✗ } else if (count > 1) {
424 ✗ LOG(Warn, briefDescription() << " has more than one AirflowNetwork EquivalentDuct attached, returning first.");
425 ✗ return myAFN[0];
426 }
427 ✗ return boost::none;
428 ✗ }
429
430 boost::optional<double>
431 ✗ CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::autosizedRatedHeatingCapacityAtSelectedNominalSpeedLevel() const {
432 // EPLUS-SQL-INCONSISTENCY
433 ✗ return getAutosizedValue("Design Size Nominal Heating Capacity", "W", "COIL:HEATING:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT");
434 }
435
436 ✗ boost::optional<double> CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::autosizedRatedAirFlowRateAtSelectedNominalSpeedLevel() const {
437 // EPLUS-SQL-INCONSISTENCY
438 ✗ return getAutosizedValue("Design Size Rated Air Flow Rate", "m3/s", "COIL:HEATING:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT");
439 }
440
441 boost::optional<double>
442 ✗ CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::autosizedRatedWaterFlowRateAtSelectedNominalSpeedLevel() const {
443 // EPLUS-SQL-INCONSISTENCY
444 ✗ return getAutosizedValue("Design Size Rated Water Flow Rate", "m3/s", "COIL:HEATING:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT");
445 }
446
447 ✗ void CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::autosize() {
448 ✗ autosizeRatedHeatingCapacityAtSelectedNominalSpeedLevel();
449 ✗ autosizeRatedAirFlowRateAtSelectedNominalSpeedLevel();
450 ✗ autosizeRatedWaterFlowRateAtSelectedNominalSpeedLevel();
451 ✗ }
452
453 ✗ void CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::applySizingValues() {
454 ✗ boost::optional<double> val;
455 ✗ val = autosizedRatedHeatingCapacityAtSelectedNominalSpeedLevel();
456 ✗ if (val) {
457 ✗ setRatedHeatingCapacityAtSelectedNominalSpeedLevel(val.get());
458 }
459
460 ✗ val = autosizedRatedAirFlowRateAtSelectedNominalSpeedLevel();
461 ✗ if (val) {
462 ✗ setRatedAirFlowRateAtSelectedNominalSpeedLevel(val.get());
463 }
464
465 ✗ val = autosizedRatedWaterFlowRateAtSelectedNominalSpeedLevel();
466 ✗ if (val) {
467 ✗ setRatedWaterFlowRateAtSelectedNominalSpeedLevel(val.get());
468 }
469 ✗ }
470
471 ✗ ComponentType CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::componentType() const {
472 ✗ return ComponentType::Heating;
473 }
474
475 ✗ std::vector<FuelType> CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::coolingFuelTypes() const {
476 ✗ return {};
477 }
478
479 ✗ std::vector<FuelType> CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::heatingFuelTypes() const {
480 ✗ std::set<FuelType> result;
481 ✗ result.insert(FuelType::Electricity);
482 ✗ if (auto p_ = plantLoop()) {
483 ✗ for (auto ft : p_->heatingFuelTypes()) {
484 ✗ result.insert(ft);
485 ✗ }
486 ✗ }
487 ✗ return {result.begin(), result.end()};
488 ✗ }
489
490 ✗ std::vector<AppGFuelType> CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl::appGHeatingFuelTypes() const {
491 ✗ std::set<AppGFuelType> result;
492 ✗ result.insert(AppGFuelType::HeatPump);
493 ✗ if (auto p_ = plantLoop()) {
494 ✗ for (auto ft : p_->appGHeatingFuelTypes()) {
495 ✗ result.insert(ft);
496 ✗ }
497 ✗ }
498 ✗ return {result.begin(), result.end()};
499 ✗ }
500
501 } // namespace detail
502
503 6 CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit(const Model& model)
504 6 : WaterToAirComponent(CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::iddObjectType(), model) {
505
1/3
✗ Branch 2 not taken.
✓ Branch 3 taken 6 times.
✗ Branch 5 not taken.
6 OS_ASSERT(getImpl<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl>());
506
507
1/1
✓ Branch 1 taken 6 times.
6 auto always_on = model.alwaysOnDiscreteSchedule();
508
1/1
✓ Branch 1 taken 6 times.
6 bool ok = setAvailabilitySchedule(always_on);
509
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
✗ Branch 3 not taken.
6 OS_ASSERT(ok);
510
1/1
✓ Branch 1 taken 6 times.
6 ok = setNominalSpeedLevel(1);
511
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
✗ Branch 3 not taken.
6 OS_ASSERT(ok);
512
1/1
✓ Branch 1 taken 6 times.
6 autosizeRatedHeatingCapacityAtSelectedNominalSpeedLevel();
513
1/1
✓ Branch 1 taken 6 times.
6 autosizeRatedAirFlowRateAtSelectedNominalSpeedLevel();
514
1/1
✓ Branch 1 taken 6 times.
6 autosizeRatedWaterFlowRateAtSelectedNominalSpeedLevel();
515
516
1/1
✓ Branch 1 taken 6 times.
6 auto partLoadFraction = CurveQuadratic(model);
517
1/1
✓ Branch 1 taken 6 times.
6 partLoadFraction.setCoefficient1Constant(0.85);
518
1/1
✓ Branch 1 taken 6 times.
6 partLoadFraction.setCoefficient2x(0.15);
519
1/1
✓ Branch 1 taken 6 times.
6 partLoadFraction.setCoefficient3xPOW2(0.0);
520
1/1
✓ Branch 1 taken 6 times.
6 partLoadFraction.setMinimumValueofx(0.0);
521
1/1
✓ Branch 1 taken 6 times.
6 partLoadFraction.setMaximumValueofx(1.0);
522
523
1/1
✓ Branch 1 taken 6 times.
6 ok = setEnergyPartLoadFractionCurve(partLoadFraction);
524
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
✗ Branch 3 not taken.
6 OS_ASSERT(ok);
525
526
1/1
✓ Branch 1 taken 6 times.
6 auto speedDataList = ModelObjectList(model);
527
4/4
✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
✓ Branch 7 taken 6 times.
✓ Branch 10 taken 6 times.
6 speedDataList.setName(this->name().get() + " Speed Data List");
528
2/2
✓ Branch 3 taken 6 times.
✓ Branch 6 taken 6 times.
6 ok = getImpl<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl>()->setSpeedDataList(speedDataList);
529
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
✗ Branch 3 not taken.
6 OS_ASSERT(ok);
530 6 }
531
532 ✗ CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit(const Model& model,
533 ✗ const Curve& partLoadFraction)
534 ✗ : WaterToAirComponent(CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::iddObjectType(), model) {
535 ✗ OS_ASSERT(getImpl<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl>());
536
537 ✗ auto always_on = model.alwaysOnDiscreteSchedule();
538 ✗ bool ok = setAvailabilitySchedule(always_on);
539 ✗ OS_ASSERT(ok);
540 ✗ ok = setNominalSpeedLevel(1);
541 ✗ OS_ASSERT(ok);
542 ✗ autosizeRatedHeatingCapacityAtSelectedNominalSpeedLevel();
543 ✗ autosizeRatedAirFlowRateAtSelectedNominalSpeedLevel();
544 ✗ autosizeRatedWaterFlowRateAtSelectedNominalSpeedLevel();
545 ✗ ok = setEnergyPartLoadFractionCurve(partLoadFraction);
546 ✗ OS_ASSERT(ok);
547
548 ✗ auto speedDataList = ModelObjectList(model);
549 ✗ speedDataList.setName(this->name().get() + " Speed Data List");
550 ✗ ok = getImpl<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl>()->setSpeedDataList(speedDataList);
551 ✗ OS_ASSERT(ok);
552 ✗ }
553
554 7646 IddObjectType CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::iddObjectType() {
555
1/1
✓ Branch 1 taken 7646 times.
7646 return {IddObjectType::OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFit};
556 }
557
558 5 Schedule CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::availabilitySchedule() const {
559
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl>()->availabilitySchedule();
560 }
561
562 3 int CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::nominalSpeedLevel() const {
563
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl>()->nominalSpeedLevel();
564 }
565
566 1 boost::optional<double> CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::ratedHeatingCapacityAtSelectedNominalSpeedLevel() const {
567
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl>()->ratedHeatingCapacityAtSelectedNominalSpeedLevel();
568 }
569
570 3 bool CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::isRatedHeatingCapacityAtSelectedNominalSpeedLevelAutosized() const {
571 6 return getImpl<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl>()
572
1/1
✓ Branch 2 taken 3 times.
6 ->isRatedHeatingCapacityAtSelectedNominalSpeedLevelAutosized();
573 }
574
575 1 boost::optional<double> CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::ratedAirFlowRateAtSelectedNominalSpeedLevel() const {
576
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl>()->ratedAirFlowRateAtSelectedNominalSpeedLevel();
577 }
578
579 3 bool CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::isRatedAirFlowRateAtSelectedNominalSpeedLevelAutosized() const {
580
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl>()->isRatedAirFlowRateAtSelectedNominalSpeedLevelAutosized();
581 }
582
583 1 boost::optional<double> CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::ratedWaterFlowRateAtSelectedNominalSpeedLevel() const {
584
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl>()->ratedWaterFlowRateAtSelectedNominalSpeedLevel();
585 }
586
587 3 bool CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::isRatedWaterFlowRateAtSelectedNominalSpeedLevelAutosized() const {
588
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl>()->isRatedWaterFlowRateAtSelectedNominalSpeedLevelAutosized();
589 }
590
591 4 Curve CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::energyPartLoadFractionCurve() const {
592
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl>()->energyPartLoadFractionCurve();
593 }
594
595 7 bool CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::setAvailabilitySchedule(Schedule& schedule) {
596
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl>()->setAvailabilitySchedule(schedule);
597 }
598
599 7 bool CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::setNominalSpeedLevel(int nominalSpeedLevel) {
600
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl>()->setNominalSpeedLevel(nominalSpeedLevel);
601 }
602
603 1 bool CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::setRatedHeatingCapacityAtSelectedNominalSpeedLevel(
604 double ratedHeatingCapacityAtSelectedNominalSpeedLevel) {
605
2/2
✓ Branch 3 taken 1 time.
✓ Branch 6 taken 1 time.
2 return getImpl<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl>()->setRatedHeatingCapacityAtSelectedNominalSpeedLevel(
606 2 ratedHeatingCapacityAtSelectedNominalSpeedLevel);
607 }
608
609 6 void CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::autosizeRatedHeatingCapacityAtSelectedNominalSpeedLevel() {
610
1/1
✓ Branch 3 taken 6 times.
6 getImpl<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl>()->autosizeRatedHeatingCapacityAtSelectedNominalSpeedLevel();
611 6 }
612
613 1 bool CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::setRatedAirFlowRateAtSelectedNominalSpeedLevel(
614 double ratedAirFlowRateAtSelectedNominalSpeedLevel) {
615
2/2
✓ Branch 3 taken 1 time.
✓ Branch 6 taken 1 time.
2 return getImpl<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl>()->setRatedAirFlowRateAtSelectedNominalSpeedLevel(
616 2 ratedAirFlowRateAtSelectedNominalSpeedLevel);
617 }
618
619 6 void CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::autosizeRatedAirFlowRateAtSelectedNominalSpeedLevel() {
620
1/1
✓ Branch 3 taken 6 times.
6 getImpl<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl>()->autosizeRatedAirFlowRateAtSelectedNominalSpeedLevel();
621 6 }
622
623 1 bool CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::setRatedWaterFlowRateAtSelectedNominalSpeedLevel(
624 double ratedWaterFlowRateAtSelectedNominalSpeedLevel) {
625
2/2
✓ Branch 3 taken 1 time.
✓ Branch 6 taken 1 time.
2 return getImpl<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl>()->setRatedWaterFlowRateAtSelectedNominalSpeedLevel(
626 2 ratedWaterFlowRateAtSelectedNominalSpeedLevel);
627 }
628
629 6 void CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::autosizeRatedWaterFlowRateAtSelectedNominalSpeedLevel() {
630
1/1
✓ Branch 3 taken 6 times.
6 getImpl<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl>()->autosizeRatedWaterFlowRateAtSelectedNominalSpeedLevel();
631 6 }
632
633 6 bool CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::setEnergyPartLoadFractionCurve(const Curve& curve) {
634
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl>()->setEnergyPartLoadFractionCurve(curve);
635 }
636
637 7 std::vector<CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData> CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::speeds() const {
638
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl>()->speeds();
639 }
640
641 13 bool CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::addSpeed(const CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData& speed) {
642
1/1
✓ Branch 3 taken 13 times.
13 return getImpl<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl>()->addSpeed(speed);
643 }
644
645 void
646 ✗ CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::removeSpeed(const CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData& speed) {
647 ✗ getImpl<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl>()->removeSpeed(speed);
648 ✗ }
649
650 ✗ void CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::removeAllSpeeds() {
651 ✗ getImpl<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl>()->removeAllSpeeds();
652 ✗ }
653
654 ✗ AirflowNetworkEquivalentDuct CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::getAirflowNetworkEquivalentDuct(double length,
655 double diameter) {
656 ✗ return getImpl<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl>()->getAirflowNetworkEquivalentDuct(length, diameter);
657 }
658
659 ✗ boost::optional<AirflowNetworkEquivalentDuct> CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::airflowNetworkEquivalentDuct() const {
660 ✗ return getImpl<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl>()->airflowNetworkEquivalentDuct();
661 }
662
663 /// @cond
664 6 CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit(
665 6 std::shared_ptr<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl> impl)
666
1/1
✓ Branch 3 taken 6 times.
6 : WaterToAirComponent(std::move(impl)) {}
667 /// @endcond
668
669 ✗ boost::optional<double> CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::autosizedRatedHeatingCapacityAtSelectedNominalSpeedLevel() const {
670 ✗ return getImpl<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl>()->autosizedRatedHeatingCapacityAtSelectedNominalSpeedLevel();
671 }
672
673 ✗ boost::optional<double> CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::autosizedRatedAirFlowRateAtSelectedNominalSpeedLevel() const {
674 ✗ return getImpl<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl>()->autosizedRatedAirFlowRateAtSelectedNominalSpeedLevel();
675 }
676
677 ✗ boost::optional<double> CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::autosizedRatedWaterFlowRateAtSelectedNominalSpeedLevel() const {
678 ✗ return getImpl<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl>()->autosizedRatedWaterFlowRateAtSelectedNominalSpeedLevel();
679 }
680
681 } // namespace model
682 } // namespace openstudio
683