src/model/AirflowNetworkSimpleOpening.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_AIRFLOWNETWORKSIMPLEOPENING_HPP | ||
| 7 | #define MODEL_AIRFLOWNETWORKSIMPLEOPENING_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | |||
| 11 | #include "AirflowNetworkComponent.hpp" | ||
| 12 | |||
| 13 | namespace openstudio { | ||
| 14 | |||
| 15 | namespace model { | ||
| 16 | |||
| 17 | namespace detail { | ||
| 18 | |||
| 19 | class AirflowNetworkSimpleOpening_Impl; | ||
| 20 | |||
| 21 | } // namespace detail | ||
| 22 | |||
| 23 | /** AirflowNetworkSimpleOpening is a AirflowNetworkComponent that wraps the OpenStudio IDD object 'OS:AirflowNetworkSimpleOpening'. */ | ||
| 24 | class MODEL_API AirflowNetworkSimpleOpening : public AirflowNetworkComponent | ||
| 25 | { | ||
| 26 | public: | ||
| 27 | /** @name Constructors and Destructors */ | ||
| 28 | //@{ | ||
| 29 | /** Construct a simple opening object with default mass flow exponent. */ | ||
| 30 | AirflowNetworkSimpleOpening(const Model& model, double massFlowCoefficientWhenOpeningisClosed, double minimumDensityDifferenceforTwoWayFlow, | ||
| 31 | double dischargeCoefficient); | ||
| 32 | /** Construct a simple opening object. */ | ||
| 33 | AirflowNetworkSimpleOpening(const Model& model, double massFlowCoefficientWhenOpeningisClosed, double massFlowExponentWhenOpeningisClosed, | ||
| 34 | double minimumDensityDifferenceforTwoWayFlow, double dischargeCoefficient); | ||
| 35 | |||
| 36 | 5 | virtual ~AirflowNetworkSimpleOpening() override = default; | |
| 37 | // Default the copy and move operators because the virtual dtor is explicit | ||
| 38 | ✗ | AirflowNetworkSimpleOpening(const AirflowNetworkSimpleOpening& other) = default; | |
| 39 | 1 | AirflowNetworkSimpleOpening(AirflowNetworkSimpleOpening&& other) = default; | |
| 40 | ✗ | AirflowNetworkSimpleOpening& operator=(const AirflowNetworkSimpleOpening&) = default; | |
| 41 | ✗ | AirflowNetworkSimpleOpening& operator=(AirflowNetworkSimpleOpening&&) = default; | |
| 42 | |||
| 43 | //@} | ||
| 44 | |||
| 45 | static IddObjectType iddObjectType(); | ||
| 46 | |||
| 47 | /** @name Getters */ | ||
| 48 | //@{ | ||
| 49 | /** Returns the mass flow coefficient when the opening is closed in kg/s-m at 1 Pa pressure difference. */ | ||
| 50 | double airMassFlowCoefficientWhenOpeningisClosed() const; | ||
| 51 | /** Returns the mass flow exponent when the opening is closed. */ | ||
| 52 | double airMassFlowExponentWhenOpeningisClosed() const; | ||
| 53 | /** Returns true if the mass flow exponent is defaulted. */ | ||
| 54 | bool isAirMassFlowExponentWhenOpeningisClosedDefaulted() const; | ||
| 55 | /** Returns the minimum density difference above which two-way flow may occur due to stack effect in kg/m3. */ | ||
| 56 | double minimumDensityDifferenceforTwoWayFlow() const; | ||
| 57 | /** Returns the discharge coefficient. */ | ||
| 58 | double dischargeCoefficient() const; | ||
| 59 | |||
| 60 | //@} | ||
| 61 | /** @name Setters */ | ||
| 62 | //@{ | ||
| 63 | /** Sets the mass flow coefficient when the opening is closed in kg/s-m at 1 Pa pressure difference. */ | ||
| 64 | bool setAirMassFlowCoefficientWhenOpeningisClosed(double airMassFlowCoefficientWhenOpeningisClosed); | ||
| 65 | /** Sets the mass flow exponent when the opening is closed. */ | ||
| 66 | bool setAirMassFlowExponentWhenOpeningisClosed(double airMassFlowExponentWhenOpeningisClosed); | ||
| 67 | /** Resets the mass flow exponent when the opening is closed to the default value. */ | ||
| 68 | void resetAirMassFlowExponentWhenOpeningisClosed(); | ||
| 69 | /** Sets the minimum density difference above which two-way flow may occur due to stack effect in kg/m3. */ | ||
| 70 | bool setMinimumDensityDifferenceforTwoWayFlow(double minimumDensityDifferenceforTwoWayFlow); | ||
| 71 | /** Sets the discharge coefficient. */ | ||
| 72 | bool setDischargeCoefficient(double dischargeCoefficient); | ||
| 73 | |||
| 74 | //@} | ||
| 75 | protected: | ||
| 76 | /// @cond | ||
| 77 | using ImplType = detail::AirflowNetworkSimpleOpening_Impl; | ||
| 78 | |||
| 79 | explicit AirflowNetworkSimpleOpening(std::shared_ptr<detail::AirflowNetworkSimpleOpening_Impl> impl); | ||
| 80 | |||
| 81 | friend class detail::AirflowNetworkSimpleOpening_Impl; | ||
| 82 | friend class Model; | ||
| 83 | friend class IdfObject; | ||
| 84 | friend class openstudio::detail::IdfObject_Impl; | ||
| 85 | /// @endcond | ||
| 86 | private: | ||
| 87 | REGISTER_LOGGER("openstudio.model.AirflowNetworkSimpleOpening"); | ||
| 88 | }; | ||
| 89 | |||
| 90 | /** \relates AirflowNetworkSimpleOpening*/ | ||
| 91 | using OptionalAirflowNetworkSimpleOpening = boost::optional<AirflowNetworkSimpleOpening>; | ||
| 92 | |||
| 93 | /** \relates AirflowNetworkSimpleOpening*/ | ||
| 94 | using AirflowNetworkSimpleOpeningVector = std::vector<AirflowNetworkSimpleOpening>; | ||
| 95 | |||
| 96 | } // namespace model | ||
| 97 | } // namespace openstudio | ||
| 98 | |||
| 99 | #endif // MODEL_AIRFLOWNETWORKSIMPLEOPENING_HPP | ||
| 100 |