src/model/PumpVariableSpeed.hpp
| 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 | #ifndef MODEL_PUMPVARIABLESPEED_HPP | ||
| 7 | #define MODEL_PUMPVARIABLESPEED_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "StraightComponent.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | namespace model { | ||
| 14 | |||
| 15 | class Schedule; | ||
| 16 | class Curve; | ||
| 17 | class ThermalZone; | ||
| 18 | |||
| 19 | namespace detail { | ||
| 20 | |||
| 21 | class PumpVariableSpeed_Impl; | ||
| 22 | |||
| 23 | } // namespace detail | ||
| 24 | |||
| 25 | /** PumpVariableSpeed is a StraightComponent that wraps the OpenStudio IDD object | ||
| 26 | * 'OS:Pump:VariableSpeed'. */ | ||
| 27 | class MODEL_API PumpVariableSpeed : public StraightComponent | ||
| 28 | { | ||
| 29 | public: | ||
| 30 | /** @name Constructors and Destructors */ | ||
| 31 | //@{ | ||
| 32 | |||
| 33 | explicit PumpVariableSpeed(const Model& model); | ||
| 34 | |||
| 35 | 67 | virtual ~PumpVariableSpeed() override = default; | |
| 36 | // Default the copy and move operators because the virtual dtor is explicit | ||
| 37 | 4 | PumpVariableSpeed(const PumpVariableSpeed& other) = default; | |
| 38 | 5 | PumpVariableSpeed(PumpVariableSpeed&& other) = default; | |
| 39 | ✗ | PumpVariableSpeed& operator=(const PumpVariableSpeed&) = default; | |
| 40 | ✗ | PumpVariableSpeed& operator=(PumpVariableSpeed&&) = default; | |
| 41 | |||
| 42 | //@} | ||
| 43 | |||
| 44 | static IddObjectType iddObjectType(); | ||
| 45 | |||
| 46 | static std::vector<std::string> pumpControlTypeValues(); | ||
| 47 | |||
| 48 | static std::vector<std::string> designPowerSizingMethodValues(); | ||
| 49 | |||
| 50 | /** \deprecated */ | ||
| 51 | static std::vector<std::string> validPumpControlTypeValues(); | ||
| 52 | |||
| 53 | static std::vector<std::string> vfdControlTypeValues(); | ||
| 54 | |||
| 55 | /** @name Getters */ | ||
| 56 | //@{ | ||
| 57 | |||
| 58 | /** In EnergyPlus 8.5.0 and above this property maps to the EnergyPlus field "Design Maximum Flow Rate" **/ | ||
| 59 | boost::optional<double> ratedFlowRate() const; | ||
| 60 | |||
| 61 | bool isRatedFlowRateDefaulted() const; | ||
| 62 | |||
| 63 | bool isRatedFlowRateAutosized() const; | ||
| 64 | |||
| 65 | /** In EnergyPlus 8.5.0 and above this property maps to the EnergyPlus field "Design Pump Head" **/ | ||
| 66 | double ratedPumpHead() const; | ||
| 67 | |||
| 68 | bool isRatedPumpHeadDefaulted() const; | ||
| 69 | |||
| 70 | /** In EnergyPlus 8.5.0 and above this property maps to the EnergyPlus field "Design Power Consumption" **/ | ||
| 71 | boost::optional<double> ratedPowerConsumption() const; | ||
| 72 | |||
| 73 | bool isRatedPowerConsumptionDefaulted() const; | ||
| 74 | |||
| 75 | bool isRatedPowerConsumptionAutosized() const; | ||
| 76 | |||
| 77 | double motorEfficiency() const; | ||
| 78 | |||
| 79 | bool isMotorEfficiencyDefaulted() const; | ||
| 80 | |||
| 81 | double fractionofMotorInefficienciestoFluidStream() const; | ||
| 82 | |||
| 83 | bool isFractionofMotorInefficienciestoFluidStreamDefaulted() const; | ||
| 84 | |||
| 85 | double coefficient1ofthePartLoadPerformanceCurve() const; | ||
| 86 | |||
| 87 | bool isCoefficient1ofthePartLoadPerformanceCurveDefaulted() const; | ||
| 88 | |||
| 89 | double coefficient2ofthePartLoadPerformanceCurve() const; | ||
| 90 | |||
| 91 | bool isCoefficient2ofthePartLoadPerformanceCurveDefaulted() const; | ||
| 92 | |||
| 93 | double coefficient3ofthePartLoadPerformanceCurve() const; | ||
| 94 | |||
| 95 | bool isCoefficient3ofthePartLoadPerformanceCurveDefaulted() const; | ||
| 96 | |||
| 97 | double coefficient4ofthePartLoadPerformanceCurve() const; | ||
| 98 | |||
| 99 | bool isCoefficient4ofthePartLoadPerformanceCurveDefaulted() const; | ||
| 100 | |||
| 101 | /** In EnergyPlus 8.5.0 and above this property maps to the EnergyPlus field "Design Minimum Flow Rate" **/ | ||
| 102 | double minimumFlowRate() const; | ||
| 103 | |||
| 104 | bool isMinimumFlowRateDefaulted() const; | ||
| 105 | |||
| 106 | std::string pumpControlType() const; | ||
| 107 | |||
| 108 | bool isPumpControlTypeDefaulted() const; | ||
| 109 | |||
| 110 | boost::optional<Schedule> pumpFlowRateSchedule() const; | ||
| 111 | |||
| 112 | boost::optional<Curve> pumpCurve() const; | ||
| 113 | |||
| 114 | boost::optional<double> impellerDiameter() const; | ||
| 115 | |||
| 116 | boost::optional<std::string> vFDControlType() const; | ||
| 117 | |||
| 118 | boost::optional<Schedule> pumpRPMSchedule() const; | ||
| 119 | |||
| 120 | boost::optional<Schedule> minimumPressureSchedule() const; | ||
| 121 | |||
| 122 | boost::optional<Schedule> maximumPressureSchedule() const; | ||
| 123 | |||
| 124 | boost::optional<Schedule> minimumRPMSchedule() const; | ||
| 125 | |||
| 126 | boost::optional<Schedule> maximumRPMSchedule() const; | ||
| 127 | |||
| 128 | std::string endUseSubcategory() const; | ||
| 129 | |||
| 130 | //@} | ||
| 131 | /** @name Setters */ | ||
| 132 | //@{ | ||
| 133 | |||
| 134 | bool setRatedFlowRate(double ratedFlowRate); | ||
| 135 | |||
| 136 | void resetRatedFlowRate(); | ||
| 137 | |||
| 138 | void autosizeRatedFlowRate(); | ||
| 139 | |||
| 140 | bool setRatedPumpHead(double ratedPumpHead); | ||
| 141 | |||
| 142 | void resetRatedPumpHead(); | ||
| 143 | |||
| 144 | bool setRatedPowerConsumption(double ratedPowerConsumption); | ||
| 145 | |||
| 146 | void resetRatedPowerConsumption(); | ||
| 147 | |||
| 148 | void autosizeRatedPowerConsumption(); | ||
| 149 | |||
| 150 | bool setMotorEfficiency(double motorEfficiency); | ||
| 151 | |||
| 152 | void resetMotorEfficiency(); | ||
| 153 | |||
| 154 | bool setFractionofMotorInefficienciestoFluidStream(double fractionofMotorInefficienciestoFluidStream); | ||
| 155 | |||
| 156 | void resetFractionofMotorInefficienciestoFluidStream(); | ||
| 157 | |||
| 158 | bool setCoefficient1ofthePartLoadPerformanceCurve(double coefficient1ofthePartLoadPerformanceCurve); | ||
| 159 | |||
| 160 | void resetCoefficient1ofthePartLoadPerformanceCurve(); | ||
| 161 | |||
| 162 | bool setCoefficient2ofthePartLoadPerformanceCurve(double coefficient2ofthePartLoadPerformanceCurve); | ||
| 163 | |||
| 164 | void resetCoefficient2ofthePartLoadPerformanceCurve(); | ||
| 165 | |||
| 166 | bool setCoefficient3ofthePartLoadPerformanceCurve(double coefficient3ofthePartLoadPerformanceCurve); | ||
| 167 | |||
| 168 | void resetCoefficient3ofthePartLoadPerformanceCurve(); | ||
| 169 | |||
| 170 | bool setCoefficient4ofthePartLoadPerformanceCurve(double coefficient4ofthePartLoadPerformanceCurve); | ||
| 171 | |||
| 172 | void resetCoefficient4ofthePartLoadPerformanceCurve(); | ||
| 173 | |||
| 174 | bool setMinimumFlowRate(double minimumFlowRate); | ||
| 175 | |||
| 176 | void resetMinimumFlowRate(); | ||
| 177 | |||
| 178 | bool setPumpControlType(const std::string& pumpControlType); | ||
| 179 | |||
| 180 | void resetPumpControlType(); | ||
| 181 | |||
| 182 | bool setPumpFlowRateSchedule(Schedule& schedule); | ||
| 183 | |||
| 184 | void resetPumpFlowRateSchedule(); | ||
| 185 | |||
| 186 | /** Returns false if curve is not a CurveLinear, CurveQuadratic, CurveCubic or CurveQuartic. */ | ||
| 187 | bool setPumpCurve(const Curve& curve); | ||
| 188 | |||
| 189 | void resetPumpCurve(); | ||
| 190 | |||
| 191 | bool setImpellerDiameter(double impellerDiameter); | ||
| 192 | |||
| 193 | void resetImpellerDiameter(); | ||
| 194 | |||
| 195 | bool setVFDControlType(const std::string& vFDControlType); | ||
| 196 | |||
| 197 | void resetVFDControlType(); | ||
| 198 | |||
| 199 | bool setPumpRPMSchedule(Schedule& schedule); | ||
| 200 | |||
| 201 | void resetPumpRPMSchedule(); | ||
| 202 | |||
| 203 | bool setMinimumPressureSchedule(Schedule& schedule); | ||
| 204 | |||
| 205 | void resetMinimumPressureSchedule(); | ||
| 206 | |||
| 207 | bool setMaximumPressureSchedule(Schedule& schedule); | ||
| 208 | |||
| 209 | void resetMaximumPressureSchedule(); | ||
| 210 | |||
| 211 | bool setMinimumRPMSchedule(Schedule& schedule); | ||
| 212 | |||
| 213 | void resetMinimumRPMSchedule(); | ||
| 214 | |||
| 215 | bool setMaximumRPMSchedule(Schedule& schedule); | ||
| 216 | |||
| 217 | void resetMaximumRPMSchedule(); | ||
| 218 | |||
| 219 | boost::optional<double> autosizedRatedFlowRate() const; | ||
| 220 | |||
| 221 | boost::optional<double> autosizedRatedPowerConsumption() const; | ||
| 222 | |||
| 223 | std::string designPowerSizingMethod() const; | ||
| 224 | |||
| 225 | bool setDesignPowerSizingMethod(const std::string& designPowerSizingMethod); | ||
| 226 | |||
| 227 | double designElectricPowerPerUnitFlowRate() const; | ||
| 228 | |||
| 229 | bool setDesignElectricPowerPerUnitFlowRate(double designElectricPowerPerUnitFlowRate); | ||
| 230 | |||
| 231 | double designShaftPowerPerUnitFlowRatePerUnitHead() const; | ||
| 232 | |||
| 233 | bool setDesignShaftPowerPerUnitFlowRatePerUnitHead(double designShaftPowerPerUnitFlowRatePerUnitHead); | ||
| 234 | |||
| 235 | boost::optional<ThermalZone> zone() const; | ||
| 236 | |||
| 237 | bool setZone(const ThermalZone& thermalZone); | ||
| 238 | |||
| 239 | void resetZone(); | ||
| 240 | |||
| 241 | double skinLossRadiativeFraction() const; | ||
| 242 | |||
| 243 | bool setSkinLossRadiativeFraction(double skinLossRadiativeFraction); | ||
| 244 | |||
| 245 | double designMinimumFlowRateFraction() const; | ||
| 246 | |||
| 247 | bool setDesignMinimumFlowRateFraction(double designMinimumFlowRateFraction); | ||
| 248 | |||
| 249 | bool setEndUseSubcategory(const std::string& endUseSubcategory); | ||
| 250 | |||
| 251 | //@} | ||
| 252 | protected: | ||
| 253 | /// @cond | ||
| 254 | using ImplType = detail::PumpVariableSpeed_Impl; | ||
| 255 | |||
| 256 | friend class detail::PumpVariableSpeed_Impl; | ||
| 257 | friend class Model; | ||
| 258 | friend class IdfObject; | ||
| 259 | friend class openstudio::detail::IdfObject_Impl; | ||
| 260 | |||
| 261 | explicit PumpVariableSpeed(std::shared_ptr<detail::PumpVariableSpeed_Impl> impl); | ||
| 262 | |||
| 263 | /// @endcond | ||
| 264 | private: | ||
| 265 | REGISTER_LOGGER("openstudio.model.PumpVariableSpeed"); | ||
| 266 | }; | ||
| 267 | |||
| 268 | /** \relates PumpVariableSpeed*/ | ||
| 269 | using OptionalPumpVariableSpeed = boost::optional<PumpVariableSpeed>; | ||
| 270 | |||
| 271 | /** \relates PumpVariableSpeed*/ | ||
| 272 | using PumpVariableSpeedVector = std::vector<PumpVariableSpeed>; | ||
| 273 | |||
| 274 | } // namespace model | ||
| 275 | } // namespace openstudio | ||
| 276 | |||
| 277 | #endif // MODEL_PUMPVARIABLESPEED_HPP | ||
| 278 |