src/model/AirLoopHVACSupplyPlenum.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_AIRLOOPHVACSUPPLYPLENUM_HPP | ||
| 7 | #define MODEL_AIRLOOPHVACSUPPLYPLENUM_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "Splitter.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | namespace model { | ||
| 14 | |||
| 15 | class ThermalZone; | ||
| 16 | |||
| 17 | namespace detail { | ||
| 18 | |||
| 19 | class AirLoopHVACSupplyPlenum_Impl; | ||
| 20 | |||
| 21 | } // namespace detail | ||
| 22 | |||
| 23 | /** AirLoopHVACSupplyPlenum is a Splitter that wraps the OpenStudio IDD object 'OS:AirLoopHVAC:SupplyPlenum'. */ | ||
| 24 | class MODEL_API AirLoopHVACSupplyPlenum : public Splitter | ||
| 25 | { | ||
| 26 | public: | ||
| 27 | explicit AirLoopHVACSupplyPlenum(const Model& model); | ||
| 28 | |||
| 29 | 259 | virtual ~AirLoopHVACSupplyPlenum() override = default; | |
| 30 | // Default the copy and move operators because the virtual dtor is explicit | ||
| 31 | 42 | AirLoopHVACSupplyPlenum(const AirLoopHVACSupplyPlenum& other) = default; | |
| 32 | 104 | AirLoopHVACSupplyPlenum(AirLoopHVACSupplyPlenum&& other) = default; | |
| 33 | ✗ | AirLoopHVACSupplyPlenum& operator=(const AirLoopHVACSupplyPlenum&) = default; | |
| 34 | ✗ | AirLoopHVACSupplyPlenum& operator=(AirLoopHVACSupplyPlenum&&) = default; | |
| 35 | |||
| 36 | static IddObjectType iddObjectType(); | ||
| 37 | |||
| 38 | boost::optional<ThermalZone> thermalZone() const; | ||
| 39 | |||
| 40 | /** Establish thermalZone as the plenum zone. | ||
| 41 | * If thermalZone is already conditioned by ThermalZone::equipment(), | ||
| 42 | * then this method will return false. A ThermalZone cannot be conditioned | ||
| 43 | * by equipment and and be a plenum zone. Remove any existing ZoneHVACComponent objects, | ||
| 44 | * and associated AirLoopHVAC objects before using this method on thermalZone. | ||
| 45 | **/ | ||
| 46 | bool setThermalZone(const ThermalZone& thermalZone); | ||
| 47 | |||
| 48 | void resetThermalZone(); | ||
| 49 | |||
| 50 | unsigned inletPort() const override; | ||
| 51 | |||
| 52 | unsigned outletPort(unsigned branchIndex) const override; | ||
| 53 | |||
| 54 | unsigned nextOutletPort() const override; | ||
| 55 | |||
| 56 | /** Insert this AirLoopHVACSupplyPlenum into HVAC system at node. | ||
| 57 | * Node must be immediatly after AirLoopHVACZoneSplitter and there | ||
| 58 | * cannot be an existing AirLoopHVACSupplyPlenum on the node's branch | ||
| 59 | */ | ||
| 60 | bool addToNode(Node& node); | ||
| 61 | |||
| 62 | bool addBranchForZone(openstudio::model::ThermalZone& thermalZone); | ||
| 63 | |||
| 64 | bool addBranchForZone(openstudio::model::ThermalZone& thermalZone, HVACComponent& terminal); | ||
| 65 | |||
| 66 | protected: | ||
| 67 | /// @cond | ||
| 68 | using ImplType = detail::AirLoopHVACSupplyPlenum_Impl; | ||
| 69 | |||
| 70 | explicit AirLoopHVACSupplyPlenum(std::shared_ptr<detail::AirLoopHVACSupplyPlenum_Impl> impl); | ||
| 71 | |||
| 72 | friend class detail::AirLoopHVACSupplyPlenum_Impl; | ||
| 73 | friend class Model; | ||
| 74 | friend class IdfObject; | ||
| 75 | friend class openstudio::detail::IdfObject_Impl; | ||
| 76 | /// @endcond | ||
| 77 | private: | ||
| 78 | REGISTER_LOGGER("openstudio.model.AirLoopHVACSupplyPlenum"); | ||
| 79 | }; | ||
| 80 | |||
| 81 | /** \relates AirLoopHVACSupplyPlenum*/ | ||
| 82 | using OptionalAirLoopHVACSupplyPlenum = boost::optional<AirLoopHVACSupplyPlenum>; | ||
| 83 | |||
| 84 | /** \relates AirLoopHVACSupplyPlenum*/ | ||
| 85 | using AirLoopHVACSupplyPlenumVector = std::vector<AirLoopHVACSupplyPlenum>; | ||
| 86 | |||
| 87 | } // namespace model | ||
| 88 | } // namespace openstudio | ||
| 89 | |||
| 90 | #endif // MODEL_AIRLOOPHVACSUPPLYPLENUM_HPP | ||
| 91 |