src/model/AirflowNetworkSimulationControl.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_AIRFLOWNETWORKSIMULATIONCONTROL_HPP | ||
| 7 | #define MODEL_AIRFLOWNETWORKSIMULATIONCONTROL_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "ParentObject.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | |||
| 14 | namespace model { | ||
| 15 | |||
| 16 | namespace detail { | ||
| 17 | class AirflowNetworkSimulationControl_Impl; | ||
| 18 | } | ||
| 19 | |||
| 20 | /** AirflowNetworkSimulationControl derives from ParentObject and is an interface to the OpenStudio IDD object named "AirflowNetwork:SimulationControl". | ||
| 21 | * | ||
| 22 | * AirflowNetworkSimulationControl defines what types of multizone airflow calculations are part of an EnergyPlus simulation. | ||
| 23 | * AirflowNetworkSimulationControl parents several other ModelObject types that configure simulation parameters for EnergyPlus. | ||
| 24 | * AirflowNetworkSimulationControl does not have a public constructor because it is a unique ModelObject. | ||
| 25 | * To get the AirflowNetworkSimulationControl object for a Model or create one if it does not yet exist use model.getUniqueObject<AirflowNetworkSimulationControl>(). | ||
| 26 | * To get the AirflowNetworkSimulationControl object for a Model but not create one if it does not yet exist use model.getOptionalUniqueObject<AirflowNetworkSimulationControl>(). | ||
| 27 | */ | ||
| 28 | class MODEL_API AirflowNetworkSimulationControl : public ParentObject | ||
| 29 | { | ||
| 30 | public: | ||
| 31 | 32 | virtual ~AirflowNetworkSimulationControl() override = default; | |
| 32 | // Default the copy and move operators because the virtual dtor is explicit | ||
| 33 | ✗ | AirflowNetworkSimulationControl(const AirflowNetworkSimulationControl& other) = default; | |
| 34 | 10 | AirflowNetworkSimulationControl(AirflowNetworkSimulationControl&& other) = default; | |
| 35 | ✗ | AirflowNetworkSimulationControl& operator=(const AirflowNetworkSimulationControl&) = default; | |
| 36 | ✗ | AirflowNetworkSimulationControl& operator=(AirflowNetworkSimulationControl&&) = default; | |
| 37 | |||
| 38 | //@} | ||
| 39 | /** @name Static Methods */ | ||
| 40 | //@{ | ||
| 41 | static IddObjectType iddObjectType(); | ||
| 42 | |||
| 43 | static std::vector<std::string> solverValues(); | ||
| 44 | |||
| 45 | //@} | ||
| 46 | /** @name Getters */ | ||
| 47 | //@{ | ||
| 48 | |||
| 49 | /** Determines the type of AirflowNetwork simulation that will be run. | ||
| 50 | * | ||
| 51 | * NoMultizoneOrDistribution: Only perform Simple calculations (objects ZoneInfiltration:*, | ||
| 52 | * ZoneVentilation:*, ZoneMixing, ZoneCrossMixing, ZoneRefrigerationDoorMixing, | ||
| 53 | * ZoneAirBalance:OutdoorAir, ZoneEarthtube, ZoneThermalChimney, and ZoneCoolTower:Shower); | ||
| 54 | * | ||
| 55 | * MultizoneWithoutDistribution: Use AirflowNetwork objects to simulate multizone | ||
| 56 | * Airflows driven by wind during simulation time, and objects of ZoneInfiltration:*, | ||
| 57 | * ZoneVentilation:*, ZoneMixing, ZoneCrossMixing, ZoneRefrigerationDoorMixing, ZoneAirBalance:OutdoorAir, | ||
| 58 | * ZoneEarthtube, ZoneThermalChimney, and ZoneCoolTower:Shower are ignored; | ||
| 59 | * | ||
| 60 | * MultizoneWithDistributionOnlyDuringFanOperation: Perform distribution system | ||
| 61 | * calculations during system fan on time and Simple calculations during system Fan off time; | ||
| 62 | * | ||
| 63 | * MultizoneWithDistribution: Perform distribution system calculations during system | ||
| 64 | * fan on time and multizone Airflow driven by wind during system fan off time. | ||
| 65 | */ | ||
| 66 | boost::optional<std::string> airflowNetworkControl() const; | ||
| 67 | /** Returns true if the type of AirflowNetwork simulation is defaulted. */ | ||
| 68 | bool isAirflowNetworkControlDefaulted() const; | ||
| 69 | |||
| 70 | /* Determines the wind pressure treatment used by AirflowNetork. | ||
| 71 | * | ||
| 72 | * Input: User must enter AirflowNetwork:MultiZone:WindPressureCoefficientArray, | ||
| 73 | * AirflowNetwork:MultiZone:ExternalNode, and AirflowNetwork:MultiZone:WindPressureCoefficientValues objects. | ||
| 74 | * | ||
| 75 | * SurfaceAverageCalculation: used only for rectangular buildings. AirflowNetwork:MultiZone:WindPressureCoefficientArray, | ||
| 76 | * AirflowNetwork:MultiZone:ExternalNode, and AirflowNetwork:MultiZone:WindPressureCoefficientValues objects are not used. | ||
| 77 | */ | ||
| 78 | boost::optional<std::string> windPressureCoefficientType() const; | ||
| 79 | /** Returns true if the wind pressure treatment is defaulted. */ | ||
| 80 | bool isWindPressureCoefficientTypeDefaulted() const; | ||
| 81 | |||
| 82 | /* Determines how height is selected for wind pressure. | ||
| 83 | * If ExternalNode is selected, the height given in the AirflowNetwork:MultiZone:ExternalNode object will be used. | ||
| 84 | * | ||
| 85 | * If OpeningHeight is selected, the surface opening height (centroid) will be used to calculate local wind pressure | ||
| 86 | * | ||
| 87 | * This field is ignored when the choice of the Wind Pressure Coefficient Type field is SurfaceAverageCalculation. | ||
| 88 | */ | ||
| 89 | boost::optional<std::string> heightSelectionforLocalWindPressureCalculation() const; | ||
| 90 | /** Returns true if the height selection procedure is defaulted. */ | ||
| 91 | bool isHeightSelectionforLocalWindPressureCalculationDefaulted() const; | ||
| 92 | |||
| 93 | /** General building type, used only if Wind Pressure Coefficient Type = SurfaceAverageCalculation. | ||
| 94 | */ | ||
| 95 | boost::optional<std::string> buildingType() const; | ||
| 96 | /** Returns true if the building type is defaulted. */ | ||
| 97 | bool isBuildingTypeDefaulted() const; | ||
| 98 | |||
| 99 | /** Determines the maximum number of iterations used to converge on a solution. If this limit | ||
| 100 | * is exceeded, the program terminates. | ||
| 101 | */ | ||
| 102 | boost::optional<int> maximumNumberofIterations() const; | ||
| 103 | /** Returns true if the maximum number of iterations is defaulted. */ | ||
| 104 | bool isMaximumNumberofIterationsDefaulted() const; | ||
| 105 | |||
| 106 | /** Determines how the network equations are initialized. | ||
| 107 | */ | ||
| 108 | boost::optional<std::string> initializationType() const; | ||
| 109 | /** Returns true if the initialization type is defaulted. */ | ||
| 110 | bool isInitializationTypeDefaulted() const; | ||
| 111 | |||
| 112 | /** This tolerance is defined as the absolute value of the sum of the mass flow rates divided by the sum of the absolute value | ||
| 113 | * of the mass Flow Rates. The mass flow rates described here refer to the mass Flow Rates at all Nodes in the AirflowNetwork | ||
| 114 | * model. The solution converges when both this tolerance and the tolerance in the Absolute Airflow Convergence Tolerance | ||
| 115 | * field are satisfied. | ||
| 116 | */ | ||
| 117 | boost::optional<double> relativeAirflowConvergenceTolerance() const; | ||
| 118 | /** Returns true if the relative convergence tolerance is defaulted. */ | ||
| 119 | bool isRelativeAirflowConvergenceToleranceDefaulted() const; | ||
| 120 | |||
| 121 | /** This tolerance is defined as the absolute value of the sum of the mass flow rates. The mass flow rates described here refer | ||
| 122 | * to the mass flow rates at all nodes in the AirflowNetwork model. The solution converges when both this tolerance and the | ||
| 123 | * tolerance in the previous field (Relative Airflow Convergence Tolerance) are satisfied. | ||
| 124 | */ | ||
| 125 | boost::optional<double> absoluteAirflowConvergenceTolerance() const; | ||
| 126 | /** Returns true if the absolute convergence tolerance is defaulted. */ | ||
| 127 | bool isAbsoluteAirflowConvergenceToleranceDefaulted() const; | ||
| 128 | |||
| 129 | /** Used only for AirflowNetwork:SimulationControl | ||
| 130 | */ | ||
| 131 | boost::optional<double> convergenceAccelerationLimit() const; | ||
| 132 | /** Returns true if the convergence acceleration limit is defaulted. */ | ||
| 133 | bool isConvergenceAccelerationLimitDefaulted() const; | ||
| 134 | |||
| 135 | /** Azimuth angle of long axis of building in degrees clockwise from true North. | ||
| 136 | * Used only if Wind Pressure Coefficient Type = SurfaceAverageCalculation. | ||
| 137 | */ | ||
| 138 | boost::optional<double> azimuthAngleofLongAxisofBuilding() const; | ||
| 139 | /** Returns true if the azimuth angle of long axis is defaulted. */ | ||
| 140 | bool isAzimuthAngleofLongAxisofBuildingDefaulted() const; | ||
| 141 | |||
| 142 | /** Ratio of building width along short axis to width along long axis. | ||
| 143 | * Used only if Wind Pressure Coefficient Type = SurfaceAverageCalculation. | ||
| 144 | */ | ||
| 145 | boost::optional<double> buildingAspectRatio() const; | ||
| 146 | /** Returns true if the ratio of the building width to length is defaulted. */ | ||
| 147 | bool isBuildingAspectRatioDefaulted() const; | ||
| 148 | |||
| 149 | /** Returns true if the temperature of external nodes will be computed based on height.*/ | ||
| 150 | bool heightDependenceofExternalNodeTemperature() const; | ||
| 151 | /** Returns true if the external nodes temperature computation type is defaulted. */ | ||
| 152 | bool isHeightDependenceofExternalNodeTemperatureDefaulted() const; | ||
| 153 | |||
| 154 | std::string solver() const; | ||
| 155 | bool isSolverDefaulted() const; | ||
| 156 | |||
| 157 | bool allowUnsupportedZoneEquipment() const; | ||
| 158 | bool isAllowUnsupportedZoneEquipmentDefaulted() const; | ||
| 159 | |||
| 160 | //@} | ||
| 161 | /** @name Setters */ | ||
| 162 | //@{ | ||
| 163 | |||
| 164 | /** Sets the airflow network control type. */ | ||
| 165 | bool setAirflowNetworkControl(const std::string& airflowNetworkControl); | ||
| 166 | /** Resets the airflow network control type. */ | ||
| 167 | void resetAirflowNetworkControl(); | ||
| 168 | |||
| 169 | /** Sets the wind pressure coefficient type. */ | ||
| 170 | bool setWindPressureCoefficientType(const std::string& type); | ||
| 171 | /** Resets the wind pressure coefficient type. */ | ||
| 172 | void resetWindPressureCoefficientType(); | ||
| 173 | |||
| 174 | /** Sets the height selection procedure. */ | ||
| 175 | bool setHeightSelectionforLocalWindPressureCalculation(const std::string& height); | ||
| 176 | /** Resets the height selection procedure. */ | ||
| 177 | void resetHeightSelectionforLocalWindPressureCalculation(); | ||
| 178 | |||
| 179 | /** Sets the building type. */ | ||
| 180 | bool setBuildingType(const std::string& type); | ||
| 181 | /** Resets the building type. */ | ||
| 182 | void resetBuildingType(); | ||
| 183 | |||
| 184 | /** Sets the maximum number of iteration. */ | ||
| 185 | bool setMaximumNumberofIterations(int number); | ||
| 186 | /** Resets the maximum number of iteration. */ | ||
| 187 | void resetMaximumNumberofIterations(); | ||
| 188 | |||
| 189 | /** Sets the initialization type. */ | ||
| 190 | bool setInitializationType(const std::string& type); | ||
| 191 | /** Resets the initialization type. */ | ||
| 192 | void resetInitializationType(); | ||
| 193 | |||
| 194 | /** Sets the relative airflow convergence tolerance. */ | ||
| 195 | bool setRelativeAirflowConvergenceTolerance(double tolerance); | ||
| 196 | /** Resets the relative airflow convergence tolerance. */ | ||
| 197 | void resetRelativeAirflowConvergenceTolerance(); | ||
| 198 | |||
| 199 | /** Sets the absolute airflow convergence tolerance. */ | ||
| 200 | bool setAbsoluteAirflowConvergenceTolerance(double tolerance); | ||
| 201 | /** Resets the absolute airflow convergence tolerance. */ | ||
| 202 | void resetAbsoluteAirflowConvergenceTolerance(); | ||
| 203 | |||
| 204 | /** Sets the convergence acceleration limit. */ | ||
| 205 | bool setConvergenceAccelerationLimit(double limit); | ||
| 206 | /** Resets the convergence acceleration limit. */ | ||
| 207 | void resetConvergenceAccelerationLimit(); | ||
| 208 | |||
| 209 | /** Sets the azimuthal angle of the building. */ | ||
| 210 | bool setAzimuthAngleofLongAxisofBuilding(double angle); | ||
| 211 | /** Resets the azimuthal angle of the building. */ | ||
| 212 | void resetAzimuthAngleofLongAxisofBuilding(); | ||
| 213 | |||
| 214 | /** Sets the building aspect ratio. */ | ||
| 215 | bool setBuildingAspectRatio(double ratio); | ||
| 216 | /** Resets the building aspect ratio. */ | ||
| 217 | void resetBuildingAspectRatio(); | ||
| 218 | |||
| 219 | /** Sets the external nodes temperature computation type. */ | ||
| 220 | bool setHeightDependenceofExternalNodeTemperature(bool tf); | ||
| 221 | /** Resets the external nodes temperature computation type. */ | ||
| 222 | void resetHeightDependenceofExternalNodeTemperature(); | ||
| 223 | |||
| 224 | bool setSolver(const std::string& solver); | ||
| 225 | void resetSolver(); | ||
| 226 | |||
| 227 | bool setAllowUnsupportedZoneEquipment(bool allowUnsupportedZoneEquipment); | ||
| 228 | void resetAllowUnsupportedZoneEquipment(); | ||
| 229 | |||
| 230 | //@} | ||
| 231 | |||
| 232 | protected: | ||
| 233 | /** @name Constructors and Destructors */ | ||
| 234 | //@{ | ||
| 235 | |||
| 236 | /// Constructs a new SimulationControl object in the model. | ||
| 237 | explicit AirflowNetworkSimulationControl(const Model& model); | ||
| 238 | |||
| 239 | //@} | ||
| 240 | |||
| 241 | /// @cond | ||
| 242 | |||
| 243 | friend class detail::AirflowNetworkSimulationControl_Impl; | ||
| 244 | friend class Model; | ||
| 245 | friend class IdfObject; | ||
| 246 | friend class openstudio::detail::IdfObject_Impl; | ||
| 247 | |||
| 248 | using ImplType = detail::AirflowNetworkSimulationControl_Impl; | ||
| 249 | |||
| 250 | explicit AirflowNetworkSimulationControl(std::shared_ptr<ImplType> impl); | ||
| 251 | |||
| 252 | private: | ||
| 253 | REGISTER_LOGGER("openstudio.model.AirflowNetworkSimulationControl"); | ||
| 254 | |||
| 255 | /// @endcond | ||
| 256 | }; | ||
| 257 | |||
| 258 | /** \relates AirflowNetworkSimulationControl */ | ||
| 259 | using OptionalAirflowNetworkSimulationControl = boost::optional<AirflowNetworkSimulationControl>; | ||
| 260 | |||
| 261 | } // namespace model | ||
| 262 | } // namespace openstudio | ||
| 263 | |||
| 264 | #endif | ||
| 265 |