src/model/CoilHeatingLowTempRadiantVarFlow.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 "CoilHeatingLowTempRadiantVarFlow.hpp" | ||
| 7 | #include "CoilHeatingLowTempRadiantVarFlow_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_Heating_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 | CoilHeatingLowTempRadiantVarFlow_Impl::CoilHeatingLowTempRadiantVarFlow_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() == CoilHeatingLowTempRadiantVarFlow::iddObjectType()); |
| 40 | 11 | } | |
| 41 | |||
| 42 | 2 | CoilHeatingLowTempRadiantVarFlow_Impl::CoilHeatingLowTempRadiantVarFlow_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() == CoilHeatingLowTempRadiantVarFlow::iddObjectType()); |
| 46 | 2 | } | |
| 47 | |||
| 48 | 13 | CoilHeatingLowTempRadiantVarFlow_Impl::CoilHeatingLowTempRadiantVarFlow_Impl(const CoilHeatingLowTempRadiantVarFlow_Impl& other, | |
| 49 | 13 | Model_Impl* model, bool keepHandle) | |
| 50 | 13 | : StraightComponent_Impl(other, model, keepHandle) {} | |
| 51 | |||
| 52 | //ModelObject CoilHeatingLowTempRadiantVarFlow_Impl::clone(Model model) const | ||
| 53 | //{ | ||
| 54 | // CoilHeatingLowTempRadiantVarFlow newCoil = WaterToAirComponent_Impl::clone(model).optionalCast<CoilHeatingLowTempRadiantVarFlow>().get(); | ||
| 55 | |||
| 56 | // return newCoil; | ||
| 57 | //} | ||
| 58 | |||
| 59 | ✗ | const std::vector<std::string>& CoilHeatingLowTempRadiantVarFlow_Impl::outputVariableNames() const { | |
| 60 | ✗ | static const std::vector<std::string> result; | |
| 61 | ✗ | return result; | |
| 62 | } | ||
| 63 | |||
| 64 | ✗ | IddObjectType CoilHeatingLowTempRadiantVarFlow_Impl::iddObjectType() const { | |
| 65 | ✗ | return CoilHeatingLowTempRadiantVarFlow::iddObjectType(); | |
| 66 | } | ||
| 67 | |||
| 68 | ✗ | std::vector<ScheduleTypeKey> CoilHeatingLowTempRadiantVarFlow_Impl::getScheduleTypeKeys(const Schedule& schedule) const { | |
| 69 | ✗ | std::vector<ScheduleTypeKey> result; | |
| 70 | ✗ | UnsignedVector fieldIndices = getSourceIndices(schedule.handle()); | |
| 71 | ✗ | UnsignedVector::const_iterator b(fieldIndices.begin()); | |
| 72 | ✗ | UnsignedVector::const_iterator e(fieldIndices.end()); | |
| 73 | |||
| 74 | ✗ | if (std::find(b, e, OS_Coil_Heating_LowTemperatureRadiant_VariableFlowFields::HeatingControlTemperatureScheduleName) != e) { | |
| 75 | ✗ | result.emplace_back("CoilHeatingLowTempRadiantVarFlow", "Heating Control Temperature"); | |
| 76 | } | ||
| 77 | ✗ | return result; | |
| 78 | ✗ | } | |
| 79 | |||
| 80 | 16 | unsigned CoilHeatingLowTempRadiantVarFlow_Impl::inletPort() const { | |
| 81 | 16 | return OS_Coil_Heating_LowTemperatureRadiant_VariableFlowFields::HeatingWaterInletNodeName; | |
| 82 | } | ||
| 83 | |||
| 84 | 39 | unsigned CoilHeatingLowTempRadiantVarFlow_Impl::outletPort() const { | |
| 85 | 39 | return OS_Coil_Heating_LowTemperatureRadiant_VariableFlowFields::HeatingWaterOutletNodeName; | |
| 86 | } | ||
| 87 | |||
| 88 | 6 | boost::optional<ZoneHVACComponent> CoilHeatingLowTempRadiantVarFlow_Impl::containingZoneHVACComponent() const { | |
| 89 | 6 | std::vector<ZoneHVACLowTempRadiantVarFlow> zoneHVACLowTempRadiantVarFlows; | |
| 90 | |||
| 91 |
2/2✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
|
6 | zoneHVACLowTempRadiantVarFlows = this->model().getConcreteModelObjects<ZoneHVACLowTempRadiantVarFlow>(); |
| 92 | |||
| 93 |
2/2✓ Branch 5 taken 6 times.
✓ Branch 6 taken 2 times.
|
8 | for (const auto& zoneHVACLowTempRadiantVarFlow : zoneHVACLowTempRadiantVarFlows) { |
| 94 |
3/3✓ Branch 1 taken 6 times.
✓ Branch 3 taken 4 times.
✓ Branch 4 taken 2 times.
|
12 | if (boost::optional<HVACComponent> coil = zoneHVACLowTempRadiantVarFlow.heatingCoil()) { |
| 95 |
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()) { |
| 96 |
1/1✓ Branch 1 taken 4 times.
|
4 | return zoneHVACLowTempRadiantVarFlow; |
| 97 | } | ||
| 98 | 6 | } | |
| 99 | } | ||
| 100 | 2 | return boost::none; | |
| 101 | 6 | } | |
| 102 | |||
| 103 | 1 | boost::optional<double> CoilHeatingLowTempRadiantVarFlow_Impl::maximumHotWaterFlow() const { | |
| 104 | 1 | return getDouble(OS_Coil_Heating_LowTemperatureRadiant_VariableFlowFields::MaximumHotWaterFlow, true); | |
| 105 | } | ||
| 106 | |||
| 107 | 2 | bool CoilHeatingLowTempRadiantVarFlow_Impl::isMaximumHotWaterFlowDefaulted() const { | |
| 108 | 2 | return isEmpty(OS_Coil_Heating_LowTemperatureRadiant_VariableFlowFields::MaximumHotWaterFlow); | |
| 109 | } | ||
| 110 | |||
| 111 | 5 | bool CoilHeatingLowTempRadiantVarFlow_Impl::isMaximumHotWaterFlowAutosized() const { | |
| 112 | 5 | bool result = false; | |
| 113 |
1/1✓ Branch 1 taken 5 times.
|
5 | boost::optional<std::string> value = getString(OS_Coil_Heating_LowTemperatureRadiant_VariableFlowFields::MaximumHotWaterFlow, true); |
| 114 |
1/2✓ Branch 0 taken 5 times.
✗ Branch 1 not taken.
|
5 | if (value) { |
| 115 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
|
10 | result = openstudio::istringEqual(value.get(), "autosize"); |
| 116 | } | ||
| 117 | 5 | return result; | |
| 118 | 5 | } | |
| 119 | |||
| 120 | 5 | double CoilHeatingLowTempRadiantVarFlow_Impl::heatingControlThrottlingRange() const { | |
| 121 |
1/1✓ Branch 1 taken 5 times.
|
5 | boost::optional<double> value = getDouble(OS_Coil_Heating_LowTemperatureRadiant_VariableFlowFields::HeatingControlThrottlingRange, true); |
| 122 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
|
5 | OS_ASSERT(value); |
| 123 |
1/1✓ Branch 1 taken 5 times.
|
10 | return value.get(); |
| 124 | } | ||
| 125 | |||
| 126 | 2 | bool CoilHeatingLowTempRadiantVarFlow_Impl::isHeatingControlThrottlingRangeDefaulted() const { | |
| 127 | 2 | return isEmpty(OS_Coil_Heating_LowTemperatureRadiant_VariableFlowFields::HeatingControlThrottlingRange); | |
| 128 | } | ||
| 129 | |||
| 130 | 4 | boost::optional<Schedule> CoilHeatingLowTempRadiantVarFlow_Impl::heatingControlTemperatureSchedule() const { | |
| 131 |
1/1✓ Branch 1 taken 4 times.
|
8 | return getObject<ModelObject>().getModelObjectTarget<Schedule>( |
| 132 |
1/1✓ Branch 1 taken 4 times.
|
8 | OS_Coil_Heating_LowTemperatureRadiant_VariableFlowFields::HeatingControlTemperatureScheduleName); |
| 133 | } | ||
| 134 | |||
| 135 | 1 | bool CoilHeatingLowTempRadiantVarFlow_Impl::setMaximumHotWaterFlow(boost::optional<double> maximumHotWaterFlow) { | |
| 136 | 1 | bool result(false); | |
| 137 |
1/2✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
|
1 | if (maximumHotWaterFlow) { |
| 138 | 1 | result = setDouble(OS_Coil_Heating_LowTemperatureRadiant_VariableFlowFields::MaximumHotWaterFlow, maximumHotWaterFlow.get()); | |
| 139 | } else { | ||
| 140 | ✗ | resetMaximumHotWaterFlow(); | |
| 141 | ✗ | result = true; | |
| 142 | } | ||
| 143 | 1 | return result; | |
| 144 | } | ||
| 145 | |||
| 146 | 1 | void CoilHeatingLowTempRadiantVarFlow_Impl::resetMaximumHotWaterFlow() { | |
| 147 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_Coil_Heating_LowTemperatureRadiant_VariableFlowFields::MaximumHotWaterFlow, ""); |
| 148 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 149 | 1 | } | |
| 150 | |||
| 151 | 1 | void CoilHeatingLowTempRadiantVarFlow_Impl::autosizeMaximumHotWaterFlow() { | |
| 152 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_Coil_Heating_LowTemperatureRadiant_VariableFlowFields::MaximumHotWaterFlow, "autosize"); |
| 153 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 154 | 1 | } | |
| 155 | |||
| 156 | 1 | bool CoilHeatingLowTempRadiantVarFlow_Impl::setHeatingControlThrottlingRange(double heatingControlThrottlingRange) { | |
| 157 | 1 | bool result = setDouble(OS_Coil_Heating_LowTemperatureRadiant_VariableFlowFields::HeatingControlThrottlingRange, heatingControlThrottlingRange); | |
| 158 | 1 | return result; | |
| 159 | } | ||
| 160 | |||
| 161 | 1 | void CoilHeatingLowTempRadiantVarFlow_Impl::resetHeatingControlThrottlingRange() { | |
| 162 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_Coil_Heating_LowTemperatureRadiant_VariableFlowFields::HeatingControlThrottlingRange, ""); |
| 163 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 164 | 1 | } | |
| 165 | |||
| 166 | 10 | bool CoilHeatingLowTempRadiantVarFlow_Impl::setHeatingControlTemperatureSchedule(Schedule& schedule) { | |
| 167 |
3/3✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
|
40 | bool result = setSchedule(OS_Coil_Heating_LowTemperatureRadiant_VariableFlowFields::HeatingControlTemperatureScheduleName, |
| 168 | "CoilHeatingLowTempRadiantVarFlow", "Heating Control Temperature", schedule); | ||
| 169 | 10 | return result; | |
| 170 | } | ||
| 171 | |||
| 172 | ✗ | void CoilHeatingLowTempRadiantVarFlow_Impl::resetHeatingControlTemperatureSchedule() { | |
| 173 | ✗ | bool result = setString(OS_Coil_Heating_LowTemperatureRadiant_VariableFlowFields::HeatingControlTemperatureScheduleName, ""); | |
| 174 | ✗ | OS_ASSERT(result); | |
| 175 | ✗ | } | |
| 176 | |||
| 177 | ✗ | boost::optional<ModelObject> CoilHeatingLowTempRadiantVarFlow_Impl::heatingControlTemperatureScheduleAsModelObject() const { | |
| 178 | ✗ | OptionalModelObject result; | |
| 179 | ✗ | OptionalSchedule intermediate = heatingControlTemperatureSchedule(); | |
| 180 | ✗ | if (intermediate) { | |
| 181 | ✗ | result = *intermediate; | |
| 182 | } | ||
| 183 | ✗ | return result; | |
| 184 | ✗ | } | |
| 185 | |||
| 186 | ✗ | bool CoilHeatingLowTempRadiantVarFlow_Impl::setHeatingControlTemperatureScheduleAsModelObject(const boost::optional<ModelObject>& modelObject) { | |
| 187 | ✗ | if (modelObject) { | |
| 188 | ✗ | OptionalSchedule intermediate = modelObject->optionalCast<Schedule>(); | |
| 189 | ✗ | if (intermediate) { | |
| 190 | ✗ | Schedule schedule(*intermediate); | |
| 191 | ✗ | return setHeatingControlTemperatureSchedule(schedule); | |
| 192 | ✗ | } else { | |
| 193 | ✗ | return false; | |
| 194 | } | ||
| 195 | ✗ | } else { | |
| 196 | ✗ | resetHeatingControlTemperatureSchedule(); | |
| 197 | } | ||
| 198 | ✗ | return true; | |
| 199 | } | ||
| 200 | |||
| 201 | 7 | bool CoilHeatingLowTempRadiantVarFlow_Impl::addToNode(Node& node) { | |
| 202 |
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()) { |
| 203 |
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())) { |
| 204 |
1/1✓ Branch 1 taken 4 times.
|
4 | return StraightComponent_Impl::addToNode(node); |
| 205 | } | ||
| 206 | 7 | } | |
| 207 | |||
| 208 | 3 | return false; | |
| 209 | } | ||
| 210 | |||
| 211 | ✗ | boost::optional<ZoneHVACLowTempRadiantVarFlow> CoilHeatingLowTempRadiantVarFlow_Impl::parentZoneHVAC() const { | |
| 212 | |||
| 213 | ✗ | boost::optional<ZoneHVACLowTempRadiantVarFlow> result; | |
| 214 | |||
| 215 | // This coil performance object can only be found in a ZoneHVACLowTempRadiantVarFlow | ||
| 216 | // Check all ZoneHVACLowTempRadiantVarFlow in the model, seeing if this is inside of one of them. | ||
| 217 | ✗ | boost::optional<ZoneHVACLowTempRadiantVarFlow> parentCoil; | |
| 218 | ✗ | auto zoneHVACs = this->model().getConcreteModelObjects<ZoneHVACLowTempRadiantVarFlow>(); | |
| 219 | ✗ | for (const auto& zoneHVAC : zoneHVACs) { | |
| 220 | ✗ | if (auto hc = zoneHVAC.heatingCoil()) { | |
| 221 | ✗ | if (hc->handle() == this->handle()) { | |
| 222 | ✗ | result = zoneHVAC; | |
| 223 | ✗ | break; | |
| 224 | } | ||
| 225 | ✗ | } | |
| 226 | } | ||
| 227 | |||
| 228 | // Warn if this coil was not found inside a ZoneHVACLowTempRadiantVarFlow | ||
| 229 | ✗ | if (!result) { | |
| 230 | ✗ | LOG(Warn, name().get() + " was not found inside a ZoneHVACLowTempRadiantVarFlow in the model, cannot retrieve the autosized value."); | |
| 231 | ✗ | return result; | |
| 232 | } | ||
| 233 | |||
| 234 | ✗ | return result; | |
| 235 | ✗ | } | |
| 236 | |||
| 237 | 7 | std::string CoilHeatingLowTempRadiantVarFlow_Impl::heatingDesignCapacityMethod() const { | |
| 238 |
1/1✓ Branch 1 taken 7 times.
|
7 | boost::optional<std::string> value = getString(OS_Coil_Heating_LowTemperatureRadiant_VariableFlowFields::HeatingDesignCapacityMethod, true); |
| 239 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 7 times.
✗ Branch 4 not taken.
|
7 | OS_ASSERT(value); |
| 240 |
2/2✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
|
14 | return value.get(); |
| 241 | 7 | } | |
| 242 | |||
| 243 | 12 | bool CoilHeatingLowTempRadiantVarFlow_Impl::setHeatingDesignCapacityMethod(const std::string& heatingDesignCapacityMethod) { | |
| 244 | 12 | bool result = setString(OS_Coil_Heating_LowTemperatureRadiant_VariableFlowFields::HeatingDesignCapacityMethod, heatingDesignCapacityMethod); | |
| 245 | 12 | return result; | |
| 246 | } | ||
| 247 | |||
| 248 | 3 | boost::optional<double> CoilHeatingLowTempRadiantVarFlow_Impl::heatingDesignCapacity() const { | |
| 249 | 3 | return getDouble(OS_Coil_Heating_LowTemperatureRadiant_VariableFlowFields::HeatingDesignCapacity, true); | |
| 250 | } | ||
| 251 | |||
| 252 | 7 | bool CoilHeatingLowTempRadiantVarFlow_Impl::isHeatingDesignCapacityAutosized() const { | |
| 253 | 7 | bool result = false; | |
| 254 |
1/1✓ Branch 1 taken 7 times.
|
7 | boost::optional<std::string> value = getString(OS_Coil_Heating_LowTemperatureRadiant_VariableFlowFields::HeatingDesignCapacity, true); |
| 255 |
1/2✓ Branch 0 taken 7 times.
✗ Branch 1 not taken.
|
7 | if (value) { |
| 256 |
3/3✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 7 taken 7 times.
|
14 | result = openstudio::istringEqual(value.get(), "Autosize"); |
| 257 | } | ||
| 258 | 7 | return result; | |
| 259 | 7 | } | |
| 260 | |||
| 261 | 2 | bool CoilHeatingLowTempRadiantVarFlow_Impl::setHeatingDesignCapacity(double heatingDesignCapacity) { | |
| 262 | 2 | bool result = setDouble(OS_Coil_Heating_LowTemperatureRadiant_VariableFlowFields::HeatingDesignCapacity, heatingDesignCapacity); | |
| 263 | 2 | return result; | |
| 264 | } | ||
| 265 | |||
| 266 | 10 | void CoilHeatingLowTempRadiantVarFlow_Impl::autosizeHeatingDesignCapacity() { | |
| 267 |
2/2✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
|
20 | bool result = setString(OS_Coil_Heating_LowTemperatureRadiant_VariableFlowFields::HeatingDesignCapacity, "Autosize"); |
| 268 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 10 times.
|
10 | OS_ASSERT(result); |
| 269 | 10 | } | |
| 270 | |||
| 271 | 6 | double CoilHeatingLowTempRadiantVarFlow_Impl::heatingDesignCapacityPerFloorArea() const { | |
| 272 |
1/1✓ Branch 1 taken 6 times.
|
6 | boost::optional<double> value = getDouble(OS_Coil_Heating_LowTemperatureRadiant_VariableFlowFields::HeatingDesignCapacityPerFloorArea, true); |
| 273 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 6 times.
✗ Branch 4 not taken.
|
6 | OS_ASSERT(value); |
| 274 |
1/1✓ Branch 1 taken 6 times.
|
12 | return value.get(); |
| 275 | } | ||
| 276 | |||
| 277 | 11 | bool CoilHeatingLowTempRadiantVarFlow_Impl::setHeatingDesignCapacityPerFloorArea(double heatingDesignCapacityPerFloorArea) { | |
| 278 | bool result = | ||
| 279 | 11 | setDouble(OS_Coil_Heating_LowTemperatureRadiant_VariableFlowFields::HeatingDesignCapacityPerFloorArea, heatingDesignCapacityPerFloorArea); | |
| 280 | 11 | return result; | |
| 281 | } | ||
| 282 | |||
| 283 | 7 | double CoilHeatingLowTempRadiantVarFlow_Impl::fractionofAutosizedHeatingDesignCapacity() const { | |
| 284 | boost::optional<double> value = | ||
| 285 |
1/1✓ Branch 1 taken 7 times.
|
7 | getDouble(OS_Coil_Heating_LowTemperatureRadiant_VariableFlowFields::FractionofAutosizedHeatingDesignCapacity, true); |
| 286 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 7 times.
✗ Branch 4 not taken.
|
7 | OS_ASSERT(value); |
| 287 |
1/1✓ Branch 1 taken 7 times.
|
14 | return value.get(); |
| 288 | } | ||
| 289 | |||
| 290 | 12 | bool CoilHeatingLowTempRadiantVarFlow_Impl::setFractionofAutosizedHeatingDesignCapacity(double fractionofAutosizedHeatingDesignCapacity) { | |
| 291 | 12 | bool result = setDouble(OS_Coil_Heating_LowTemperatureRadiant_VariableFlowFields::FractionofAutosizedHeatingDesignCapacity, | |
| 292 | fractionofAutosizedHeatingDesignCapacity); | ||
| 293 | 12 | return result; | |
| 294 | } | ||
| 295 | |||
| 296 | ✗ | boost::optional<double> CoilHeatingLowTempRadiantVarFlow_Impl::autosizedHeatingDesignCapacity() const { | |
| 297 | ✗ | boost::optional<ZoneHVACLowTempRadiantVarFlow> zoneHVAC = parentZoneHVAC(); | |
| 298 | ✗ | boost::optional<double> result; | |
| 299 | ✗ | if (!zoneHVAC) { | |
| 300 | ✗ | return result; | |
| 301 | } | ||
| 302 | |||
| 303 | ✗ | return zoneHVAC->getAutosizedValue("Design Size Heating Design Capacity", "W"); | |
| 304 | ✗ | } | |
| 305 | |||
| 306 | ✗ | boost::optional<double> CoilHeatingLowTempRadiantVarFlow_Impl::autosizedMaximumHotWaterFlow() const { | |
| 307 | ✗ | boost::optional<ZoneHVACLowTempRadiantVarFlow> zoneHVAC = parentZoneHVAC(); | |
| 308 | ✗ | boost::optional<double> result; | |
| 309 | ✗ | if (!zoneHVAC) { | |
| 310 | ✗ | return result; | |
| 311 | } | ||
| 312 | |||
| 313 | ✗ | return zoneHVAC->getAutosizedValue("Design Size Maximum Hot Water Flow", "m3/s"); | |
| 314 | ✗ | } | |
| 315 | |||
| 316 | ✗ | void CoilHeatingLowTempRadiantVarFlow_Impl::autosize() { | |
| 317 | ✗ | autosizeMaximumHotWaterFlow(); | |
| 318 | ✗ | autosizeHeatingDesignCapacity(); | |
| 319 | ✗ | } | |
| 320 | |||
| 321 | ✗ | void CoilHeatingLowTempRadiantVarFlow_Impl::applySizingValues() { | |
| 322 | ✗ | boost::optional<double> val; | |
| 323 | ✗ | val = autosizedMaximumHotWaterFlow(); | |
| 324 | ✗ | if (val) { | |
| 325 | ✗ | setMaximumHotWaterFlow(val.get()); | |
| 326 | } | ||
| 327 | ✗ | val = autosizedHeatingDesignCapacity(); | |
| 328 | ✗ | if (val) { | |
| 329 | ✗ | setHeatingDesignCapacity(val.get()); | |
| 330 | } | ||
| 331 | ✗ | } | |
| 332 | |||
| 333 | ✗ | ComponentType CoilHeatingLowTempRadiantVarFlow_Impl::componentType() const { | |
| 334 | ✗ | return ComponentType::Heating; | |
| 335 | } | ||
| 336 | |||
| 337 | ✗ | std::vector<FuelType> CoilHeatingLowTempRadiantVarFlow_Impl::coolingFuelTypes() const { | |
| 338 | ✗ | return {}; | |
| 339 | } | ||
| 340 | |||
| 341 | ✗ | std::vector<FuelType> CoilHeatingLowTempRadiantVarFlow_Impl::heatingFuelTypes() const { | |
| 342 | ✗ | if (auto p_ = plantLoop()) { | |
| 343 | ✗ | return p_->heatingFuelTypes(); | |
| 344 | ✗ | } | |
| 345 | ✗ | return {}; | |
| 346 | } | ||
| 347 | |||
| 348 | ✗ | std::vector<AppGFuelType> CoilHeatingLowTempRadiantVarFlow_Impl::appGHeatingFuelTypes() const { | |
| 349 | ✗ | if (auto p_ = plantLoop()) { | |
| 350 | ✗ | return p_->appGHeatingFuelTypes(); | |
| 351 | ✗ | } | |
| 352 | ✗ | return {}; | |
| 353 | } | ||
| 354 | |||
| 355 | } // namespace detail | ||
| 356 | |||
| 357 | 9 | CoilHeatingLowTempRadiantVarFlow::CoilHeatingLowTempRadiantVarFlow(const Model& model, Schedule& heatingControlTemperature) | |
| 358 | |||
| 359 | 9 | : StraightComponent(CoilHeatingLowTempRadiantVarFlow::iddObjectType(), model) { | |
| 360 |
1/3✗ Branch 2 not taken.
✓ Branch 3 taken 9 times.
✗ Branch 5 not taken.
|
9 | OS_ASSERT(getImpl<detail::CoilHeatingLowTempRadiantVarFlow_Impl>()); |
| 361 | |||
| 362 |
1/1✓ Branch 1 taken 9 times.
|
9 | bool ok = setHeatingControlTemperatureSchedule(heatingControlTemperature); |
| 363 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 9 times.
✗ Branch 3 not taken.
|
9 | OS_ASSERT(ok); |
| 364 | |||
| 365 |
2/2✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
|
9 | ok = setHeatingDesignCapacityMethod("HeatingDesignCapacity"); |
| 366 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 9 times.
✗ Branch 3 not taken.
|
9 | OS_ASSERT(ok); |
| 367 |
1/1✓ Branch 1 taken 9 times.
|
9 | autosizeHeatingDesignCapacity(); |
| 368 |
1/1✓ Branch 1 taken 9 times.
|
9 | ok = setHeatingDesignCapacityPerFloorArea(0); |
| 369 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 9 times.
✗ Branch 3 not taken.
|
9 | OS_ASSERT(ok); |
| 370 |
1/1✓ Branch 1 taken 9 times.
|
9 | ok = setFractionofAutosizedHeatingDesignCapacity(1.0); |
| 371 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 9 times.
✗ Branch 3 not taken.
|
9 | OS_ASSERT(ok); |
| 372 | 9 | } | |
| 373 | |||
| 374 | ✗ | std::vector<std::string> CoilHeatingLowTempRadiantVarFlow::heatingDesignCapacityMethodValues() { | |
| 375 | ✗ | return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), | |
| 376 | ✗ | OS_Coil_Heating_LowTemperatureRadiant_VariableFlowFields::HeatingDesignCapacityMethod); | |
| 377 | } | ||
| 378 | |||
| 379 | 7620 | IddObjectType CoilHeatingLowTempRadiantVarFlow::iddObjectType() { | |
| 380 |
1/1✓ Branch 1 taken 7620 times.
|
7620 | return {IddObjectType::OS_Coil_Heating_LowTemperatureRadiant_VariableFlow}; |
| 381 | } | ||
| 382 | |||
| 383 | 1 | boost::optional<double> CoilHeatingLowTempRadiantVarFlow::maximumHotWaterFlow() const { | |
| 384 |
1/1✓ Branch 3 taken 1 time.
|
1 | return getImpl<detail::CoilHeatingLowTempRadiantVarFlow_Impl>()->maximumHotWaterFlow(); |
| 385 | } | ||
| 386 | |||
| 387 | 2 | bool CoilHeatingLowTempRadiantVarFlow::isMaximumHotWaterFlowDefaulted() const { | |
| 388 |
1/1✓ Branch 3 taken 2 times.
|
2 | return getImpl<detail::CoilHeatingLowTempRadiantVarFlow_Impl>()->isMaximumHotWaterFlowDefaulted(); |
| 389 | } | ||
| 390 | |||
| 391 | 5 | bool CoilHeatingLowTempRadiantVarFlow::isMaximumHotWaterFlowAutosized() const { | |
| 392 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::CoilHeatingLowTempRadiantVarFlow_Impl>()->isMaximumHotWaterFlowAutosized(); |
| 393 | } | ||
| 394 | |||
| 395 | 5 | double CoilHeatingLowTempRadiantVarFlow::heatingControlThrottlingRange() const { | |
| 396 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::CoilHeatingLowTempRadiantVarFlow_Impl>()->heatingControlThrottlingRange(); |
| 397 | } | ||
| 398 | |||
| 399 | 2 | bool CoilHeatingLowTempRadiantVarFlow::isHeatingControlThrottlingRangeDefaulted() const { | |
| 400 |
1/1✓ Branch 3 taken 2 times.
|
2 | return getImpl<detail::CoilHeatingLowTempRadiantVarFlow_Impl>()->isHeatingControlThrottlingRangeDefaulted(); |
| 401 | } | ||
| 402 | |||
| 403 | 4 | boost::optional<Schedule> CoilHeatingLowTempRadiantVarFlow::heatingControlTemperatureSchedule() const { | |
| 404 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::CoilHeatingLowTempRadiantVarFlow_Impl>()->heatingControlTemperatureSchedule(); |
| 405 | } | ||
| 406 | |||
| 407 | 1 | bool CoilHeatingLowTempRadiantVarFlow::setMaximumHotWaterFlow(double maximumHotWaterFlow) { | |
| 408 |
2/2✓ Branch 3 taken 1 time.
✓ Branch 6 taken 1 time.
|
1 | return getImpl<detail::CoilHeatingLowTempRadiantVarFlow_Impl>()->setMaximumHotWaterFlow(maximumHotWaterFlow); |
| 409 | } | ||
| 410 | |||
| 411 | 1 | void CoilHeatingLowTempRadiantVarFlow::resetMaximumHotWaterFlow() { | |
| 412 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::CoilHeatingLowTempRadiantVarFlow_Impl>()->resetMaximumHotWaterFlow(); |
| 413 | 1 | } | |
| 414 | |||
| 415 | 1 | void CoilHeatingLowTempRadiantVarFlow::autosizeMaximumHotWaterFlow() { | |
| 416 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::CoilHeatingLowTempRadiantVarFlow_Impl>()->autosizeMaximumHotWaterFlow(); |
| 417 | 1 | } | |
| 418 | |||
| 419 | 1 | bool CoilHeatingLowTempRadiantVarFlow::setHeatingControlThrottlingRange(double heatingControlThrottlingRange) { | |
| 420 |
1/1✓ Branch 3 taken 1 time.
|
1 | return getImpl<detail::CoilHeatingLowTempRadiantVarFlow_Impl>()->setHeatingControlThrottlingRange(heatingControlThrottlingRange); |
| 421 | } | ||
| 422 | |||
| 423 | 1 | void CoilHeatingLowTempRadiantVarFlow::resetHeatingControlThrottlingRange() { | |
| 424 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::CoilHeatingLowTempRadiantVarFlow_Impl>()->resetHeatingControlThrottlingRange(); |
| 425 | 1 | } | |
| 426 | |||
| 427 | 10 | bool CoilHeatingLowTempRadiantVarFlow::setHeatingControlTemperatureSchedule(Schedule& schedule) { | |
| 428 |
1/1✓ Branch 3 taken 10 times.
|
10 | return getImpl<detail::CoilHeatingLowTempRadiantVarFlow_Impl>()->setHeatingControlTemperatureSchedule(schedule); |
| 429 | } | ||
| 430 | |||
| 431 | ✗ | void CoilHeatingLowTempRadiantVarFlow::resetHeatingControlTemperatureSchedule() { | |
| 432 | ✗ | getImpl<detail::CoilHeatingLowTempRadiantVarFlow_Impl>()->resetHeatingControlTemperatureSchedule(); | |
| 433 | ✗ | } | |
| 434 | |||
| 435 | ✗ | boost::optional<double> CoilHeatingLowTempRadiantVarFlow::autosizedMaximumHotWaterFlow() const { | |
| 436 | ✗ | return getImpl<detail::CoilHeatingLowTempRadiantVarFlow_Impl>()->autosizedMaximumHotWaterFlow(); | |
| 437 | } | ||
| 438 | |||
| 439 | ✗ | boost::optional<ZoneHVACLowTempRadiantVarFlow> CoilHeatingLowTempRadiantVarFlow::parentZoneHVAC() const { | |
| 440 | ✗ | return getImpl<detail::CoilHeatingLowTempRadiantVarFlow_Impl>()->parentZoneHVAC(); | |
| 441 | } | ||
| 442 | |||
| 443 | 7 | std::string CoilHeatingLowTempRadiantVarFlow::heatingDesignCapacityMethod() const { | |
| 444 |
1/1✓ Branch 3 taken 7 times.
|
7 | return getImpl<detail::CoilHeatingLowTempRadiantVarFlow_Impl>()->heatingDesignCapacityMethod(); |
| 445 | } | ||
| 446 | |||
| 447 | 12 | bool CoilHeatingLowTempRadiantVarFlow::setHeatingDesignCapacityMethod(const std::string& heatingDesignCapacityMethod) { | |
| 448 |
1/1✓ Branch 3 taken 12 times.
|
12 | return getImpl<detail::CoilHeatingLowTempRadiantVarFlow_Impl>()->setHeatingDesignCapacityMethod(heatingDesignCapacityMethod); |
| 449 | } | ||
| 450 | |||
| 451 | 3 | boost::optional<double> CoilHeatingLowTempRadiantVarFlow::heatingDesignCapacity() const { | |
| 452 |
1/1✓ Branch 3 taken 3 times.
|
3 | return getImpl<detail::CoilHeatingLowTempRadiantVarFlow_Impl>()->heatingDesignCapacity(); |
| 453 | } | ||
| 454 | |||
| 455 | 7 | bool CoilHeatingLowTempRadiantVarFlow::isHeatingDesignCapacityAutosized() const { | |
| 456 |
1/1✓ Branch 3 taken 7 times.
|
7 | return getImpl<detail::CoilHeatingLowTempRadiantVarFlow_Impl>()->isHeatingDesignCapacityAutosized(); |
| 457 | } | ||
| 458 | |||
| 459 | 2 | bool CoilHeatingLowTempRadiantVarFlow::setHeatingDesignCapacity(double heatingDesignCapacity) { | |
| 460 |
1/1✓ Branch 3 taken 2 times.
|
2 | return getImpl<detail::CoilHeatingLowTempRadiantVarFlow_Impl>()->setHeatingDesignCapacity(heatingDesignCapacity); |
| 461 | } | ||
| 462 | |||
| 463 | 10 | void CoilHeatingLowTempRadiantVarFlow::autosizeHeatingDesignCapacity() { | |
| 464 |
1/1✓ Branch 3 taken 10 times.
|
10 | return getImpl<detail::CoilHeatingLowTempRadiantVarFlow_Impl>()->autosizeHeatingDesignCapacity(); |
| 465 | } | ||
| 466 | |||
| 467 | ✗ | boost::optional<double> CoilHeatingLowTempRadiantVarFlow::autosizedHeatingDesignCapacity() const { | |
| 468 | ✗ | return getImpl<detail::CoilHeatingLowTempRadiantVarFlow_Impl>()->autosizedHeatingDesignCapacity(); | |
| 469 | } | ||
| 470 | |||
| 471 | 6 | double CoilHeatingLowTempRadiantVarFlow::heatingDesignCapacityPerFloorArea() const { | |
| 472 |
1/1✓ Branch 3 taken 6 times.
|
6 | return getImpl<detail::CoilHeatingLowTempRadiantVarFlow_Impl>()->heatingDesignCapacityPerFloorArea(); |
| 473 | } | ||
| 474 | |||
| 475 | 11 | bool CoilHeatingLowTempRadiantVarFlow::setHeatingDesignCapacityPerFloorArea(double heatingDesignCapacityPerFloorArea) { | |
| 476 |
1/1✓ Branch 3 taken 11 times.
|
11 | return getImpl<detail::CoilHeatingLowTempRadiantVarFlow_Impl>()->setHeatingDesignCapacityPerFloorArea(heatingDesignCapacityPerFloorArea); |
| 477 | } | ||
| 478 | |||
| 479 | 7 | double CoilHeatingLowTempRadiantVarFlow::fractionofAutosizedHeatingDesignCapacity() const { | |
| 480 |
1/1✓ Branch 3 taken 7 times.
|
7 | return getImpl<detail::CoilHeatingLowTempRadiantVarFlow_Impl>()->fractionofAutosizedHeatingDesignCapacity(); |
| 481 | } | ||
| 482 | |||
| 483 | 12 | bool CoilHeatingLowTempRadiantVarFlow::setFractionofAutosizedHeatingDesignCapacity(double fractionofAutosizedHeatingDesignCapacity) { | |
| 484 |
1/1✓ Branch 3 taken 12 times.
|
24 | return getImpl<detail::CoilHeatingLowTempRadiantVarFlow_Impl>()->setFractionofAutosizedHeatingDesignCapacity( |
| 485 | 24 | fractionofAutosizedHeatingDesignCapacity); | |
| 486 | } | ||
| 487 | |||
| 488 | /// @cond | ||
| 489 | 10 | CoilHeatingLowTempRadiantVarFlow::CoilHeatingLowTempRadiantVarFlow(std::shared_ptr<detail::CoilHeatingLowTempRadiantVarFlow_Impl> impl) | |
| 490 |
1/1✓ Branch 3 taken 10 times.
|
10 | : StraightComponent(std::move(impl)) {} |
| 491 | /// @endcond | ||
| 492 | |||
| 493 | } // namespace model | ||
| 494 | } // namespace openstudio | ||
| 495 |