GCC Code Coverage Report


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

src/model/HeaderedPumpsVariableSpeed.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_HEADEREDPUMPSVARIABLESPEED_HPP
7 #define MODEL_HEADEREDPUMPSVARIABLESPEED_HPP
8
9 #include "ModelAPI.hpp"
10 #include "StraightComponent.hpp"
11
12 namespace openstudio {
13
14 namespace model {
15
16 class Schedule;
17 class ThermalZone;
18
19 namespace detail {
20
21 class HeaderedPumpsVariableSpeed_Impl;
22
23 } // namespace detail
24
25 /** HeaderedPumpsVariableSpeed is a StraightComponent that wraps the OpenStudio IDD object 'OS:HeaderedPumps:VariableSpeed'. */
26 class MODEL_API HeaderedPumpsVariableSpeed : public StraightComponent
27 {
28 public:
29 /** @name Constructors and Destructors */
30 //@{
31
32 explicit HeaderedPumpsVariableSpeed(const Model& model);
33
34 1 virtual ~HeaderedPumpsVariableSpeed() override = default;
35 // Default the copy and move operators because the virtual dtor is explicit
36 ✗ HeaderedPumpsVariableSpeed(const HeaderedPumpsVariableSpeed& other) = default;
37 ✗ HeaderedPumpsVariableSpeed(HeaderedPumpsVariableSpeed&& other) = default;
38 ✗ HeaderedPumpsVariableSpeed& operator=(const HeaderedPumpsVariableSpeed&) = default;
39 ✗ HeaderedPumpsVariableSpeed& operator=(HeaderedPumpsVariableSpeed&&) = default;
40
41 //@}
42
43 static IddObjectType iddObjectType();
44
45 static std::vector<std::string> flowSequencingControlSchemeValues();
46
47 static std::vector<std::string> pumpControlTypeValues();
48
49 static std::vector<std::string> designPowerSizingMethodValues();
50
51 /** @name Getters */
52 //@{
53
54 /** In EnergyPlus 8.5.0 and above this property maps to the EnergyPlus field "Total Design Flow Rate" **/
55 boost::optional<double> totalRatedFlowRate() const;
56
57 bool isTotalRatedFlowRateAutosized() const;
58
59 int numberofPumpsinBank() const;
60
61 std::string flowSequencingControlScheme() const;
62
63 /** In EnergyPlus 8.5.0 and above this property maps to the EnergyPlus field "Design Pump Head" **/
64 double ratedPumpHead() const;
65
66 /** In EnergyPlus 8.5.0 and above this property maps to the EnergyPlus field "Design Power Consumption" **/
67 boost::optional<double> ratedPowerConsumption() const;
68
69 bool isRatedPowerConsumptionAutosized() const;
70
71 double motorEfficiency() const;
72
73 double fractionofMotorInefficienciestoFluidStream() const;
74
75 double coefficient1ofthePartLoadPerformanceCurve() const;
76
77 double coefficient2ofthePartLoadPerformanceCurve() const;
78
79 double coefficient3ofthePartLoadPerformanceCurve() const;
80
81 double coefficient4ofthePartLoadPerformanceCurve() const;
82
83 double minimumFlowRateFraction() const;
84
85 std::string pumpControlType() const;
86
87 boost::optional<Schedule> pumpFlowRateSchedule() const;
88
89 boost::optional<ThermalZone> thermalZone() const;
90
91 double skinLossRadiativeFraction() const;
92
93 std::string designPowerSizingMethod() const;
94
95 double designElectricPowerPerUnitFlowRate() const;
96
97 double designShaftPowerPerUnitFlowRatePerUnitHead() const;
98
99 std::string endUseSubcategory() const;
100
101 //@}
102 /** @name Setters */
103 //@{
104
105 bool setTotalRatedFlowRate(double totalRatedFlowRate);
106
107 void autosizeTotalRatedFlowRate();
108
109 bool setNumberofPumpsinBank(int numberofPumpsinBank);
110
111 bool setFlowSequencingControlScheme(const std::string& flowSequencingControlScheme);
112
113 bool setRatedPumpHead(double ratedPumpHead);
114
115 bool setRatedPowerConsumption(double ratedPowerConsumption);
116
117 void autosizeRatedPowerConsumption();
118
119 bool setMotorEfficiency(double motorEfficiency);
120
121 bool setFractionofMotorInefficienciestoFluidStream(double fractionofMotorInefficienciestoFluidStream);
122
123 bool setCoefficient1ofthePartLoadPerformanceCurve(double coefficient1ofthePartLoadPerformanceCurve);
124
125 bool setCoefficient2ofthePartLoadPerformanceCurve(double coefficient2ofthePartLoadPerformanceCurve);
126
127 bool setCoefficient3ofthePartLoadPerformanceCurve(double coefficient3ofthePartLoadPerformanceCurve);
128
129 bool setCoefficient4ofthePartLoadPerformanceCurve(double coefficient4ofthePartLoadPerformanceCurve);
130
131 bool setMinimumFlowRateFraction(double minimumFlowRateFraction);
132
133 bool setPumpControlType(const std::string& pumpControlType);
134
135 bool setPumpFlowRateSchedule(Schedule& schedule);
136
137 void resetPumpFlowRateSchedule();
138
139 bool setThermalZone(const ThermalZone& thermalZone);
140
141 void resetThermalZone();
142
143 bool setSkinLossRadiativeFraction(double skinLossRadiativeFraction);
144
145 bool setDesignPowerSizingMethod(const std::string& designPowerSizingMethod);
146
147 bool setDesignElectricPowerPerUnitFlowRate(double designElectricPowerPerUnitFlowRate);
148
149 bool setDesignShaftPowerPerUnitFlowRatePerUnitHead(double designShaftPowerPerUnitFlowRatePerUnitHead);
150
151 bool setEndUseSubcategory(const std::string& endUseSubcategory);
152
153 //@}
154 /** @name Other */
155 //@{
156
157 boost::optional<double> autosizedTotalRatedFlowRate() const;
158
159 boost::optional<double> autosizedRatedPowerConsumption() const;
160
161 //@}
162 protected:
163 /// @cond
164 using ImplType = detail::HeaderedPumpsVariableSpeed_Impl;
165
166 explicit HeaderedPumpsVariableSpeed(std::shared_ptr<detail::HeaderedPumpsVariableSpeed_Impl> impl);
167
168 friend class detail::HeaderedPumpsVariableSpeed_Impl;
169 friend class Model;
170 friend class IdfObject;
171 friend class openstudio::detail::IdfObject_Impl;
172 /// @endcond
173 private:
174 REGISTER_LOGGER("openstudio.model.HeaderedPumpsVariableSpeed");
175 };
176
177 /** \relates HeaderedPumpsVariableSpeed*/
178 using OptionalHeaderedPumpsVariableSpeed = boost::optional<HeaderedPumpsVariableSpeed>;
179
180 /** \relates HeaderedPumpsVariableSpeed*/
181 using HeaderedPumpsVariableSpeedVector = std::vector<HeaderedPumpsVariableSpeed>;
182
183 } // namespace model
184 } // namespace openstudio
185
186 #endif // MODEL_HEADEREDPUMPSVARIABLESPEED_HPP
187