GCC Code Coverage Report


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

src/model/CurveFanPressureRise.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_CURVEFANPRESSURERISE_HPP
7 #define MODEL_CURVEFANPRESSURERISE_HPP
8
9 #include "ModelAPI.hpp"
10 #include "Curve.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 namespace detail {
16
17 class CurveFanPressureRise_Impl;
18
19 } // namespace detail
20
21 /** CurveFanPressureRise is a Curve that wraps the OpenStudio IDD object
22 * 'OS:Curve:FanPressureRise'. The functional form is \f$\Delta P_{fan,tot} = c_1 \cdot {Q_{fan}}^2 + c_2 \cdot Q_{fan} + c_3 \cdot Q_{fan} \cdot \sqrt{P_{sm} - P_o} + c_4 \cdot (P_{sm} - P_o),\ \text{where}\ P_o = 0.0\f$ */
23 class MODEL_API CurveFanPressureRise : public Curve
24 {
25 public:
26 /** @name Constructors and Destructors */
27 //@{
28
29 /** Sets \f$c_1 = c_2 = c_3 = c_4 = 1.0,\ Q_{fan}\ \text{within}\ [0.0,10.0], P_{sm}\ \text{within}\ [0.0,500.0]\f$ */
30 explicit CurveFanPressureRise(const Model& model);
31
32 25 virtual ~CurveFanPressureRise() override = default;
33 // Default the copy and move operators because the virtual dtor is explicit
34 ✗ CurveFanPressureRise(const CurveFanPressureRise& other) = default;
35 ✗ CurveFanPressureRise(CurveFanPressureRise&& other) = default;
36 ✗ CurveFanPressureRise& operator=(const CurveFanPressureRise&) = default;
37 ✗ CurveFanPressureRise& operator=(CurveFanPressureRise&&) = default;
38
39 //@}
40
41 static IddObjectType iddObjectType();
42
43 /** @name Getters */
44 //@{
45
46 double coefficient1C1() const;
47
48 double coefficient2C2() const;
49
50 double coefficient3C3() const;
51
52 double coefficient4C4() const;
53
54 double minimumValueofQfan() const;
55
56 double maximumValueofQfan() const;
57
58 double minimumValueofPsm() const;
59
60 double maximumValueofPsm() const;
61
62 boost::optional<double> minimumCurveOutput() const;
63
64 boost::optional<double> maximumCurveOutput() const;
65
66 //@}
67 /** @name Setters */
68 //@{
69
70 bool setCoefficient1C1(double coefficient1C1);
71
72 bool setCoefficient2C2(double coefficient2C2);
73
74 bool setCoefficient3C3(double coefficient3C3);
75
76 bool setCoefficient4C4(double coefficient4C4);
77
78 bool setMinimumValueofQfan(double minimumValueofQfan);
79
80 bool setMaximumValueofQfan(double maximumValueofQfan);
81
82 bool setMinimumValueofPsm(double minimumValueofPsm);
83
84 bool setMaximumValueofPsm(double maximumValueofPsm);
85
86 bool setMinimumCurveOutput(double minimumCurveOutput);
87
88 void resetMinimumCurveOutput();
89
90 bool setMaximumCurveOutput(double maximumCurveOutput);
91
92 void resetMaximumCurveOutput();
93
94 //@}
95 /** @name Other */
96 //@{
97
98 //@}
99 protected:
100 /// @cond
101 using ImplType = detail::CurveFanPressureRise_Impl;
102
103 explicit CurveFanPressureRise(std::shared_ptr<detail::CurveFanPressureRise_Impl> impl);
104
105 friend class detail::CurveFanPressureRise_Impl;
106 friend class Model;
107 friend class IdfObject;
108 friend class openstudio::detail::IdfObject_Impl;
109
110 /// @endcond
111 private:
112 REGISTER_LOGGER("openstudio.model.CurveFanPressureRise");
113 };
114
115 /** \relates CurveFanPressureRise*/
116 using OptionalCurveFanPressureRise = boost::optional<CurveFanPressureRise>;
117
118 /** \relates CurveFanPressureRise*/
119 using CurveFanPressureRiseVector = std::vector<CurveFanPressureRise>;
120
121 } // namespace model
122 } // namespace openstudio
123
124 #endif // MODEL_CURVEFANPRESSURERISE_HPP
125