GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 60.0% 3 / 0 / 5
Functions: 60.0% 3 / 0 / 5
Branches: -% 0 / 0 / 0

src/model/HeatPumpAirToWater.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_HEATPUMPAIRTOWATER_HPP
7 #define MODEL_HEATPUMPAIRTOWATER_HPP
8
9 #include "ModelAPI.hpp"
10 #include "StraightComponent.hpp"
11
12 namespace openstudio {
13
14 namespace model {
15
16 class Schedule;
17 class Curve;
18 class HeatPumpAirToWaterHeating;
19 class HeatPumpAirToWaterCooling;
20 class PlantLoop;
21
22 namespace detail {
23
24 class HeatPumpAirToWater_Impl;
25
26 } // namespace detail
27
28 /** HeatPumpAirToWater is a StraightComponent that wraps the OpenStudio IDD object 'OS:HeatPump:AirToWater'. */
29 class MODEL_API HeatPumpAirToWater : public StraightComponent
30 {
31 public:
32 /** @name Constructors and Destructors */
33 //@{
34
35 explicit HeatPumpAirToWater(const Model& model);
36
37 172 virtual ~HeatPumpAirToWater() = default;
38 // Default the copy and move operators because the virtual dtor is explicit
39 40 HeatPumpAirToWater(const HeatPumpAirToWater& other) = default;
40 57 HeatPumpAirToWater(HeatPumpAirToWater&& other) = default;
41 ✗ HeatPumpAirToWater& operator=(const HeatPumpAirToWater&) = default;
42 ✗ HeatPumpAirToWater& operator=(HeatPumpAirToWater&&) = default;
43
44 //@}
45
46 static IddObjectType iddObjectType();
47
48 static std::vector<std::string> operatingModeControlMethodValues();
49
50 static std::vector<std::string> operatingModeControlOptionforMultipleUnitValues();
51
52 static std::vector<std::string> heatPumpDefrostControlValues();
53
54 static std::vector<std::string> controlTypeValues();
55
56 /** @name Getters */
57 //@{
58
59 std::string operatingModeControlMethod() const;
60
61 std::string operatingModeControlOptionforMultipleUnit() const;
62
63 boost::optional<Schedule> operatingModeControlSchedule() const;
64
65 double minimumPartLoadRatio() const;
66
67 boost::optional<std::string> airInletNodeName() const;
68
69 boost::optional<std::string> airOutletNodeName() const;
70
71 double maximumOutdoorDryBulbTemperatureForDefrostOperation() const;
72
73 std::string heatPumpDefrostControl() const;
74
75 double heatPumpDefrostTimePeriodFraction() const;
76
77 double resistiveDefrostHeaterCapacity() const;
78
79 boost::optional<Curve> defrostEnergyInputRatioFunctionofTemperatureCurve() const;
80
81 int heatPumpMultiplier() const;
82
83 std::string controlType() const;
84
85 double crankcaseHeaterCapacity() const;
86
87 boost::optional<Curve> crankcaseHeaterCapacityFunctionofTemperatureCurve() const;
88
89 double maximumAmbientTemperatureforCrankcaseHeaterOperation() const;
90
91 boost::optional<HeatPumpAirToWaterHeating> heatingOperationMode() const;
92
93 boost::optional<HeatPumpAirToWaterCooling> coolingOperationMode() const;
94
95 //@}
96 /** @name Setters */
97 //@{
98
99 bool setOperatingModeControlMethod(const std::string& operatingModeControlMethod);
100
101 bool setOperatingModeControlOptionforMultipleUnit(const std::string& operatingModeControlOptionforMultipleUnit);
102
103 bool setOperatingModeControlSchedule(Schedule& operatingModeControlSchedule);
104
105 void resetOperatingModeControlSchedule();
106
107 bool setMinimumPartLoadRatio(double minimumPartLoadRatio);
108
109 bool setAirInletNodeName(const std::string& airInletNodeName);
110
111 void resetAirInletNodeName();
112
113 bool setAirOutletNodeName(const std::string& airOutletNodeName);
114
115 void resetAirOutletNodeName();
116
117 bool setMaximumOutdoorDryBulbTemperatureForDefrostOperation(double maximumOutdoorDryBulbTemperatureForDefrostOperation);
118
119 bool setHeatPumpDefrostControl(const std::string& heatPumpDefrostControl);
120
121 bool setHeatPumpDefrostTimePeriodFraction(double heatPumpDefrostTimePeriodFraction);
122
123 bool setResistiveDefrostHeaterCapacity(double resistiveDefrostHeaterCapacity);
124
125 bool setDefrostEnergyInputRatioFunctionofTemperatureCurve(const Curve& defrostEnergyInputRatioFunctionofTemperatureCurve);
126
127 void resetDefrostEnergyInputRatioFunctionofTemperatureCurve();
128
129 bool setHeatPumpMultiplier(int heatPumpMultiplier);
130
131 bool setControlType(const std::string& controlType);
132
133 bool setCrankcaseHeaterCapacity(double crankcaseHeaterCapacity);
134
135 bool setCrankcaseHeaterCapacityFunctionofTemperatureCurve(const Curve& crankcaseHeaterCapacityFunctionofTemperatureCurve);
136
137 void resetCrankcaseHeaterCapacityFunctionofTemperatureCurve();
138
139 bool setMaximumAmbientTemperatureforCrankcaseHeaterOperation(double maximumAmbientTemperatureforCrankcaseHeaterOperation);
140
141 bool setHeatingOperationMode(const HeatPumpAirToWaterHeating& heatingOperationMode);
142
143 void resetHeatingOperationMode();
144
145 bool setCoolingOperationMode(const HeatPumpAirToWaterCooling& coolingOperationMode);
146
147 void resetCoolingOperationMode();
148
149 //@}
150 /** @name Other */
151 //@{
152
153 // If there is a Cooling Operation Mode attached, it will lookup the PlantLoop it is connected to
154 boost::optional<PlantLoop> coolingLoop() const;
155
156 // If there is a Heating Operation Mode attached, it will lookup the PlantLoop it is connected to
157 boost::optional<PlantLoop> heatingLoop() const;
158
159 // Autosize methods
160 boost::optional<double> autosizedRatedAirFlowRateinHeatingMode() const;
161 boost::optional<double> autosizedRatedWaterFlowRateinHeatingMode() const;
162 boost::optional<double> autosizedRatedAirFlowRateinCoolingMode() const;
163 boost::optional<double> autosizedRatedWaterFlowRateinCoolingMode() const;
164 boost::optional<double> autosizedRatedHeatingCapacity() const;
165 boost::optional<double> autosizedRatedCoolingCapacity() const;
166
167 //@}
168 protected:
169 /// @cond
170 using ImplType = detail::HeatPumpAirToWater_Impl;
171
172 explicit HeatPumpAirToWater(std::shared_ptr<detail::HeatPumpAirToWater_Impl> impl);
173
174 friend class detail::HeatPumpAirToWater_Impl;
175 friend class Model;
176 friend class IdfObject;
177 friend class openstudio::detail::IdfObject_Impl;
178 /// @endcond
179 private:
180 REGISTER_LOGGER("openstudio.model.HeatPumpAirToWater");
181 };
182
183 /** \relates HeatPumpAirToWater*/
184 using OptionalHeatPumpAirToWater = boost::optional<HeatPumpAirToWater>;
185
186 /** \relates HeatPumpAirToWater*/
187 using HeatPumpAirToWaterVector = std::vector<HeatPumpAirToWater>;
188
189 } // namespace model
190 } // namespace openstudio
191
192 #endif // MODEL_HEATPUMPAIRTOWATER_HPP
193