GCC Code Coverage Report


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

src/model/FanVariableVolume.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_FANVARIABLEVOLUME_HPP
7 #define MODEL_FANVARIABLEVOLUME_HPP
8
9 #include "ModelAPI.hpp"
10 #include "StraightComponent.hpp"
11
12 namespace openstudio {
13
14 namespace model {
15
16 class AirflowNetworkFan;
17 class FanSystemModel;
18 class Schedule;
19
20 namespace detail {
21
22 class FanVariableVolume_Impl;
23
24 } // namespace detail
25
26 /** FanVariableVolume is a StraightComponent that wraps the OpenStudio IDD object
27 * 'OS:Fan:VariableVolume'. */
28 class MODEL_API FanVariableVolume : public StraightComponent
29 {
30 public:
31 /** @name Constructors and Destructors */
32 //@{
33
34 FanVariableVolume(const Model& model, Schedule& schedule);
35
36 FanVariableVolume(const Model& model);
37
38 122 virtual ~FanVariableVolume() override = default;
39 // Default the copy and move operators because the virtual dtor is explicit
40 2 FanVariableVolume(const FanVariableVolume& other) = default;
41 34 FanVariableVolume(FanVariableVolume&& other) = default;
42 ✗ FanVariableVolume& operator=(const FanVariableVolume&) = default;
43 ✗ FanVariableVolume& operator=(FanVariableVolume&&) = default;
44
45 //@}
46
47 static IddObjectType iddObjectType();
48
49 static std::vector<std::string> fanPowerMinimumFlowRateInputMethodValues();
50
51 /** \deprecated */
52 static std::vector<std::string> validFanPowerMinimumFlowRateInputMethodValues();
53
54 /** @name Getters */
55 //@{
56
57 Schedule availabilitySchedule() const;
58
59 double fanTotalEfficiency() const;
60 double fanEfficiency() const;
61
62 bool isFanTotalEfficiencyDefaulted() const;
63 bool isFanEfficiencyDefaulted() const;
64
65 double pressureRise() const;
66
67 boost::optional<double> maximumFlowRate() const;
68
69 bool isMaximumFlowRateAutosized() const;
70
71 std::string fanPowerMinimumFlowRateInputMethod() const;
72
73 bool isFanPowerMinimumFlowRateInputMethodDefaulted() const;
74
75 double fanPowerMinimumFlowFraction() const;
76
77 bool isFanPowerMinimumFlowFractionDefaulted() const;
78
79 boost::optional<double> fanPowerMinimumAirFlowRate() const;
80
81 double motorEfficiency() const;
82
83 bool isMotorEfficiencyDefaulted() const;
84
85 double motorInAirstreamFraction() const;
86
87 bool isMotorInAirstreamFractionDefaulted() const;
88
89 boost::optional<double> fanPowerCoefficient1() const;
90
91 boost::optional<double> fanPowerCoefficient2() const;
92
93 boost::optional<double> fanPowerCoefficient3() const;
94
95 boost::optional<double> fanPowerCoefficient4() const;
96
97 boost::optional<double> fanPowerCoefficient5() const;
98
99 std::string endUseSubcategory() const;
100
101 bool isEndUseSubcategoryDefaulted() const;
102
103 //@}
104 /** @name Setters */
105 //@{
106
107 bool setAvailabilitySchedule(Schedule& schedule);
108
109 bool setFanTotalEfficiency(double fanTotalEfficiency);
110 void resetFanTotalEfficiency();
111
112 bool setFanEfficiency(double fanTotalEfficiency);
113 void resetFanEfficiency();
114
115 bool setPressureRise(double pressureRise);
116
117 bool setMaximumFlowRate(double maximumFlowRate);
118
119 void resetMaximumFlowRate();
120
121 void autosizeMaximumFlowRate();
122
123 bool setFanPowerMinimumFlowRateInputMethod(const std::string& fanPowerMinimumFlowRateInputMethod);
124
125 void resetFanPowerMinimumFlowRateInputMethod();
126
127 bool setFanPowerMinimumFlowFraction(double fanPowerMinimumFlowFraction);
128
129 void resetFanPowerMinimumFlowFraction();
130
131 bool setFanPowerMinimumAirFlowRate(double fanPowerMinimumAirFlowRate);
132
133 void resetFanPowerMinimumAirFlowRate();
134
135 bool setMotorEfficiency(double motorEfficiency);
136
137 void resetMotorEfficiency();
138
139 bool setMotorInAirstreamFraction(double motorInAirstreamFraction);
140
141 void resetMotorInAirstreamFraction();
142
143 bool setFanPowerCoefficient1(double fanPowerCoefficient1);
144
145 void resetFanPowerCoefficient1();
146
147 bool setFanPowerCoefficient2(double fanPowerCoefficient2);
148
149 void resetFanPowerCoefficient2();
150
151 bool setFanPowerCoefficient3(double fanPowerCoefficient3);
152
153 void resetFanPowerCoefficient3();
154
155 bool setFanPowerCoefficient4(double fanPowerCoefficient4);
156
157 void resetFanPowerCoefficient4();
158
159 bool setFanPowerCoefficient5(double fanPowerCoefficient5);
160
161 void resetFanPowerCoefficient5();
162
163 bool setEndUseSubcategory(const std::string& endUseSubcategory);
164
165 void resetEndUseSubcategory();
166
167 //@}
168 /** @name Other */
169 //@{
170
171 AirflowNetworkFan getAirflowNetworkFan();
172 boost::optional<AirflowNetworkFan> airflowNetworkFan() const;
173
174 boost::optional<double> autosizedMaximumFlowRate() const;
175
176 // Convenience function to turn this FanVariableVolume to an equivalent FanSystemModel
177 FanSystemModel convertToFanSystemModel() const;
178
179 //@}
180 protected:
181 /// @cond
182 using ImplType = detail::FanVariableVolume_Impl;
183
184 friend class detail::FanVariableVolume_Impl;
185
186 friend class Model;
187
188 friend class openstudio::IdfObject;
189
190 explicit FanVariableVolume(std::shared_ptr<detail::FanVariableVolume_Impl> impl);
191
192 /// @endcond
193 private:
194 − REGISTER_LOGGER("openstudio.model.FanVariableVolume");
195 };
196
197 /** \relates FanVariableVolume*/
198 using OptionalFanVariableVolume = boost::optional<FanVariableVolume>;
199
200 /** \relates FanVariableVolume*/
201 using FanVariableVolumeVector = std::vector<FanVariableVolume>;
202
203 } // namespace model
204
205 } // namespace openstudio
206
207 #endif // MODEL_FANVARIABLEVOLUME_HPP
208