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/RoofVegetation_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_ROOFVEGETATION_IMPL_HPP
7 #define MODEL_ROOFVEGETATION_IMPL_HPP
8
9 #include "ModelAPI.hpp"
10 #include "OpaqueMaterial_Impl.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 namespace detail {
16
17 /** RoofVegetation_Impl is a OpaqueMaterial_Impl that is the implementation class for RoofVegetation.*/
18 class MODEL_API RoofVegetation_Impl : public OpaqueMaterial_Impl
19 {
20
21 public:
22 /** @name Constructors and Destructors */
23 //@{
24
25 RoofVegetation_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
26
27 RoofVegetation_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
28
29 RoofVegetation_Impl(const RoofVegetation_Impl& other, Model_Impl* model, bool keepHandle);
30
31 4 virtual ~RoofVegetation_Impl() override = default;
32
33 //@}
34
35 /** @name Virtual Methods */
36 //@{
37
38 virtual const std::vector<std::string>& outputVariableNames() const override;
39
40 virtual IddObjectType iddObjectType() const override;
41
42 //@}
43 /** @name Getters */
44 //@{
45
46 double heightofPlants() const;
47
48 bool isHeightofPlantsDefaulted() const;
49
50 double leafAreaIndex() const;
51
52 bool isLeafAreaIndexDefaulted() const;
53
54 double leafReflectivity() const;
55
56 bool isLeafReflectivityDefaulted() const;
57
58 double leafEmissivity() const;
59
60 bool isLeafEmissivityDefaulted() const;
61
62 double minimumStomatalResistance() const;
63
64 bool isMinimumStomatalResistanceDefaulted() const;
65
66 std::string soilLayerName() const;
67
68 bool isSoilLayerNameDefaulted() const;
69
70 std::string roughness() const;
71
72 /** Get the thickness of the material. */
73 virtual double thickness() const override;
74
75 /** The conductivity of the material in W/m*K. */
76 virtual double thermalConductivity() const override;
77
78 /** The conductance of the material in W/m^2*K. */
79 virtual double thermalConductance() const override;
80
81 /** The resistivity of the material in m*K/W. */
82 virtual double thermalResistivity() const override;
83
84 /** The resistance of the material in m^2*K/W. */
85 double thermalResistance() const override;
86
87 /** Density of dry soil (kg/m^3). */
88 double density() const;
89
90 /** Specific heat of dry soil (J/kg*K). */
91 double specificHeat() const;
92
93 virtual double thermalTransmittance() const;
94
95 virtual double thermalAbsorptance() const override;
96
97 virtual boost::optional<double> thermalReflectance() const override;
98
99 virtual double solarTransmittance() const;
100
101 virtual double solarAbsorptance() const override;
102
103 virtual boost::optional<double> solarReflectance() const override;
104
105 virtual double visibleTransmittance() const;
106
107 virtual double visibleAbsorptance() const override;
108
109 virtual boost::optional<double> visibleReflectance() const override;
110
111 /** Maximum moisture content of the soil layer by volume fraction. */
112 double saturationVolumetricMoistureContent() const;
113
114 double residualVolumetricMoistureContent() const;
115
116 double initialVolumetricMoistureContent() const;
117
118 bool isRoughnessDefaulted() const;
119
120 bool isThicknessDefaulted() const;
121
122 double conductivityofDrySoil() const;
123
124 bool isConductivityofDrySoilDefaulted() const;
125
126 double densityofDrySoil() const;
127
128 bool isDensityofDrySoilDefaulted() const;
129
130 double specificHeatofDrySoil() const;
131
132 bool isSpecificHeatofDrySoilDefaulted() const;
133
134 bool isThermalAbsorptanceDefaulted() const;
135
136 bool isSolarAbsorptanceDefaulted() const;
137
138 bool isVisibleAbsorptanceDefaulted() const;
139
140 double saturationVolumetricMoistureContentoftheSoilLayer() const;
141
142 bool isSaturationVolumetricMoistureContentoftheSoilLayerDefaulted() const;
143
144 double residualVolumetricMoistureContentoftheSoilLayer() const;
145
146 bool isResidualVolumetricMoistureContentoftheSoilLayerDefaulted() const;
147
148 double initialVolumetricMoistureContentoftheSoilLayer() const;
149
150 bool isInitialVolumetricMoistureContentoftheSoilLayerDefaulted() const;
151
152 std::string moistureDiffusionCalculationMethod() const;
153
154 bool isMoistureDiffusionCalculationMethodDefaulted() const;
155
156 //@}
157 /** @name Setters */
158 //@{
159
160 bool setHeightOfPlants(double value);
161
162 bool setLeafAreaIndex(double value);
163
164 bool setLeafReflectivity(double value);
165
166 bool setLeafEmissivity(double value);
167
168 bool setMinimumStomatalResistance(double value);
169
170 bool setSoilLayerName(const std::string& name);
171
172 bool setRoughness(const std::string& value);
173
174 /** Set thickness to value (m). */
175 virtual bool setThickness(double value) override;
176
177 /** Sets the conductivity of the material in W/m*K, if possible. */
178 virtual bool setThermalConductivity(double value) override;
179
180 /** Sets the conductance of the material in W/m^2*K, if possible. */
181 virtual bool setThermalConductance(double value) override;
182
183 /** Sets the resistivity of the material in m*K/W, if possible. */
184 virtual bool setThermalResistivity(double value) override;
185
186 /** Sets the resistance of the material in m^2*K/W, if possible. */
187 virtual bool setThermalResistance(double value) override;
188
189 /** Set density of dry soil (kg/m^3). */
190 bool setDensity(double value);
191
192 /** Set specific heat of dry soil (J/kg*K). */
193 bool setSpecificHeat(double value);
194
195 virtual bool setThermalTransmittance(double value);
196
197 virtual bool setThermalAbsorptance(boost::optional<double> value);
198
199 virtual bool setThermalReflectance(boost::optional<double> value) override;
200
201 virtual bool setSolarTransmittance(double value);
202
203 virtual bool setSolarAbsorptance(boost::optional<double> value) override;
204
205 virtual bool setSolarReflectance(boost::optional<double> value) override;
206
207 virtual bool setVisibleTransmittance(double value);
208
209 virtual bool setVisibleAbsorptance(boost::optional<double> value) override;
210
211 virtual bool setVisibleReflectance(boost::optional<double> value) override;
212
213 /** Set the maximum moisture content of the soil layer by volume fraction. */
214 bool setSaturationVolumetricMoistureContent(double value);
215
216 bool setResidualVolumetricMoistureContent(double value);
217
218 bool setInitialVolumetricMoistureContent(double value);
219
220 bool setMoistureDiffusionCalculationMethod(const std::string& value);
221
222 bool setHeightofPlants(double heightofPlants);
223
224 void resetHeightofPlants();
225
226 void resetLeafAreaIndex();
227
228 void resetLeafReflectivity();
229
230 void resetLeafEmissivity();
231
232 void resetMinimumStomatalResistance();
233
234 void resetSoilLayerName();
235
236 void resetRoughness();
237
238 void resetThickness();
239
240 bool setConductivityofDrySoil(double conductivityofDrySoil);
241
242 void resetConductivityofDrySoil();
243
244 bool setDensityofDrySoil(double densityofDrySoil);
245
246 void resetDensityofDrySoil();
247
248 bool setSpecificHeatofDrySoil(double specificHeatofDrySoil);
249
250 void resetSpecificHeatofDrySoil();
251
252 bool setThermalAbsorptance(double thermalAbsorptance) override;
253
254 void resetThermalAbsorptance();
255
256 bool setSolarAbsorptance(double solarAbsorptance);
257
258 void resetSolarAbsorptance();
259
260 bool setVisibleAbsorptance(double visibleAbsorptance);
261
262 void resetVisibleAbsorptance();
263
264 bool setSaturationVolumetricMoistureContentoftheSoilLayer(double saturationVolumetricMoistureContentoftheSoilLayer);
265
266 void resetSaturationVolumetricMoistureContentoftheSoilLayer();
267
268 bool setResidualVolumetricMoistureContentoftheSoilLayer(double residualVolumetricMoistureContentoftheSoilLayer);
269
270 void resetResidualVolumetricMoistureContentoftheSoilLayer();
271
272 bool setInitialVolumetricMoistureContentoftheSoilLayer(double initialVolumetricMoistureContentoftheSoilLayer);
273
274 void resetInitialVolumetricMoistureContentoftheSoilLayer();
275
276 void resetMoistureDiffusionCalculationMethod();
277
278 //@}
279 /** @name Queries */
280 //@{
281
282 /** Energy it takes to raise the temperature of this material 1 K (J/m^2*K). Equal to
283 * specificHeat() * density() * thickness(). */
284 virtual boost::optional<double> heatCapacity() const override;
285
286 //@}
287 /** @name Other */
288 //@{
289
290 //@}
291 protected:
292 private:
293 − REGISTER_LOGGER("openstudio.model.RoofVegetation");
294
295 std::vector<std::string> roughnessValues() const;
296 std::vector<std::string> moistureDiffusionCalculationMethodValues() const;
297 };
298
299 } // namespace detail
300
301 } // namespace model
302 } // namespace openstudio
303
304 #endif // MODEL_ROOFVEGETATION_IMPL_HPP
305