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/CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit.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_COILHEATINGWATERTOAIRHEATPUMPVARIABLESPEEDEQUATIONFIT_HPP
7 #define MODEL_COILHEATINGWATERTOAIRHEATPUMPVARIABLESPEEDEQUATIONFIT_HPP
8
9 #include "ModelAPI.hpp"
10 #include "WaterToAirComponent.hpp"
11
12 namespace openstudio {
13
14 namespace model {
15
16 class Curve;
17 class CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData;
18 class AirflowNetworkEquivalentDuct;
19
20 namespace detail {
21
22 class CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl;
23
24 } // namespace detail
25
26 /** CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit is a WaterToAirComponent that wraps the OpenStudio IDD object 'OS:Coil:Heating:WaterToAirHeatPump:VariableSpeedEquationFit'. */
27 class MODEL_API CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit : public WaterToAirComponent
28 {
29 public:
30 /** @name Constructors and Destructors */
31 //@{
32
33 explicit CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit(const Model& model);
34
35 explicit CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit(const Model& model, const Curve& partLoadFraction);
36
37 17 virtual ~CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit() override = default;
38 // Default the copy and move operators because the virtual dtor is explicit
39 ✗ CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit(const CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit& other) = default;
40 6 CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit(CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit&& other) = default;
41 ✗ CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit& operator=(const CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit&) = default;
42 ✗ CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit& operator=(CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit&&) = default;
43
44 //@}
45
46 static IddObjectType iddObjectType();
47
48 /** @name Getters */
49 //@{
50
51 Schedule availabilitySchedule() const;
52
53 int nominalSpeedLevel() const;
54
55 boost::optional<double> ratedHeatingCapacityAtSelectedNominalSpeedLevel() const;
56
57 bool isRatedHeatingCapacityAtSelectedNominalSpeedLevelAutosized() const;
58
59 boost::optional<double> ratedAirFlowRateAtSelectedNominalSpeedLevel() const;
60
61 bool isRatedAirFlowRateAtSelectedNominalSpeedLevelAutosized() const;
62
63 boost::optional<double> ratedWaterFlowRateAtSelectedNominalSpeedLevel() const;
64
65 bool isRatedWaterFlowRateAtSelectedNominalSpeedLevelAutosized() const;
66
67 Curve energyPartLoadFractionCurve() const;
68
69 //@}
70 /** @name Setters */
71 //@{
72
73 bool setAvailabilitySchedule(Schedule& schedule);
74
75 bool setNominalSpeedLevel(int nominalSpeedLevel);
76
77 bool setRatedHeatingCapacityAtSelectedNominalSpeedLevel(double ratedHeatingCapacityAtSelectedNominalSpeedLevel);
78
79 void autosizeRatedHeatingCapacityAtSelectedNominalSpeedLevel();
80
81 bool setRatedAirFlowRateAtSelectedNominalSpeedLevel(double ratedAirFlowRateAtSelectedNominalSpeedLevel);
82
83 void autosizeRatedAirFlowRateAtSelectedNominalSpeedLevel();
84
85 bool setRatedWaterFlowRateAtSelectedNominalSpeedLevel(double ratedWaterFlowRateAtSelectedNominalSpeedLevel);
86
87 void autosizeRatedWaterFlowRateAtSelectedNominalSpeedLevel();
88
89 bool setEnergyPartLoadFractionCurve(const Curve& curve);
90
91 //@}
92 /** @name Other */
93 //@{
94
95 std::vector<CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData> speeds() const;
96
97 bool addSpeed(const CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData& speed);
98
99 void removeSpeed(const CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData& speed);
100
101 void removeAllSpeeds();
102
103 /** Returns an equivalent duct object, creating a new one if an object is not already attached. */
104 AirflowNetworkEquivalentDuct getAirflowNetworkEquivalentDuct(double length, double diameter);
105
106 /** Returns the attached equivalent duct object if there is one. */
107 boost::optional<AirflowNetworkEquivalentDuct> airflowNetworkEquivalentDuct() const;
108
109 boost::optional<double> autosizedRatedHeatingCapacityAtSelectedNominalSpeedLevel() const;
110
111 boost::optional<double> autosizedRatedAirFlowRateAtSelectedNominalSpeedLevel() const;
112
113 boost::optional<double> autosizedRatedWaterFlowRateAtSelectedNominalSpeedLevel() const;
114
115 //@}
116 protected:
117 /// @cond
118 using ImplType = detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl;
119
120 explicit CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit(
121 std::shared_ptr<detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl> impl);
122
123 friend class detail::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl;
124 friend class Model;
125 friend class IdfObject;
126 friend class openstudio::detail::IdfObject_Impl;
127 /// @endcond
128 private:
129 REGISTER_LOGGER("openstudio.model.CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit");
130 };
131
132 /** \relates CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit*/
133 using OptionalCoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit = boost::optional<CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit>;
134
135 /** \relates CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit*/
136 using CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFitVector = std::vector<CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit>;
137
138 } // namespace model
139 } // namespace openstudio
140
141 #endif // MODEL_COILHEATINGWATERTOAIRHEATPUMPVARIABLESPEEDEQUATIONFIT_HPP
142