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/FanComponentModel.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_FANCOMPONENTMODEL_HPP
7 #define MODEL_FANCOMPONENTMODEL_HPP
8
9 #include <model/ModelAPI.hpp>
10 #include "StraightComponent.hpp"
11
12 namespace openstudio {
13
14 namespace model {
15
16 class Curve;
17 class Schedule;
18 class AirflowNetworkFan;
19
20 namespace detail {
21
22 class FanComponentModel_Impl;
23
24 } // namespace detail
25
26 /** FanComponentModel is a StraightComponent that wraps the OpenStudio IDD object 'OS:Fan:ComponentModel'. */
27 class MODEL_API FanComponentModel : public StraightComponent
28 {
29 public:
30 /** @name Constructors and Destructors */
31 //@{
32
33 // Constructor that will instantiate all required curves. It will **not** instantiate the optional curve objects.
34 // You can then call the helper method `bool assignDefaultOptionalCurves()` if that is what you want
35 explicit FanComponentModel(const Model& model);
36
37 // Explicit constructor that takes in all required curves. It will **not** instantiate the optional curve objects.
38 // You can then call the helper method `bool assignDefaultOptionalCurves()` if that is what you want
39 explicit FanComponentModel(const Model& model, const Curve& fanPressureRiseCurve, const Curve& ductStaticPressureResetCurve,
40 const Curve& normalizedFanStaticEfficiencyCurveNonStallRegion,
41 const Curve& normalizedFanStaticEfficiencyCurveStallRegion,
42 const Curve& normalizedDimensionlessAirflowCurveNonStallRegion,
43 const Curve& normalizedDimensionlessAirflowCurveStallRegion);
44
45 31 virtual ~FanComponentModel() override = default;
46 // Default the copy and move operators because the virtual dtor is explicit
47 3 FanComponentModel(const FanComponentModel& other) = default;
48 6 FanComponentModel(FanComponentModel&& other) = default;
49 ✗ FanComponentModel& operator=(const FanComponentModel&) = default;
50 ✗ FanComponentModel& operator=(FanComponentModel&&) = default;
51
52 //@}
53
54 static IddObjectType iddObjectType();
55
56 static std::vector<std::string> vFDEfficiencyTypeValues();
57
58 /** @name Getters */
59 //@{
60
61 Schedule availabilitySchedule() const;
62
63 boost::optional<double> maximumFlowRate() const;
64
65 bool isMaximumFlowRateAutosized() const;
66
67 boost::optional<double> minimumFlowRate() const;
68
69 bool isMinimumFlowRateAutosized() const;
70
71 double fanSizingFactor() const;
72
73 double fanWheelDiameter() const;
74
75 double fanOutletArea() const;
76
77 double maximumFanStaticEfficiency() const;
78
79 double eulerNumberatMaximumFanStaticEfficiency() const;
80
81 double maximumDimensionlessFanAirflow() const;
82
83 boost::optional<double> motorFanPulleyRatio() const;
84
85 bool isMotorFanPulleyRatioAutosized() const;
86
87 boost::optional<double> beltMaximumTorque() const;
88
89 bool isBeltMaximumTorqueAutosized() const;
90
91 double beltSizingFactor() const;
92
93 double beltFractionalTorqueTransition() const;
94
95 double motorMaximumSpeed() const;
96
97 boost::optional<double> maximumMotorOutputPower() const;
98
99 bool isMaximumMotorOutputPowerAutosized() const;
100
101 double motorSizingFactor() const;
102
103 double motorInAirstreamFraction() const;
104
105 std::string vFDEfficiencyType() const;
106
107 boost::optional<double> maximumVFDOutputPower() const;
108
109 bool isMaximumVFDOutputPowerAutosized() const;
110
111 double vFDSizingFactor() const;
112
113 Curve fanPressureRiseCurve() const;
114
115 Curve ductStaticPressureResetCurve() const;
116
117 Curve normalizedFanStaticEfficiencyCurveNonStallRegion() const;
118
119 Curve normalizedFanStaticEfficiencyCurveStallRegion() const;
120
121 Curve normalizedDimensionlessAirflowCurveNonStallRegion() const;
122
123 Curve normalizedDimensionlessAirflowCurveStallRegion() const;
124
125 boost::optional<Curve> maximumBeltEfficiencyCurve() const;
126
127 boost::optional<Curve> normalizedBeltEfficiencyCurveRegion1() const;
128
129 boost::optional<Curve> normalizedBeltEfficiencyCurveRegion2() const;
130
131 boost::optional<Curve> normalizedBeltEfficiencyCurveRegion3() const;
132
133 boost::optional<Curve> maximumMotorEfficiencyCurve() const;
134
135 boost::optional<Curve> normalizedMotorEfficiencyCurve() const;
136
137 boost::optional<Curve> vFDEfficiencyCurve() const;
138
139 std::string endUseSubcategory() const;
140
141 //@}
142 /** @name Setters */
143 //@{
144
145 bool setAvailabilitySchedule(Schedule& schedule);
146
147 bool setMaximumFlowRate(double maximumFlowRate);
148
149 void autosizeMaximumFlowRate();
150
151 bool setMinimumFlowRate(double minimumFlowRate);
152
153 void autosizeMinimumFlowRate();
154
155 bool setFanSizingFactor(double fanSizingFactor);
156
157 bool setFanWheelDiameter(double fanWheelDiameter);
158
159 bool setFanOutletArea(double fanOutletArea);
160
161 bool setMaximumFanStaticEfficiency(double maximumFanStaticEfficiency);
162
163 bool setEulerNumberatMaximumFanStaticEfficiency(double eulerNumberatMaximumFanStaticEfficiency);
164
165 bool setMaximumDimensionlessFanAirflow(double maximumDimensionlessFanAirflow);
166
167 bool setMotorFanPulleyRatio(double motorFanPulleyRatio);
168
169 void autosizeMotorFanPulleyRatio();
170
171 bool setBeltMaximumTorque(double beltMaximumTorque);
172
173 void autosizeBeltMaximumTorque();
174
175 bool setBeltSizingFactor(double beltSizingFactor);
176
177 bool setBeltFractionalTorqueTransition(double beltFractionalTorqueTransition);
178
179 bool setMotorMaximumSpeed(double motorMaximumSpeed);
180
181 bool setMaximumMotorOutputPower(double maximumMotorOutputPower);
182
183 void autosizeMaximumMotorOutputPower();
184
185 bool setMotorSizingFactor(double motorSizingFactor);
186
187 bool setMotorInAirstreamFraction(double motorInAirstreamFraction);
188
189 bool setVFDEfficiencyType(const std::string& vFDEfficiencyType);
190
191 bool setMaximumVFDOutputPower(double maximumVFDOutputPower);
192
193 void autosizeMaximumVFDOutputPower();
194
195 bool setVFDSizingFactor(double vFDSizingFactor);
196
197 bool setFanPressureRiseCurve(const Curve& bivariateFunctions);
198
199 bool setDuctStaticPressureResetCurve(const Curve& univariateFunctions);
200
201 bool setNormalizedFanStaticEfficiencyCurveNonStallRegion(const Curve& univariateFunctions);
202
203 bool setNormalizedFanStaticEfficiencyCurveStallRegion(const Curve& univariateFunctions);
204
205 bool setNormalizedDimensionlessAirflowCurveNonStallRegion(const Curve& univariateFunctions);
206
207 bool setNormalizedDimensionlessAirflowCurveStallRegion(const Curve& univariateFunctions);
208
209 bool setMaximumBeltEfficiencyCurve(const Curve& univariateFunctions);
210
211 void resetMaximumBeltEfficiencyCurve();
212
213 bool setNormalizedBeltEfficiencyCurveRegion1(const Curve& univariateFunctions);
214
215 void resetNormalizedBeltEfficiencyCurveRegion1();
216
217 bool setNormalizedBeltEfficiencyCurveRegion2(const Curve& univariateFunctions);
218
219 void resetNormalizedBeltEfficiencyCurveRegion2();
220
221 bool setNormalizedBeltEfficiencyCurveRegion3(const Curve& univariateFunctions);
222
223 void resetNormalizedBeltEfficiencyCurveRegion3();
224
225 bool setMaximumMotorEfficiencyCurve(const Curve& univariateFunctions);
226
227 void resetMaximumMotorEfficiencyCurve();
228
229 bool setNormalizedMotorEfficiencyCurve(const Curve& univariateFunctions);
230
231 void resetNormalizedMotorEfficiencyCurve();
232
233 bool setVFDEfficiencyCurve(const Curve& univariateFunctions);
234
235 void resetVFDEfficiencyCurve();
236
237 bool setEndUseSubcategory(const std::string& endUseSubcategory);
238
239 //@}
240 /** @name Other */
241 //@{
242
243 // Helper that creates defaulted Optional Curves
244 bool assignDefaultOptionalCurves();
245
246 boost::optional<double> autosizedMaximumFlowRate();
247 boost::optional<double> autosizedMinimumFlowRate();
248 boost::optional<double> autosizedMotorFanPulleyRatio();
249 boost::optional<double> autosizedBeltMaximumTorque();
250 boost::optional<double> autosizedMaximumMotorOutputPower();
251 boost::optional<double> autosizedMaximumVFDOutputPower();
252
253 //@}
254 protected:
255 /// @cond
256 using ImplType = detail::FanComponentModel_Impl;
257
258 explicit FanComponentModel(std::shared_ptr<detail::FanComponentModel_Impl> impl);
259
260 friend class detail::FanComponentModel_Impl;
261 friend class Model;
262 friend class IdfObject;
263 friend class openstudio::detail::IdfObject_Impl;
264 /// @endcond
265 private:
266 REGISTER_LOGGER("openstudio.model.FanComponentModel");
267 };
268
269 /** \relates FanComponentModel*/
270 using OptionalFanComponentModel = boost::optional<FanComponentModel>;
271
272 /** \relates FanComponentModel*/
273 using FanComponentModelVector = std::vector<FanComponentModel>;
274
275 } // namespace model
276 } // namespace openstudio
277
278 #endif // MODEL_FANCOMPONENTMODEL_HPP
279