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/FanConstantVolume.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_FANCONSTANTVOLUME_HPP
7 #define MODEL_FANCONSTANTVOLUME_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ModelObject.hpp"
11 #include "StraightComponent.hpp"
12 #include "Connection.hpp"
13
14 namespace openstudio {
15 namespace model {
16
17 class Schedule;
18 class AirflowNetworkFan;
19
20 namespace detail {
21 class FanConstantVolume_Impl;
22 } // namespace detail
23
24 /** FanConstantVolume is a StraightComponent that wraps the IDD object named
25 * "OS:Fan:ConstantVolume". */
26 class MODEL_API FanConstantVolume : public StraightComponent
27 {
28 public:
29 /** @name Constructors and Destructors */
30 //@{
31
32 /** Constructs a new FanConstantVolume object and places it inside the
33 * model. The object is fully initialized with all companion objects. */
34 FanConstantVolume(const Model& model, Schedule& s);
35
36 FanConstantVolume(const Model& model);
37
38 2391 virtual ~FanConstantVolume() override = default;
39 // Default the copy and move operators because the virtual dtor is explicit
40 39 FanConstantVolume(const FanConstantVolume& other) = default;
41 956 FanConstantVolume(FanConstantVolume&& other) = default;
42 ✗ FanConstantVolume& operator=(const FanConstantVolume&) = default;
43 ✗ FanConstantVolume& operator=(FanConstantVolume&&) = default;
44
45 //@}
46
47 static IddObjectType iddObjectType();
48
49 /** @name Getters */
50 //@{
51
52 Schedule availabilitySchedule() const;
53
54 /** Returns the value of the Fan Total Efficiency field **/
55 double fanTotalEfficiency() const;
56
57 /** Returns the value of the Fan Total Efficiency field. Deprecated, forwards to fanTotalEfficiency **/
58 double fanEfficiency() const;
59
60 /** Returns the value of the PressureRise field. **/
61 double pressureRise() const;
62
63 /** Returns the value of the MotorEfficiency field. **/
64 double motorEfficiency() const;
65
66 /** Returns the value of the MotorInAirStreamFraction field. **/
67 double motorInAirstreamFraction() const;
68
69 /** Returns the value of the EndUseSubcategory field. **/
70 std::string endUseSubcategory() const;
71
72 //@}
73 /** @name Setters */
74 //@{
75
76 bool setAvailabilitySchedule(Schedule& s);
77
78 /** Sets the value of the Fan Total Efficiency field. **/
79 bool setFanTotalEfficiency(double value);
80
81 /** Sets the value of the Fan Total Efficiency field. Deprecated, forwards to setFanTotalEfficiency. **/
82 bool setFanEfficiency(double value);
83
84 /** Sets the value of the PressureRise field. **/
85 bool setPressureRise(double value);
86
87 /** Sets the value of the MotorEfficiency field. **/
88 bool setMotorEfficiency(double value);
89
90 /** Sets the value of the MotorInAirStreamFraction field. **/
91 bool setMotorInAirstreamFraction(double value);
92
93 /** Sets the value of the EndUseSubcategory field. **/
94 bool setEndUseSubcategory(const std::string& value);
95
96 //@}
97
98 boost::optional<double> maximumFlowRate() const;
99
100 bool isMaximumFlowRateAutosized() const;
101
102 bool setMaximumFlowRate(double maximumFlowRate);
103
104 void resetMaximumFlowRate();
105
106 void autosizeMaximumFlowRate();
107
108 AirflowNetworkFan getAirflowNetworkFan();
109 boost::optional<AirflowNetworkFan> airflowNetworkFan() const;
110
111 boost::optional<double> autosizedMaximumFlowRate() const;
112
113 protected:
114 friend class Model;
115 friend class openstudio::IdfObject;
116
117 /// @cond
118 using ImplType = detail::FanConstantVolume_Impl;
119 explicit FanConstantVolume(std::shared_ptr<detail::FanConstantVolume_Impl> impl);
120
121 private:
122 REGISTER_LOGGER("openstudio.model.FanConstantVolume");
123 /// @endcond
124 };
125
126 /** \relates FanConstantVolume */
127 using OptionalFanConstantVolume = boost::optional<FanConstantVolume>;
128
129 /** \relates FanConstantVolume */
130 using FanConstantVolumeVector = std::vector<FanConstantVolume>;
131
132 } // namespace model
133 } // namespace openstudio
134
135 #endif // MODEL_FANCONSTANTVOLUME_HPP
136