src/model/RefrigerationCompressor.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_REFRIGERATIONCOMPRESSOR_HPP | ||
| 7 | #define MODEL_REFRIGERATIONCOMPRESSOR_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "ParentObject.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | |||
| 14 | namespace model { | ||
| 15 | |||
| 16 | class RefrigerationSystem; | ||
| 17 | class CurveBicubic; | ||
| 18 | |||
| 19 | namespace detail { | ||
| 20 | |||
| 21 | class RefrigerationCompressor_Impl; | ||
| 22 | |||
| 23 | } // namespace detail | ||
| 24 | |||
| 25 | /** RefrigerationCompressor is a ParentObject that wraps the OpenStudio IDD object 'OS:Refrigeration:Compressor'. */ | ||
| 26 | class MODEL_API RefrigerationCompressor : public ParentObject | ||
| 27 | { | ||
| 28 | public: | ||
| 29 | /** @name Constructors and Destructors */ | ||
| 30 | //@{ | ||
| 31 | |||
| 32 | explicit RefrigerationCompressor(const Model& model); | ||
| 33 | |||
| 34 | 293 | virtual ~RefrigerationCompressor() override = default; | |
| 35 | // Default the copy and move operators because the virtual dtor is explicit | ||
| 36 | 42 | RefrigerationCompressor(const RefrigerationCompressor& other) = default; | |
| 37 | 81 | RefrigerationCompressor(RefrigerationCompressor&& other) = default; | |
| 38 | ✗ | RefrigerationCompressor& operator=(const RefrigerationCompressor&) = default; | |
| 39 | 1 | RefrigerationCompressor& operator=(RefrigerationCompressor&&) = default; | |
| 40 | |||
| 41 | //@} | ||
| 42 | |||
| 43 | static IddObjectType iddObjectType(); | ||
| 44 | |||
| 45 | static std::vector<std::string> modeofOperationValues(); | ||
| 46 | |||
| 47 | /** @name Getters */ | ||
| 48 | //@{ | ||
| 49 | |||
| 50 | CurveBicubic refrigerationCompressorPowerCurve() const; | ||
| 51 | |||
| 52 | CurveBicubic refrigerationCompressorCapacityCurve() const; | ||
| 53 | |||
| 54 | boost::optional<double> ratedSuperheat() const; | ||
| 55 | |||
| 56 | boost::optional<double> ratedReturnGasTemperature() const; | ||
| 57 | |||
| 58 | boost::optional<double> ratedLiquidTemperature() const; | ||
| 59 | |||
| 60 | boost::optional<double> ratedSubcooling() const; | ||
| 61 | |||
| 62 | std::string endUseSubcategory() const; | ||
| 63 | |||
| 64 | bool isEndUseSubcategoryDefaulted() const; | ||
| 65 | |||
| 66 | std::string modeofOperation() const; | ||
| 67 | |||
| 68 | // bool isModeofOperationDefaulted() const; | ||
| 69 | |||
| 70 | boost::optional<CurveBicubic> transcriticalCompressorPowerCurve() const; | ||
| 71 | |||
| 72 | boost::optional<CurveBicubic> transcriticalCompressorCapacityCurve() const; | ||
| 73 | |||
| 74 | // Returns the parent RefrigerationSystem if any | ||
| 75 | boost::optional<RefrigerationSystem> system() const; | ||
| 76 | |||
| 77 | //@} | ||
| 78 | /** @name Setters */ | ||
| 79 | //@{ | ||
| 80 | |||
| 81 | bool setRefrigerationCompressorPowerCurve(const CurveBicubic& curveBicubic); | ||
| 82 | |||
| 83 | bool setRefrigerationCompressorCapacityCurve(const CurveBicubic& curveBicubic); | ||
| 84 | |||
| 85 | bool setRatedSuperheat(double ratedSuperheat); | ||
| 86 | |||
| 87 | void resetRatedSuperheat(); | ||
| 88 | |||
| 89 | bool setRatedReturnGasTemperature(double ratedReturnGasTemperature); | ||
| 90 | |||
| 91 | void resetRatedReturnGasTemperature(); | ||
| 92 | |||
| 93 | bool setRatedLiquidTemperature(double ratedLiquidTemperature); | ||
| 94 | |||
| 95 | void resetRatedLiquidTemperature(); | ||
| 96 | |||
| 97 | bool setRatedSubcooling(double ratedSubcooling); | ||
| 98 | |||
| 99 | void resetRatedSubcooling(); | ||
| 100 | |||
| 101 | bool setEndUseSubcategory(const std::string& endUseSubcategory); | ||
| 102 | |||
| 103 | void resetEndUseSubcategory(); | ||
| 104 | |||
| 105 | // bool setModeofOperation(const std::string& modeofOperation); | ||
| 106 | |||
| 107 | // void resetModeofOperation(); | ||
| 108 | |||
| 109 | bool setTranscriticalCompressorPowerCurve(const CurveBicubic& curveBicubic); | ||
| 110 | |||
| 111 | void resetTranscriticalCompressorPowerCurve(); | ||
| 112 | |||
| 113 | bool setTranscriticalCompressorCapacityCurve(const CurveBicubic& curveBicubic); | ||
| 114 | |||
| 115 | void resetTranscriticalCompressorCapacityCurve(); | ||
| 116 | |||
| 117 | // Remove from parentt system if any | ||
| 118 | void removeFromSystem(); | ||
| 119 | |||
| 120 | //@} | ||
| 121 | /** @name Other */ | ||
| 122 | //@{ | ||
| 123 | |||
| 124 | //@} | ||
| 125 | protected: | ||
| 126 | /// @cond | ||
| 127 | using ImplType = detail::RefrigerationCompressor_Impl; | ||
| 128 | |||
| 129 | explicit RefrigerationCompressor(std::shared_ptr<detail::RefrigerationCompressor_Impl> impl); | ||
| 130 | |||
| 131 | friend class detail::RefrigerationCompressor_Impl; | ||
| 132 | friend class Model; | ||
| 133 | friend class IdfObject; | ||
| 134 | friend class openstudio::detail::IdfObject_Impl; | ||
| 135 | /// @endcond | ||
| 136 | private: | ||
| 137 | REGISTER_LOGGER("openstudio.model.RefrigerationCompressor"); | ||
| 138 | }; | ||
| 139 | |||
| 140 | /** \relates RefrigerationCompressor*/ | ||
| 141 | using OptionalRefrigerationCompressor = boost::optional<RefrigerationCompressor>; | ||
| 142 | |||
| 143 | /** \relates RefrigerationCompressor*/ | ||
| 144 | using RefrigerationCompressorVector = std::vector<RefrigerationCompressor>; | ||
| 145 | |||
| 146 | } // namespace model | ||
| 147 | } // namespace openstudio | ||
| 148 | |||
| 149 | #endif // MODEL_REFRIGERATIONCOMPRESSOR_HPP | ||
| 150 |