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/FanOnOff_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_FANONOFF_IMPL_HPP
7 #define MODEL_FANONOFF_IMPL_HPP
8
9 #include "ModelAPI.hpp"
10 #include "StraightComponent_Impl.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 class Schedule;
16 class Curve;
17 class AirflowNetworkFan;
18
19 namespace detail {
20
21 /** FanOnOff_Impl is a StraightComponent_Impl that is the implementation class for FanOnOff.*/
22 class MODEL_API FanOnOff_Impl : public StraightComponent_Impl
23 {
24 public:
25 /** @name Constructors and Destructors */
26 //@{
27
28 FanOnOff_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
29
30 FanOnOff_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
31
32 FanOnOff_Impl(const FanOnOff_Impl& other, Model_Impl* model, bool keepHandle);
33
34 179 virtual ~FanOnOff_Impl() override = default;
35
36 //@}
37
38 /** @name Virtual Methods */
39 //@{
40
41 virtual std::vector<openstudio::IdfObject> remove() override;
42
43 virtual ModelObject clone(Model model) const override;
44
45 virtual const std::vector<std::string>& outputVariableNames() const override;
46
47 virtual IddObjectType iddObjectType() const override;
48
49 virtual std::vector<ScheduleTypeKey> getScheduleTypeKeys(const Schedule& schedule) const override;
50
51 virtual unsigned inletPort() const override;
52
53 virtual unsigned outletPort() const override;
54
55 virtual std::vector<ModelObject> children() const override;
56
57 virtual bool addToNode(Node& node) override;
58
59 virtual ComponentType componentType() const override;
60 virtual std::vector<FuelType> coolingFuelTypes() const override;
61 virtual std::vector<FuelType> heatingFuelTypes() const override;
62 virtual std::vector<AppGFuelType> appGHeatingFuelTypes() const override;
63
64 //@}
65 /** @name Getters and Setters */
66 //@{
67
68 // Field Availability Schedule Name
69
70 Schedule availabilitySchedule() const;
71
72 bool setAvailabilitySchedule(Schedule& schedule);
73
74 // Field Fan Efficiency
75
76 double fanTotalEfficiency() const;
77
78 bool isFanTotalEfficiencyDefaulted() const;
79
80 bool setFanTotalEfficiency(double fanTotalEfficiency);
81
82 void resetFanTotalEfficiency();
83
84 // Field Pressure Rise
85
86 double pressureRise() const;
87
88 bool setPressureRise(double pressureRise);
89
90 // Field Maximum Flow Rate
91
92 boost::optional<double> maximumFlowRate() const;
93
94 bool isMaximumFlowRateAutosized() const;
95
96 bool setMaximumFlowRate(boost::optional<double> maximumFlowRate);
97
98 void resetMaximumFlowRate();
99
100 void autosizeMaximumFlowRate();
101
102 // Field Motor Efficiency
103
104 double motorEfficiency() const;
105
106 bool isMotorEfficiencyDefaulted() const;
107
108 bool setMotorEfficiency(double motorEfficiency);
109
110 void resetMotorEfficiency();
111
112 // Field Motor In Airstream Fraction
113
114 boost::optional<double> motorInAirstreamFraction() const;
115
116 bool setMotorInAirstreamFraction(boost::optional<double> motorInAirstreamFraction);
117
118 void resetMotorInAirstreamFraction();
119
120 // Field End-Use Subcategory
121
122 std::string endUseSubcategory() const;
123
124 bool isEndUseSubcategoryDefaulted() const;
125
126 bool setEndUseSubcategory(const std::string& endUseSubcategory);
127
128 void resetEndUseSubcategory();
129
130 //@}
131 /** @name Curves */
132 //@{
133
134 Curve fanPowerRatioFunctionofSpeedRatioCurve() const;
135 bool setFanPowerRatioFunctionofSpeedRatioCurve(const Curve& curve);
136
137 Curve fanEfficiencyRatioFunctionofSpeedRatioCurve() const;
138 bool setFanEfficiencyRatioFunctionofSpeedRatioCurve(const Curve& curve);
139
140 boost::optional<double> autosizedMaximumFlowRate() const;
141
142 virtual void autosize() override;
143
144 virtual void applySizingValues() override;
145
146 virtual std::vector<EMSActuatorNames> emsActuatorNames() const override;
147
148 virtual std::vector<std::string> emsInternalVariableNames() const override;
149
150 //@}
151
152 AirflowNetworkFan getAirflowNetworkFan();
153 boost::optional<AirflowNetworkFan> airflowNetworkFan() const;
154
155 //protected:
156 private:
157 − REGISTER_LOGGER("openstudio.model.FanOnOff");
158
159 boost::optional<Schedule> optionalAvailabilitySchedule() const;
160 boost::optional<ModelObject> availabilityScheduleAsModelObject() const;
161
162 virtual boost::optional<ZoneHVACComponent> containingZoneHVACComponent() const override;
163
164 virtual boost::optional<HVACComponent> containingHVACComponent() const override;
165 };
166
167 } // namespace detail
168
169 } // namespace model
170 } // namespace openstudio
171
172 #endif // MODEL_FANONOFF_IMPL_HPP
173