GCC Code Coverage Report


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

src/model/ZoneMixing.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_ZONEMIXING_HPP
7 #define MODEL_ZONEMIXING_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ModelObject.hpp"
11
12 #include "../utilities/core/Deprecated.hpp"
13
14 namespace openstudio {
15
16 namespace model {
17
18 class Schedule;
19 class Space;
20 class ThermalZone;
21
22 namespace detail {
23
24 class ZoneMixing_Impl;
25
26 } // namespace detail
27
28 /** ZoneMixing is a ModelObject that wraps the OpenStudio IDD object 'OS:ZoneMixing'. */
29 class MODEL_API ZoneMixing : public ModelObject
30 {
31 public:
32 /** @name Constructors and Destructors */
33 //@{
34
35 explicit ZoneMixing(const ThermalZone& thermalZone);
36 explicit ZoneMixing(const Space& space);
37
38 499 virtual ~ZoneMixing() override = default;
39 // Default the copy and move operators because the virtual dtor is explicit
40 154 ZoneMixing(const ZoneMixing& other) = default;
41 156 ZoneMixing(ZoneMixing&& other) = default;
42 ✗ ZoneMixing& operator=(const ZoneMixing&) = default;
43 31 ZoneMixing& operator=(ZoneMixing&&) = default;
44
45 //@}
46
47 static IddObjectType iddObjectType();
48
49 bool hardSize();
50
51 /** @name Getters */
52 //@{
53
54 /// Returns the ThermalZone which receives air from this mixing object.
55 boost::optional<ThermalZone> zone() const;
56 boost::optional<Space> space() const;
57 ModelObject zoneOrSpace() const;
58
59 /// Returns fractional schedule which moderates amount of air flow from the design level.
60 Schedule schedule() const;
61
62 std::string designFlowRateCalculationMethod() const;
63
64 boost::optional<double> designFlowRate() const;
65
66 OS_DEPRECATED(3, 5, 0) boost::optional<double> flowRateperZoneFloorArea() const;
67 boost::optional<double> flowRateperFloorArea() const;
68
69 boost::optional<double> flowRateperPerson() const;
70
71 boost::optional<double> airChangesperHour() const;
72
73 /// Returns the ThermalZone which supplies air to this mixing object.
74 boost::optional<ThermalZone> sourceZone() const;
75 boost::optional<Space> sourceSpace() const;
76 boost::optional<ModelObject> sourceZoneOrSpace() const;
77
78 /// Returns the constant temperature differential between source and receiving zones below which mixing is shutoff.
79 // DLM: is this a signed difference or absolute?
80 boost::optional<double> deltaTemperature() const;
81
82 /// Returns the temperature schedule containing the differential between source and receiving zones versus time below which mixing is shutoff.
83 boost::optional<Schedule> deltaTemperatureSchedule() const;
84
85 /// Returns the temperature schedule containing the receiving zone or space dry-bulb temperature below which mixing is shutoff.
86 boost::optional<Schedule> minimumReceivingTemperatureSchedule() const;
87 OS_DEPRECATED(3, 5, 0) boost::optional<Schedule> minimumZoneTemperatureSchedule() const;
88
89 /// Returns the temperature schedule containing the receiving zone or space dry-bulb temperature above which mixing is shutoff.
90 boost::optional<Schedule> maximumReceivingTemperatureSchedule() const;
91 OS_DEPRECATED(3, 5, 0) boost::optional<Schedule> maximumZoneTemperatureSchedule() const;
92
93 /// Returns the temperature schedule containing the source zone or space dry-bulb temperature below which mixing is shutoff.
94 boost::optional<Schedule> minimumSourceTemperatureSchedule() const;
95 OS_DEPRECATED(3, 5, 0) boost::optional<Schedule> minimumSourceZoneTemperatureSchedule() const;
96
97 /// Returns the temperature schedule containing the source zone or space dry-bulb temperature above which mixing is shutoff.
98 boost::optional<Schedule> maximumSourceTemperatureSchedule() const;
99 OS_DEPRECATED(3, 5, 0) boost::optional<Schedule> maximumSourceZoneTemperatureSchedule() const;
100
101 /// Returns the temperature schedule containing the outdoor temperature below which mixing is shutoff.
102 boost::optional<Schedule> minimumOutdoorTemperatureSchedule() const;
103
104 /// Returns the temperature schedule containing the outdoor temperature above which mixing is shutoff.
105 boost::optional<Schedule> maximumOutdoorTemperatureSchedule() const;
106
107 //@}
108 /** @name Setters */
109 //@{
110
111 /// Sets the fractional schedule which moderates amount of air flow from the design level.
112 bool setSchedule(Schedule& schedule);
113
114 bool setDesignFlowRate(double designFlowRate);
115
116 bool setFlowRateperFloorArea(double flowRateperFloorArea);
117 OS_DEPRECATED(3, 5, 0) bool setFlowRateperZoneFloorArea(double flowRateperZoneFloorArea);
118
119 bool setFlowRateperPerson(double flowRateperPerson);
120
121 bool setAirChangesperHour(double airChangesperHour);
122
123 /// Sets the ThermalZone which supplies air to this mixing object.
124 bool setSourceZone(const ThermalZone& zone);
125 OS_DEPRECATED(3, 5, 0) void resetSourceZone();
126
127 bool setSourceSpace(const Space& space);
128 void resetSourceZoneOrSpace();
129
130 /// Sets the constant temperature differential between source and receiving zones below which mixing is shutoff.
131 bool setDeltaTemperature(double deltaTemperature);
132
133 void resetDeltaTemperature();
134
135 /// Sets the temperature schedule containing the differential between source and receiving zones versus time below which mixing is shutoff.
136 bool setDeltaTemperatureSchedule(Schedule& schedule);
137
138 void resetDeltaTemperatureSchedule();
139
140 /// Sets the temperature schedule containing the receiving zone dry-bulb temperature below which mixing is shutoff.
141 bool setMinimumReceivingTemperatureSchedule(Schedule& schedule);
142 void resetMinimumReceivingTemperatureSchedule();
143
144 OS_DEPRECATED(3, 5, 0) bool setMinimumZoneTemperatureSchedule(Schedule& schedule);
145 OS_DEPRECATED(3, 5, 0) void resetMinimumZoneTemperatureSchedule();
146
147 /// Sets the temperature schedule containing the receiving zone dry-bulb temperature above which mixing is shutoff.
148 bool setMaximumReceivingTemperatureSchedule(Schedule& schedule);
149 void resetMaximumReceivingTemperatureSchedule();
150
151 OS_DEPRECATED(3, 5, 0) bool setMaximumZoneTemperatureSchedule(Schedule& schedule);
152 OS_DEPRECATED(3, 5, 0) void resetMaximumZoneTemperatureSchedule();
153
154 /// Sets the temperature schedule containing the source zone dry-bulb temperature below which mixing is shutoff.
155 bool setMinimumSourceTemperatureSchedule(Schedule& schedule);
156 void resetMinimumSourceTemperatureSchedule();
157
158 OS_DEPRECATED(3, 5, 0) bool setMinimumSourceZoneTemperatureSchedule(Schedule& schedule);
159 OS_DEPRECATED(3, 5, 0) void resetMinimumSourceZoneTemperatureSchedule();
160
161 /// Sets the temperature schedule containing the source zone dry-bulb temperature above which mixing is shutoff.
162 bool setMaximumSourceTemperatureSchedule(Schedule& schedule);
163 void resetMaximumSourceTemperatureSchedule();
164
165 OS_DEPRECATED(3, 5, 0) bool setMaximumSourceZoneTemperatureSchedule(Schedule& schedule);
166 OS_DEPRECATED(3, 5, 0) void resetMaximumSourceZoneTemperatureSchedule();
167
168 /// Returns the temperature schedule containing the outdoor temperature below which mixing is shutoff.
169 bool setMinimumOutdoorTemperatureSchedule(Schedule& schedule);
170
171 void resetMinimumOutdoorTemperatureSchedule();
172
173 /// Returns the temperature schedule containing the outdoor temperature above which mixing is shutoff.
174 bool setMaximumOutdoorTemperatureSchedule(Schedule& schedule);
175
176 void resetMaximumOutdoorTemperatureSchedule();
177
178 //@}
179 /** @name Other */
180 //@{
181
182 //@}
183
184 protected:
185 /// @cond
186 using ImplType = detail::ZoneMixing_Impl;
187
188 explicit ZoneMixing(std::shared_ptr<detail::ZoneMixing_Impl> impl);
189
190 friend class detail::ZoneMixing_Impl;
191 friend class Model;
192 friend class IdfObject;
193 friend class openstudio::detail::IdfObject_Impl;
194 /// @endcond
195 private:
196 − REGISTER_LOGGER("openstudio.model.ZoneMixing");
197 };
198
199 /** \relates ZoneMixing*/
200 using OptionalZoneMixing = boost::optional<ZoneMixing>;
201
202 /** \relates ZoneMixing*/
203 using ZoneMixingVector = std::vector<ZoneMixing>;
204
205 } // namespace model
206 } // namespace openstudio
207
208 #endif // MODEL_ZONEMIXING_HPP
209