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/StandardOpaqueMaterial_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_STANDARDOPAQUEMATERIAL_IMPL_HPP
7 #define MODEL_STANDARDOPAQUEMATERIAL_IMPL_HPP
8
9 #include "ModelAPI.hpp"
10 #include "OpaqueMaterial_Impl.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 // forward declaration
16 class StandardOpaqueMaterial;
17
18 namespace detail {
19
20 /** StandardOpaqueMaterial_Impl is a OpaqueMaterial_Impl that is the implementation class for StandardOpaqueMaterial.*/
21 class MODEL_API StandardOpaqueMaterial_Impl : public OpaqueMaterial_Impl
22 {
23
24 public:
25 /** @name Constructors and Destructors */
26 //@{
27
28 StandardOpaqueMaterial_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
29
30 StandardOpaqueMaterial_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
31
32 StandardOpaqueMaterial_Impl(const StandardOpaqueMaterial_Impl& other, Model_Impl* model, bool keepHandle);
33
34 5486 virtual ~StandardOpaqueMaterial_Impl() override = default;
35
36 //@}
37
38 /** @name Virtual Methods */
39 //@{
40
41 virtual const std::vector<std::string>& outputVariableNames() const override;
42
43 virtual IddObjectType iddObjectType() const override;
44
45 //@}
46 /** @name Getters */
47 //@{
48
49 // return any children objects in the hierarchy
50 virtual std::vector<ModelObject> children() const override;
51
52 /** The conductivity of the material in W/m*K. */
53 virtual double thermalConductivity() const override;
54
55 /** The conductance of the material in W/m^2*K. */
56 virtual double thermalConductance() const override;
57
58 /** The resistivity of the material in m*K/W. */
59 virtual double thermalResistivity() const override;
60
61 /** The resistance of the material in m^2*K/W. */
62 virtual double thermalResistance() const override;
63
64 virtual boost::optional<double> thermalReflectance() const override;
65
66 virtual boost::optional<double> solarReflectance() const override;
67
68 virtual boost::optional<double> visibleReflectance() const override;
69
70 virtual boost::optional<double> getVisibleTransmittance() const override;
71
72 virtual boost::optional<double> interiorVisibleAbsorptance() const override;
73
74 virtual boost::optional<double> exteriorVisibleAbsorptance() const override;
75
76 virtual std::string roughness() const;
77
78 virtual double thickness() const override;
79
80 virtual double conductivity() const;
81
82 virtual double density() const;
83
84 virtual double specificHeat() const;
85
86 virtual double thermalAbsorptance() const override;
87
88 virtual double solarAbsorptance() const override;
89
90 virtual bool isSolarAbsorptanceDefaulted() const;
91
92 virtual double visibleAbsorptance() const override;
93
94 virtual bool isVisibleAbsorptanceDefaulted() const;
95
96 virtual double thermalAbsorptanceInsideFace() const;
97
98 virtual bool isThermalAbsorptanceInsideFaceDefaulted() const;
99
100 virtual double solarAbsorptanceInsideFace() const;
101
102 virtual bool isSolarAbsorptanceInsideFaceDefaulted() const;
103
104 virtual double visibleAbsorptanceInsideFace() const;
105
106 virtual bool isVisibleAbsorptanceInsideFaceDefaulted() const;
107
108 virtual std::vector<EMSActuatorNames> emsActuatorNames() const override;
109
110 virtual std::vector<std::string> emsInternalVariableNames() const override;
111
112 //@}
113 /** @name Setters */
114 //@{
115
116 /** Sets the conductivity of the material in W/m*K, if possible. */
117 virtual bool setThermalConductivity(double value) override;
118
119 /** Sets the conductance of the material in W/m^2*K, if possible. */
120 virtual bool setThermalConductance(double value) override;
121
122 /** Sets the resistivity of the material in m*K/W, if possible. */
123 virtual bool setThermalResistivity(double value) override;
124
125 /** Sets the resistance of the material in m^2*K/W, if possible. */
126 virtual bool setThermalResistance(double value) override;
127
128 virtual bool setThermalReflectance(boost::optional<double> value) override;
129
130 virtual bool setSolarAbsorptance(boost::optional<double> value) override;
131
132 virtual bool setSolarReflectance(boost::optional<double> value) override;
133
134 virtual bool setVisibleAbsorptance(boost::optional<double> value) override;
135
136 virtual bool setVisibleReflectance(boost::optional<double> value) override;
137
138 virtual bool setRoughness(const std::string& roughness);
139
140 virtual bool setThickness(double thickness) override;
141
142 virtual bool setConductivity(double conductivity);
143
144 virtual bool setDensity(double density);
145
146 virtual bool setSpecificHeat(double specificHeat);
147
148 virtual bool setThermalAbsorptance(double thermalAbsorptance) override;
149
150 virtual void resetThermalAbsorptance();
151
152 virtual bool isThermalAbsorptanceDefaulted() const;
153
154 virtual bool setSolarAbsorptance(double solarAbsorptance);
155
156 virtual void resetSolarAbsorptance();
157
158 virtual bool setVisibleAbsorptance(double visibleAbsorptance);
159
160 virtual void resetVisibleAbsorptance();
161
162 virtual bool setThermalAbsorptanceInsideFace(double thermalAbsorptanceInsideFace);
163
164 virtual void resetThermalAbsorptanceInsideFace();
165
166 virtual bool setSolarAbsorptanceInsideFace(double solarAbsorptanceInsideFace);
167
168 virtual void resetSolarAbsorptanceInsideFace();
169
170 virtual bool setVisibleAbsorptanceInsideFace(double visibleAbsorptanceInsideFace);
171
172 virtual void resetVisibleAbsorptanceInsideFace();
173
174 // if material property moisture penetration depth settings already exists, do nothing and return nil; creates the material property moisture penetration depth settings if it does not already exist and return it;
175 boost::optional<MaterialPropertyMoisturePenetrationDepthSettings>
176 createMaterialPropertyMoisturePenetrationDepthSettings(double waterVaporDiffusionResistanceFactor, double moistureEquationCoefficientA,
177 double moistureEquationCoefficientB, double moistureEquationCoefficientC,
178 double moistureEquationCoefficientD, double coatingLayerThickness,
179 double coatingLayerWaterVaporDiffusionResistanceFactor);
180
181 // returns the material property moisture penetration depth settings if set
182 boost::optional<MaterialPropertyMoisturePenetrationDepthSettings> materialPropertyMoisturePenetrationDepthSettings() const;
183
184 // resets the material property moisture penetration depth settings
185 void resetMaterialPropertyMoisturePenetrationDepthSettings();
186
187 // if material property phase change already exists, do nothing and return nil; creates the material property phase change if it does not already exist and return it;
188 boost::optional<MaterialPropertyPhaseChange> createMaterialPropertyPhaseChange();
189 boost::optional<MaterialPropertyPhaseChange> createMaterialPropertyPhaseChange(const std::vector<TemperatureEnthalpy>& temperatureEnthalpys);
190
191 // returns the material property phase change if set
192 boost::optional<MaterialPropertyPhaseChange> materialPropertyPhaseChange() const;
193
194 // resets the material property phase change
195 void resetMaterialPropertyPhaseChange();
196
197 // if material property phase change hysteresis already exists, do nothing and return nil; creates the material property phase change hysteresis if it does not already exist and return it
198 boost::optional<MaterialPropertyPhaseChangeHysteresis> createMaterialPropertyPhaseChangeHysteresis();
199
200 // returns the material property phase change hysteresis if set
201 boost::optional<MaterialPropertyPhaseChangeHysteresis> materialPropertyPhaseChangeHysteresis() const;
202
203 // resets the material property phase change hysteresis
204 void resetMaterialPropertyPhaseChangeHysteresis();
205
206 //@}
207 /** @name Queries */
208 //@{
209
210 /** Energy it takes to raise the temperature of this material 1 K (J/m^2*K). Equal to
211 * specificHeat() * density() * thickness(). */
212 virtual boost::optional<double> heatCapacity() const override;
213
214 //@}
215
216 //@}
217 /** @name Other */
218 //@{
219
220 //@}
221 protected:
222 private:
223 − REGISTER_LOGGER("openstudio.model.StandardOpaqueMaterial");
224
225 std::vector<std::string> roughnessValues() const;
226 };
227
228 } // namespace detail
229
230 } // namespace model
231 } // namespace openstudio
232
233 #endif // MODEL_STANDARDOPAQUEMATERIAL_IMPL_HPP
234