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/Gas_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_GAS_IMPL_HPP
7 #define MODEL_GAS_IMPL_HPP
8
9 #include "ModelAPI.hpp"
10 #include "GasLayer_Impl.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 namespace detail {
16
17 /** Gas_Impl is a GasLayer_Impl that is the implementation class for Gas.*/
18 class MODEL_API Gas_Impl : public GasLayer_Impl
19 {
20
21 public:
22 /** @name Constructors and Destructors */
23 //@{
24
25 Gas_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
26
27 Gas_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
28
29 Gas_Impl(const Gas_Impl& other, Model_Impl* model, bool keepHandle);
30
31 316 virtual ~Gas_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 /** Gets the gas type. Throws if value is not available. */
47 std::string gasType() const;
48
49 /** Get the thickness of the material. Will throw if value is not available. */
50 virtual double thickness() const override;
51
52 /** The conductivity (W/m*K) at temperature (K). Will throw if necessary values are not
53 * available. */
54 double getThermalConductivity(double temperature) const;
55
56 /** The conductance (W/m^2*K) at temperature (K). Will throw if necessary values are not
57 * available. */
58 double getThermalConductance(double temperature) const;
59
60 /** The resistivity (m*K/W) at temperature (K). Will throw if necessary values are not
61 * available. */
62 double getThermalResistivity(double temperature) const;
63
64 /** The resistance (m^2*K/W) at temperature (K). Will throw if necessary values are not
65 * available. */
66 double getThermalResistance(double temperature) const;
67
68 double getViscosity(double temperature) const;
69
70 double getSpecificHeat(double temperature) const;
71
72 boost::optional<double> customConductivityCoefficientA() const;
73
74 boost::optional<double> customConductivityCoefficientB() const;
75
76 boost::optional<double> customConductivityCoefficientC() const;
77
78 boost::optional<double> customViscosityCoefficientA() const;
79
80 boost::optional<double> customViscosityCoefficientB() const;
81
82 boost::optional<double> customViscosityCoefficientC() const;
83
84 boost::optional<double> customSpecificHeatCoefficientA() const;
85
86 boost::optional<double> customSpecificHeatCoefficientB() const;
87
88 boost::optional<double> customSpecificHeatCoefficientC() const;
89
90 boost::optional<double> customMolecularWeight() const;
91
92 boost::optional<double> conductivityCoefficientA() const;
93
94 boost::optional<double> conductivityCoefficientB() const;
95
96 boost::optional<double> conductivityCoefficientC() const;
97
98 boost::optional<double> viscosityCoefficientA() const;
99
100 boost::optional<double> viscosityCoefficientB() const;
101
102 boost::optional<double> viscosityCoefficientC() const;
103
104 boost::optional<double> specificHeatCoefficientA() const;
105
106 boost::optional<double> specificHeatCoefficientB() const;
107
108 boost::optional<double> specificHeatCoefficientC() const;
109
110 boost::optional<double> molecularWeight() const;
111
112 boost::optional<double> specificHeatRatio() const;
113
114 //@}
115 /** @name Setters */
116 //@{
117
118 virtual bool setThickness(double value) override;
119
120 bool setCustomConductivity(double A, double B, double C);
121
122 bool setCustomViscosity(double A, double B, double C);
123
124 bool setCustomSpecificHeat(double A, double B, double C);
125
126 bool setCustomMolecularWeight(double value);
127
128 bool setGasType(const std::string& gasType);
129
130 bool setConductivityCoefficientA(boost::optional<double> conductivityCoefficientA);
131
132 void resetConductivityCoefficientA();
133
134 bool setConductivityCoefficientB(boost::optional<double> conductivityCoefficientB);
135
136 void resetConductivityCoefficientB();
137
138 bool setConductivityCoefficientC(boost::optional<double> conductivityCoefficientC);
139
140 void resetConductivityCoefficientC();
141
142 bool setViscosityCoefficientA(boost::optional<double> viscosityCoefficientA);
143
144 void resetViscosityCoefficientA();
145
146 bool setViscosityCoefficientB(boost::optional<double> viscosityCoefficientB);
147
148 void resetViscosityCoefficientB();
149
150 bool setViscosityCoefficientC(boost::optional<double> viscosityCoefficientC);
151
152 void resetViscosityCoefficientC();
153
154 bool setSpecificHeatCoefficientA(boost::optional<double> specificHeatCoefficientA);
155
156 void resetSpecificHeatCoefficientA();
157
158 bool setSpecificHeatCoefficientB(boost::optional<double> specificHeatCoefficientB);
159
160 void resetSpecificHeatCoefficientB();
161
162 bool setSpecificHeatCoefficientC(boost::optional<double> specificHeatCoefficientC);
163
164 void resetSpecificHeatCoefficientC();
165
166 bool setMolecularWeight(boost::optional<double> molecularWeight);
167
168 void resetMolecularWeight();
169
170 bool setSpecificHeatRatio(boost::optional<double> specificHeatRatio);
171
172 void resetSpecificHeatRatio();
173
174 //@}
175 /** @name Queries */
176 //@{
177
178 //@}
179 /** @name Other */
180 //@{
181
182 //@}
183 protected:
184 private:
185 − REGISTER_LOGGER("openstudio.model.Gas");
186
187 std::vector<std::string> gasTypeValues() const;
188 };
189
190 } // namespace detail
191
192 } // namespace model
193 } // namespace openstudio
194
195 #endif // MODEL_GAS_IMPL_HPP
196