GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 60.0% 3 / 0 / 5
Functions: 60.0% 3 / 0 / 5
Branches: -% 0 / 0 / 0

src/model/SpaceInfiltrationDesignFlowRate.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_SPACEINFILTRATIONDESIGNFLOWRATE_HPP
7 #define MODEL_SPACEINFILTRATIONDESIGNFLOWRATE_HPP
8
9 #include "ModelAPI.hpp"
10 #include "SpaceLoad.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 class Schedule;
16
17 namespace detail {
18
19 class SpaceInfiltrationDesignFlowRate_Impl;
20
21 } // namespace detail
22
23 /** SpaceInfiltrationDesignFlowRate is a SpaceLoad that wraps the OpenStudio IDD
24 * object 'OS:SpaceInfiltration:DesignFlowRate'. */
25 class MODEL_API SpaceInfiltrationDesignFlowRate : public SpaceLoad
26 {
27 public:
28 /** @name Constructors and Destructors */
29 //@{
30
31 explicit SpaceInfiltrationDesignFlowRate(const Model& model);
32
33 519 virtual ~SpaceInfiltrationDesignFlowRate() override = default;
34 // Default the copy and move operators because the virtual dtor is explicit
35 3 SpaceInfiltrationDesignFlowRate(const SpaceInfiltrationDesignFlowRate& other) = default;
36 186 SpaceInfiltrationDesignFlowRate(SpaceInfiltrationDesignFlowRate&& other) = default;
37 ✗ SpaceInfiltrationDesignFlowRate& operator=(const SpaceInfiltrationDesignFlowRate&) = default;
38 ✗ SpaceInfiltrationDesignFlowRate& operator=(SpaceInfiltrationDesignFlowRate&&) = default;
39
40 //@}
41 /** @name Static Methods */
42 //@{
43
44 static IddObjectType iddObjectType();
45
46 static std::vector<std::string> validDesignFlowRateCalculationMethodValues();
47
48 static std::vector<std::string> designFlowRateCalculationMethodValues();
49
50 static std::vector<std::string> densityBasisValues();
51
52 //@}
53 /** @name Getters */
54 //@{
55
56 /** Returns the (fractional) infiltration schedule. If this object does not
57 * specify a schedule this function will search the hierarchy. */
58 boost::optional<Schedule> schedule() const;
59
60 /** Returns true if this object does not specify a schedule directly. */
61 bool isScheduleDefaulted() const;
62
63 std::string designFlowRateCalculationMethod() const;
64
65 boost::optional<double> designFlowRate() const;
66
67 boost::optional<double> flowperSpaceFloorArea() const;
68
69 boost::optional<double> flowperExteriorSurfaceArea() const;
70
71 boost::optional<double> flowperExteriorWallArea() const;
72
73 boost::optional<double> airChangesperHour() const;
74
75 double constantTermCoefficient() const;
76
77 bool isConstantTermCoefficientDefaulted() const;
78
79 double temperatureTermCoefficient() const;
80
81 bool isTemperatureTermCoefficientDefaulted() const;
82
83 double velocityTermCoefficient() const;
84
85 bool isVelocityTermCoefficientDefaulted() const;
86
87 double velocitySquaredTermCoefficient() const;
88
89 bool isVelocitySquaredTermCoefficientDefaulted() const;
90
91 std::string densityBasis() const;
92
93 //@}
94 /** @name Setters */
95 //@{
96
97 /** Sets the (fractional) Schedule. */
98 bool setSchedule(Schedule& schedule);
99
100 /** Resets the (fractional) Schedule. */
101 void resetSchedule();
102
103 bool setDesignFlowRate(double designFlowRate);
104
105 bool setFlowperSpaceFloorArea(double flowperSpaceFloorArea);
106
107 bool setFlowperExteriorSurfaceArea(double flowperExteriorSurfaceArea);
108
109 bool setFlowperExteriorWallArea(double flowperExteriorWallArea);
110
111 bool setAirChangesperHour(double airChangesperHour);
112
113 bool setConstantTermCoefficient(double constantTermCoefficient);
114
115 void resetConstantTermCoefficient();
116
117 bool setTemperatureTermCoefficient(double temperatureTermCoefficient);
118
119 void resetTemperatureTermCoefficient();
120
121 bool setVelocityTermCoefficient(double velocityTermCoefficient);
122
123 void resetVelocityTermCoefficient();
124
125 bool setVelocitySquaredTermCoefficient(double velocitySquaredTermCoefficient);
126
127 void resetVelocitySquaredTermCoefficient();
128
129 bool setDensityBasis(const std::string& densityBasis);
130
131 //@}
132 /** @name Other */
133 //@{
134
135 /** Returns the design flow rate (m^3/s) based on the floorArea (m^2),
136 * exteriorSurfaceArea (m^2), exteriorWallArea (m^2), and airVolume (m^3). */
137 double getDesignFlowRate(double floorArea, double exteriorSurfaceArea, double exteriorWallArea, double airVolume) const;
138
139 /** Returns the design flow per space floor area (m^3/m^2*s) based on the
140 * floorArea (m^2), exteriorSurfaceArea (m^2), exteriorWallArea (m^2), and
141 * airVolume (m^3). */
142 double getFlowPerSpaceFloorArea(double floorArea, double exteriorSurfaceArea, double exteriorWallArea, double airVolume) const;
143
144 /** Returns the design flow per exterior surface area (m^3/m^2*s) based on the
145 * floorArea (m^2), exteriorSurfaceArea (m^2), exteriorWallArea (m^2), and
146 * airVolume (m^3). */
147 double getFlowPerExteriorSurfaceArea(double floorArea, double exteriorSurfaceArea, double exteriorWallArea, double airVolume) const;
148
149 /** Returns the design flow per exterior wall area (m^3/m^2*s) based on the
150 * floorArea (m^2), exteriorSurfaceArea (m^2), exteriorWallArea (m^2), and
151 * airVolume (m^3). */
152 double getFlowPerExteriorWallArea(double floorArea, double exteriorSurfaceArea, double exteriorWallArea, double airVolume) const;
153
154 /** Returns the design air changes per hour (1/h) based on the floorArea (m^2),
155 * exteriorSurfaceArea (m^2), exteriorWallArea (m^2), and airVolume (m^3). */
156 double getAirChangesPerHour(double floorArea, double exteriorSurfaceArea, double exteriorWallArea, double airVolume) const;
157
158 //@}
159 protected:
160 /// @cond
161 using ImplType = detail::SpaceInfiltrationDesignFlowRate_Impl;
162
163 friend class Model;
164 friend class openstudio::IdfObject;
165
166 explicit SpaceInfiltrationDesignFlowRate(std::shared_ptr<detail::SpaceInfiltrationDesignFlowRate_Impl> impl);
167
168 /// @endcond
169 private:
170 REGISTER_LOGGER("openstudio.model.SpaceInfiltrationDesignFlowRate");
171 };
172
173 /** \relates SpaceInfiltrationDesignFlowRate*/
174 using OptionalSpaceInfiltrationDesignFlowRate = boost::optional<SpaceInfiltrationDesignFlowRate>;
175
176 /** \relates SpaceInfiltrationDesignFlowRate*/
177 using SpaceInfiltrationDesignFlowRateVector = std::vector<SpaceInfiltrationDesignFlowRate>;
178
179 } // namespace model
180 } // namespace openstudio
181
182 #endif // MODEL_SPACEINFILTRATIONDESIGNFLOWRATE_HPP
183