src/model/WaterHeaterStratified.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_WATERHEATERSTRATIFIED_HPP | ||
| 7 | #define MODEL_WATERHEATERSTRATIFIED_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 ThermalZone; | ||
| 20 | class WaterHeaterSizing; | ||
| 21 | class Node; | ||
| 22 | class PlantLoop; | ||
| 23 | |||
| 24 | namespace detail { | ||
| 25 | |||
| 26 | class WaterHeaterStratified_Impl; | ||
| 27 | |||
| 28 | } // namespace detail | ||
| 29 | |||
| 30 | /** WaterHeaterStratified is a WaterToWaterComponent that wraps the OpenStudio IDD object 'OS:WaterHeater:Stratified'. */ | ||
| 31 | class MODEL_API WaterHeaterStratified : public WaterToWaterComponent | ||
| 32 | { | ||
| 33 | public: | ||
| 34 | /** @name Constructors and Destructors */ | ||
| 35 | //@{ | ||
| 36 | |||
| 37 | explicit WaterHeaterStratified(const Model& model); | ||
| 38 | |||
| 39 | 145 | virtual ~WaterHeaterStratified() override = default; | |
| 40 | // Default the copy and move operators because the virtual dtor is explicit | ||
| 41 | ✗ | WaterHeaterStratified(const WaterHeaterStratified& other) = default; | |
| 42 | 28 | WaterHeaterStratified(WaterHeaterStratified&& other) = default; | |
| 43 | ✗ | WaterHeaterStratified& operator=(const WaterHeaterStratified&) = default; | |
| 44 | ✗ | WaterHeaterStratified& operator=(WaterHeaterStratified&&) = default; | |
| 45 | |||
| 46 | //@} | ||
| 47 | |||
| 48 | static IddObjectType iddObjectType(); | ||
| 49 | |||
| 50 | static std::vector<std::string> tankShapeValues(); | ||
| 51 | |||
| 52 | static std::vector<std::string> heaterPriorityControlValues(); | ||
| 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> inletModeValues(); | ||
| 63 | |||
| 64 | static std::vector<std::string> sourceSideFlowControlModeValues(); | ||
| 65 | |||
| 66 | /** @name Getters */ | ||
| 67 | //@{ | ||
| 68 | |||
| 69 | std::string endUseSubcategory() const; | ||
| 70 | |||
| 71 | boost::optional<double> tankVolume() const; | ||
| 72 | |||
| 73 | bool isTankVolumeAutosized() const; | ||
| 74 | |||
| 75 | boost::optional<double> tankHeight() const; | ||
| 76 | |||
| 77 | bool isTankHeightAutosized() const; | ||
| 78 | |||
| 79 | std::string tankShape() const; | ||
| 80 | |||
| 81 | boost::optional<double> tankPerimeter() const; | ||
| 82 | |||
| 83 | double maximumTemperatureLimit() const; | ||
| 84 | |||
| 85 | std::string heaterPriorityControl() const; | ||
| 86 | |||
| 87 | Schedule heater1SetpointTemperatureSchedule() const; | ||
| 88 | |||
| 89 | double heater1DeadbandTemperatureDifference() const; | ||
| 90 | |||
| 91 | boost::optional<double> heater1Capacity() const; | ||
| 92 | |||
| 93 | bool isHeater1CapacityAutosized() const; | ||
| 94 | |||
| 95 | double heater1Height() const; | ||
| 96 | |||
| 97 | Schedule heater2SetpointTemperatureSchedule() const; | ||
| 98 | |||
| 99 | double heater2DeadbandTemperatureDifference() const; | ||
| 100 | |||
| 101 | double heater2Capacity() const; | ||
| 102 | |||
| 103 | double heater2Height() const; | ||
| 104 | |||
| 105 | std::string heaterFuelType() const; | ||
| 106 | |||
| 107 | double heaterThermalEfficiency() const; | ||
| 108 | |||
| 109 | double offCycleParasiticFuelConsumptionRate() const; | ||
| 110 | |||
| 111 | std::string offCycleParasiticFuelType() const; | ||
| 112 | |||
| 113 | double offCycleParasiticHeatFractiontoTank() const; | ||
| 114 | |||
| 115 | double offCycleParasiticHeight() const; | ||
| 116 | |||
| 117 | double onCycleParasiticFuelConsumptionRate() const; | ||
| 118 | |||
| 119 | std::string onCycleParasiticFuelType() const; | ||
| 120 | |||
| 121 | double onCycleParasiticHeatFractiontoTank() const; | ||
| 122 | |||
| 123 | double onCycleParasiticHeight() 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> uniformSkinLossCoefficientperUnitAreatoAmbientTemperature() const; | ||
| 134 | |||
| 135 | double skinLossFractiontoZone() const; | ||
| 136 | |||
| 137 | boost::optional<double> offCycleFlueLossCoefficienttoAmbientTemperature() const; | ||
| 138 | |||
| 139 | double offCycleFlueLossFractiontoZone() const; | ||
| 140 | |||
| 141 | boost::optional<double> peakUseFlowRate() const; | ||
| 142 | |||
| 143 | boost::optional<Schedule> useFlowRateFractionSchedule() const; | ||
| 144 | |||
| 145 | boost::optional<Schedule> coldWaterSupplyTemperatureSchedule() const; | ||
| 146 | |||
| 147 | double useSideEffectiveness() const; | ||
| 148 | |||
| 149 | double useSideInletHeight() const; | ||
| 150 | |||
| 151 | boost::optional<double> useSideOutletHeight() const; | ||
| 152 | |||
| 153 | bool isUseSideOutletHeightAutocalculated() const; | ||
| 154 | |||
| 155 | double sourceSideEffectiveness() const; | ||
| 156 | |||
| 157 | boost::optional<double> sourceSideInletHeight() const; | ||
| 158 | |||
| 159 | bool isSourceSideInletHeightAutocalculated() const; | ||
| 160 | |||
| 161 | double sourceSideOutletHeight() const; | ||
| 162 | |||
| 163 | std::string inletMode() const; | ||
| 164 | |||
| 165 | boost::optional<double> useSideDesignFlowRate() const; | ||
| 166 | |||
| 167 | bool isUseSideDesignFlowRateAutosized() const; | ||
| 168 | |||
| 169 | boost::optional<double> sourceSideDesignFlowRate() const; | ||
| 170 | |||
| 171 | bool isSourceSideDesignFlowRateAutosized() const; | ||
| 172 | |||
| 173 | double indirectWaterHeatingRecoveryTime() const; | ||
| 174 | |||
| 175 | int numberofNodes() const; | ||
| 176 | |||
| 177 | double additionalDestratificationConductivity() const; | ||
| 178 | |||
| 179 | double node1AdditionalLossCoefficient() const; | ||
| 180 | |||
| 181 | double node2AdditionalLossCoefficient() const; | ||
| 182 | |||
| 183 | double node3AdditionalLossCoefficient() const; | ||
| 184 | |||
| 185 | double node4AdditionalLossCoefficient() const; | ||
| 186 | |||
| 187 | double node5AdditionalLossCoefficient() const; | ||
| 188 | |||
| 189 | double node6AdditionalLossCoefficient() const; | ||
| 190 | |||
| 191 | double node7AdditionalLossCoefficient() const; | ||
| 192 | |||
| 193 | double node8AdditionalLossCoefficient() const; | ||
| 194 | |||
| 195 | double node9AdditionalLossCoefficient() const; | ||
| 196 | |||
| 197 | double node10AdditionalLossCoefficient() const; | ||
| 198 | |||
| 199 | double node11AdditionalLossCoefficient() const; | ||
| 200 | |||
| 201 | double node12AdditionalLossCoefficient() const; | ||
| 202 | |||
| 203 | std::string sourceSideFlowControlMode() const; | ||
| 204 | |||
| 205 | boost::optional<Schedule> indirectAlternateSetpointTemperatureSchedule() const; | ||
| 206 | |||
| 207 | //@} | ||
| 208 | /** @name Setters */ | ||
| 209 | //@{ | ||
| 210 | |||
| 211 | bool setEndUseSubcategory(const std::string& endUseSubcategory); | ||
| 212 | |||
| 213 | bool setTankVolume(double tankVolume); | ||
| 214 | |||
| 215 | void autosizeTankVolume(); | ||
| 216 | |||
| 217 | bool setTankHeight(double tankHeight); | ||
| 218 | |||
| 219 | void autosizeTankHeight(); | ||
| 220 | |||
| 221 | bool setTankShape(const std::string& tankShape); | ||
| 222 | |||
| 223 | bool setTankPerimeter(double tankPerimeter); | ||
| 224 | |||
| 225 | void resetTankPerimeter(); | ||
| 226 | |||
| 227 | bool setMaximumTemperatureLimit(double maximumTemperatureLimit); | ||
| 228 | |||
| 229 | bool setHeaterPriorityControl(const std::string& heaterPriorityControl); | ||
| 230 | |||
| 231 | bool setHeater1SetpointTemperatureSchedule(Schedule& schedule); | ||
| 232 | |||
| 233 | bool setHeater1DeadbandTemperatureDifference(double heater1DeadbandTemperatureDifference); | ||
| 234 | |||
| 235 | bool setHeater1Capacity(double heater1Capacity); | ||
| 236 | |||
| 237 | void autosizeHeater1Capacity(); | ||
| 238 | |||
| 239 | bool setHeater1Height(double heater1Height); | ||
| 240 | |||
| 241 | bool setHeater2SetpointTemperatureSchedule(Schedule& schedule); | ||
| 242 | |||
| 243 | bool setHeater2DeadbandTemperatureDifference(double heater2DeadbandTemperatureDifference); | ||
| 244 | |||
| 245 | bool setHeater2Capacity(double heater2Capacity); | ||
| 246 | |||
| 247 | bool setHeater2Height(double heater2Height); | ||
| 248 | |||
| 249 | bool setHeaterFuelType(const FuelType& heaterFuelType); | ||
| 250 | bool setHeaterFuelType(const std::string& heaterFuelType); | ||
| 251 | |||
| 252 | bool setHeaterThermalEfficiency(double heaterThermalEfficiency); | ||
| 253 | |||
| 254 | bool setOffCycleParasiticFuelConsumptionRate(double offCycleParasiticFuelConsumptionRate); | ||
| 255 | |||
| 256 | bool setOffCycleParasiticFuelType(const FuelType& offCycleParasiticFuelType); | ||
| 257 | bool setOffCycleParasiticFuelType(const std::string& offCycleParasiticFuelType); | ||
| 258 | |||
| 259 | bool setOffCycleParasiticHeatFractiontoTank(double offCycleParasiticHeatFractiontoTank); | ||
| 260 | |||
| 261 | bool setOffCycleParasiticHeight(double offCycleParasiticHeight); | ||
| 262 | |||
| 263 | bool setOnCycleParasiticFuelConsumptionRate(double onCycleParasiticFuelConsumptionRate); | ||
| 264 | |||
| 265 | bool setOnCycleParasiticFuelType(const FuelType& onCycleParasiticFuelType); | ||
| 266 | bool setOnCycleParasiticFuelType(const std::string& onCycleParasiticFuelType); | ||
| 267 | |||
| 268 | bool setOnCycleParasiticHeatFractiontoTank(double onCycleParasiticHeatFractiontoTank); | ||
| 269 | |||
| 270 | bool setOnCycleParasiticHeight(double onCycleParasiticHeight); | ||
| 271 | |||
| 272 | bool setAmbientTemperatureIndicator(const std::string& ambientTemperatureIndicator); | ||
| 273 | |||
| 274 | bool setAmbientTemperatureSchedule(Schedule& schedule); | ||
| 275 | |||
| 276 | void resetAmbientTemperatureSchedule(); | ||
| 277 | |||
| 278 | bool setAmbientTemperatureThermalZone(const ThermalZone& thermalZone); | ||
| 279 | |||
| 280 | void resetAmbientTemperatureThermalZone(); | ||
| 281 | |||
| 282 | bool setAmbientTemperatureOutdoorAirNodeName(const std::string& ambientTemperatureOutdoorAirNodeName); | ||
| 283 | |||
| 284 | void resetAmbientTemperatureOutdoorAirNodeName(); | ||
| 285 | |||
| 286 | bool setUniformSkinLossCoefficientperUnitAreatoAmbientTemperature(double uniformSkinLossCoefficientperUnitAreatoAmbientTemperature); | ||
| 287 | |||
| 288 | void resetUniformSkinLossCoefficientperUnitAreatoAmbientTemperature(); | ||
| 289 | |||
| 290 | bool setSkinLossFractiontoZone(double skinLossFractiontoZone); | ||
| 291 | |||
| 292 | bool setOffCycleFlueLossCoefficienttoAmbientTemperature(double offCycleFlueLossCoefficienttoAmbientTemperature); | ||
| 293 | |||
| 294 | void resetOffCycleFlueLossCoefficienttoAmbientTemperature(); | ||
| 295 | |||
| 296 | bool setOffCycleFlueLossFractiontoZone(double offCycleFlueLossFractiontoZone); | ||
| 297 | |||
| 298 | bool setPeakUseFlowRate(double peakUseFlowRate); | ||
| 299 | |||
| 300 | void resetPeakUseFlowRate(); | ||
| 301 | |||
| 302 | bool setUseFlowRateFractionSchedule(Schedule& schedule); | ||
| 303 | |||
| 304 | void resetUseFlowRateFractionSchedule(); | ||
| 305 | |||
| 306 | bool setColdWaterSupplyTemperatureSchedule(Schedule& schedule); | ||
| 307 | |||
| 308 | void resetColdWaterSupplyTemperatureSchedule(); | ||
| 309 | |||
| 310 | bool setUseSideEffectiveness(double useSideEffectiveness); | ||
| 311 | |||
| 312 | bool setUseSideInletHeight(double useSideInletHeight); | ||
| 313 | |||
| 314 | bool setUseSideOutletHeight(double useSideOutletHeight); | ||
| 315 | |||
| 316 | void autocalculateUseSideOutletHeight(); | ||
| 317 | |||
| 318 | bool setSourceSideEffectiveness(double sourceSideEffectiveness); | ||
| 319 | |||
| 320 | bool setSourceSideInletHeight(double sourceSideInletHeight); | ||
| 321 | |||
| 322 | void autocalculateSourceSideInletHeight(); | ||
| 323 | |||
| 324 | bool setSourceSideOutletHeight(double sourceSideOutletHeight); | ||
| 325 | |||
| 326 | bool setInletMode(const std::string& inletMode); | ||
| 327 | |||
| 328 | bool setUseSideDesignFlowRate(double useSideDesignFlowRate); | ||
| 329 | |||
| 330 | void autosizeUseSideDesignFlowRate(); | ||
| 331 | |||
| 332 | bool setSourceSideDesignFlowRate(double sourceSideDesignFlowRate); | ||
| 333 | |||
| 334 | void autosizeSourceSideDesignFlowRate(); | ||
| 335 | |||
| 336 | bool setIndirectWaterHeatingRecoveryTime(double indirectWaterHeatingRecoveryTime); | ||
| 337 | |||
| 338 | bool setNumberofNodes(int numberofNodes); | ||
| 339 | |||
| 340 | bool setAdditionalDestratificationConductivity(double additionalDestratificationConductivity); | ||
| 341 | |||
| 342 | bool setNode1AdditionalLossCoefficient(double node1AdditionalLossCoefficient); | ||
| 343 | |||
| 344 | bool setNode2AdditionalLossCoefficient(double node2AdditionalLossCoefficient); | ||
| 345 | |||
| 346 | bool setNode3AdditionalLossCoefficient(double node3AdditionalLossCoefficient); | ||
| 347 | |||
| 348 | bool setNode4AdditionalLossCoefficient(double node4AdditionalLossCoefficient); | ||
| 349 | |||
| 350 | bool setNode5AdditionalLossCoefficient(double node5AdditionalLossCoefficient); | ||
| 351 | |||
| 352 | bool setNode6AdditionalLossCoefficient(double node6AdditionalLossCoefficient); | ||
| 353 | |||
| 354 | bool setNode7AdditionalLossCoefficient(double node7AdditionalLossCoefficient); | ||
| 355 | |||
| 356 | bool setNode8AdditionalLossCoefficient(double node8AdditionalLossCoefficient); | ||
| 357 | |||
| 358 | bool setNode9AdditionalLossCoefficient(double node9AdditionalLossCoefficient); | ||
| 359 | |||
| 360 | bool setNode10AdditionalLossCoefficient(double node10AdditionalLossCoefficient); | ||
| 361 | |||
| 362 | bool setNode11AdditionalLossCoefficient(double node11AdditionalLossCoefficient); | ||
| 363 | |||
| 364 | bool setNode12AdditionalLossCoefficient(double node12AdditionalLossCoefficient); | ||
| 365 | |||
| 366 | bool setSourceSideFlowControlMode(const std::string& sourceSideFlowControlMode); | ||
| 367 | |||
| 368 | bool setIndirectAlternateSetpointTemperatureSchedule(Schedule& schedule); | ||
| 369 | |||
| 370 | void resetIndirectAlternateSetpointTemperatureSchedule(); | ||
| 371 | |||
| 372 | //@} | ||
| 373 | /** @name Other */ | ||
| 374 | //@{ | ||
| 375 | |||
| 376 | boost::optional<double> autosizedTankVolume() const; | ||
| 377 | |||
| 378 | boost::optional<double> autosizedTankHeight() const; | ||
| 379 | |||
| 380 | boost::optional<double> autosizedHeater1Capacity() const; | ||
| 381 | |||
| 382 | boost::optional<double> autosizedUseSideDesignFlowRate() const; | ||
| 383 | |||
| 384 | boost::optional<double> autosizedSourceSideDesignFlowRate() const; | ||
| 385 | |||
| 386 | WaterHeaterSizing waterHeaterSizing() const; | ||
| 387 | |||
| 388 | // A helper method to specifically connect the tank on its Source Side, regardless of whether it is on the demand or supply side (without | ||
| 389 | // disconnecting the Use Side, in case it's a supply node given) | ||
| 390 | bool addToSourceSideNode(Node& node); | ||
| 391 | |||
| 392 | // This is a more conveniently named method to return the PlantLoop connected to the Use Side Inlet/Outlet Nodes, | ||
| 393 | // which is necessarilly on the supply side. It does exactly the same as the overriden secondaryPlantLoop() method | ||
| 394 | boost::optional<PlantLoop> useSidePlantLoop() const; | ||
| 395 | |||
| 396 | // This is a more conveniently named helper to return the PlantLoop connected to the Source Side Inlet/Outlet Nodes, | ||
| 397 | // whether that is on the demand or supply side. It does exactly the same as the overriden plantLoop() method | ||
| 398 | boost::optional<PlantLoop> sourceSidePlantLoop() const; | ||
| 399 | |||
| 400 | // Convenience name for removeFromSecondaryPlantLoop() | ||
| 401 | bool removeFromSourceSidePlantLoop(); | ||
| 402 | |||
| 403 | boost::optional<ModelObject> useSideInletModelObject() const; | ||
| 404 | |||
| 405 | boost::optional<ModelObject> useSideOutletModelObject() const; | ||
| 406 | |||
| 407 | boost::optional<ModelObject> sourceSideInletModelObject() const; | ||
| 408 | |||
| 409 | boost::optional<ModelObject> sourceSideOutletModelObject() const; | ||
| 410 | |||
| 411 | //@} | ||
| 412 | protected: | ||
| 413 | /// @cond | ||
| 414 | using ImplType = detail::WaterHeaterStratified_Impl; | ||
| 415 | |||
| 416 | explicit WaterHeaterStratified(std::shared_ptr<detail::WaterHeaterStratified_Impl> impl); | ||
| 417 | |||
| 418 | friend class detail::WaterHeaterStratified_Impl; | ||
| 419 | friend class Model; | ||
| 420 | friend class IdfObject; | ||
| 421 | friend class openstudio::detail::IdfObject_Impl; | ||
| 422 | /// @endcond | ||
| 423 | private: | ||
| 424 | − | REGISTER_LOGGER("openstudio.model.WaterHeaterStratified"); | |
| 425 | }; | ||
| 426 | |||
| 427 | /** \relates WaterHeaterStratified*/ | ||
| 428 | using OptionalWaterHeaterStratified = boost::optional<WaterHeaterStratified>; | ||
| 429 | |||
| 430 | /** \relates WaterHeaterStratified*/ | ||
| 431 | using WaterHeaterStratifiedVector = std::vector<WaterHeaterStratified>; | ||
| 432 | |||
| 433 | } // namespace model | ||
| 434 | } // namespace openstudio | ||
| 435 | |||
| 436 | #endif // MODEL_WATERHEATERSTRATIFIED_HPP | ||
| 437 |