src/energyplus/ForwardTranslator/ForwardTranslateZoneHVACIdealLoadsAirSystem.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 | |||
| 8 | #include "../../model/Model.hpp" | ||
| 9 | #include "../../model/Schedule.hpp" | ||
| 10 | #include "../../model/Schedule_Impl.hpp" | ||
| 11 | #include "../../model/Node.hpp" | ||
| 12 | #include "../../model/Node_Impl.hpp" | ||
| 13 | #include "../../model/ZoneHVACIdealLoadsAirSystem.hpp" | ||
| 14 | #include "../../model/ZoneHVACIdealLoadsAirSystem_Impl.hpp" | ||
| 15 | #include "../../model/ThermalZone.hpp" | ||
| 16 | #include "../../model/ThermalZone_Impl.hpp" | ||
| 17 | #include "../../model/Space.hpp" | ||
| 18 | #include "../../model/Space_Impl.hpp" | ||
| 19 | #include "../../model/PortList.hpp" | ||
| 20 | #include "../../model/PortList_Impl.hpp" | ||
| 21 | #include "../../model/DesignSpecificationOutdoorAir.hpp" | ||
| 22 | #include "../../model/DesignSpecificationOutdoorAir_Impl.hpp" | ||
| 23 | #include "../../model/AirLoopHVACReturnPlenum.hpp" | ||
| 24 | #include "../../model/AirLoopHVACReturnPlenum_Impl.hpp" | ||
| 25 | |||
| 26 | #include <utilities/idd/ZoneHVAC_IdealLoadsAirSystem_FieldEnums.hxx> | ||
| 27 | #include "../../utilities/idd/IddEnums.hpp" | ||
| 28 | #include "../../utilities/plot/ProgressBar.hpp" | ||
| 29 | #include <utilities/idd/IddEnums.hxx> | ||
| 30 | #include <utilities/idd/IddFactory.hxx> | ||
| 31 | |||
| 32 | #include "../../utilities/core/Assert.hpp" | ||
| 33 | |||
| 34 | using namespace openstudio::model; | ||
| 35 | |||
| 36 | namespace openstudio { | ||
| 37 | |||
| 38 | namespace energyplus { | ||
| 39 | |||
| 40 | 2 | boost::optional<IdfObject> ForwardTranslator::translateZoneHVACIdealLoadsAirSystem(ZoneHVACIdealLoadsAirSystem& modelObject) { | |
| 41 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | IdfObject zoneHVACIdealLoadsAirSystem = createRegisterAndNameIdfObject(openstudio::IddObjectType::ZoneHVAC_IdealLoadsAirSystem, modelObject); |
| 42 | |||
| 43 | 2 | std::vector<model::ZoneHVACIdealLoadsAirSystem> allIdealSystems; | |
| 44 |
1/1✓ Branch 1 taken 2 times.
|
2 | auto returnPlenum = modelObject.returnPlenum(); |
| 45 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 2 times.
|
2 | if (returnPlenum) { |
| 46 | ✗ | allIdealSystems = returnPlenum->getImpl<model::detail::AirLoopHVACReturnPlenum_Impl>()->zoneHVACIdealLoadsAirSystems(); | |
| 47 | } | ||
| 48 | |||
| 49 | // availability schedule name | ||
| 50 |
1/1✓ Branch 1 taken 2 times.
|
2 | boost::optional<Schedule> schedule = modelObject.availabilitySchedule(); |
| 51 |
1/2✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
|
2 | if (schedule) { |
| 52 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | boost::optional<IdfObject> idfSchedule = translateAndMapModelObject(*schedule); |
| 53 |
1/2✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
|
2 | if (idfSchedule) { |
| 54 |
4/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✓ Branch 10 taken 2 times.
|
2 | zoneHVACIdealLoadsAirSystem.setString(ZoneHVAC_IdealLoadsAirSystemFields::AvailabilityScheduleName, idfSchedule->name().get()); |
| 55 | } | ||
| 56 | 2 | } | |
| 57 | |||
| 58 | // zone supply air node name | ||
| 59 | 2 | boost::optional<std::string> zoneSupplyAirNodeName; | |
| 60 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
4 | if (boost::optional<Node> node = modelObject.outletNode()) { |
| 61 |
3/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 6 taken 2 times.
✗ Branch 7 not taken.
|
4 | if (boost::optional<std::string> s = node->name()) { |
| 62 |
1/1✓ Branch 1 taken 2 times.
|
2 | zoneSupplyAirNodeName = s; |
| 63 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | zoneHVACIdealLoadsAirSystem.setString(ZoneHVAC_IdealLoadsAirSystemFields::ZoneSupplyAirNodeName, s.get()); |
| 64 | 2 | } | |
| 65 | 2 | } | |
| 66 | |||
| 67 | // zone exhaust air node name | ||
| 68 |
1/2✓ Branch 1 taken 2 times.
✗ Branch 2 not taken.
|
2 | if (allIdealSystems.empty()) { |
| 69 | 2 | boost::optional<std::string> zoneExhaustAirNodeName; | |
| 70 | |||
| 71 |
1/1✓ Branch 1 taken 2 times.
|
2 | auto plenum = modelObject.returnPlenum(); |
| 72 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 2 times.
|
2 | if (plenum) { |
| 73 | ✗ | auto zone = modelObject.thermalZone(); | |
| 74 | ✗ | OS_ASSERT(zone); | |
| 75 | ✗ | auto h = zone->handle(); | |
| 76 | |||
| 77 | ✗ | boost::optional<Node> plenumInletNode; | |
| 78 | |||
| 79 | ✗ | auto plenumInlets = plenum->inletModelObjects(); | |
| 80 | ✗ | for (auto& plenumInlet : plenumInlets) { | |
| 81 | ✗ | auto node = plenumInlet.optionalCast<Node>(); | |
| 82 | ✗ | if (node) { | |
| 83 | ✗ | auto pl = node->inletModelObject(); | |
| 84 | ✗ | if (pl && pl->optionalCast<PortList>()) { | |
| 85 | ✗ | auto mo = pl->cast<PortList>().getImpl<model::detail::PortList_Impl>()->hvacComponent(); | |
| 86 | ✗ | if (mo.handle() == h) { | |
| 87 | ✗ | zoneExhaustAirNodeName = node->nameString(); | |
| 88 | ✗ | break; | |
| 89 | } | ||
| 90 | ✗ | } | |
| 91 | ✗ | } | |
| 92 | ✗ | } | |
| 93 | ✗ | } | |
| 94 | |||
| 95 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 2 times.
|
2 | if (zoneExhaustAirNodeName) { |
| 96 | ✗ | zoneHVACIdealLoadsAirSystem.setString(ZoneHVAC_IdealLoadsAirSystemFields::ZoneExhaustAirNodeName, zoneExhaustAirNodeName.get()); | |
| 97 | } | ||
| 98 | 2 | } | |
| 99 | |||
| 100 |
1/2✓ Branch 1 taken 2 times.
✗ Branch 2 not taken.
|
2 | if (allIdealSystems.empty()) { |
| 101 | // System Inlet Air Node Name | ||
| 102 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
4 | if (boost::optional<Node> node = modelObject.inletNode()) { |
| 103 |
3/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 6 taken 2 times.
✗ Branch 7 not taken.
|
4 | if (boost::optional<std::string> s = node->name()) { |
| 104 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | zoneHVACIdealLoadsAirSystem.setString(ZoneHVAC_IdealLoadsAirSystemFields::ZoneExhaustAirNodeName, s.get()); |
| 105 | 2 | } | |
| 106 | 2 | } | |
| 107 | } else { | ||
| 108 | ✗ | auto front = allIdealSystems.front(); | |
| 109 | ✗ | if (front.handle() == modelObject.handle()) { | |
| 110 | ✗ | auto node = front.inletNode(); | |
| 111 | ✗ | OS_ASSERT(node); | |
| 112 | ✗ | zoneHVACIdealLoadsAirSystem.setString(ZoneHVAC_IdealLoadsAirSystemFields::SystemInletAirNodeName, node->nameString()); | |
| 113 | ✗ | } | |
| 114 | ✗ | } | |
| 115 | |||
| 116 | // maximum heating supply air temperature | ||
| 117 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
2 | if (!modelObject.isMaximumHeatingSupplyAirTemperatureDefaulted()) { |
| 118 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | zoneHVACIdealLoadsAirSystem.setDouble(ZoneHVAC_IdealLoadsAirSystemFields::MaximumHeatingSupplyAirTemperature, |
| 119 | modelObject.maximumHeatingSupplyAirTemperature()); | ||
| 120 | } | ||
| 121 | |||
| 122 | // minimum cooling supply air temperature | ||
| 123 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
2 | if (!modelObject.isMinimumCoolingSupplyAirTemperatureDefaulted()) { |
| 124 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | zoneHVACIdealLoadsAirSystem.setDouble(ZoneHVAC_IdealLoadsAirSystemFields::MinimumCoolingSupplyAirTemperature, |
| 125 | modelObject.minimumCoolingSupplyAirTemperature()); | ||
| 126 | } | ||
| 127 | |||
| 128 | // maximum heating supply air humidity ratio | ||
| 129 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
2 | if (!modelObject.isMaximumHeatingSupplyAirHumidityRatioDefaulted()) { |
| 130 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | zoneHVACIdealLoadsAirSystem.setDouble(ZoneHVAC_IdealLoadsAirSystemFields::MaximumHeatingSupplyAirHumidityRatio, |
| 131 | modelObject.maximumHeatingSupplyAirHumidityRatio()); | ||
| 132 | } | ||
| 133 | |||
| 134 | // minimum cooling supply air humidity ratio | ||
| 135 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
2 | if (!modelObject.isMinimumCoolingSupplyAirHumidityRatioDefaulted()) { |
| 136 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | zoneHVACIdealLoadsAirSystem.setDouble(ZoneHVAC_IdealLoadsAirSystemFields::MinimumCoolingSupplyAirHumidityRatio, |
| 137 | modelObject.minimumCoolingSupplyAirHumidityRatio()); | ||
| 138 | } | ||
| 139 | |||
| 140 | // heating limit | ||
| 141 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
2 | if (!modelObject.isHeatingLimitDefaulted()) { |
| 142 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | zoneHVACIdealLoadsAirSystem.setString(ZoneHVAC_IdealLoadsAirSystemFields::HeatingLimit, modelObject.heatingLimit()); |
| 143 | } | ||
| 144 | |||
| 145 | // maximum heating air flow rate | ||
| 146 |
2/3✓ Branch 1 taken 2 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 2 times.
|
2 | if (modelObject.isMaximumHeatingAirFlowRateAutosized()) { |
| 147 | ✗ | zoneHVACIdealLoadsAirSystem.setString(ZoneHVAC_IdealLoadsAirSystemFields::MaximumHeatingAirFlowRate, "Autosize"); | |
| 148 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
4 | } else if (boost::optional<double> d = modelObject.maximumHeatingAirFlowRate()) { |
| 149 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | zoneHVACIdealLoadsAirSystem.setDouble(ZoneHVAC_IdealLoadsAirSystemFields::MaximumHeatingAirFlowRate, d.get()); |
| 150 | } | ||
| 151 | |||
| 152 | // maximum sensible heating capacity | ||
| 153 |
2/3✓ Branch 1 taken 2 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 2 times.
|
2 | if (modelObject.isMaximumSensibleHeatingCapacityAutosized()) { |
| 154 | ✗ | zoneHVACIdealLoadsAirSystem.setString(ZoneHVAC_IdealLoadsAirSystemFields::MaximumSensibleHeatingCapacity, "Autosize"); | |
| 155 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
4 | } else if (boost::optional<double> d = modelObject.maximumSensibleHeatingCapacity()) { |
| 156 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | zoneHVACIdealLoadsAirSystem.setDouble(ZoneHVAC_IdealLoadsAirSystemFields::MaximumSensibleHeatingCapacity, d.get()); |
| 157 | } | ||
| 158 | |||
| 159 | // cooling limit | ||
| 160 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
2 | if (!modelObject.isCoolingLimitDefaulted()) { |
| 161 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | zoneHVACIdealLoadsAirSystem.setString(ZoneHVAC_IdealLoadsAirSystemFields::CoolingLimit, modelObject.coolingLimit()); |
| 162 | } | ||
| 163 | |||
| 164 | // maximum cooling air flow rate | ||
| 165 |
2/3✓ Branch 1 taken 2 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 2 times.
|
2 | if (modelObject.isMaximumCoolingAirFlowRateAutosized()) { |
| 166 | ✗ | zoneHVACIdealLoadsAirSystem.setString(ZoneHVAC_IdealLoadsAirSystemFields::MaximumCoolingAirFlowRate, "Autosize"); | |
| 167 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
4 | } else if (boost::optional<double> d = modelObject.maximumCoolingAirFlowRate()) { |
| 168 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | zoneHVACIdealLoadsAirSystem.setDouble(ZoneHVAC_IdealLoadsAirSystemFields::MaximumCoolingAirFlowRate, d.get()); |
| 169 | } | ||
| 170 | |||
| 171 | // maximum total cooling capacity | ||
| 172 |
2/3✓ Branch 1 taken 2 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 2 times.
|
2 | if (modelObject.isMaximumTotalCoolingCapacityAutosized()) { |
| 173 | ✗ | zoneHVACIdealLoadsAirSystem.setString(ZoneHVAC_IdealLoadsAirSystemFields::MaximumTotalCoolingCapacity, "Autosize"); | |
| 174 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
4 | } else if (boost::optional<double> d = modelObject.maximumTotalCoolingCapacity()) { |
| 175 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | zoneHVACIdealLoadsAirSystem.setDouble(ZoneHVAC_IdealLoadsAirSystemFields::MaximumTotalCoolingCapacity, d.get()); |
| 176 | } | ||
| 177 | |||
| 178 | // heating availability schedule name | ||
| 179 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
4 | if (boost::optional<Schedule> schedule = modelObject.heatingAvailabilitySchedule()) { |
| 180 |
3/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 6 taken 2 times.
✗ Branch 7 not taken.
|
4 | if (boost::optional<IdfObject> _schedule = translateAndMapModelObject(schedule.get())) { |
| 181 |
4/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✓ Branch 10 taken 2 times.
|
2 | zoneHVACIdealLoadsAirSystem.setString(ZoneHVAC_IdealLoadsAirSystemFields::HeatingAvailabilityScheduleName, _schedule->name().get()); |
| 182 | 2 | } | |
| 183 | 2 | } | |
| 184 | |||
| 185 | // cooling availability schedule name | ||
| 186 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
4 | if (boost::optional<Schedule> schedule = modelObject.coolingAvailabilitySchedule()) { |
| 187 |
3/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 6 taken 2 times.
✗ Branch 7 not taken.
|
4 | if (boost::optional<IdfObject> _schedule = translateAndMapModelObject(schedule.get())) { |
| 188 |
4/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✓ Branch 10 taken 2 times.
|
2 | zoneHVACIdealLoadsAirSystem.setString(ZoneHVAC_IdealLoadsAirSystemFields::CoolingAvailabilityScheduleName, _schedule->name().get()); |
| 189 | 2 | } | |
| 190 | 2 | } | |
| 191 | |||
| 192 | // dehumidification control type | ||
| 193 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
2 | if (!modelObject.isDehumidificationControlTypeDefaulted()) { |
| 194 |
1/1✓ Branch 1 taken 2 times.
|
2 | zoneHVACIdealLoadsAirSystem.setString(ZoneHVAC_IdealLoadsAirSystemFields::DehumidificationControlType, |
| 195 |
1/1✓ Branch 1 taken 2 times.
|
4 | modelObject.dehumidificationControlType()); |
| 196 | } | ||
| 197 | |||
| 198 | // cooling sensible heat ratio | ||
| 199 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
2 | if (!modelObject.isCoolingSensibleHeatRatioDefaulted()) { |
| 200 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | zoneHVACIdealLoadsAirSystem.setDouble(ZoneHVAC_IdealLoadsAirSystemFields::CoolingSensibleHeatRatio, modelObject.coolingSensibleHeatRatio()); |
| 201 | } | ||
| 202 | |||
| 203 | // humidification control type | ||
| 204 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
2 | if (!modelObject.isHumidificationControlTypeDefaulted()) { |
| 205 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | zoneHVACIdealLoadsAirSystem.setString(ZoneHVAC_IdealLoadsAirSystemFields::HumidificationControlType, modelObject.humidificationControlType()); |
| 206 | } | ||
| 207 | |||
| 208 | // design specification outdoor air object name | ||
| 209 | // TODO: this field and associated getter/setter should be replaced with a "Control For Outdoor Air" field (or nothing) | ||
| 210 |
3/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 1 time.
|
4 | if (auto designOA = modelObject.designSpecificationOutdoorAirObject()) { |
| 211 |
7/7✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 14 taken 1 time.
✓ Branch 17 taken 1 time.
✓ Branch 20 taken 1 time.
|
1 | LOG(Debug, "Translating hardcoded DesignSpecificationOutdoorAir for ZoneHVACIdealLoadsAirSystem: " << modelObject.nameString()); |
| 212 | 1 | auto translateAndMapDSOA = [this](DesignSpecificationOutdoorAir& dsoa) -> boost::optional<IdfObject> { | |
| 213 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | auto objInMapIt = m_map.find(dsoa.handle()); |
| 214 |
1/2✗ Branch 2 not taken.
✓ Branch 3 taken 1 time.
|
1 | if (objInMapIt != m_map.end()) { |
| 215 | ✗ | return objInMapIt->second; | |
| 216 | } | ||
| 217 | |||
| 218 |
1/1✓ Branch 1 taken 1 time.
|
1 | auto idf_dsoa_ = detail::translateDesignSpecificationOutdoorAir(dsoa); |
| 219 | |||
| 220 |
1/2✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
|
1 | if (idf_dsoa_) { |
| 221 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | m_idfObjects.push_back(*idf_dsoa_); |
| 222 |
3/3✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
|
1 | m_map.emplace(dsoa.handle(), *idf_dsoa_); |
| 223 | } | ||
| 224 | |||
| 225 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | if (m_progressBar) { |
| 226 | ✗ | m_progressBar->setValue((int)m_map.size()); | |
| 227 | } | ||
| 228 | 1 | return idf_dsoa_; | |
| 229 | 1 | }; | |
| 230 | |||
| 231 |
3/4✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 6 taken 1 time.
✗ Branch 7 not taken.
|
2 | if (auto idf = translateAndMapDSOA(designOA.get())) { |
| 232 |
4/4✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
|
1 | zoneHVACIdealLoadsAirSystem.setString(ZoneHVAC_IdealLoadsAirSystemFields::DesignSpecificationOutdoorAirObjectName, idf->name().get()); |
| 233 | 1 | } | |
| 234 |
2/3✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
|
2 | } else if (boost::optional<ThermalZone> zone_ = modelObject.thermalZone()) { |
| 235 |
4/5✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 11 taken 1 time.
✗ Branch 12 not taken.
|
2 | if (auto dsoaOrList_ = getOrCreateThermalZoneDSOA(zone_->cast<ThermalZone>())) { |
| 236 |
7/7✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 14 taken 1 time.
✓ Branch 17 taken 1 time.
✓ Branch 20 taken 1 time.
|
1 | LOG(Debug, "Translating ThermalZone DesignSpecificationOutdoorAir for ZoneHVACIdealLoadsAirSystem: " << modelObject.nameString()); |
| 237 | // set the field to reference the design specification outdoor air | ||
| 238 |
3/3✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
|
1 | zoneHVACIdealLoadsAirSystem.setString(ZoneHVAC_IdealLoadsAirSystemFields::DesignSpecificationOutdoorAirObjectName, dsoaOrList_->nameString()); |
| 239 | 1 | } | |
| 240 | 3 | } | |
| 241 | |||
| 242 | // demand controlled ventilation type | ||
| 243 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
2 | if (!modelObject.isDemandControlledVentilationTypeDefaulted()) { |
| 244 |
1/1✓ Branch 1 taken 2 times.
|
2 | zoneHVACIdealLoadsAirSystem.setString(ZoneHVAC_IdealLoadsAirSystemFields::DemandControlledVentilationType, |
| 245 |
1/1✓ Branch 1 taken 2 times.
|
4 | modelObject.demandControlledVentilationType()); |
| 246 | } | ||
| 247 | |||
| 248 | // outdoor air economizer type | ||
| 249 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
2 | if (!modelObject.isOutdoorAirEconomizerTypeDefaulted()) { |
| 250 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | zoneHVACIdealLoadsAirSystem.setString(ZoneHVAC_IdealLoadsAirSystemFields::OutdoorAirEconomizerType, modelObject.outdoorAirEconomizerType()); |
| 251 | } | ||
| 252 | |||
| 253 | // heat recovery type | ||
| 254 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
2 | if (!modelObject.isHeatRecoveryTypeDefaulted()) { |
| 255 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | zoneHVACIdealLoadsAirSystem.setString(ZoneHVAC_IdealLoadsAirSystemFields::HeatRecoveryType, modelObject.heatRecoveryType()); |
| 256 | } | ||
| 257 | |||
| 258 | // sensible heat recovery effectiveness | ||
| 259 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
2 | if (!modelObject.isSensibleHeatRecoveryEffectivenessDefaulted()) { |
| 260 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | zoneHVACIdealLoadsAirSystem.setDouble(ZoneHVAC_IdealLoadsAirSystemFields::SensibleHeatRecoveryEffectiveness, |
| 261 | modelObject.sensibleHeatRecoveryEffectiveness()); | ||
| 262 | } | ||
| 263 | |||
| 264 | // latent heat recovery effectiveness | ||
| 265 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
2 | if (!modelObject.isLatentHeatRecoveryEffectivenessDefaulted()) { |
| 266 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | zoneHVACIdealLoadsAirSystem.setDouble(ZoneHVAC_IdealLoadsAirSystemFields::LatentHeatRecoveryEffectiveness, |
| 267 | modelObject.latentHeatRecoveryEffectiveness()); | ||
| 268 | } | ||
| 269 | |||
| 270 | // heating fuel efficiency schedule name | ||
| 271 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
4 | if (boost::optional<Schedule> schedule = modelObject.heatingFuelEfficiencySchedule()) { |
| 272 |
3/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 6 taken 2 times.
✗ Branch 7 not taken.
|
4 | if (boost::optional<IdfObject> _schedule = translateAndMapModelObject(schedule.get())) { |
| 273 |
4/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✓ Branch 10 taken 2 times.
|
2 | zoneHVACIdealLoadsAirSystem.setString(ZoneHVAC_IdealLoadsAirSystemFields::HeatingFuelEfficiencyScheduleName, _schedule->name().get()); |
| 274 | 2 | } | |
| 275 | 2 | } | |
| 276 | |||
| 277 | // heating fuel type | ||
| 278 |
1/1✓ Branch 1 taken 2 times.
|
2 | const std::string heatingFuelType = modelObject.heatingFuelType(); |
| 279 |
1/1✓ Branch 1 taken 2 times.
|
2 | zoneHVACIdealLoadsAirSystem.setString(ZoneHVAC_IdealLoadsAirSystemFields::HeatingFuelType, heatingFuelType); |
| 280 | |||
| 281 | // cooling fuel efficiency schedule name | ||
| 282 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
4 | if (boost::optional<Schedule> schedule = modelObject.coolingFuelEfficiencySchedule()) { |
| 283 |
3/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 6 taken 2 times.
✗ Branch 7 not taken.
|
4 | if (boost::optional<IdfObject> _schedule = translateAndMapModelObject(schedule.get())) { |
| 284 |
4/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✓ Branch 10 taken 2 times.
|
2 | zoneHVACIdealLoadsAirSystem.setString(ZoneHVAC_IdealLoadsAirSystemFields::CoolingFuelEfficiencyScheduleName, _schedule->name().get()); |
| 285 | 2 | } | |
| 286 | 2 | } | |
| 287 | |||
| 288 | // cooling fuel type | ||
| 289 |
1/1✓ Branch 1 taken 2 times.
|
2 | const std::string coolingFuelType = modelObject.coolingFuelType(); |
| 290 |
1/1✓ Branch 1 taken 2 times.
|
2 | zoneHVACIdealLoadsAirSystem.setString(ZoneHVAC_IdealLoadsAirSystemFields::CoolingFuelType, coolingFuelType); |
| 291 | |||
| 292 |
1/1✓ Branch 1 taken 2 times.
|
4 | return zoneHVACIdealLoadsAirSystem; |
| 293 | 2 | } | |
| 294 | |||
| 295 | } // namespace energyplus | ||
| 296 | |||
| 297 | } // namespace openstudio | ||
| 298 |