src/energyplus/ForwardTranslator/ForwardTranslateZoneHVACEvaporativeCoolerUnit.cpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /*********************************************************************************************************************** | ||
| 2 | * OpenStudio(R), Copyright (c) 2008-2023, Alliance for Energy Innovation, LLC, and other contributors. All rights reserved. | ||
| 3 | * | ||
| 4 | * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the | ||
| 5 | * following conditions are met: | ||
| 6 | * | ||
| 7 | * (1) Redistributions of source code must retain the above copyright notice, this list of conditions and the following | ||
| 8 | * disclaimer. | ||
| 9 | * | ||
| 10 | * (2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following | ||
| 11 | * disclaimer in the documentation and/or other materials provided with the distribution. | ||
| 12 | * | ||
| 13 | * (3) Neither the name of the copyright holder nor the names of any contributors may be used to endorse or promote products | ||
| 14 | * derived from this software without specific prior written permission from the respective party. | ||
| 15 | * | ||
| 16 | * (4) Other than as required in clauses (1) and (2), distributions in any form of modifications or other derivative works | ||
| 17 | * may not use the "OpenStudio" trademark, "OS", "os", or any other confusingly similar designation without specific prior | ||
| 18 | * written permission from Alliance for Energy Innovation, LLC. | ||
| 19 | * | ||
| 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, | ||
| 21 | * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
| 22 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE UNITED STATES GOVERNMENT, OR THE UNITED | ||
| 23 | * STATES DEPARTMENT OF ENERGY, NOR ANY OF THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
| 24 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF | ||
| 25 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 26 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | ||
| 27 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 28 | ***********************************************************************************************************************/ | ||
| 29 | |||
| 30 | #include "../ForwardTranslator.hpp" | ||
| 31 | #include "../../model/Model.hpp" | ||
| 32 | #include "../../model/ZoneHVACEvaporativeCoolerUnit.hpp" | ||
| 33 | #include "../../model/ZoneHVACEvaporativeCoolerUnit_Impl.hpp" | ||
| 34 | #include "../../model/Schedule.hpp" | ||
| 35 | #include "../../model/Schedule_Impl.hpp" | ||
| 36 | #include "../../model/Node.hpp" | ||
| 37 | #include "../../model/Node_Impl.hpp" | ||
| 38 | |||
| 39 | #include <utilities/idd/ZoneHVAC_EvaporativeCoolerUnit_FieldEnums.hxx> | ||
| 40 | #include <utilities/idd/Fan_ComponentModel_FieldEnums.hxx> | ||
| 41 | #include <utilities/idd/Fan_ConstantVolume_FieldEnums.hxx> | ||
| 42 | #include <utilities/idd/Fan_OnOff_FieldEnums.hxx> | ||
| 43 | #include <utilities/idd/Fan_VariableVolume_FieldEnums.hxx> | ||
| 44 | #include <utilities/idd/Fan_SystemModel_FieldEnums.hxx> | ||
| 45 | #include <utilities/idd/EvaporativeCooler_Direct_ResearchSpecial_FieldEnums.hxx> | ||
| 46 | #include <utilities/idd/EvaporativeCooler_Indirect_ResearchSpecial_FieldEnums.hxx> | ||
| 47 | #include <utilities/idd/IddEnums.hxx> | ||
| 48 | |||
| 49 | using namespace openstudio::model; | ||
| 50 | |||
| 51 | namespace openstudio { | ||
| 52 | |||
| 53 | namespace energyplus { | ||
| 54 | |||
| 55 | 5 | boost::optional<IdfObject> ForwardTranslator::translateZoneHVACEvaporativeCoolerUnit(model::ZoneHVACEvaporativeCoolerUnit& modelObject) { | |
| 56 | |||
| 57 | 5 | boost::optional<IdfObject> i_firstEvaporativeCooler_; | |
| 58 | { | ||
| 59 |
1/1✓ Branch 1 taken 5 times.
|
5 | HVACComponent firstEvaporativeCooler = modelObject.firstEvaporativeCooler(); |
| 60 |
1/1✓ Branch 1 taken 5 times.
|
5 | i_firstEvaporativeCooler_ = translateAndMapModelObject(firstEvaporativeCooler); |
| 61 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
|
5 | if (!i_firstEvaporativeCooler_) { |
| 62 | ✗ | LOG(Error, "ZoneHVACEvaporativeCoolerUnit '" << modelObject.nameString() << "', could not translate required First Evaporative Cooler:" | |
| 63 | << firstEvaporativeCooler.briefDescription()); | ||
| 64 | ✗ | return boost::none; | |
| 65 | } | ||
| 66 | 5 | } | |
| 67 | |||
| 68 | 5 | boost::optional<IdfObject> i_fan_; | |
| 69 | { | ||
| 70 |
1/1✓ Branch 1 taken 5 times.
|
5 | HVACComponent supplyAirFan = modelObject.supplyAirFan(); |
| 71 |
1/1✓ Branch 1 taken 5 times.
|
5 | i_fan_ = translateAndMapModelObject(supplyAirFan); |
| 72 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
|
5 | if (!i_fan_) { |
| 73 | ✗ | LOG(Error, "ZoneHVACEvaporativeCoolerUnit '" << modelObject.nameString() | |
| 74 | << "', could not translate required Supply Air Fan:" << supplyAirFan.briefDescription()); | ||
| 75 | ✗ | return boost::none; | |
| 76 | } | ||
| 77 | 5 | } | |
| 78 | |||
| 79 | // i_firstEvaporativeCooler_ and i_fan_ are always initialized now | ||
| 80 | |||
| 81 | // Instantiate an IdfObject of the class to store the values | ||
| 82 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | IdfObject idfObject = createRegisterAndNameIdfObject(openstudio::IddObjectType::ZoneHVAC_EvaporativeCoolerUnit, modelObject); |
| 83 | |||
| 84 | // Availability Schedule Name: Required Object | ||
| 85 |
1/1✓ Branch 1 taken 5 times.
|
5 | Schedule availabilitySchedule_ = modelObject.availabilitySchedule(); |
| 86 |
2/3✓ Branch 1 taken 5 times.
✓ Branch 3 taken 5 times.
✗ Branch 4 not taken.
|
10 | if (boost::optional<IdfObject> wo_ = translateAndMapModelObject(availabilitySchedule_)) { |
| 87 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
|
5 | idfObject.setString(ZoneHVAC_EvaporativeCoolerUnitFields::AvailabilityScheduleName, wo_->nameString()); |
| 88 | 5 | } | |
| 89 | |||
| 90 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | const auto outdoorAirInletNodeName = modelObject.nameString() + " Outdoor Air Node"; |
| 91 | 5 | std::string coolerOutletNodeName; | |
| 92 | |||
| 93 | // Outdoor Air Inlet Node Name: Required Node - This is an Outdoor Air Node | ||
| 94 | { | ||
| 95 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | IdfObject oaNodeListIdf(openstudio::IddObjectType::OutdoorAir_NodeList); |
| 96 |
1/1✓ Branch 1 taken 5 times.
|
5 | oaNodeListIdf.setString(0, outdoorAirInletNodeName); |
| 97 |
1/1✓ Branch 2 taken 5 times.
|
5 | m_idfObjects.emplace_back(std::move(oaNodeListIdf)); |
| 98 |
1/1✓ Branch 1 taken 5 times.
|
5 | idfObject.setString(ZoneHVAC_EvaporativeCoolerUnitFields::OutdoorAirInletNodeName, outdoorAirInletNodeName); |
| 99 | 5 | } | |
| 100 | |||
| 101 | // Technically outletNode and inletNode are always initialized, since they are connected via addToThermalZone and this FT routine is called by | ||
| 102 | // thermalZone::equipment | ||
| 103 | |||
| 104 | // Cooler Outlet Node Name: Required Node, a zone air inlet node | ||
| 105 |
2/3✓ Branch 1 taken 5 times.
✓ Branch 3 taken 5 times.
✗ Branch 4 not taken.
|
10 | if (boost::optional<Node> node = modelObject.outletNode()) { |
| 106 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | coolerOutletNodeName = node->nameString(); |
| 107 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
|
5 | idfObject.setString(ZoneHVAC_EvaporativeCoolerUnitFields::CoolerOutletNodeName, node->nameString()); |
| 108 | 5 | } | |
| 109 | |||
| 110 | // Zone Relief Air Node Name: optional Node, filled to a Zone Exhaust Node if the flow is being balanced here and not elsewhere | ||
| 111 | // NOTE: we always assume the airflow is balanced | ||
| 112 |
2/3✓ Branch 1 taken 5 times.
✓ Branch 3 taken 5 times.
✗ Branch 4 not taken.
|
10 | if (boost::optional<Node> node = modelObject.inletNode()) { |
| 113 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
|
5 | idfObject.setString(ZoneHVAC_EvaporativeCoolerUnitFields::ZoneReliefAirNodeName, node->nameString()); |
| 114 | 5 | } | |
| 115 | |||
| 116 | // Supply Air Fan Object Type | ||
| 117 | // Supply Air Fan Name | ||
| 118 |
4/4✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
✓ Branch 10 taken 5 times.
|
5 | idfObject.setString(ZoneHVAC_EvaporativeCoolerUnitFields::SupplyAirFanObjectType, i_fan_->iddObject().name()); |
| 119 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
|
5 | idfObject.setString(ZoneHVAC_EvaporativeCoolerUnitFields::SupplyAirFanName, i_fan_->nameString()); |
| 120 | |||
| 121 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 3 taken 4 times.
✓ Branch 4 taken 1 time.
|
5 | if (modelObject.isDesignSupplyAirFlowRateAutosized()) { |
| 122 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
8 | idfObject.setString(ZoneHVAC_EvaporativeCoolerUnitFields::DesignSupplyAirFlowRate, "Autosize"); |
| 123 | } else { | ||
| 124 | // Design Supply Air Flow Rate: boost::optional<double> | ||
| 125 |
3/3✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
|
1 | idfObject.setDouble(ZoneHVAC_EvaporativeCoolerUnitFields::DesignSupplyAirFlowRate, modelObject.designSupplyAirFlowRate().get()); |
| 126 | } | ||
| 127 | |||
| 128 | // Fan Placement: Required String | ||
| 129 |
1/1✓ Branch 1 taken 5 times.
|
5 | const std::string fanPlacement = modelObject.fanPlacement(); |
| 130 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | const bool blowThroughFan = istringEqual(fanPlacement, "BlowThrough"); |
| 131 |
1/1✓ Branch 1 taken 5 times.
|
5 | idfObject.setString(ZoneHVAC_EvaporativeCoolerUnitFields::FanPlacement, fanPlacement); |
| 132 | |||
| 133 | // Cooler Unit Control Method: Required String | ||
| 134 |
1/1✓ Branch 1 taken 5 times.
|
5 | const std::string coolerUnitControlMethod = modelObject.coolerUnitControlMethod(); |
| 135 |
1/1✓ Branch 1 taken 5 times.
|
5 | idfObject.setString(ZoneHVAC_EvaporativeCoolerUnitFields::CoolerUnitControlMethod, coolerUnitControlMethod); |
| 136 | |||
| 137 | // Throttling Range Temperature Difference: Optional Double | ||
| 138 |
1/1✓ Branch 1 taken 5 times.
|
5 | const double throttlingRangeTemperatureDifference = modelObject.throttlingRangeTemperatureDifference(); |
| 139 |
1/1✓ Branch 1 taken 5 times.
|
5 | idfObject.setDouble(ZoneHVAC_EvaporativeCoolerUnitFields::ThrottlingRangeTemperatureDifference, throttlingRangeTemperatureDifference); |
| 140 | |||
| 141 | // Cooling Load Control Threshold Heat Transfer Rate: Optional Double | ||
| 142 |
1/1✓ Branch 1 taken 5 times.
|
5 | const double coolingLoadControlThresholdHeatTransferRate = modelObject.coolingLoadControlThresholdHeatTransferRate(); |
| 143 |
1/1✓ Branch 1 taken 5 times.
|
5 | idfObject.setDouble(ZoneHVAC_EvaporativeCoolerUnitFields::CoolingLoadControlThresholdHeatTransferRate, |
| 144 | coolingLoadControlThresholdHeatTransferRate); | ||
| 145 | |||
| 146 | // First Evaporative Cooler Object Type: Required String | ||
| 147 | // First Evaporative Cooler Object Name: Required Object | ||
| 148 |
4/4✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
✓ Branch 10 taken 5 times.
|
5 | idfObject.setString(ZoneHVAC_EvaporativeCoolerUnitFields::FirstEvaporativeCoolerObjectType, i_firstEvaporativeCooler_->iddObject().name()); |
| 149 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
|
5 | idfObject.setString(ZoneHVAC_EvaporativeCoolerUnitFields::FirstEvaporativeCoolerObjectName, i_firstEvaporativeCooler_->nameString()); |
| 150 | |||
| 151 | // Second Evaporative Cooler Object Type: boost::optional<std::string> | ||
| 152 | // Second Evaporative Cooler Name: Optional Object | ||
| 153 | 5 | boost::optional<IdfObject> i_secondEvaporativeCooler_; | |
| 154 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 3 taken 3 times.
✓ Branch 4 taken 2 times.
|
10 | if (boost::optional<HVACComponent> secondEvaporativeCooler_ = modelObject.secondEvaporativeCooler()) { |
| 155 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | i_secondEvaporativeCooler_ = translateAndMapModelObject(*secondEvaporativeCooler_); |
| 156 |
1/2✓ Branch 0 taken 3 times.
✗ Branch 1 not taken.
|
3 | if (i_secondEvaporativeCooler_) { |
| 157 |
4/4✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✓ Branch 10 taken 3 times.
|
3 | idfObject.setString(ZoneHVAC_EvaporativeCoolerUnitFields::SecondEvaporativeCoolerObjectType, i_secondEvaporativeCooler_->iddObject().name()); |
| 158 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
|
3 | idfObject.setString(ZoneHVAC_EvaporativeCoolerUnitFields::SecondEvaporativeCoolerName, i_secondEvaporativeCooler_->nameString()); |
| 159 | } | ||
| 160 | 5 | } | |
| 161 | |||
| 162 | // If BlowThrough: o---- Fan ---- E1 (---- E2) ----o | ||
| 163 | // If DrawThrough: o---- E1 (---- E2) ---- Fan ----o | ||
| 164 |
1/1✓ Branch 1 taken 5 times.
|
5 | std::string baseName = modelObject.nameString(); |
| 165 | |||
| 166 | // if (i_fan_) is always true | ||
| 167 | { | ||
| 168 | 5 | std::string inletNodeName; | |
| 169 | 5 | std::string outletNodeName; | |
| 170 |
2/2✓ Branch 0 taken 3 times.
✓ Branch 1 taken 2 times.
|
5 | if (blowThroughFan) { |
| 171 |
1/1✓ Branch 1 taken 3 times.
|
3 | inletNodeName = outdoorAirInletNodeName; |
| 172 |
1/1✓ Branch 1 taken 3 times.
|
3 | outletNodeName = baseName + " Fan - First Evaporative Cooler Node"; |
| 173 | } else { | ||
| 174 |
2/2✓ Branch 0 taken 1 time.
✓ Branch 1 taken 1 time.
|
2 | if (i_secondEvaporativeCooler_) { |
| 175 |
1/1✓ Branch 1 taken 1 time.
|
1 | inletNodeName = baseName + " Second Evaporative Cooler - Fan Node"; |
| 176 | } else { | ||
| 177 |
1/1✓ Branch 1 taken 1 time.
|
1 | inletNodeName = baseName + " First Evaporative Cooler - Fan Node"; |
| 178 | } | ||
| 179 |
1/1✓ Branch 1 taken 2 times.
|
2 | outletNodeName = coolerOutletNodeName; |
| 180 | } | ||
| 181 | |||
| 182 |
5/6✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
✓ Branch 10 taken 5 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 5 times.
|
5 | if (i_fan_->iddObject().type() == IddObjectType::Fan_ConstantVolume) { |
| 183 | ✗ | i_fan_->setString(Fan_ConstantVolumeFields::AirInletNodeName, inletNodeName); | |
| 184 | ✗ | i_fan_->setString(Fan_ConstantVolumeFields::AirOutletNodeName, outletNodeName); | |
| 185 |
5/6✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
✓ Branch 10 taken 5 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 5 times.
|
5 | } else if (i_fan_->iddObject().type() == IddObjectType::Fan_VariableVolume) { |
| 186 | ✗ | i_fan_->setString(Fan_VariableVolumeFields::AirInletNodeName, inletNodeName); | |
| 187 | ✗ | i_fan_->setString(Fan_VariableVolumeFields::AirOutletNodeName, outletNodeName); | |
| 188 |
5/6✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
✓ Branch 10 taken 5 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 5 times.
|
5 | } else if (i_fan_->iddObject().type() == IddObjectType::Fan_OnOff) { |
| 189 | ✗ | i_fan_->setString(Fan_OnOffFields::AirInletNodeName, inletNodeName); | |
| 190 | ✗ | i_fan_->setString(Fan_OnOffFields::AirOutletNodeName, outletNodeName); | |
| 191 |
6/6✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
✓ Branch 10 taken 5 times.
✓ Branch 14 taken 4 times.
✓ Branch 15 taken 1 time.
|
5 | } else if (i_fan_->iddObject().type() == IddObjectType::Fan_SystemModel) { |
| 192 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
4 | i_fan_->setString(Fan_SystemModelFields::AirInletNodeName, inletNodeName); |
| 193 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
4 | i_fan_->setString(Fan_SystemModelFields::AirOutletNodeName, outletNodeName); |
| 194 |
5/6✓ 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 15 not taken.
|
1 | } else if (i_fan_->iddObject().type() == IddObjectType::Fan_ComponentModel) { |
| 195 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | i_fan_->setString(Fan_ComponentModelFields::AirInletNodeName, inletNodeName); |
| 196 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | i_fan_->setString(Fan_ComponentModelFields::AirOutletNodeName, outletNodeName); |
| 197 | } | ||
| 198 | 5 | } | |
| 199 | |||
| 200 | // if (i_firstEvaporativeCooler_) is always true | ||
| 201 | { | ||
| 202 | 5 | std::string inletNodeName; | |
| 203 | 5 | std::string outletNodeName; | |
| 204 |
2/2✓ Branch 0 taken 3 times.
✓ Branch 1 taken 2 times.
|
5 | if (blowThroughFan) { |
| 205 |
1/1✓ Branch 1 taken 3 times.
|
3 | inletNodeName = baseName + " Fan - First Evaporative Cooler Node"; |
| 206 |
2/2✓ Branch 0 taken 2 times.
✓ Branch 1 taken 1 time.
|
3 | if (i_secondEvaporativeCooler_) { |
| 207 |
1/1✓ Branch 1 taken 2 times.
|
2 | outletNodeName = baseName + " First Evaporative Cooler - Second Evaporative Cooler Node"; |
| 208 | } else { | ||
| 209 |
1/1✓ Branch 1 taken 1 time.
|
1 | outletNodeName = coolerOutletNodeName; |
| 210 | } | ||
| 211 | } else { | ||
| 212 |
1/1✓ Branch 1 taken 2 times.
|
2 | inletNodeName = outdoorAirInletNodeName; |
| 213 |
2/2✓ Branch 0 taken 1 time.
✓ Branch 1 taken 1 time.
|
2 | if (i_secondEvaporativeCooler_) { |
| 214 |
1/1✓ Branch 1 taken 1 time.
|
1 | outletNodeName = baseName + " First Evaporative Cooler - Second Evaporative Cooler Node"; |
| 215 | } else { | ||
| 216 |
1/1✓ Branch 1 taken 1 time.
|
1 | outletNodeName = baseName + " First Evaporative Cooler - Fan Node"; |
| 217 | } | ||
| 218 | } | ||
| 219 | |||
| 220 |
5/6✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
✓ Branch 10 taken 5 times.
✓ Branch 14 taken 5 times.
✗ Branch 15 not taken.
|
5 | if (i_firstEvaporativeCooler_->iddObject().type() == IddObjectType::EvaporativeCooler_Direct_ResearchSpecial) { |
| 221 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | i_firstEvaporativeCooler_->setString(EvaporativeCooler_Direct_ResearchSpecialFields::AirInletNodeName, inletNodeName); |
| 222 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | i_firstEvaporativeCooler_->setString(EvaporativeCooler_Direct_ResearchSpecialFields::AirOutletNodeName, outletNodeName); |
| 223 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | i_firstEvaporativeCooler_->setString(EvaporativeCooler_Direct_ResearchSpecialFields::SensorNodeName, coolerOutletNodeName); |
| 224 | ✗ | } else if (i_firstEvaporativeCooler_->iddObject().type() == IddObjectType::EvaporativeCooler_Indirect_ResearchSpecial) { | |
| 225 | ✗ | i_firstEvaporativeCooler_->setString(EvaporativeCooler_Indirect_ResearchSpecialFields::PrimaryAirInletNodeName, inletNodeName); | |
| 226 | ✗ | i_firstEvaporativeCooler_->setString(EvaporativeCooler_Indirect_ResearchSpecialFields::PrimaryAirOutletNodeName, outletNodeName); | |
| 227 | ✗ | i_firstEvaporativeCooler_->setString(EvaporativeCooler_Indirect_ResearchSpecialFields::SensorNodeName, coolerOutletNodeName); | |
| 228 | } else { | ||
| 229 | ✗ | LOG(Warn, modelObject.briefDescription() << ": Contains an unsupported type " << i_firstEvaporativeCooler_->iddObject().type() << "."); | |
| 230 | } | ||
| 231 | 5 | } | |
| 232 | |||
| 233 |
2/2✓ Branch 0 taken 3 times.
✓ Branch 1 taken 2 times.
|
5 | if (i_secondEvaporativeCooler_) { |
| 234 |
1/1✓ Branch 1 taken 3 times.
|
3 | const std::string inletNodeName = baseName + " First Evaporative Cooler - Second Evaporative Cooler Node"; |
| 235 | 3 | std::string outletNodeName; | |
| 236 |
2/2✓ Branch 0 taken 2 times.
✓ Branch 1 taken 1 time.
|
3 | if (blowThroughFan) { |
| 237 |
1/1✓ Branch 1 taken 2 times.
|
2 | outletNodeName = coolerOutletNodeName; |
| 238 | } else { | ||
| 239 |
1/1✓ Branch 1 taken 1 time.
|
1 | outletNodeName = baseName + " Second Evaporative Cooler - Fan Node"; |
| 240 | } | ||
| 241 | |||
| 242 |
5/6✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✓ Branch 10 taken 3 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 3 times.
|
3 | if (i_secondEvaporativeCooler_->iddObject().type() == IddObjectType::EvaporativeCooler_Direct_ResearchSpecial) { |
| 243 | ✗ | i_secondEvaporativeCooler_->setString(EvaporativeCooler_Direct_ResearchSpecialFields::AirInletNodeName, inletNodeName); | |
| 244 | ✗ | i_secondEvaporativeCooler_->setString(EvaporativeCooler_Direct_ResearchSpecialFields::AirOutletNodeName, outletNodeName); | |
| 245 | ✗ | i_secondEvaporativeCooler_->setString(EvaporativeCooler_Direct_ResearchSpecialFields::SensorNodeName, coolerOutletNodeName); | |
| 246 |
5/6✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✓ Branch 10 taken 3 times.
✓ Branch 14 taken 3 times.
✗ Branch 15 not taken.
|
3 | } else if (i_secondEvaporativeCooler_->iddObject().type() == IddObjectType::EvaporativeCooler_Indirect_ResearchSpecial) { |
| 247 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | i_secondEvaporativeCooler_->setString(EvaporativeCooler_Indirect_ResearchSpecialFields::PrimaryAirInletNodeName, inletNodeName); |
| 248 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | i_secondEvaporativeCooler_->setString(EvaporativeCooler_Indirect_ResearchSpecialFields::PrimaryAirOutletNodeName, outletNodeName); |
| 249 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | i_secondEvaporativeCooler_->setString(EvaporativeCooler_Indirect_ResearchSpecialFields::SensorNodeName, coolerOutletNodeName); |
| 250 | } else { | ||
| 251 | ✗ | LOG(Warn, modelObject.briefDescription() << ": Contains an unsupported type " << i_secondEvaporativeCooler_->iddObject().type() << "."); | |
| 252 | } | ||
| 253 | 3 | } | |
| 254 | |||
| 255 | // Shut Off Relative Humidity: boost::optional<double> | ||
| 256 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | idfObject.setDouble(ZoneHVAC_EvaporativeCoolerUnitFields::ShutOffRelativeHumidity, modelObject.shutOffRelativeHumidity()); |
| 257 | |||
| 258 |
1/1✓ Branch 1 taken 5 times.
|
5 | return idfObject; |
| 259 | 5 | } // End of translate function | |
| 260 | |||
| 261 | } // end namespace energyplus | ||
| 262 | } // end namespace openstudio | ||
| 263 |