src/model/MaterialPropertyPhaseChangeHysteresis.cpp
| 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 | #include <vector> | ||
| 7 | #include "Material.hpp" | ||
| 8 | #include "Material_Impl.hpp" | ||
| 9 | #include "StandardOpaqueMaterial.hpp" | ||
| 10 | #include "StandardOpaqueMaterial_Impl.hpp" | ||
| 11 | #include "MasslessOpaqueMaterial.hpp" | ||
| 12 | #include "MasslessOpaqueMaterial_Impl.hpp" | ||
| 13 | #include "MaterialPropertyPhaseChangeHysteresis.hpp" | ||
| 14 | #include "MaterialPropertyPhaseChangeHysteresis_Impl.hpp" | ||
| 15 | #include "ModelExtensibleGroup.hpp" | ||
| 16 | #include "Model.hpp" | ||
| 17 | #include "Model_Impl.hpp" | ||
| 18 | |||
| 19 | #include <utilities/idd/IddEnums.hxx> | ||
| 20 | #include <utilities/idd/OS_MaterialProperty_PhaseChangeHysteresis_FieldEnums.hxx> | ||
| 21 | |||
| 22 | #include "../utilities/core/Assert.hpp" | ||
| 23 | |||
| 24 | namespace openstudio { | ||
| 25 | namespace model { | ||
| 26 | |||
| 27 | namespace detail { | ||
| 28 | |||
| 29 | 5 | MaterialPropertyPhaseChangeHysteresis_Impl::MaterialPropertyPhaseChangeHysteresis_Impl(const IdfObject& idfObject, Model_Impl* model, | |
| 30 | 5 | bool keepHandle) | |
| 31 | 5 | : ModelObject_Impl(idfObject, model, keepHandle) { | |
| 32 |
4/6✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 5 times.
✗ Branch 13 not taken.
|
5 | OS_ASSERT(idfObject.iddObject().type() == MaterialPropertyPhaseChangeHysteresis::iddObjectType()); |
| 33 | 5 | } | |
| 34 | |||
| 35 | ✗ | MaterialPropertyPhaseChangeHysteresis_Impl::MaterialPropertyPhaseChangeHysteresis_Impl(const openstudio::detail::WorkspaceObject_Impl& other, | |
| 36 | ✗ | Model_Impl* model, bool keepHandle) | |
| 37 | ✗ | : ModelObject_Impl(other, model, keepHandle) { | |
| 38 | ✗ | OS_ASSERT(other.iddObject().type() == MaterialPropertyPhaseChangeHysteresis::iddObjectType()); | |
| 39 | ✗ | } | |
| 40 | |||
| 41 | 1 | MaterialPropertyPhaseChangeHysteresis_Impl::MaterialPropertyPhaseChangeHysteresis_Impl(const MaterialPropertyPhaseChangeHysteresis_Impl& other, | |
| 42 | 1 | Model_Impl* model, bool keepHandle) | |
| 43 | 1 | : ModelObject_Impl(other, model, keepHandle) {} | |
| 44 | |||
| 45 | ✗ | const std::vector<std::string>& MaterialPropertyPhaseChangeHysteresis_Impl::outputVariableNames() const { | |
| 46 | ✗ | static const std::vector<std::string> result; | |
| 47 | ✗ | return result; | |
| 48 | } | ||
| 49 | |||
| 50 | ✗ | IddObjectType MaterialPropertyPhaseChangeHysteresis_Impl::iddObjectType() const { | |
| 51 | ✗ | return MaterialPropertyPhaseChangeHysteresis::iddObjectType(); | |
| 52 | } | ||
| 53 | |||
| 54 | 1 | std::string MaterialPropertyPhaseChangeHysteresis_Impl::materialName() const { | |
| 55 | boost::optional<Material> material = | ||
| 56 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | getObject<ModelObject>().getModelObjectTarget<Material>(OS_MaterialProperty_PhaseChangeHysteresisFields::MaterialName); |
| 57 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
✗ Branch 4 not taken.
|
1 | OS_ASSERT(material); |
| 58 |
4/4✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
|
2 | return material.get().name().get(); |
| 59 | 1 | } | |
| 60 | |||
| 61 | 2 | Material MaterialPropertyPhaseChangeHysteresis_Impl::material() const { | |
| 62 | boost::optional<Material> material = | ||
| 63 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | getObject<ModelObject>().getModelObjectTarget<Material>(OS_MaterialProperty_PhaseChangeHysteresisFields::MaterialName); |
| 64 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
✗ Branch 4 not taken.
|
2 | OS_ASSERT(material); |
| 65 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
4 | return material.get(); |
| 66 | 2 | } | |
| 67 | |||
| 68 | 4 | double MaterialPropertyPhaseChangeHysteresis_Impl::latentHeatduringtheEntirePhaseChangeProcess() const { | |
| 69 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_MaterialProperty_PhaseChangeHysteresisFields::LatentHeatduringtheEntirePhaseChangeProcess); |
| 70 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 71 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 72 | } | ||
| 73 | |||
| 74 | 4 | double MaterialPropertyPhaseChangeHysteresis_Impl::liquidStateThermalConductivity() const { | |
| 75 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_MaterialProperty_PhaseChangeHysteresisFields::LiquidStateThermalConductivity); |
| 76 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 77 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 78 | } | ||
| 79 | |||
| 80 | 5 | double MaterialPropertyPhaseChangeHysteresis_Impl::liquidStateDensity() const { | |
| 81 |
1/1✓ Branch 1 taken 5 times.
|
5 | boost::optional<double> value = getDouble(OS_MaterialProperty_PhaseChangeHysteresisFields::LiquidStateDensity); |
| 82 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
|
5 | OS_ASSERT(value); |
| 83 |
1/1✓ Branch 1 taken 5 times.
|
10 | return value.get(); |
| 84 | } | ||
| 85 | |||
| 86 | 4 | double MaterialPropertyPhaseChangeHysteresis_Impl::liquidStateSpecificHeat() const { | |
| 87 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_MaterialProperty_PhaseChangeHysteresisFields::LiquidStateSpecificHeat); |
| 88 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 89 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 90 | } | ||
| 91 | |||
| 92 | 4 | double MaterialPropertyPhaseChangeHysteresis_Impl::highTemperatureDifferenceofMeltingCurve() const { | |
| 93 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_MaterialProperty_PhaseChangeHysteresisFields::HighTemperatureDifferenceofMeltingCurve); |
| 94 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 95 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 96 | } | ||
| 97 | |||
| 98 | 4 | double MaterialPropertyPhaseChangeHysteresis_Impl::peakMeltingTemperature() const { | |
| 99 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_MaterialProperty_PhaseChangeHysteresisFields::PeakMeltingTemperature); |
| 100 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 101 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 102 | } | ||
| 103 | |||
| 104 | 4 | double MaterialPropertyPhaseChangeHysteresis_Impl::lowTemperatureDifferenceofMeltingCurve() const { | |
| 105 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_MaterialProperty_PhaseChangeHysteresisFields::LowTemperatureDifferenceofMeltingCurve); |
| 106 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 107 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 108 | } | ||
| 109 | |||
| 110 | 4 | double MaterialPropertyPhaseChangeHysteresis_Impl::solidStateThermalConductivity() const { | |
| 111 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_MaterialProperty_PhaseChangeHysteresisFields::SolidStateThermalConductivity); |
| 112 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 113 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 114 | } | ||
| 115 | |||
| 116 | 4 | double MaterialPropertyPhaseChangeHysteresis_Impl::solidStateDensity() const { | |
| 117 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_MaterialProperty_PhaseChangeHysteresisFields::SolidStateDensity); |
| 118 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 119 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 120 | } | ||
| 121 | |||
| 122 | 4 | double MaterialPropertyPhaseChangeHysteresis_Impl::solidStateSpecificHeat() const { | |
| 123 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_MaterialProperty_PhaseChangeHysteresisFields::SolidStateSpecificHeat); |
| 124 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 125 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 126 | } | ||
| 127 | |||
| 128 | 4 | double MaterialPropertyPhaseChangeHysteresis_Impl::highTemperatureDifferenceofFreezingCurve() const { | |
| 129 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_MaterialProperty_PhaseChangeHysteresisFields::HighTemperatureDifferenceofFreezingCurve); |
| 130 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 131 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 132 | } | ||
| 133 | |||
| 134 | 4 | double MaterialPropertyPhaseChangeHysteresis_Impl::peakFreezingTemperature() const { | |
| 135 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_MaterialProperty_PhaseChangeHysteresisFields::PeakFreezingTemperature); |
| 136 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 137 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 138 | } | ||
| 139 | |||
| 140 | 4 | double MaterialPropertyPhaseChangeHysteresis_Impl::lowTemperatureDifferenceofFreezingCurve() const { | |
| 141 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_MaterialProperty_PhaseChangeHysteresisFields::LowTemperatureDifferenceofFreezingCurve); |
| 142 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 143 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 144 | } | ||
| 145 | |||
| 146 | bool | ||
| 147 | 6 | MaterialPropertyPhaseChangeHysteresis_Impl::setLatentHeatduringtheEntirePhaseChangeProcess(double latentHeatduringtheEntirePhaseChangeProcess) { | |
| 148 | 6 | bool result = setDouble(OS_MaterialProperty_PhaseChangeHysteresisFields::LatentHeatduringtheEntirePhaseChangeProcess, | |
| 149 | latentHeatduringtheEntirePhaseChangeProcess); | ||
| 150 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
|
6 | OS_ASSERT(result); |
| 151 | 6 | return result; | |
| 152 | } | ||
| 153 | |||
| 154 | 6 | bool MaterialPropertyPhaseChangeHysteresis_Impl::setLiquidStateThermalConductivity(double liquidStateThermalConductivity) { | |
| 155 | 6 | bool result = setDouble(OS_MaterialProperty_PhaseChangeHysteresisFields::LiquidStateThermalConductivity, liquidStateThermalConductivity); | |
| 156 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
|
6 | OS_ASSERT(result); |
| 157 | 6 | return result; | |
| 158 | } | ||
| 159 | |||
| 160 | 6 | bool MaterialPropertyPhaseChangeHysteresis_Impl::setLiquidStateDensity(double liquidStateDensity) { | |
| 161 | 6 | bool result = setDouble(OS_MaterialProperty_PhaseChangeHysteresisFields::LiquidStateDensity, liquidStateDensity); | |
| 162 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
|
6 | OS_ASSERT(result); |
| 163 | 6 | return result; | |
| 164 | } | ||
| 165 | |||
| 166 | 6 | bool MaterialPropertyPhaseChangeHysteresis_Impl::setLiquidStateSpecificHeat(double liquidStateSpecificHeat) { | |
| 167 | 6 | bool result = setDouble(OS_MaterialProperty_PhaseChangeHysteresisFields::LiquidStateSpecificHeat, liquidStateSpecificHeat); | |
| 168 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
|
6 | OS_ASSERT(result); |
| 169 | 6 | return result; | |
| 170 | } | ||
| 171 | |||
| 172 | 6 | bool MaterialPropertyPhaseChangeHysteresis_Impl::setHighTemperatureDifferenceofMeltingCurve(double highTemperatureDifferenceofMeltingCurve) { | |
| 173 | bool result = | ||
| 174 | 6 | setDouble(OS_MaterialProperty_PhaseChangeHysteresisFields::HighTemperatureDifferenceofMeltingCurve, highTemperatureDifferenceofMeltingCurve); | |
| 175 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
|
6 | OS_ASSERT(result); |
| 176 | 6 | return result; | |
| 177 | } | ||
| 178 | |||
| 179 | 6 | bool MaterialPropertyPhaseChangeHysteresis_Impl::setPeakMeltingTemperature(double peakMeltingTemperature) { | |
| 180 | 6 | bool result = setDouble(OS_MaterialProperty_PhaseChangeHysteresisFields::PeakMeltingTemperature, peakMeltingTemperature); | |
| 181 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
|
6 | OS_ASSERT(result); |
| 182 | 6 | return result; | |
| 183 | } | ||
| 184 | |||
| 185 | 6 | bool MaterialPropertyPhaseChangeHysteresis_Impl::setLowTemperatureDifferenceofMeltingCurve(double lowTemperatureDifferenceofMeltingCurve) { | |
| 186 | bool result = | ||
| 187 | 6 | setDouble(OS_MaterialProperty_PhaseChangeHysteresisFields::LowTemperatureDifferenceofMeltingCurve, lowTemperatureDifferenceofMeltingCurve); | |
| 188 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
|
6 | OS_ASSERT(result); |
| 189 | 6 | return result; | |
| 190 | } | ||
| 191 | |||
| 192 | 6 | bool MaterialPropertyPhaseChangeHysteresis_Impl::setSolidStateThermalConductivity(double solidStateThermalConductivity) { | |
| 193 | 6 | bool result = setDouble(OS_MaterialProperty_PhaseChangeHysteresisFields::SolidStateThermalConductivity, solidStateThermalConductivity); | |
| 194 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
|
6 | OS_ASSERT(result); |
| 195 | 6 | return result; | |
| 196 | } | ||
| 197 | |||
| 198 | 6 | bool MaterialPropertyPhaseChangeHysteresis_Impl::setSolidStateDensity(double solidStateDensity) { | |
| 199 | 6 | bool result = setDouble(OS_MaterialProperty_PhaseChangeHysteresisFields::SolidStateDensity, solidStateDensity); | |
| 200 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
|
6 | OS_ASSERT(result); |
| 201 | 6 | return result; | |
| 202 | } | ||
| 203 | |||
| 204 | 6 | bool MaterialPropertyPhaseChangeHysteresis_Impl::setSolidStateSpecificHeat(double solidStateSpecificHeat) { | |
| 205 | 6 | bool result = setDouble(OS_MaterialProperty_PhaseChangeHysteresisFields::SolidStateSpecificHeat, solidStateSpecificHeat); | |
| 206 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
|
6 | OS_ASSERT(result); |
| 207 | 6 | return result; | |
| 208 | } | ||
| 209 | |||
| 210 | 6 | bool MaterialPropertyPhaseChangeHysteresis_Impl::setHighTemperatureDifferenceofFreezingCurve(double highTemperatureDifferenceofFreezingCurve) { | |
| 211 | 6 | bool result = setDouble(OS_MaterialProperty_PhaseChangeHysteresisFields::HighTemperatureDifferenceofFreezingCurve, | |
| 212 | highTemperatureDifferenceofFreezingCurve); | ||
| 213 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
|
6 | OS_ASSERT(result); |
| 214 | 6 | return result; | |
| 215 | } | ||
| 216 | |||
| 217 | 6 | bool MaterialPropertyPhaseChangeHysteresis_Impl::setPeakFreezingTemperature(double peakFreezingTemperature) { | |
| 218 | 6 | bool result = setDouble(OS_MaterialProperty_PhaseChangeHysteresisFields::PeakFreezingTemperature, peakFreezingTemperature); | |
| 219 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
|
6 | OS_ASSERT(result); |
| 220 | 6 | return result; | |
| 221 | } | ||
| 222 | |||
| 223 | 6 | bool MaterialPropertyPhaseChangeHysteresis_Impl::setLowTemperatureDifferenceofFreezingCurve(double lowTemperatureDifferenceofFreezingCurve) { | |
| 224 | bool result = | ||
| 225 | 6 | setDouble(OS_MaterialProperty_PhaseChangeHysteresisFields::LowTemperatureDifferenceofFreezingCurve, lowTemperatureDifferenceofFreezingCurve); | |
| 226 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
|
6 | OS_ASSERT(result); |
| 227 | 6 | return result; | |
| 228 | } | ||
| 229 | |||
| 230 | } // namespace detail | ||
| 231 | |||
| 232 | 5 | MaterialPropertyPhaseChangeHysteresis::MaterialPropertyPhaseChangeHysteresis(StandardOpaqueMaterial& material) | |
| 233 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
|
5 | : ModelObject(MaterialPropertyPhaseChangeHysteresis::iddObjectType(), material.model()) { |
| 234 |
1/3✗ Branch 2 not taken.
✓ Branch 3 taken 5 times.
✗ Branch 5 not taken.
|
5 | OS_ASSERT(getImpl<detail::MaterialPropertyPhaseChangeHysteresis_Impl>()); |
| 235 | |||
| 236 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 4 taken 1 time.
✓ Branch 5 taken 4 times.
|
10 | if (material.materialPropertyPhaseChangeHysteresis()) { |
| 237 |
19/19✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 13 taken 1 time.
✓ Branch 17 taken 1 time.
✓ Branch 20 taken 1 time.
✓ Branch 23 taken 1 time.
✓ Branch 29 taken 1 time.
✓ Branch 32 taken 1 time.
✓ Branch 35 taken 1 time.
✓ Branch 38 taken 1 time.
✓ Branch 41 taken 1 time.
✓ Branch 44 taken 1 time.
✓ Branch 47 taken 1 time.
✓ Branch 50 taken 1 time.
✓ Branch 53 taken 1 time.
✓ Branch 58 taken 1 time.
✓ Branch 61 taken 1 time.
|
1 | LOG_AND_THROW("Material '" << material.nameString() << "' already has an associated MaterialPropertyPhaseChangeHysteresis object"); |
| 238 | } | ||
| 239 | |||
| 240 | 4 | bool ok = true; | |
| 241 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
✗ Branch 3 not taken.
|
4 | OS_ASSERT(ok); |
| 242 | |||
| 243 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
4 | ok = setPointer(OS_MaterialProperty_PhaseChangeHysteresisFields::MaterialName, material.handle()); |
| 244 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
✗ Branch 3 not taken.
|
4 | OS_ASSERT(ok); |
| 245 | |||
| 246 | // These from 1ZoneUncontrolledWithHysteresisPCM.idf for C5 - 4 IN HW CONCRETE. | ||
| 247 | // They should be modified by user! | ||
| 248 |
1/1✓ Branch 1 taken 4 times.
|
4 | ok = setLatentHeatduringtheEntirePhaseChangeProcess(10000); |
| 249 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
✗ Branch 3 not taken.
|
4 | OS_ASSERT(ok); |
| 250 |
1/1✓ Branch 1 taken 4 times.
|
4 | ok = setLiquidStateThermalConductivity(1.5); |
| 251 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
✗ Branch 3 not taken.
|
4 | OS_ASSERT(ok); |
| 252 |
1/1✓ Branch 1 taken 4 times.
|
4 | ok = setLiquidStateDensity(2200); |
| 253 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
✗ Branch 3 not taken.
|
4 | OS_ASSERT(ok); |
| 254 |
1/1✓ Branch 1 taken 4 times.
|
4 | ok = setLiquidStateSpecificHeat(2000); |
| 255 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
✗ Branch 3 not taken.
|
4 | OS_ASSERT(ok); |
| 256 |
1/1✓ Branch 1 taken 4 times.
|
4 | ok = setHighTemperatureDifferenceofMeltingCurve(1); |
| 257 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
✗ Branch 3 not taken.
|
4 | OS_ASSERT(ok); |
| 258 |
1/1✓ Branch 1 taken 4 times.
|
4 | ok = setPeakMeltingTemperature(23); |
| 259 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
✗ Branch 3 not taken.
|
4 | OS_ASSERT(ok); |
| 260 |
1/1✓ Branch 1 taken 4 times.
|
4 | ok = setLowTemperatureDifferenceofMeltingCurve(1); |
| 261 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
✗ Branch 3 not taken.
|
4 | OS_ASSERT(ok); |
| 262 |
1/1✓ Branch 1 taken 4 times.
|
4 | ok = setSolidStateThermalConductivity(1.8); |
| 263 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
✗ Branch 3 not taken.
|
4 | OS_ASSERT(ok); |
| 264 |
1/1✓ Branch 1 taken 4 times.
|
4 | ok = setSolidStateDensity(2300); |
| 265 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
✗ Branch 3 not taken.
|
4 | OS_ASSERT(ok); |
| 266 |
1/1✓ Branch 1 taken 4 times.
|
4 | ok = setSolidStateSpecificHeat(2000); |
| 267 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
✗ Branch 3 not taken.
|
4 | OS_ASSERT(ok); |
| 268 |
1/1✓ Branch 1 taken 4 times.
|
4 | ok = setHighTemperatureDifferenceofFreezingCurve(1); |
| 269 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
✗ Branch 3 not taken.
|
4 | OS_ASSERT(ok); |
| 270 |
1/1✓ Branch 1 taken 4 times.
|
4 | ok = setPeakFreezingTemperature(20); |
| 271 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
✗ Branch 3 not taken.
|
4 | OS_ASSERT(ok); |
| 272 |
1/1✓ Branch 1 taken 4 times.
|
4 | ok = setLowTemperatureDifferenceofFreezingCurve(1); |
| 273 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
✗ Branch 3 not taken.
|
4 | OS_ASSERT(ok); |
| 274 | 5 | } | |
| 275 | |||
| 276 | ✗ | MaterialPropertyPhaseChangeHysteresis::MaterialPropertyPhaseChangeHysteresis(MasslessOpaqueMaterial& material) | |
| 277 | ✗ | : ModelObject(MaterialPropertyPhaseChangeHysteresis::iddObjectType(), material.model()) { | |
| 278 | ✗ | OS_ASSERT(getImpl<detail::MaterialPropertyPhaseChangeHysteresis_Impl>()); | |
| 279 | |||
| 280 | ✗ | if (material.materialPropertyPhaseChangeHysteresis()) { | |
| 281 | ✗ | LOG_AND_THROW("Material '" << material.nameString() << "' already has an associated MaterialPropertyPhaseChangeHysteresis object"); | |
| 282 | } | ||
| 283 | |||
| 284 | ✗ | bool ok = true; | |
| 285 | ✗ | OS_ASSERT(ok); | |
| 286 | |||
| 287 | ✗ | ok = setPointer(OS_MaterialProperty_PhaseChangeHysteresisFields::MaterialName, material.handle()); | |
| 288 | ✗ | OS_ASSERT(ok); | |
| 289 | |||
| 290 | // These from 1ZoneUncontrolledWithHysteresisPCM.idf for C5 - 4 IN HW CONCRETE. | ||
| 291 | // They should be modified by user! | ||
| 292 | ✗ | ok = setLatentHeatduringtheEntirePhaseChangeProcess(10000); | |
| 293 | ✗ | OS_ASSERT(ok); | |
| 294 | ✗ | ok = setLiquidStateThermalConductivity(1.5); | |
| 295 | ✗ | OS_ASSERT(ok); | |
| 296 | ✗ | ok = setLiquidStateDensity(2200); | |
| 297 | ✗ | OS_ASSERT(ok); | |
| 298 | ✗ | ok = setLiquidStateSpecificHeat(2000); | |
| 299 | ✗ | OS_ASSERT(ok); | |
| 300 | ✗ | ok = setHighTemperatureDifferenceofMeltingCurve(1); | |
| 301 | ✗ | OS_ASSERT(ok); | |
| 302 | ✗ | ok = setPeakMeltingTemperature(23); | |
| 303 | ✗ | OS_ASSERT(ok); | |
| 304 | ✗ | ok = setLowTemperatureDifferenceofMeltingCurve(1); | |
| 305 | ✗ | OS_ASSERT(ok); | |
| 306 | ✗ | ok = setSolidStateThermalConductivity(1.8); | |
| 307 | ✗ | OS_ASSERT(ok); | |
| 308 | ✗ | ok = setSolidStateDensity(2300); | |
| 309 | ✗ | OS_ASSERT(ok); | |
| 310 | ✗ | ok = setSolidStateSpecificHeat(2000); | |
| 311 | ✗ | OS_ASSERT(ok); | |
| 312 | ✗ | ok = setHighTemperatureDifferenceofFreezingCurve(1); | |
| 313 | ✗ | OS_ASSERT(ok); | |
| 314 | ✗ | ok = setPeakFreezingTemperature(20); | |
| 315 | ✗ | OS_ASSERT(ok); | |
| 316 | ✗ | ok = setLowTemperatureDifferenceofFreezingCurve(1); | |
| 317 | ✗ | OS_ASSERT(ok); | |
| 318 | ✗ | } | |
| 319 | |||
| 320 | 9088 | IddObjectType MaterialPropertyPhaseChangeHysteresis::iddObjectType() { | |
| 321 |
1/1✓ Branch 1 taken 9088 times.
|
9088 | return IddObjectType(IddObjectType::OS_MaterialProperty_PhaseChangeHysteresis); |
| 322 | } | ||
| 323 | |||
| 324 | 1 | std::string MaterialPropertyPhaseChangeHysteresis::materialName() const { | |
| 325 |
1/1✓ Branch 3 taken 1 time.
|
1 | return getImpl<detail::MaterialPropertyPhaseChangeHysteresis_Impl>()->materialName(); |
| 326 | } | ||
| 327 | |||
| 328 | 2 | Material MaterialPropertyPhaseChangeHysteresis::material() const { | |
| 329 |
1/1✓ Branch 3 taken 2 times.
|
2 | return getImpl<detail::MaterialPropertyPhaseChangeHysteresis_Impl>()->material(); |
| 330 | } | ||
| 331 | |||
| 332 | 4 | double MaterialPropertyPhaseChangeHysteresis::latentHeatduringtheEntirePhaseChangeProcess() const { | |
| 333 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::MaterialPropertyPhaseChangeHysteresis_Impl>()->latentHeatduringtheEntirePhaseChangeProcess(); |
| 334 | } | ||
| 335 | |||
| 336 | 4 | double MaterialPropertyPhaseChangeHysteresis::liquidStateThermalConductivity() const { | |
| 337 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::MaterialPropertyPhaseChangeHysteresis_Impl>()->liquidStateThermalConductivity(); |
| 338 | } | ||
| 339 | |||
| 340 | 5 | double MaterialPropertyPhaseChangeHysteresis::liquidStateDensity() const { | |
| 341 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::MaterialPropertyPhaseChangeHysteresis_Impl>()->liquidStateDensity(); |
| 342 | } | ||
| 343 | |||
| 344 | 4 | double MaterialPropertyPhaseChangeHysteresis::liquidStateSpecificHeat() const { | |
| 345 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::MaterialPropertyPhaseChangeHysteresis_Impl>()->liquidStateSpecificHeat(); |
| 346 | } | ||
| 347 | |||
| 348 | 4 | double MaterialPropertyPhaseChangeHysteresis::highTemperatureDifferenceofMeltingCurve() const { | |
| 349 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::MaterialPropertyPhaseChangeHysteresis_Impl>()->highTemperatureDifferenceofMeltingCurve(); |
| 350 | } | ||
| 351 | |||
| 352 | 4 | double MaterialPropertyPhaseChangeHysteresis::peakMeltingTemperature() const { | |
| 353 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::MaterialPropertyPhaseChangeHysteresis_Impl>()->peakMeltingTemperature(); |
| 354 | } | ||
| 355 | |||
| 356 | 4 | double MaterialPropertyPhaseChangeHysteresis::lowTemperatureDifferenceofMeltingCurve() const { | |
| 357 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::MaterialPropertyPhaseChangeHysteresis_Impl>()->lowTemperatureDifferenceofMeltingCurve(); |
| 358 | } | ||
| 359 | |||
| 360 | 4 | double MaterialPropertyPhaseChangeHysteresis::solidStateThermalConductivity() const { | |
| 361 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::MaterialPropertyPhaseChangeHysteresis_Impl>()->solidStateThermalConductivity(); |
| 362 | } | ||
| 363 | |||
| 364 | 4 | double MaterialPropertyPhaseChangeHysteresis::solidStateDensity() const { | |
| 365 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::MaterialPropertyPhaseChangeHysteresis_Impl>()->solidStateDensity(); |
| 366 | } | ||
| 367 | |||
| 368 | 4 | double MaterialPropertyPhaseChangeHysteresis::solidStateSpecificHeat() const { | |
| 369 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::MaterialPropertyPhaseChangeHysteresis_Impl>()->solidStateSpecificHeat(); |
| 370 | } | ||
| 371 | |||
| 372 | 4 | double MaterialPropertyPhaseChangeHysteresis::highTemperatureDifferenceofFreezingCurve() const { | |
| 373 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::MaterialPropertyPhaseChangeHysteresis_Impl>()->highTemperatureDifferenceofFreezingCurve(); |
| 374 | } | ||
| 375 | |||
| 376 | 4 | double MaterialPropertyPhaseChangeHysteresis::peakFreezingTemperature() const { | |
| 377 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::MaterialPropertyPhaseChangeHysteresis_Impl>()->peakFreezingTemperature(); |
| 378 | } | ||
| 379 | |||
| 380 | 4 | double MaterialPropertyPhaseChangeHysteresis::lowTemperatureDifferenceofFreezingCurve() const { | |
| 381 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::MaterialPropertyPhaseChangeHysteresis_Impl>()->lowTemperatureDifferenceofFreezingCurve(); |
| 382 | } | ||
| 383 | |||
| 384 | 6 | bool MaterialPropertyPhaseChangeHysteresis::setLatentHeatduringtheEntirePhaseChangeProcess(double latentHeatduringtheEntirePhaseChangeProcess) { | |
| 385 |
1/1✓ Branch 3 taken 6 times.
|
12 | return getImpl<detail::MaterialPropertyPhaseChangeHysteresis_Impl>()->setLatentHeatduringtheEntirePhaseChangeProcess( |
| 386 | 12 | latentHeatduringtheEntirePhaseChangeProcess); | |
| 387 | } | ||
| 388 | |||
| 389 | 6 | bool MaterialPropertyPhaseChangeHysteresis::setLiquidStateThermalConductivity(double liquidStateThermalConductivity) { | |
| 390 |
1/1✓ Branch 3 taken 6 times.
|
6 | return getImpl<detail::MaterialPropertyPhaseChangeHysteresis_Impl>()->setLiquidStateThermalConductivity(liquidStateThermalConductivity); |
| 391 | } | ||
| 392 | |||
| 393 | 6 | bool MaterialPropertyPhaseChangeHysteresis::setLiquidStateDensity(double liquidStateDensity) { | |
| 394 |
1/1✓ Branch 3 taken 6 times.
|
6 | return getImpl<detail::MaterialPropertyPhaseChangeHysteresis_Impl>()->setLiquidStateDensity(liquidStateDensity); |
| 395 | } | ||
| 396 | |||
| 397 | 6 | bool MaterialPropertyPhaseChangeHysteresis::setLiquidStateSpecificHeat(double liquidStateSpecificHeat) { | |
| 398 |
1/1✓ Branch 3 taken 6 times.
|
6 | return getImpl<detail::MaterialPropertyPhaseChangeHysteresis_Impl>()->setLiquidStateSpecificHeat(liquidStateSpecificHeat); |
| 399 | } | ||
| 400 | |||
| 401 | 6 | bool MaterialPropertyPhaseChangeHysteresis::setHighTemperatureDifferenceofMeltingCurve(double highTemperatureDifferenceofMeltingCurve) { | |
| 402 |
1/1✓ Branch 3 taken 6 times.
|
12 | return getImpl<detail::MaterialPropertyPhaseChangeHysteresis_Impl>()->setHighTemperatureDifferenceofMeltingCurve( |
| 403 | 12 | highTemperatureDifferenceofMeltingCurve); | |
| 404 | } | ||
| 405 | |||
| 406 | 6 | bool MaterialPropertyPhaseChangeHysteresis::setPeakMeltingTemperature(double peakMeltingTemperature) { | |
| 407 |
1/1✓ Branch 3 taken 6 times.
|
6 | return getImpl<detail::MaterialPropertyPhaseChangeHysteresis_Impl>()->setPeakMeltingTemperature(peakMeltingTemperature); |
| 408 | } | ||
| 409 | |||
| 410 | 6 | bool MaterialPropertyPhaseChangeHysteresis::setLowTemperatureDifferenceofMeltingCurve(double lowTemperatureDifferenceofMeltingCurve) { | |
| 411 |
1/1✓ Branch 3 taken 6 times.
|
12 | return getImpl<detail::MaterialPropertyPhaseChangeHysteresis_Impl>()->setLowTemperatureDifferenceofMeltingCurve( |
| 412 | 12 | lowTemperatureDifferenceofMeltingCurve); | |
| 413 | } | ||
| 414 | |||
| 415 | 6 | bool MaterialPropertyPhaseChangeHysteresis::setSolidStateThermalConductivity(double solidStateThermalConductivity) { | |
| 416 |
1/1✓ Branch 3 taken 6 times.
|
6 | return getImpl<detail::MaterialPropertyPhaseChangeHysteresis_Impl>()->setSolidStateThermalConductivity(solidStateThermalConductivity); |
| 417 | } | ||
| 418 | |||
| 419 | 6 | bool MaterialPropertyPhaseChangeHysteresis::setSolidStateDensity(double solidStateDensity) { | |
| 420 |
1/1✓ Branch 3 taken 6 times.
|
6 | return getImpl<detail::MaterialPropertyPhaseChangeHysteresis_Impl>()->setSolidStateDensity(solidStateDensity); |
| 421 | } | ||
| 422 | |||
| 423 | 6 | bool MaterialPropertyPhaseChangeHysteresis::setSolidStateSpecificHeat(double solidStateSpecificHeat) { | |
| 424 |
1/1✓ Branch 3 taken 6 times.
|
6 | return getImpl<detail::MaterialPropertyPhaseChangeHysteresis_Impl>()->setSolidStateSpecificHeat(solidStateSpecificHeat); |
| 425 | } | ||
| 426 | |||
| 427 | 6 | bool MaterialPropertyPhaseChangeHysteresis::setHighTemperatureDifferenceofFreezingCurve(double highTemperatureDifferenceofFreezingCurve) { | |
| 428 |
1/1✓ Branch 3 taken 6 times.
|
12 | return getImpl<detail::MaterialPropertyPhaseChangeHysteresis_Impl>()->setHighTemperatureDifferenceofFreezingCurve( |
| 429 | 12 | highTemperatureDifferenceofFreezingCurve); | |
| 430 | } | ||
| 431 | |||
| 432 | 6 | bool MaterialPropertyPhaseChangeHysteresis::setPeakFreezingTemperature(double peakFreezingTemperature) { | |
| 433 |
1/1✓ Branch 3 taken 6 times.
|
6 | return getImpl<detail::MaterialPropertyPhaseChangeHysteresis_Impl>()->setPeakFreezingTemperature(peakFreezingTemperature); |
| 434 | } | ||
| 435 | |||
| 436 | 6 | bool MaterialPropertyPhaseChangeHysteresis::setLowTemperatureDifferenceofFreezingCurve(double lowTemperatureDifferenceofFreezingCurve) { | |
| 437 |
1/1✓ Branch 3 taken 6 times.
|
12 | return getImpl<detail::MaterialPropertyPhaseChangeHysteresis_Impl>()->setLowTemperatureDifferenceofFreezingCurve( |
| 438 | 12 | lowTemperatureDifferenceofFreezingCurve); | |
| 439 | } | ||
| 440 | |||
| 441 | /// @cond | ||
| 442 | 8 | MaterialPropertyPhaseChangeHysteresis::MaterialPropertyPhaseChangeHysteresis( | |
| 443 | 8 | std::shared_ptr<detail::MaterialPropertyPhaseChangeHysteresis_Impl> impl) | |
| 444 |
1/1✓ Branch 3 taken 8 times.
|
8 | : ModelObject(std::move(impl)) {} |
| 445 | /// @endcond | ||
| 446 | |||
| 447 | } // namespace model | ||
| 448 | } // namespace openstudio | ||
| 449 |