src/model/ThermalZone.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_THERMALZONE_HPP | ||
| 7 | #define MODEL_THERMALZONE_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "HVACComponent.hpp" | ||
| 11 | #include "../utilities/core/Deprecated.hpp" | ||
| 12 | |||
| 13 | namespace openstudio { | ||
| 14 | |||
| 15 | namespace model { | ||
| 16 | |||
| 17 | class Space; | ||
| 18 | class DaylightingControl; | ||
| 19 | class IlluminanceMap; | ||
| 20 | class RenderingColor; | ||
| 21 | class ThermostatSetpointDualSetpoint; | ||
| 22 | class Thermostat; | ||
| 23 | class ZoneControlContaminantController; | ||
| 24 | class ZoneControlHumidistat; | ||
| 25 | class SizingZone; | ||
| 26 | class PortList; | ||
| 27 | class ZoneMixing; | ||
| 28 | class AirflowNetworkZone; | ||
| 29 | class ZonePropertyUserViewFactorsBySurfaceName; | ||
| 30 | class ZoneMRTCalculation; | ||
| 31 | class Schedule; | ||
| 32 | |||
| 33 | namespace detail { | ||
| 34 | |||
| 35 | class ThermalZone_Impl; | ||
| 36 | |||
| 37 | } // namespace detail | ||
| 38 | |||
| 39 | /** ThermalZone is a HVACComponent that wraps the OpenStudio IDD object 'OS_ThermalZone'. */ | ||
| 40 | class MODEL_API ThermalZone : public HVACComponent | ||
| 41 | { | ||
| 42 | public: | ||
| 43 | /** @name Constructors and Destructors */ | ||
| 44 | //@{ | ||
| 45 | |||
| 46 | explicit ThermalZone(const Model& model); | ||
| 47 | |||
| 48 | 206922 | virtual ~ThermalZone() override = default; | |
| 49 | // Default the copy and move operators because the virtual dtor is explicit | ||
| 50 | 14997 | ThermalZone(const ThermalZone& other) = default; | |
| 51 | 122996 | ThermalZone(ThermalZone&& other) = default; | |
| 52 | 2 | ThermalZone& operator=(const ThermalZone&) = default; | |
| 53 | 4340 | ThermalZone& operator=(ThermalZone&&) = default; | |
| 54 | |||
| 55 | //@} | ||
| 56 | |||
| 57 | static IddObjectType iddObjectType(); | ||
| 58 | |||
| 59 | static std::vector<std::string> validZoneInsideConvectionAlgorithmValues(); | ||
| 60 | |||
| 61 | static std::vector<std::string> validZoneOutsideConvectionAlgorithmValues(); | ||
| 62 | |||
| 63 | /** @name Getters */ | ||
| 64 | //@{ | ||
| 65 | |||
| 66 | int multiplier() const; | ||
| 67 | |||
| 68 | bool isMultiplierDefaulted() const; | ||
| 69 | |||
| 70 | boost::optional<double> ceilingHeight() const; | ||
| 71 | |||
| 72 | bool isCeilingHeightDefaulted() const; | ||
| 73 | |||
| 74 | bool isCeilingHeightAutocalculated() const; | ||
| 75 | |||
| 76 | boost::optional<double> volume() const; | ||
| 77 | |||
| 78 | bool isVolumeDefaulted() const; | ||
| 79 | |||
| 80 | bool isVolumeAutocalculated() const; | ||
| 81 | |||
| 82 | boost::optional<std::string> zoneInsideConvectionAlgorithm() const; | ||
| 83 | |||
| 84 | boost::optional<std::string> zoneOutsideConvectionAlgorithm() const; | ||
| 85 | |||
| 86 | std::string zoneConditioningEquipmentListName() const; | ||
| 87 | |||
| 88 | boost::optional<Thermostat> thermostat() const; | ||
| 89 | |||
| 90 | boost::optional<ThermostatSetpointDualSetpoint> thermostatSetpointDualSetpoint() const; | ||
| 91 | |||
| 92 | boost::optional<ZoneControlHumidistat> zoneControlHumidistat() const; | ||
| 93 | |||
| 94 | boost::optional<ZoneControlContaminantController> zoneControlContaminantController() const; | ||
| 95 | |||
| 96 | double fractionofZoneControlledbyPrimaryDaylightingControl() const; | ||
| 97 | |||
| 98 | bool isFractionofZoneControlledbyPrimaryDaylightingControlDefaulted() const; | ||
| 99 | |||
| 100 | double fractionofZoneControlledbySecondaryDaylightingControl() const; | ||
| 101 | |||
| 102 | bool isFractionofZoneControlledbySecondaryDaylightingControlDefaulted() const; | ||
| 103 | |||
| 104 | SizingZone sizingZone() const; | ||
| 105 | |||
| 106 | ZonePropertyUserViewFactorsBySurfaceName getZonePropertyUserViewFactorsBySurfaceName() const; | ||
| 107 | |||
| 108 | ZoneMRTCalculation getZoneMRTCalculation() const; | ||
| 109 | |||
| 110 | //@} | ||
| 111 | /** @name Setters */ | ||
| 112 | //@{ | ||
| 113 | |||
| 114 | bool setMultiplier(int multiplier); | ||
| 115 | |||
| 116 | void resetMultiplier(); | ||
| 117 | |||
| 118 | bool setCeilingHeight(boost::optional<double> ceilingHeight); | ||
| 119 | |||
| 120 | bool setCeilingHeight(double ceilingHeight); | ||
| 121 | |||
| 122 | void resetCeilingHeight(); | ||
| 123 | |||
| 124 | void autocalculateCeilingHeight(); | ||
| 125 | |||
| 126 | bool setVolume(boost::optional<double> volume); | ||
| 127 | |||
| 128 | bool setVolume(double volume); | ||
| 129 | |||
| 130 | void resetVolume(); | ||
| 131 | |||
| 132 | void autocalculateVolume(); | ||
| 133 | |||
| 134 | bool setZoneInsideConvectionAlgorithm(boost::optional<std::string> zoneInsideConvectionAlgorithm); | ||
| 135 | |||
| 136 | bool setZoneInsideConvectionAlgorithm(const std::string& zoneInsideConvectionAlgorithm); | ||
| 137 | |||
| 138 | void resetZoneInsideConvectionAlgorithm(); | ||
| 139 | |||
| 140 | bool setZoneOutsideConvectionAlgorithm(boost::optional<std::string> zoneOutsideConvectionAlgorithm); | ||
| 141 | |||
| 142 | bool setZoneOutsideConvectionAlgorithm(const std::string& zoneOutsideConvectionAlgorithm); | ||
| 143 | |||
| 144 | void resetZoneOutsideConvectionAlgorithm(); | ||
| 145 | |||
| 146 | bool setZoneConditioningEquipmentListName(const std::string& zoneConditioningEquipmentListName); | ||
| 147 | |||
| 148 | /** \deprecated */ | ||
| 149 | bool setThermostatSetpointDualSetpoint(const ThermostatSetpointDualSetpoint& thermostat); | ||
| 150 | |||
| 151 | /** \deprecated */ | ||
| 152 | void resetThermostatSetpointDualSetpoint(); | ||
| 153 | |||
| 154 | bool setThermostat(const Thermostat& thermostat); | ||
| 155 | |||
| 156 | void resetThermostat(); | ||
| 157 | |||
| 158 | bool setZoneControlHumidistat(const ZoneControlHumidistat& humidistat); | ||
| 159 | |||
| 160 | void resetZoneControlHumidistat(); | ||
| 161 | |||
| 162 | bool setZoneControlContaminantController(const ZoneControlContaminantController& contaminantController); | ||
| 163 | |||
| 164 | void resetZoneControlContaminantController(); | ||
| 165 | |||
| 166 | bool setFractionofZoneControlledbyPrimaryDaylightingControl(double fractionofZoneControlledbyPrimaryDaylightingControl); | ||
| 167 | |||
| 168 | void resetFractionofZoneControlledbyPrimaryDaylightingControl(); | ||
| 169 | |||
| 170 | bool setFractionofZoneControlledbySecondaryDaylightingControl(double fractionofZoneControlledbySecondaryDaylightingControl); | ||
| 171 | |||
| 172 | void resetFractionofZoneControlledbySecondaryDaylightingControl(); | ||
| 173 | |||
| 174 | // TODO: Handle Non-Extensible IddField Space Group Rendering Name. | ||
| 175 | |||
| 176 | //@} | ||
| 177 | /** @name Other */ | ||
| 178 | //@{ | ||
| 179 | |||
| 180 | // As of OS Version 2.6.1 this method returns the first port on the returnPortList | ||
| 181 | // because multiple return air ports (and AirLoopHVAC instances) are allowed | ||
| 182 | unsigned returnAirPort() const; | ||
| 183 | |||
| 184 | unsigned zoneAirPort() const; | ||
| 185 | |||
| 186 | OptionalModelObject returnAirModelObject() const; | ||
| 187 | |||
| 188 | std::vector<ModelObject> returnAirModelObjects() const; | ||
| 189 | |||
| 190 | Node zoneAirNode() const; | ||
| 191 | |||
| 192 | boost::optional<DaylightingControl> primaryDaylightingControl() const; | ||
| 193 | |||
| 194 | bool setPrimaryDaylightingControl(const DaylightingControl& daylightingControl); | ||
| 195 | |||
| 196 | void resetPrimaryDaylightingControl(); | ||
| 197 | |||
| 198 | boost::optional<DaylightingControl> secondaryDaylightingControl() const; | ||
| 199 | |||
| 200 | bool setSecondaryDaylightingControl(const DaylightingControl& daylightingControl); | ||
| 201 | |||
| 202 | void resetSecondaryDaylightingControl(); | ||
| 203 | |||
| 204 | boost::optional<IlluminanceMap> illuminanceMap() const; | ||
| 205 | |||
| 206 | bool setIlluminanceMap(const IlluminanceMap& illuminanceMap); | ||
| 207 | |||
| 208 | void resetIlluminanceMap(); | ||
| 209 | |||
| 210 | void checkDaylightingControlsAndIlluminanceMaps(); | ||
| 211 | |||
| 212 | boost::optional<Schedule> daylightingControlsAvailabilitySchedule() const; | ||
| 213 | |||
| 214 | bool setDaylightingControlsAvailabilitySchedule(Schedule& schedule); | ||
| 215 | |||
| 216 | void resetDaylightingControlsAvailabilitySchedule(); | ||
| 217 | |||
| 218 | /// Returns the rendering color. | ||
| 219 | boost::optional<RenderingColor> renderingColor() const; | ||
| 220 | |||
| 221 | /// Sets the rendering color. | ||
| 222 | bool setRenderingColor(const RenderingColor& renderingColor); | ||
| 223 | |||
| 224 | /// Resets the rendering color. | ||
| 225 | void resetRenderingColor(); | ||
| 226 | |||
| 227 | std::vector<ModelObject> equipment() const; | ||
| 228 | |||
| 229 | boost::optional<HVACComponent> airLoopHVACTerminal() const; | ||
| 230 | |||
| 231 | std::vector<HVACComponent> airLoopHVACTerminals() const; | ||
| 232 | |||
| 233 | /// returns all spaces in this thermal zone | ||
| 234 | std::vector<Space> spaces() const; | ||
| 235 | |||
| 236 | /// return all spaces that have a design specification outdoor air assigned | ||
| 237 | std::vector<Space> spacesWithDesignSpecificationOutdoorAir() const; | ||
| 238 | |||
| 239 | /** Accumulates the floorArea (m^2) of spaces. Does not include space multiplier. */ | ||
| 240 | double floorArea() const; | ||
| 241 | |||
| 242 | /** Accumulates the exterior surface area (m^2) of spaces. Does not include space | ||
| 243 | * multiplier. */ | ||
| 244 | double exteriorSurfaceArea() const; | ||
| 245 | |||
| 246 | /** Accumulates the exterior wall area (m^2) of spaces. Does not include space | ||
| 247 | * multiplier. */ | ||
| 248 | double exteriorWallArea() const; | ||
| 249 | |||
| 250 | // TODO: How should this interact with the volume field. If there is an interaction, | ||
| 251 | // how should Building calculate its airVolume and accumulate infiltration design | ||
| 252 | // flow rate? | ||
| 253 | /** Accumulates the air volume (m^3) of spaces. Does not include space multiplier. */ | ||
| 254 | double airVolume() const; | ||
| 255 | |||
| 256 | /** Returns the number of people in the thermal zone. Does not include space multiplier. Does include people multiplier. */ | ||
| 257 | double numberOfPeople() const; | ||
| 258 | |||
| 259 | /** Returns the number of people per floor area (people/m^2). Does not include space multiplier. Does include people multiplier. */ | ||
| 260 | double peoplePerFloorArea() const; | ||
| 261 | |||
| 262 | /** Returns the total floor area per person in this thermal zone (m^2/person). Does not include space multiplier. Does include people multiplier. */ | ||
| 263 | double floorAreaPerPerson() const; | ||
| 264 | |||
| 265 | /** Returns the lighting power (W) in this thermal zone. Does not include space multiplier. Does include lighting multiplier. */ | ||
| 266 | double lightingPower() const; | ||
| 267 | |||
| 268 | /** Returns the lighting power density (W/m^2) of this thermal zone. Does not include space multiplier. Does include lighting multiplier. */ | ||
| 269 | double lightingPowerPerFloorArea() const; | ||
| 270 | |||
| 271 | /** Returns the lighting power per person (W/person) of this thermal zone. Does not include space multiplier. Does include lighting multiplier. */ | ||
| 272 | double lightingPowerPerPerson() const; | ||
| 273 | |||
| 274 | /** Returns the electric equipment power (W) of this thermal zone. Does not include space multiplier. Does include equipment multiplier. */ | ||
| 275 | double electricEquipmentPower() const; | ||
| 276 | |||
| 277 | /** Returns the electric equipment power density (W/m^2) of this thermal zone. Does not include space multiplier. Does include equipment multiplier. */ | ||
| 278 | double electricEquipmentPowerPerFloorArea() const; | ||
| 279 | |||
| 280 | /** Returns the electric equipment power per person (W/person) of this thermal zone. Does not include space multiplier. Does include equipment multiplier. */ | ||
| 281 | double electricEquipmentPowerPerPerson() const; | ||
| 282 | |||
| 283 | /** Returns the gas equipment power (W) of this thermal zone. Does not include space multiplier. Does include equipment multiplier. */ | ||
| 284 | double gasEquipmentPower() const; | ||
| 285 | |||
| 286 | /** Returns the gas equipment power density (W/m^2) of this thermal zone. Does not include space multiplier. Does include equipment multiplier. */ | ||
| 287 | double gasEquipmentPowerPerFloorArea() const; | ||
| 288 | |||
| 289 | /** Returns the gas equipment power per person (W/person) of this thermal zone. Does not include space multiplier. Does include equipment multiplier. */ | ||
| 290 | double gasEquipmentPowerPerPerson() const; | ||
| 291 | |||
| 292 | /** Returns the hot water equipment power (W) of this thermal zone. Does not include space multiplier. Does include equipment multiplier. */ | ||
| 293 | double hotWaterEquipmentPower() const; | ||
| 294 | |||
| 295 | /** Returns the hot water equipment power density (W/m^2) of this thermal zone. Does not include space multiplier. Does include equipment multiplier. */ | ||
| 296 | double hotWaterEquipmentPowerPerFloorArea() const; | ||
| 297 | |||
| 298 | /** Returns the hot water equipment power per person (W/person) of this thermal zone. Does not include space multiplier. Does include equipment multiplier. */ | ||
| 299 | double hotWaterEquipmentPowerPerPerson() const; | ||
| 300 | |||
| 301 | /** Returns the infiltration design flow rate (m^3/s) in this thermal zone. | ||
| 302 | * Ignores SpaceInfiltrationEffectiveLeakageArea and SpaceInfiltrationFlowCoefficient objects. Does not include space multiplier. */ | ||
| 303 | double infiltrationDesignFlowRate() const; | ||
| 304 | |||
| 305 | /** Returns the infiltration design flow per space floor area (m^3/m^2*s) in this thermal zone. | ||
| 306 | * Ignores SpaceInfiltrationEffectiveLeakageArea and SpaceInfiltrationFlowCoefficient objects. Does not include space multiplier. */ | ||
| 307 | double infiltrationDesignFlowPerSpaceFloorArea() const; | ||
| 308 | |||
| 309 | /** Returns the infiltration design flow per exterior surface area (m^3/m^2*s) in this thermal zone. | ||
| 310 | * Ignores SpaceInfiltrationEffectiveLeakageArea and SpaceInfiltrationFlowCoefficient objects. Does not include space multiplier. */ | ||
| 311 | double infiltrationDesignFlowPerExteriorSurfaceArea() const; | ||
| 312 | |||
| 313 | /** Returns the infiltration design flow per exterior wall area (m^3/m^2*s) in this thermal zone. | ||
| 314 | * Ignores SpaceInfiltrationEffectiveLeakageArea and SpaceInfiltrationFlowCoefficient objects. Does not include space multiplier. */ | ||
| 315 | double infiltrationDesignFlowPerExteriorWallArea() const; | ||
| 316 | |||
| 317 | /** Returns the infiltration design air changes per hour (1/h) in this thermal zone. | ||
| 318 | * Ignores SpaceInfiltrationEffectiveLeakageArea and SpaceInfiltrationFlowCoefficient objects. Does not include space multiplier. */ | ||
| 319 | double infiltrationDesignAirChangesPerHour() const; | ||
| 320 | |||
| 321 | /** Determines if this zone is conditioned, based on the SqlFile output. Returns 'Yes' if zone is conditioned. */ | ||
| 322 | boost::optional<std::string> isConditioned() const; | ||
| 323 | |||
| 324 | /// Combines all spaces referencing this zone into a single space referencing this zone. | ||
| 325 | /// If this zone has no spaces referencing it, then an uninitialized optional space is returned. | ||
| 326 | /// If this zone has one space referencing it, then that space is returned. | ||
| 327 | /// If this zone is referenced by more than one space, then geometry from all spaces is added to a single zone. | ||
| 328 | /// The space origin is at the minimum x, y, z coordinate of all space origins, direction of relative north is preserved if same for all spaces. | ||
| 329 | /// If all spaces reference the same building story then that is preserved, otherwise it is cleared. | ||
| 330 | /// If all spaces reference the same space type then that is preserved, otherwise space loads from the space type are applied to the new space directly. | ||
| 331 | /// Direct child space loads are converted to absolute levels. | ||
| 332 | /// Constructions and schedules are hard applied to all child surfaces and loads. | ||
| 333 | /// Surfaces referencing other surfaces within the space are converted to interior partitions. | ||
| 334 | boost::optional<Space> combineSpaces(); | ||
| 335 | |||
| 336 | /** Removes connections to all other HVACComponent objects */ | ||
| 337 | void disconnect(); // cppcheck-suppress [duplInheritedMember] for documentation purposes | ||
| 338 | |||
| 339 | /** ThermalZone must be disconnected from all loops to be removable | ||
| 340 | */ | ||
| 341 | bool isRemovable() const; // cppcheck-suppress [duplInheritedMember] for documentation purposes | ||
| 342 | |||
| 343 | /** Indicates if the zone will use EnergyPlus ideal air loads. | ||
| 344 | */ | ||
| 345 | bool useIdealAirLoads() const; | ||
| 346 | |||
| 347 | /** Adds or removes ideal air loads for the zone. | ||
| 348 | * ThermalZones that are attached to air loops will be removed. | ||
| 349 | * If the ThermalZone is later added to a loop useIdealAirLoads | ||
| 350 | * will be reset to false. | ||
| 351 | */ | ||
| 352 | bool setUseIdealAirLoads(bool useIdealAirLoads); | ||
| 353 | |||
| 354 | bool addToNode(Node& node); // cppcheck-suppress [duplInheritedMember] for documentation purposes | ||
| 355 | |||
| 356 | /** This method is the same as addToNode, except | ||
| 357 | * existing air loop connections will not be removed. | ||
| 358 | * This is because EnergyPlus gained the ability to attach multiple air loops. | ||
| 359 | **/ | ||
| 360 | bool multiAddToNode(Node& node); | ||
| 361 | |||
| 362 | PortList returnPortList() const; | ||
| 363 | |||
| 364 | PortList inletPortList() const; | ||
| 365 | |||
| 366 | PortList exhaustPortList() const; | ||
| 367 | |||
| 368 | /** Add new equipment setting the heating and cooling priorities | ||
| 369 | * to the next available priority level. | ||
| 370 | * Air terminals associated with AirLoopHVAC will be moved to first priority. | ||
| 371 | * This method is relatively dumb. It will add any model object to the list | ||
| 372 | * even if it is not hvac equipment. That might change in the future. | ||
| 373 | */ | ||
| 374 | bool addEquipment(const ModelObject& equipment); | ||
| 375 | |||
| 376 | /** Remove equipment from the EquipmentList. | ||
| 377 | * This will not remove the equipment from the model or | ||
| 378 | * disconnect any node connections. Use only if you know what you are doing. | ||
| 379 | */ | ||
| 380 | bool removeEquipment(const ModelObject& equipment); | ||
| 381 | |||
| 382 | std::string loadDistributionScheme() const; | ||
| 383 | |||
| 384 | bool setLoadDistributionScheme(const std::string& scheme); | ||
| 385 | |||
| 386 | /** Set cooling priority of equipment. | ||
| 387 | * Returns false when equipment is not in the ZoneHVACEquipmentList | ||
| 388 | */ | ||
| 389 | bool setCoolingPriority(const ModelObject& equipment, unsigned priority); | ||
| 390 | |||
| 391 | /** Set heating priority of equipment. | ||
| 392 | * Returns false when equipment is not in the ZoneHVACEquipmentList | ||
| 393 | */ | ||
| 394 | bool setHeatingPriority(const ModelObject& equipment, unsigned priority); | ||
| 395 | |||
| 396 | /** Return all equipment. Order is determined by heating priority */ | ||
| 397 | std::vector<ModelObject> equipmentInHeatingOrder() const; | ||
| 398 | |||
| 399 | /** Return all equipment. Order is determined by cooling priority */ | ||
| 400 | std::vector<ModelObject> equipmentInCoolingOrder() const; | ||
| 401 | |||
| 402 | /** Return the Sequential Cooling Fraction of equipment, if it's a ScheduleConstant. | ||
| 403 | * Returns nothing if when equipment is not in the ZoneHVACEquipmentList, its heating priority is zero, | ||
| 404 | * or the loadDistributionScheme isn't 'Sequential' | ||
| 405 | */ | ||
| 406 | boost::optional<double> sequentialCoolingFraction(const ModelObject& equipment) const; | ||
| 407 | |||
| 408 | /** Return the Sequential Cooling Fraction Schedule of equipment. | ||
| 409 | * Returns nothing if when equipment is not in the ZoneHVACEquipmentList, its heating priority is zero, | ||
| 410 | * or the loadDistributionScheme isn't 'Sequential' | ||
| 411 | */ | ||
| 412 | boost::optional<Schedule> sequentialCoolingFractionSchedule(const ModelObject& equipment) const; | ||
| 413 | |||
| 414 | /** Return the Sequential Heating Fraction of equipment, if it's a ScheduleConstant | ||
| 415 | * Returns nothing if when equipment is not in the ZoneHVACEquipmentList, its cooling priority is zero, | ||
| 416 | * or the loadDistributionScheme isn't 'Sequential' | ||
| 417 | */ | ||
| 418 | boost::optional<double> sequentialHeatingFraction(const ModelObject& equipment) const; | ||
| 419 | |||
| 420 | /** Return the Sequential Heating Fraction Schedule of equipment. | ||
| 421 | * Returns nothing if when equipment is not in the ZoneHVACEquipmentList, its cooling priority is zero, | ||
| 422 | * or the loadDistributionScheme isn't 'Sequential' | ||
| 423 | */ | ||
| 424 | boost::optional<Schedule> sequentialHeatingFractionSchedule(const ModelObject& equipment) const; | ||
| 425 | |||
| 426 | /** Set the Sequential Cooling Fraction of equipment, creates a ScheduleConstant for your convenience. | ||
| 427 | * Returns false when equipment is not in the ZoneHVACEquipmentList, its cooling priority is zero, | ||
| 428 | * or the loadDistributionScheme isn't 'Sequential' | ||
| 429 | */ | ||
| 430 | bool setSequentialCoolingFraction(const ModelObject& equipment, double fraction); | ||
| 431 | |||
| 432 | /** Set the Sequential Cooling Fraction Schedule of equipment. | ||
| 433 | * Returns false when equipement is not in the ZoneHVACEquipmentList, its cooling priority is zero, | ||
| 434 | * or the loadDistributionScheme isn't 'Sequential' | ||
| 435 | */ | ||
| 436 | bool setSequentialCoolingFractionSchedule(const ModelObject& equipment, Schedule& schedule); | ||
| 437 | |||
| 438 | /** Set the Sequential Heating Fraction of equipment, creates a ScheduleConstant for your convenience. | ||
| 439 | * Returns false when equipment is not in the ZoneHVACEquipmentList, its heating priority is zero, | ||
| 440 | * or the loadDistributionScheme isn't 'Sequential' | ||
| 441 | */ | ||
| 442 | bool setSequentialHeatingFraction(const ModelObject& equipment, double fraction); | ||
| 443 | |||
| 444 | /** Set the Sequential Heating Fraction Schedule of equipment. | ||
| 445 | * Returns false when equipment is not in the ZoneHVACEquipmentList, its heating priority is zero, | ||
| 446 | * or the loadDistributionScheme isn't 'Sequential' | ||
| 447 | */ | ||
| 448 | bool setSequentialHeatingFractionSchedule(const ModelObject& equipment, Schedule& schedule); | ||
| 449 | |||
| 450 | /** Return true if the ThermalZone is attached to | ||
| 451 | * an AirLoopHVACSupplyPlenum or AirLoopHVACReturnPlenum | ||
| 452 | */ | ||
| 453 | bool isPlenum() const; | ||
| 454 | |||
| 455 | /** Return true if the ThermalZone is unconditioned and available to be used as a plenum | ||
| 456 | * This means the zone is not attached to an AirLoopHVAC structure as a conditioned zone | ||
| 457 | * and there is no zone equipment. | ||
| 458 | */ | ||
| 459 | bool canBePlenum() const; | ||
| 460 | |||
| 461 | /** Establish plenumZone as the supply plenum for this ThermalZone. | ||
| 462 | * This ThermalZone must already be attached to AirLoopHVAC. | ||
| 463 | * The plenumZone must not be used as a plenum on another AirLoopHVAC structure. | ||
| 464 | * The method canBePlenum called on plenumZone must return true. | ||
| 465 | */ | ||
| 466 | bool setSupplyPlenum(const ThermalZone& plenumZone); | ||
| 467 | |||
| 468 | /** Overload of setSupplyPlenum() | ||
| 469 | * This variation can account for dual duct systems, branchIndex can be 0 or 1 | ||
| 470 | * indicating which branch of a dual duct system to attach to. | ||
| 471 | * branchIndex 0 corresponds to the branch of demandInletNode(0). | ||
| 472 | */ | ||
| 473 | bool setSupplyPlenum(const ThermalZone& plenumZone, unsigned branchIndex); | ||
| 474 | |||
| 475 | /** Remove any supply plenum serving this zone, | ||
| 476 | * associated with the AirLoopHVAC returned by | ||
| 477 | * ThermalZone::airLoopHVAC(). | ||
| 478 | */ | ||
| 479 | void removeSupplyPlenum(); | ||
| 480 | |||
| 481 | /** Remove any supply plenum associated with | ||
| 482 | * the given AirLoopHVAC instance. | ||
| 483 | * This method is important when a zone is connected to multiple AirLoopHVAC instances. | ||
| 484 | */ | ||
| 485 | void removeSupplyPlenum(const AirLoopHVAC& airloop); | ||
| 486 | |||
| 487 | /** Overload of removeSupplyPlenum() | ||
| 488 | * This variation can account for dual duct systems, branchIndex can be 0 or 1 | ||
| 489 | * indicating which branch of a dual duct system to attach to. | ||
| 490 | * branchIndex 0 corresponds to the branch of demandInletNode(0). | ||
| 491 | */ | ||
| 492 | void removeSupplyPlenum(unsigned branchIndex); | ||
| 493 | |||
| 494 | /** Remove any supply plenum associated with | ||
| 495 | * the given AirLoopHVAC instance, and branchIndex in a dual duct system. | ||
| 496 | * This method is important when a zone is connected to multiple AirLoopHVAC instances. | ||
| 497 | * This variation can account for dual duct systems, branchIndex can be 0 or 1 | ||
| 498 | * indicating which branch of a dual duct system to attach to. | ||
| 499 | * branchIndex 0 corresponds to the branch of demandInletNode(0). | ||
| 500 | */ | ||
| 501 | void removeSupplyPlenum(const AirLoopHVAC& airloop, unsigned branchIndex); | ||
| 502 | |||
| 503 | /** Establish plenumZone as the return plenum for this ThermalZone. | ||
| 504 | * This ThermalZone must already be attached to AirLoopHVAC. | ||
| 505 | * The plenumZone must not be used as a plenum on another AirLoopHVAC structure. | ||
| 506 | * The method canBePlenum called on plenumZone must return true. | ||
| 507 | */ | ||
| 508 | bool setReturnPlenum(const ThermalZone& plenumZone); | ||
| 509 | |||
| 510 | /** setReturnPlenum for the specified air loop. | ||
| 511 | * This method is used when there are multiple air loops attached to the zone | ||
| 512 | */ | ||
| 513 | bool setReturnPlenum(const ThermalZone& plenumZone, AirLoopHVAC& airLoop); | ||
| 514 | |||
| 515 | /** Remove any return plenum serving this zone | ||
| 516 | */ | ||
| 517 | void removeReturnPlenum(); | ||
| 518 | |||
| 519 | /** Remove any return plenum serving this zone | ||
| 520 | */ | ||
| 521 | void removeReturnPlenum(AirLoopHVAC& airLoop); | ||
| 522 | |||
| 523 | /** Returns all ZoneMixing objects associated with this zone, includes supply and exhaust mixing objects */ | ||
| 524 | std::vector<ZoneMixing> zoneMixing() const; | ||
| 525 | |||
| 526 | /** Returns all ZoneMixing objects which supply air to this zone */ | ||
| 527 | std::vector<ZoneMixing> supplyZoneMixing() const; | ||
| 528 | |||
| 529 | /** Returns all ZoneMixing objects which exhaust air from this zone */ | ||
| 530 | std::vector<ZoneMixing> exhaustZoneMixing() const; | ||
| 531 | |||
| 532 | /** Creates an AirflowNetworkZone object if an object is not already attached. */ | ||
| 533 | AirflowNetworkZone getAirflowNetworkZone(); | ||
| 534 | |||
| 535 | /** Returns the attached AirflowNetworkZone if there is one */ | ||
| 536 | boost::optional<AirflowNetworkZone> airflowNetworkZone() const; | ||
| 537 | |||
| 538 | std::vector<AirLoopHVAC> airLoopHVACs() const; | ||
| 539 | |||
| 540 | // SQL Queries | ||
| 541 | boost::optional<double> getAutosizedValueFromZoneSizes(const std::string& columnName, const std::string& loadType) const; | ||
| 542 | |||
| 543 | boost::optional<double> autosizedMinimumOutdoorAirFlowRate() const; | ||
| 544 | boost::optional<double> autosizedCoolingDesignAirFlowRate() const; | ||
| 545 | boost::optional<double> autosizedHeatingDesignAirFlowRate() const; | ||
| 546 | boost::optional<double> autosizedCoolingDesignLoad() const; | ||
| 547 | // The max of autosizedCoolingDesignAirFlowRate and autosizedHeatingDesignAirFlowRate if both are found | ||
| 548 | boost::optional<double> autosizedDesignAirFlowRate() const; | ||
| 549 | boost::optional<double> autosizedHeatingDesignLoad() const; | ||
| 550 | |||
| 551 | //@} | ||
| 552 | protected: | ||
| 553 | /// @cond | ||
| 554 | using ImplType = detail::ThermalZone_Impl; | ||
| 555 | |||
| 556 | friend class Model; | ||
| 557 | friend class openstudio::IdfObject; | ||
| 558 | friend class openstudio::detail::IdfObject_Impl; | ||
| 559 | |||
| 560 | explicit ThermalZone(std::shared_ptr<detail::ThermalZone_Impl> impl); | ||
| 561 | |||
| 562 | /// @endcond | ||
| 563 | private: | ||
| 564 | REGISTER_LOGGER("openstudio.model.ThermalZone"); | ||
| 565 | }; | ||
| 566 | |||
| 567 | /** \relates ThermalZone*/ | ||
| 568 | using OptionalThermalZone = boost::optional<ThermalZone>; | ||
| 569 | |||
| 570 | /** \relates ThermalZone*/ | ||
| 571 | using ThermalZoneVector = std::vector<ThermalZone>; | ||
| 572 | |||
| 573 | /** This class implements a transition zone, for DaylightingDeviceTubular */ | ||
| 574 | class MODEL_API TransitionZone | ||
| 575 | { | ||
| 576 | public: | ||
| 577 | TransitionZone(const ThermalZone& zone, double length); | ||
| 578 | |||
| 579 | ThermalZone thermalZone() const; | ||
| 580 | double length() const; | ||
| 581 | |||
| 582 | private: | ||
| 583 | ThermalZone m_zone; | ||
| 584 | double m_length; | ||
| 585 | − | REGISTER_LOGGER("openstudio.model.TransitionZone"); | |
| 586 | }; | ||
| 587 | |||
| 588 | // Overload operator<< | ||
| 589 | MODEL_API std::ostream& operator<<(std::ostream& out, const openstudio::model::TransitionZone& transitionZone); | ||
| 590 | |||
| 591 | } // namespace model | ||
| 592 | } // namespace openstudio | ||
| 593 | |||
| 594 | #endif // MODEL_THERMALZONE_HPP | ||
| 595 |