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/HeatExchangerAirToAirSensibleAndLatent_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_HEATEXCHANGERAIRTOAIRSENSIBLEANDLATENT_IMPL_HPP
7 #define MODEL_HEATEXCHANGERAIRTOAIRSENSIBLEANDLATENT_IMPL_HPP
8
9 #include "ModelAPI.hpp"
10 #include "AirToAirComponent_Impl.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 class Schedule;
16 class Connection;
17 class Curve;
18
19 namespace detail {
20
21 /** HeatExchangerAirToAirSensibleAndLatent_Impl is a AirToAirComponent_Impl that is the implementation class for HeatExchangerAirToAirSensibleAndLatent.*/
22 class MODEL_API HeatExchangerAirToAirSensibleAndLatent_Impl : public AirToAirComponent_Impl
23 {
24
25 public:
26 /** @name Constructors and Destructors */
27 //@{
28
29 HeatExchangerAirToAirSensibleAndLatent_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
30
31 HeatExchangerAirToAirSensibleAndLatent_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
32
33 HeatExchangerAirToAirSensibleAndLatent_Impl(const HeatExchangerAirToAirSensibleAndLatent_Impl& other, Model_Impl* model, bool keepHandle);
34
35 100 virtual ~HeatExchangerAirToAirSensibleAndLatent_Impl() override = default;
36
37 //@}
38 /** @name Virtual Methods */
39 //@{
40
41 virtual std::vector<ModelObject> children() const override;
42
43 virtual const std::vector<std::string>& outputVariableNames() const override;
44
45 virtual IddObjectType iddObjectType() const override;
46
47 virtual std::vector<ScheduleTypeKey> getScheduleTypeKeys(const Schedule& schedule) const override;
48
49 // Returns an eventual CoilSystemCooling Water/DX HeatExchangerAssisted
50 virtual boost::optional<HVACComponent> containingHVACComponent() const override;
51
52 /* Override disallows addToNode when part of a CoilSystemCooling Water/DX HeatExchangerAssisted
53 * otherwise calls parent AirToAirComponent_Impl::addToNode
54 */
55 virtual bool addToNode(Node& node) override;
56
57 virtual void autosize() override;
58
59 virtual void applySizingValues() override;
60
61 virtual unsigned primaryAirInletPort() const override;
62
63 virtual unsigned primaryAirOutletPort() const override;
64
65 virtual unsigned secondaryAirInletPort() const override;
66
67 virtual unsigned secondaryAirOutletPort() const override;
68
69 virtual ComponentType componentType() const override;
70 virtual std::vector<FuelType> coolingFuelTypes() const override;
71 virtual std::vector<FuelType> heatingFuelTypes() const override;
72 virtual std::vector<AppGFuelType> appGHeatingFuelTypes() const override;
73
74 //@}
75 /** @name Getters */
76 //@{
77
78 Schedule availabilitySchedule() const;
79
80 boost::optional<double> nominalSupplyAirFlowRate() const;
81
82 bool isNominalSupplyAirFlowRateAutosized() const;
83
84 double sensibleEffectivenessat100HeatingAirFlow() const;
85
86 double latentEffectivenessat100HeatingAirFlow() const;
87
88 double sensibleEffectivenessat100CoolingAirFlow() const;
89
90 double latentEffectivenessat100CoolingAirFlow() const;
91
92 double nominalElectricPower() const;
93
94 bool supplyAirOutletTemperatureControl() const;
95
96 std::string heatExchangerType() const;
97
98 std::string frostControlType() const;
99
100 double thresholdTemperature() const;
101
102 bool isThresholdTemperatureDefaulted() const;
103
104 boost::optional<double> initialDefrostTimeFraction() const;
105
106 boost::optional<double> rateofDefrostTimeFractionIncrease() const;
107
108 bool economizerLockout() const;
109
110 boost::optional<Curve> sensibleEffectivenessofHeatingAirFlowCurve() const;
111
112 boost::optional<Curve> latentEffectivenessofHeatingAirFlowCurve() const;
113
114 boost::optional<Curve> sensibleEffectivenessofCoolingAirFlowCurve() const;
115
116 boost::optional<Curve> latentEffectivenessofCoolingAirFlowCurve() const;
117
118 //@}
119 /** @name Setters */
120 //@{
121
122 bool setAvailabilitySchedule(Schedule& schedule);
123
124 bool setNominalSupplyAirFlowRate(boost::optional<double> nominalSupplyAirFlowRate);
125 void autosizeNominalSupplyAirFlowRate();
126
127 bool setSensibleEffectivenessat100HeatingAirFlow(double sensibleEffectivenessat100HeatingAirFlow);
128
129 bool setLatentEffectivenessat100HeatingAirFlow(double latentEffectivenessat100HeatingAirFlow);
130
131 bool setSensibleEffectivenessat100CoolingAirFlow(double sensibleEffectivenessat100CoolingAirFlow);
132
133 bool setLatentEffectivenessat100CoolingAirFlow(double latentEffectivenessat100CoolingAirFlow);
134
135 bool setNominalElectricPower(double nominalElectricPower);
136
137 bool setSupplyAirOutletTemperatureControl(bool supplyAirOutletTemperatureControl);
138
139 bool setHeatExchangerType(const std::string& heatExchangerType);
140
141 bool setFrostControlType(const std::string& frostControlType);
142
143 bool setThresholdTemperature(double thresholdTemperature);
144 void resetThresholdTemperature();
145
146 bool setInitialDefrostTimeFraction(boost::optional<double> initialDefrostTimeFraction);
147 void resetInitialDefrostTimeFraction();
148
149 bool setRateofDefrostTimeFractionIncrease(boost::optional<double> rateofDefrostTimeFractionIncrease);
150 void resetRateofDefrostTimeFractionIncrease();
151
152 bool setEconomizerLockout(bool economizerLockout);
153
154 bool setSensibleEffectivenessofHeatingAirFlowCurve(const Curve& sensibleEffectivenessofHeatingAirFlowCurve);
155 void resetSensibleEffectivenessofHeatingAirFlowCurve();
156
157 bool setLatentEffectivenessofHeatingAirFlowCurve(const Curve& latentEffectivenessofHeatingAirFlowCurve);
158 void resetLatentEffectivenessofHeatingAirFlowCurve();
159
160 bool setSensibleEffectivenessofCoolingAirFlowCurve(const Curve& sensibleEffectivenessofCoolingAirFlowCurve);
161 void resetSensibleEffectivenessofCoolingAirFlowCurve();
162
163 bool setLatentEffectivenessofCoolingAirFlowCurve(const Curve& latentEffectivenessofCoolingAirFlowCurve);
164 void resetLatentEffectivenessofCoolingAirFlowCurve();
165
166 //@}
167 /** @name Other */
168 //@{
169
170 AirflowNetworkEquivalentDuct getAirflowNetworkEquivalentDuct(double length, double diameter);
171 boost::optional<AirflowNetworkEquivalentDuct> airflowNetworkEquivalentDuct() const;
172
173 boost::optional<double> autosizedNominalSupplyAirFlowRate() const;
174
175 //@}
176
177 protected:
178 private:
179 − REGISTER_LOGGER("openstudio.model.HeatExchangerAirToAirSensibleAndLatent");
180
181 // TODO: Check the return types of these methods.
182 // Optional getters for use by methods like children() so can remove() if the constructor fails.
183 // There are other ways for the public versions of these getters to fail--perhaps all required
184 // objects should be returned as boost::optionals
185 boost::optional<Schedule> optionalAvailabilitySchedule() const;
186
187 std::vector<std::string> heatExchangerTypeValues() const;
188 std::vector<std::string> frostControlTypeValues() const;
189 boost::optional<ModelObject> availabilityScheduleAsModelObject() const;
190
191 bool setAvailabilityScheduleAsModelObject(const boost::optional<ModelObject>& modelObject);
192 };
193
194 } // namespace detail
195
196 } // namespace model
197 } // namespace openstudio
198
199 #endif // MODEL_HEATEXCHANGERAIRTOAIRSENSIBLEANDLATENT_IMPL_HPP
200