GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 40.0% 2 / 1 / 6
Functions: 40.0% 2 / 1 / 6
Branches: -% 0 / 1 / 1

src/model/HeatPumpPlantLoopEIRHeating.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_HEATPUMPPLANTLOOPEIRHEATING_HPP
7 #define MODEL_HEATPUMPPLANTLOOPEIRHEATING_HPP
8
9 #include "ModelAPI.hpp"
10 #include "WaterToWaterComponent.hpp"
11
12 namespace openstudio {
13
14 namespace model {
15
16 class HeatPumpPlantLoopEIRCooling;
17 class Curve;
18
19 namespace detail {
20
21 class HeatPumpPlantLoopEIRHeating_Impl;
22
23 } // namespace detail
24
25 /** HeatPumpPlantLoopEIRHeating is a WaterToWaterComponent that wraps the OpenStudio IDD object 'OS:HeatPump:PlantLoop:EIR:Heating'. */
26 class MODEL_API HeatPumpPlantLoopEIRHeating : public WaterToWaterComponent
27 {
28 public:
29 /** @name Constructors and Destructors */
30 //@{
31
32 explicit HeatPumpPlantLoopEIRHeating(const Model& model, const Curve& capacityModifierFunctionofTemperatureCurve,
33 const Curve& electricInputtoOutputRatioModifierFunctionofTemperatureCurve,
34 const Curve& electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve);
35
36 explicit HeatPumpPlantLoopEIRHeating(const Model& model);
37
38 31 virtual ~HeatPumpPlantLoopEIRHeating() override = default;
39 // Default the copy and move operators because the virtual dtor is explicit
40 ✗ HeatPumpPlantLoopEIRHeating(const HeatPumpPlantLoopEIRHeating& other) = default;
41 10 HeatPumpPlantLoopEIRHeating(HeatPumpPlantLoopEIRHeating&& other) = default;
42 ✗ HeatPumpPlantLoopEIRHeating& operator=(const HeatPumpPlantLoopEIRHeating&) = default;
43 ✗ HeatPumpPlantLoopEIRHeating& operator=(HeatPumpPlantLoopEIRHeating&&) = default;
44
45 //@}
46
47 static IddObjectType iddObjectType();
48
49 static std::vector<std::string> validCondenserTypeValues();
50
51 static std::vector<std::string> condenserTypeValues();
52
53 /** @name Getters */
54 //@{
55
56 std::string condenserType() const;
57
58 boost::optional<HeatPumpPlantLoopEIRCooling> companionCoolingHeatPump() const;
59
60 boost::optional<double> loadSideReferenceFlowRate() const;
61
62 bool isLoadSideReferenceFlowRateAutosized() const;
63
64 boost::optional<double> sourceSideReferenceFlowRate() const;
65
66 bool isSourceSideReferenceFlowRateAutosized() const;
67
68 boost::optional<double> heatRecoveryReferenceFlowRate() const;
69
70 bool isHeatRecoveryReferenceFlowRateAutosized() const;
71
72 boost::optional<double> referenceCapacity() const;
73
74 bool isReferenceCapacityAutosized() const;
75
76 double referenceCoefficientofPerformance() const;
77
78 double sizingFactor() const;
79
80 Curve capacityModifierFunctionofTemperatureCurve() const;
81
82 Curve electricInputtoOutputRatioModifierFunctionofTemperatureCurve() const;
83
84 Curve electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve() const;
85
86 double heatingToCoolingCapacitySizingRatio() const;
87
88 std::string heatPumpSizingMethod() const;
89
90 std::string controlType() const;
91
92 std::string flowMode() const;
93
94 double minimumPartLoadRatio() const;
95
96 double minimumSourceInletTemperature() const;
97
98 double maximumSourceInletTemperature() const;
99
100 boost::optional<Curve> minimumSupplyWaterTemperatureCurve() const;
101
102 boost::optional<Curve> maximumSupplyWaterTemperatureCurve() const;
103
104 boost::optional<Curve> dryOutdoorCorrectionFactorCurve() const;
105
106 double maximumOutdoorDryBulbTemperatureForDefrostOperation() const;
107
108 std::string heatPumpDefrostControl() const;
109
110 double heatPumpDefrostTimePeriodFraction() const;
111
112 boost::optional<Curve> defrostEnergyInputRatioFunctionofTemperatureCurve() const;
113
114 boost::optional<Curve> timedEmpiricalDefrostFrequencyCurve() const;
115
116 boost::optional<Curve> timedEmpiricalDefrostHeatLoadPenaltyCurve() const;
117
118 boost::optional<Curve> timedEmpiricalDefrostHeatInputEnergyFractionCurve() const;
119
120 double minimumHeatRecoveryOutletTemperature() const;
121
122 boost::optional<Curve> heatRecoveryCapacityModifierFunctionofTemperatureCurve() const;
123
124 boost::optional<Curve> heatRecoveryElectricInputtoOutputRatioModifierFunctionofTemperatureCurve() const;
125
126 //@}
127 /** @name Setters */
128 //@{
129
130 bool setCondenserType(const std::string& condenserType);
131
132 bool setCompanionCoolingHeatPump(const HeatPumpPlantLoopEIRCooling& companionHP);
133
134 bool setLoadSideReferenceFlowRate(double loadSideReferenceFlowRate);
135
136 void autosizeLoadSideReferenceFlowRate();
137
138 bool setSourceSideReferenceFlowRate(double sourceSideReferenceFlowRate);
139
140 void autosizeSourceSideReferenceFlowRate();
141
142 bool setHeatRecoveryReferenceFlowRate(double heatRecoveryReferenceFlowRate);
143
144 void autosizeHeatRecoveryReferenceFlowRate();
145
146 bool setReferenceCapacity(double referenceCapacity);
147
148 void autosizeReferenceCapacity();
149
150 bool setReferenceCoefficientofPerformance(double referenceCoefficientofPerformance);
151
152 bool setSizingFactor(double sizingFactor);
153
154 bool setCapacityModifierFunctionofTemperatureCurve(const Curve& capacityModifierFunctionofTemperatureCurve);
155
156 bool setElectricInputtoOutputRatioModifierFunctionofTemperatureCurve(const Curve& electricInputtoOutputRatioModifierFunctionofTemperatureCurve);
157
158 bool
159 setElectricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve(const Curve& electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve);
160
161 bool setHeatingToCoolingCapacitySizingRatio(double heatingToCoolingCapacitySizingRatio);
162
163 bool setHeatPumpSizingMethod(const std::string& heatPumpSizingMethod);
164
165 bool setControlType(const std::string& controlType);
166
167 bool setFlowMode(const std::string& flowMode);
168
169 bool setMinimumPartLoadRatio(double minimumPartLoadRatio);
170
171 bool setMinimumSourceInletTemperature(double minimumSourceInletTemperature);
172
173 bool setMaximumSourceInletTemperature(double maximumSourceInletTemperature);
174
175 bool setMinimumSupplyWaterTemperatureCurve(const Curve& minimumSupplyWaterTemperatureCurve);
176
177 void resetMinimumSupplyWaterTemperatureCurve();
178
179 bool setMaximumSupplyWaterTemperatureCurve(const Curve& maximumSupplyWaterTemperatureCurve);
180
181 void resetMaximumSupplyWaterTemperatureCurve();
182
183 bool setDryOutdoorCorrectionFactorCurve(const Curve& dryOutdoorCorrectionFactorCurve);
184
185 void resetDryOutdoorCorrectionFactorCurve();
186
187 bool setMaximumOutdoorDryBulbTemperatureForDefrostOperation(double maximumOutdoorDryBulbTemperatureForDefrostOperation);
188
189 bool setHeatPumpDefrostControl(const std::string& heatPumpDefrostControl);
190
191 bool setHeatPumpDefrostTimePeriodFraction(double heatPumpDefrostTimePeriodFraction);
192
193 bool setDefrostEnergyInputRatioFunctionofTemperatureCurve(const Curve& defrostEnergyInputRatioFunctionofTemperatureCurve);
194
195 void resetDefrostEnergyInputRatioFunctionofTemperatureCurve();
196
197 bool setTimedEmpiricalDefrostFrequencyCurve(const Curve& timedEmpiricalDefrostFrequencyCurve);
198
199 void resetTimedEmpiricalDefrostFrequencyCurve();
200
201 bool setTimedEmpiricalDefrostHeatLoadPenaltyCurve(const Curve& timedEmpiricalDefrostHeatLoadPenaltyCurve);
202
203 void resetTimedEmpiricalDefrostHeatLoadPenaltyCurve();
204
205 bool setTimedEmpiricalDefrostHeatInputEnergyFractionCurve(const Curve& timedEmpiricalDefrostHeatInputEnergyFractionCurve);
206
207 void resetTimedEmpiricalDefrostHeatInputEnergyFractionCurve();
208
209 bool setMinimumHeatRecoveryOutletTemperature(double minimumHeatRecoveryOutletTemperature);
210
211 bool setHeatRecoveryCapacityModifierFunctionofTemperatureCurve(const Curve& heatRecoveryCapacityModifierFunctionofTemperatureCurve);
212
213 void resetHeatRecoveryCapacityModifierFunctionofTemperatureCurve();
214
215 bool setHeatRecoveryElectricInputtoOutputRatioModifierFunctionofTemperatureCurve(
216 const Curve& heatRecoveryElectricInputtoOutputRatioModifierFunctionofTemperatureCurve);
217
218 void resetHeatRecoveryElectricInputtoOutputRatioModifierFunctionofTemperatureCurve();
219
220 //@}
221 /** @name Other */
222 //@{
223
224 boost::optional<double> autosizedLoadSideReferenceFlowRate() const;
225
226 boost::optional<double> autosizedSourceSideReferenceFlowRate() const;
227
228 boost::optional<double> autosizedHeatRecoveryReferenceFlowRate() const;
229
230 boost::optional<double> autosizedReferenceCapacity() const;
231
232 /** Convenience Function to return the Load Side Water Loop (HeatPump on supply side) **/
233 boost::optional<PlantLoop> loadSideWaterLoop() const;
234
235 /** Convenience Function to return the Source Side (Condenser) Water Loop (HeatPump on demand side) **/
236 boost::optional<PlantLoop> sourceSideWaterLoop() const;
237
238 /** Convenience Function to return the Heat Recovery Loop (HeatPump on demand side - tertiary) **/
239 boost::optional<PlantLoop> heatRecoveryLoop() const;
240
241 // Convenience function to return the inletNode on the Source Side
242 boost::optional<Node> sourceSideWaterInletNode() const;
243 // Convenience function to return the outletNode on the Source Side
244 boost::optional<Node> sourceSideWaterOutletNode() const;
245
246 // Convenience function to return the inletNode on the Load Side
247 boost::optional<Node> loadSideWaterInletNode() const;
248 // Convenience function to return the outletNode on the Load Side
249 boost::optional<Node> loadSideWaterOutletNode() const;
250
251 // Convenience function to return the inletNode on the Heat Recovery
252 boost::optional<Node> heatRecoveryInletNode() const;
253 // Convenience function to return the outletNode on the Heat Recovery
254 boost::optional<Node> heatRecoveryOutletNode() const;
255
256 //@}
257 protected:
258 /// @cond
259 using ImplType = detail::HeatPumpPlantLoopEIRHeating_Impl;
260
261 explicit HeatPumpPlantLoopEIRHeating(std::shared_ptr<detail::HeatPumpPlantLoopEIRHeating_Impl> impl);
262
263 friend class detail::HeatPumpPlantLoopEIRHeating_Impl;
264 friend class Model;
265 friend class IdfObject;
266 friend class openstudio::detail::IdfObject_Impl;
267 /// @endcond
268 private:
269 − REGISTER_LOGGER("openstudio.model.HeatPumpPlantLoopEIRHeating");
270 };
271
272 /** \relates HeatPumpPlantLoopEIRHeating*/
273 using OptionalHeatPumpPlantLoopEIRHeating = boost::optional<HeatPumpPlantLoopEIRHeating>;
274
275 /** \relates HeatPumpPlantLoopEIRHeating*/
276 using HeatPumpPlantLoopEIRHeatingVector = std::vector<HeatPumpPlantLoopEIRHeating>;
277
278 } // namespace model
279 } // namespace openstudio
280
281 #endif // MODEL_HEATPUMPPLANTLOOPEIRHEATING_HPP
282