src/energyplus/ForwardTranslator/ForwardTranslateSizingZone.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 "../ForwardTranslator.hpp" | ||
| 7 | #include "../../model/Model.hpp" | ||
| 8 | #include "../../model/AirLoopHVAC.hpp" | ||
| 9 | #include "../../model/AirLoopHVAC_Impl.hpp" | ||
| 10 | #include "../../model/Space.hpp" | ||
| 11 | #include "../../model/Space_Impl.hpp" | ||
| 12 | #include "../../model/SizingZone.hpp" | ||
| 13 | #include "../../model/SizingZone_Impl.hpp" | ||
| 14 | #include "../../model/ControllerMechanicalVentilation.hpp" | ||
| 15 | #include "../../model/ControllerMechanicalVentilation_Impl.hpp" | ||
| 16 | #include "../../model/ControllerOutdoorAir.hpp" | ||
| 17 | #include "../../model/ControllerOutdoorAir_Impl.hpp" | ||
| 18 | #include "../../model/ThermalZone.hpp" | ||
| 19 | #include "../../model/ThermalZone_Impl.hpp" | ||
| 20 | #include "../../model/Schedule.hpp" | ||
| 21 | |||
| 22 | #include "../../utilities/core/Assert.hpp" | ||
| 23 | #include "../../utilities/core/Compare.hpp" | ||
| 24 | #include "../../utilities/core/Logger.hpp" | ||
| 25 | #include "../../utilities/idd/IddEnums.hpp" | ||
| 26 | #include "../../utilities/idf/IdfExtensibleGroup.hpp" | ||
| 27 | |||
| 28 | #include <utilities/idd/Sizing_Zone_FieldEnums.hxx> | ||
| 29 | #include <utilities/idd/DesignSpecification_ZoneAirDistribution_FieldEnums.hxx> | ||
| 30 | #include <utilities/idd/Controller_MechanicalVentilation_FieldEnums.hxx> | ||
| 31 | #include <utilities/idd/IddEnums.hxx> | ||
| 32 | #include <utilities/idd/IddFactory.hxx> | ||
| 33 | |||
| 34 | using namespace openstudio::model; | ||
| 35 | |||
| 36 | namespace openstudio { | ||
| 37 | |||
| 38 | namespace energyplus { | ||
| 39 | |||
| 40 | 75 | boost::optional<std::string> ForwardTranslator::zoneDSZADName(const ThermalZone& zone) { | |
| 41 | // If any of the DSZAD fields is non-default, then it's worth it to translate it. Otherwise it has no effect. | ||
| 42 |
1/1✓ Branch 1 taken 75 times.
|
75 | auto sizingZone = zone.sizingZone(); |
| 43 | |||
| 44 | const bool isDSZADTranslated = | ||
| 45 |
3/3✓ Branch 1 taken 75 times.
✓ Branch 3 taken 50 times.
✓ Branch 4 taken 25 times.
|
125 | !(sizingZone.isDesignZoneAirDistributionEffectivenessinCoolingModeDefaulted() |
| 46 |
2/3✓ Branch 1 taken 50 times.
✓ Branch 3 taken 50 times.
✗ Branch 4 not taken.
|
50 | && sizingZone.isDesignZoneAirDistributionEffectivenessinHeatingModeDefaulted() |
| 47 |
4/6✓ Branch 1 taken 50 times.
✓ Branch 3 taken 50 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 50 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 50 times.
|
50 | && sizingZone.isDesignZoneSecondaryRecirculationFractionDefaulted() && sizingZone.isDesignMinimumZoneVentilationEfficiencyDefaulted()); |
| 48 | |||
| 49 |
2/2✓ Branch 0 taken 50 times.
✓ Branch 1 taken 25 times.
|
75 | if (!isDSZADTranslated) { |
| 50 | 50 | return boost::none; | |
| 51 | } | ||
| 52 | |||
| 53 |
3/3✓ Branch 1 taken 25 times.
✓ Branch 4 taken 25 times.
✓ Branch 7 taken 25 times.
|
25 | return zone.nameString() + " Design Spec Zone Air Dist"; |
| 54 | 75 | } | |
| 55 | |||
| 56 | 56 | boost::optional<IdfObject> ForwardTranslator::translateSizingZone(SizingZone& modelObject) { | |
| 57 | 56 | boost::optional<std::string> s; | |
| 58 | 56 | boost::optional<double> value; | |
| 59 | |||
| 60 | // ZoneorZoneListName | ||
| 61 |
1/1✓ Branch 1 taken 56 times.
|
56 | model::ThermalZone thermalZone = modelObject.thermalZone(); |
| 62 |
1/1✓ Branch 1 taken 56 times.
|
56 | boost::optional<IdfObject> _thermalZone = translateAndMapModelObject(thermalZone); |
| 63 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 56 times.
|
56 | if (!_thermalZone) { |
| 64 | // This shouldn't even happen, but in any case, there's no point translating a Sizing:Zone for no Zone... | ||
| 65 | ✗ | return boost::none; | |
| 66 | } | ||
| 67 | |||
| 68 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | IdfObject idfObject(IddObjectType::Sizing_Zone); |
| 69 |
1/1✓ Branch 1 taken 56 times.
|
56 | m_idfObjects.push_back(idfObject); |
| 70 | |||
| 71 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | std::string name = _thermalZone->nameString(); |
| 72 |
1/1✓ Branch 1 taken 56 times.
|
56 | { idfObject.setString(Sizing_ZoneFields::ZoneorZoneListName, name); } |
| 73 | |||
| 74 | // ZoneCoolingDesignSupplyAirTemperatureInputMethod | ||
| 75 | { | ||
| 76 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | s = modelObject.zoneCoolingDesignSupplyAirTemperatureInputMethod(); |
| 77 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | idfObject.setString(Sizing_ZoneFields::ZoneCoolingDesignSupplyAirTemperatureInputMethod, s.get()); |
| 78 | } | ||
| 79 | |||
| 80 | // ZoneCoolingDesignSupplyAirTemperature | ||
| 81 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | value = modelObject.zoneCoolingDesignSupplyAirTemperature(); |
| 82 |
1/2✓ Branch 0 taken 56 times.
✗ Branch 1 not taken.
|
56 | if (value) { |
| 83 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | idfObject.setDouble(Sizing_ZoneFields::ZoneCoolingDesignSupplyAirTemperature, value.get()); |
| 84 | } | ||
| 85 | |||
| 86 | // zoneCoolingDesignSupplyAirTemperatureDifference | ||
| 87 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | value = modelObject.zoneCoolingDesignSupplyAirTemperatureDifference(); |
| 88 |
1/2✓ Branch 0 taken 56 times.
✗ Branch 1 not taken.
|
56 | if (value) { |
| 89 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | idfObject.setDouble(Sizing_ZoneFields::ZoneCoolingDesignSupplyAirTemperatureDifference, value.get()); |
| 90 | } | ||
| 91 | |||
| 92 | // ZoneHeatingDesignSupplyAirTemperatureInputMethod | ||
| 93 | { | ||
| 94 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | s = modelObject.zoneHeatingDesignSupplyAirTemperatureInputMethod(); |
| 95 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | idfObject.setString(Sizing_ZoneFields::ZoneHeatingDesignSupplyAirTemperatureInputMethod, s.get()); |
| 96 | } | ||
| 97 | |||
| 98 | // ZoneHeatingDesignSupplyAirTemperature | ||
| 99 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | value = modelObject.zoneHeatingDesignSupplyAirTemperature(); |
| 100 |
1/2✓ Branch 0 taken 56 times.
✗ Branch 1 not taken.
|
56 | if (value) { |
| 101 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | idfObject.setDouble(Sizing_ZoneFields::ZoneHeatingDesignSupplyAirTemperature, value.get()); |
| 102 | } | ||
| 103 | |||
| 104 | // ZoneHeatingDesignSupplyAirTemperatureDifference | ||
| 105 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | value = modelObject.zoneHeatingDesignSupplyAirTemperatureDifference(); |
| 106 |
1/2✓ Branch 0 taken 56 times.
✗ Branch 1 not taken.
|
56 | if (value) { |
| 107 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | idfObject.setDouble(Sizing_ZoneFields::ZoneHeatingDesignSupplyAirTemperatureDifference, value.get()); |
| 108 | } | ||
| 109 | |||
| 110 | // ZoneCoolingDesignSupplyAirHumidityRatio | ||
| 111 | |||
| 112 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | value = modelObject.zoneCoolingDesignSupplyAirHumidityRatio(); |
| 113 |
1/2✓ Branch 0 taken 56 times.
✗ Branch 1 not taken.
|
56 | if (value) { |
| 114 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | idfObject.setDouble(Sizing_ZoneFields::ZoneCoolingDesignSupplyAirHumidityRatio, value.get()); |
| 115 | } | ||
| 116 | |||
| 117 | // ZoneHeatingDesignSupplyAirHumidityRatio | ||
| 118 | |||
| 119 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | value = modelObject.zoneHeatingDesignSupplyAirHumidityRatio(); |
| 120 |
1/2✓ Branch 0 taken 56 times.
✗ Branch 1 not taken.
|
56 | if (value) { |
| 121 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | idfObject.setDouble(Sizing_ZoneFields::ZoneHeatingDesignSupplyAirHumidityRatio, value.get()); |
| 122 | } | ||
| 123 | |||
| 124 | // ((DesignSpecificationOutdoorAirObjectName)(Design Specification Outdoor Air Object Name)) | ||
| 125 | |||
| 126 | // ZoneHeatingSizingFactor | ||
| 127 | |||
| 128 |
1/1✓ Branch 1 taken 56 times.
|
56 | value = modelObject.zoneHeatingSizingFactor(); |
| 129 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 56 times.
|
56 | if (value) { |
| 130 | ✗ | idfObject.setDouble(Sizing_ZoneFields::ZoneHeatingSizingFactor, value.get()); | |
| 131 | } | ||
| 132 | |||
| 133 | // ZoneCoolingSizingFactor | ||
| 134 | |||
| 135 |
1/1✓ Branch 1 taken 56 times.
|
56 | value = modelObject.zoneCoolingSizingFactor(); |
| 136 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 56 times.
|
56 | if (value) { |
| 137 | ✗ | idfObject.setDouble(Sizing_ZoneFields::ZoneCoolingSizingFactor, value.get()); | |
| 138 | } | ||
| 139 | |||
| 140 | // CoolingDesignAirFlowMethod | ||
| 141 | |||
| 142 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | s = modelObject.coolingDesignAirFlowMethod(); |
| 143 |
1/2✓ Branch 0 taken 56 times.
✗ Branch 1 not taken.
|
56 | if (s) { |
| 144 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | idfObject.setString(Sizing_ZoneFields::CoolingDesignAirFlowMethod, s.get()); |
| 145 | } | ||
| 146 | |||
| 147 | // CoolingDesignAirFlowRate | ||
| 148 | |||
| 149 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | value = modelObject.coolingDesignAirFlowRate(); |
| 150 |
1/2✓ Branch 0 taken 56 times.
✗ Branch 1 not taken.
|
56 | if (value) { |
| 151 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | idfObject.setDouble(Sizing_ZoneFields::CoolingDesignAirFlowRate, value.get()); |
| 152 | } | ||
| 153 | |||
| 154 | // CoolingMinimumAirFlowperZoneFloorArea | ||
| 155 | |||
| 156 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | value = modelObject.coolingMinimumAirFlowperZoneFloorArea(); |
| 157 |
1/2✓ Branch 0 taken 56 times.
✗ Branch 1 not taken.
|
56 | if (value) { |
| 158 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | idfObject.setDouble(Sizing_ZoneFields::CoolingMinimumAirFlowperZoneFloorArea, value.get()); |
| 159 | } | ||
| 160 | |||
| 161 | // CoolingMinimumAirFlow | ||
| 162 | |||
| 163 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | value = modelObject.coolingMinimumAirFlow(); |
| 164 |
1/2✓ Branch 0 taken 56 times.
✗ Branch 1 not taken.
|
56 | if (value) { |
| 165 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | idfObject.setDouble(Sizing_ZoneFields::CoolingMinimumAirFlow, value.get()); |
| 166 | } | ||
| 167 | |||
| 168 | // CoolingMinimumAirFlowFraction | ||
| 169 | |||
| 170 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | value = modelObject.coolingMinimumAirFlowFraction(); |
| 171 |
1/2✓ Branch 0 taken 56 times.
✗ Branch 1 not taken.
|
56 | if (value) { |
| 172 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | idfObject.setDouble(Sizing_ZoneFields::CoolingMinimumAirFlowFraction, value.get()); |
| 173 | } | ||
| 174 | |||
| 175 | // HeatingDesignAirFlowMethod | ||
| 176 | |||
| 177 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | s = modelObject.heatingDesignAirFlowMethod(); |
| 178 |
1/2✓ Branch 0 taken 56 times.
✗ Branch 1 not taken.
|
56 | if (s) { |
| 179 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | idfObject.setString(Sizing_ZoneFields::HeatingDesignAirFlowMethod, s.get()); |
| 180 | } | ||
| 181 | |||
| 182 | // HeatingDesignAirFlowRate | ||
| 183 | |||
| 184 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | value = modelObject.heatingDesignAirFlowRate(); |
| 185 |
1/2✓ Branch 0 taken 56 times.
✗ Branch 1 not taken.
|
56 | if (value) { |
| 186 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | idfObject.setDouble(Sizing_ZoneFields::HeatingDesignAirFlowRate, value.get()); |
| 187 | } | ||
| 188 | |||
| 189 | // HeatingMaximumAirFlowperZoneFloorArea | ||
| 190 | |||
| 191 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | value = modelObject.heatingMaximumAirFlowperZoneFloorArea(); |
| 192 |
1/2✓ Branch 0 taken 56 times.
✗ Branch 1 not taken.
|
56 | if (value) { |
| 193 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | idfObject.setDouble(Sizing_ZoneFields::HeatingMaximumAirFlowperZoneFloorArea, value.get()); |
| 194 | } | ||
| 195 | |||
| 196 | // HeatingMaximumAirFlow | ||
| 197 | |||
| 198 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | value = modelObject.heatingMaximumAirFlow(); |
| 199 |
1/2✓ Branch 0 taken 56 times.
✗ Branch 1 not taken.
|
56 | if (value) { |
| 200 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | idfObject.setDouble(Sizing_ZoneFields::HeatingMaximumAirFlow, value.get()); |
| 201 | } | ||
| 202 | |||
| 203 | // HeatingMaximumAirFlowFraction | ||
| 204 | |||
| 205 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | value = modelObject.heatingMaximumAirFlowFraction(); |
| 206 |
1/2✓ Branch 0 taken 56 times.
✗ Branch 1 not taken.
|
56 | if (value) { |
| 207 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | idfObject.setDouble(Sizing_ZoneFields::HeatingMaximumAirFlowFraction, value.get()); |
| 208 | } | ||
| 209 | |||
| 210 | // These fields are onto OS:Sizing:Zone but they are on DesignSpecification:ZoneAirDistribution in E+: | ||
| 211 | // * Design Zone Air Distribution Effectiveness in Cooling Mode | ||
| 212 | // * Design Zone Air Distribution Effectiveness in Heating Mode | ||
| 213 | // * Design Zone Secondary Recirculation Fraction | ||
| 214 | // * Design Minimum Zone Ventilation Efficiency | ||
| 215 | // If any of the DSZAD fields is non-default, then it's worth it to translate it. Otherwise it has no effect. | ||
| 216 |
3/3✓ Branch 1 taken 56 times.
✓ Branch 3 taken 15 times.
✓ Branch 4 taken 41 times.
|
112 | if (auto dSZADName_ = zoneDSZADName(thermalZone)) { |
| 217 |
2/2✓ Branch 1 taken 15 times.
✓ Branch 4 taken 15 times.
|
15 | IdfObject dSZAD(IddObjectType::DesignSpecification_ZoneAirDistribution); |
| 218 | |||
| 219 |
2/2✓ Branch 1 taken 15 times.
✓ Branch 4 taken 15 times.
|
15 | dSZAD.setName(*dSZADName_); |
| 220 | |||
| 221 | // register the DSZAD | ||
| 222 |
1/1✓ Branch 1 taken 15 times.
|
15 | m_idfObjects.push_back(dSZAD); |
| 223 | |||
| 224 | // Only translate the non-defaulted fields | ||
| 225 |
2/3✓ Branch 1 taken 15 times.
✓ Branch 3 taken 15 times.
✗ Branch 4 not taken.
|
15 | if (!modelObject.isDesignZoneAirDistributionEffectivenessinCoolingModeDefaulted()) { |
| 226 |
2/2✓ Branch 1 taken 15 times.
✓ Branch 4 taken 15 times.
|
15 | dSZAD.setDouble(DesignSpecification_ZoneAirDistributionFields::ZoneAirDistributionEffectivenessinCoolingMode, |
| 227 | modelObject.designZoneAirDistributionEffectivenessinCoolingMode()); | ||
| 228 | } | ||
| 229 | |||
| 230 |
3/3✓ Branch 1 taken 15 times.
✓ Branch 3 taken 14 times.
✓ Branch 4 taken 1 time.
|
15 | if (!modelObject.isDesignZoneAirDistributionEffectivenessinHeatingModeDefaulted()) { |
| 231 |
2/2✓ Branch 1 taken 14 times.
✓ Branch 4 taken 14 times.
|
14 | dSZAD.setDouble(DesignSpecification_ZoneAirDistributionFields::ZoneAirDistributionEffectivenessinHeatingMode, |
| 232 | modelObject.designZoneAirDistributionEffectivenessinHeatingMode()); | ||
| 233 | } | ||
| 234 | |||
| 235 |
3/3✓ Branch 1 taken 15 times.
✓ Branch 3 taken 4 times.
✓ Branch 4 taken 11 times.
|
15 | if (!modelObject.isDesignZoneSecondaryRecirculationFractionDefaulted()) { |
| 236 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
4 | dSZAD.setDouble(DesignSpecification_ZoneAirDistributionFields::ZoneSecondaryRecirculationFraction, |
| 237 | modelObject.designZoneSecondaryRecirculationFraction()); | ||
| 238 | } | ||
| 239 | |||
| 240 |
3/3✓ Branch 1 taken 15 times.
✓ Branch 3 taken 4 times.
✓ Branch 4 taken 11 times.
|
15 | if (!modelObject.isDesignMinimumZoneVentilationEfficiencyDefaulted()) { |
| 241 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
4 | dSZAD.setDouble(DesignSpecification_ZoneAirDistributionFields::MinimumZoneVentilationEfficiency, |
| 242 | modelObject.designMinimumZoneVentilationEfficiency()); | ||
| 243 | } | ||
| 244 | |||
| 245 |
3/3✓ Branch 1 taken 15 times.
✓ Branch 4 taken 15 times.
✓ Branch 7 taken 15 times.
|
15 | idfObject.setString(Sizing_ZoneFields::DesignSpecificationZoneAirDistributionObjectName, dSZAD.name().get()); |
| 246 | 71 | } | |
| 247 | |||
| 248 |
2/3✓ Branch 1 taken 56 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 56 times.
|
56 | if (modelObject.accountforDedicatedOutdoorAirSystem()) { |
| 249 | ✗ | idfObject.setString(Sizing_ZoneFields::AccountforDedicatedOutdoorAirSystem, "Yes"); | |
| 250 | |||
| 251 | { | ||
| 252 | ✗ | auto value = modelObject.dedicatedOutdoorAirSystemControlStrategy(); | |
| 253 | ✗ | idfObject.setString(Sizing_ZoneFields::DedicatedOutdoorAirSystemControlStrategy, value); | |
| 254 | ✗ | } | |
| 255 | |||
| 256 | { | ||
| 257 | ✗ | if (modelObject.isDedicatedOutdoorAirLowSetpointTemperatureforDesignAutosized()) { | |
| 258 | ✗ | idfObject.setString(Sizing_ZoneFields::DedicatedOutdoorAirLowSetpointTemperatureforDesign, "Autosize"); | |
| 259 | ✗ | } else if (auto value = modelObject.dedicatedOutdoorAirLowSetpointTemperatureforDesign()) { | |
| 260 | ✗ | idfObject.setDouble(Sizing_ZoneFields::DedicatedOutdoorAirLowSetpointTemperatureforDesign, value.get()); | |
| 261 | } | ||
| 262 | } | ||
| 263 | |||
| 264 | { | ||
| 265 | ✗ | if (modelObject.isDedicatedOutdoorAirHighSetpointTemperatureforDesignAutosized()) { | |
| 266 | ✗ | idfObject.setString(Sizing_ZoneFields::DedicatedOutdoorAirHighSetpointTemperatureforDesign, "Autosize"); | |
| 267 | ✗ | } else if (auto value = modelObject.dedicatedOutdoorAirHighSetpointTemperatureforDesign()) { | |
| 268 | ✗ | idfObject.setDouble(Sizing_ZoneFields::DedicatedOutdoorAirHighSetpointTemperatureforDesign, value.get()); | |
| 269 | } | ||
| 270 | } | ||
| 271 | } else { | ||
| 272 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
112 | idfObject.setString(Sizing_ZoneFields::AccountforDedicatedOutdoorAirSystem, "No"); |
| 273 | } | ||
| 274 | |||
| 275 | // Zone Load Sizing Method: Optional String | ||
| 276 |
1/1✓ Branch 1 taken 56 times.
|
56 | std::string zoneLoadSizingMethod = modelObject.zoneLoadSizingMethod(); |
| 277 |
1/1✓ Branch 1 taken 56 times.
|
56 | idfObject.setString(Sizing_ZoneFields::ZoneLoadSizingMethod, zoneLoadSizingMethod); |
| 278 | |||
| 279 | // Zone Latent Cooling Design Supply Air Humidity Ratio Input Method: Optional String | ||
| 280 |
1/1✓ Branch 1 taken 56 times.
|
56 | std::string zoneLatentCoolingDesignSupplyAirHumidityRatioInputMethod = modelObject.zoneLatentCoolingDesignSupplyAirHumidityRatioInputMethod(); |
| 281 |
1/1✓ Branch 1 taken 56 times.
|
56 | idfObject.setString(Sizing_ZoneFields::ZoneLatentCoolingDesignSupplyAirHumidityRatioInputMethod, |
| 282 | zoneLatentCoolingDesignSupplyAirHumidityRatioInputMethod); | ||
| 283 |
4/4✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
✓ Branch 7 taken 1 time.
✓ Branch 8 taken 55 times.
|
112 | if (openstudio::istringEqual(zoneLatentCoolingDesignSupplyAirHumidityRatioInputMethod, "SupplyAirHumidityRatio")) { |
| 284 | |||
| 285 | // Zone Dehumidification Design Supply Air Humidity Ratio: boost::optional<double> | ||
| 286 | 1 | if (boost::optional<double> _zoneDehumidificationDesignSupplyAirHumidityRatio = | |
| 287 |
2/3✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
|
2 | modelObject.zoneDehumidificationDesignSupplyAirHumidityRatio()) { |
| 288 | 1 | idfObject.setDouble(Sizing_ZoneFields::ZoneDehumidificationDesignSupplyAirHumidityRatio, | |
| 289 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | _zoneDehumidificationDesignSupplyAirHumidityRatio.get()); |
| 290 | } else { | ||
| 291 | ✗ | LOG(Error, "For " << modelObject.briefDescription() | |
| 292 | << ", when 'Zone Latent Cooling Design Supply Air Humidity Ratio Input Method' is 'SupplyAirHumidityRatio', you must enter " | ||
| 293 | "a 'Zone Dehumidification Design Supply Air Humidity Ratio'."); | ||
| 294 | } | ||
| 295 |
3/4✓ Branch 1 taken 55 times.
✓ Branch 4 taken 55 times.
✓ Branch 7 taken 55 times.
✗ Branch 8 not taken.
|
110 | } else if (openstudio::istringEqual(zoneLatentCoolingDesignSupplyAirHumidityRatioInputMethod, "HumidityRatioDifference")) { |
| 296 | // Zone Cooling Design Supply Air Humidity Ratio Difference: Optional Double | ||
| 297 |
1/1✓ Branch 1 taken 55 times.
|
55 | double zoneCoolingDesignSupplyAirHumidityRatioDifference = modelObject.zoneCoolingDesignSupplyAirHumidityRatioDifference(); |
| 298 |
1/1✓ Branch 1 taken 55 times.
|
55 | idfObject.setDouble(Sizing_ZoneFields::ZoneCoolingDesignSupplyAirHumidityRatioDifference, zoneCoolingDesignSupplyAirHumidityRatioDifference); |
| 299 | } else { | ||
| 300 | ✗ | OS_ASSERT(false); | |
| 301 | } | ||
| 302 | |||
| 303 | // Zone Latent Heating Design Supply Air Humidity Ratio Input Method: Optional String | ||
| 304 |
1/1✓ Branch 1 taken 56 times.
|
56 | std::string zoneLatentHeatingDesignSupplyAirHumidityRatioInputMethod = modelObject.zoneLatentHeatingDesignSupplyAirHumidityRatioInputMethod(); |
| 305 |
1/1✓ Branch 1 taken 56 times.
|
56 | idfObject.setString(Sizing_ZoneFields::ZoneLatentHeatingDesignSupplyAirHumidityRatioInputMethod, |
| 306 | zoneLatentHeatingDesignSupplyAirHumidityRatioInputMethod); | ||
| 307 | |||
| 308 |
4/4✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
✓ Branch 7 taken 1 time.
✓ Branch 8 taken 55 times.
|
112 | if (openstudio::istringEqual(zoneLatentHeatingDesignSupplyAirHumidityRatioInputMethod, "SupplyAirHumidityRatio")) { |
| 309 | |||
| 310 | // Zone Humidification Design Supply Air Humidity Ratio: boost::optional<double> | ||
| 311 |
2/3✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
|
2 | if (boost::optional<double> d_ = modelObject.zoneHumidificationDesignSupplyAirHumidityRatio()) { |
| 312 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(Sizing_ZoneFields::ZoneHumidificationDesignSupplyAirHumidityRatio, d_.get()); |
| 313 | } else { | ||
| 314 | ✗ | LOG(Error, "For " << modelObject.briefDescription() | |
| 315 | << ", when 'Zone Latent Heating Design Supply Air Humidity Ratio Input Method' is 'SupplyAirHumidityRatio', you must enter " | ||
| 316 | "a 'Zone Dehumidification Design Supply Air Humidity Ratio'."); | ||
| 317 | } | ||
| 318 |
3/4✓ Branch 1 taken 55 times.
✓ Branch 4 taken 55 times.
✓ Branch 7 taken 55 times.
✗ Branch 8 not taken.
|
110 | } else if (openstudio::istringEqual(zoneLatentHeatingDesignSupplyAirHumidityRatioInputMethod, "HumidityRatioDifference")) { |
| 319 | // Zone Humidification Design Supply Air Humidity Ratio Difference: Optional Double | ||
| 320 |
2/2✓ Branch 1 taken 55 times.
✓ Branch 4 taken 55 times.
|
55 | idfObject.setDouble(Sizing_ZoneFields::ZoneHumidificationDesignSupplyAirHumidityRatioDifference, |
| 321 | modelObject.zoneHumidificationDesignSupplyAirHumidityRatioDifference()); | ||
| 322 | } else { | ||
| 323 | ✗ | OS_ASSERT(false); | |
| 324 | } | ||
| 325 | |||
| 326 |
4/4✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
✓ Branch 7 taken 2 times.
✓ Branch 8 taken 54 times.
|
112 | if (!openstudio::istringEqual(zoneLoadSizingMethod, "Sensible Load Only No Latent Load")) { |
| 327 | // Zone Humidistat Dehumidification Set Point Schedule Name | ||
| 328 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
4 | if (boost::optional<Schedule> sch_ = modelObject.zoneHumidistatDehumidificationSetPointSchedule()) { |
| 329 |
3/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 6 taken 2 times.
✗ Branch 7 not taken.
|
4 | if (auto idf_sch_ = translateAndMapModelObject(sch_.get())) { |
| 330 |
3/3✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
|
2 | idfObject.setString(Sizing_ZoneFields::ZoneHumidistatDehumidificationSetPointScheduleName, idf_sch_->nameString()); |
| 331 | 2 | } | |
| 332 | 2 | } | |
| 333 | |||
| 334 | // Zone Humidistat Humidification Set Point Schedule Name | ||
| 335 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
4 | if (boost::optional<Schedule> sch_ = modelObject.zoneHumidistatHumidificationSetPointSchedule()) { |
| 336 |
3/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 6 taken 2 times.
✗ Branch 7 not taken.
|
4 | if (auto idf_sch_ = translateAndMapModelObject(sch_.get())) { |
| 337 | |||
| 338 |
3/3✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
|
2 | idfObject.setString(Sizing_ZoneFields::ZoneHumidistatHumidificationSetPointScheduleName, idf_sch_->nameString()); |
| 339 | 2 | } | |
| 340 | 2 | } | |
| 341 | } | ||
| 342 | |||
| 343 | // Type of Space Sum to Use | ||
| 344 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | s = modelObject.sizingOption(); |
| 345 |
1/2✓ Branch 0 taken 56 times.
✗ Branch 1 not taken.
|
56 | if (s) { |
| 346 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | idfObject.setString(Sizing_ZoneFields::TypeofSpaceSumtoUse, s.get()); |
| 347 | } | ||
| 348 | |||
| 349 | // Heating Coil Sizing Method | ||
| 350 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | s = modelObject.heatingCoilSizingMethod(); |
| 351 |
1/2✓ Branch 0 taken 56 times.
✗ Branch 1 not taken.
|
56 | if (s) { |
| 352 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | idfObject.setString(Sizing_ZoneFields::HeatingCoilSizingMethod, s.get()); |
| 353 | } | ||
| 354 | |||
| 355 | // Maximum Heating Capacity To Cooling Load Sizing Ratio | ||
| 356 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | value = modelObject.maximumHeatingCapacityToCoolingLoadSizingRatio(); |
| 357 |
1/2✓ Branch 0 taken 56 times.
✗ Branch 1 not taken.
|
56 | if (value) { |
| 358 |
2/2✓ Branch 1 taken 56 times.
✓ Branch 4 taken 56 times.
|
56 | idfObject.setDouble(Sizing_ZoneFields::MaximumHeatingCapacityToCoolingLoadSizingRatio, value.get()); |
| 359 | } | ||
| 360 | |||
| 361 |
1/1✓ Branch 1 taken 56 times.
|
56 | return idfObject; |
| 362 | 56 | } | |
| 363 | |||
| 364 | } // namespace energyplus | ||
| 365 | |||
| 366 | } // namespace openstudio | ||
| 367 |