src/model/PumpVariableSpeed.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 "PumpVariableSpeed.hpp" | ||
| 7 | #include "PumpVariableSpeed_Impl.hpp" | ||
| 8 | |||
| 9 | #include "Schedule.hpp" | ||
| 10 | #include "Schedule_Impl.hpp" | ||
| 11 | #include "Node.hpp" | ||
| 12 | #include "Node_Impl.hpp" | ||
| 13 | #include "Curve.hpp" | ||
| 14 | #include "Curve_Impl.hpp" | ||
| 15 | #include "CurveLinear.hpp" | ||
| 16 | #include "CurveLinear_Impl.hpp" | ||
| 17 | #include "CurveQuadratic.hpp" | ||
| 18 | #include "CurveQuadratic_Impl.hpp" | ||
| 19 | #include "CurveCubic.hpp" | ||
| 20 | #include "CurveCubic_Impl.hpp" | ||
| 21 | #include "CurveQuartic.hpp" | ||
| 22 | #include "CurveQuartic_Impl.hpp" | ||
| 23 | #include "ThermalZone.hpp" | ||
| 24 | #include "ThermalZone_Impl.hpp" | ||
| 25 | |||
| 26 | #include <utilities/idd/IddFactory.hxx> | ||
| 27 | |||
| 28 | #include <utilities/idd/OS_Pump_VariableSpeed_FieldEnums.hxx> | ||
| 29 | #include <utilities/idd/IddEnums.hxx> | ||
| 30 | #include "../utilities/core/Assert.hpp" | ||
| 31 | #include "../utilities/data/DataEnums.hpp" | ||
| 32 | |||
| 33 | namespace openstudio { | ||
| 34 | namespace model { | ||
| 35 | |||
| 36 | namespace detail { | ||
| 37 | |||
| 38 | 17 | PumpVariableSpeed_Impl::PumpVariableSpeed_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle) | |
| 39 | 17 | : StraightComponent_Impl(idfObject, model, keepHandle) { | |
| 40 |
4/6✓ Branch 1 taken 17 times.
✓ Branch 4 taken 17 times.
✓ Branch 7 taken 17 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 17 times.
✗ Branch 13 not taken.
|
17 | OS_ASSERT(idfObject.iddObject().type() == PumpVariableSpeed::iddObjectType()); |
| 41 | 17 | } | |
| 42 | |||
| 43 | ✗ | PumpVariableSpeed_Impl::PumpVariableSpeed_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle) | |
| 44 | ✗ | : StraightComponent_Impl(other, model, keepHandle) { | |
| 45 | ✗ | OS_ASSERT(other.iddObject().type() == PumpVariableSpeed::iddObjectType()); | |
| 46 | ✗ | } | |
| 47 | |||
| 48 | 6 | PumpVariableSpeed_Impl::PumpVariableSpeed_Impl(const PumpVariableSpeed_Impl& other, Model_Impl* model, bool keepHandle) | |
| 49 | 6 | : StraightComponent_Impl(other, model, keepHandle) {} | |
| 50 | |||
| 51 | ✗ | const std::vector<std::string>& PumpVariableSpeed_Impl::outputVariableNames() const { | |
| 52 | static const std::vector<std::string> result{ | ||
| 53 | "Pump Electricity Rate", "Pump Electricity Energy", "Pump Shaft Power", "Pump Fluid Heat Gain Rate", "Pump Fluid Heat Gain Energy", | ||
| 54 | "Pump Outlet Temperature", "Pump Mass Flow Rate", "Pump Operating Pumps Count", | ||
| 55 | |||
| 56 | // The Key is the Pump, not the zone, so it's right to report here | ||
| 57 | // EnergyPlus/Pumps.cc::GetPumpInput() | ||
| 58 | // TODO: Implement this check and make not static above once ModelObject return type has changed | ||
| 59 | //if (! p.zone().empty() ) { | ||
| 60 | "Pump Zone Total Heating Rate", "Pump Zone Total Heating Energy", "Pump Zone Convective Heating Rate", "Pump Zone Radiative Heating Rate" | ||
| 61 | // } | ||
| 62 | ✗ | }; | |
| 63 | ✗ | return result; | |
| 64 | ✗ | } | |
| 65 | |||
| 66 | ✗ | std::vector<ScheduleTypeKey> PumpVariableSpeed_Impl::getScheduleTypeKeys(const Schedule& schedule) const { | |
| 67 | ✗ | std::vector<ScheduleTypeKey> result; | |
| 68 | ✗ | UnsignedVector fieldIndices = getSourceIndices(schedule.handle()); | |
| 69 | ✗ | UnsignedVector::const_iterator b(fieldIndices.begin()); | |
| 70 | ✗ | UnsignedVector::const_iterator e(fieldIndices.end()); | |
| 71 | ✗ | if (std::find(b, e, OS_Pump_VariableSpeedFields::PumpFlowRateScheduleName) != e) { | |
| 72 | ✗ | result.push_back(ScheduleTypeKey("PumpVariableSpeed", "Pump Flow Rate")); | |
| 73 | } | ||
| 74 | ✗ | if (std::find(b, e, OS_Pump_VariableSpeedFields::PumpRPMScheduleName) != e) { | |
| 75 | ✗ | result.push_back(ScheduleTypeKey("PumpVariableSpeed", "Pump RPM")); | |
| 76 | } | ||
| 77 | ✗ | if (std::find(b, e, OS_Pump_VariableSpeedFields::MinimumPressureSchedule) != e) { | |
| 78 | ✗ | result.push_back(ScheduleTypeKey("PumpVariableSpeed", "Minimum Pressure")); | |
| 79 | } | ||
| 80 | ✗ | if (std::find(b, e, OS_Pump_VariableSpeedFields::MaximumPressureSchedule) != e) { | |
| 81 | ✗ | result.push_back(ScheduleTypeKey("PumpVariableSpeed", "Maximum Pressure")); | |
| 82 | } | ||
| 83 | ✗ | if (std::find(b, e, OS_Pump_VariableSpeedFields::MinimumRPMSchedule) != e) { | |
| 84 | ✗ | result.push_back(ScheduleTypeKey("PumpVariableSpeed", "Minimum RPM")); | |
| 85 | } | ||
| 86 | ✗ | if (std::find(b, e, OS_Pump_VariableSpeedFields::MaximumRPMSchedule) != e) { | |
| 87 | ✗ | result.push_back(ScheduleTypeKey("PumpVariableSpeed", "Maximum RPM")); | |
| 88 | } | ||
| 89 | ✗ | return result; | |
| 90 | ✗ | } | |
| 91 | |||
| 92 | 7 | IddObjectType PumpVariableSpeed_Impl::iddObjectType() const { | |
| 93 | 7 | return PumpVariableSpeed::iddObjectType(); | |
| 94 | } | ||
| 95 | |||
| 96 | 4 | std::vector<ModelObject> PumpVariableSpeed_Impl::children() const { | |
| 97 | 4 | ModelObjectVector result; | |
| 98 |
2/3✓ Branch 1 taken 4 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 4 times.
|
8 | if (OptionalCurve curve = pumpCurve()) { |
| 99 | ✗ | result.push_back(*curve); | |
| 100 | 4 | } | |
| 101 | 4 | return result; | |
| 102 | ✗ | } | |
| 103 | |||
| 104 | 32 | unsigned PumpVariableSpeed_Impl::inletPort() const { | |
| 105 | 32 | return OS_Pump_VariableSpeedFields::InletNodeName; | |
| 106 | } | ||
| 107 | |||
| 108 | 709 | unsigned PumpVariableSpeed_Impl::outletPort() const { | |
| 109 | 709 | return OS_Pump_VariableSpeedFields::OutletNodeName; | |
| 110 | } | ||
| 111 | |||
| 112 | 3 | boost::optional<double> PumpVariableSpeed_Impl::ratedFlowRate() const { | |
| 113 | 3 | return getDouble(OS_Pump_VariableSpeedFields::RatedFlowRate, true); | |
| 114 | } | ||
| 115 | |||
| 116 | ✗ | bool PumpVariableSpeed_Impl::isRatedFlowRateDefaulted() const { | |
| 117 | ✗ | return isEmpty(OS_Pump_VariableSpeedFields::RatedFlowRate); | |
| 118 | } | ||
| 119 | |||
| 120 | 4 | bool PumpVariableSpeed_Impl::isRatedFlowRateAutosized() const { | |
| 121 | 4 | bool result = false; | |
| 122 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<std::string> value = getString(OS_Pump_VariableSpeedFields::RatedFlowRate, true); |
| 123 |
1/2✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
|
4 | if (value) { |
| 124 |
3/3✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
|
8 | result = openstudio::istringEqual(value.get(), "autosize"); |
| 125 | } | ||
| 126 | 4 | return result; | |
| 127 | 4 | } | |
| 128 | |||
| 129 | 4 | double PumpVariableSpeed_Impl::ratedPumpHead() const { | |
| 130 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_Pump_VariableSpeedFields::RatedPumpHead, true); |
| 131 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 132 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 133 | } | ||
| 134 | |||
| 135 | ✗ | bool PumpVariableSpeed_Impl::isRatedPumpHeadDefaulted() const { | |
| 136 | ✗ | return isEmpty(OS_Pump_VariableSpeedFields::RatedPumpHead); | |
| 137 | } | ||
| 138 | |||
| 139 | ✗ | boost::optional<double> PumpVariableSpeed_Impl::ratedPowerConsumption() const { | |
| 140 | ✗ | return getDouble(OS_Pump_VariableSpeedFields::RatedPowerConsumption, true); | |
| 141 | } | ||
| 142 | |||
| 143 | ✗ | bool PumpVariableSpeed_Impl::isRatedPowerConsumptionDefaulted() const { | |
| 144 | ✗ | return isEmpty(OS_Pump_VariableSpeedFields::RatedPowerConsumption); | |
| 145 | } | ||
| 146 | |||
| 147 | 4 | bool PumpVariableSpeed_Impl::isRatedPowerConsumptionAutosized() const { | |
| 148 | 4 | bool result = false; | |
| 149 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<std::string> value = getString(OS_Pump_VariableSpeedFields::RatedPowerConsumption, true); |
| 150 |
1/2✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
|
4 | if (value) { |
| 151 |
3/3✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
|
8 | result = openstudio::istringEqual(value.get(), "autosize"); |
| 152 | } | ||
| 153 | 4 | return result; | |
| 154 | 4 | } | |
| 155 | |||
| 156 | 4 | double PumpVariableSpeed_Impl::motorEfficiency() const { | |
| 157 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_Pump_VariableSpeedFields::MotorEfficiency, true); |
| 158 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 159 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 160 | } | ||
| 161 | |||
| 162 | ✗ | bool PumpVariableSpeed_Impl::isMotorEfficiencyDefaulted() const { | |
| 163 | ✗ | return isEmpty(OS_Pump_VariableSpeedFields::MotorEfficiency); | |
| 164 | } | ||
| 165 | |||
| 166 | 4 | double PumpVariableSpeed_Impl::fractionofMotorInefficienciestoFluidStream() const { | |
| 167 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_Pump_VariableSpeedFields::FractionofMotorInefficienciestoFluidStream, true); |
| 168 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 169 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 170 | } | ||
| 171 | |||
| 172 | ✗ | bool PumpVariableSpeed_Impl::isFractionofMotorInefficienciestoFluidStreamDefaulted() const { | |
| 173 | ✗ | return isEmpty(OS_Pump_VariableSpeedFields::FractionofMotorInefficienciestoFluidStream); | |
| 174 | } | ||
| 175 | |||
| 176 | 4 | double PumpVariableSpeed_Impl::coefficient1ofthePartLoadPerformanceCurve() const { | |
| 177 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_Pump_VariableSpeedFields::Coefficient1ofthePartLoadPerformanceCurve, true); |
| 178 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 179 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 180 | } | ||
| 181 | |||
| 182 | ✗ | bool PumpVariableSpeed_Impl::isCoefficient1ofthePartLoadPerformanceCurveDefaulted() const { | |
| 183 | ✗ | return isEmpty(OS_Pump_VariableSpeedFields::Coefficient1ofthePartLoadPerformanceCurve); | |
| 184 | } | ||
| 185 | |||
| 186 | 4 | double PumpVariableSpeed_Impl::coefficient2ofthePartLoadPerformanceCurve() const { | |
| 187 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_Pump_VariableSpeedFields::Coefficient2ofthePartLoadPerformanceCurve, true); |
| 188 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 189 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 190 | } | ||
| 191 | |||
| 192 | ✗ | bool PumpVariableSpeed_Impl::isCoefficient2ofthePartLoadPerformanceCurveDefaulted() const { | |
| 193 | ✗ | return isEmpty(OS_Pump_VariableSpeedFields::Coefficient2ofthePartLoadPerformanceCurve); | |
| 194 | } | ||
| 195 | |||
| 196 | 4 | double PumpVariableSpeed_Impl::coefficient3ofthePartLoadPerformanceCurve() const { | |
| 197 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_Pump_VariableSpeedFields::Coefficient3ofthePartLoadPerformanceCurve, true); |
| 198 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 199 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 200 | } | ||
| 201 | |||
| 202 | ✗ | bool PumpVariableSpeed_Impl::isCoefficient3ofthePartLoadPerformanceCurveDefaulted() const { | |
| 203 | ✗ | return isEmpty(OS_Pump_VariableSpeedFields::Coefficient3ofthePartLoadPerformanceCurve); | |
| 204 | } | ||
| 205 | |||
| 206 | 4 | double PumpVariableSpeed_Impl::coefficient4ofthePartLoadPerformanceCurve() const { | |
| 207 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_Pump_VariableSpeedFields::Coefficient4ofthePartLoadPerformanceCurve, true); |
| 208 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 209 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 210 | } | ||
| 211 | |||
| 212 | ✗ | bool PumpVariableSpeed_Impl::isCoefficient4ofthePartLoadPerformanceCurveDefaulted() const { | |
| 213 | ✗ | return isEmpty(OS_Pump_VariableSpeedFields::Coefficient4ofthePartLoadPerformanceCurve); | |
| 214 | } | ||
| 215 | |||
| 216 | 5 | double PumpVariableSpeed_Impl::minimumFlowRate() const { | |
| 217 |
1/1✓ Branch 1 taken 5 times.
|
5 | boost::optional<double> value = getDouble(OS_Pump_VariableSpeedFields::MinimumFlowRate, true); |
| 218 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
|
5 | OS_ASSERT(value); |
| 219 |
1/1✓ Branch 1 taken 5 times.
|
10 | return value.get(); |
| 220 | } | ||
| 221 | |||
| 222 | ✗ | bool PumpVariableSpeed_Impl::isMinimumFlowRateDefaulted() const { | |
| 223 | ✗ | return isEmpty(OS_Pump_VariableSpeedFields::MinimumFlowRate); | |
| 224 | } | ||
| 225 | |||
| 226 | 4 | std::string PumpVariableSpeed_Impl::pumpControlType() const { | |
| 227 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<std::string> value = getString(OS_Pump_VariableSpeedFields::PumpControlType, true); |
| 228 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 229 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
8 | return value.get(); |
| 230 | 4 | } | |
| 231 | |||
| 232 | ✗ | bool PumpVariableSpeed_Impl::isPumpControlTypeDefaulted() const { | |
| 233 | ✗ | return isEmpty(OS_Pump_VariableSpeedFields::PumpControlType); | |
| 234 | } | ||
| 235 | |||
| 236 | 4 | boost::optional<Schedule> PumpVariableSpeed_Impl::pumpFlowRateSchedule() const { | |
| 237 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
4 | return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_Pump_VariableSpeedFields::PumpFlowRateScheduleName); |
| 238 | } | ||
| 239 | |||
| 240 | 8 | boost::optional<Curve> PumpVariableSpeed_Impl::pumpCurve() const { | |
| 241 |
2/2✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
|
8 | return getObject<PumpVariableSpeed>().getModelObjectTarget<Curve>(OS_Pump_VariableSpeedFields::PumpCurveName); |
| 242 | } | ||
| 243 | |||
| 244 | 4 | boost::optional<double> PumpVariableSpeed_Impl::impellerDiameter() const { | |
| 245 | 4 | return getDouble(OS_Pump_VariableSpeedFields::ImpellerDiameter, true); | |
| 246 | } | ||
| 247 | |||
| 248 | 4 | boost::optional<std::string> PumpVariableSpeed_Impl::vFDControlType() const { | |
| 249 | 4 | return getString(OS_Pump_VariableSpeedFields::VFDControlType, true); | |
| 250 | } | ||
| 251 | |||
| 252 | 4 | boost::optional<Schedule> PumpVariableSpeed_Impl::pumpRPMSchedule() const { | |
| 253 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
4 | return getObject<PumpVariableSpeed>().getModelObjectTarget<Schedule>(OS_Pump_VariableSpeedFields::PumpRPMScheduleName); |
| 254 | } | ||
| 255 | |||
| 256 | 4 | boost::optional<Schedule> PumpVariableSpeed_Impl::minimumPressureSchedule() const { | |
| 257 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
4 | return getObject<PumpVariableSpeed>().getModelObjectTarget<Schedule>(OS_Pump_VariableSpeedFields::MinimumPressureSchedule); |
| 258 | } | ||
| 259 | |||
| 260 | 4 | boost::optional<Schedule> PumpVariableSpeed_Impl::maximumPressureSchedule() const { | |
| 261 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
4 | return getObject<PumpVariableSpeed>().getModelObjectTarget<Schedule>(OS_Pump_VariableSpeedFields::MaximumPressureSchedule); |
| 262 | } | ||
| 263 | |||
| 264 | 4 | boost::optional<Schedule> PumpVariableSpeed_Impl::minimumRPMSchedule() const { | |
| 265 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
4 | return getObject<PumpVariableSpeed>().getModelObjectTarget<Schedule>(OS_Pump_VariableSpeedFields::MinimumRPMSchedule); |
| 266 | } | ||
| 267 | |||
| 268 | 4 | boost::optional<Schedule> PumpVariableSpeed_Impl::maximumRPMSchedule() const { | |
| 269 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
4 | return getObject<PumpVariableSpeed>().getModelObjectTarget<Schedule>(OS_Pump_VariableSpeedFields::MaximumRPMSchedule); |
| 270 | } | ||
| 271 | |||
| 272 | 2 | bool PumpVariableSpeed_Impl::setRatedFlowRate(boost::optional<double> ratedFlowRate) { | |
| 273 | 2 | bool result(false); | |
| 274 |
1/2✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
|
2 | if (ratedFlowRate) { |
| 275 | 2 | result = setDouble(OS_Pump_VariableSpeedFields::RatedFlowRate, ratedFlowRate.get()); | |
| 276 | } else { | ||
| 277 | ✗ | resetRatedFlowRate(); | |
| 278 | ✗ | result = true; | |
| 279 | } | ||
| 280 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 2 times.
|
2 | OS_ASSERT(result); |
| 281 | 2 | return result; | |
| 282 | } | ||
| 283 | |||
| 284 | ✗ | void PumpVariableSpeed_Impl::resetRatedFlowRate() { | |
| 285 | ✗ | bool result = setString(OS_Pump_VariableSpeedFields::RatedFlowRate, ""); | |
| 286 | ✗ | OS_ASSERT(result); | |
| 287 | ✗ | } | |
| 288 | |||
| 289 | ✗ | void PumpVariableSpeed_Impl::autosizeRatedFlowRate() { | |
| 290 | ✗ | bool result = setString(OS_Pump_VariableSpeedFields::RatedFlowRate, "autosize"); | |
| 291 | ✗ | OS_ASSERT(result); | |
| 292 | ✗ | } | |
| 293 | |||
| 294 | 3 | bool PumpVariableSpeed_Impl::setRatedPumpHead(double ratedPumpHead) { | |
| 295 | 3 | bool result = setDouble(OS_Pump_VariableSpeedFields::RatedPumpHead, ratedPumpHead); | |
| 296 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
|
3 | OS_ASSERT(result); |
| 297 | 3 | return result; | |
| 298 | } | ||
| 299 | |||
| 300 | ✗ | void PumpVariableSpeed_Impl::resetRatedPumpHead() { | |
| 301 | ✗ | bool result = setString(OS_Pump_VariableSpeedFields::RatedPumpHead, ""); | |
| 302 | ✗ | OS_ASSERT(result); | |
| 303 | ✗ | } | |
| 304 | |||
| 305 | 2 | bool PumpVariableSpeed_Impl::setRatedPowerConsumption(boost::optional<double> ratedPowerConsumption) { | |
| 306 | 2 | bool result(false); | |
| 307 |
1/2✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
|
2 | if (ratedPowerConsumption) { |
| 308 | 2 | result = setDouble(OS_Pump_VariableSpeedFields::RatedPowerConsumption, ratedPowerConsumption.get()); | |
| 309 | } else { | ||
| 310 | ✗ | resetRatedPowerConsumption(); | |
| 311 | ✗ | result = true; | |
| 312 | } | ||
| 313 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 2 times.
|
2 | OS_ASSERT(result); |
| 314 | 2 | return result; | |
| 315 | } | ||
| 316 | |||
| 317 | ✗ | void PumpVariableSpeed_Impl::resetRatedPowerConsumption() { | |
| 318 | ✗ | bool result = setString(OS_Pump_VariableSpeedFields::RatedPowerConsumption, ""); | |
| 319 | ✗ | OS_ASSERT(result); | |
| 320 | ✗ | } | |
| 321 | |||
| 322 | ✗ | void PumpVariableSpeed_Impl::autosizeRatedPowerConsumption() { | |
| 323 | ✗ | bool result = setString(OS_Pump_VariableSpeedFields::RatedPowerConsumption, "autosize"); | |
| 324 | ✗ | OS_ASSERT(result); | |
| 325 | ✗ | } | |
| 326 | |||
| 327 | 2 | bool PumpVariableSpeed_Impl::setMotorEfficiency(double motorEfficiency) { | |
| 328 | 2 | bool result = setDouble(OS_Pump_VariableSpeedFields::MotorEfficiency, motorEfficiency); | |
| 329 | 2 | return result; | |
| 330 | } | ||
| 331 | |||
| 332 | ✗ | void PumpVariableSpeed_Impl::resetMotorEfficiency() { | |
| 333 | ✗ | bool result = setString(OS_Pump_VariableSpeedFields::MotorEfficiency, ""); | |
| 334 | ✗ | OS_ASSERT(result); | |
| 335 | ✗ | } | |
| 336 | |||
| 337 | ✗ | bool PumpVariableSpeed_Impl::setFractionofMotorInefficienciestoFluidStream(double fractionofMotorInefficienciestoFluidStream) { | |
| 338 | ✗ | bool result = setDouble(OS_Pump_VariableSpeedFields::FractionofMotorInefficienciestoFluidStream, fractionofMotorInefficienciestoFluidStream); | |
| 339 | ✗ | return result; | |
| 340 | } | ||
| 341 | |||
| 342 | ✗ | void PumpVariableSpeed_Impl::resetFractionofMotorInefficienciestoFluidStream() { | |
| 343 | ✗ | bool result = setString(OS_Pump_VariableSpeedFields::FractionofMotorInefficienciestoFluidStream, ""); | |
| 344 | ✗ | OS_ASSERT(result); | |
| 345 | ✗ | } | |
| 346 | |||
| 347 | 2 | bool PumpVariableSpeed_Impl::setCoefficient1ofthePartLoadPerformanceCurve(double coefficient1ofthePartLoadPerformanceCurve) { | |
| 348 | 2 | bool result = setDouble(OS_Pump_VariableSpeedFields::Coefficient1ofthePartLoadPerformanceCurve, coefficient1ofthePartLoadPerformanceCurve); | |
| 349 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 2 times.
|
2 | OS_ASSERT(result); |
| 350 | 2 | return result; | |
| 351 | } | ||
| 352 | |||
| 353 | ✗ | void PumpVariableSpeed_Impl::resetCoefficient1ofthePartLoadPerformanceCurve() { | |
| 354 | ✗ | bool result = setString(OS_Pump_VariableSpeedFields::Coefficient1ofthePartLoadPerformanceCurve, ""); | |
| 355 | ✗ | OS_ASSERT(result); | |
| 356 | ✗ | } | |
| 357 | |||
| 358 | 2 | bool PumpVariableSpeed_Impl::setCoefficient2ofthePartLoadPerformanceCurve(double coefficient2ofthePartLoadPerformanceCurve) { | |
| 359 | 2 | bool result = setDouble(OS_Pump_VariableSpeedFields::Coefficient2ofthePartLoadPerformanceCurve, coefficient2ofthePartLoadPerformanceCurve); | |
| 360 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 2 times.
|
2 | OS_ASSERT(result); |
| 361 | 2 | return result; | |
| 362 | } | ||
| 363 | |||
| 364 | ✗ | void PumpVariableSpeed_Impl::resetCoefficient2ofthePartLoadPerformanceCurve() { | |
| 365 | ✗ | bool result = setString(OS_Pump_VariableSpeedFields::Coefficient2ofthePartLoadPerformanceCurve, ""); | |
| 366 | ✗ | OS_ASSERT(result); | |
| 367 | ✗ | } | |
| 368 | |||
| 369 | 2 | bool PumpVariableSpeed_Impl::setCoefficient3ofthePartLoadPerformanceCurve(double coefficient3ofthePartLoadPerformanceCurve) { | |
| 370 | 2 | bool result = setDouble(OS_Pump_VariableSpeedFields::Coefficient3ofthePartLoadPerformanceCurve, coefficient3ofthePartLoadPerformanceCurve); | |
| 371 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 2 times.
|
2 | OS_ASSERT(result); |
| 372 | 2 | return result; | |
| 373 | } | ||
| 374 | |||
| 375 | ✗ | void PumpVariableSpeed_Impl::resetCoefficient3ofthePartLoadPerformanceCurve() { | |
| 376 | ✗ | bool result = setString(OS_Pump_VariableSpeedFields::Coefficient3ofthePartLoadPerformanceCurve, ""); | |
| 377 | ✗ | OS_ASSERT(result); | |
| 378 | ✗ | } | |
| 379 | |||
| 380 | 2 | bool PumpVariableSpeed_Impl::setCoefficient4ofthePartLoadPerformanceCurve(double coefficient4ofthePartLoadPerformanceCurve) { | |
| 381 | 2 | bool result = setDouble(OS_Pump_VariableSpeedFields::Coefficient4ofthePartLoadPerformanceCurve, coefficient4ofthePartLoadPerformanceCurve); | |
| 382 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 2 times.
|
2 | OS_ASSERT(result); |
| 383 | 2 | return result; | |
| 384 | } | ||
| 385 | |||
| 386 | ✗ | void PumpVariableSpeed_Impl::resetCoefficient4ofthePartLoadPerformanceCurve() { | |
| 387 | ✗ | bool result = setString(OS_Pump_VariableSpeedFields::Coefficient4ofthePartLoadPerformanceCurve, ""); | |
| 388 | ✗ | OS_ASSERT(result); | |
| 389 | ✗ | } | |
| 390 | |||
| 391 | 4 | bool PumpVariableSpeed_Impl::setMinimumFlowRate(double minimumFlowRate) { | |
| 392 | 4 | bool result = setDouble(OS_Pump_VariableSpeedFields::MinimumFlowRate, minimumFlowRate); | |
| 393 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
|
4 | OS_ASSERT(result); |
| 394 | 4 | return result; | |
| 395 | } | ||
| 396 | |||
| 397 | ✗ | void PumpVariableSpeed_Impl::resetMinimumFlowRate() { | |
| 398 | ✗ | bool result = setString(OS_Pump_VariableSpeedFields::MinimumFlowRate, ""); | |
| 399 | ✗ | OS_ASSERT(result); | |
| 400 | ✗ | } | |
| 401 | |||
| 402 | 17 | bool PumpVariableSpeed_Impl::setPumpControlType(const std::string& pumpControlType) { | |
| 403 | 17 | bool result = setString(OS_Pump_VariableSpeedFields::PumpControlType, pumpControlType); | |
| 404 | 17 | return result; | |
| 405 | } | ||
| 406 | |||
| 407 | ✗ | void PumpVariableSpeed_Impl::resetPumpControlType() { | |
| 408 | ✗ | bool result = setString(OS_Pump_VariableSpeedFields::PumpControlType, ""); | |
| 409 | ✗ | OS_ASSERT(result); | |
| 410 | ✗ | } | |
| 411 | |||
| 412 | ✗ | bool PumpVariableSpeed_Impl::setPumpFlowRateSchedule(Schedule& schedule) { | |
| 413 | ✗ | bool result = setSchedule(OS_Pump_VariableSpeedFields::PumpFlowRateScheduleName, "PumpVariableSpeed", "Pump Flow Rate", schedule); | |
| 414 | ✗ | return result; | |
| 415 | } | ||
| 416 | |||
| 417 | ✗ | void PumpVariableSpeed_Impl::resetPumpFlowRateSchedule() { | |
| 418 | ✗ | bool result = setString(OS_Pump_VariableSpeedFields::PumpFlowRateScheduleName, ""); | |
| 419 | ✗ | OS_ASSERT(result); | |
| 420 | ✗ | } | |
| 421 | |||
| 422 | ✗ | bool PumpVariableSpeed_Impl::setPumpCurve(const Curve& curve) { | |
| 423 | ✗ | return setPointer(OS_Pump_VariableSpeedFields::PumpCurveName, curve.handle()); | |
| 424 | } | ||
| 425 | |||
| 426 | ✗ | void PumpVariableSpeed_Impl::resetPumpCurve() { | |
| 427 | ✗ | bool ok = setString(OS_Pump_VariableSpeedFields::PumpCurveName, ""); | |
| 428 | ✗ | OS_ASSERT(ok); | |
| 429 | ✗ | } | |
| 430 | |||
| 431 | ✗ | bool PumpVariableSpeed_Impl::setImpellerDiameter(boost::optional<double> impellerDiameter) { | |
| 432 | ✗ | bool result(false); | |
| 433 | ✗ | if (impellerDiameter) { | |
| 434 | ✗ | result = setDouble(OS_Pump_VariableSpeedFields::ImpellerDiameter, impellerDiameter.get()); | |
| 435 | } else { | ||
| 436 | ✗ | resetImpellerDiameter(); | |
| 437 | ✗ | result = true; | |
| 438 | } | ||
| 439 | ✗ | OS_ASSERT(result); | |
| 440 | ✗ | return result; | |
| 441 | } | ||
| 442 | |||
| 443 | ✗ | void PumpVariableSpeed_Impl::resetImpellerDiameter() { | |
| 444 | ✗ | bool result = setString(OS_Pump_VariableSpeedFields::ImpellerDiameter, ""); | |
| 445 | ✗ | OS_ASSERT(result); | |
| 446 | ✗ | } | |
| 447 | |||
| 448 | ✗ | bool PumpVariableSpeed_Impl::setVFDControlType(boost::optional<std::string> vFDControlType) { | |
| 449 | ✗ | bool result(false); | |
| 450 | ✗ | if (vFDControlType) { | |
| 451 | ✗ | result = setString(OS_Pump_VariableSpeedFields::VFDControlType, vFDControlType.get()); | |
| 452 | } else { | ||
| 453 | ✗ | resetVFDControlType(); | |
| 454 | ✗ | result = true; | |
| 455 | } | ||
| 456 | ✗ | return result; | |
| 457 | } | ||
| 458 | |||
| 459 | ✗ | void PumpVariableSpeed_Impl::resetVFDControlType() { | |
| 460 | ✗ | bool result = setString(OS_Pump_VariableSpeedFields::VFDControlType, ""); | |
| 461 | ✗ | OS_ASSERT(result); | |
| 462 | ✗ | } | |
| 463 | |||
| 464 | ✗ | bool PumpVariableSpeed_Impl::setPumpRPMSchedule(Schedule& schedule) { | |
| 465 | ✗ | bool result = setSchedule(OS_Pump_VariableSpeedFields::PumpRPMScheduleName, "PumpVariableSpeed", "Pump RPM", schedule); | |
| 466 | ✗ | return result; | |
| 467 | } | ||
| 468 | |||
| 469 | ✗ | void PumpVariableSpeed_Impl::resetPumpRPMSchedule() { | |
| 470 | ✗ | bool result = setString(OS_Pump_VariableSpeedFields::PumpRPMScheduleName, ""); | |
| 471 | ✗ | OS_ASSERT(result); | |
| 472 | ✗ | } | |
| 473 | |||
| 474 | ✗ | bool PumpVariableSpeed_Impl::setMinimumPressureSchedule(Schedule& schedule) { | |
| 475 | ✗ | bool result = setSchedule(OS_Pump_VariableSpeedFields::MinimumPressureSchedule, "PumpVariableSpeed", "Minimum Pressure", schedule); | |
| 476 | ✗ | return result; | |
| 477 | } | ||
| 478 | |||
| 479 | ✗ | void PumpVariableSpeed_Impl::resetMinimumPressureSchedule() { | |
| 480 | ✗ | bool result = setString(OS_Pump_VariableSpeedFields::MinimumPressureSchedule, ""); | |
| 481 | ✗ | OS_ASSERT(result); | |
| 482 | ✗ | } | |
| 483 | |||
| 484 | ✗ | bool PumpVariableSpeed_Impl::setMaximumPressureSchedule(Schedule& schedule) { | |
| 485 | ✗ | bool result = setSchedule(OS_Pump_VariableSpeedFields::MaximumPressureSchedule, "PumpVariableSpeed", "Maximum Pressure", schedule); | |
| 486 | ✗ | return result; | |
| 487 | } | ||
| 488 | |||
| 489 | ✗ | void PumpVariableSpeed_Impl::resetMaximumPressureSchedule() { | |
| 490 | ✗ | bool result = setString(OS_Pump_VariableSpeedFields::MaximumPressureSchedule, ""); | |
| 491 | ✗ | OS_ASSERT(result); | |
| 492 | ✗ | } | |
| 493 | |||
| 494 | ✗ | bool PumpVariableSpeed_Impl::setMinimumRPMSchedule(Schedule& schedule) { | |
| 495 | ✗ | bool result = setSchedule(OS_Pump_VariableSpeedFields::MinimumRPMSchedule, "PumpVariableSpeed", "Minimum RPM", schedule); | |
| 496 | ✗ | return result; | |
| 497 | } | ||
| 498 | |||
| 499 | ✗ | void PumpVariableSpeed_Impl::resetMinimumRPMSchedule() { | |
| 500 | ✗ | bool result = setString(OS_Pump_VariableSpeedFields::MinimumRPMSchedule, ""); | |
| 501 | ✗ | OS_ASSERT(result); | |
| 502 | ✗ | } | |
| 503 | |||
| 504 | ✗ | bool PumpVariableSpeed_Impl::setMaximumRPMSchedule(Schedule& schedule) { | |
| 505 | ✗ | bool result = setSchedule(OS_Pump_VariableSpeedFields::MaximumRPMSchedule, "PumpVariableSpeed", "Maximum RPM", schedule); | |
| 506 | ✗ | return result; | |
| 507 | } | ||
| 508 | |||
| 509 | ✗ | void PumpVariableSpeed_Impl::resetMaximumRPMSchedule() { | |
| 510 | ✗ | bool result = setString(OS_Pump_VariableSpeedFields::MaximumRPMSchedule, ""); | |
| 511 | ✗ | OS_ASSERT(result); | |
| 512 | ✗ | } | |
| 513 | |||
| 514 | 20 | bool PumpVariableSpeed_Impl::addToNode(Node& node) { | |
| 515 |
3/3✓ Branch 1 taken 20 times.
✓ Branch 4 taken 18 times.
✓ Branch 5 taken 2 times.
|
40 | if (node.plantLoop()) { |
| 516 | 18 | return StraightComponent_Impl::addToNode(node); | |
| 517 | } | ||
| 518 | |||
| 519 | 2 | return false; | |
| 520 | } | ||
| 521 | |||
| 522 | ✗ | std::vector<std::string> PumpVariableSpeed_Impl::pumpControlTypeValues() const { | |
| 523 | ✗ | return PumpVariableSpeed::pumpControlTypeValues(); | |
| 524 | } | ||
| 525 | |||
| 526 | ✗ | std::vector<std::string> PumpVariableSpeed_Impl::vfdControlTypeValues() const { | |
| 527 | ✗ | return PumpVariableSpeed::vfdControlTypeValues(); | |
| 528 | } | ||
| 529 | |||
| 530 | ✗ | boost::optional<ModelObject> PumpVariableSpeed_Impl::pumpFlowRateScheduleAsModelObject() const { | |
| 531 | ✗ | OptionalModelObject result; | |
| 532 | ✗ | OptionalSchedule intermediate = pumpFlowRateSchedule(); | |
| 533 | ✗ | if (intermediate) { | |
| 534 | ✗ | result = *intermediate; | |
| 535 | } | ||
| 536 | ✗ | return result; | |
| 537 | ✗ | } | |
| 538 | |||
| 539 | ✗ | boost::optional<ModelObject> PumpVariableSpeed_Impl::pumpCurveAsModelObject() const { | |
| 540 | ✗ | OptionalModelObject result; | |
| 541 | ✗ | OptionalCurve intermediate = pumpCurve(); | |
| 542 | ✗ | if (intermediate) { | |
| 543 | ✗ | result = *intermediate; | |
| 544 | } | ||
| 545 | ✗ | return result; | |
| 546 | ✗ | } | |
| 547 | |||
| 548 | ✗ | boost::optional<ModelObject> PumpVariableSpeed_Impl::pumpRPMScheduleAsModelObject() const { | |
| 549 | ✗ | OptionalModelObject result; | |
| 550 | ✗ | OptionalSchedule intermediate = pumpRPMSchedule(); | |
| 551 | ✗ | if (intermediate) { | |
| 552 | ✗ | result = *intermediate; | |
| 553 | } | ||
| 554 | ✗ | return result; | |
| 555 | ✗ | } | |
| 556 | |||
| 557 | ✗ | boost::optional<ModelObject> PumpVariableSpeed_Impl::minimumPressureScheduleAsModelObject() const { | |
| 558 | ✗ | OptionalModelObject result; | |
| 559 | ✗ | OptionalSchedule intermediate = minimumPressureSchedule(); | |
| 560 | ✗ | if (intermediate) { | |
| 561 | ✗ | result = *intermediate; | |
| 562 | } | ||
| 563 | ✗ | return result; | |
| 564 | ✗ | } | |
| 565 | |||
| 566 | ✗ | boost::optional<ModelObject> PumpVariableSpeed_Impl::maximumPressureScheduleAsModelObject() const { | |
| 567 | ✗ | OptionalModelObject result; | |
| 568 | ✗ | OptionalSchedule intermediate = maximumPressureSchedule(); | |
| 569 | ✗ | if (intermediate) { | |
| 570 | ✗ | result = *intermediate; | |
| 571 | } | ||
| 572 | ✗ | return result; | |
| 573 | ✗ | } | |
| 574 | |||
| 575 | ✗ | boost::optional<ModelObject> PumpVariableSpeed_Impl::minimumRPMScheduleAsModelObject() const { | |
| 576 | ✗ | OptionalModelObject result; | |
| 577 | ✗ | OptionalSchedule intermediate = minimumRPMSchedule(); | |
| 578 | ✗ | if (intermediate) { | |
| 579 | ✗ | result = *intermediate; | |
| 580 | } | ||
| 581 | ✗ | return result; | |
| 582 | ✗ | } | |
| 583 | |||
| 584 | ✗ | boost::optional<ModelObject> PumpVariableSpeed_Impl::maximumRPMScheduleAsModelObject() const { | |
| 585 | ✗ | OptionalModelObject result; | |
| 586 | ✗ | OptionalSchedule intermediate = maximumRPMSchedule(); | |
| 587 | ✗ | if (intermediate) { | |
| 588 | ✗ | result = *intermediate; | |
| 589 | } | ||
| 590 | ✗ | return result; | |
| 591 | ✗ | } | |
| 592 | |||
| 593 | ✗ | bool PumpVariableSpeed_Impl::setPumpFlowRateScheduleAsModelObject(const boost::optional<ModelObject>& modelObject) { | |
| 594 | ✗ | if (modelObject) { | |
| 595 | ✗ | OptionalSchedule intermediate = modelObject->optionalCast<Schedule>(); | |
| 596 | ✗ | if (intermediate) { | |
| 597 | ✗ | Schedule schedule(*intermediate); | |
| 598 | ✗ | return setPumpFlowRateSchedule(schedule); | |
| 599 | ✗ | } else { | |
| 600 | ✗ | return false; | |
| 601 | } | ||
| 602 | ✗ | } else { | |
| 603 | ✗ | resetPumpFlowRateSchedule(); | |
| 604 | } | ||
| 605 | ✗ | return true; | |
| 606 | } | ||
| 607 | |||
| 608 | ✗ | bool PumpVariableSpeed_Impl::setPumpCurveAsModelObject(const boost::optional<ModelObject>& modelObject) { | |
| 609 | ✗ | if (modelObject) { | |
| 610 | ✗ | OptionalCurve intermediate = modelObject->optionalCast<Curve>(); | |
| 611 | ✗ | if (intermediate) { | |
| 612 | ✗ | return setPumpCurve(*intermediate); | |
| 613 | } else { | ||
| 614 | ✗ | return false; | |
| 615 | } | ||
| 616 | ✗ | } else { | |
| 617 | ✗ | resetPumpCurve(); | |
| 618 | } | ||
| 619 | ✗ | return true; | |
| 620 | } | ||
| 621 | |||
| 622 | ✗ | bool PumpVariableSpeed_Impl::setPumpRPMScheduleAsModelObject(const boost::optional<ModelObject>& modelObject) { | |
| 623 | ✗ | if (modelObject) { | |
| 624 | ✗ | OptionalSchedule intermediate = modelObject->optionalCast<Schedule>(); | |
| 625 | ✗ | if (intermediate) { | |
| 626 | ✗ | Schedule schedule(*intermediate); | |
| 627 | ✗ | return setPumpRPMSchedule(schedule); | |
| 628 | ✗ | } else { | |
| 629 | ✗ | return false; | |
| 630 | } | ||
| 631 | ✗ | } else { | |
| 632 | ✗ | resetPumpRPMSchedule(); | |
| 633 | } | ||
| 634 | ✗ | return true; | |
| 635 | } | ||
| 636 | |||
| 637 | ✗ | bool PumpVariableSpeed_Impl::setMinimumPressureScheduleAsModelObject(const boost::optional<ModelObject>& modelObject) { | |
| 638 | ✗ | if (modelObject) { | |
| 639 | ✗ | OptionalSchedule intermediate = modelObject->optionalCast<Schedule>(); | |
| 640 | ✗ | if (intermediate) { | |
| 641 | ✗ | Schedule schedule(*intermediate); | |
| 642 | ✗ | return setMinimumPressureSchedule(schedule); | |
| 643 | ✗ | } else { | |
| 644 | ✗ | return false; | |
| 645 | } | ||
| 646 | ✗ | } else { | |
| 647 | ✗ | resetMinimumPressureSchedule(); | |
| 648 | } | ||
| 649 | ✗ | return true; | |
| 650 | } | ||
| 651 | |||
| 652 | ✗ | bool PumpVariableSpeed_Impl::setMaximumPressureScheduleAsModelObject(const boost::optional<ModelObject>& modelObject) { | |
| 653 | ✗ | if (modelObject) { | |
| 654 | ✗ | OptionalSchedule intermediate = modelObject->optionalCast<Schedule>(); | |
| 655 | ✗ | if (intermediate) { | |
| 656 | ✗ | Schedule schedule(*intermediate); | |
| 657 | ✗ | return setMaximumPressureSchedule(schedule); | |
| 658 | ✗ | } else { | |
| 659 | ✗ | return false; | |
| 660 | } | ||
| 661 | ✗ | } else { | |
| 662 | ✗ | resetMaximumPressureSchedule(); | |
| 663 | } | ||
| 664 | ✗ | return true; | |
| 665 | } | ||
| 666 | |||
| 667 | ✗ | bool PumpVariableSpeed_Impl::setMinimumRPMScheduleAsModelObject(const boost::optional<ModelObject>& modelObject) { | |
| 668 | ✗ | if (modelObject) { | |
| 669 | ✗ | OptionalSchedule intermediate = modelObject->optionalCast<Schedule>(); | |
| 670 | ✗ | if (intermediate) { | |
| 671 | ✗ | Schedule schedule(*intermediate); | |
| 672 | ✗ | return setMinimumRPMSchedule(schedule); | |
| 673 | ✗ | } else { | |
| 674 | ✗ | return false; | |
| 675 | } | ||
| 676 | ✗ | } else { | |
| 677 | ✗ | resetMinimumRPMSchedule(); | |
| 678 | } | ||
| 679 | ✗ | return true; | |
| 680 | } | ||
| 681 | |||
| 682 | ✗ | bool PumpVariableSpeed_Impl::setMaximumRPMScheduleAsModelObject(const boost::optional<ModelObject>& modelObject) { | |
| 683 | ✗ | if (modelObject) { | |
| 684 | ✗ | OptionalSchedule intermediate = modelObject->optionalCast<Schedule>(); | |
| 685 | ✗ | if (intermediate) { | |
| 686 | ✗ | Schedule schedule(*intermediate); | |
| 687 | ✗ | return setMaximumRPMSchedule(schedule); | |
| 688 | ✗ | } else { | |
| 689 | ✗ | return false; | |
| 690 | } | ||
| 691 | ✗ | } else { | |
| 692 | ✗ | resetMaximumRPMSchedule(); | |
| 693 | } | ||
| 694 | ✗ | return true; | |
| 695 | } | ||
| 696 | |||
| 697 | ✗ | boost::optional<double> PumpVariableSpeed_Impl::autosizedRatedFlowRate() const { | |
| 698 | ✗ | return getAutosizedValue("Design Flow Rate", "m3/s"); | |
| 699 | } | ||
| 700 | |||
| 701 | ✗ | boost::optional<double> PumpVariableSpeed_Impl::autosizedRatedPowerConsumption() const { | |
| 702 | ✗ | return getAutosizedValue("Design Power Consumption", "W"); | |
| 703 | } | ||
| 704 | |||
| 705 | ✗ | void PumpVariableSpeed_Impl::autosize() { | |
| 706 | ✗ | autosizeRatedFlowRate(); | |
| 707 | ✗ | autosizeRatedPowerConsumption(); | |
| 708 | ✗ | } | |
| 709 | |||
| 710 | ✗ | void PumpVariableSpeed_Impl::applySizingValues() { | |
| 711 | ✗ | boost::optional<double> val; | |
| 712 | ✗ | val = autosizedRatedFlowRate(); | |
| 713 | ✗ | if (val) { | |
| 714 | ✗ | setRatedFlowRate(val.get()); | |
| 715 | } | ||
| 716 | |||
| 717 | ✗ | val = autosizedRatedPowerConsumption(); | |
| 718 | ✗ | if (val) { | |
| 719 | ✗ | setRatedPowerConsumption(val.get()); | |
| 720 | } | ||
| 721 | ✗ | } | |
| 722 | |||
| 723 | 4 | std::string PumpVariableSpeed_Impl::designPowerSizingMethod() const { | |
| 724 |
1/1✓ Branch 1 taken 4 times.
|
4 | auto value = getString(OS_Pump_VariableSpeedFields::DesignPowerSizingMethod, true); |
| 725 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 726 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
8 | return value.get(); |
| 727 | 4 | } | |
| 728 | |||
| 729 | 17 | bool PumpVariableSpeed_Impl::setDesignPowerSizingMethod(const std::string& designPowerSizingMethod) { | |
| 730 | 17 | return setString(OS_Pump_VariableSpeedFields::DesignPowerSizingMethod, designPowerSizingMethod); | |
| 731 | } | ||
| 732 | |||
| 733 | 4 | double PumpVariableSpeed_Impl::designElectricPowerPerUnitFlowRate() const { | |
| 734 |
1/1✓ Branch 1 taken 4 times.
|
4 | auto value = getDouble(OS_Pump_VariableSpeedFields::DesignElectricPowerperUnitFlowRate, true); |
| 735 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 736 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 737 | } | ||
| 738 | |||
| 739 | 17 | bool PumpVariableSpeed_Impl::setDesignElectricPowerPerUnitFlowRate(double designElectricPowerPerUnitFlowRate) { | |
| 740 | 17 | return setDouble(OS_Pump_VariableSpeedFields::DesignElectricPowerperUnitFlowRate, designElectricPowerPerUnitFlowRate); | |
| 741 | } | ||
| 742 | |||
| 743 | 4 | double PumpVariableSpeed_Impl::designShaftPowerPerUnitFlowRatePerUnitHead() const { | |
| 744 |
1/1✓ Branch 1 taken 4 times.
|
4 | auto value = getDouble(OS_Pump_VariableSpeedFields::DesignShaftPowerperUnitFlowRateperUnitHead, true); |
| 745 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 746 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 747 | } | ||
| 748 | |||
| 749 | 17 | bool PumpVariableSpeed_Impl::setDesignShaftPowerPerUnitFlowRatePerUnitHead(double designShaftPowerPerUnitFlowRatePerUnitHead) { | |
| 750 | 17 | return setDouble(OS_Pump_VariableSpeedFields::DesignShaftPowerperUnitFlowRateperUnitHead, designShaftPowerPerUnitFlowRatePerUnitHead); | |
| 751 | } | ||
| 752 | |||
| 753 | 4 | double PumpVariableSpeed_Impl::designMinimumFlowRateFraction() const { | |
| 754 |
1/1✓ Branch 1 taken 4 times.
|
4 | auto value = getDouble(OS_Pump_VariableSpeedFields::DesignMinimumFlowRateFraction, true); |
| 755 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 756 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 757 | } | ||
| 758 | |||
| 759 | 17 | bool PumpVariableSpeed_Impl::setDesignMinimumFlowRateFraction(double designMinimumFlowRateFraction) { | |
| 760 | 17 | return setDouble(OS_Pump_VariableSpeedFields::DesignMinimumFlowRateFraction, designMinimumFlowRateFraction); | |
| 761 | } | ||
| 762 | |||
| 763 | 4 | double PumpVariableSpeed_Impl::skinLossRadiativeFraction() const { | |
| 764 |
1/1✓ Branch 1 taken 4 times.
|
4 | auto value = getDouble(OS_Pump_VariableSpeedFields::SkinLossRadiativeFraction, true); |
| 765 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 766 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 767 | } | ||
| 768 | |||
| 769 | 17 | bool PumpVariableSpeed_Impl::setSkinLossRadiativeFraction(double skinLossRadiativeFraction) { | |
| 770 | 17 | return setDouble(OS_Pump_VariableSpeedFields::SkinLossRadiativeFraction, skinLossRadiativeFraction); | |
| 771 | } | ||
| 772 | |||
| 773 | ✗ | boost::optional<ThermalZone> PumpVariableSpeed_Impl::zone() const { | |
| 774 | ✗ | return getObject<ModelObject>().getModelObjectTarget<ThermalZone>(OS_Pump_VariableSpeedFields::ZoneName); | |
| 775 | } | ||
| 776 | |||
| 777 | ✗ | bool PumpVariableSpeed_Impl::setZone(const ThermalZone& thermalZone) { | |
| 778 | ✗ | return setPointer(OS_Pump_VariableSpeedFields::ZoneName, thermalZone.handle()); | |
| 779 | } | ||
| 780 | |||
| 781 | ✗ | void PumpVariableSpeed_Impl::resetZone() { | |
| 782 | ✗ | bool result = setString(OS_Pump_VariableSpeedFields::ZoneName, ""); | |
| 783 | ✗ | OS_ASSERT(result); | |
| 784 | ✗ | } | |
| 785 | |||
| 786 | ✗ | std::vector<EMSActuatorNames> PumpVariableSpeed_Impl::emsActuatorNames() const { | |
| 787 | ✗ | std::vector<EMSActuatorNames> actuators{{"Pump", "Pump Mass Flow Rate"}, {"Pump", "Pump Pressure Rise"}}; | |
| 788 | ✗ | return actuators; | |
| 789 | ✗ | } | |
| 790 | |||
| 791 | ✗ | std::vector<std::string> PumpVariableSpeed_Impl::emsInternalVariableNames() const { | |
| 792 | ✗ | std::vector<std::string> types{"Pump Maximum Mass Flow Rate"}; | |
| 793 | ✗ | return types; | |
| 794 | ✗ | } | |
| 795 | |||
| 796 | 4 | std::string PumpVariableSpeed_Impl::endUseSubcategory() const { | |
| 797 |
1/1✓ Branch 1 taken 4 times.
|
4 | auto value = getString(OS_Pump_VariableSpeedFields::EndUseSubcategory, true); |
| 798 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 799 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
8 | return value.get(); |
| 800 | 4 | } | |
| 801 | |||
| 802 | 17 | bool PumpVariableSpeed_Impl::setEndUseSubcategory(const std::string& endUseSubcategory) { | |
| 803 | 17 | return setString(OS_Pump_VariableSpeedFields::EndUseSubcategory, endUseSubcategory); | |
| 804 | } | ||
| 805 | |||
| 806 | 12 | ComponentType PumpVariableSpeed_Impl::componentType() const { | |
| 807 |
1/1✓ Branch 1 taken 12 times.
|
12 | return ComponentType::None; |
| 808 | } | ||
| 809 | |||
| 810 | ✗ | std::vector<FuelType> PumpVariableSpeed_Impl::coolingFuelTypes() const { | |
| 811 | ✗ | return {}; | |
| 812 | } | ||
| 813 | |||
| 814 | ✗ | std::vector<FuelType> PumpVariableSpeed_Impl::heatingFuelTypes() const { | |
| 815 | ✗ | return {}; | |
| 816 | } | ||
| 817 | |||
| 818 | ✗ | std::vector<AppGFuelType> PumpVariableSpeed_Impl::appGHeatingFuelTypes() const { | |
| 819 | ✗ | return {}; | |
| 820 | } | ||
| 821 | |||
| 822 | } // namespace detail | ||
| 823 | |||
| 824 | 17 | PumpVariableSpeed::PumpVariableSpeed(const Model& model) : StraightComponent(PumpVariableSpeed::iddObjectType(), model) { | |
| 825 |
1/3✗ Branch 2 not taken.
✓ Branch 3 taken 17 times.
✗ Branch 5 not taken.
|
17 | OS_ASSERT(getImpl<detail::PumpVariableSpeed_Impl>()); |
| 826 | |||
| 827 |
2/2✓ Branch 1 taken 17 times.
✓ Branch 4 taken 17 times.
|
17 | setPumpControlType("Intermittent"); |
| 828 | |||
| 829 |
1/1✓ Branch 1 taken 17 times.
|
17 | setSkinLossRadiativeFraction(0.5); |
| 830 |
2/2✓ Branch 1 taken 17 times.
✓ Branch 4 taken 17 times.
|
17 | setDesignPowerSizingMethod("PowerPerFlowPerPressure"); |
| 831 |
1/1✓ Branch 1 taken 17 times.
|
17 | setDesignElectricPowerPerUnitFlowRate(348701.1); |
| 832 |
1/1✓ Branch 1 taken 17 times.
|
17 | setDesignShaftPowerPerUnitFlowRatePerUnitHead(1.282051282); |
| 833 |
1/1✓ Branch 1 taken 17 times.
|
17 | setDesignMinimumFlowRateFraction(0.0); |
| 834 | |||
| 835 |
2/2✓ Branch 1 taken 17 times.
✓ Branch 4 taken 17 times.
|
17 | setEndUseSubcategory("General"); |
| 836 | 17 | } | |
| 837 | |||
| 838 | 7780 | IddObjectType PumpVariableSpeed::iddObjectType() { | |
| 839 |
1/1✓ Branch 1 taken 7780 times.
|
7780 | IddObjectType result(IddObjectType::OS_Pump_VariableSpeed); |
| 840 | 7780 | return result; | |
| 841 | } | ||
| 842 | |||
| 843 | ✗ | std::vector<std::string> PumpVariableSpeed::designPowerSizingMethodValues() { | |
| 844 | ✗ | return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_Pump_VariableSpeedFields::DesignPowerSizingMethod); | |
| 845 | } | ||
| 846 | |||
| 847 | ✗ | std::vector<std::string> PumpVariableSpeed::pumpControlTypeValues() { | |
| 848 | ✗ | return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_Pump_VariableSpeedFields::PumpControlType); | |
| 849 | } | ||
| 850 | |||
| 851 | ✗ | std::vector<std::string> PumpVariableSpeed::validPumpControlTypeValues() { | |
| 852 | ✗ | return PumpVariableSpeed::pumpControlTypeValues(); | |
| 853 | } | ||
| 854 | |||
| 855 | ✗ | std::vector<std::string> PumpVariableSpeed::vfdControlTypeValues() { | |
| 856 | ✗ | return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_Pump_VariableSpeedFields::VFDControlType); | |
| 857 | } | ||
| 858 | |||
| 859 | 3 | boost::optional<double> PumpVariableSpeed::ratedFlowRate() const { | |
| 860 |
1/1✓ Branch 3 taken 3 times.
|
3 | return getImpl<detail::PumpVariableSpeed_Impl>()->ratedFlowRate(); |
| 861 | } | ||
| 862 | |||
| 863 | ✗ | bool PumpVariableSpeed::isRatedFlowRateDefaulted() const { | |
| 864 | ✗ | return getImpl<detail::PumpVariableSpeed_Impl>()->isRatedFlowRateDefaulted(); | |
| 865 | } | ||
| 866 | |||
| 867 | 4 | bool PumpVariableSpeed::isRatedFlowRateAutosized() const { | |
| 868 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::PumpVariableSpeed_Impl>()->isRatedFlowRateAutosized(); |
| 869 | } | ||
| 870 | |||
| 871 | 4 | double PumpVariableSpeed::ratedPumpHead() const { | |
| 872 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::PumpVariableSpeed_Impl>()->ratedPumpHead(); |
| 873 | } | ||
| 874 | |||
| 875 | ✗ | bool PumpVariableSpeed::isRatedPumpHeadDefaulted() const { | |
| 876 | ✗ | return getImpl<detail::PumpVariableSpeed_Impl>()->isRatedPumpHeadDefaulted(); | |
| 877 | } | ||
| 878 | |||
| 879 | ✗ | boost::optional<double> PumpVariableSpeed::ratedPowerConsumption() const { | |
| 880 | ✗ | return getImpl<detail::PumpVariableSpeed_Impl>()->ratedPowerConsumption(); | |
| 881 | } | ||
| 882 | |||
| 883 | ✗ | bool PumpVariableSpeed::isRatedPowerConsumptionDefaulted() const { | |
| 884 | ✗ | return getImpl<detail::PumpVariableSpeed_Impl>()->isRatedPowerConsumptionDefaulted(); | |
| 885 | } | ||
| 886 | |||
| 887 | 4 | bool PumpVariableSpeed::isRatedPowerConsumptionAutosized() const { | |
| 888 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::PumpVariableSpeed_Impl>()->isRatedPowerConsumptionAutosized(); |
| 889 | } | ||
| 890 | |||
| 891 | 4 | double PumpVariableSpeed::motorEfficiency() const { | |
| 892 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::PumpVariableSpeed_Impl>()->motorEfficiency(); |
| 893 | } | ||
| 894 | |||
| 895 | ✗ | bool PumpVariableSpeed::isMotorEfficiencyDefaulted() const { | |
| 896 | ✗ | return getImpl<detail::PumpVariableSpeed_Impl>()->isMotorEfficiencyDefaulted(); | |
| 897 | } | ||
| 898 | |||
| 899 | 4 | double PumpVariableSpeed::fractionofMotorInefficienciestoFluidStream() const { | |
| 900 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::PumpVariableSpeed_Impl>()->fractionofMotorInefficienciestoFluidStream(); |
| 901 | } | ||
| 902 | |||
| 903 | ✗ | bool PumpVariableSpeed::isFractionofMotorInefficienciestoFluidStreamDefaulted() const { | |
| 904 | ✗ | return getImpl<detail::PumpVariableSpeed_Impl>()->isFractionofMotorInefficienciestoFluidStreamDefaulted(); | |
| 905 | } | ||
| 906 | |||
| 907 | 4 | double PumpVariableSpeed::coefficient1ofthePartLoadPerformanceCurve() const { | |
| 908 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::PumpVariableSpeed_Impl>()->coefficient1ofthePartLoadPerformanceCurve(); |
| 909 | } | ||
| 910 | |||
| 911 | ✗ | bool PumpVariableSpeed::isCoefficient1ofthePartLoadPerformanceCurveDefaulted() const { | |
| 912 | ✗ | return getImpl<detail::PumpVariableSpeed_Impl>()->isCoefficient1ofthePartLoadPerformanceCurveDefaulted(); | |
| 913 | } | ||
| 914 | |||
| 915 | 4 | double PumpVariableSpeed::coefficient2ofthePartLoadPerformanceCurve() const { | |
| 916 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::PumpVariableSpeed_Impl>()->coefficient2ofthePartLoadPerformanceCurve(); |
| 917 | } | ||
| 918 | |||
| 919 | ✗ | bool PumpVariableSpeed::isCoefficient2ofthePartLoadPerformanceCurveDefaulted() const { | |
| 920 | ✗ | return getImpl<detail::PumpVariableSpeed_Impl>()->isCoefficient2ofthePartLoadPerformanceCurveDefaulted(); | |
| 921 | } | ||
| 922 | |||
| 923 | 4 | double PumpVariableSpeed::coefficient3ofthePartLoadPerformanceCurve() const { | |
| 924 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::PumpVariableSpeed_Impl>()->coefficient3ofthePartLoadPerformanceCurve(); |
| 925 | } | ||
| 926 | |||
| 927 | ✗ | bool PumpVariableSpeed::isCoefficient3ofthePartLoadPerformanceCurveDefaulted() const { | |
| 928 | ✗ | return getImpl<detail::PumpVariableSpeed_Impl>()->isCoefficient3ofthePartLoadPerformanceCurveDefaulted(); | |
| 929 | } | ||
| 930 | |||
| 931 | 4 | double PumpVariableSpeed::coefficient4ofthePartLoadPerformanceCurve() const { | |
| 932 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::PumpVariableSpeed_Impl>()->coefficient4ofthePartLoadPerformanceCurve(); |
| 933 | } | ||
| 934 | |||
| 935 | ✗ | bool PumpVariableSpeed::isCoefficient4ofthePartLoadPerformanceCurveDefaulted() const { | |
| 936 | ✗ | return getImpl<detail::PumpVariableSpeed_Impl>()->isCoefficient4ofthePartLoadPerformanceCurveDefaulted(); | |
| 937 | } | ||
| 938 | |||
| 939 | 5 | double PumpVariableSpeed::minimumFlowRate() const { | |
| 940 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::PumpVariableSpeed_Impl>()->minimumFlowRate(); |
| 941 | } | ||
| 942 | |||
| 943 | ✗ | bool PumpVariableSpeed::isMinimumFlowRateDefaulted() const { | |
| 944 | ✗ | return getImpl<detail::PumpVariableSpeed_Impl>()->isMinimumFlowRateDefaulted(); | |
| 945 | } | ||
| 946 | |||
| 947 | 4 | std::string PumpVariableSpeed::pumpControlType() const { | |
| 948 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::PumpVariableSpeed_Impl>()->pumpControlType(); |
| 949 | } | ||
| 950 | |||
| 951 | ✗ | bool PumpVariableSpeed::isPumpControlTypeDefaulted() const { | |
| 952 | ✗ | return getImpl<detail::PumpVariableSpeed_Impl>()->isPumpControlTypeDefaulted(); | |
| 953 | } | ||
| 954 | |||
| 955 | 4 | boost::optional<Schedule> PumpVariableSpeed::pumpFlowRateSchedule() const { | |
| 956 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::PumpVariableSpeed_Impl>()->pumpFlowRateSchedule(); |
| 957 | } | ||
| 958 | |||
| 959 | 4 | boost::optional<Curve> PumpVariableSpeed::pumpCurve() const { | |
| 960 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::PumpVariableSpeed_Impl>()->pumpCurve(); |
| 961 | } | ||
| 962 | |||
| 963 | 4 | boost::optional<double> PumpVariableSpeed::impellerDiameter() const { | |
| 964 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::PumpVariableSpeed_Impl>()->impellerDiameter(); |
| 965 | } | ||
| 966 | |||
| 967 | 4 | boost::optional<std::string> PumpVariableSpeed::vFDControlType() const { | |
| 968 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::PumpVariableSpeed_Impl>()->vFDControlType(); |
| 969 | } | ||
| 970 | |||
| 971 | 4 | boost::optional<Schedule> PumpVariableSpeed::pumpRPMSchedule() const { | |
| 972 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::PumpVariableSpeed_Impl>()->pumpRPMSchedule(); |
| 973 | } | ||
| 974 | |||
| 975 | 4 | boost::optional<Schedule> PumpVariableSpeed::minimumPressureSchedule() const { | |
| 976 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::PumpVariableSpeed_Impl>()->minimumPressureSchedule(); |
| 977 | } | ||
| 978 | |||
| 979 | 4 | boost::optional<Schedule> PumpVariableSpeed::maximumPressureSchedule() const { | |
| 980 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::PumpVariableSpeed_Impl>()->maximumPressureSchedule(); |
| 981 | } | ||
| 982 | |||
| 983 | 4 | boost::optional<Schedule> PumpVariableSpeed::minimumRPMSchedule() const { | |
| 984 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::PumpVariableSpeed_Impl>()->minimumRPMSchedule(); |
| 985 | } | ||
| 986 | |||
| 987 | 4 | boost::optional<Schedule> PumpVariableSpeed::maximumRPMSchedule() const { | |
| 988 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::PumpVariableSpeed_Impl>()->maximumRPMSchedule(); |
| 989 | } | ||
| 990 | |||
| 991 | 2 | bool PumpVariableSpeed::setRatedFlowRate(double ratedFlowRate) { | |
| 992 |
2/2✓ Branch 3 taken 2 times.
✓ Branch 6 taken 2 times.
|
2 | return getImpl<detail::PumpVariableSpeed_Impl>()->setRatedFlowRate(ratedFlowRate); |
| 993 | } | ||
| 994 | |||
| 995 | ✗ | void PumpVariableSpeed::resetRatedFlowRate() { | |
| 996 | ✗ | getImpl<detail::PumpVariableSpeed_Impl>()->resetRatedFlowRate(); | |
| 997 | ✗ | } | |
| 998 | |||
| 999 | ✗ | void PumpVariableSpeed::autosizeRatedFlowRate() { | |
| 1000 | ✗ | getImpl<detail::PumpVariableSpeed_Impl>()->autosizeRatedFlowRate(); | |
| 1001 | ✗ | } | |
| 1002 | |||
| 1003 | 3 | bool PumpVariableSpeed::setRatedPumpHead(double ratedPumpHead) { | |
| 1004 |
1/1✓ Branch 3 taken 3 times.
|
3 | return getImpl<detail::PumpVariableSpeed_Impl>()->setRatedPumpHead(ratedPumpHead); |
| 1005 | } | ||
| 1006 | |||
| 1007 | ✗ | void PumpVariableSpeed::resetRatedPumpHead() { | |
| 1008 | ✗ | getImpl<detail::PumpVariableSpeed_Impl>()->resetRatedPumpHead(); | |
| 1009 | ✗ | } | |
| 1010 | |||
| 1011 | 2 | bool PumpVariableSpeed::setRatedPowerConsumption(double ratedPowerConsumption) { | |
| 1012 |
2/2✓ Branch 3 taken 2 times.
✓ Branch 6 taken 2 times.
|
2 | return getImpl<detail::PumpVariableSpeed_Impl>()->setRatedPowerConsumption(ratedPowerConsumption); |
| 1013 | } | ||
| 1014 | |||
| 1015 | ✗ | void PumpVariableSpeed::resetRatedPowerConsumption() { | |
| 1016 | ✗ | getImpl<detail::PumpVariableSpeed_Impl>()->resetRatedPowerConsumption(); | |
| 1017 | ✗ | } | |
| 1018 | |||
| 1019 | ✗ | void PumpVariableSpeed::autosizeRatedPowerConsumption() { | |
| 1020 | ✗ | getImpl<detail::PumpVariableSpeed_Impl>()->autosizeRatedPowerConsumption(); | |
| 1021 | ✗ | } | |
| 1022 | |||
| 1023 | 2 | bool PumpVariableSpeed::setMotorEfficiency(double motorEfficiency) { | |
| 1024 |
1/1✓ Branch 3 taken 2 times.
|
2 | return getImpl<detail::PumpVariableSpeed_Impl>()->setMotorEfficiency(motorEfficiency); |
| 1025 | } | ||
| 1026 | |||
| 1027 | ✗ | void PumpVariableSpeed::resetMotorEfficiency() { | |
| 1028 | ✗ | getImpl<detail::PumpVariableSpeed_Impl>()->resetMotorEfficiency(); | |
| 1029 | ✗ | } | |
| 1030 | |||
| 1031 | ✗ | bool PumpVariableSpeed::setFractionofMotorInefficienciestoFluidStream(double fractionofMotorInefficienciestoFluidStream) { | |
| 1032 | ✗ | return getImpl<detail::PumpVariableSpeed_Impl>()->setFractionofMotorInefficienciestoFluidStream(fractionofMotorInefficienciestoFluidStream); | |
| 1033 | } | ||
| 1034 | |||
| 1035 | ✗ | void PumpVariableSpeed::resetFractionofMotorInefficienciestoFluidStream() { | |
| 1036 | ✗ | getImpl<detail::PumpVariableSpeed_Impl>()->resetFractionofMotorInefficienciestoFluidStream(); | |
| 1037 | ✗ | } | |
| 1038 | |||
| 1039 | 2 | bool PumpVariableSpeed::setCoefficient1ofthePartLoadPerformanceCurve(double coefficient1ofthePartLoadPerformanceCurve) { | |
| 1040 |
1/1✓ Branch 3 taken 2 times.
|
2 | return getImpl<detail::PumpVariableSpeed_Impl>()->setCoefficient1ofthePartLoadPerformanceCurve(coefficient1ofthePartLoadPerformanceCurve); |
| 1041 | } | ||
| 1042 | |||
| 1043 | ✗ | void PumpVariableSpeed::resetCoefficient1ofthePartLoadPerformanceCurve() { | |
| 1044 | ✗ | getImpl<detail::PumpVariableSpeed_Impl>()->resetCoefficient1ofthePartLoadPerformanceCurve(); | |
| 1045 | ✗ | } | |
| 1046 | |||
| 1047 | 2 | bool PumpVariableSpeed::setCoefficient2ofthePartLoadPerformanceCurve(double coefficient2ofthePartLoadPerformanceCurve) { | |
| 1048 |
1/1✓ Branch 3 taken 2 times.
|
2 | return getImpl<detail::PumpVariableSpeed_Impl>()->setCoefficient2ofthePartLoadPerformanceCurve(coefficient2ofthePartLoadPerformanceCurve); |
| 1049 | } | ||
| 1050 | |||
| 1051 | ✗ | void PumpVariableSpeed::resetCoefficient2ofthePartLoadPerformanceCurve() { | |
| 1052 | ✗ | getImpl<detail::PumpVariableSpeed_Impl>()->resetCoefficient2ofthePartLoadPerformanceCurve(); | |
| 1053 | ✗ | } | |
| 1054 | |||
| 1055 | 2 | bool PumpVariableSpeed::setCoefficient3ofthePartLoadPerformanceCurve(double coefficient3ofthePartLoadPerformanceCurve) { | |
| 1056 |
1/1✓ Branch 3 taken 2 times.
|
2 | return getImpl<detail::PumpVariableSpeed_Impl>()->setCoefficient3ofthePartLoadPerformanceCurve(coefficient3ofthePartLoadPerformanceCurve); |
| 1057 | } | ||
| 1058 | |||
| 1059 | ✗ | void PumpVariableSpeed::resetCoefficient3ofthePartLoadPerformanceCurve() { | |
| 1060 | ✗ | getImpl<detail::PumpVariableSpeed_Impl>()->resetCoefficient3ofthePartLoadPerformanceCurve(); | |
| 1061 | ✗ | } | |
| 1062 | |||
| 1063 | 2 | bool PumpVariableSpeed::setCoefficient4ofthePartLoadPerformanceCurve(double coefficient4ofthePartLoadPerformanceCurve) { | |
| 1064 |
1/1✓ Branch 3 taken 2 times.
|
2 | return getImpl<detail::PumpVariableSpeed_Impl>()->setCoefficient4ofthePartLoadPerformanceCurve(coefficient4ofthePartLoadPerformanceCurve); |
| 1065 | } | ||
| 1066 | |||
| 1067 | ✗ | void PumpVariableSpeed::resetCoefficient4ofthePartLoadPerformanceCurve() { | |
| 1068 | ✗ | getImpl<detail::PumpVariableSpeed_Impl>()->resetCoefficient4ofthePartLoadPerformanceCurve(); | |
| 1069 | ✗ | } | |
| 1070 | |||
| 1071 | 4 | bool PumpVariableSpeed::setMinimumFlowRate(double minimumFlowRate) { | |
| 1072 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::PumpVariableSpeed_Impl>()->setMinimumFlowRate(minimumFlowRate); |
| 1073 | } | ||
| 1074 | |||
| 1075 | ✗ | void PumpVariableSpeed::resetMinimumFlowRate() { | |
| 1076 | ✗ | getImpl<detail::PumpVariableSpeed_Impl>()->resetMinimumFlowRate(); | |
| 1077 | ✗ | } | |
| 1078 | |||
| 1079 | 17 | bool PumpVariableSpeed::setPumpControlType(const std::string& pumpControlType) { | |
| 1080 |
1/1✓ Branch 3 taken 17 times.
|
17 | return getImpl<detail::PumpVariableSpeed_Impl>()->setPumpControlType(pumpControlType); |
| 1081 | } | ||
| 1082 | |||
| 1083 | ✗ | void PumpVariableSpeed::resetPumpControlType() { | |
| 1084 | ✗ | getImpl<detail::PumpVariableSpeed_Impl>()->resetPumpControlType(); | |
| 1085 | ✗ | } | |
| 1086 | |||
| 1087 | ✗ | bool PumpVariableSpeed::setPumpFlowRateSchedule(Schedule& schedule) { | |
| 1088 | ✗ | return getImpl<detail::PumpVariableSpeed_Impl>()->setPumpFlowRateSchedule(schedule); | |
| 1089 | } | ||
| 1090 | |||
| 1091 | ✗ | void PumpVariableSpeed::resetPumpFlowRateSchedule() { | |
| 1092 | ✗ | getImpl<detail::PumpVariableSpeed_Impl>()->resetPumpFlowRateSchedule(); | |
| 1093 | ✗ | } | |
| 1094 | |||
| 1095 | ✗ | bool PumpVariableSpeed::setPumpCurve(const Curve& curve) { | |
| 1096 | ✗ | return getImpl<detail::PumpVariableSpeed_Impl>()->setPumpCurve(curve); | |
| 1097 | } | ||
| 1098 | |||
| 1099 | ✗ | void PumpVariableSpeed::resetPumpCurve() { | |
| 1100 | ✗ | getImpl<detail::PumpVariableSpeed_Impl>()->resetPumpCurve(); | |
| 1101 | ✗ | } | |
| 1102 | |||
| 1103 | ✗ | bool PumpVariableSpeed::setImpellerDiameter(double impellerDiameter) { | |
| 1104 | ✗ | return getImpl<detail::PumpVariableSpeed_Impl>()->setImpellerDiameter(impellerDiameter); | |
| 1105 | } | ||
| 1106 | |||
| 1107 | ✗ | void PumpVariableSpeed::resetImpellerDiameter() { | |
| 1108 | ✗ | getImpl<detail::PumpVariableSpeed_Impl>()->resetImpellerDiameter(); | |
| 1109 | ✗ | } | |
| 1110 | |||
| 1111 | ✗ | bool PumpVariableSpeed::setVFDControlType(const std::string& vFDControlType) { | |
| 1112 | ✗ | return getImpl<detail::PumpVariableSpeed_Impl>()->setVFDControlType(vFDControlType); | |
| 1113 | } | ||
| 1114 | |||
| 1115 | ✗ | void PumpVariableSpeed::resetVFDControlType() { | |
| 1116 | ✗ | getImpl<detail::PumpVariableSpeed_Impl>()->resetVFDControlType(); | |
| 1117 | ✗ | } | |
| 1118 | |||
| 1119 | ✗ | bool PumpVariableSpeed::setPumpRPMSchedule(Schedule& schedule) { | |
| 1120 | ✗ | return getImpl<detail::PumpVariableSpeed_Impl>()->setPumpRPMSchedule(schedule); | |
| 1121 | } | ||
| 1122 | |||
| 1123 | ✗ | void PumpVariableSpeed::resetPumpRPMSchedule() { | |
| 1124 | ✗ | getImpl<detail::PumpVariableSpeed_Impl>()->resetPumpRPMSchedule(); | |
| 1125 | ✗ | } | |
| 1126 | |||
| 1127 | ✗ | bool PumpVariableSpeed::setMinimumPressureSchedule(Schedule& schedule) { | |
| 1128 | ✗ | return getImpl<detail::PumpVariableSpeed_Impl>()->setMinimumPressureSchedule(schedule); | |
| 1129 | } | ||
| 1130 | |||
| 1131 | ✗ | void PumpVariableSpeed::resetMinimumPressureSchedule() { | |
| 1132 | ✗ | getImpl<detail::PumpVariableSpeed_Impl>()->resetMinimumPressureSchedule(); | |
| 1133 | ✗ | } | |
| 1134 | |||
| 1135 | ✗ | bool PumpVariableSpeed::setMaximumPressureSchedule(Schedule& schedule) { | |
| 1136 | ✗ | return getImpl<detail::PumpVariableSpeed_Impl>()->setMaximumPressureSchedule(schedule); | |
| 1137 | } | ||
| 1138 | |||
| 1139 | ✗ | void PumpVariableSpeed::resetMaximumPressureSchedule() { | |
| 1140 | ✗ | getImpl<detail::PumpVariableSpeed_Impl>()->resetMaximumPressureSchedule(); | |
| 1141 | ✗ | } | |
| 1142 | |||
| 1143 | ✗ | bool PumpVariableSpeed::setMinimumRPMSchedule(Schedule& schedule) { | |
| 1144 | ✗ | return getImpl<detail::PumpVariableSpeed_Impl>()->setMinimumRPMSchedule(schedule); | |
| 1145 | } | ||
| 1146 | |||
| 1147 | ✗ | void PumpVariableSpeed::resetMinimumRPMSchedule() { | |
| 1148 | ✗ | getImpl<detail::PumpVariableSpeed_Impl>()->resetMinimumRPMSchedule(); | |
| 1149 | ✗ | } | |
| 1150 | |||
| 1151 | ✗ | bool PumpVariableSpeed::setMaximumRPMSchedule(Schedule& schedule) { | |
| 1152 | ✗ | return getImpl<detail::PumpVariableSpeed_Impl>()->setMaximumRPMSchedule(schedule); | |
| 1153 | } | ||
| 1154 | |||
| 1155 | ✗ | void PumpVariableSpeed::resetMaximumRPMSchedule() { | |
| 1156 | ✗ | getImpl<detail::PumpVariableSpeed_Impl>()->resetMaximumRPMSchedule(); | |
| 1157 | ✗ | } | |
| 1158 | |||
| 1159 | 4 | std::string PumpVariableSpeed::designPowerSizingMethod() const { | |
| 1160 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::PumpVariableSpeed_Impl>()->designPowerSizingMethod(); |
| 1161 | } | ||
| 1162 | |||
| 1163 | 17 | bool PumpVariableSpeed::setDesignPowerSizingMethod(const std::string& designPowerSizingMethod) { | |
| 1164 |
1/1✓ Branch 3 taken 17 times.
|
17 | return getImpl<detail::PumpVariableSpeed_Impl>()->setDesignPowerSizingMethod(designPowerSizingMethod); |
| 1165 | } | ||
| 1166 | |||
| 1167 | 4 | double PumpVariableSpeed::designElectricPowerPerUnitFlowRate() const { | |
| 1168 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::PumpVariableSpeed_Impl>()->designElectricPowerPerUnitFlowRate(); |
| 1169 | } | ||
| 1170 | |||
| 1171 | 17 | bool PumpVariableSpeed::setDesignElectricPowerPerUnitFlowRate(double designElectricPowerPerUnitFlowRate) { | |
| 1172 |
1/1✓ Branch 3 taken 17 times.
|
17 | return getImpl<detail::PumpVariableSpeed_Impl>()->setDesignElectricPowerPerUnitFlowRate(designElectricPowerPerUnitFlowRate); |
| 1173 | } | ||
| 1174 | |||
| 1175 | 4 | double PumpVariableSpeed::designShaftPowerPerUnitFlowRatePerUnitHead() const { | |
| 1176 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::PumpVariableSpeed_Impl>()->designShaftPowerPerUnitFlowRatePerUnitHead(); |
| 1177 | } | ||
| 1178 | |||
| 1179 | 17 | bool PumpVariableSpeed::setDesignShaftPowerPerUnitFlowRatePerUnitHead(double designShaftPowerPerUnitFlowRatePerUnitHead) { | |
| 1180 |
1/1✓ Branch 3 taken 17 times.
|
17 | return getImpl<detail::PumpVariableSpeed_Impl>()->setDesignShaftPowerPerUnitFlowRatePerUnitHead(designShaftPowerPerUnitFlowRatePerUnitHead); |
| 1181 | } | ||
| 1182 | |||
| 1183 | ✗ | boost::optional<ThermalZone> PumpVariableSpeed::zone() const { | |
| 1184 | ✗ | return getImpl<detail::PumpVariableSpeed_Impl>()->zone(); | |
| 1185 | } | ||
| 1186 | |||
| 1187 | ✗ | bool PumpVariableSpeed::setZone(const ThermalZone& thermalZone) { | |
| 1188 | ✗ | return getImpl<detail::PumpVariableSpeed_Impl>()->setZone(thermalZone); | |
| 1189 | } | ||
| 1190 | |||
| 1191 | ✗ | void PumpVariableSpeed::resetZone() { | |
| 1192 | ✗ | getImpl<detail::PumpVariableSpeed_Impl>()->resetZone(); | |
| 1193 | ✗ | } | |
| 1194 | |||
| 1195 | 4 | double PumpVariableSpeed::skinLossRadiativeFraction() const { | |
| 1196 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::PumpVariableSpeed_Impl>()->skinLossRadiativeFraction(); |
| 1197 | } | ||
| 1198 | |||
| 1199 | 17 | bool PumpVariableSpeed::setSkinLossRadiativeFraction(double skinLossRadiativeFraction) { | |
| 1200 |
1/1✓ Branch 3 taken 17 times.
|
17 | return getImpl<detail::PumpVariableSpeed_Impl>()->setSkinLossRadiativeFraction(skinLossRadiativeFraction); |
| 1201 | } | ||
| 1202 | |||
| 1203 | 4 | double PumpVariableSpeed::designMinimumFlowRateFraction() const { | |
| 1204 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::PumpVariableSpeed_Impl>()->designMinimumFlowRateFraction(); |
| 1205 | } | ||
| 1206 | |||
| 1207 | 17 | bool PumpVariableSpeed::setDesignMinimumFlowRateFraction(double designMinimumFlowRateFraction) { | |
| 1208 |
1/1✓ Branch 3 taken 17 times.
|
17 | return getImpl<detail::PumpVariableSpeed_Impl>()->setDesignMinimumFlowRateFraction(designMinimumFlowRateFraction); |
| 1209 | } | ||
| 1210 | |||
| 1211 | 4 | std::string PumpVariableSpeed::endUseSubcategory() const { | |
| 1212 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::PumpVariableSpeed_Impl>()->endUseSubcategory(); |
| 1213 | } | ||
| 1214 | |||
| 1215 | 17 | bool PumpVariableSpeed::setEndUseSubcategory(const std::string& endUseSubcategory) { | |
| 1216 |
1/1✓ Branch 3 taken 17 times.
|
17 | return getImpl<detail::PumpVariableSpeed_Impl>()->setEndUseSubcategory(endUseSubcategory); |
| 1217 | } | ||
| 1218 | |||
| 1219 | /// @cond | ||
| 1220 |
1/1✓ Branch 3 taken 42 times.
|
42 | PumpVariableSpeed::PumpVariableSpeed(std::shared_ptr<detail::PumpVariableSpeed_Impl> impl) : StraightComponent(std::move(impl)) {} |
| 1221 | /// @endcond | ||
| 1222 | |||
| 1223 | ✗ | boost::optional<double> PumpVariableSpeed::autosizedRatedFlowRate() const { | |
| 1224 | ✗ | return getImpl<detail::PumpVariableSpeed_Impl>()->autosizedRatedFlowRate(); | |
| 1225 | } | ||
| 1226 | |||
| 1227 | ✗ | boost::optional<double> PumpVariableSpeed::autosizedRatedPowerConsumption() const { | |
| 1228 | ✗ | return getImpl<detail::PumpVariableSpeed_Impl>()->autosizedRatedPowerConsumption(); | |
| 1229 | } | ||
| 1230 | |||
| 1231 | } // namespace model | ||
| 1232 | } // namespace openstudio | ||
| 1233 |