src/model/HeatBalanceAlgorithm.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_HEATBALANCEALGORITHM_HPP | ||
| 7 | #define MODEL_HEATBALANCEALGORITHM_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "ModelObject.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | |||
| 14 | namespace model { | ||
| 15 | |||
| 16 | namespace detail { | ||
| 17 | |||
| 18 | class HeatBalanceAlgorithm_Impl; | ||
| 19 | |||
| 20 | } // namespace detail | ||
| 21 | |||
| 22 | /** HeatBalanceAlgorithm derives from ModelObject and is an interface to the OpenStudio IDD object named "HeatBalanceAlgorithm". | ||
| 23 | * | ||
| 24 | * HeatBalanceAlgorithm is a unique object that specifies the global heat and moisture algorithms | ||
| 25 | * used across building construction calculations. HeatBalanceAlgorithm does not have a public constructor because it is a unique ModelObject. | ||
| 26 | * To get the HeatBalanceAlgorithm object for a Model or create one if it does not yet exist use model.getUniqueObject<HeatBalanceAlgorithm>(). | ||
| 27 | * To get the HeatBalanceAlgorithm object for a Model but not create one if it does not yet exist use model.getOptionalUniqueObject<HeatBalanceAlgorithm>(). | ||
| 28 | */ | ||
| 29 | class MODEL_API HeatBalanceAlgorithm : public ModelObject | ||
| 30 | { | ||
| 31 | public: | ||
| 32 | /** @name Constructors and Destructors */ | ||
| 33 | //@{ | ||
| 34 | |||
| 35 | 444 | virtual ~HeatBalanceAlgorithm() override = default; | |
| 36 | // Default the copy and move operators because the virtual dtor is explicit | ||
| 37 | ✗ | HeatBalanceAlgorithm(const HeatBalanceAlgorithm& other) = default; | |
| 38 | 71 | HeatBalanceAlgorithm(HeatBalanceAlgorithm&& other) = default; | |
| 39 | ✗ | HeatBalanceAlgorithm& operator=(const HeatBalanceAlgorithm&) = default; | |
| 40 | ✗ | HeatBalanceAlgorithm& operator=(HeatBalanceAlgorithm&&) = default; | |
| 41 | |||
| 42 | //@} | ||
| 43 | /** @name Static Methods */ | ||
| 44 | //@{ | ||
| 45 | |||
| 46 | static IddObjectType iddObjectType(); | ||
| 47 | |||
| 48 | //static std::vector<std::string> validAlgorithmValues(); TODO delete | ||
| 49 | static std::vector<std::string> algorithmValues(); | ||
| 50 | |||
| 51 | //@} | ||
| 52 | /** @name Getters */ | ||
| 53 | //@{ | ||
| 54 | |||
| 55 | std::string algorithm() const; | ||
| 56 | |||
| 57 | bool isAlgorithmDefaulted() const; | ||
| 58 | |||
| 59 | double surfaceTemperatureUpperLimit() const; | ||
| 60 | |||
| 61 | bool isSurfaceTemperatureUpperLimitDefaulted() const; | ||
| 62 | |||
| 63 | double minimumSurfaceConvectionHeatTransferCoefficientValue() const; | ||
| 64 | |||
| 65 | bool isMinimumSurfaceConvectionHeatTransferCoefficientValueDefaulted() const; | ||
| 66 | |||
| 67 | double maximumSurfaceConvectionHeatTransferCoefficientValue() const; | ||
| 68 | |||
| 69 | bool isMaximumSurfaceConvectionHeatTransferCoefficientValueDefaulted() const; | ||
| 70 | |||
| 71 | //@} | ||
| 72 | /** @name Setters */ | ||
| 73 | //@{ | ||
| 74 | |||
| 75 | bool setAlgorithm(const std::string& algorithm); | ||
| 76 | |||
| 77 | void resetAlgorithm(); | ||
| 78 | |||
| 79 | bool setSurfaceTemperatureUpperLimit(double surfaceTemperatureUpperLimit); | ||
| 80 | |||
| 81 | void resetSurfaceTemperatureUpperLimit(); | ||
| 82 | |||
| 83 | bool setMinimumSurfaceConvectionHeatTransferCoefficientValue(double minimumSurfaceConvectionHeatTransferCoefficientValue); | ||
| 84 | |||
| 85 | void resetMinimumSurfaceConvectionHeatTransferCoefficientValue(); | ||
| 86 | |||
| 87 | bool setMaximumSurfaceConvectionHeatTransferCoefficientValue(double maximumSurfaceConvectionHeatTransferCoefficientValue); | ||
| 88 | |||
| 89 | void resetMaximumSurfaceConvectionHeatTransferCoefficientValue(); | ||
| 90 | |||
| 91 | //@} | ||
| 92 | |||
| 93 | protected: | ||
| 94 | /** @name Constructors and Destructors */ | ||
| 95 | //@{ | ||
| 96 | |||
| 97 | /// Constructs a new HeatBalanceAlgorithm object in the model. | ||
| 98 | explicit HeatBalanceAlgorithm(const Model& model); | ||
| 99 | |||
| 100 | //@} | ||
| 101 | |||
| 102 | /// @cond | ||
| 103 | |||
| 104 | using ImplType = detail::HeatBalanceAlgorithm_Impl; | ||
| 105 | |||
| 106 | friend class detail::HeatBalanceAlgorithm_Impl; | ||
| 107 | friend class Model; | ||
| 108 | friend class IdfObject; | ||
| 109 | friend class openstudio::detail::IdfObject_Impl; | ||
| 110 | explicit HeatBalanceAlgorithm(Model& model); | ||
| 111 | // constructor | ||
| 112 | explicit HeatBalanceAlgorithm(std::shared_ptr<detail::HeatBalanceAlgorithm_Impl> impl); | ||
| 113 | |||
| 114 | private: | ||
| 115 | REGISTER_LOGGER("openstudio.model.HeatBalanceAlgorithm"); | ||
| 116 | |||
| 117 | /// @endcond | ||
| 118 | }; | ||
| 119 | |||
| 120 | /** \relates HeatBalanceAlgorithm*/ | ||
| 121 | using OptionalHeatBalanceAlgorithm = boost::optional<HeatBalanceAlgorithm>; | ||
| 122 | |||
| 123 | /** \relates HeatBalanceAlgorithm*/ | ||
| 124 | using HeatBalanceAlgorithmVector = std::vector<HeatBalanceAlgorithm>; | ||
| 125 | |||
| 126 | } // namespace model | ||
| 127 | } // namespace openstudio | ||
| 128 | |||
| 129 | #endif // MODEL_HEATBALANCEALGORITHM_HPP | ||
| 130 |