src/model/WaterHeaterMixed.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_WATERHEATERMIXED_HPP | ||
| 7 | #define MODEL_WATERHEATERMIXED_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "WaterToWaterComponent.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | |||
| 14 | class FuelType; | ||
| 15 | |||
| 16 | namespace model { | ||
| 17 | |||
| 18 | class Schedule; | ||
| 19 | class CurveCubic; | ||
| 20 | class ThermalZone; | ||
| 21 | class WaterHeaterSizing; | ||
| 22 | class Node; | ||
| 23 | class PlantLoop; | ||
| 24 | |||
| 25 | namespace detail { | ||
| 26 | |||
| 27 | class WaterHeaterMixed_Impl; | ||
| 28 | |||
| 29 | } // namespace detail | ||
| 30 | |||
| 31 | /** WaterHeaterMixed is a WaterToWaterComponent that wraps the OpenStudio IDD object | ||
| 32 | * 'OS:WaterHeater:Mixed'. */ | ||
| 33 | class MODEL_API WaterHeaterMixed : public WaterToWaterComponent | ||
| 34 | { | ||
| 35 | public: | ||
| 36 | /** @name Constructors and Destructors */ | ||
| 37 | //@{ | ||
| 38 | |||
| 39 | explicit WaterHeaterMixed(const Model& model); | ||
| 40 | |||
| 41 | 340 | virtual ~WaterHeaterMixed() override = default; | |
| 42 | // Default the copy and move operators because the virtual dtor is explicit | ||
| 43 | ✗ | WaterHeaterMixed(const WaterHeaterMixed& other) = default; | |
| 44 | 69 | WaterHeaterMixed(WaterHeaterMixed&& other) = default; | |
| 45 | ✗ | WaterHeaterMixed& operator=(const WaterHeaterMixed&) = default; | |
| 46 | ✗ | WaterHeaterMixed& operator=(WaterHeaterMixed&&) = default; | |
| 47 | |||
| 48 | //@} | ||
| 49 | |||
| 50 | static IddObjectType iddObjectType(); | ||
| 51 | |||
| 52 | static std::vector<std::string> heaterControlTypeValues(); | ||
| 53 | |||
| 54 | static std::vector<std::string> heaterFuelTypeValues(); | ||
| 55 | |||
| 56 | static std::vector<std::string> offCycleParasiticFuelTypeValues(); | ||
| 57 | |||
| 58 | static std::vector<std::string> onCycleParasiticFuelTypeValues(); | ||
| 59 | |||
| 60 | static std::vector<std::string> ambientTemperatureIndicatorValues(); | ||
| 61 | |||
| 62 | static std::vector<std::string> sourceSideFlowControlModeValues(); | ||
| 63 | |||
| 64 | /** @name Getters */ | ||
| 65 | //@{ | ||
| 66 | |||
| 67 | boost::optional<double> tankVolume() const; | ||
| 68 | |||
| 69 | bool isTankVolumeDefaulted() const; | ||
| 70 | |||
| 71 | bool isTankVolumeAutosized() const; | ||
| 72 | |||
| 73 | boost::optional<Schedule> setpointTemperatureSchedule() const; | ||
| 74 | |||
| 75 | double deadbandTemperatureDifference() const; | ||
| 76 | |||
| 77 | bool isDeadbandTemperatureDifferenceDefaulted() const; | ||
| 78 | |||
| 79 | boost::optional<double> maximumTemperatureLimit() const; | ||
| 80 | |||
| 81 | std::string heaterControlType() const; | ||
| 82 | |||
| 83 | bool isHeaterControlTypeDefaulted() const; | ||
| 84 | |||
| 85 | boost::optional<double> heaterMaximumCapacity() const; | ||
| 86 | |||
| 87 | bool isHeaterMaximumCapacityAutosized() const; | ||
| 88 | |||
| 89 | boost::optional<double> heaterMinimumCapacity() const; | ||
| 90 | |||
| 91 | double heaterIgnitionMinimumFlowRate() const; | ||
| 92 | |||
| 93 | bool isHeaterIgnitionMinimumFlowRateDefaulted() const; | ||
| 94 | |||
| 95 | double heaterIgnitionDelay() const; | ||
| 96 | |||
| 97 | bool isHeaterIgnitionDelayDefaulted() const; | ||
| 98 | |||
| 99 | std::string heaterFuelType() const; | ||
| 100 | |||
| 101 | boost::optional<double> heaterThermalEfficiency() const; | ||
| 102 | |||
| 103 | boost::optional<CurveCubic> partLoadFactorCurve() const; | ||
| 104 | |||
| 105 | double offCycleParasiticFuelConsumptionRate() const; | ||
| 106 | |||
| 107 | bool isOffCycleParasiticFuelConsumptionRateDefaulted() const; | ||
| 108 | |||
| 109 | boost::optional<std::string> offCycleParasiticFuelType() const; | ||
| 110 | |||
| 111 | double offCycleParasiticHeatFractiontoTank() const; | ||
| 112 | |||
| 113 | bool isOffCycleParasiticHeatFractiontoTankDefaulted() const; | ||
| 114 | |||
| 115 | double onCycleParasiticFuelConsumptionRate() const; | ||
| 116 | |||
| 117 | bool isOnCycleParasiticFuelConsumptionRateDefaulted() const; | ||
| 118 | |||
| 119 | boost::optional<std::string> onCycleParasiticFuelType() const; | ||
| 120 | |||
| 121 | double onCycleParasiticHeatFractiontoTank() const; | ||
| 122 | |||
| 123 | bool isOnCycleParasiticHeatFractiontoTankDefaulted() const; | ||
| 124 | |||
| 125 | std::string ambientTemperatureIndicator() const; | ||
| 126 | |||
| 127 | boost::optional<Schedule> ambientTemperatureSchedule() const; | ||
| 128 | |||
| 129 | boost::optional<ThermalZone> ambientTemperatureThermalZone() const; | ||
| 130 | |||
| 131 | boost::optional<std::string> ambientTemperatureOutdoorAirNodeName() const; | ||
| 132 | |||
| 133 | boost::optional<double> offCycleLossCoefficienttoAmbientTemperature() const; | ||
| 134 | |||
| 135 | double offCycleLossFractiontoThermalZone() const; | ||
| 136 | |||
| 137 | bool isOffCycleLossFractiontoThermalZoneDefaulted() const; | ||
| 138 | |||
| 139 | boost::optional<double> onCycleLossCoefficienttoAmbientTemperature() const; | ||
| 140 | |||
| 141 | double onCycleLossFractiontoThermalZone() const; | ||
| 142 | |||
| 143 | bool isOnCycleLossFractiontoThermalZoneDefaulted() const; | ||
| 144 | |||
| 145 | boost::optional<double> peakUseFlowRate() const; | ||
| 146 | |||
| 147 | boost::optional<Schedule> useFlowRateFractionSchedule() const; | ||
| 148 | |||
| 149 | boost::optional<Schedule> coldWaterSupplyTemperatureSchedule() const; | ||
| 150 | |||
| 151 | double useSideEffectiveness() const; | ||
| 152 | |||
| 153 | bool isUseSideEffectivenessDefaulted() const; | ||
| 154 | |||
| 155 | double sourceSideEffectiveness() const; | ||
| 156 | |||
| 157 | bool isSourceSideEffectivenessDefaulted() const; | ||
| 158 | |||
| 159 | boost::optional<double> useSideDesignFlowRate() const; | ||
| 160 | |||
| 161 | bool isUseSideDesignFlowRateDefaulted() const; | ||
| 162 | |||
| 163 | bool isUseSideDesignFlowRateAutosized() const; | ||
| 164 | |||
| 165 | boost::optional<double> sourceSideDesignFlowRate() const; | ||
| 166 | |||
| 167 | bool isSourceSideDesignFlowRateDefaulted() const; | ||
| 168 | |||
| 169 | bool isSourceSideDesignFlowRateAutosized() const; | ||
| 170 | |||
| 171 | double indirectWaterHeatingRecoveryTime() const; | ||
| 172 | |||
| 173 | bool isIndirectWaterHeatingRecoveryTimeDefaulted() const; | ||
| 174 | |||
| 175 | std::string sourceSideFlowControlMode() const; | ||
| 176 | |||
| 177 | boost::optional<Schedule> indirectAlternateSetpointTemperatureSchedule() const; | ||
| 178 | |||
| 179 | std::string endUseSubcategory() const; | ||
| 180 | |||
| 181 | //@} | ||
| 182 | /** @name Setters */ | ||
| 183 | //@{ | ||
| 184 | |||
| 185 | bool setTankVolume(double tankVolume); | ||
| 186 | |||
| 187 | void resetTankVolume(); | ||
| 188 | |||
| 189 | void autosizeTankVolume(); | ||
| 190 | |||
| 191 | bool setSetpointTemperatureSchedule(Schedule& setpointTemperatureSchedule); | ||
| 192 | |||
| 193 | void resetSetpointTemperatureSchedule(); | ||
| 194 | |||
| 195 | bool setDeadbandTemperatureDifference(double deadbandTemperatureDifference); | ||
| 196 | |||
| 197 | void resetDeadbandTemperatureDifference(); | ||
| 198 | |||
| 199 | bool setMaximumTemperatureLimit(double maximumTemperatureLimit); | ||
| 200 | |||
| 201 | void resetMaximumTemperatureLimit(); | ||
| 202 | |||
| 203 | bool setHeaterControlType(const std::string& heaterControlType); | ||
| 204 | |||
| 205 | void resetHeaterControlType(); | ||
| 206 | |||
| 207 | bool setHeaterMaximumCapacity(double heaterMaximumCapacity); | ||
| 208 | |||
| 209 | void resetHeaterMaximumCapacity(); | ||
| 210 | |||
| 211 | void autosizeHeaterMaximumCapacity(); | ||
| 212 | |||
| 213 | bool setHeaterMinimumCapacity(double heaterMinimumCapacity); | ||
| 214 | |||
| 215 | void resetHeaterMinimumCapacity(); | ||
| 216 | |||
| 217 | bool setHeaterIgnitionMinimumFlowRate(double heaterIgnitionMinimumFlowRate); | ||
| 218 | |||
| 219 | void resetHeaterIgnitionMinimumFlowRate(); | ||
| 220 | |||
| 221 | bool setHeaterIgnitionDelay(double heaterIgnitionDelay); | ||
| 222 | |||
| 223 | void resetHeaterIgnitionDelay(); | ||
| 224 | |||
| 225 | bool setHeaterFuelType(const FuelType& heaterFuelType); | ||
| 226 | bool setHeaterFuelType(const std::string& heaterFuelType); | ||
| 227 | |||
| 228 | bool setHeaterThermalEfficiency(double heaterThermalEfficiency); | ||
| 229 | |||
| 230 | void resetHeaterThermalEfficiency(); | ||
| 231 | |||
| 232 | bool setPartLoadFactorCurve(const CurveCubic& partLoadFactorCurve); | ||
| 233 | |||
| 234 | void resetPartLoadFactorCurve(); | ||
| 235 | |||
| 236 | bool setOffCycleParasiticFuelConsumptionRate(double offCycleParasiticFuelConsumptionRate); | ||
| 237 | |||
| 238 | void resetOffCycleParasiticFuelConsumptionRate(); | ||
| 239 | |||
| 240 | bool setOffCycleParasiticFuelType(const FuelType& offCycleParasiticFuelType); | ||
| 241 | bool setOffCycleParasiticFuelType(const std::string& offCycleParasiticFuelType); | ||
| 242 | |||
| 243 | void resetOffCycleParasiticFuelType(); | ||
| 244 | |||
| 245 | bool setOffCycleParasiticHeatFractiontoTank(double offCycleParasiticHeatFractiontoTank); | ||
| 246 | |||
| 247 | void resetOffCycleParasiticHeatFractiontoTank(); | ||
| 248 | |||
| 249 | bool setOnCycleParasiticFuelConsumptionRate(double onCycleParasiticFuelConsumptionRate); | ||
| 250 | |||
| 251 | void resetOnCycleParasiticFuelConsumptionRate(); | ||
| 252 | |||
| 253 | bool setOnCycleParasiticFuelType(const FuelType& onCycleParasiticFuelType); | ||
| 254 | bool setOnCycleParasiticFuelType(const std::string& onCycleParasiticFuelType); | ||
| 255 | |||
| 256 | void resetOnCycleParasiticFuelType(); | ||
| 257 | |||
| 258 | bool setOnCycleParasiticHeatFractiontoTank(double onCycleParasiticHeatFractiontoTank); | ||
| 259 | |||
| 260 | void resetOnCycleParasiticHeatFractiontoTank(); | ||
| 261 | |||
| 262 | bool setAmbientTemperatureIndicator(const std::string& ambientTemperatureIndicator); | ||
| 263 | |||
| 264 | bool setAmbientTemperatureSchedule(Schedule& ambientTemperatureSchedule); | ||
| 265 | |||
| 266 | void resetAmbientTemperatureSchedule(); | ||
| 267 | |||
| 268 | bool setAmbientTemperatureThermalZone(const ThermalZone& ambientTemperatureThermalZone); | ||
| 269 | |||
| 270 | void resetAmbientTemperatureThermalZone(); | ||
| 271 | |||
| 272 | bool setAmbientTemperatureOutdoorAirNodeName(const std::string& ambientTemperatureOutdoorAirNodeName); | ||
| 273 | |||
| 274 | void resetAmbientTemperatureOutdoorAirNodeName(); | ||
| 275 | |||
| 276 | bool setOffCycleLossCoefficienttoAmbientTemperature(double offCycleLossCoefficienttoAmbientTemperature); | ||
| 277 | |||
| 278 | void resetOffCycleLossCoefficienttoAmbientTemperature(); | ||
| 279 | |||
| 280 | bool setOffCycleLossFractiontoThermalZone(double offCycleLossFractiontoThermalZone); | ||
| 281 | |||
| 282 | void resetOffCycleLossFractiontoThermalZone(); | ||
| 283 | |||
| 284 | bool setOnCycleLossCoefficienttoAmbientTemperature(double onCycleLossCoefficienttoAmbientTemperature); | ||
| 285 | |||
| 286 | void resetOnCycleLossCoefficienttoAmbientTemperature(); | ||
| 287 | |||
| 288 | bool setOnCycleLossFractiontoThermalZone(double onCycleLossFractiontoThermalZone); | ||
| 289 | |||
| 290 | void resetOnCycleLossFractiontoThermalZone(); | ||
| 291 | |||
| 292 | bool setPeakUseFlowRate(double peakUseFlowRate); | ||
| 293 | |||
| 294 | void resetPeakUseFlowRate(); | ||
| 295 | |||
| 296 | bool setUseFlowRateFractionSchedule(Schedule& useFlowRateFractionSchedule); | ||
| 297 | |||
| 298 | void resetUseFlowRateFractionSchedule(); | ||
| 299 | |||
| 300 | bool setColdWaterSupplyTemperatureSchedule(Schedule& coldWaterSupplyTemperatureSchedule); | ||
| 301 | |||
| 302 | void resetColdWaterSupplyTemperatureSchedule(); | ||
| 303 | |||
| 304 | bool setUseSideEffectiveness(double useSideEffectiveness); | ||
| 305 | |||
| 306 | void resetUseSideEffectiveness(); | ||
| 307 | |||
| 308 | bool setSourceSideEffectiveness(double sourceSideEffectiveness); | ||
| 309 | |||
| 310 | void resetSourceSideEffectiveness(); | ||
| 311 | |||
| 312 | bool setUseSideDesignFlowRate(double useSideDesignFlowRate); | ||
| 313 | |||
| 314 | void resetUseSideDesignFlowRate(); | ||
| 315 | |||
| 316 | void autosizeUseSideDesignFlowRate(); | ||
| 317 | |||
| 318 | bool setSourceSideDesignFlowRate(double sourceSideDesignFlowRate); | ||
| 319 | |||
| 320 | void resetSourceSideDesignFlowRate(); | ||
| 321 | |||
| 322 | void autosizeSourceSideDesignFlowRate(); | ||
| 323 | |||
| 324 | bool setIndirectWaterHeatingRecoveryTime(double indirectWaterHeatingRecoveryTime); | ||
| 325 | |||
| 326 | void resetIndirectWaterHeatingRecoveryTime(); | ||
| 327 | |||
| 328 | boost::optional<double> autosizedTankVolume() const; | ||
| 329 | |||
| 330 | boost::optional<double> autosizedHeaterMaximumCapacity() const; | ||
| 331 | |||
| 332 | boost::optional<double> autosizedUseSideDesignFlowRate() const; | ||
| 333 | |||
| 334 | boost::optional<double> autosizedSourceSideDesignFlowRate() const; | ||
| 335 | |||
| 336 | /* This will not accept 'IndirectHeatAlternateSetpoint' as a control mode, you should instead use 'setIndirectAlternateSetpointTemperatureSchedule'. | ||
| 337 | * For any other modes ('StorageTank', 'IndirectHeatPrimarySetpoint'), this resets the indirect alternate setpoint temperature schedule | ||
| 338 | */ | ||
| 339 | bool setSourceSideFlowControlMode(const std::string& sourceSideFlowControlMode); | ||
| 340 | |||
| 341 | /* This will automatically switch the Source Side Flow Control Mode to 'IndirectHeatAlternateSetpoint' */ | ||
| 342 | bool setIndirectAlternateSetpointTemperatureSchedule(Schedule& indirectAlternateSetpointTemperatureSchedule); | ||
| 343 | |||
| 344 | /* This will automatically reset the Source Side Flow Control Mode to default 'IndirectHeatPrimarySetpoint' */ | ||
| 345 | void resetIndirectAlternateSetpointTemperatureSchedule(); | ||
| 346 | |||
| 347 | bool setEndUseSubcategory(const std::string& endUseSubcategory); | ||
| 348 | |||
| 349 | //@} | ||
| 350 | /** @name Other */ | ||
| 351 | //@{ | ||
| 352 | |||
| 353 | WaterHeaterSizing waterHeaterSizing() const; | ||
| 354 | |||
| 355 | // A helper method to specifically connect the tank on its Source Side, regardless of whether it is on the demand or supply side (without | ||
| 356 | // disconnecting the Use Side, in case it's a supply node given) | ||
| 357 | bool addToSourceSideNode(Node& node); | ||
| 358 | |||
| 359 | // This is a more conveniently named method to return the PlantLoop connected to the Use Side Inlet/Outlet Nodes, | ||
| 360 | // which is necessarilly on the supply side. It does exactly the same as the overriden secondaryPlantLoop() method | ||
| 361 | boost::optional<PlantLoop> useSidePlantLoop() const; | ||
| 362 | |||
| 363 | // This is a more conveniently named helper to return the PlantLoop connected to the Source Side Inlet/Outlet Nodes, | ||
| 364 | // whether that is on the demand or supply side. It does exactly the same as the overriden plantLoop() method | ||
| 365 | boost::optional<PlantLoop> sourceSidePlantLoop() const; | ||
| 366 | |||
| 367 | // Convenience name for removeFromSecondaryPlantLoop() | ||
| 368 | bool removeFromSourceSidePlantLoop(); | ||
| 369 | |||
| 370 | boost::optional<ModelObject> useSideInletModelObject() const; | ||
| 371 | |||
| 372 | boost::optional<ModelObject> useSideOutletModelObject() const; | ||
| 373 | |||
| 374 | boost::optional<ModelObject> sourceSideInletModelObject() const; | ||
| 375 | |||
| 376 | boost::optional<ModelObject> sourceSideOutletModelObject() const; | ||
| 377 | |||
| 378 | //@} | ||
| 379 | protected: | ||
| 380 | /// @cond | ||
| 381 | using ImplType = detail::WaterHeaterMixed_Impl; | ||
| 382 | |||
| 383 | explicit WaterHeaterMixed(std::shared_ptr<detail::WaterHeaterMixed_Impl> impl); | ||
| 384 | |||
| 385 | friend class detail::WaterHeaterMixed_Impl; | ||
| 386 | friend class Model; | ||
| 387 | friend class IdfObject; | ||
| 388 | friend class openstudio::detail::IdfObject_Impl; | ||
| 389 | |||
| 390 | /// @endcond | ||
| 391 | |||
| 392 | private: | ||
| 393 | − | REGISTER_LOGGER("openstudio.model.WaterHeaterMixed"); | |
| 394 | }; | ||
| 395 | |||
| 396 | /** \relates WaterHeaterMixed*/ | ||
| 397 | using OptionalWaterHeaterMixed = boost::optional<WaterHeaterMixed>; | ||
| 398 | |||
| 399 | /** \relates WaterHeaterMixed*/ | ||
| 400 | using WaterHeaterMixedVector = std::vector<WaterHeaterMixed>; | ||
| 401 | |||
| 402 | } // namespace model | ||
| 403 | } // namespace openstudio | ||
| 404 | |||
| 405 | #endif // MODEL_WATERHEATERMIXED_HPP | ||
| 406 |