GCC Code Coverage Report


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

src/model/CoilHeatingDXSingleSpeed.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_COILHEATINGDXSINGLESPEED_HPP
7 #define MODEL_COILHEATINGDXSINGLESPEED_HPP
8
9 #include "ModelAPI.hpp"
10 #include "StraightComponent.hpp"
11 #include "../utilities/core/Deprecated.hpp"
12
13 namespace openstudio {
14
15 namespace model {
16
17 class AirflowNetworkEquivalentDuct;
18 class Curve;
19 class Schedule;
20
21 namespace detail {
22
23 class CoilHeatingDXSingleSpeed_Impl;
24
25 } // namespace detail
26
27 /** CoilHeatingDXSingleSpeed is a StraightComponent that wraps the
28 * OpenStudio IDD object 'OS:Coil:Heating:DX:SingleSpeed'. */
29 class MODEL_API CoilHeatingDXSingleSpeed : public StraightComponent
30 {
31 public:
32 /** @name Constructors and Destructors */
33 //@{
34
35 explicit CoilHeatingDXSingleSpeed(const Model& model, Schedule& availabilitySchedule, Curve& totalHeatingCapacityFunctionofTemperatureCurve,
36 Curve& totalHeatingCapacityFunctionofFlowFractionCurve, Curve& energyInputRatioFunctionofTemperatureCurve,
37 Curve& energyInputRatioFunctionofFlowFractionCurve, Curve& partLoadFractionCorrelationCurve);
38
39 explicit CoilHeatingDXSingleSpeed(const Model& model);
40
41 85 virtual ~CoilHeatingDXSingleSpeed() override = default;
42 // Default the copy and move operators because the virtual dtor is explicit
43 ✗ CoilHeatingDXSingleSpeed(const CoilHeatingDXSingleSpeed& other) = default;
44 10 CoilHeatingDXSingleSpeed(CoilHeatingDXSingleSpeed&& other) = default;
45 ✗ CoilHeatingDXSingleSpeed& operator=(const CoilHeatingDXSingleSpeed&) = default;
46 ✗ CoilHeatingDXSingleSpeed& operator=(CoilHeatingDXSingleSpeed&&) = default;
47
48 //@}
49
50 static IddObjectType iddObjectType();
51
52 static std::vector<std::string> validDefrostStrategyValues();
53
54 static std::vector<std::string> validDefrostControlValues();
55
56 /** @name Getters */
57 //@{
58
59 Schedule availabilitySchedule() const;
60
61 boost::optional<double> ratedTotalHeatingCapacity() const;
62
63 bool isRatedTotalHeatingCapacityAutosized() const;
64
65 double ratedCOP() const;
66
67 boost::optional<double> ratedAirFlowRate() const;
68
69 bool isRatedAirFlowRateAutosized() const;
70
71 OS_DEPRECATED(3, 5, 0) double ratedSupplyFanPowerPerVolumeFlowRate() const;
72
73 double ratedSupplyFanPowerPerVolumeFlowRate2017() const;
74
75 double ratedSupplyFanPowerPerVolumeFlowRate2023() const;
76
77 double minimumOutdoorDryBulbTemperatureforCompressorOperation() const;
78
79 bool isMinimumOutdoorDryBulbTemperatureforCompressorOperationDefaulted() const;
80
81 double maximumOutdoorDryBulbTemperatureforDefrostOperation() const;
82
83 bool isMaximumOutdoorDryBulbTemperatureforDefrostOperationDefaulted() const;
84
85 double crankcaseHeaterCapacity() const;
86
87 boost::optional<Curve> crankcaseHeaterCapacityFunctionofTemperatureCurve() const;
88
89 bool isCrankcaseHeaterCapacityDefaulted() const;
90
91 double maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation() const;
92
93 bool isMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperationDefaulted() const;
94
95 std::string defrostStrategy() const;
96
97 bool isDefrostStrategyDefaulted() const;
98
99 std::string defrostControl() const;
100
101 bool isDefrostControlDefaulted() const;
102
103 double defrostTimePeriodFraction() const;
104
105 bool isDefrostTimePeriodFractionDefaulted() const;
106
107 boost::optional<double> resistiveDefrostHeaterCapacity() const;
108
109 bool isResistiveDefrostHeaterCapacityDefaulted() const;
110
111 bool isResistiveDefrostHeaterCapacityAutosized() const;
112
113 bool setRatedTotalHeatingCapacity(double ratedTotalHeatingCapacity);
114
115 void autosizeRatedTotalHeatingCapacity();
116
117 //@}
118 /** @name Setters */
119 //@{
120
121 bool setAvailabilitySchedule(Schedule& schedule);
122
123 bool setRatedCOP(double ratedCOP);
124
125 bool setRatedAirFlowRate(double ratedAirFlowRate);
126
127 void autosizeRatedAirFlowRate();
128
129 OS_DEPRECATED(3, 5, 0) bool setRatedSupplyFanPowerPerVolumeFlowRate(double ratedSupplyFanPowerPerVolumeFlowRate);
130
131 bool setRatedSupplyFanPowerPerVolumeFlowRate2017(double ratedSupplyFanPowerPerVolumeFlowRate2017);
132
133 bool setRatedSupplyFanPowerPerVolumeFlowRate2023(double ratedSupplyFanPowerPerVolumeFlowRate2023);
134
135 bool setMinimumOutdoorDryBulbTemperatureforCompressorOperation(double minimumOutdoorDryBulbTemperatureforCompressorOperation);
136
137 void resetMinimumOutdoorDryBulbTemperatureforCompressorOperation();
138
139 bool setMaximumOutdoorDryBulbTemperatureforDefrostOperation(double maximumOutdoorDryBulbTemperatureforDefrostOperation);
140
141 void resetMaximumOutdoorDryBulbTemperatureforDefrostOperation();
142
143 bool setCrankcaseHeaterCapacity(double crankcaseHeaterCapacity);
144
145 void resetCrankcaseHeaterCapacity();
146
147 bool setCrankcaseHeaterCapacityFunctionofTemperatureCurve(const Curve& curve);
148 void resetCrankcaseHeaterCapacityFunctionofTemperatureCurve();
149
150 bool setMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation(double maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation);
151
152 void resetMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation();
153
154 bool setDefrostStrategy(const std::string& defrostStrategy);
155
156 void resetDefrostStrategy();
157
158 bool setDefrostControl(const std::string& defrostControl);
159
160 void resetDefrostControl();
161
162 bool setDefrostTimePeriodFraction(double defrostTimePeriodFraction);
163
164 void resetDefrostTimePeriodFraction();
165
166 bool setResistiveDefrostHeaterCapacity(double resistiveDefrostHeaterCapacity);
167
168 void resetResistiveDefrostHeaterCapacity();
169
170 void autosizeResistiveDefrostHeaterCapacity();
171
172 //@}
173 /** @name Curves */
174 //@{
175
176 // A5 , \field Total Heating Capacity Function of Temperature Curve Name
177 // \object-list BiquadraticQuadraticCubicCurves
178 Curve totalHeatingCapacityFunctionofTemperatureCurve() const;
179 bool setTotalHeatingCapacityFunctionofTemperatureCurve(const Curve& curve);
180
181 // A6 , \field Total Heating Capacity Function of Flow Fraction Curve Name
182 // \object-list QuadraticCubicCurves
183 Curve totalHeatingCapacityFunctionofFlowFractionCurve() const;
184 bool setTotalHeatingCapacityFunctionofFlowFractionCurve(const Curve& curve);
185
186 // A7 , \field Energy Input Ratio Function of Temperature Curve Name
187 // \object-list BiquadraticQuadraticCubicCurves
188 Curve energyInputRatioFunctionofTemperatureCurve() const;
189 bool setEnergyInputRatioFunctionofTemperatureCurve(const Curve& curve);
190
191 // A8 , \field Energy Input Ratio Function of Flow Fraction Curve Name
192 // \object-list QuadraticCubicCurves
193 Curve energyInputRatioFunctionofFlowFractionCurve() const;
194 bool setEnergyInputRatioFunctionofFlowFractionCurve(const Curve& curve);
195
196 // A9 , \field Part Load Fraction Correlation Curve Name
197 // \object-list QuadraticCubicCurves
198 Curve partLoadFractionCorrelationCurve() const;
199 bool setPartLoadFractionCorrelationCurve(const Curve& curve);
200
201 // A10, \field Defrost Energy Input Ratio Function of Temperature Curve Name
202 // \object-list BiquadraticCurves
203 // not a required curve so it needs a reset
204 boost::optional<Curve> defrostEnergyInputRatioFunctionofTemperatureCurve() const;
205 bool setDefrostEnergyInputRatioFunctionofTemperatureCurve(const Curve& curve);
206 void resetDefrostEnergyInputRatioFunctionofTemperatureCurve();
207
208 boost::optional<double> autosizedRatedTotalHeatingCapacity() const;
209
210 boost::optional<double> autosizedRatedAirFlowRate() const;
211
212 boost::optional<double> autosizedResistiveDefrostHeaterCapacity() const;
213
214 //@}
215
216 /** Creates a new equivalent duct object if an object is not already attached. */
217 AirflowNetworkEquivalentDuct getAirflowNetworkEquivalentDuct(double length, double diameter);
218
219 /** Returns the attached equivalent duct object, if any. */
220 boost::optional<AirflowNetworkEquivalentDuct> airflowNetworkEquivalentDuct() const;
221
222 protected:
223 /// @cond
224 using ImplType = detail::CoilHeatingDXSingleSpeed_Impl;
225
226 friend class detail::CoilHeatingDXSingleSpeed_Impl;
227
228 friend class Model;
229
230 friend class openstudio::IdfObject;
231
232 explicit CoilHeatingDXSingleSpeed(std::shared_ptr<detail::CoilHeatingDXSingleSpeed_Impl> impl);
233 /// @endcond
234 private:
235 − REGISTER_LOGGER("openstudio.model.CoilHeatingDXSingleSpeed");
236 };
237
238 /** \relates CoilHeatingDXSingleSpeed*/
239 using OptionalCoilHeatingDXSingleSpeed = boost::optional<CoilHeatingDXSingleSpeed>;
240
241 /** \relates CoilHeatingDXSingleSpeed*/
242 using CoilHeatingDXSingleSpeedVector = std::vector<CoilHeatingDXSingleSpeed>;
243
244 } // namespace model
245
246 } // namespace openstudio
247
248 #endif // MODEL_COILHEATINGDXSINGLESPEED_HPP
249