GCC Code Coverage Report


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

src/model/HeatPumpPlantLoopEIRCooling_Impl.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_HEATPUMPPLANTLOOPEIRCOOLING_IMPL_HPP
7 #define MODEL_HEATPUMPPLANTLOOPEIRCOOLING_IMPL_HPP
8
9 #include "ModelAPI.hpp"
10 #include "WaterToWaterComponent_Impl.hpp"
11
12 namespace openstudio {
13
14 namespace model {
15
16 class HeatPumpPlantLoopEIRHeating;
17 class Curve;
18
19 namespace detail {
20
21 /** HeatPumpPlantLoopEIRCooling_Impl is a WaterToWaterComponent_Impl that is the implementation class for HeatPumpPlantLoopEIRCooling.*/
22 class MODEL_API HeatPumpPlantLoopEIRCooling_Impl : public WaterToWaterComponent_Impl
23 {
24 public:
25 /** @name Constructors and Destructors */
26 //@{
27
28 HeatPumpPlantLoopEIRCooling_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
29
30 HeatPumpPlantLoopEIRCooling_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
31
32 HeatPumpPlantLoopEIRCooling_Impl(const HeatPumpPlantLoopEIRCooling_Impl& other, Model_Impl* model, bool keepHandle);
33
34 22 virtual ~HeatPumpPlantLoopEIRCooling_Impl() override = default;
35
36 //@}
37 /** @name Virtual Methods */
38 //@{
39
40 virtual const std::vector<std::string>& outputVariableNames() const override;
41
42 virtual IddObjectType iddObjectType() const override;
43
44 virtual unsigned supplyInletPort() const override;
45
46 virtual unsigned supplyOutletPort() const override;
47
48 virtual unsigned demandInletPort() const override;
49
50 virtual unsigned demandOutletPort() const override;
51
52 virtual unsigned tertiaryInletPort() const override;
53
54 virtual unsigned tertiaryOutletPort() const override;
55
56 /* This function will call the base class' method WaterToWaterComponent_Impl::addToNode()
57 * If this is connecting to the demand side of a loop, will set the condenserType to 'WaterSource'
58 */
59 virtual bool addToNode(Node& node) override;
60
61 /* Restricts addToTertiaryNode to a node that is on the demand side of a plant loop (tertiary = Heat Recovery Loop) */
62 virtual bool addToTertiaryNode(Node& node) override;
63
64 /** Override to switch the condenser type to 'AirSource' **/
65 virtual bool removeFromSecondaryPlantLoop() override;
66
67 virtual void autosize() override;
68
69 virtual void applySizingValues() override;
70
71 virtual ComponentType componentType() const override;
72 virtual std::vector<FuelType> coolingFuelTypes() const override;
73 virtual std::vector<FuelType> heatingFuelTypes() const override;
74 virtual std::vector<AppGFuelType> appGHeatingFuelTypes() const override;
75
76 //@}
77 /** @name Getters */
78 //@{
79
80 std::string condenserType() const;
81
82 boost::optional<HeatPumpPlantLoopEIRHeating> companionHeatingHeatPump() const;
83
84 boost::optional<double> loadSideReferenceFlowRate() const;
85
86 bool isLoadSideReferenceFlowRateAutosized() const;
87
88 boost::optional<double> sourceSideReferenceFlowRate() const;
89
90 bool isSourceSideReferenceFlowRateAutosized() const;
91
92 boost::optional<double> heatRecoveryReferenceFlowRate() const;
93
94 bool isHeatRecoveryReferenceFlowRateAutosized() const;
95
96 boost::optional<double> referenceCapacity() const;
97
98 bool isReferenceCapacityAutosized() const;
99
100 double referenceCoefficientofPerformance() const;
101
102 double sizingFactor() const;
103
104 Curve capacityModifierFunctionofTemperatureCurve() const;
105
106 Curve electricInputtoOutputRatioModifierFunctionofTemperatureCurve() const;
107
108 Curve electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve() const;
109
110 std::string controlType() const;
111
112 std::string flowMode() const;
113
114 double minimumPartLoadRatio() const;
115
116 double minimumSourceInletTemperature() const;
117
118 double maximumSourceInletTemperature() const;
119
120 boost::optional<Curve> minimumSupplyWaterTemperatureCurve() const;
121
122 boost::optional<Curve> maximumSupplyWaterTemperatureCurve() const;
123
124 double maximumHeatRecoveryOutletTemperature() const;
125
126 boost::optional<Curve> heatRecoveryCapacityModifierFunctionofTemperatureCurve() const;
127
128 boost::optional<Curve> heatRecoveryElectricInputtoOutputRatioModifierFunctionofTemperatureCurve() const;
129
130 boost::optional<Curve> thermosiphonCapacityFractionCurve() const;
131
132 double thermosiphonMinimumTemperatureDifference() const;
133
134 //@}
135 /** @name Setters */
136 //@{
137
138 bool setCondenserType(const std::string& condenserType);
139
140 bool setCompanionHeatingHeatPump(const HeatPumpPlantLoopEIRHeating& companionHP);
141
142 bool setLoadSideReferenceFlowRate(double loadSideReferenceFlowRate);
143
144 void autosizeLoadSideReferenceFlowRate();
145
146 bool setSourceSideReferenceFlowRate(double sourceSideReferenceFlowRate);
147
148 void autosizeSourceSideReferenceFlowRate();
149
150 bool setHeatRecoveryReferenceFlowRate(double heatRecoveryReferenceFlowRate);
151
152 void autosizeHeatRecoveryReferenceFlowRate();
153
154 bool setReferenceCapacity(double referenceCapacity);
155
156 void autosizeReferenceCapacity();
157
158 bool setReferenceCoefficientofPerformance(double referenceCoefficientofPerformance);
159
160 bool setSizingFactor(double sizingFactor);
161
162 bool setCapacityModifierFunctionofTemperatureCurve(const Curve& capacityModifierFunctionofTemperatureCurve);
163
164 bool setElectricInputtoOutputRatioModifierFunctionofTemperatureCurve(const Curve& electricInputtoOutputRatioModifierFunctionofTemperatureCurve);
165
166 bool setElectricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve(
167 const Curve& electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve);
168
169 bool setControlType(const std::string& controlType);
170
171 bool setFlowMode(const std::string& flowMode);
172
173 bool setMinimumPartLoadRatio(double minimumPartLoadRatio);
174
175 bool setMinimumSourceInletTemperature(double minimumSourceInletTemperature);
176
177 bool setMaximumSourceInletTemperature(double maximumSourceInletTemperature);
178
179 bool setMinimumSupplyWaterTemperatureCurve(const Curve& minimumSupplyWaterTemperatureCurve);
180
181 void resetMinimumSupplyWaterTemperatureCurve();
182
183 bool setMaximumSupplyWaterTemperatureCurve(const Curve& maximumSupplyWaterTemperatureCurve);
184
185 void resetMaximumSupplyWaterTemperatureCurve();
186
187 bool setMaximumHeatRecoveryOutletTemperature(double maximumHeatRecoveryOutletTemperature);
188
189 bool setHeatRecoveryCapacityModifierFunctionofTemperatureCurve(const Curve& heatRecoveryCapacityModifierFunctionofTemperatureCurve);
190
191 void resetHeatRecoveryCapacityModifierFunctionofTemperatureCurve();
192
193 bool setHeatRecoveryElectricInputtoOutputRatioModifierFunctionofTemperatureCurve(
194 const Curve& heatRecoveryElectricInputtoOutputRatioModifierFunctionofTemperatureCurve);
195
196 void resetHeatRecoveryElectricInputtoOutputRatioModifierFunctionofTemperatureCurve();
197
198 bool setThermosiphonCapacityFractionCurve(const Curve& thermosiphonCapacityFractionCurve);
199
200 void resetThermosiphonCapacityFractionCurve();
201
202 bool setThermosiphonMinimumTemperatureDifference(double thermosiphonMinimumTemperatureDifference);
203
204 //@}
205 /** @name Other */
206 //@{
207
208 boost::optional<double> autosizedLoadSideReferenceFlowRate() const;
209
210 boost::optional<double> autosizedSourceSideReferenceFlowRate() const;
211
212 boost::optional<double> autosizedHeatRecoveryReferenceFlowRate() const;
213
214 boost::optional<double> autosizedReferenceCapacity() const;
215
216 /** Convenience Function to return the Load Side Water Loop (HeatPump on supply side) **/
217 boost::optional<PlantLoop> loadSideWaterLoop() const;
218
219 /** Convenience Function to return the Source Side (Condenser) Water Loop (HeatPump on demand side) **/
220 boost::optional<PlantLoop> sourceSideWaterLoop() const;
221
222 /** Convenience Function to return the Heat Recovery Loop (HeatPump on demand side - tertiary) **/
223 boost::optional<PlantLoop> heatRecoveryLoop() const;
224
225 // Convenience function to return the inletNode on the Source Side
226 boost::optional<Node> sourceSideWaterInletNode() const;
227 // Convenience function to return the outletNode on the Source Side
228 boost::optional<Node> sourceSideWaterOutletNode() const;
229
230 // Convenience function to return the inletNode on the Load Side
231 boost::optional<Node> loadSideWaterInletNode() const;
232 // Convenience function to return the outletNode on the Load Side
233 boost::optional<Node> loadSideWaterOutletNode() const;
234
235 // Convenience function to return the inletNode on the Heat Recovery
236 boost::optional<Node> heatRecoveryInletNode() const;
237 // Convenience function to return the outletNode on the Heat Recovery
238 boost::optional<Node> heatRecoveryOutletNode() const;
239
240 //@}
241 protected:
242 private:
243 − REGISTER_LOGGER("openstudio.model.HeatPumpPlantLoopEIRCooling");
244 };
245
246 } // namespace detail
247
248 } // namespace model
249 } // namespace openstudio
250
251 #endif // MODEL_HEATPUMPPLANTLOOPEIRCOOLING_IMPL_HPP
252