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/ChillerAbsorptionIndirect_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_CHILLERABSORPTIONINDIRECT_IMPL_HPP
7 #define MODEL_CHILLERABSORPTIONINDIRECT_IMPL_HPP
8
9 #include "ModelAPI.hpp"
10 #include "WaterToWaterComponent_Impl.hpp"
11
12 namespace openstudio {
13
14 namespace model {
15
16 class Curve;
17
18 namespace detail {
19
20 /** ChillerAbsorptionIndirect_Impl is a WaterToWaterComponent_Impl that is the implementation class for ChillerAbsorptionIndirect.*/
21 class MODEL_API ChillerAbsorptionIndirect_Impl : public WaterToWaterComponent_Impl
22 {
23 public:
24 /** @name Constructors and Destructors */
25 //@{
26
27 ChillerAbsorptionIndirect_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
28
29 ChillerAbsorptionIndirect_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
30
31 ChillerAbsorptionIndirect_Impl(const ChillerAbsorptionIndirect_Impl& other, Model_Impl* model, bool keepHandle);
32
33 3 virtual ~ChillerAbsorptionIndirect_Impl() override = default;
34
35 //@}
36 /** @name Virtual Methods */
37 //@{
38
39 virtual const std::vector<std::string>& outputVariableNames() const override;
40
41 virtual IddObjectType iddObjectType() const override;
42
43 // chilledWaterLoop
44 virtual unsigned supplyInletPort() const override;
45 virtual unsigned supplyOutletPort() const override;
46
47 // condenserWaterLoop
48 virtual unsigned demandInletPort() const override;
49 virtual unsigned demandOutletPort() const override;
50
51 //generatorLoop
52 virtual unsigned tertiaryInletPort() const override;
53 virtual unsigned tertiaryOutletPort() const override;
54
55 /* This function will perform a check if trying to add it to a node that is on the demand side of a plant loop.
56 * If:
57 * - the node is on the demand side of a loop
58 * - the node isn't on the current condenser water loop itself
59 * - the chiller doesn't already have a generator (tertiary) loop,
60 * then it tries to add it to the Tertiary loop.
61 * In all other cases, it will call the base class' method WaterToWaterComponent_Impl::addToNode()
62 */
63 virtual bool addToNode(Node& node) override;
64
65 /* Restricts addToTertiaryNode to a node that is on the supply side of a plant loop (tertiary = generator (heating) Loop)
66 * Will also set the Generator Heat Source Type to 'HotWater' */
67 virtual bool addToTertiaryNode(Node& node) override;
68
69 /** Override to switch the Generator Heat Source Type to 'Steam' **/
70 virtual bool removeFromTertiaryPlantLoop() override;
71
72 virtual std::vector<ModelObject> children() const override;
73
74 virtual ModelObject clone(Model model) const override;
75
76 virtual void autosize() override;
77
78 virtual void applySizingValues() override;
79
80 virtual ComponentType componentType() const override;
81 virtual std::vector<FuelType> coolingFuelTypes() const override;
82 virtual std::vector<FuelType> heatingFuelTypes() const override;
83 virtual std::vector<AppGFuelType> appGHeatingFuelTypes() const override;
84
85 //@}
86 /** @name Getters */
87 //@{
88
89 boost::optional<double> nominalCapacity() const;
90
91 bool isNominalCapacityAutosized() const;
92
93 boost::optional<double> nominalPumpingPower() const;
94
95 bool isNominalPumpingPowerAutosized() const;
96
97 double minimumPartLoadRatio() const;
98
99 double maximumPartLoadRatio() const;
100
101 double optimumPartLoadRatio() const;
102
103 double designCondenserInletTemperature() const;
104
105 double condenserInletTemperatureLowerLimit() const;
106
107 double chilledWaterOutletTemperatureLowerLimit() const;
108
109 boost::optional<double> designChilledWaterFlowRate() const;
110
111 bool isDesignChilledWaterFlowRateAutosized() const;
112
113 boost::optional<double> designCondenserWaterFlowRate() const;
114
115 bool isDesignCondenserWaterFlowRateAutosized() const;
116
117 std::string chillerFlowMode() const;
118
119 Curve generatorHeatInputFunctionofPartLoadRatioCurve() const;
120
121 Curve pumpElectricInputFunctionofPartLoadRatioCurve() const;
122
123 Curve capacityCorrectionFunctionofCondenserTemperatureCurve() const;
124
125 Curve capacityCorrectionFunctionofChilledWaterTemperatureCurve() const;
126
127 Curve capacityCorrectionFunctionofGeneratorTemperatureCurve() const;
128
129 Curve generatorHeatInputCorrectionFunctionofCondenserTemperatureCurve() const;
130
131 Curve generatorHeatInputCorrectionFunctionofChilledWaterTemperatureCurve() const;
132
133 std::string generatorHeatSourceType() const;
134
135 boost::optional<double> designGeneratorFluidFlowRate() const;
136
137 bool isDesignGeneratorFluidFlowRateAutosized() const;
138
139 double temperatureLowerLimitGeneratorInlet() const;
140
141 double degreeofSubcoolinginSteamGenerator() const;
142
143 double degreeofSubcoolinginSteamCondensateLoop() const;
144
145 double sizingFactor() const;
146
147 //@}
148 /** @name Setters */
149 //@{
150
151 bool setNominalCapacity(boost::optional<double> nominalCapacity);
152
153 void autosizeNominalCapacity();
154
155 bool setNominalPumpingPower(boost::optional<double> nominalPumpingPower);
156
157 void autosizeNominalPumpingPower();
158
159 bool setMinimumPartLoadRatio(double minimumPartLoadRatio);
160
161 bool setMaximumPartLoadRatio(double maximumPartLoadRatio);
162
163 bool setOptimumPartLoadRatio(double optimumPartLoadRatio);
164
165 bool setDesignCondenserInletTemperature(double designCondenserInletTemperature);
166
167 bool setCondenserInletTemperatureLowerLimit(double condenserInletTemperatureLowerLimit);
168
169 bool setChilledWaterOutletTemperatureLowerLimit(double chilledWaterOutletTemperatureLowerLimit);
170
171 bool setDesignChilledWaterFlowRate(boost::optional<double> designChilledWaterFlowRate);
172
173 void autosizeDesignChilledWaterFlowRate();
174
175 bool setDesignCondenserWaterFlowRate(boost::optional<double> designCondenserWaterFlowRate);
176
177 void autosizeDesignCondenserWaterFlowRate();
178
179 bool setChillerFlowMode(const std::string& chillerFlowMode);
180
181 bool setGeneratorHeatInputFunctionofPartLoadRatioCurve(const Curve& curve);
182
183 bool setPumpElectricInputFunctionofPartLoadRatioCurve(const Curve& curve);
184
185 bool setCapacityCorrectionFunctionofCondenserTemperatureCurve(const Curve& curve);
186
187 bool setCapacityCorrectionFunctionofChilledWaterTemperatureCurve(const Curve& curve);
188
189 bool setCapacityCorrectionFunctionofGeneratorTemperatureCurve(const Curve& curve);
190
191 bool setGeneratorHeatInputCorrectionFunctionofCondenserTemperatureCurve(const Curve& curve);
192
193 bool setGeneratorHeatInputCorrectionFunctionofChilledWaterTemperatureCurve(const Curve& curve);
194
195 bool setGeneratorHeatSourceType(const std::string& generatorHeatSourceType);
196
197 bool setDesignGeneratorFluidFlowRate(boost::optional<double> designGeneratorFluidFlowRate);
198
199 void autosizeDesignGeneratorFluidFlowRate();
200
201 bool setTemperatureLowerLimitGeneratorInlet(double temperatureLowerLimitGeneratorInlet);
202
203 bool setDegreeofSubcoolinginSteamGenerator(double degreeofSubcoolinginSteamGenerator);
204
205 bool setDegreeofSubcoolinginSteamCondensateLoop(double degreeofSubcoolinginSteamCondensateLoop);
206
207 bool setSizingFactor(double sizingFactor);
208
209 //@}
210 /** @name Other */
211 //@{
212
213 boost::optional<double> autosizedNominalCapacity() const;
214
215 boost::optional<double> autosizedNominalPumpingPower() const;
216
217 boost::optional<double> autosizedDesignChilledWaterFlowRate() const;
218
219 boost::optional<double> autosizedDesignCondenserWaterFlowRate() const;
220
221 boost::optional<double> autosizedDesignGeneratorFluidFlowRate() const;
222
223 /** Convenience Function to return the Chilled Water Loop (chiller on supply) **/
224 boost::optional<PlantLoop> chilledWaterLoop() const;
225
226 /** Convenience Function to return the Condenser Water Loop (chiller on demand side) **/
227 boost::optional<PlantLoop> condenserWaterLoop() const;
228
229 /** Convenience Function to return the Generator Loop (chiller on the demand side - tertiary) **/
230 boost::optional<PlantLoop> generatorLoop() const;
231
232 //@}
233 protected:
234 private:
235 − REGISTER_LOGGER("openstudio.model.ChillerAbsorptionIndirect");
236
237 boost::optional<Curve> optionalGeneratorHeatInputFunctionofPartLoadRatioCurve() const;
238 boost::optional<Curve> optionalPumpElectricInputFunctionofPartLoadRatioCurve() const;
239 boost::optional<Curve> optionalCapacityCorrectionFunctionofCondenserTemperatureCurve() const;
240 boost::optional<Curve> optionalCapacityCorrectionFunctionofChilledWaterTemperatureCurve() const;
241 boost::optional<Curve> optionalCapacityCorrectionFunctionofGeneratorTemperatureCurve() const;
242 boost::optional<Curve> optionalGeneratorHeatInputCorrectionFunctionofCondenserTemperatureCurve() const;
243 boost::optional<Curve> optionalGeneratorHeatInputCorrectionFunctionofChilledWaterTemperatureCurve() const;
244 };
245
246 } // namespace detail
247
248 } // namespace model
249 } // namespace openstudio
250
251 #endif // MODEL_CHILLERABSORPTIONINDIRECT_IMPL_HPP
252