src/energyplus/ForwardTranslator/ForwardTranslateCoilCoolingDXVariableSpeed.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/CoilCoolingDXVariableSpeed.hpp" | ||
| 9 | #include "../../model/CoilCoolingDXVariableSpeedSpeedData.hpp" | ||
| 10 | #include "../../model/Node.hpp" | ||
| 11 | #include "../../model/Curve.hpp" | ||
| 12 | #include "../../model/Schedule.hpp" | ||
| 13 | #include <utilities/idd/CoilSystem_Cooling_DX_FieldEnums.hxx> | ||
| 14 | #include <utilities/idd/Coil_Cooling_DX_VariableSpeed_FieldEnums.hxx> | ||
| 15 | #include "../../utilities/idd/IddEnums.hpp" | ||
| 16 | #include <utilities/idd/IddEnums.hxx> | ||
| 17 | #include <utilities/idd/IddFactory.hxx> | ||
| 18 | #include "../../utilities/idf/IdfExtensibleGroup.hpp" | ||
| 19 | |||
| 20 | using namespace openstudio::model; | ||
| 21 | |||
| 22 | namespace openstudio { | ||
| 23 | |||
| 24 | namespace energyplus { | ||
| 25 | |||
| 26 | 8 | boost::optional<IdfObject> ForwardTranslator::translateCoilCoolingDXVariableSpeedWithoutUnitary(CoilCoolingDXVariableSpeed& modelObject) { | |
| 27 | 8 | boost::optional<std::string> s; | |
| 28 | 8 | boost::optional<double> value; | |
| 29 | |||
| 30 |
1/1✓ Branch 1 taken 8 times.
|
8 | if (modelObject.speeds().empty()) { |
| 31 | // TODO: if it has zero speed data, Log and don't translate | ||
| 32 | } | ||
| 33 | // Name | ||
| 34 |
2/2✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
|
8 | IdfObject idfObject = createRegisterAndNameIdfObject(openstudio::IddObjectType::Coil_Cooling_DX_VariableSpeed, modelObject); |
| 35 | |||
| 36 | // AvailabilityScheduleName | ||
| 37 | { | ||
| 38 |
1/1✓ Branch 1 taken 8 times.
|
8 | auto schedule = modelObject.availabilitySchedule(); |
| 39 |
2/3✓ Branch 1 taken 8 times.
✓ Branch 3 taken 8 times.
✗ Branch 4 not taken.
|
16 | if (boost::optional<IdfObject> _schedule = translateAndMapModelObject(schedule)) { |
| 40 |
4/4✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
✓ Branch 7 taken 8 times.
✓ Branch 10 taken 8 times.
|
8 | idfObject.setString(Coil_Cooling_DX_VariableSpeedFields::AvailabilityScheduleName, _schedule->name().get()); |
| 41 | 8 | } | |
| 42 | 8 | } | |
| 43 | |||
| 44 | // IndoorAirInletNodeName | ||
| 45 |
2/3✓ Branch 1 taken 8 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 8 times.
|
16 | if (auto node = modelObject.inletModelObject()) { |
| 46 | ✗ | idfObject.setString(Coil_Cooling_DX_VariableSpeedFields::IndoorAirInletNodeName, node->name().get()); | |
| 47 | 8 | } | |
| 48 | |||
| 49 | // IndoorAirOutletNodeName | ||
| 50 |
2/3✓ Branch 1 taken 8 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 8 times.
|
16 | if (auto node = modelObject.outletModelObject()) { |
| 51 | ✗ | idfObject.setString(Coil_Cooling_DX_VariableSpeedFields::IndoorAirOutletNodeName, node->name().get()); | |
| 52 | 8 | } | |
| 53 | |||
| 54 | // NominalSpeedLevel | ||
| 55 |
2/3✓ Branch 1 taken 8 times.
✓ Branch 3 taken 8 times.
✗ Branch 4 not taken.
|
8 | if (auto speedLevel = modelObject.nominalSpeedLevel()) { |
| 56 |
1/1✓ Branch 1 taken 8 times.
|
8 | idfObject.setInt(Coil_Cooling_DX_VariableSpeedFields::NominalSpeedLevel, speedLevel); |
| 57 | } | ||
| 58 | |||
| 59 | // GrossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevel | ||
| 60 |
3/3✓ Branch 1 taken 8 times.
✓ Branch 3 taken 7 times.
✓ Branch 4 taken 1 time.
|
8 | if (modelObject.isGrossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevelAutosized()) { |
| 61 |
2/2✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
|
14 | idfObject.setString(Coil_Cooling_DX_VariableSpeedFields::GrossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevel, "AutoSize"); |
| 62 |
2/3✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
|
2 | } else if ((value = modelObject.grossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevel())) { |
| 63 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(Coil_Cooling_DX_VariableSpeedFields::GrossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevel, value.get()); |
| 64 | } | ||
| 65 | |||
| 66 | // RatedAirFlowRateAtSelectedNominalSpeedLevel | ||
| 67 |
3/3✓ Branch 1 taken 8 times.
✓ Branch 3 taken 7 times.
✓ Branch 4 taken 1 time.
|
8 | if (modelObject.isRatedAirFlowRateAtSelectedNominalSpeedLevelAutosized()) { |
| 68 |
2/2✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
|
14 | idfObject.setString(Coil_Cooling_DX_VariableSpeedFields::RatedAirFlowRateAtSelectedNominalSpeedLevel, "AutoSize"); |
| 69 |
2/3✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
|
2 | } else if ((value = modelObject.ratedAirFlowRateAtSelectedNominalSpeedLevel())) { |
| 70 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(Coil_Cooling_DX_VariableSpeedFields::RatedAirFlowRateAtSelectedNominalSpeedLevel, value.get()); |
| 71 | } | ||
| 72 | |||
| 73 | // NominalTimeforCondensatetoBeginLeavingtheCoil | ||
| 74 |
3/4✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
✓ Branch 7 taken 8 times.
✗ Branch 8 not taken.
|
16 | if ((value = modelObject.nominalTimeforCondensatetoBeginLeavingtheCoil())) { |
| 75 |
2/2✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
|
8 | idfObject.setDouble(Coil_Cooling_DX_VariableSpeedFields::NominalTimeforCondensatetoBeginLeavingtheCoil, value.get()); |
| 76 | } | ||
| 77 | |||
| 78 | // InitialMoistureEvaporationRateDividedbySteadyStateACLatentCapacity | ||
| 79 |
3/4✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
✓ Branch 7 taken 8 times.
✗ Branch 8 not taken.
|
16 | if ((value = modelObject.initialMoistureEvaporationRateDividedbySteadyStateACLatentCapacity())) { |
| 80 |
2/2✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
|
8 | idfObject.setDouble(Coil_Cooling_DX_VariableSpeedFields::InitialMoistureEvaporationRateDividedbySteadyStateACLatentCapacity, value.get()); |
| 81 | } | ||
| 82 | |||
| 83 | // Maximum Cycling Rate | ||
| 84 |
2/2✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
|
8 | idfObject.setDouble(Coil_Cooling_DX_VariableSpeedFields::MaximumCyclingRate, modelObject.maximumCyclingRate()); |
| 85 | |||
| 86 | // Latent Capacity Time Constnat | ||
| 87 |
2/2✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
|
8 | idfObject.setDouble(Coil_Cooling_DX_VariableSpeedFields::LatentCapacityTimeConstant, modelObject.latentCapacityTimeConstant()); |
| 88 | |||
| 89 | // Fan Delay Time | ||
| 90 |
2/2✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
|
8 | idfObject.setDouble(Coil_Cooling_DX_VariableSpeedFields::FanDelayTime, modelObject.fanDelayTime()); |
| 91 | |||
| 92 | // EnergyPartLoadFractionCurveName | ||
| 93 | { | ||
| 94 |
1/1✓ Branch 1 taken 8 times.
|
8 | auto curve = modelObject.energyPartLoadFractionCurve(); |
| 95 |
2/3✓ Branch 1 taken 8 times.
✓ Branch 3 taken 8 times.
✗ Branch 4 not taken.
|
16 | if (auto _curve = translateAndMapModelObject(curve)) { |
| 96 |
4/4✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
✓ Branch 7 taken 8 times.
✓ Branch 10 taken 8 times.
|
8 | idfObject.setString(Coil_Cooling_DX_VariableSpeedFields::EnergyPartLoadFractionCurveName, _curve->name().get()); |
| 97 | 8 | } | |
| 98 | 8 | } | |
| 99 | |||
| 100 | // CondenserAirInletNodeName | ||
| 101 | |||
| 102 | // CondenserType | ||
| 103 |
3/4✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
✓ Branch 8 taken 8 times.
✗ Branch 9 not taken.
|
16 | if ((s = modelObject.condenserType())) { |
| 104 |
2/2✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
|
8 | idfObject.setString(Coil_Cooling_DX_VariableSpeedFields::CondenserType, s.get()); |
| 105 | } | ||
| 106 | |||
| 107 | // EvaporativeCondenserPumpRatedPowerConsumption | ||
| 108 |
2/3✓ Branch 1 taken 8 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 8 times.
|
8 | if (modelObject.isEvaporativeCondenserPumpRatedPowerConsumptionAutosized()) { |
| 109 | ✗ | idfObject.setString(Coil_Cooling_DX_VariableSpeedFields::EvaporativeCondenserPumpRatedPowerConsumption, "AutoSize"); | |
| 110 |
2/3✓ Branch 1 taken 8 times.
✓ Branch 3 taken 8 times.
✗ Branch 4 not taken.
|
16 | } else if ((value = modelObject.evaporativeCondenserPumpRatedPowerConsumption())) { |
| 111 |
2/2✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
|
8 | idfObject.setDouble(Coil_Cooling_DX_VariableSpeedFields::EvaporativeCondenserPumpRatedPowerConsumption, value.get()); |
| 112 | } | ||
| 113 | |||
| 114 | // CrankcaseHeaterCapacity | ||
| 115 |
3/4✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
✓ Branch 7 taken 8 times.
✗ Branch 8 not taken.
|
16 | if ((value = modelObject.crankcaseHeaterCapacity())) { |
| 116 |
2/2✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
|
8 | idfObject.setDouble(Coil_Cooling_DX_VariableSpeedFields::CrankcaseHeaterCapacity, value.get()); |
| 117 | } | ||
| 118 | |||
| 119 |
3/3✓ Branch 1 taken 8 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 7 times.
|
16 | if (auto crankCurve_ = modelObject.crankcaseHeaterCapacityFunctionofTemperatureCurve()) { |
| 120 |
3/4✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 6 taken 1 time.
✗ Branch 7 not taken.
|
2 | if (auto curve_ = translateAndMapModelObject(*crankCurve_)) { |
| 121 |
3/3✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
|
1 | idfObject.setString(Coil_Cooling_DX_VariableSpeedFields::CrankcaseHeaterCapacityFunctionofTemperatureCurveName, curve_->nameString()); |
| 122 | 1 | } | |
| 123 | 8 | } | |
| 124 | |||
| 125 | // MaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation | ||
| 126 |
3/4✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
✓ Branch 7 taken 8 times.
✗ Branch 8 not taken.
|
16 | if ((value = modelObject.maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation())) { |
| 127 |
2/2✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
|
8 | idfObject.setDouble(Coil_Cooling_DX_VariableSpeedFields::MaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation, value.get()); |
| 128 | } | ||
| 129 | |||
| 130 | // Minimum Outdoor Dry-Bulb Temperature for Compressor Operation | ||
| 131 |
3/4✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
✓ Branch 7 taken 8 times.
✗ Branch 8 not taken.
|
16 | if ((value = modelObject.minimumOutdoorDryBulbTemperatureforCompressorOperation())) { |
| 132 |
2/2✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
|
8 | idfObject.setDouble(Coil_Cooling_DX_VariableSpeedFields::MinimumOutdoorDryBulbTemperatureforCompressorOperation, value.get()); |
| 133 | } | ||
| 134 | |||
| 135 | // SupplyWaterStorageTankName | ||
| 136 | |||
| 137 | // CondensateCollectionWaterStorageTankName | ||
| 138 | |||
| 139 | // BasinHeaterCapacity | ||
| 140 |
3/4✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
✓ Branch 7 taken 8 times.
✗ Branch 8 not taken.
|
16 | if ((value = modelObject.basinHeaterCapacity())) { |
| 141 |
2/2✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
|
8 | idfObject.setDouble(Coil_Cooling_DX_VariableSpeedFields::BasinHeaterCapacity, value.get()); |
| 142 | } | ||
| 143 | |||
| 144 | // BasinHeaterSetpointTemperature | ||
| 145 |
3/4✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
✓ Branch 7 taken 8 times.
✗ Branch 8 not taken.
|
16 | if ((value = modelObject.basinHeaterSetpointTemperature())) { |
| 146 |
2/2✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
|
8 | idfObject.setDouble(Coil_Cooling_DX_VariableSpeedFields::BasinHeaterSetpointTemperature, value.get()); |
| 147 | } | ||
| 148 | |||
| 149 | // BasinHeaterOperatingScheduleName | ||
| 150 |
3/3✓ Branch 1 taken 8 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 7 times.
|
16 | if (auto schedule = modelObject.basinHeaterOperatingSchedule()) { |
| 151 |
3/4✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 6 taken 1 time.
✗ Branch 7 not taken.
|
2 | if (auto _schedule = translateAndMapModelObject(schedule.get())) { |
| 152 |
4/4✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
|
1 | idfObject.setString(Coil_Cooling_DX_VariableSpeedFields::BasinHeaterOperatingScheduleName, _schedule->name().get()); |
| 153 | 1 | } | |
| 154 | 8 | } | |
| 155 | |||
| 156 |
1/1✓ Branch 1 taken 8 times.
|
8 | auto const speeds = modelObject.speeds(); |
| 157 | |||
| 158 | // NumberofSpeeds | ||
| 159 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 2 taken 7 times.
|
8 | if (auto num = speeds.size()) { |
| 160 |
1/1✓ Branch 1 taken 1 time.
|
1 | idfObject.setInt(Coil_Cooling_DX_VariableSpeedFields::NumberofSpeeds, num); |
| 161 | } | ||
| 162 | |||
| 163 |
2/2✓ Branch 5 taken 2 times.
✓ Branch 6 taken 8 times.
|
10 | for (auto const& speed : speeds) { |
| 164 |
1/1✓ Branch 1 taken 2 times.
|
2 | auto eg = idfObject.pushExtensibleGroup(); |
| 165 | |||
| 166 | // SpeedReferenceUnitGrossRatedTotalCoolingCapacity | ||
| 167 |
3/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✗ Branch 8 not taken.
|
4 | if ((value = speed.referenceUnitGrossRatedTotalCoolingCapacity())) { |
| 168 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | eg.setDouble(Coil_Cooling_DX_VariableSpeedExtensibleFields::SpeedReferenceUnitGrossRatedTotalCoolingCapacity, value.get()); |
| 169 | } | ||
| 170 | |||
| 171 | // SpeedReferenceUnitGrossRatedSensibleHeatRatio | ||
| 172 |
3/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✗ Branch 8 not taken.
|
4 | if ((value = speed.referenceUnitGrossRatedSensibleHeatRatio())) { |
| 173 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | eg.setDouble(Coil_Cooling_DX_VariableSpeedExtensibleFields::SpeedReferenceUnitGrossRatedSensibleHeatRatio, value.get()); |
| 174 | } | ||
| 175 | |||
| 176 | // SpeedReferenceUnitGrossRatedCoolingCOP | ||
| 177 |
3/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✗ Branch 8 not taken.
|
4 | if ((value = speed.referenceUnitGrossRatedCoolingCOP())) { |
| 178 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | eg.setDouble(Coil_Cooling_DX_VariableSpeedExtensibleFields::SpeedReferenceUnitGrossRatedCoolingCOP, value.get()); |
| 179 | } | ||
| 180 | |||
| 181 | // SpeedReferenceUnitRatedAirFlowRate | ||
| 182 |
3/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✗ Branch 8 not taken.
|
4 | if ((value = speed.referenceUnitRatedAirFlowRate())) { |
| 183 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | eg.setDouble(Coil_Cooling_DX_VariableSpeedExtensibleFields::SpeedReferenceUnitRatedAirFlowRate, value.get()); |
| 184 | } | ||
| 185 | |||
| 186 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | eg.setDouble(Coil_Cooling_DX_VariableSpeedExtensibleFields::SpeedRatedEvaporatorFanPowerPerVolumeFlowRate2017, |
| 187 | speed.ratedEvaporatorFanPowerPerVolumeFlowRate2017()); | ||
| 188 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | eg.setDouble(Coil_Cooling_DX_VariableSpeedExtensibleFields::SpeedRatedEvaporatorFanPowerPerVolumeFlowRate2023, |
| 189 | speed.ratedEvaporatorFanPowerPerVolumeFlowRate2023()); | ||
| 190 | |||
| 191 | // SpeedReferenceUnitRatedCondenserAirFlowRate | ||
| 192 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
4 | if ((value = speed.referenceUnitRatedCondenserAirFlowRate())) { |
| 193 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | eg.setDouble(Coil_Cooling_DX_VariableSpeedExtensibleFields::SpeedReferenceUnitRatedCondenserAirFlowRate, value.get()); |
| 194 | } | ||
| 195 | |||
| 196 | // SpeedReferenceUnitRatedPadEffectivenessofEvapPrecooling | ||
| 197 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
4 | if ((value = speed.referenceUnitRatedPadEffectivenessofEvapPrecooling())) { |
| 198 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | eg.setDouble(Coil_Cooling_DX_VariableSpeedExtensibleFields::SpeedReferenceUnitRatedPadEffectivenessofEvapPrecooling, value.get()); |
| 199 | } | ||
| 200 | |||
| 201 | // SpeedTotalCoolingCapacityFunctionofTemperatureCurveName | ||
| 202 | { | ||
| 203 |
1/1✓ Branch 1 taken 2 times.
|
2 | auto curve = speed.totalCoolingCapacityFunctionofTemperatureCurve(); |
| 204 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
4 | if (auto _curve = translateAndMapModelObject(curve)) { |
| 205 |
4/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✓ Branch 10 taken 2 times.
|
2 | eg.setString(Coil_Cooling_DX_VariableSpeedExtensibleFields::SpeedTotalCoolingCapacityFunctionofTemperatureCurveName, _curve->name().get()); |
| 206 | 2 | } | |
| 207 | 2 | } | |
| 208 | |||
| 209 | // SpeedTotalCoolingCapacityFunctionofAirFlowFractionCurveName | ||
| 210 | { | ||
| 211 |
1/1✓ Branch 1 taken 2 times.
|
2 | auto curve = speed.totalCoolingCapacityFunctionofAirFlowFractionCurve(); |
| 212 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
4 | if (auto _curve = translateAndMapModelObject(curve)) { |
| 213 | 2 | eg.setString(Coil_Cooling_DX_VariableSpeedExtensibleFields::SpeedTotalCoolingCapacityFunctionofAirFlowFractionCurveName, | |
| 214 |
4/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✓ Branch 10 taken 2 times.
|
2 | _curve->name().get()); |
| 215 | 2 | } | |
| 216 | 2 | } | |
| 217 | |||
| 218 | // SpeedEnergyInputRatioFunctionofTemperatureCurveName | ||
| 219 | { | ||
| 220 |
1/1✓ Branch 1 taken 2 times.
|
2 | auto curve = speed.energyInputRatioFunctionofTemperatureCurve(); |
| 221 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
4 | if (auto _curve = translateAndMapModelObject(curve)) { |
| 222 |
4/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✓ Branch 10 taken 2 times.
|
2 | eg.setString(Coil_Cooling_DX_VariableSpeedExtensibleFields::SpeedEnergyInputRatioFunctionofTemperatureCurveName, _curve->name().get()); |
| 223 | 2 | } | |
| 224 | 2 | } | |
| 225 | |||
| 226 | // SpeedEnergyInputRatioFunctionofAirFlowFractionCurveName | ||
| 227 | { | ||
| 228 |
1/1✓ Branch 1 taken 2 times.
|
2 | auto curve = speed.energyInputRatioFunctionofAirFlowFractionCurve(); |
| 229 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
4 | if (auto _curve = translateAndMapModelObject(curve)) { |
| 230 |
4/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✓ Branch 10 taken 2 times.
|
2 | eg.setString(Coil_Cooling_DX_VariableSpeedExtensibleFields::SpeedEnergyInputRatioFunctionofAirFlowFractionCurveName, _curve->name().get()); |
| 231 | 2 | } | |
| 232 | 2 | } | |
| 233 | 2 | } | |
| 234 | |||
| 235 |
1/1✓ Branch 1 taken 8 times.
|
16 | return idfObject; |
| 236 | 8 | } | |
| 237 | |||
| 238 | 1 | boost::optional<IdfObject> ForwardTranslator::translateCoilCoolingDXVariableSpeed(CoilCoolingDXVariableSpeed& modelObject) { | |
| 239 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | IdfObject coilSystemCoolingDXIdf(IddObjectType::CoilSystem_Cooling_DX); |
| 240 | |||
| 241 |
1/1✓ Branch 1 taken 1 time.
|
1 | m_idfObjects.push_back(coilSystemCoolingDXIdf); |
| 242 | |||
| 243 |
1/1✓ Branch 1 taken 1 time.
|
1 | boost::optional<IdfObject> idfObject = translateCoilCoolingDXVariableSpeedWithoutUnitary(modelObject); |
| 244 | |||
| 245 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
|
1 | if (!idfObject) { |
| 246 | ✗ | return boost::none; | |
| 247 | } | ||
| 248 | |||
| 249 |
2/3✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
|
2 | if (auto s = modelObject.name()) { |
| 250 |
4/4✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
|
1 | coilSystemCoolingDXIdf.setString(CoilSystem_Cooling_DXFields::CoolingCoilObjectType, idfObject->iddObject().name()); |
| 251 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | coilSystemCoolingDXIdf.setString(CoilSystem_Cooling_DXFields::CoolingCoilName, s.get()); |
| 252 |
3/3✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
|
1 | coilSystemCoolingDXIdf.setName(s.get() + " CoilSystem"); |
| 253 | 1 | } | |
| 254 | |||
| 255 |
2/3✓ Branch 1 taken 1 time.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
|
2 | if (auto node = modelObject.inletModelObject()) { |
| 256 | ✗ | translateAndMapModelObject(node.get()); | |
| 257 | ✗ | coilSystemCoolingDXIdf.setString(CoilSystem_Cooling_DXFields::DXCoolingCoilSystemInletNodeName, node->name().get()); | |
| 258 | 1 | } | |
| 259 | |||
| 260 |
2/3✓ Branch 1 taken 1 time.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
|
2 | if (auto node = modelObject.outletModelObject()) { |
| 261 | ✗ | translateAndMapModelObject(node.get()); | |
| 262 | ✗ | coilSystemCoolingDXIdf.setString(CoilSystem_Cooling_DXFields::DXCoolingCoilSystemOutletNodeName, node->name().get()); | |
| 263 | ✗ | coilSystemCoolingDXIdf.setString(CoilSystem_Cooling_DXFields::DXCoolingCoilSystemSensorNodeName, node->name().get()); | |
| 264 | 1 | } | |
| 265 | |||
| 266 |
1/1✓ Branch 1 taken 1 time.
|
1 | return coilSystemCoolingDXIdf; |
| 267 | 1 | } | |
| 268 | |||
| 269 | } // namespace energyplus | ||
| 270 | |||
| 271 | } // namespace openstudio | ||
| 272 |