GCC Code Coverage Report


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

src/model/GeneratorFuelCellAirSupply_Impl.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_GENERATORFUELCELLAIRSUPPLY_IMPL_HPP
7 #define MODEL_GENERATORFUELCELLAIRSUPPLY_IMPL_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ModelObject_Impl.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 class Node;
16 class CurveCubic;
17 class CurveQuadratic;
18 class GeneratorFuelCell;
19 class AirSupplyConstituent;
20
21 namespace detail {
22
23 /** GeneratorFuelCellAirSupply_Impl is a ModelObject_Impl that is the implementation class for GeneratorFuelCellAirSupply.*/
24 class MODEL_API GeneratorFuelCellAirSupply_Impl : public ModelObject_Impl
25 {
26 public:
27 /** @name Constructors and Destructors */
28 //@{
29
30 GeneratorFuelCellAirSupply_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
31
32 GeneratorFuelCellAirSupply_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
33
34 GeneratorFuelCellAirSupply_Impl(const GeneratorFuelCellAirSupply_Impl& other, Model_Impl* model, bool keepHandle);
35
36 15 virtual ~GeneratorFuelCellAirSupply_Impl() override = default;
37
38 //@}
39 /** @name Virtual Methods */
40 //@{
41
42 virtual const std::vector<std::string>& outputVariableNames() const override;
43
44 virtual IddObjectType iddObjectType() const override;
45
46 virtual std::vector<IddObjectType> allowableChildTypes() const;
47
48 virtual std::vector<ModelObject> children() const;
49
50 //extensible fields.
51 bool addConstituent(const AirSupplyConstituent& constituent);
52 bool addConstituent(const std::string& name, double molarFraction);
53
54 bool removeConstituent(unsigned groupIndex);
55
56 void removeAllConstituents();
57
58 std::vector<AirSupplyConstituent> constituents() const;
59
60 //@}
61 /** @name Getters */
62 //@{
63
64 boost::optional<Node> airInletNode() const;
65
66 boost::optional<CurveCubic> blowerPowerCurve() const;
67
68 double blowerHeatLossFactor() const;
69
70 std::string airSupplyRateCalculationMode() const;
71
72 boost::optional<double> stoichiometricRatio() const;
73
74 boost::optional<CurveQuadratic> airRateFunctionofElectricPowerCurve() const;
75
76 boost::optional<double> airRateAirTemperatureCoefficient() const;
77
78 boost::optional<CurveQuadratic> airRateFunctionofFuelRateCurve() const;
79
80 std::string airIntakeHeatRecoveryMode() const;
81
82 std::string airSupplyConstituentMode() const;
83
84 unsigned int numberofUserDefinedConstituents() const;
85
86 // Convenience function to check that it's equal to 1.0 (If no constituents, returns 0 and warns)
87 double sumofConstituentsMolarFractions() const;
88
89 // Return optional parent generator
90 boost::optional<GeneratorFuelCell> fuelCell() const;
91
92 //@}
93 /** @name Setters */
94 //@{
95
96 bool setAirInletNode(const Node& connection);
97
98 void resetAirInletNode();
99
100 bool setBlowerPowerCurve(const CurveCubic& cubicCurves);
101
102 void resetBlowerPowerCurve();
103
104 bool setBlowerHeatLossFactor(double blowerHeatLossFactor);
105
106 void resetBlowerHeatLossFactor();
107
108 bool setAirSupplyRateCalculationMode(const std::string& airSupplyRateCalculationMode);
109
110 bool setStoichiometricRatio(double stoichiometricRatio);
111
112 void resetStoichiometricRatio();
113
114 bool setAirRateFunctionofElectricPowerCurve(const CurveQuadratic& quadraticCurves);
115
116 void resetAirRateFunctionofElectricPowerCurve();
117
118 bool setAirRateAirTemperatureCoefficient(double airRateAirTemperatureCoefficient);
119
120 void resetAirRateAirTemperatureCoefficient();
121
122 bool setAirRateFunctionofFuelRateCurve(const CurveQuadratic& quadraticCurves);
123
124 void resetAirRateFunctionofFuelRateCurve();
125
126 bool setAirIntakeHeatRecoveryMode(const std::string& airIntakeHeatRecoveryMode);
127
128 bool setAirSupplyConstituentMode(const std::string& airSupplyConstituentMode);
129
130 //@}
131 /** @name Other */
132 //@{
133
134 //@}
135 protected:
136 private:
137 // Not to be exposed publicly, handled automatically by add/removeConstituent
138 bool setNumberofUserDefinedConstituents(unsigned int numberofUserDefinedConstituents);
139 void resetNumberofUserDefinedConstituents();
140
141 − REGISTER_LOGGER("openstudio.model.GeneratorFuelCellAirSupply");
142 };
143
144 } // namespace detail
145
146 } // namespace model
147 } // namespace openstudio
148
149 #endif // MODEL_GENERATORFUELCELLAIRSUPPLY_IMPL_HPP
150