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/CoilHeatingDXVariableSpeed.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_COILHEATINGDXVARIABLESPEED_HPP
7 #define MODEL_COILHEATINGDXVARIABLESPEED_HPP
8
9 #include "ModelAPI.hpp"
10 #include "StraightComponent.hpp"
11
12 namespace openstudio {
13
14 namespace model {
15
16 class CoilHeatingDXVariableSpeedSpeedData;
17 class Curve;
18 class AirflowNetworkEquivalentDuct;
19
20 namespace detail {
21
22 class CoilHeatingDXVariableSpeed_Impl;
23
24 } // namespace detail
25
26 /** CoilHeatingDXVariableSpeed is a StraightComponent that wraps the OpenStudio IDD object 'OS:Coil:Heating:DX:VariableSpeed'. */
27 class MODEL_API CoilHeatingDXVariableSpeed : public StraightComponent
28 {
29 public:
30 /** @name Constructors and Destructors */
31 //@{
32
33 explicit CoilHeatingDXVariableSpeed(const Model& model);
34
35 explicit CoilHeatingDXVariableSpeed(const Model& model, const Curve& partLoadFraction);
36
37 95 virtual ~CoilHeatingDXVariableSpeed() override = default;
38 // Default the copy and move operators because the virtual dtor is explicit
39 ✗ CoilHeatingDXVariableSpeed(const CoilHeatingDXVariableSpeed& other) = default;
40 20 CoilHeatingDXVariableSpeed(CoilHeatingDXVariableSpeed&& other) = default;
41 ✗ CoilHeatingDXVariableSpeed& operator=(const CoilHeatingDXVariableSpeed&) = default;
42 ✗ CoilHeatingDXVariableSpeed& operator=(CoilHeatingDXVariableSpeed&&) = default;
43
44 //@}
45
46 static IddObjectType iddObjectType();
47
48 static std::vector<std::string> defrostStrategyValues();
49
50 static std::vector<std::string> defrostControlValues();
51
52 /** @name Getters */
53 //@{
54
55 Schedule availabilitySchedule() const;
56
57 int nominalSpeedLevel() const;
58
59 boost::optional<double> ratedHeatingCapacityAtSelectedNominalSpeedLevel() const;
60
61 bool isRatedHeatingCapacityAtSelectedNominalSpeedLevelAutosized() const;
62
63 boost::optional<double> ratedAirFlowRateAtSelectedNominalSpeedLevel() const;
64
65 bool isRatedAirFlowRateAtSelectedNominalSpeedLevelAutosized() const;
66
67 Curve energyPartLoadFractionCurve() const;
68
69 boost::optional<Curve> defrostEnergyInputRatioFunctionofTemperatureCurve() const;
70
71 double minimumOutdoorDryBulbTemperatureforCompressorOperation() const;
72
73 boost::optional<double> outdoorDryBulbTemperaturetoTurnOnCompressor() const;
74
75 double maximumOutdoorDryBulbTemperatureforDefrostOperation() const;
76
77 double crankcaseHeaterCapacity() const;
78
79 boost::optional<Curve> crankcaseHeaterCapacityFunctionofTemperatureCurve() const;
80
81 double maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation() const;
82
83 std::string defrostStrategy() const;
84
85 std::string defrostControl() const;
86
87 double defrostTimePeriodFraction() const;
88
89 boost::optional<double> resistiveDefrostHeaterCapacity() const;
90
91 bool isResistiveDefrostHeaterCapacityAutosized() const;
92
93 //@}
94 /** @name Setters */
95 //@{
96
97 bool setAvailabilitySchedule(Schedule& schedule);
98
99 bool setNominalSpeedLevel(int nominalSpeedLevel);
100
101 bool setRatedHeatingCapacityAtSelectedNominalSpeedLevel(double ratedHeatingCapacityAtSelectedNominalSpeedLevel);
102
103 void autosizeRatedHeatingCapacityAtSelectedNominalSpeedLevel();
104
105 bool setRatedAirFlowRateAtSelectedNominalSpeedLevel(double ratedAirFlowRateAtSelectedNominalSpeedLevel);
106
107 void autosizeRatedAirFlowRateAtSelectedNominalSpeedLevel();
108
109 bool setEnergyPartLoadFractionCurve(const Curve& curve);
110
111 bool setDefrostEnergyInputRatioFunctionofTemperatureCurve(const Curve& curve);
112
113 void resetDefrostEnergyInputRatioFunctionofTemperatureCurve();
114
115 bool setMinimumOutdoorDryBulbTemperatureforCompressorOperation(double minimumOutdoorDryBulbTemperatureforCompressorOperation);
116
117 bool setOutdoorDryBulbTemperaturetoTurnOnCompressor(double outdoorDryBulbTemperaturetoTurnOnCompressor);
118
119 void resetOutdoorDryBulbTemperaturetoTurnOnCompressor();
120
121 bool setMaximumOutdoorDryBulbTemperatureforDefrostOperation(double maximumOutdoorDryBulbTemperatureforDefrostOperation);
122
123 bool setCrankcaseHeaterCapacity(double crankcaseHeaterCapacity);
124
125 bool setCrankcaseHeaterCapacityFunctionofTemperatureCurve(const Curve& curve);
126 void resetCrankcaseHeaterCapacityFunctionofTemperatureCurve();
127
128 bool setMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation(double maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation);
129
130 bool setDefrostStrategy(const std::string& defrostStrategy);
131
132 bool setDefrostControl(const std::string& defrostControl);
133
134 bool setDefrostTimePeriodFraction(double defrostTimePeriodFraction);
135
136 bool setResistiveDefrostHeaterCapacity(double resistiveDefrostHeaterCapacity);
137
138 void autosizeResistiveDefrostHeaterCapacity();
139
140 //@}
141 /** @name Other */
142 //@{
143
144 std::vector<CoilHeatingDXVariableSpeedSpeedData> speeds() const;
145
146 bool addSpeed(const CoilHeatingDXVariableSpeedSpeedData& speed);
147
148 void removeSpeed(const CoilHeatingDXVariableSpeedSpeedData& speed);
149
150 void removeAllSpeeds();
151
152 /** Returns an equivalent duct object, creating a new one if an object is not already attached. */
153 AirflowNetworkEquivalentDuct getAirflowNetworkEquivalentDuct(double length, double diameter);
154
155 /** Returns the attached equivalent duct object if there is one. */
156 boost::optional<AirflowNetworkEquivalentDuct> airflowNetworkEquivalentDuct() const;
157
158 boost::optional<double> autosizedRatedHeatingCapacityAtSelectedNominalSpeedLevel() const;
159
160 boost::optional<double> autosizedRatedAirFlowRateAtSelectedNominalSpeedLevel() const;
161
162 boost::optional<double> autosizedResistiveDefrostHeaterCapacity() const;
163
164 //@}
165 protected:
166 /// @cond
167 using ImplType = detail::CoilHeatingDXVariableSpeed_Impl;
168
169 explicit CoilHeatingDXVariableSpeed(std::shared_ptr<detail::CoilHeatingDXVariableSpeed_Impl> impl);
170
171 friend class detail::CoilHeatingDXVariableSpeed_Impl;
172 friend class Model;
173 friend class IdfObject;
174 friend class openstudio::detail::IdfObject_Impl;
175 /// @endcond
176 private:
177 REGISTER_LOGGER("openstudio.model.CoilHeatingDXVariableSpeed");
178 };
179
180 /** \relates CoilHeatingDXVariableSpeed*/
181 using OptionalCoilHeatingDXVariableSpeed = boost::optional<CoilHeatingDXVariableSpeed>;
182
183 /** \relates CoilHeatingDXVariableSpeed*/
184 using CoilHeatingDXVariableSpeedVector = std::vector<CoilHeatingDXVariableSpeed>;
185
186 } // namespace model
187 } // namespace openstudio
188
189 #endif // MODEL_COILHEATINGDXVARIABLESPEED_HPP
190