GCC Code Coverage Report


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

src/model/PumpConstantSpeed.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_PUMPCONSTANTSPEED_HPP
7 #define MODEL_PUMPCONSTANTSPEED_HPP
8
9 #include "ModelAPI.hpp"
10 #include "StraightComponent.hpp"
11
12 namespace openstudio {
13
14 namespace model {
15
16 class Schedule;
17 class Curve;
18 class ThermalZone;
19
20 namespace detail {
21
22 class PumpConstantSpeed_Impl;
23
24 } // namespace detail
25
26 /** PumpConstantSpeed is a StraightComponent that wraps the OpenStudio IDD object 'OS:Pump:ConstantSpeed'. */
27 class MODEL_API PumpConstantSpeed : public StraightComponent
28 {
29 public:
30 explicit PumpConstantSpeed(const Model& model);
31
32 36 virtual ~PumpConstantSpeed() override = default;
33 // Default the copy and move operators because the virtual dtor is explicit
34 ✗ PumpConstantSpeed(const PumpConstantSpeed& other) = default;
35 4 PumpConstantSpeed(PumpConstantSpeed&& other) = default;
36 ✗ PumpConstantSpeed& operator=(const PumpConstantSpeed&) = default;
37 ✗ PumpConstantSpeed& operator=(PumpConstantSpeed&&) = default;
38
39 static IddObjectType iddObjectType();
40
41 static std::vector<std::string> pumpControlTypeValues();
42
43 static std::vector<std::string> designPowerSizingMethodValues();
44
45 /** In EnergyPlus 8.5.0 and above this property maps to the EnergyPlus field "Design Flow Rate" **/
46 boost::optional<double> ratedFlowRate() const;
47
48 bool isRatedFlowRateAutosized() const;
49
50 bool setRatedFlowRate(double ratedFlowRate);
51
52 void resetRatedFlowRate();
53
54 void autosizeRatedFlowRate();
55
56 /** In EnergyPlus 8.5.0 and above this property maps to the EnergyPlus field "Design Pump Head" **/
57 double ratedPumpHead() const;
58
59 bool isRatedPumpHeadDefaulted() const;
60
61 bool setRatedPumpHead(double ratedPumpHead);
62
63 void resetRatedPumpHead();
64
65 /** In EnergyPlus 8.5.0 and above this property maps to the EnergyPlus field "Design Power Consumption" **/
66 boost::optional<double> ratedPowerConsumption() const;
67
68 bool isRatedPowerConsumptionAutosized() const;
69
70 bool setRatedPowerConsumption(double ratedPowerConsumption);
71
72 void resetRatedPowerConsumption();
73
74 void autosizeRatedPowerConsumption();
75
76 double motorEfficiency() const;
77
78 bool isMotorEfficiencyDefaulted() const;
79
80 bool setMotorEfficiency(double motorEfficiency);
81
82 void resetMotorEfficiency();
83
84 double fractionofMotorInefficienciestoFluidStream() const;
85
86 bool isFractionofMotorInefficienciestoFluidStreamDefaulted() const;
87
88 bool setFractionofMotorInefficienciestoFluidStream(double fractionofMotorInefficienciestoFluidStream);
89
90 void resetFractionofMotorInefficienciestoFluidStream();
91
92 std::string pumpControlType() const;
93
94 bool isPumpControlTypeDefaulted() const;
95
96 bool setPumpControlType(const std::string& pumpControlType);
97
98 void resetPumpControlType();
99
100 boost::optional<Schedule> pumpFlowRateSchedule() const;
101
102 bool setPumpFlowRateSchedule(Schedule& schedule);
103
104 void resetPumpFlowRateSchedule();
105
106 boost::optional<Curve> pumpCurve() const;
107
108 bool setPumpCurve(const Curve& curve);
109
110 void resetPumpCurve();
111
112 boost::optional<double> impellerDiameter() const;
113
114 bool setImpellerDiameter(double impellerDiameter);
115
116 void resetImpellerDiameter();
117
118 boost::optional<double> rotationalSpeed() const;
119
120 bool setRotationalSpeed(double rotationalSpeed);
121
122 void resetRotationalSpeed();
123
124 // TODO: this should be renamed ThermalZone for consistency
125 boost::optional<ThermalZone> zone() const;
126
127 boost::optional<double> skinLossRadiativeFraction() const;
128
129 bool setZone(const ThermalZone& thermalZone);
130
131 void resetZone();
132
133 bool setSkinLossRadiativeFraction(double skinLossRadiativeFraction);
134
135 void resetSkinLossRadiativeFraction();
136
137 boost::optional<double> autosizedRatedFlowRate() const;
138
139 boost::optional<double> autosizedRatedPowerConsumption() const;
140
141 std::string designPowerSizingMethod() const;
142
143 bool setDesignPowerSizingMethod(const std::string& designPowerSizingMethod);
144
145 double designElectricPowerPerUnitFlowRate() const;
146
147 bool setDesignElectricPowerPerUnitFlowRate(double designElectricPowerPerUnitFlowRate);
148
149 double designShaftPowerPerUnitFlowRatePerUnitHead() const;
150
151 bool setDesignShaftPowerPerUnitFlowRatePerUnitHead(double designShaftPowerPerUnitFlowRatePerUnitHead);
152
153 std::string endUseSubcategory() const;
154
155 bool setEndUseSubcategory(const std::string& endUseSubcategory);
156
157 protected:
158 /// @cond
159 using ImplType = detail::PumpConstantSpeed_Impl;
160
161 explicit PumpConstantSpeed(std::shared_ptr<detail::PumpConstantSpeed_Impl> impl);
162
163 friend class detail::PumpConstantSpeed_Impl;
164 friend class Model;
165 friend class IdfObject;
166 friend class openstudio::detail::IdfObject_Impl;
167
168 /// @endcond
169
170 private:
171 REGISTER_LOGGER("openstudio.model.PumpConstantSpeed");
172 };
173
174 /** \relates PumpConstantSpeed*/
175 using OptionalPumpConstantSpeed = boost::optional<PumpConstantSpeed>;
176
177 /** \relates PumpConstantSpeed*/
178 using PumpConstantSpeedVector = std::vector<PumpConstantSpeed>;
179
180 } // namespace model
181 } // namespace openstudio
182
183 #endif // MODEL_PUMPCONSTANTSPEED_HPP
184