GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 80.4% 238 / 0 / 296
Functions: 88.1% 59 / 0 / 67
Branches: 46.7% 151 / 0 / 323

src/model/CoilCoolingDXVariableSpeedSpeedData.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 "CoilCoolingDXVariableSpeedSpeedData.hpp"
7 #include "CoilCoolingDXVariableSpeedSpeedData_Impl.hpp"
8
9 #include "Curve.hpp"
10 #include "Curve_Impl.hpp"
11 #include "Model.hpp"
12 #include "Model_Impl.hpp"
13 #include "CurveBiquadratic.hpp"
14 #include "CurveQuadratic.hpp"
15
16 #include <utilities/idd/OS_Coil_Cooling_DX_VariableSpeed_SpeedData_FieldEnums.hxx>
17
18 #include <utilities/idd/IddEnums.hxx>
19 #include "../utilities/units/Unit.hpp"
20 #include "../utilities/core/Assert.hpp"
21
22 namespace openstudio {
23 namespace model {
24
25 namespace detail {
26
27 7 CoilCoolingDXVariableSpeedSpeedData_Impl::CoilCoolingDXVariableSpeedSpeedData_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle)
28 7 : ParentObject_Impl(idfObject, model, keepHandle) {
29
4/6
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 7 taken 7 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 7 times.
✗ Branch 13 not taken.
7 OS_ASSERT(idfObject.iddObject().type() == CoilCoolingDXVariableSpeedSpeedData::iddObjectType());
30 7 }
31
32 1 CoilCoolingDXVariableSpeedSpeedData_Impl::CoilCoolingDXVariableSpeedSpeedData_Impl(const openstudio::detail::WorkspaceObject_Impl& other,
33 1 Model_Impl* model, bool keepHandle)
34 1 : ParentObject_Impl(other, model, keepHandle) {
35
4/6
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✗ Branch 10 not taken.
✓ Branch 11 taken 1 time.
✗ Branch 13 not taken.
1 OS_ASSERT(other.iddObject().type() == CoilCoolingDXVariableSpeedSpeedData::iddObjectType());
36 1 }
37
38 2 CoilCoolingDXVariableSpeedSpeedData_Impl::CoilCoolingDXVariableSpeedSpeedData_Impl(const CoilCoolingDXVariableSpeedSpeedData_Impl& other,
39 2 Model_Impl* model, bool keepHandle)
40 2 : ParentObject_Impl(other, model, keepHandle) {}
41
42 ✗ const std::vector<std::string>& CoilCoolingDXVariableSpeedSpeedData_Impl::outputVariableNames() const {
43 ✗ static const std::vector<std::string> result;
44 ✗ return result;
45 }
46
47 ✗ IddObjectType CoilCoolingDXVariableSpeedSpeedData_Impl::iddObjectType() const {
48 ✗ return CoilCoolingDXVariableSpeedSpeedData::iddObjectType();
49 }
50
51 4 double CoilCoolingDXVariableSpeedSpeedData_Impl::referenceUnitGrossRatedTotalCoolingCapacity() const {
52
1/1
✓ Branch 1 taken 4 times.
4 boost::optional<double> value = getDouble(OS_Coil_Cooling_DX_VariableSpeed_SpeedDataFields::ReferenceUnitGrossRatedTotalCoolingCapacity, true);
53
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
4 OS_ASSERT(value);
54
1/1
✓ Branch 1 taken 4 times.
8 return value.get();
55 }
56
57 4 double CoilCoolingDXVariableSpeedSpeedData_Impl::referenceUnitGrossRatedSensibleHeatRatio() const {
58
1/1
✓ Branch 1 taken 4 times.
4 boost::optional<double> value = getDouble(OS_Coil_Cooling_DX_VariableSpeed_SpeedDataFields::ReferenceUnitGrossRatedSensibleHeatRatio, true);
59
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
4 OS_ASSERT(value);
60
1/1
✓ Branch 1 taken 4 times.
8 return value.get();
61 }
62
63 4 double CoilCoolingDXVariableSpeedSpeedData_Impl::referenceUnitGrossRatedCoolingCOP() const {
64
1/1
✓ Branch 1 taken 4 times.
4 boost::optional<double> value = getDouble(OS_Coil_Cooling_DX_VariableSpeed_SpeedDataFields::ReferenceUnitGrossRatedCoolingCOP, true);
65
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
4 OS_ASSERT(value);
66
1/1
✓ Branch 1 taken 4 times.
8 return value.get();
67 }
68
69 4 double CoilCoolingDXVariableSpeedSpeedData_Impl::referenceUnitRatedAirFlowRate() const {
70
1/1
✓ Branch 1 taken 4 times.
4 boost::optional<double> value = getDouble(OS_Coil_Cooling_DX_VariableSpeed_SpeedDataFields::ReferenceUnitRatedAirFlowRate, true);
71
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
4 OS_ASSERT(value);
72
1/1
✓ Branch 1 taken 4 times.
8 return value.get();
73 }
74
75 4 boost::optional<double> CoilCoolingDXVariableSpeedSpeedData_Impl::referenceUnitRatedCondenserAirFlowRate() const {
76 4 return getDouble(OS_Coil_Cooling_DX_VariableSpeed_SpeedDataFields::ReferenceUnitRatedCondenserAirFlowRate, true);
77 }
78
79 4 boost::optional<double> CoilCoolingDXVariableSpeedSpeedData_Impl::referenceUnitRatedPadEffectivenessofEvapPrecooling() const {
80 4 return getDouble(OS_Coil_Cooling_DX_VariableSpeed_SpeedDataFields::ReferenceUnitRatedPadEffectivenessofEvapPrecooling, true);
81 }
82
83 7 Curve CoilCoolingDXVariableSpeedSpeedData_Impl::totalCoolingCapacityFunctionofTemperatureCurve() const {
84
1/1
✓ Branch 1 taken 7 times.
7 boost::optional<Curve> value = optionalTotalCoolingCapacityFunctionofTemperatureCurve();
85
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 7 times.
7 if (!value) {
86 ✗ LOG_AND_THROW(briefDescription() << " does not have an Total Cooling Capacity Functionof Temperature Curve attached.");
87 }
88
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
14 return value.get();
89 7 }
90
91 7 Curve CoilCoolingDXVariableSpeedSpeedData_Impl::totalCoolingCapacityFunctionofAirFlowFractionCurve() const {
92
1/1
✓ Branch 1 taken 7 times.
7 boost::optional<Curve> value = optionalTotalCoolingCapacityFunctionofAirFlowFractionCurve();
93
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 7 times.
7 if (!value) {
94 ✗ LOG_AND_THROW(briefDescription() << " does not have an Total Cooling Capacity Functionof Air Flow Fraction Curve attached.");
95 }
96
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
14 return value.get();
97 7 }
98
99 7 Curve CoilCoolingDXVariableSpeedSpeedData_Impl::energyInputRatioFunctionofTemperatureCurve() const {
100
1/1
✓ Branch 1 taken 7 times.
7 boost::optional<Curve> value = optionalEnergyInputRatioFunctionofTemperatureCurve();
101
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 7 times.
7 if (!value) {
102 ✗ LOG_AND_THROW(briefDescription() << " does not have an Energy Input Ratio Functionof Temperature Curve attached.");
103 }
104
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
14 return value.get();
105 7 }
106
107 7 Curve CoilCoolingDXVariableSpeedSpeedData_Impl::energyInputRatioFunctionofAirFlowFractionCurve() const {
108
1/1
✓ Branch 1 taken 7 times.
7 boost::optional<Curve> value = optionalEnergyInputRatioFunctionofAirFlowFractionCurve();
109
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 7 times.
7 if (!value) {
110 ✗ LOG_AND_THROW(briefDescription() << " does not have an Energy Input Ratio Functionof Air Flow Fraction Curve attached.");
111 }
112
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
14 return value.get();
113 7 }
114
115 bool
116 8 CoilCoolingDXVariableSpeedSpeedData_Impl::setReferenceUnitGrossRatedTotalCoolingCapacity(double referenceUnitGrossRatedTotalCoolingCapacity) {
117 8 bool result = setDouble(OS_Coil_Cooling_DX_VariableSpeed_SpeedDataFields::ReferenceUnitGrossRatedTotalCoolingCapacity,
118 referenceUnitGrossRatedTotalCoolingCapacity);
119 8 return result;
120 }
121
122 8 bool CoilCoolingDXVariableSpeedSpeedData_Impl::setReferenceUnitGrossRatedSensibleHeatRatio(double referenceUnitGrossRatedSensibleHeatRatio) {
123 8 bool result = setDouble(OS_Coil_Cooling_DX_VariableSpeed_SpeedDataFields::ReferenceUnitGrossRatedSensibleHeatRatio,
124 referenceUnitGrossRatedSensibleHeatRatio);
125 8 return result;
126 }
127
128 8 bool CoilCoolingDXVariableSpeedSpeedData_Impl::setReferenceUnitGrossRatedCoolingCOP(double referenceUnitGrossRatedCoolingCOP) {
129 8 bool result = setDouble(OS_Coil_Cooling_DX_VariableSpeed_SpeedDataFields::ReferenceUnitGrossRatedCoolingCOP, referenceUnitGrossRatedCoolingCOP);
130 8 return result;
131 }
132
133 8 bool CoilCoolingDXVariableSpeedSpeedData_Impl::setReferenceUnitRatedAirFlowRate(double referenceUnitRatedAirFlowRate) {
134 8 bool result = setDouble(OS_Coil_Cooling_DX_VariableSpeed_SpeedDataFields::ReferenceUnitRatedAirFlowRate, referenceUnitRatedAirFlowRate);
135 8 return result;
136 }
137
138 2 bool CoilCoolingDXVariableSpeedSpeedData_Impl::setReferenceUnitRatedCondenserAirFlowRate(
139 boost::optional<double> referenceUnitRatedCondenserAirFlowRate) {
140 2 bool result(false);
141
1/2
✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
2 if (referenceUnitRatedCondenserAirFlowRate) {
142 2 result = setDouble(OS_Coil_Cooling_DX_VariableSpeed_SpeedDataFields::ReferenceUnitRatedCondenserAirFlowRate,
143 2 referenceUnitRatedCondenserAirFlowRate.get());
144 } else {
145 ✗ resetReferenceUnitRatedCondenserAirFlowRate();
146 ✗ result = true;
147 }
148 2 return result;
149 }
150
151 ✗ void CoilCoolingDXVariableSpeedSpeedData_Impl::resetReferenceUnitRatedCondenserAirFlowRate() {
152 ✗ bool result = setString(OS_Coil_Cooling_DX_VariableSpeed_SpeedDataFields::ReferenceUnitRatedCondenserAirFlowRate, "");
153 ✗ OS_ASSERT(result);
154 ✗ }
155
156 2 bool CoilCoolingDXVariableSpeedSpeedData_Impl::setReferenceUnitRatedPadEffectivenessofEvapPrecooling(
157 boost::optional<double> referenceUnitRatedPadEffectivenessofEvapPrecooling) {
158 2 bool result(false);
159
1/2
✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
2 if (referenceUnitRatedPadEffectivenessofEvapPrecooling) {
160 2 result = setDouble(OS_Coil_Cooling_DX_VariableSpeed_SpeedDataFields::ReferenceUnitRatedPadEffectivenessofEvapPrecooling,
161 2 referenceUnitRatedPadEffectivenessofEvapPrecooling.get());
162 } else {
163 ✗ resetReferenceUnitRatedPadEffectivenessofEvapPrecooling();
164 ✗ result = true;
165 }
166 2 return result;
167 }
168
169 ✗ void CoilCoolingDXVariableSpeedSpeedData_Impl::resetReferenceUnitRatedPadEffectivenessofEvapPrecooling() {
170 ✗ bool result = setString(OS_Coil_Cooling_DX_VariableSpeed_SpeedDataFields::ReferenceUnitRatedPadEffectivenessofEvapPrecooling, "");
171 ✗ OS_ASSERT(result);
172 ✗ }
173
174 6 bool CoilCoolingDXVariableSpeedSpeedData_Impl::setTotalCoolingCapacityFunctionofTemperatureCurve(const Curve& curve) {
175
2/2
✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
6 bool result = setPointer(OS_Coil_Cooling_DX_VariableSpeed_SpeedDataFields::TotalCoolingCapacityFunctionofTemperatureCurveName, curve.handle());
176 6 return result;
177 }
178
179 6 bool CoilCoolingDXVariableSpeedSpeedData_Impl::setTotalCoolingCapacityFunctionofAirFlowFractionCurve(const Curve& curve) {
180 bool result =
181
2/2
✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
6 setPointer(OS_Coil_Cooling_DX_VariableSpeed_SpeedDataFields::TotalCoolingCapacityFunctionofAirFlowFractionCurveName, curve.handle());
182 6 return result;
183 }
184
185 6 bool CoilCoolingDXVariableSpeedSpeedData_Impl::setEnergyInputRatioFunctionofTemperatureCurve(const Curve& curve) {
186
2/2
✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
6 bool result = setPointer(OS_Coil_Cooling_DX_VariableSpeed_SpeedDataFields::EnergyInputRatioFunctionofTemperatureCurveName, curve.handle());
187 6 return result;
188 }
189
190 6 bool CoilCoolingDXVariableSpeedSpeedData_Impl::setEnergyInputRatioFunctionofAirFlowFractionCurve(const Curve& curve) {
191
2/2
✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
6 bool result = setPointer(OS_Coil_Cooling_DX_VariableSpeed_SpeedDataFields::EnergyInputRatioFunctionofAirFlowFractionCurveName, curve.handle());
192 6 return result;
193 }
194
195 4 double CoilCoolingDXVariableSpeedSpeedData_Impl::ratedEvaporatorFanPowerPerVolumeFlowRate2017() const {
196
1/1
✓ Branch 1 taken 4 times.
4 boost::optional<double> value = getDouble(OS_Coil_Cooling_DX_VariableSpeed_SpeedDataFields::RatedEvaporatorFanPowerPerVolumeFlowRate2017, true);
197
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
4 OS_ASSERT(value);
198
1/1
✓ Branch 1 taken 4 times.
8 return value.get();
199 }
200
201 bool
202 8 CoilCoolingDXVariableSpeedSpeedData_Impl::setRatedEvaporatorFanPowerPerVolumeFlowRate2017(double ratedEvaporatorFanPowerPerVolumeFlowRate2017) {
203 8 bool result = setDouble(OS_Coil_Cooling_DX_VariableSpeed_SpeedDataFields::RatedEvaporatorFanPowerPerVolumeFlowRate2017,
204 ratedEvaporatorFanPowerPerVolumeFlowRate2017);
205 8 return result;
206 }
207
208 4 double CoilCoolingDXVariableSpeedSpeedData_Impl::ratedEvaporatorFanPowerPerVolumeFlowRate2023() const {
209
1/1
✓ Branch 1 taken 4 times.
4 boost::optional<double> value = getDouble(OS_Coil_Cooling_DX_VariableSpeed_SpeedDataFields::RatedEvaporatorFanPowerPerVolumeFlowRate2023, true);
210
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
4 OS_ASSERT(value);
211
1/1
✓ Branch 1 taken 4 times.
8 return value.get();
212 }
213
214 bool
215 8 CoilCoolingDXVariableSpeedSpeedData_Impl::setRatedEvaporatorFanPowerPerVolumeFlowRate2023(double ratedEvaporatorFanPowerPerVolumeFlowRate2023) {
216 8 bool result = setDouble(OS_Coil_Cooling_DX_VariableSpeed_SpeedDataFields::RatedEvaporatorFanPowerPerVolumeFlowRate2023,
217 ratedEvaporatorFanPowerPerVolumeFlowRate2023);
218 8 return result;
219 }
220
221 7 boost::optional<Curve> CoilCoolingDXVariableSpeedSpeedData_Impl::optionalTotalCoolingCapacityFunctionofTemperatureCurve() const {
222
1/1
✓ Branch 1 taken 7 times.
14 return getObject<ModelObject>().getModelObjectTarget<Curve>(
223
1/1
✓ Branch 1 taken 7 times.
14 OS_Coil_Cooling_DX_VariableSpeed_SpeedDataFields::TotalCoolingCapacityFunctionofTemperatureCurveName);
224 }
225
226 7 boost::optional<Curve> CoilCoolingDXVariableSpeedSpeedData_Impl::optionalTotalCoolingCapacityFunctionofAirFlowFractionCurve() const {
227
1/1
✓ Branch 1 taken 7 times.
14 return getObject<ModelObject>().getModelObjectTarget<Curve>(
228
1/1
✓ Branch 1 taken 7 times.
14 OS_Coil_Cooling_DX_VariableSpeed_SpeedDataFields::TotalCoolingCapacityFunctionofAirFlowFractionCurveName);
229 }
230
231 7 boost::optional<Curve> CoilCoolingDXVariableSpeedSpeedData_Impl::optionalEnergyInputRatioFunctionofTemperatureCurve() const {
232
1/1
✓ Branch 1 taken 7 times.
14 return getObject<ModelObject>().getModelObjectTarget<Curve>(
233
1/1
✓ Branch 1 taken 7 times.
14 OS_Coil_Cooling_DX_VariableSpeed_SpeedDataFields::EnergyInputRatioFunctionofTemperatureCurveName);
234 }
235
236 7 boost::optional<Curve> CoilCoolingDXVariableSpeedSpeedData_Impl::optionalEnergyInputRatioFunctionofAirFlowFractionCurve() const {
237
1/1
✓ Branch 1 taken 7 times.
14 return getObject<ModelObject>().getModelObjectTarget<Curve>(
238
1/1
✓ Branch 1 taken 7 times.
14 OS_Coil_Cooling_DX_VariableSpeed_SpeedDataFields::EnergyInputRatioFunctionofAirFlowFractionCurveName);
239 }
240
241 ✗ ModelObject CoilCoolingDXVariableSpeedSpeedData_Impl::clone(Model model) const {
242 ✗ auto t_clone = ParentObject_Impl::clone(model).cast<CoilCoolingDXVariableSpeedSpeedData>();
243
244 ✗ return std::move(t_clone);
245 ✗ }
246
247 1 std::vector<ModelObject> CoilCoolingDXVariableSpeedSpeedData_Impl::children() const {
248 1 std::vector<ModelObject> children;
249
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 children.push_back(totalCoolingCapacityFunctionofTemperatureCurve());
250
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 children.push_back(totalCoolingCapacityFunctionofAirFlowFractionCurve());
251
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 children.push_back(energyInputRatioFunctionofTemperatureCurve());
252
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 children.push_back(energyInputRatioFunctionofAirFlowFractionCurve());
253 1 return children;
254 ✗ }
255
256 } // namespace detail
257
258 6 CoilCoolingDXVariableSpeedSpeedData::CoilCoolingDXVariableSpeedSpeedData(const Model& model)
259 6 : ParentObject(CoilCoolingDXVariableSpeedSpeedData::iddObjectType(), model) {
260
1/3
✗ Branch 2 not taken.
✓ Branch 3 taken 6 times.
✗ Branch 5 not taken.
6 OS_ASSERT(getImpl<detail::CoilCoolingDXVariableSpeedSpeedData_Impl>());
261
262
1/1
✓ Branch 1 taken 6 times.
6 CurveBiquadratic cooling_curve_1(model);
263
1/1
✓ Branch 1 taken 6 times.
6 cooling_curve_1.setCoefficient1Constant(1.6253449506);
264
1/1
✓ Branch 1 taken 6 times.
6 cooling_curve_1.setCoefficient2x(-0.0786550838);
265
1/1
✓ Branch 1 taken 6 times.
6 cooling_curve_1.setCoefficient3xPOW2(0.0030679776);
266
1/1
✓ Branch 1 taken 6 times.
6 cooling_curve_1.setCoefficient4y(0.0008002088);
267
1/1
✓ Branch 1 taken 6 times.
6 cooling_curve_1.setCoefficient5yPOW2(-0.0000354060);
268
1/1
✓ Branch 1 taken 6 times.
6 cooling_curve_1.setCoefficient6xTIMESY(-0.0003534409);
269
1/1
✓ Branch 1 taken 6 times.
6 cooling_curve_1.setMinimumValueofx(13.89);
270
1/1
✓ Branch 1 taken 6 times.
6 cooling_curve_1.setMaximumValueofx(22.22);
271
1/1
✓ Branch 1 taken 6 times.
6 cooling_curve_1.setMinimumValueofy(12.78);
272
1/1
✓ Branch 1 taken 6 times.
6 cooling_curve_1.setMaximumValueofy(51.67);
273
274
1/1
✓ Branch 1 taken 6 times.
6 CurveQuadratic cooling_curve_2(model);
275
1/1
✓ Branch 1 taken 6 times.
6 cooling_curve_2.setCoefficient1Constant(1.0);
276
1/1
✓ Branch 1 taken 6 times.
6 cooling_curve_2.setCoefficient2x(0.0);
277
1/1
✓ Branch 1 taken 6 times.
6 cooling_curve_2.setCoefficient3xPOW2(0.0);
278
1/1
✓ Branch 1 taken 6 times.
6 cooling_curve_2.setMinimumValueofx(0.5);
279
1/1
✓ Branch 1 taken 6 times.
6 cooling_curve_2.setMaximumValueofx(1.5);
280
281
1/1
✓ Branch 1 taken 6 times.
6 CurveBiquadratic cooling_curve_3(model);
282
1/1
✓ Branch 1 taken 6 times.
6 cooling_curve_3.setCoefficient1Constant(1.4240389306);
283
1/1
✓ Branch 1 taken 6 times.
6 cooling_curve_3.setCoefficient2x(-0.0593310687);
284
1/1
✓ Branch 1 taken 6 times.
6 cooling_curve_3.setCoefficient3xPOW2(0.0026068070);
285
1/1
✓ Branch 1 taken 6 times.
6 cooling_curve_3.setCoefficient4y(0.0008867551);
286
1/1
✓ Branch 1 taken 6 times.
6 cooling_curve_3.setCoefficient5yPOW2(-0.0000369191);
287
1/1
✓ Branch 1 taken 6 times.
6 cooling_curve_3.setCoefficient6xTIMESY(-0.0003552805);
288
1/1
✓ Branch 1 taken 6 times.
6 cooling_curve_3.setMinimumValueofx(13.89);
289
1/1
✓ Branch 1 taken 6 times.
6 cooling_curve_3.setMaximumValueofx(22.22);
290
1/1
✓ Branch 1 taken 6 times.
6 cooling_curve_3.setMinimumValueofy(12.78);
291
1/1
✓ Branch 1 taken 6 times.
6 cooling_curve_3.setMaximumValueofy(51.67);
292
293
1/1
✓ Branch 1 taken 6 times.
6 CurveQuadratic cooling_curve_4(model);
294
1/1
✓ Branch 1 taken 6 times.
6 cooling_curve_4.setCoefficient1Constant(1.0);
295
1/1
✓ Branch 1 taken 6 times.
6 cooling_curve_4.setCoefficient2x(0.0);
296
1/1
✓ Branch 1 taken 6 times.
6 cooling_curve_4.setCoefficient3xPOW2(0.0);
297
1/1
✓ Branch 1 taken 6 times.
6 cooling_curve_4.setMinimumValueofx(0.5);
298
1/1
✓ Branch 1 taken 6 times.
6 cooling_curve_4.setMaximumValueofx(1.5);
299
300 6 bool ok = true;
301
1/1
✓ Branch 1 taken 6 times.
6 ok = setReferenceUnitGrossRatedTotalCoolingCapacity(8914.185229);
302
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
✗ Branch 3 not taken.
6 OS_ASSERT(ok);
303
1/1
✓ Branch 1 taken 6 times.
6 ok = setReferenceUnitGrossRatedSensibleHeatRatio(0.79);
304
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
✗ Branch 3 not taken.
6 OS_ASSERT(ok);
305
1/1
✓ Branch 1 taken 6 times.
6 ok = setReferenceUnitGrossRatedCoolingCOP(3.980488789);
306
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
✗ Branch 3 not taken.
6 OS_ASSERT(ok);
307
1/1
✓ Branch 1 taken 6 times.
6 ok = setReferenceUnitRatedAirFlowRate(0.944);
308
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
✗ Branch 3 not taken.
6 OS_ASSERT(ok);
309
1/1
✓ Branch 1 taken 6 times.
6 ok = setRatedEvaporatorFanPowerPerVolumeFlowRate2017(773.3);
310
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
✗ Branch 3 not taken.
6 OS_ASSERT(ok);
311
1/1
✓ Branch 1 taken 6 times.
6 ok = setRatedEvaporatorFanPowerPerVolumeFlowRate2023(934.4);
312
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
✗ Branch 3 not taken.
6 OS_ASSERT(ok);
313
1/1
✓ Branch 1 taken 6 times.
6 ok = setTotalCoolingCapacityFunctionofTemperatureCurve(cooling_curve_1);
314
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
✗ Branch 3 not taken.
6 OS_ASSERT(ok);
315
1/1
✓ Branch 1 taken 6 times.
6 ok = setTotalCoolingCapacityFunctionofAirFlowFractionCurve(cooling_curve_2);
316
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
✗ Branch 3 not taken.
6 OS_ASSERT(ok);
317
1/1
✓ Branch 1 taken 6 times.
6 ok = setEnergyInputRatioFunctionofTemperatureCurve(cooling_curve_3);
318
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
✗ Branch 3 not taken.
6 OS_ASSERT(ok);
319
1/1
✓ Branch 1 taken 6 times.
6 ok = setEnergyInputRatioFunctionofAirFlowFractionCurve(cooling_curve_4);
320
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
✗ Branch 3 not taken.
6 OS_ASSERT(ok);
321 6 }
322
323 ✗ CoilCoolingDXVariableSpeedSpeedData::CoilCoolingDXVariableSpeedSpeedData(const Model& model,
324 const Curve& totalCoolingCapacityFunctionofTemperatureCurve,
325 const Curve& totalCoolingCapacityFunctionofAirFlowFractionCurve,
326 const Curve& energyInputRatioFunctionofTemperatureCurve,
327 ✗ const Curve& energyInputRatioFunctionofAirFlowFractionCurve)
328 ✗ : ParentObject(CoilCoolingDXVariableSpeedSpeedData::iddObjectType(), model) {
329 ✗ OS_ASSERT(getImpl<detail::CoilCoolingDXVariableSpeedSpeedData_Impl>());
330
331 ✗ bool ok = true;
332 ✗ ok = setReferenceUnitGrossRatedTotalCoolingCapacity(8914.185229);
333 ✗ OS_ASSERT(ok);
334 ✗ ok = setReferenceUnitGrossRatedSensibleHeatRatio(0.79);
335 ✗ OS_ASSERT(ok);
336 ✗ ok = setReferenceUnitGrossRatedCoolingCOP(3.980488789);
337 ✗ OS_ASSERT(ok);
338 ✗ ok = setReferenceUnitRatedAirFlowRate(0.944);
339 ✗ OS_ASSERT(ok);
340 ✗ ok = setRatedEvaporatorFanPowerPerVolumeFlowRate2017(773.3);
341 ✗ OS_ASSERT(ok);
342 ✗ ok = setRatedEvaporatorFanPowerPerVolumeFlowRate2023(934.4);
343 ✗ OS_ASSERT(ok);
344 ✗ ok = setTotalCoolingCapacityFunctionofTemperatureCurve(totalCoolingCapacityFunctionofTemperatureCurve);
345 ✗ OS_ASSERT(ok);
346 ✗ ok = setTotalCoolingCapacityFunctionofAirFlowFractionCurve(totalCoolingCapacityFunctionofAirFlowFractionCurve);
347 ✗ OS_ASSERT(ok);
348 ✗ ok = setEnergyInputRatioFunctionofTemperatureCurve(energyInputRatioFunctionofTemperatureCurve);
349 ✗ OS_ASSERT(ok);
350 ✗ ok = setEnergyInputRatioFunctionofAirFlowFractionCurve(energyInputRatioFunctionofAirFlowFractionCurve);
351 ✗ OS_ASSERT(ok);
352 ✗ }
353
354 7742 IddObjectType CoilCoolingDXVariableSpeedSpeedData::iddObjectType() {
355
1/1
✓ Branch 1 taken 7742 times.
7742 return {IddObjectType::OS_Coil_Cooling_DX_VariableSpeed_SpeedData};
356 }
357
358 4 double CoilCoolingDXVariableSpeedSpeedData::referenceUnitGrossRatedTotalCoolingCapacity() const {
359
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::CoilCoolingDXVariableSpeedSpeedData_Impl>()->referenceUnitGrossRatedTotalCoolingCapacity();
360 }
361
362 4 double CoilCoolingDXVariableSpeedSpeedData::referenceUnitGrossRatedSensibleHeatRatio() const {
363
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::CoilCoolingDXVariableSpeedSpeedData_Impl>()->referenceUnitGrossRatedSensibleHeatRatio();
364 }
365
366 4 double CoilCoolingDXVariableSpeedSpeedData::referenceUnitGrossRatedCoolingCOP() const {
367
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::CoilCoolingDXVariableSpeedSpeedData_Impl>()->referenceUnitGrossRatedCoolingCOP();
368 }
369
370 4 double CoilCoolingDXVariableSpeedSpeedData::referenceUnitRatedAirFlowRate() const {
371
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::CoilCoolingDXVariableSpeedSpeedData_Impl>()->referenceUnitRatedAirFlowRate();
372 }
373
374 4 boost::optional<double> CoilCoolingDXVariableSpeedSpeedData::referenceUnitRatedCondenserAirFlowRate() const {
375
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::CoilCoolingDXVariableSpeedSpeedData_Impl>()->referenceUnitRatedCondenserAirFlowRate();
376 }
377
378 4 boost::optional<double> CoilCoolingDXVariableSpeedSpeedData::referenceUnitRatedPadEffectivenessofEvapPrecooling() const {
379
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::CoilCoolingDXVariableSpeedSpeedData_Impl>()->referenceUnitRatedPadEffectivenessofEvapPrecooling();
380 }
381
382 6 Curve CoilCoolingDXVariableSpeedSpeedData::totalCoolingCapacityFunctionofTemperatureCurve() const {
383
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::CoilCoolingDXVariableSpeedSpeedData_Impl>()->totalCoolingCapacityFunctionofTemperatureCurve();
384 }
385
386 6 Curve CoilCoolingDXVariableSpeedSpeedData::totalCoolingCapacityFunctionofAirFlowFractionCurve() const {
387
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::CoilCoolingDXVariableSpeedSpeedData_Impl>()->totalCoolingCapacityFunctionofAirFlowFractionCurve();
388 }
389
390 6 Curve CoilCoolingDXVariableSpeedSpeedData::energyInputRatioFunctionofTemperatureCurve() const {
391
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::CoilCoolingDXVariableSpeedSpeedData_Impl>()->energyInputRatioFunctionofTemperatureCurve();
392 }
393
394 6 Curve CoilCoolingDXVariableSpeedSpeedData::energyInputRatioFunctionofAirFlowFractionCurve() const {
395
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::CoilCoolingDXVariableSpeedSpeedData_Impl>()->energyInputRatioFunctionofAirFlowFractionCurve();
396 }
397
398 8 bool CoilCoolingDXVariableSpeedSpeedData::setReferenceUnitGrossRatedTotalCoolingCapacity(double referenceUnitGrossRatedTotalCoolingCapacity) {
399
1/1
✓ Branch 3 taken 8 times.
16 return getImpl<detail::CoilCoolingDXVariableSpeedSpeedData_Impl>()->setReferenceUnitGrossRatedTotalCoolingCapacity(
400 16 referenceUnitGrossRatedTotalCoolingCapacity);
401 }
402
403 8 bool CoilCoolingDXVariableSpeedSpeedData::setReferenceUnitGrossRatedSensibleHeatRatio(double referenceUnitGrossRatedSensibleHeatRatio) {
404
1/1
✓ Branch 3 taken 8 times.
16 return getImpl<detail::CoilCoolingDXVariableSpeedSpeedData_Impl>()->setReferenceUnitGrossRatedSensibleHeatRatio(
405 16 referenceUnitGrossRatedSensibleHeatRatio);
406 }
407
408 8 bool CoilCoolingDXVariableSpeedSpeedData::setReferenceUnitGrossRatedCoolingCOP(double referenceUnitGrossRatedCoolingCOP) {
409
1/1
✓ Branch 3 taken 8 times.
8 return getImpl<detail::CoilCoolingDXVariableSpeedSpeedData_Impl>()->setReferenceUnitGrossRatedCoolingCOP(referenceUnitGrossRatedCoolingCOP);
410 }
411
412 8 bool CoilCoolingDXVariableSpeedSpeedData::setReferenceUnitRatedAirFlowRate(double referenceUnitRatedAirFlowRate) {
413
1/1
✓ Branch 3 taken 8 times.
8 return getImpl<detail::CoilCoolingDXVariableSpeedSpeedData_Impl>()->setReferenceUnitRatedAirFlowRate(referenceUnitRatedAirFlowRate);
414 }
415
416 2 bool CoilCoolingDXVariableSpeedSpeedData::setReferenceUnitRatedCondenserAirFlowRate(double referenceUnitRatedCondenserAirFlowRate) {
417
2/2
✓ Branch 3 taken 2 times.
✓ Branch 6 taken 2 times.
4 return getImpl<detail::CoilCoolingDXVariableSpeedSpeedData_Impl>()->setReferenceUnitRatedCondenserAirFlowRate(
418 4 referenceUnitRatedCondenserAirFlowRate);
419 }
420
421 ✗ void CoilCoolingDXVariableSpeedSpeedData::resetReferenceUnitRatedCondenserAirFlowRate() {
422 ✗ getImpl<detail::CoilCoolingDXVariableSpeedSpeedData_Impl>()->resetReferenceUnitRatedCondenserAirFlowRate();
423 ✗ }
424
425 2 bool CoilCoolingDXVariableSpeedSpeedData::setReferenceUnitRatedPadEffectivenessofEvapPrecooling(
426 double referenceUnitRatedPadEffectivenessofEvapPrecooling) {
427
2/2
✓ Branch 3 taken 2 times.
✓ Branch 6 taken 2 times.
4 return getImpl<detail::CoilCoolingDXVariableSpeedSpeedData_Impl>()->setReferenceUnitRatedPadEffectivenessofEvapPrecooling(
428 4 referenceUnitRatedPadEffectivenessofEvapPrecooling);
429 }
430
431 ✗ void CoilCoolingDXVariableSpeedSpeedData::resetReferenceUnitRatedPadEffectivenessofEvapPrecooling() {
432 ✗ getImpl<detail::CoilCoolingDXVariableSpeedSpeedData_Impl>()->resetReferenceUnitRatedPadEffectivenessofEvapPrecooling();
433 ✗ }
434
435 6 bool CoilCoolingDXVariableSpeedSpeedData::setTotalCoolingCapacityFunctionofTemperatureCurve(const Curve& curve) {
436
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::CoilCoolingDXVariableSpeedSpeedData_Impl>()->setTotalCoolingCapacityFunctionofTemperatureCurve(curve);
437 }
438
439 6 bool CoilCoolingDXVariableSpeedSpeedData::setTotalCoolingCapacityFunctionofAirFlowFractionCurve(const Curve& curve) {
440
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::CoilCoolingDXVariableSpeedSpeedData_Impl>()->setTotalCoolingCapacityFunctionofAirFlowFractionCurve(curve);
441 }
442
443 6 bool CoilCoolingDXVariableSpeedSpeedData::setEnergyInputRatioFunctionofTemperatureCurve(const Curve& curve) {
444
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::CoilCoolingDXVariableSpeedSpeedData_Impl>()->setEnergyInputRatioFunctionofTemperatureCurve(curve);
445 }
446
447 6 bool CoilCoolingDXVariableSpeedSpeedData::setEnergyInputRatioFunctionofAirFlowFractionCurve(const Curve& curve) {
448
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::CoilCoolingDXVariableSpeedSpeedData_Impl>()->setEnergyInputRatioFunctionofAirFlowFractionCurve(curve);
449 }
450
451 4 double CoilCoolingDXVariableSpeedSpeedData::ratedEvaporatorFanPowerPerVolumeFlowRate2017() const {
452
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::CoilCoolingDXVariableSpeedSpeedData_Impl>()->ratedEvaporatorFanPowerPerVolumeFlowRate2017();
453 }
454
455 8 bool CoilCoolingDXVariableSpeedSpeedData::setRatedEvaporatorFanPowerPerVolumeFlowRate2017(double ratedEvaporatorFanPowerPerVolumeFlowRate2017) {
456
1/1
✓ Branch 3 taken 8 times.
16 return getImpl<detail::CoilCoolingDXVariableSpeedSpeedData_Impl>()->setRatedEvaporatorFanPowerPerVolumeFlowRate2017(
457 16 ratedEvaporatorFanPowerPerVolumeFlowRate2017);
458 }
459
460 4 double CoilCoolingDXVariableSpeedSpeedData::ratedEvaporatorFanPowerPerVolumeFlowRate2023() const {
461
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::CoilCoolingDXVariableSpeedSpeedData_Impl>()->ratedEvaporatorFanPowerPerVolumeFlowRate2023();
462 }
463
464 8 bool CoilCoolingDXVariableSpeedSpeedData::setRatedEvaporatorFanPowerPerVolumeFlowRate2023(double ratedEvaporatorFanPowerPerVolumeFlowRate2023) {
465
1/1
✓ Branch 3 taken 8 times.
16 return getImpl<detail::CoilCoolingDXVariableSpeedSpeedData_Impl>()->setRatedEvaporatorFanPowerPerVolumeFlowRate2023(
466 16 ratedEvaporatorFanPowerPerVolumeFlowRate2023);
467 }
468
469 /// @cond
470 8 CoilCoolingDXVariableSpeedSpeedData::CoilCoolingDXVariableSpeedSpeedData(std::shared_ptr<detail::CoilCoolingDXVariableSpeedSpeedData_Impl> impl)
471
1/1
✓ Branch 3 taken 8 times.
8 : ParentObject(std::move(impl)) {}
472 /// @endcond
473
474 } // namespace model
475 } // namespace openstudio
476