src/model/StandardGlazing.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_STANDARDGLAZING_HPP | ||
| 7 | #define MODEL_STANDARDGLAZING_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "Glazing.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | |||
| 14 | namespace model { | ||
| 15 | |||
| 16 | class MaterialPropertyGlazingSpectralData; | ||
| 17 | |||
| 18 | namespace detail { | ||
| 19 | |||
| 20 | class StandardGlazing_Impl; | ||
| 21 | |||
| 22 | } // namespace detail | ||
| 23 | |||
| 24 | /** StandardGlazing is a Glazing that wraps the OpenStudio IDD object 'OS:WindowMaterial:Glazing'. */ | ||
| 25 | class MODEL_API StandardGlazing : public Glazing | ||
| 26 | { | ||
| 27 | public: | ||
| 28 | /** @name Constructors and Destructors */ | ||
| 29 | //@{ | ||
| 30 | |||
| 31 | explicit StandardGlazing(const Model& model, const std::string& opticalDataType = "SpectralAverage", double thickness = 0.1); | ||
| 32 | |||
| 33 | 911 | virtual ~StandardGlazing() override = default; | |
| 34 | // Default the copy and move operators because the virtual dtor is explicit | ||
| 35 | 219 | StandardGlazing(const StandardGlazing& other) = default; | |
| 36 | 350 | StandardGlazing(StandardGlazing&& other) = default; | |
| 37 | 1 | StandardGlazing& operator=(const StandardGlazing&) = default; | |
| 38 | 4 | StandardGlazing& operator=(StandardGlazing&&) = default; | |
| 39 | |||
| 40 | //@} | ||
| 41 | /** @name Static Methods */ | ||
| 42 | //@{ | ||
| 43 | |||
| 44 | static IddObjectType iddObjectType(); | ||
| 45 | |||
| 46 | static std::vector<std::string> opticalDataTypeValues(); | ||
| 47 | |||
| 48 | /** @name Getters */ | ||
| 49 | //@{ | ||
| 50 | |||
| 51 | std::string opticalDataType() const; | ||
| 52 | |||
| 53 | // double thickness() const; // inherited from Glazing < FenestrationMaterial < Material | ||
| 54 | |||
| 55 | /** deprecated **/ | ||
| 56 | boost::optional<std::string> windowGlassSpectralDataSetName() const; | ||
| 57 | |||
| 58 | boost::optional<MaterialPropertyGlazingSpectralData> windowGlassSpectralDataSet() const; | ||
| 59 | |||
| 60 | double solarTransmittance() const; | ||
| 61 | |||
| 62 | boost::optional<double> solarTransmittanceatNormalIncidence() const; | ||
| 63 | |||
| 64 | boost::optional<double> frontSideSolarReflectanceatNormalIncidence() const; | ||
| 65 | |||
| 66 | boost::optional<double> backSideSolarReflectanceatNormalIncidence() const; | ||
| 67 | |||
| 68 | boost::optional<double> visibleTransmittanceatNormalIncidence() const; | ||
| 69 | |||
| 70 | boost::optional<double> frontSideVisibleReflectanceatNormalIncidence() const; | ||
| 71 | |||
| 72 | boost::optional<double> backSideVisibleReflectanceatNormalIncidence() const; | ||
| 73 | |||
| 74 | double infraredTransmittance() const; | ||
| 75 | |||
| 76 | double infraredTransmittanceatNormalIncidence() const; | ||
| 77 | |||
| 78 | bool isInfraredTransmittanceatNormalIncidenceDefaulted() const; | ||
| 79 | |||
| 80 | double frontSideInfraredHemisphericalEmissivity() const; | ||
| 81 | |||
| 82 | bool isFrontSideInfraredHemisphericalEmissivityDefaulted() const; | ||
| 83 | |||
| 84 | double backSideInfraredHemisphericalEmissivity() const; | ||
| 85 | |||
| 86 | bool isBackSideInfraredHemisphericalEmissivityDefaulted() const; | ||
| 87 | |||
| 88 | double conductivity() const; | ||
| 89 | |||
| 90 | bool isConductivityDefaulted() const; | ||
| 91 | |||
| 92 | double dirtCorrectionFactorforSolarandVisibleTransmittance() const; | ||
| 93 | |||
| 94 | bool isDirtCorrectionFactorforSolarandVisibleTransmittanceDefaulted() const; | ||
| 95 | |||
| 96 | bool solarDiffusing() const; | ||
| 97 | |||
| 98 | bool isSolarDiffusingDefaulted() const; | ||
| 99 | |||
| 100 | //@} | ||
| 101 | /** @name Setters */ | ||
| 102 | //@{ | ||
| 103 | |||
| 104 | // TODO: JM 2018-12-13 This needs to be removed as it will be set by setWindowGlassSpectralDataSet/resetWindowGlassSpectalDataSet | ||
| 105 | bool setOpticalDataType(const std::string& opticalDataType); | ||
| 106 | |||
| 107 | /** deprecated **/ | ||
| 108 | bool setWindowGlassSpectralDataSetName(const std::string& windowGlassSpectralDataSetName); | ||
| 109 | void resetWindowGlassSpectralDataSetName(); | ||
| 110 | |||
| 111 | bool setWindowGlassSpectralDataSet(const MaterialPropertyGlazingSpectralData& spectralData); | ||
| 112 | void resetWindowGlassSpectralDataSet(); | ||
| 113 | |||
| 114 | // bool setThickness(double thickness); // inherited from Glazing < FenestrationMaterial < Material | ||
| 115 | |||
| 116 | bool setSolarTransmittance(double value); | ||
| 117 | |||
| 118 | bool setSolarTransmittanceatNormalIncidence(double solarTransmittanceatNormalIncidence); | ||
| 119 | |||
| 120 | void resetSolarTransmittanceatNormalIncidence(); | ||
| 121 | |||
| 122 | bool setFrontSideSolarReflectanceatNormalIncidence(double frontSideSolarReflectanceatNormalIncidence); | ||
| 123 | |||
| 124 | void resetFrontSideSolarReflectanceatNormalIncidence(); | ||
| 125 | |||
| 126 | bool setBackSideSolarReflectanceatNormalIncidence(double backSideSolarReflectanceatNormalIncidence); | ||
| 127 | |||
| 128 | void resetBackSideSolarReflectanceatNormalIncidence(); | ||
| 129 | |||
| 130 | bool setVisibleTransmittance(double value); | ||
| 131 | |||
| 132 | bool setVisibleTransmittanceatNormalIncidence(double visibleTransmittanceatNormalIncidence); | ||
| 133 | |||
| 134 | void resetVisibleTransmittanceatNormalIncidence(); | ||
| 135 | |||
| 136 | bool setFrontSideVisibleReflectanceatNormalIncidence(double frontSideVisibleReflectanceatNormalIncidence); | ||
| 137 | |||
| 138 | void resetFrontSideVisibleReflectanceatNormalIncidence(); | ||
| 139 | |||
| 140 | bool setBackSideVisibleReflectanceatNormalIncidence(double backSideVisibleReflectanceatNormalIncidence); | ||
| 141 | |||
| 142 | void resetBackSideVisibleReflectanceatNormalIncidence(); | ||
| 143 | |||
| 144 | bool setInfraredTransmittance(double value); | ||
| 145 | |||
| 146 | bool setInfraredTransmittanceatNormalIncidence(double infraredTransmittanceatNormalIncidence); | ||
| 147 | |||
| 148 | void resetInfraredTransmittanceatNormalIncidence(); | ||
| 149 | |||
| 150 | bool setFrontSideInfraredHemisphericalEmissivity(double frontSideInfraredHemisphericalEmissivity); | ||
| 151 | |||
| 152 | void resetFrontSideInfraredHemisphericalEmissivity(); | ||
| 153 | |||
| 154 | bool setBackSideInfraredHemisphericalEmissivity(double backSideInfraredHemisphericalEmissivity); | ||
| 155 | |||
| 156 | void resetBackSideInfraredHemisphericalEmissivity(); | ||
| 157 | |||
| 158 | bool setConductivity(double conductivity); | ||
| 159 | |||
| 160 | void resetConductivity(); | ||
| 161 | |||
| 162 | bool setDirtCorrectionFactorforSolarandVisibleTransmittance(double dirtCorrectionFactorforSolarandVisibleTransmittance); | ||
| 163 | |||
| 164 | void resetDirtCorrectionFactorforSolarandVisibleTransmittance(); | ||
| 165 | |||
| 166 | bool setSolarDiffusing(bool solarDiffusing); | ||
| 167 | |||
| 168 | void setSolarDiffusingNoFail(bool solarDiffusing); | ||
| 169 | |||
| 170 | void resetSolarDiffusing(); | ||
| 171 | |||
| 172 | //@} | ||
| 173 | /** @name Other */ | ||
| 174 | //@{ | ||
| 175 | |||
| 176 | //@} | ||
| 177 | double interiorVisibleReflectance() const; | ||
| 178 | |||
| 179 | double exteriorVisibleReflectance() const; | ||
| 180 | |||
| 181 | /** The conductivity of the material in W/m*K. */ | ||
| 182 | double thermalConductivity() const; | ||
| 183 | |||
| 184 | /** The conductance of the material in W/m^2*K. */ | ||
| 185 | double thermalConductance() const; | ||
| 186 | |||
| 187 | /** The resistivity of the material in m*K/W. */ | ||
| 188 | double thermalResistivity() const; | ||
| 189 | |||
| 190 | /** The resistance of the material in m^2*K/W. */ | ||
| 191 | double thermalResistance() const; | ||
| 192 | |||
| 193 | /** Sets the conductivity of the material in W/m*K, if possible. */ | ||
| 194 | bool setThermalConductivity(double value); | ||
| 195 | |||
| 196 | /** Sets the conductance of the material in W/m^2*K, if possible. Sets thickness to achieve conductivity. */ | ||
| 197 | bool setThermalConductance(double value); | ||
| 198 | |||
| 199 | /** Sets the resistivity of the material in m*K/W, if possible. */ | ||
| 200 | bool setThermalResistivity(double value); | ||
| 201 | |||
| 202 | /** Sets the resistance of the material in m^2*K/W, if possible. Sets thickness to achieve resistivity. */ | ||
| 203 | bool setThermalResistance(double value); | ||
| 204 | |||
| 205 | protected: | ||
| 206 | /// @cond | ||
| 207 | using ImplType = detail::StandardGlazing_Impl; | ||
| 208 | |||
| 209 | explicit StandardGlazing(std::shared_ptr<detail::StandardGlazing_Impl> impl); | ||
| 210 | |||
| 211 | friend class detail::StandardGlazing_Impl; | ||
| 212 | friend class Model; | ||
| 213 | friend class IdfObject; | ||
| 214 | friend class openstudio::detail::IdfObject_Impl; | ||
| 215 | /// @endcond | ||
| 216 | private: | ||
| 217 | REGISTER_LOGGER("openstudio.model.StandardGlazing"); | ||
| 218 | }; | ||
| 219 | |||
| 220 | /** \relates StandardGlazing*/ | ||
| 221 | using OptionalStandardGlazing = boost::optional<StandardGlazing>; | ||
| 222 | |||
| 223 | /** \relates StandardGlazing*/ | ||
| 224 | using StandardGlazingVector = std::vector<StandardGlazing>; | ||
| 225 | |||
| 226 | } // namespace model | ||
| 227 | } // namespace openstudio | ||
| 228 | |||
| 229 | #endif // MODEL_STANDARDGLAZING_HPP | ||
| 230 |