GCC Code Coverage Report


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

src/model/ConstructionWithInternalSource.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_CONSTRUCTIONWITHINTERNALSOURCE_HPP
7 #define MODEL_CONSTRUCTIONWITHINTERNALSOURCE_HPP
8
9 #include "ModelAPI.hpp"
10 #include "LayeredConstruction.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 namespace detail {
16 class ConstructionWithInternalSource_Impl;
17 }
18
19 /** ConstructionWithInternalSource is a LayeredConstruction that wraps EnergyPlus IDD object
20 * 'Construction:InternalSource'. ConstructionWithInternalSource is identical to Construction,
21 * except that it contains an embedded heat source. */
22 class MODEL_API ConstructionWithInternalSource : public LayeredConstruction
23 {
24 public:
25 /** @name Constructors and Destructors */
26 //@{
27
28 /// Default constructor, provided for backward compatibility. The model object will
29 /// be invalid after using this constructor, setLayers should be called immediately after
30 /// this constructor.
31 explicit ConstructionWithInternalSource(const Model& model);
32
33 /// Constructor with vector of material layers, throws if opaqueMaterials size < 2.
34 explicit ConstructionWithInternalSource(const std::vector<OpaqueMaterial>& opaqueMaterials);
35
36 242 virtual ~ConstructionWithInternalSource() override = default;
37 // Default the copy and move operators because the virtual dtor is explicit
38 5 ConstructionWithInternalSource(const ConstructionWithInternalSource& other) = default;
39 106 ConstructionWithInternalSource(ConstructionWithInternalSource&& other) = default;
40 ✗ ConstructionWithInternalSource& operator=(const ConstructionWithInternalSource&) = default;
41 ✗ ConstructionWithInternalSource& operator=(ConstructionWithInternalSource&&) = default;
42
43 /// The source is located after layer number. Must be >= 1 and <= numLayers-1.
44 /// Defaults to 1.
45 int sourcePresentAfterLayerNumber() const;
46 bool setSourcePresentAfterLayerNumber(int sourcePresentAfterLayerNumber);
47
48 /// A separate temperature calculation occurs after layer number.
49 /// Must be >= 1 and <= numLayers-1. Defaults to 1.
50 int temperatureCalculationRequestedAfterLayerNumber() const;
51 bool setTemperatureCalculationRequestedAfterLayerNumber(int temperatureCalculationRequestedAfterLayerNumber);
52
53 /// A value of 1 states that the user is only interested in a one-dimensional calculation.
54 /// This is appropriate for electric resistance heating and for hydronic heating
55 /// (when boiler/hot water heater performance is not affected by return and supply water
56 /// temperatures). A value of 1 will trigger a two-dimensional solution for this surface only.
57 /// This may be necessary for hydronic radiant cooling situations since chiller performance is
58 /// affected by the water temperatures provided.
59 /// Defaults to 1.
60 int dimensionsForTheCTFCalculation() const;
61 bool setDimensionsForTheCTFCalculation(int dimensionsForTheCTFCalculation);
62
63 /// How far apart in meters the hydronic tubing or electrical resistance wires are spaced
64 /// in the direction perpendicular to the main direction of heat transfer.
65 /// Note that this parameter is only used for two-dimensional solutions.
66 /// Defaults to 0.154 meters.
67 double tubeSpacing() const;
68 bool setTubeSpacing(double tubeSpacing);
69
70 /// Used in conjunction with field Temperature Calculation Requested After Layer Number
71 /// this field is the location perpendicular to the main direction of heat transfer
72 /// 0.0 means in line with the tubing, 1.0 means at the midpoint between two adjacent pipes
73 /// this field is ignored for 1-D calculations
74 /// Defaults to 0.0.
75 double twoDimensionalTemperatureCalculationPosition() const;
76 bool setTwoDimensionalTemperatureCalculationPosition(double twoDimensionalTemperatureCalculationPosition);
77
78 //@}
79 /** @name Static Methods */
80 //@{
81
82 static IddObjectType iddObjectType();
83 ConstructionWithInternalSource reverseConstructionWithInternalSource() const;
84
85 //@}
86 protected:
87 /// @cond
88 using ImplType = detail::ConstructionWithInternalSource_Impl;
89
90 friend class Model;
91 friend class openstudio::IdfObject;
92 friend class detail::ConstructionWithInternalSource_Impl;
93
94 explicit ConstructionWithInternalSource(std::shared_ptr<detail::ConstructionWithInternalSource_Impl> impl);
95 /// @endcond
96 private:
97 − REGISTER_LOGGER("openstudio.model.ConstructionWithInternalSource");
98 };
99
100 /** \relates ConstructionWithInternalSource */
101 using OptionalConstructionWithInternalSource = boost::optional<ConstructionWithInternalSource>;
102
103 /** \relates ConstructionWithInternalSource */
104 using ConstructionWithInternalSourceVector = std::vector<ConstructionWithInternalSource>;
105
106 } // namespace model
107 } // namespace openstudio
108
109 #endif // MODEL_CONSTRUCTIONWITHINTERNALSOURCE_HPP
110