src/model/MasslessOpaqueMaterial.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_MASSLESSOPAQUEMATERIAL_HPP | ||
| 7 | #define MODEL_MASSLESSOPAQUEMATERIAL_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "OpaqueMaterial.hpp" | ||
| 11 | |||
| 12 | #include "MaterialPropertyMoisturePenetrationDepthSettings.hpp" | ||
| 13 | #include "MaterialPropertyMoisturePenetrationDepthSettings_Impl.hpp" | ||
| 14 | #include "MaterialPropertyPhaseChange.hpp" | ||
| 15 | #include "MaterialPropertyPhaseChange_Impl.hpp" | ||
| 16 | #include "MaterialPropertyPhaseChangeHysteresis.hpp" | ||
| 17 | #include "MaterialPropertyPhaseChangeHysteresis_Impl.hpp" | ||
| 18 | |||
| 19 | namespace openstudio { | ||
| 20 | |||
| 21 | namespace model { | ||
| 22 | |||
| 23 | class MaterialPropertyMoisturePenetrationDepthSettings; | ||
| 24 | class MaterialPropertyPhaseChange; | ||
| 25 | class MaterialPropertyPhaseChangeHysteresis; | ||
| 26 | |||
| 27 | namespace detail { | ||
| 28 | |||
| 29 | class MasslessOpaqueMaterial_Impl; | ||
| 30 | |||
| 31 | } // namespace detail | ||
| 32 | |||
| 33 | /** MasslessOpaqueMaterial is a OpaqueMaterial that wraps the OpenStudio IDD object 'OS:Material:NoMass'. */ | ||
| 34 | class MODEL_API MasslessOpaqueMaterial : public OpaqueMaterial | ||
| 35 | { | ||
| 36 | public: | ||
| 37 | /** @name Constructors and Destructors */ | ||
| 38 | //@{ | ||
| 39 | |||
| 40 | explicit MasslessOpaqueMaterial(const Model& model, const std::string& roughness = "Smooth", double thermalResistance = 0.1); | ||
| 41 | |||
| 42 | 411 | virtual ~MasslessOpaqueMaterial() override = default; | |
| 43 | // Default the copy and move operators because the virtual dtor is explicit | ||
| 44 | 2 | MasslessOpaqueMaterial(const MasslessOpaqueMaterial& other) = default; | |
| 45 | 40 | MasslessOpaqueMaterial(MasslessOpaqueMaterial&& other) = default; | |
| 46 | 1 | MasslessOpaqueMaterial& operator=(const MasslessOpaqueMaterial&) = default; | |
| 47 | ✗ | MasslessOpaqueMaterial& operator=(MasslessOpaqueMaterial&&) = default; | |
| 48 | |||
| 49 | //@} | ||
| 50 | |||
| 51 | static IddObjectType iddObjectType(); | ||
| 52 | |||
| 53 | static std::vector<std::string> roughnessValues(); | ||
| 54 | |||
| 55 | /** @name Getters */ | ||
| 56 | //@{ | ||
| 57 | |||
| 58 | std::string roughness() const; | ||
| 59 | |||
| 60 | double thermalResistance() const; | ||
| 61 | |||
| 62 | boost::optional<double> thermalAbsorptance() const; | ||
| 63 | |||
| 64 | bool isThermalAbsorptanceDefaulted() const; | ||
| 65 | |||
| 66 | boost::optional<double> solarAbsorptance() const; | ||
| 67 | |||
| 68 | bool isSolarAbsorptanceDefaulted() const; | ||
| 69 | |||
| 70 | boost::optional<double> visibleAbsorptance() const; | ||
| 71 | |||
| 72 | bool isVisibleAbsorptanceDefaulted() const; | ||
| 73 | |||
| 74 | boost::optional<double> thermalAbsorptanceInsideFace() const; | ||
| 75 | |||
| 76 | bool isThermalAbsorptanceInsideFaceDefaulted() const; | ||
| 77 | |||
| 78 | boost::optional<double> solarAbsorptanceInsideFace() const; | ||
| 79 | |||
| 80 | bool isSolarAbsorptanceInsideFaceDefaulted() const; | ||
| 81 | |||
| 82 | boost::optional<double> visibleAbsorptanceInsideFace() const; | ||
| 83 | |||
| 84 | bool isVisibleAbsorptanceInsideFaceDefaulted() const; | ||
| 85 | |||
| 86 | //@} | ||
| 87 | /** @name Setters */ | ||
| 88 | //@{ | ||
| 89 | |||
| 90 | bool setRoughness(const std::string& roughness); | ||
| 91 | |||
| 92 | bool setThermalResistance(double thermalResistance); | ||
| 93 | |||
| 94 | bool setThermalAbsorptance(double thermalAbsorptance); | ||
| 95 | |||
| 96 | void resetThermalAbsorptance(); | ||
| 97 | |||
| 98 | bool setSolarAbsorptance(double solarAbsorptance); | ||
| 99 | |||
| 100 | void resetSolarAbsorptance(); | ||
| 101 | |||
| 102 | bool setVisibleAbsorptance(double visibleAbsorptance); | ||
| 103 | |||
| 104 | void resetVisibleAbsorptance(); | ||
| 105 | |||
| 106 | bool setThermalAbsorptanceInsideFace(double thermalAbsorptanceInsideFace); | ||
| 107 | |||
| 108 | void resetThermalAbsorptanceInsideFace(); | ||
| 109 | |||
| 110 | bool setSolarAbsorptanceInsideFace(double solarAbsorptanceInsideFace); | ||
| 111 | |||
| 112 | void resetSolarAbsorptanceInsideFace(); | ||
| 113 | |||
| 114 | bool setVisibleAbsorptanceInsideFace(double visibleAbsorptanceInsideFace); | ||
| 115 | |||
| 116 | void resetVisibleAbsorptanceInsideFace(); | ||
| 117 | |||
| 118 | // 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 | ||
| 119 | boost::optional<MaterialPropertyMoisturePenetrationDepthSettings> | ||
| 120 | createMaterialPropertyMoisturePenetrationDepthSettings(double waterVaporDiffusionResistanceFactor, double moistureEquationCoefficientA, | ||
| 121 | double moistureEquationCoefficientB, double moistureEquationCoefficientC, | ||
| 122 | double moistureEquationCoefficientD, double coatingLayerThickness, | ||
| 123 | double coatingLayerWaterVaporDiffusionResistanceFactor); | ||
| 124 | |||
| 125 | // returns the material property moisture penetration depth settings if set | ||
| 126 | boost::optional<MaterialPropertyMoisturePenetrationDepthSettings> materialPropertyMoisturePenetrationDepthSettings() const; | ||
| 127 | |||
| 128 | // resets the material property moisture penetration depth settings | ||
| 129 | void resetMaterialPropertyMoisturePenetrationDepthSettings(); | ||
| 130 | |||
| 131 | // 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 | ||
| 132 | boost::optional<MaterialPropertyPhaseChange> createMaterialPropertyPhaseChange(); | ||
| 133 | boost::optional<MaterialPropertyPhaseChange> createMaterialPropertyPhaseChange(const std::vector<TemperatureEnthalpy>& temperatureEnthalpys); | ||
| 134 | |||
| 135 | // returns the material property phase change if set | ||
| 136 | boost::optional<MaterialPropertyPhaseChange> materialPropertyPhaseChange() const; | ||
| 137 | |||
| 138 | // resets the material property phase change | ||
| 139 | void resetMaterialPropertyPhaseChange(); | ||
| 140 | |||
| 141 | // 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 | ||
| 142 | boost::optional<MaterialPropertyPhaseChangeHysteresis> createMaterialPropertyPhaseChangeHysteresis(); | ||
| 143 | |||
| 144 | // returns the material property phase change hysteresis if set | ||
| 145 | boost::optional<MaterialPropertyPhaseChangeHysteresis> materialPropertyPhaseChangeHysteresis() const; | ||
| 146 | |||
| 147 | // resets the material property phase change hysteresis | ||
| 148 | void resetMaterialPropertyPhaseChangeHysteresis(); | ||
| 149 | |||
| 150 | //@} | ||
| 151 | /** @name Other */ | ||
| 152 | //@{ | ||
| 153 | |||
| 154 | //@} | ||
| 155 | protected: | ||
| 156 | /// @cond | ||
| 157 | using ImplType = detail::MasslessOpaqueMaterial_Impl; | ||
| 158 | |||
| 159 | explicit MasslessOpaqueMaterial(std::shared_ptr<detail::MasslessOpaqueMaterial_Impl> impl); | ||
| 160 | |||
| 161 | friend class detail::MasslessOpaqueMaterial_Impl; | ||
| 162 | friend class Model; | ||
| 163 | friend class IdfObject; | ||
| 164 | friend class openstudio::detail::IdfObject_Impl; | ||
| 165 | /// @endcond | ||
| 166 | private: | ||
| 167 | REGISTER_LOGGER("openstudio.model.MasslessOpaqueMaterial"); | ||
| 168 | }; | ||
| 169 | |||
| 170 | /** \relates MasslessOpaqueMaterial*/ | ||
| 171 | using OptionalMasslessOpaqueMaterial = boost::optional<MasslessOpaqueMaterial>; | ||
| 172 | |||
| 173 | /** \relates MasslessOpaqueMaterial*/ | ||
| 174 | using MasslessOpaqueMaterialVector = std::vector<MasslessOpaqueMaterial>; | ||
| 175 | |||
| 176 | } // namespace model | ||
| 177 | } // namespace openstudio | ||
| 178 | |||
| 179 | #endif // MODEL_MASSLESSOPAQUEMATERIAL_HPP | ||
| 180 |