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/HeaderedPumpsConstantSpeed.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_HEADEREDPUMPSCONSTANTSPEED_HPP
7 #define MODEL_HEADEREDPUMPSCONSTANTSPEED_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 HeaderedPumpsConstantSpeed_Impl;
22
23 } // namespace detail
24
25 /** HeaderedPumpsConstantSpeed is a StraightComponent that wraps the OpenStudio IDD object 'OS:HeaderedPumps:ConstantSpeed'. */
26 class MODEL_API HeaderedPumpsConstantSpeed : public StraightComponent
27 {
28 public:
29 /** @name Constructors and Destructors */
30 //@{
31
32 explicit HeaderedPumpsConstantSpeed(const Model& model);
33
34 1 virtual ~HeaderedPumpsConstantSpeed() override = default;
35 // Default the copy and move operators because the virtual dtor is explicit
36 ✗ HeaderedPumpsConstantSpeed(const HeaderedPumpsConstantSpeed& other) = default;
37 ✗ HeaderedPumpsConstantSpeed(HeaderedPumpsConstantSpeed&& other) = default;
38 ✗ HeaderedPumpsConstantSpeed& operator=(const HeaderedPumpsConstantSpeed&) = default;
39 ✗ HeaderedPumpsConstantSpeed& operator=(HeaderedPumpsConstantSpeed&&) = 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 std::string pumpControlType() const;
76
77 boost::optional<Schedule> pumpFlowRateSchedule() const;
78
79 boost::optional<ThermalZone> thermalZone() const;
80
81 double skinLossRadiativeFraction() const;
82
83 std::string designPowerSizingMethod() const;
84
85 double designElectricPowerPerUnitFlowRate() const;
86
87 double designShaftPowerPerUnitFlowRatePerUnitHead() const;
88
89 std::string endUseSubcategory() const;
90
91 //@}
92 /** @name Setters */
93 //@{
94
95 bool setTotalRatedFlowRate(double totalRatedFlowRate);
96
97 void autosizeTotalRatedFlowRate();
98
99 bool setNumberofPumpsinBank(int numberofPumpsinBank);
100
101 bool setFlowSequencingControlScheme(const std::string& flowSequencingControlScheme);
102
103 bool setRatedPumpHead(double ratedPumpHead);
104
105 bool setRatedPowerConsumption(double ratedPowerConsumption);
106
107 void autosizeRatedPowerConsumption();
108
109 bool setMotorEfficiency(double motorEfficiency);
110
111 bool setFractionofMotorInefficienciestoFluidStream(double fractionofMotorInefficienciestoFluidStream);
112
113 bool setPumpControlType(const std::string& pumpControlType);
114
115 bool setPumpFlowRateSchedule(Schedule& schedule);
116
117 void resetPumpFlowRateSchedule();
118
119 bool setThermalZone(const ThermalZone& thermalZone);
120
121 void resetThermalZone();
122
123 bool setSkinLossRadiativeFraction(double skinLossRadiativeFraction);
124
125 bool setDesignPowerSizingMethod(const std::string& designPowerSizingMethod);
126
127 bool setDesignElectricPowerPerUnitFlowRate(double designElectricPowerPerUnitFlowRate);
128
129 bool setDesignShaftPowerPerUnitFlowRatePerUnitHead(double designShaftPowerPerUnitFlowRatePerUnitHead);
130
131 bool setEndUseSubcategory(const std::string& endUseSubcategory);
132
133 //@}
134 /** @name Other */
135 //@{
136
137 boost::optional<double> autosizedTotalRatedFlowRate() const;
138
139 boost::optional<double> autosizedRatedPowerConsumption() const;
140
141 //@}
142 protected:
143 /// @cond
144 using ImplType = detail::HeaderedPumpsConstantSpeed_Impl;
145
146 explicit HeaderedPumpsConstantSpeed(std::shared_ptr<detail::HeaderedPumpsConstantSpeed_Impl> impl);
147
148 friend class detail::HeaderedPumpsConstantSpeed_Impl;
149 friend class Model;
150 friend class IdfObject;
151 friend class openstudio::detail::IdfObject_Impl;
152 /// @endcond
153 private:
154 REGISTER_LOGGER("openstudio.model.HeaderedPumpsConstantSpeed");
155 };
156
157 /** \relates HeaderedPumpsConstantSpeed*/
158 using OptionalHeaderedPumpsConstantSpeed = boost::optional<HeaderedPumpsConstantSpeed>;
159
160 /** \relates HeaderedPumpsConstantSpeed*/
161 using HeaderedPumpsConstantSpeedVector = std::vector<HeaderedPumpsConstantSpeed>;
162
163 } // namespace model
164 } // namespace openstudio
165
166 #endif // MODEL_HEADEREDPUMPSCONSTANTSPEED_HPP
167