src/model/AirflowNetworkZone.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_AIRFLOWNETWORKZONE_HPP | ||
| 7 | #define MODEL_AIRFLOWNETWORKZONE_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | |||
| 11 | #include "AirflowNetworkNode.hpp" | ||
| 12 | |||
| 13 | namespace openstudio { | ||
| 14 | |||
| 15 | namespace model { | ||
| 16 | |||
| 17 | // TODO: Check the following class names against object getters and setters. | ||
| 18 | class ThermalZone; | ||
| 19 | class Schedule; | ||
| 20 | class Schedule; | ||
| 21 | class AirflowNetworkOccupantVentilationControl; | ||
| 22 | |||
| 23 | namespace detail { | ||
| 24 | |||
| 25 | class ThermalZone_Impl; | ||
| 26 | class AirflowNetworkZone_Impl; | ||
| 27 | |||
| 28 | } // namespace detail | ||
| 29 | |||
| 30 | /** AirflowNetworkZone is a AirflowNetworkNode that wraps the OpenStudio IDD object 'OS:AirflowNetworkZone'. */ | ||
| 31 | class MODEL_API AirflowNetworkZone : public AirflowNetworkNode | ||
| 32 | { | ||
| 33 | public: | ||
| 34 | /** @name Constructors and Destructors */ | ||
| 35 | //@{ | ||
| 36 | |||
| 37 | 15 | virtual ~AirflowNetworkZone() override = default; | |
| 38 | // Default the copy and move operators because the virtual dtor is explicit | ||
| 39 | 4 | AirflowNetworkZone(const AirflowNetworkZone& other) = default; | |
| 40 | 4 | AirflowNetworkZone(AirflowNetworkZone&& other) = default; | |
| 41 | ✗ | AirflowNetworkZone& operator=(const AirflowNetworkZone&) = default; | |
| 42 | 1 | AirflowNetworkZone& operator=(AirflowNetworkZone&&) = default; | |
| 43 | |||
| 44 | //@} | ||
| 45 | |||
| 46 | static IddObjectType iddObjectType(); | ||
| 47 | |||
| 48 | static std::vector<std::string> ventilationControlModeValues(); | ||
| 49 | |||
| 50 | static std::vector<std::string> singleSidedWindPressureCoefficientAlgorithmValues(); | ||
| 51 | |||
| 52 | /** @name Getters */ | ||
| 53 | //@{ | ||
| 54 | |||
| 55 | /** Returns the associated thermal zone. */ | ||
| 56 | ThermalZone thermalZone() const; | ||
| 57 | /** Returns the ventilation control mode. */ | ||
| 58 | std::string ventilationControlMode() const; | ||
| 59 | /** Returns true if the ventilation control mode is defaulted. */ | ||
| 60 | bool isVentilationControlModeDefaulted() const; | ||
| 61 | |||
| 62 | /** Returns the ventilation control zone temperature setpoint schedule, if any. */ | ||
| 63 | boost::optional<Schedule> ventilationControlZoneTemperatureSetpointSchedule() const; | ||
| 64 | /** Returns the minimum venting open factor. */ | ||
| 65 | double minimumVentingOpenFactor() const; | ||
| 66 | /** Returns true if the minimum venting open factor is defaulted. */ | ||
| 67 | bool isMinimumVentingOpenFactorDefaulted() const; | ||
| 68 | /** Returns the temperature difference lower limit for maximum venting factor. */ | ||
| 69 | double indoorandOutdoorTemperatureDifferenceLowerLimitForMaximumVentingOpenFactor() const; | ||
| 70 | /** Returns true if the temperature difference lower limit for maximum venting factor is defaulted. */ | ||
| 71 | bool isIndoorandOutdoorTemperatureDifferenceLowerLimitForMaximumVentingOpenFactorDefaulted() const; | ||
| 72 | /** Returns the temperature difference upper limit for minimum venting factor. */ | ||
| 73 | double indoorandOutdoorTemperatureDifferenceUpperLimitforMinimumVentingOpenFactor() const; | ||
| 74 | /** Returns true if the temperature difference upper limit for minimum venting factor is defaulted. */ | ||
| 75 | bool isIndoorandOutdoorTemperatureDifferenceUpperLimitforMinimumVentingOpenFactorDefaulted() const; | ||
| 76 | /** Returns the enthalpy difference lower limit for maximum venting factor. */ | ||
| 77 | double indoorandOutdoorEnthalpyDifferenceLowerLimitForMaximumVentingOpenFactor() const; | ||
| 78 | /** Returns true if the enthalpy difference lower limit for maximum venting factor is defaulted. */ | ||
| 79 | bool isIndoorandOutdoorEnthalpyDifferenceLowerLimitForMaximumVentingOpenFactorDefaulted() const; | ||
| 80 | /** Returns the enthalpy difference upper limit for minimum venting factor. */ | ||
| 81 | double indoorandOutdoorEnthalpyDifferenceUpperLimitforMinimumVentingOpenFactor() const; | ||
| 82 | /** Returns true if the enthalpy difference upper limit for minimum venting factor is defaulted. */ | ||
| 83 | bool isIndoorandOutdoorEnthalpyDifferenceUpperLimitforMinimumVentingOpenFactorDefaulted() const; | ||
| 84 | |||
| 85 | /** Returns the venting availability schedule, if any. */ | ||
| 86 | boost::optional<Schedule> ventingAvailabilitySchedule() const; | ||
| 87 | /** Returns the single sided wind pressure algorithm. */ | ||
| 88 | std::string singleSidedWindPressureCoefficientAlgorithm() const; | ||
| 89 | /** Returns true if the single sided wind pressure algorithm is defaulted. */ | ||
| 90 | bool isSingleSidedWindPressureCoefficientAlgorithmDefaulted() const; | ||
| 91 | /** Returns the single sided wind pressure algorithm facade width. */ | ||
| 92 | double facadeWidth() const; | ||
| 93 | /** Returns true if the single sided wind pressure algorithm facade width is defaulted. */ | ||
| 94 | bool isFacadeWidthDefaulted() const; | ||
| 95 | |||
| 96 | /** Returns the occupant ventilation control object for this zone, if any. */ | ||
| 97 | boost::optional<AirflowNetworkOccupantVentilationControl> occupantVentilationControl() const; | ||
| 98 | |||
| 99 | //@} | ||
| 100 | /** @name Setters */ | ||
| 101 | //@{ | ||
| 102 | |||
| 103 | /** Sets the ventilation control mode. */ | ||
| 104 | bool setVentilationControlMode(const std::string& ventilationControlMode); | ||
| 105 | /** Resets the ventilation control mode. */ | ||
| 106 | void resetVentilationControlMode(); | ||
| 107 | |||
| 108 | /** Sets the ventilation control zone temperature setpoint schedule. */ | ||
| 109 | bool setVentilationControlZoneTemperatureSetpointSchedule(Schedule& schedule); | ||
| 110 | /** Resets the ventilation control zone temperature setpoint schedule. */ | ||
| 111 | void resetVentilationControlZoneTemperatureSetpointSchedule(); | ||
| 112 | /** Sets the minimum venting open factor. */ | ||
| 113 | bool setMinimumVentingOpenFactor(double minimumVentingOpenFactor); | ||
| 114 | /** Resets the minimum venting open factor. */ | ||
| 115 | void resetMinimumVentingOpenFactor(); | ||
| 116 | /** Sets the temperature difference lower limit for maximum venting factor. */ | ||
| 117 | bool setIndoorandOutdoorTemperatureDifferenceLowerLimitForMaximumVentingOpenFactor( | ||
| 118 | double indoorandOutdoorTemperatureDifferenceLowerLimitForMaximumVentingOpenFactor); | ||
| 119 | /** Resets the temperature difference lower limit for maximum venting factor. */ | ||
| 120 | void resetIndoorandOutdoorTemperatureDifferenceLowerLimitForMaximumVentingOpenFactor(); | ||
| 121 | /** Sets the temperature difference upper limit for minimum venting factor. */ | ||
| 122 | bool setIndoorandOutdoorTemperatureDifferenceUpperLimitforMinimumVentingOpenFactor( | ||
| 123 | double indoorandOutdoorTemperatureDifferenceUpperLimitforMinimumVentingOpenFactor); | ||
| 124 | /** Resets the temperature difference upper limit for minimum venting factor. */ | ||
| 125 | void resetIndoorandOutdoorTemperatureDifferenceUpperLimitforMinimumVentingOpenFactor(); | ||
| 126 | /** Sets the enthalpy difference lower limit for maximum venting factor. */ | ||
| 127 | bool setIndoorandOutdoorEnthalpyDifferenceLowerLimitForMaximumVentingOpenFactor( | ||
| 128 | double indoorandOutdoorEnthalpyDifferenceLowerLimitForMaximumVentingOpenFactor); | ||
| 129 | /** Resets the enthalpy difference lower limit for maximum venting factor. */ | ||
| 130 | void resetIndoorandOutdoorEnthalpyDifferenceLowerLimitForMaximumVentingOpenFactor(); | ||
| 131 | /** Sets the enthalphy difference upper limit for minimum venting factor. */ | ||
| 132 | bool setIndoorandOutdoorEnthalpyDifferenceUpperLimitforMinimumVentingOpenFactor( | ||
| 133 | double indoorandOutdoorEnthalpyDifferenceUpperLimitforMinimumVentingOpenFactor); | ||
| 134 | /** Resets the enthalphy difference upper limit for minimum venting factor. */ | ||
| 135 | void resetIndoorandOutdoorEnthalpyDifferenceUpperLimitforMinimumVentingOpenFactor(); | ||
| 136 | |||
| 137 | /** Sets the venting availability schedule. */ | ||
| 138 | bool setVentingAvailabilitySchedule(Schedule& schedule); | ||
| 139 | /** Resets the venting availability schedule. */ | ||
| 140 | void resetVentingAvailabilitySchedule(); | ||
| 141 | /** Sets the single sided wind pressure algorithm. */ | ||
| 142 | bool setSingleSidedWindPressureCoefficientAlgorithm(const std::string& singleSidedWindPressureCoefficientAlgorithm); | ||
| 143 | /** Resets the single sided wind pressure algorithm. */ | ||
| 144 | void resetSingleSidedWindPressureCoefficientAlgorithm(); | ||
| 145 | /** Sets the single sided wind pressure algorithm facade width. */ | ||
| 146 | bool setFacadeWidth(double facadeWidth); | ||
| 147 | /** Resets the single sided wind pressure algorithm facade width. */ | ||
| 148 | void resetFacadeWidth(); | ||
| 149 | |||
| 150 | /** Sets the occupant ventilation control object for this zone. */ | ||
| 151 | bool setOccupantVentilationControl(const AirflowNetworkOccupantVentilationControl& airflowNetworkOccupantVentilationControl); | ||
| 152 | /** Resets the occupant ventilation control object. */ | ||
| 153 | void resetOccupantVentilationControl(); | ||
| 154 | |||
| 155 | //@} | ||
| 156 | /** @name Other */ | ||
| 157 | //@{ | ||
| 158 | |||
| 159 | //@} | ||
| 160 | protected: | ||
| 161 | /// @cond | ||
| 162 | using ImplType = detail::AirflowNetworkZone_Impl; | ||
| 163 | |||
| 164 | explicit AirflowNetworkZone(std::shared_ptr<detail::AirflowNetworkZone_Impl> impl); | ||
| 165 | AirflowNetworkZone(const Model& model, const Handle& handle); | ||
| 166 | |||
| 167 | bool setThermalZone(const ThermalZone& thermalZone); | ||
| 168 | void resetThermalZone(); | ||
| 169 | |||
| 170 | friend class detail::ThermalZone_Impl; | ||
| 171 | friend class detail::AirflowNetworkZone_Impl; | ||
| 172 | friend class Model; | ||
| 173 | friend class IdfObject; | ||
| 174 | friend class openstudio::detail::IdfObject_Impl; | ||
| 175 | |||
| 176 | /// @endcond | ||
| 177 | private: | ||
| 178 | REGISTER_LOGGER("openstudio.model.AirflowNetworkZone"); | ||
| 179 | }; | ||
| 180 | |||
| 181 | /** \relates AirflowNetworkZone*/ | ||
| 182 | using OptionalAirflowNetworkZone = boost::optional<AirflowNetworkZone>; | ||
| 183 | |||
| 184 | /** \relates AirflowNetworkZone*/ | ||
| 185 | using AirflowNetworkZoneVector = std::vector<AirflowNetworkZone>; | ||
| 186 | |||
| 187 | } // namespace model | ||
| 188 | } // namespace openstudio | ||
| 189 | |||
| 190 | #endif // MODEL_AIRFLOWNETWORKZONE_HPP | ||
| 191 |