src/model/AirLoopHVACOutdoorAirSystem.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_AIRLOOPHVACOUTDOORAIRSYSTEM_HPP | ||
| 7 | #define MODEL_AIRLOOPHVACOUTDOORAIRSYSTEM_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | |||
| 11 | #include "HVACComponent.hpp" | ||
| 12 | #include "StraightComponent.hpp" | ||
| 13 | #include "Connection.hpp" | ||
| 14 | |||
| 15 | namespace openstudio { | ||
| 16 | namespace model { | ||
| 17 | |||
| 18 | namespace detail { | ||
| 19 | class AirLoopHVACOutdoorAirSystem_Impl; | ||
| 20 | } // namespace detail | ||
| 21 | |||
| 22 | class AvailabilityManagerScheduled; | ||
| 23 | class ControllerOutdoorAir; | ||
| 24 | class Node; | ||
| 25 | class AirflowNetworkDistributionNode; | ||
| 26 | class AirLoopHVACDedicatedOutdoorAirSystem; | ||
| 27 | |||
| 28 | /** AirLoopHVACOutdoorAirSystem is an HVACComponent that wraps the IDD object | ||
| 29 | * named "OS:AirLoopHVAC:OutdoorAirSystem" | ||
| 30 | * | ||
| 31 | * The purpose of this class is to simplify the construction and manipulation | ||
| 32 | * of the EnergyPlus AirLoopHVAC:OutdoorAirSystem object. | ||
| 33 | */ | ||
| 34 | class MODEL_API AirLoopHVACOutdoorAirSystem : public HVACComponent | ||
| 35 | { | ||
| 36 | public: | ||
| 37 | /** Constructs a new AirLoopHVACOutdoorAirSystem object and places it inside the | ||
| 38 | * model. | ||
| 39 | */ | ||
| 40 | explicit AirLoopHVACOutdoorAirSystem(Model& model, const ControllerOutdoorAir& controller); | ||
| 41 | |||
| 42 | /** A default ControllerOutdoorAir will be created for you */ | ||
| 43 | explicit AirLoopHVACOutdoorAirSystem(Model& model); | ||
| 44 | |||
| 45 | 10853 | virtual ~AirLoopHVACOutdoorAirSystem() override = default; | |
| 46 | // Default the copy and move operators because the virtual dtor is explicit | ||
| 47 | 1334 | AirLoopHVACOutdoorAirSystem(const AirLoopHVACOutdoorAirSystem& other) = default; | |
| 48 | 4512 | AirLoopHVACOutdoorAirSystem(AirLoopHVACOutdoorAirSystem&& other) = default; | |
| 49 | ✗ | AirLoopHVACOutdoorAirSystem& operator=(const AirLoopHVACOutdoorAirSystem&) = default; | |
| 50 | ✗ | AirLoopHVACOutdoorAirSystem& operator=(AirLoopHVACOutdoorAirSystem&&) = default; | |
| 51 | |||
| 52 | /** Returns the return air port of the outdoor air system. */ | ||
| 53 | unsigned returnAirPort() const; | ||
| 54 | |||
| 55 | /** Returns the outdoor air port of the outdoor air mixer. | ||
| 56 | * This is not the most outboard air node of the outdoor air system, | ||
| 57 | * rather it is the port directly attached to the mixer. There can be | ||
| 58 | * additional components between this port and the most outboard port. | ||
| 59 | **/ | ||
| 60 | unsigned outdoorAirPort() const; | ||
| 61 | |||
| 62 | /** Returns the outdoor air port of the outdoor air system. | ||
| 63 | * This is not the most outboard air node of the outdoor air system, | ||
| 64 | * rather it is the port directly attached to the mixer. There can be | ||
| 65 | * additional components between this port and the most outboard port. | ||
| 66 | **/ | ||
| 67 | unsigned reliefAirPort() const; | ||
| 68 | |||
| 69 | /** Returns the mixed air port. **/ | ||
| 70 | unsigned mixedAirPort() const; | ||
| 71 | |||
| 72 | /** Returns the optional ModelObject attached to the return air port. **/ | ||
| 73 | boost::optional<ModelObject> returnAirModelObject(); | ||
| 74 | |||
| 75 | /** Returns the optional ModelObject attached to the outdoor air port. | ||
| 76 | * This is NOT the same as the outboardOANode (unless there isn't nothing on the outdoor air stream) | ||
| 77 | * It is the oa node closest to the OA system **/ | ||
| 78 | boost::optional<ModelObject> outdoorAirModelObject(); | ||
| 79 | |||
| 80 | /** Returns the optional ModelObject attached to the relief air port. | ||
| 81 | * This is NOT the same as the outboardReliefNode (unless there isn't nothing on the relief stream) | ||
| 82 | * It is the relief node closest to the OA system **/ | ||
| 83 | boost::optional<ModelObject> reliefAirModelObject(); | ||
| 84 | |||
| 85 | /** Returns the optional ModelObject attached to the mixer air port. **/ | ||
| 86 | boost::optional<ModelObject> mixedAirModelObject(); | ||
| 87 | |||
| 88 | /** Returns the most outboard outdoor air Node. **/ | ||
| 89 | boost::optional<Node> outboardOANode() const; // TODO: shouldn't be optional | ||
| 90 | |||
| 91 | /** Returns the most outboard relief air Node. **/ | ||
| 92 | boost::optional<Node> outboardReliefNode() const; // TODO: shouldn't be optional | ||
| 93 | |||
| 94 | /** Returns a vector of model objects that are on the path of the incoming outdoor air stream. | ||
| 95 | * This is orderded like the airflow: from the outdoorOANode (OA Intake) towards the OASystem itself **/ | ||
| 96 | std::vector<ModelObject> oaComponents(openstudio::IddObjectType type = openstudio::IddObjectType("Catchall")) const; | ||
| 97 | |||
| 98 | /** Returns a vector of model objects that are on the path of the outgoing relief air stream. | ||
| 99 | * This is orderded like the airflow: from the OASystem itself towards the outboardReliefNode (Relief to Outside) **/ | ||
| 100 | std::vector<ModelObject> reliefComponents(openstudio::IddObjectType type = openstudio::IddObjectType("Catchall")) const; | ||
| 101 | |||
| 102 | /** Returns a vector that is the concatenation of oaComponents() and reliefComponents(). **/ | ||
| 103 | std::vector<ModelObject> components(openstudio::IddObjectType type = openstudio::IddObjectType("Catchall")) const; | ||
| 104 | |||
| 105 | /** Returns the optional ModelObject with the Handle given. The optional | ||
| 106 | * will be false if the given handle does not correspond to the a ModelObject | ||
| 107 | * that is not part of the outdoor air system. | ||
| 108 | **/ | ||
| 109 | boost::optional<ModelObject> component(openstudio::Handle handle) const; | ||
| 110 | |||
| 111 | /** Returns the optional ModelObject with the Handle given. The optional | ||
| 112 | * will be false if the given handle does not correspond to the a ModelObject | ||
| 113 | * that is not part of the supply side of the outdoor air system. | ||
| 114 | **/ | ||
| 115 | boost::optional<ModelObject> oaComponent(openstudio::Handle handle) const; | ||
| 116 | |||
| 117 | /** Returns the optional ModelObject with the Handle given. The optional | ||
| 118 | * will be false if the given handle does not correspond to the a ModelObject | ||
| 119 | * that is not part of the supply side of the outdoor air system. | ||
| 120 | **/ | ||
| 121 | boost::optional<ModelObject> reliefComponent(openstudio::Handle handle) const; | ||
| 122 | |||
| 123 | /** Returns the ControllerOutdoorAir object associated with the AirLoopHVACOutdoorAirSystem. **/ | ||
| 124 | ControllerOutdoorAir getControllerOutdoorAir() const; | ||
| 125 | |||
| 126 | /** Sets the ControllerOutdoorAir object associated with the AirLoopHVACOutdoorAirSystem. **/ | ||
| 127 | bool setControllerOutdoorAir(const ControllerOutdoorAir& controllerOutdoorAir); | ||
| 128 | |||
| 129 | /** Reimplemented from HVACComponent. **/ | ||
| 130 | boost::optional<AirLoopHVAC> airLoop() const; // TODO: this shouldn't exist!!! | ||
| 131 | |||
| 132 | AirflowNetworkDistributionNode getAirflowNetworkDistributionNode(); | ||
| 133 | |||
| 134 | boost::optional<AirflowNetworkDistributionNode> airflowNetworkDistributionNode() const; | ||
| 135 | |||
| 136 | static IddObjectType iddObjectType(); | ||
| 137 | |||
| 138 | /** Returns the AirLoopHVACDedicatedOutdoorAirSystem, if it exists. */ | ||
| 139 | boost::optional<AirLoopHVACDedicatedOutdoorAirSystem> airLoopHVACDedicatedOutdoorAirSystem() const; | ||
| 140 | |||
| 141 | protected: | ||
| 142 | /// @cond | ||
| 143 | using ImplType = detail::AirLoopHVACOutdoorAirSystem_Impl; | ||
| 144 | |||
| 145 | explicit AirLoopHVACOutdoorAirSystem(std::shared_ptr<detail::AirLoopHVACOutdoorAirSystem_Impl> impl); | ||
| 146 | |||
| 147 | friend class detail::AirLoopHVACOutdoorAirSystem_Impl; | ||
| 148 | friend class Model; | ||
| 149 | friend class IdfObject; | ||
| 150 | friend class openstudio::detail::IdfObject_Impl; | ||
| 151 | /// @cond | ||
| 152 | private: | ||
| 153 | REGISTER_LOGGER("openstudio.model.AirLoopHVACOutdoorAirSystem"); | ||
| 154 | |||
| 155 | /// @endcond | ||
| 156 | }; | ||
| 157 | |||
| 158 | /** \relates AirLoopHVACOutdoorAirSystem */ | ||
| 159 | using OptionalAirLoopHVACOutdoorAirSystem = boost::optional<AirLoopHVACOutdoorAirSystem>; | ||
| 160 | |||
| 161 | /** \relates AirLoopHVACOutdoorAirSystem */ | ||
| 162 | using AirLoopHVACOutdoorAirSystemVector = std::vector<AirLoopHVACOutdoorAirSystem>; | ||
| 163 | |||
| 164 | } // namespace model | ||
| 165 | |||
| 166 | } // namespace openstudio | ||
| 167 | |||
| 168 | #endif // MODEL_AIRLOOPHVACOUTDOORAIRSYSTEM_HPP | ||
| 169 |