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