GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 67.2% 223 / 0 / 332
Functions: 76.1% 70 / 0 / 92
Branches: 48.3% 127 / 0 / 263

src/model/CoilCoolingLowTempRadiantVarFlow.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 "CoilCoolingLowTempRadiantVarFlow.hpp"
7 #include "CoilCoolingLowTempRadiantVarFlow_Impl.hpp"
8
9 #include "ZoneHVACComponent.hpp"
10 #include "ZoneHVACComponent_Impl.hpp"
11 #include "ZoneHVACLowTempRadiantVarFlow.hpp"
12 #include "ZoneHVACLowTempRadiantVarFlow_Impl.hpp"
13 #include "Schedule.hpp"
14 #include "Schedule_Impl.hpp"
15 #include "ScheduleTypeLimits.hpp"
16 #include "ScheduleTypeRegistry.hpp"
17 #include "Model.hpp"
18 #include "Model_Impl.hpp"
19 #include "Node.hpp"
20 #include "Node_Impl.hpp"
21 #include "PlantLoop.hpp"
22 #include "PlantLoop_Impl.hpp"
23
24 #include <utilities/idd/IddFactory.hxx>
25
26 #include <utilities/idd/OS_Coil_Cooling_LowTemperatureRadiant_VariableFlow_FieldEnums.hxx>
27 #include <utilities/idd/IddEnums.hxx>
28
29 #include "../utilities/core/Assert.hpp"
30 #include "../utilities/data/DataEnums.hpp"
31
32 namespace openstudio {
33 namespace model {
34
35 namespace detail {
36
37 11 CoilCoolingLowTempRadiantVarFlow_Impl::CoilCoolingLowTempRadiantVarFlow_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle)
38 11 : StraightComponent_Impl(idfObject, model, keepHandle) {
39
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() == CoilCoolingLowTempRadiantVarFlow::iddObjectType());
40 11 }
41
42 2 CoilCoolingLowTempRadiantVarFlow_Impl::CoilCoolingLowTempRadiantVarFlow_Impl(const openstudio::detail::WorkspaceObject_Impl& other,
43 2 Model_Impl* model, bool keepHandle)
44 2 : StraightComponent_Impl(other, model, keepHandle) {
45
4/6
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 2 times.
✗ Branch 13 not taken.
2 OS_ASSERT(other.iddObject().type() == CoilCoolingLowTempRadiantVarFlow::iddObjectType());
46 2 }
47
48 11 CoilCoolingLowTempRadiantVarFlow_Impl::CoilCoolingLowTempRadiantVarFlow_Impl(const CoilCoolingLowTempRadiantVarFlow_Impl& other,
49 11 Model_Impl* model, bool keepHandle)
50 11 : StraightComponent_Impl(other, model, keepHandle) {}
51
52 ✗ const std::vector<std::string>& CoilCoolingLowTempRadiantVarFlow_Impl::outputVariableNames() const {
53 ✗ static const std::vector<std::string> result;
54 ✗ return result;
55 }
56
57 ✗ IddObjectType CoilCoolingLowTempRadiantVarFlow_Impl::iddObjectType() const {
58 ✗ return CoilCoolingLowTempRadiantVarFlow::iddObjectType();
59 }
60
61 14 unsigned CoilCoolingLowTempRadiantVarFlow_Impl::inletPort() const {
62 14 return OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::CoolingWaterInletNodeName;
63 }
64
65 29 unsigned CoilCoolingLowTempRadiantVarFlow_Impl::outletPort() const {
66 29 return OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::CoolingWaterOutletNodeName;
67 }
68
69 ✗ std::vector<ScheduleTypeKey> CoilCoolingLowTempRadiantVarFlow_Impl::getScheduleTypeKeys(const Schedule& schedule) const {
70 ✗ std::vector<ScheduleTypeKey> result;
71 ✗ UnsignedVector fieldIndices = getSourceIndices(schedule.handle());
72 ✗ UnsignedVector::const_iterator b(fieldIndices.begin());
73 ✗ UnsignedVector::const_iterator e(fieldIndices.end());
74 ✗ if (std::find(b, e, OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::CoolingControlTemperatureScheduleName) != e) {
75 ✗ result.emplace_back("CoilCoolingLowTempRadiantVarFlow", "Cooling Control Temperature Schedule");
76 }
77 ✗ return result;
78 ✗ }
79
80 4 boost::optional<ZoneHVACComponent> CoilCoolingLowTempRadiantVarFlow_Impl::containingZoneHVACComponent() const {
81
82 4 std::vector<ZoneHVACLowTempRadiantVarFlow> zoneHVACLowTempRadiantVarFlows;
83
84
2/2
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
4 zoneHVACLowTempRadiantVarFlows = this->model().getConcreteModelObjects<ZoneHVACLowTempRadiantVarFlow>();
85
86
1/2
✓ Branch 5 taken 4 times.
✗ Branch 6 not taken.
4 for (const auto& zoneHVACLowTempRadiantVarFlow : zoneHVACLowTempRadiantVarFlows) {
87
2/3
✓ Branch 1 taken 4 times.
✓ Branch 3 taken 4 times.
✗ Branch 4 not taken.
8 if (boost::optional<HVACComponent> coil = zoneHVACLowTempRadiantVarFlow.coolingCoil()) {
88
5/6
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
✓ Branch 10 taken 4 times.
✓ Branch 12 taken 4 times.
✗ Branch 13 not taken.
4 if (coil->handle() == this->handle()) {
89
1/1
✓ Branch 1 taken 4 times.
4 return zoneHVACLowTempRadiantVarFlow;
90 }
91 4 }
92 }
93 ✗ return boost::none;
94 4 }
95
96 4 boost::optional<Schedule> CoilCoolingLowTempRadiantVarFlow_Impl::coolingControlTemperatureSchedule() const {
97
1/1
✓ Branch 1 taken 4 times.
8 return getObject<ModelObject>().getModelObjectTarget<Schedule>(
98
1/1
✓ Branch 1 taken 4 times.
8 OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::CoolingControlTemperatureScheduleName);
99 }
100
101 1 boost::optional<double> CoilCoolingLowTempRadiantVarFlow_Impl::maximumColdWaterFlow() const {
102 1 return getDouble(OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::MaximumColdWaterFlow, true);
103 }
104
105 2 bool CoilCoolingLowTempRadiantVarFlow_Impl::isMaximumColdWaterFlowDefaulted() const {
106 2 return isEmpty(OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::MaximumColdWaterFlow);
107 }
108
109 5 bool CoilCoolingLowTempRadiantVarFlow_Impl::isMaximumColdWaterFlowAutosized() const {
110 5 bool result = false;
111
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<std::string> value = getString(OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::MaximumColdWaterFlow, true);
112
1/2
✓ Branch 0 taken 5 times.
✗ Branch 1 not taken.
5 if (value) {
113
3/3
✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
10 result = openstudio::istringEqual(value.get(), "autosize");
114 }
115 5 return result;
116 5 }
117
118 5 double CoilCoolingLowTempRadiantVarFlow_Impl::coolingControlThrottlingRange() const {
119
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<double> value = getDouble(OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::CoolingControlThrottlingRange, true);
120
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
5 OS_ASSERT(value);
121
1/1
✓ Branch 1 taken 5 times.
10 return value.get();
122 }
123
124 2 bool CoilCoolingLowTempRadiantVarFlow_Impl::isCoolingControlThrottlingRangeDefaulted() const {
125 2 return isEmpty(OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::CoolingControlThrottlingRange);
126 }
127
128 5 std::string CoilCoolingLowTempRadiantVarFlow_Impl::condensationControlType() const {
129
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<std::string> value = getString(OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::CondensationControlType, true);
130
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
5 OS_ASSERT(value);
131
2/2
✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
10 return value.get();
132 5 }
133
134 2 bool CoilCoolingLowTempRadiantVarFlow_Impl::isCondensationControlTypeDefaulted() const {
135 2 return isEmpty(OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::CondensationControlType);
136 }
137
138 5 double CoilCoolingLowTempRadiantVarFlow_Impl::condensationControlDewpointOffset() const {
139
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<double> value = getDouble(OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::CondensationControlDewpointOffset, true);
140
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
5 OS_ASSERT(value);
141
1/1
✓ Branch 1 taken 5 times.
10 return value.get();
142 }
143
144 2 bool CoilCoolingLowTempRadiantVarFlow_Impl::isCondensationControlDewpointOffsetDefaulted() const {
145 2 return isEmpty(OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::CondensationControlDewpointOffset);
146 }
147
148 10 bool CoilCoolingLowTempRadiantVarFlow_Impl::setCoolingControlTemperatureSchedule(Schedule& schedule) {
149
3/3
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
40 bool result = setSchedule(OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::CoolingControlTemperatureScheduleName,
150 "CoilCoolingLowTempRadiantVarFlow", "Cooling Control Temperature Schedule", schedule);
151 10 return result;
152 }
153
154 ✗ void CoilCoolingLowTempRadiantVarFlow_Impl::resetCoolingControlTemperatureSchedule() {
155 ✗ bool result = setString(OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::CoolingControlTemperatureScheduleName, "");
156 ✗ OS_ASSERT(result);
157 ✗ }
158
159 1 bool CoilCoolingLowTempRadiantVarFlow_Impl::setMaximumColdWaterFlow(boost::optional<double> maximumColdWaterFlow) {
160 1 bool result(false);
161
1/2
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
1 if (maximumColdWaterFlow) {
162 1 result = setDouble(OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::MaximumColdWaterFlow, maximumColdWaterFlow.get());
163 } else {
164 ✗ resetMaximumColdWaterFlow();
165 ✗ result = true;
166 }
167 1 return result;
168 }
169
170 1 void CoilCoolingLowTempRadiantVarFlow_Impl::resetMaximumColdWaterFlow() {
171
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::MaximumColdWaterFlow, "");
172
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
173 1 }
174
175 1 void CoilCoolingLowTempRadiantVarFlow_Impl::autosizeMaximumColdWaterFlow() {
176
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::MaximumColdWaterFlow, "autosize");
177
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
178 1 }
179
180 1 bool CoilCoolingLowTempRadiantVarFlow_Impl::setCoolingControlThrottlingRange(double coolingControlThrottlingRange) {
181 1 bool result = setDouble(OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::CoolingControlThrottlingRange, coolingControlThrottlingRange);
182 1 return result;
183 }
184
185 1 void CoilCoolingLowTempRadiantVarFlow_Impl::resetCoolingControlThrottlingRange() {
186
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::CoolingControlThrottlingRange, "");
187
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
188 1 }
189
190 1 bool CoilCoolingLowTempRadiantVarFlow_Impl::setCondensationControlType(const std::string& condensationControlType) {
191 1 bool result = setString(OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::CondensationControlType, condensationControlType);
192 1 return result;
193 }
194
195 1 void CoilCoolingLowTempRadiantVarFlow_Impl::resetCondensationControlType() {
196
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::CondensationControlType, "");
197
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
198 1 }
199
200 1 bool CoilCoolingLowTempRadiantVarFlow_Impl::setCondensationControlDewpointOffset(double condensationControlDewpointOffset) {
201 bool result =
202 1 setDouble(OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::CondensationControlDewpointOffset, condensationControlDewpointOffset);
203
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
204 1 return result;
205 }
206
207 1 void CoilCoolingLowTempRadiantVarFlow_Impl::resetCondensationControlDewpointOffset() {
208
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::CondensationControlDewpointOffset, "");
209
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
210 1 }
211
212 ✗ std::vector<std::string> CoilCoolingLowTempRadiantVarFlow_Impl::condensationControlTypeValues() const {
213 ✗ return CoilCoolingLowTempRadiantVarFlow::condensationControlTypeValues();
214 }
215
216 ✗ boost::optional<ModelObject> CoilCoolingLowTempRadiantVarFlow_Impl::coolingControlTemperatureScheduleAsModelObject() const {
217 ✗ OptionalModelObject result;
218 ✗ OptionalSchedule intermediate = coolingControlTemperatureSchedule();
219 ✗ if (intermediate) {
220 ✗ result = *intermediate;
221 }
222 ✗ return result;
223 ✗ }
224
225 ✗ bool CoilCoolingLowTempRadiantVarFlow_Impl::setCoolingControlTemperatureScheduleAsModelObject(const boost::optional<ModelObject>& modelObject) {
226 ✗ if (modelObject) {
227 ✗ OptionalSchedule intermediate = modelObject->optionalCast<Schedule>();
228 ✗ if (intermediate) {
229 ✗ Schedule schedule(*intermediate);
230 ✗ return setCoolingControlTemperatureSchedule(schedule);
231 ✗ } else {
232 ✗ return false;
233 }
234 ✗ } else {
235 ✗ resetCoolingControlTemperatureSchedule();
236 }
237 ✗ return true;
238 }
239
240 7 bool CoilCoolingLowTempRadiantVarFlow_Impl::addToNode(Node& node) {
241
3/3
✓ Branch 1 taken 7 times.
✓ Branch 3 taken 5 times.
✓ Branch 4 taken 2 times.
14 if (boost::optional<PlantLoop> plant = node.plantLoop()) {
242
5/5
✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
✓ Branch 10 taken 4 times.
✓ Branch 11 taken 1 time.
10 if (plant->demandComponent(node.handle())) {
243
1/1
✓ Branch 1 taken 4 times.
4 return StraightComponent_Impl::addToNode(node);
244 }
245 7 }
246
247 3 return false;
248 }
249
250 ✗ boost::optional<ZoneHVACLowTempRadiantVarFlow> CoilCoolingLowTempRadiantVarFlow_Impl::parentZoneHVAC() const {
251
252 ✗ boost::optional<ZoneHVACLowTempRadiantVarFlow> result;
253
254 // This coil performance object can only be found in a ZoneHVACLowTempRadiantVarFlow
255 // Check all ZoneHVACLowTempRadiantVarFlow in the model, seeing if this is inside of one of them.
256 ✗ boost::optional<ZoneHVACLowTempRadiantVarFlow> parentCoil;
257 ✗ auto zoneHVACs = this->model().getConcreteModelObjects<ZoneHVACLowTempRadiantVarFlow>();
258 ✗ for (const auto& zoneHVAC : zoneHVACs) {
259 ✗ if (auto cc = zoneHVAC.coolingCoil()) {
260 ✗ if (cc->handle() == this->handle()) {
261 ✗ result = zoneHVAC;
262 ✗ break;
263 }
264 ✗ }
265 }
266
267 // Warn if this coil was not found inside a ZoneHVACLowTempRadiantVarFlow
268 ✗ if (!result) {
269 ✗ LOG(Warn, name().get() + " was not found inside a ZoneHVACLowTempRadiantVarFlow in the model, cannot retrieve the autosized value.");
270 ✗ return result;
271 }
272
273 ✗ return result;
274 ✗ }
275
276 7 std::string CoilCoolingLowTempRadiantVarFlow_Impl::coolingDesignCapacityMethod() const {
277
1/1
✓ Branch 1 taken 7 times.
7 boost::optional<std::string> value = getString(OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::CoolingDesignCapacityMethod, true);
278
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 7 times.
✗ Branch 4 not taken.
7 OS_ASSERT(value);
279
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
14 return value.get();
280 7 }
281
282 12 bool CoilCoolingLowTempRadiantVarFlow_Impl::setCoolingDesignCapacityMethod(const std::string& coolingDesignCapacityMethod) {
283 12 bool result = setString(OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::CoolingDesignCapacityMethod, coolingDesignCapacityMethod);
284 12 return result;
285 }
286
287 3 boost::optional<double> CoilCoolingLowTempRadiantVarFlow_Impl::coolingDesignCapacity() const {
288 3 return getDouble(OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::CoolingDesignCapacity, true);
289 }
290
291 7 bool CoilCoolingLowTempRadiantVarFlow_Impl::isCoolingDesignCapacityAutosized() const {
292 7 bool result = false;
293
1/1
✓ Branch 1 taken 7 times.
7 boost::optional<std::string> value = getString(OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::CoolingDesignCapacity, true);
294
1/2
✓ Branch 0 taken 7 times.
✗ Branch 1 not taken.
7 if (value) {
295
3/3
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 7 taken 7 times.
14 result = openstudio::istringEqual(value.get(), "Autosize");
296 }
297 7 return result;
298 7 }
299
300 2 bool CoilCoolingLowTempRadiantVarFlow_Impl::setCoolingDesignCapacity(double coolingDesignCapacity) {
301 2 bool result = setDouble(OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::CoolingDesignCapacity, coolingDesignCapacity);
302 2 return result;
303 }
304
305 10 void CoilCoolingLowTempRadiantVarFlow_Impl::autosizeCoolingDesignCapacity() {
306
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
20 bool result = setString(OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::CoolingDesignCapacity, "Autosize");
307
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 10 times.
10 OS_ASSERT(result);
308 10 }
309
310 6 double CoilCoolingLowTempRadiantVarFlow_Impl::coolingDesignCapacityPerFloorArea() const {
311
1/1
✓ Branch 1 taken 6 times.
6 boost::optional<double> value = getDouble(OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::CoolingDesignCapacityPerFloorArea, true);
312
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 6 times.
✗ Branch 4 not taken.
6 OS_ASSERT(value);
313
1/1
✓ Branch 1 taken 6 times.
12 return value.get();
314 }
315
316 11 bool CoilCoolingLowTempRadiantVarFlow_Impl::setCoolingDesignCapacityPerFloorArea(double coolingDesignCapacityPerFloorArea) {
317 bool result =
318 11 setDouble(OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::CoolingDesignCapacityPerFloorArea, coolingDesignCapacityPerFloorArea);
319 11 return result;
320 }
321
322 7 double CoilCoolingLowTempRadiantVarFlow_Impl::fractionofAutosizedCoolingDesignCapacity() const {
323 boost::optional<double> value =
324
1/1
✓ Branch 1 taken 7 times.
7 getDouble(OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::FractionofAutosizedCoolingDesignCapacity, true);
325
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 7 times.
✗ Branch 4 not taken.
7 OS_ASSERT(value);
326
1/1
✓ Branch 1 taken 7 times.
14 return value.get();
327 }
328
329 12 bool CoilCoolingLowTempRadiantVarFlow_Impl::setFractionofAutosizedCoolingDesignCapacity(double fractionofAutosizedCoolingDesignCapacity) {
330 12 bool result = setDouble(OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::FractionofAutosizedCoolingDesignCapacity,
331 fractionofAutosizedCoolingDesignCapacity);
332 12 return result;
333 }
334
335 ✗ boost::optional<double> CoilCoolingLowTempRadiantVarFlow_Impl::autosizedCoolingDesignCapacity() const {
336 ✗ boost::optional<ZoneHVACLowTempRadiantVarFlow> zoneHVAC = parentZoneHVAC();
337 ✗ boost::optional<double> result;
338 ✗ if (!zoneHVAC) {
339 ✗ return result;
340 }
341
342 ✗ return zoneHVAC->getAutosizedValue("Design Size Cooling Design Capacity", "W");
343 ✗ }
344
345 ✗ boost::optional<double> CoilCoolingLowTempRadiantVarFlow_Impl::autosizedMaximumColdWaterFlow() const {
346 ✗ boost::optional<ZoneHVACLowTempRadiantVarFlow> zoneHVAC = parentZoneHVAC();
347 ✗ boost::optional<double> result;
348 ✗ if (!zoneHVAC) {
349 ✗ return result;
350 }
351
352 ✗ return zoneHVAC->getAutosizedValue("Design Size Maximum Cold Water Flow", "m3/s");
353 ✗ }
354
355 ✗ void CoilCoolingLowTempRadiantVarFlow_Impl::autosize() {
356 ✗ autosizeMaximumColdWaterFlow();
357 ✗ autosizeCoolingDesignCapacity();
358 ✗ }
359
360 ✗ void CoilCoolingLowTempRadiantVarFlow_Impl::applySizingValues() {
361 ✗ boost::optional<double> val;
362 ✗ val = autosizedMaximumColdWaterFlow();
363 ✗ if (val) {
364 ✗ setMaximumColdWaterFlow(val.get());
365 }
366 ✗ val = autosizedCoolingDesignCapacity();
367 ✗ if (val) {
368 ✗ setCoolingDesignCapacity(val.get());
369 }
370 ✗ }
371
372 ✗ ComponentType CoilCoolingLowTempRadiantVarFlow_Impl::componentType() const {
373 ✗ return ComponentType::Cooling;
374 }
375
376 ✗ std::vector<FuelType> CoilCoolingLowTempRadiantVarFlow_Impl::coolingFuelTypes() const {
377 ✗ if (auto p_ = plantLoop()) {
378 ✗ return p_->coolingFuelTypes();
379 ✗ }
380 ✗ return {};
381 }
382
383 ✗ std::vector<FuelType> CoilCoolingLowTempRadiantVarFlow_Impl::heatingFuelTypes() const {
384 ✗ return {};
385 }
386
387 ✗ std::vector<AppGFuelType> CoilCoolingLowTempRadiantVarFlow_Impl::appGHeatingFuelTypes() const {
388 ✗ return {};
389 }
390
391 } // namespace detail
392
393 9 CoilCoolingLowTempRadiantVarFlow::CoilCoolingLowTempRadiantVarFlow(const Model& model, Schedule& coolingControlTemperatureSchedule)
394 9 : StraightComponent(CoilCoolingLowTempRadiantVarFlow::iddObjectType(), model) {
395
1/3
✗ Branch 2 not taken.
✓ Branch 3 taken 9 times.
✗ Branch 5 not taken.
9 OS_ASSERT(getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>());
396
397
1/1
✓ Branch 1 taken 9 times.
9 bool ok = setCoolingControlTemperatureSchedule(coolingControlTemperatureSchedule);
398
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 9 times.
✗ Branch 3 not taken.
9 OS_ASSERT(ok);
399
400
2/2
✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
9 ok = setCoolingDesignCapacityMethod("CoolingDesignCapacity");
401
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 9 times.
✗ Branch 3 not taken.
9 OS_ASSERT(ok);
402
1/1
✓ Branch 1 taken 9 times.
9 autosizeCoolingDesignCapacity();
403
1/1
✓ Branch 1 taken 9 times.
9 ok = setCoolingDesignCapacityPerFloorArea(0);
404
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 9 times.
✗ Branch 3 not taken.
9 OS_ASSERT(ok);
405
1/1
✓ Branch 1 taken 9 times.
9 ok = setFractionofAutosizedCoolingDesignCapacity(1.0);
406
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 9 times.
✗ Branch 3 not taken.
9 OS_ASSERT(ok);
407 9 }
408
409 7620 IddObjectType CoilCoolingLowTempRadiantVarFlow::iddObjectType() {
410
1/1
✓ Branch 1 taken 7620 times.
7620 return {IddObjectType::OS_Coil_Cooling_LowTemperatureRadiant_VariableFlow};
411 }
412
413 ✗ std::vector<std::string> CoilCoolingLowTempRadiantVarFlow::condensationControlTypeValues() {
414 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(),
415 ✗ OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::CondensationControlType);
416 }
417
418 ✗ std::vector<std::string> CoilCoolingLowTempRadiantVarFlow::coolingDesignCapacityMethodValues() {
419 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(),
420 ✗ OS_Coil_Cooling_LowTemperatureRadiant_VariableFlowFields::CoolingDesignCapacityMethod);
421 }
422
423 4 boost::optional<Schedule> CoilCoolingLowTempRadiantVarFlow::coolingControlTemperatureSchedule() const {
424
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->coolingControlTemperatureSchedule();
425 }
426
427 1 boost::optional<double> CoilCoolingLowTempRadiantVarFlow::maximumColdWaterFlow() const {
428
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->maximumColdWaterFlow();
429 }
430
431 2 bool CoilCoolingLowTempRadiantVarFlow::isMaximumColdWaterFlowDefaulted() const {
432
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->isMaximumColdWaterFlowDefaulted();
433 }
434
435 5 bool CoilCoolingLowTempRadiantVarFlow::isMaximumColdWaterFlowAutosized() const {
436
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->isMaximumColdWaterFlowAutosized();
437 }
438
439 5 double CoilCoolingLowTempRadiantVarFlow::coolingControlThrottlingRange() const {
440
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->coolingControlThrottlingRange();
441 }
442
443 2 bool CoilCoolingLowTempRadiantVarFlow::isCoolingControlThrottlingRangeDefaulted() const {
444
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->isCoolingControlThrottlingRangeDefaulted();
445 }
446
447 5 std::string CoilCoolingLowTempRadiantVarFlow::condensationControlType() const {
448
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->condensationControlType();
449 }
450
451 2 bool CoilCoolingLowTempRadiantVarFlow::isCondensationControlTypeDefaulted() const {
452
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->isCondensationControlTypeDefaulted();
453 }
454
455 5 double CoilCoolingLowTempRadiantVarFlow::condensationControlDewpointOffset() const {
456
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->condensationControlDewpointOffset();
457 }
458
459 2 bool CoilCoolingLowTempRadiantVarFlow::isCondensationControlDewpointOffsetDefaulted() const {
460
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->isCondensationControlDewpointOffsetDefaulted();
461 }
462
463 1 bool CoilCoolingLowTempRadiantVarFlow::setMaximumColdWaterFlow(double maximumColdWaterFlow) {
464
2/2
✓ Branch 3 taken 1 time.
✓ Branch 6 taken 1 time.
1 return getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->setMaximumColdWaterFlow(maximumColdWaterFlow);
465 }
466
467 1 void CoilCoolingLowTempRadiantVarFlow::resetMaximumColdWaterFlow() {
468
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->resetMaximumColdWaterFlow();
469 1 }
470
471 1 void CoilCoolingLowTempRadiantVarFlow::autosizeMaximumColdWaterFlow() {
472
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->autosizeMaximumColdWaterFlow();
473 1 }
474
475 1 bool CoilCoolingLowTempRadiantVarFlow::setCoolingControlThrottlingRange(double coolingControlThrottlingRange) {
476
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->setCoolingControlThrottlingRange(coolingControlThrottlingRange);
477 }
478
479 1 void CoilCoolingLowTempRadiantVarFlow::resetCoolingControlThrottlingRange() {
480
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->resetCoolingControlThrottlingRange();
481 1 }
482
483 10 bool CoilCoolingLowTempRadiantVarFlow::setCoolingControlTemperatureSchedule(Schedule& schedule) {
484
1/1
✓ Branch 3 taken 10 times.
10 return getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->setCoolingControlTemperatureSchedule(schedule);
485 }
486
487 ✗ void CoilCoolingLowTempRadiantVarFlow::resetCoolingControlTemperatureSchedule() {
488 ✗ getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->resetCoolingControlTemperatureSchedule();
489 ✗ }
490
491 1 bool CoilCoolingLowTempRadiantVarFlow::setCondensationControlType(const std::string& condensationControlType) {
492
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->setCondensationControlType(condensationControlType);
493 }
494
495 1 void CoilCoolingLowTempRadiantVarFlow::resetCondensationControlType() {
496
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->resetCondensationControlType();
497 1 }
498
499 1 bool CoilCoolingLowTempRadiantVarFlow::setCondensationControlDewpointOffset(double condensationControlDewpointOffset) {
500
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->setCondensationControlDewpointOffset(condensationControlDewpointOffset);
501 }
502
503 1 void CoilCoolingLowTempRadiantVarFlow::resetCondensationControlDewpointOffset() {
504
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->resetCondensationControlDewpointOffset();
505 1 }
506
507 ✗ boost::optional<double> CoilCoolingLowTempRadiantVarFlow::autosizedMaximumColdWaterFlow() const {
508 ✗ return getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->autosizedMaximumColdWaterFlow();
509 }
510
511 ✗ boost::optional<ZoneHVACLowTempRadiantVarFlow> CoilCoolingLowTempRadiantVarFlow::parentZoneHVAC() const {
512 ✗ return getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->parentZoneHVAC();
513 }
514
515 7 std::string CoilCoolingLowTempRadiantVarFlow::coolingDesignCapacityMethod() const {
516
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->coolingDesignCapacityMethod();
517 }
518
519 12 bool CoilCoolingLowTempRadiantVarFlow::setCoolingDesignCapacityMethod(const std::string& coolingDesignCapacityMethod) {
520
1/1
✓ Branch 3 taken 12 times.
12 return getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->setCoolingDesignCapacityMethod(coolingDesignCapacityMethod);
521 }
522
523 3 boost::optional<double> CoilCoolingLowTempRadiantVarFlow::coolingDesignCapacity() const {
524
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->coolingDesignCapacity();
525 }
526
527 7 bool CoilCoolingLowTempRadiantVarFlow::isCoolingDesignCapacityAutosized() const {
528
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->isCoolingDesignCapacityAutosized();
529 }
530
531 2 bool CoilCoolingLowTempRadiantVarFlow::setCoolingDesignCapacity(double coolingDesignCapacity) {
532
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->setCoolingDesignCapacity(coolingDesignCapacity);
533 }
534
535 10 void CoilCoolingLowTempRadiantVarFlow::autosizeCoolingDesignCapacity() {
536
1/1
✓ Branch 3 taken 10 times.
10 return getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->autosizeCoolingDesignCapacity();
537 }
538
539 ✗ boost::optional<double> CoilCoolingLowTempRadiantVarFlow::autosizedCoolingDesignCapacity() const {
540 ✗ return getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->autosizedCoolingDesignCapacity();
541 }
542
543 6 double CoilCoolingLowTempRadiantVarFlow::coolingDesignCapacityPerFloorArea() const {
544
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->coolingDesignCapacityPerFloorArea();
545 }
546
547 11 bool CoilCoolingLowTempRadiantVarFlow::setCoolingDesignCapacityPerFloorArea(double coolingDesignCapacityPerFloorArea) {
548
1/1
✓ Branch 3 taken 11 times.
11 return getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->setCoolingDesignCapacityPerFloorArea(coolingDesignCapacityPerFloorArea);
549 }
550
551 7 double CoilCoolingLowTempRadiantVarFlow::fractionofAutosizedCoolingDesignCapacity() const {
552
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->fractionofAutosizedCoolingDesignCapacity();
553 }
554
555 12 bool CoilCoolingLowTempRadiantVarFlow::setFractionofAutosizedCoolingDesignCapacity(double fractionofAutosizedCoolingDesignCapacity) {
556
1/1
✓ Branch 3 taken 12 times.
24 return getImpl<detail::CoilCoolingLowTempRadiantVarFlow_Impl>()->setFractionofAutosizedCoolingDesignCapacity(
557 24 fractionofAutosizedCoolingDesignCapacity);
558 }
559
560 /// @cond
561 8 CoilCoolingLowTempRadiantVarFlow::CoilCoolingLowTempRadiantVarFlow(std::shared_ptr<detail::CoilCoolingLowTempRadiantVarFlow_Impl> impl)
562
1/1
✓ Branch 3 taken 8 times.
8 : StraightComponent(std::move(impl)) {}
563 /// @endcond
564
565 } // namespace model
566 } // namespace openstudio
567