src/energyplus/ForwardTranslator/ForwardTranslateAirLoopHVACUnitarySystem.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/AirLoopHVACUnitarySystem.hpp" | ||
| 9 | #include "../../model/AirLoopHVACUnitarySystem_Impl.hpp" | ||
| 10 | #include "../../model/Node.hpp" | ||
| 11 | #include "../../model/Node_Impl.hpp" | ||
| 12 | #include "../../model/ThermalZone.hpp" | ||
| 13 | #include "../../model/ThermalZone_Impl.hpp" | ||
| 14 | #include "../../model/Schedule.hpp" | ||
| 15 | #include "../../model/Schedule_Impl.hpp" | ||
| 16 | #include "../../model/AirLoopHVAC.hpp" | ||
| 17 | #include "../../model/AirLoopHVAC_Impl.hpp" | ||
| 18 | #include "../../model/SetpointManagerMixedAir.hpp" | ||
| 19 | #include "../../model/SetpointManagerMixedAir_Impl.hpp" | ||
| 20 | #include "../../model/AirLoopHVACOutdoorAirSystem.hpp" | ||
| 21 | #include "../../model/AirLoopHVACOutdoorAirSystem_Impl.hpp" | ||
| 22 | #include "../../model/CoilCoolingDXMultiSpeedStageData.hpp" | ||
| 23 | #include "../../model/CoilCoolingDXMultiSpeedStageData_Impl.hpp" | ||
| 24 | #include "../../model/CoilCoolingDXVariableSpeedSpeedData.hpp" | ||
| 25 | #include "../../model/CoilCoolingDXVariableSpeedSpeedData_Impl.hpp" | ||
| 26 | #include "../../model/CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit.hpp" | ||
| 27 | #include "../../model/CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit_Impl.hpp" | ||
| 28 | #include "../../model/CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData.hpp" | ||
| 29 | #include "../../model/CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData_Impl.hpp" | ||
| 30 | #include "../../model/CoilHeatingDXMultiSpeedStageData.hpp" | ||
| 31 | #include "../../model/CoilHeatingDXMultiSpeedStageData_Impl.hpp" | ||
| 32 | #include "../../model/CoilHeatingDXVariableSpeedSpeedData.hpp" | ||
| 33 | #include "../../model/CoilHeatingDXVariableSpeedSpeedData_Impl.hpp" | ||
| 34 | #include "../../model/CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit.hpp" | ||
| 35 | #include "../../model/CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl.hpp" | ||
| 36 | #include "../../model/CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData.hpp" | ||
| 37 | #include "../../model/CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData_Impl.hpp" | ||
| 38 | #include "../../model/CoilSystemCoolingDXHeatExchangerAssisted.hpp" | ||
| 39 | #include "../../model/CoilSystemCoolingDXHeatExchangerAssisted_Impl.hpp" | ||
| 40 | #include "../../model/CoilSystemCoolingWaterHeatExchangerAssisted.hpp" | ||
| 41 | #include "../../model/CoilSystemCoolingWaterHeatExchangerAssisted_Impl.hpp" | ||
| 42 | #include "../../model/AirToAirComponent.hpp" | ||
| 43 | #include "../../model/AirToAirComponent_Impl.hpp" | ||
| 44 | #include "../../model/CoilHeatingDXMultiSpeed.hpp" | ||
| 45 | #include "../../model/CoilHeatingDXMultiSpeed_Impl.hpp" | ||
| 46 | #include "../../model/CoilHeatingDXVariableSpeed.hpp" | ||
| 47 | #include "../../model/CoilHeatingDXVariableSpeed_Impl.hpp" | ||
| 48 | #include "../../model/CoilHeatingGasMultiStage.hpp" | ||
| 49 | #include "../../model/CoilHeatingGasMultiStage_Impl.hpp" | ||
| 50 | #include "../../model/CoilHeatingGasMultiStageStageData.hpp" | ||
| 51 | #include "../../model/CoilHeatingGasMultiStageStageData_Impl.hpp" | ||
| 52 | #include "../../model/CoilCoolingDX.hpp" | ||
| 53 | #include "../../model/CoilCoolingDX_Impl.hpp" | ||
| 54 | #include "../../model/CoilCoolingDXMultiSpeed.hpp" | ||
| 55 | #include "../../model/CoilCoolingDXMultiSpeed_Impl.hpp" | ||
| 56 | #include "../../model/CoilCoolingDXVariableSpeed.hpp" | ||
| 57 | #include "../../model/CoilCoolingDXVariableSpeed_Impl.hpp" | ||
| 58 | #include "../../model/UnitarySystemPerformanceMultispeed.hpp" | ||
| 59 | #include "../../model/UnitarySystemPerformanceMultispeed_Impl.hpp" | ||
| 60 | #include <utilities/idd/AirLoopHVAC_UnitarySystem_FieldEnums.hxx> | ||
| 61 | #include <utilities/idd/Coil_Cooling_DX_SingleSpeed_FieldEnums.hxx> | ||
| 62 | #include <utilities/idd/Coil_Cooling_DX_SingleSpeed_ThermalStorage_FieldEnums.hxx> | ||
| 63 | #include <utilities/idd/Coil_Cooling_DX_TwoSpeed_FieldEnums.hxx> | ||
| 64 | #include <utilities/idd/Coil_Cooling_DX_TwoStageWithHumidityControlMode_FieldEnums.hxx> | ||
| 65 | #include <utilities/idd/Coil_Cooling_DX_MultiSpeed_FieldEnums.hxx> | ||
| 66 | #include <utilities/idd/Coil_Cooling_DX_VariableSpeed_FieldEnums.hxx> | ||
| 67 | #include <utilities/idd/Coil_Cooling_Water_FieldEnums.hxx> | ||
| 68 | #include <utilities/idd/Coil_Cooling_WaterToAirHeatPump_EquationFit_FieldEnums.hxx> | ||
| 69 | #include <utilities/idd/Coil_Cooling_WaterToAirHeatPump_VariableSpeedEquationFit_FieldEnums.hxx> | ||
| 70 | #include <utilities/idd/Coil_Heating_Desuperheater_FieldEnums.hxx> | ||
| 71 | #include <utilities/idd/Coil_Heating_DX_MultiSpeed_FieldEnums.hxx> | ||
| 72 | #include <utilities/idd/Coil_Heating_DX_SingleSpeed_FieldEnums.hxx> | ||
| 73 | #include <utilities/idd/Coil_Heating_DX_VariableSpeed_FieldEnums.hxx> | ||
| 74 | #include <utilities/idd/Coil_Heating_Electric_FieldEnums.hxx> | ||
| 75 | #include <utilities/idd/Coil_Heating_Electric_MultiStage_FieldEnums.hxx> | ||
| 76 | #include <utilities/idd/Coil_Heating_Gas_MultiStage_FieldEnums.hxx> | ||
| 77 | #include <utilities/idd/Coil_Heating_Fuel_FieldEnums.hxx> | ||
| 78 | #include <utilities/idd/Coil_Heating_Water_FieldEnums.hxx> | ||
| 79 | #include <utilities/idd/Coil_Heating_WaterToAirHeatPump_EquationFit_FieldEnums.hxx> | ||
| 80 | #include <utilities/idd/Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFit_FieldEnums.hxx> | ||
| 81 | #include <utilities/idd/Coil_Cooling_DX_FieldEnums.hxx> | ||
| 82 | #include <utilities/idd/HeatExchanger_AirToAir_SensibleAndLatent_FieldEnums.hxx> | ||
| 83 | #include <utilities/idd/HeatExchanger_Desiccant_BalancedFlow_FieldEnums.hxx> | ||
| 84 | #include <utilities/idd/Fan_ComponentModel_FieldEnums.hxx> | ||
| 85 | #include <utilities/idd/Fan_ConstantVolume_FieldEnums.hxx> | ||
| 86 | #include <utilities/idd/Fan_OnOff_FieldEnums.hxx> | ||
| 87 | #include <utilities/idd/Fan_VariableVolume_FieldEnums.hxx> | ||
| 88 | #include <utilities/idd/Fan_SystemModel_FieldEnums.hxx> | ||
| 89 | #include <utilities/idd/SetpointManager_MixedAir_FieldEnums.hxx> | ||
| 90 | #include <utilities/idd/UnitarySystemPerformance_Multispeed_FieldEnums.hxx> | ||
| 91 | #include "../../utilities/idd/IddEnums.hpp" | ||
| 92 | #include "../../utilities/idf/IdfExtensibleGroup.hpp" | ||
| 93 | #include <utilities/idd/IddEnums.hxx> | ||
| 94 | #include <utilities/idd/IddFactory.hxx> | ||
| 95 | |||
| 96 | using namespace openstudio::model; | ||
| 97 | |||
| 98 | namespace openstudio { | ||
| 99 | |||
| 100 | namespace energyplus { | ||
| 101 | |||
| 102 | 73 | boost::optional<IdfObject> ForwardTranslator::translateAirLoopHVACUnitarySystem(AirLoopHVACUnitarySystem& modelObject) { | |
| 103 | 73 | boost::optional<std::string> s; | |
| 104 | 73 | boost::optional<double> d; | |
| 105 | |||
| 106 | // Name | ||
| 107 |
2/2✓ Branch 1 taken 73 times.
✓ Branch 4 taken 73 times.
|
73 | IdfObject unitarySystem = createRegisterAndNameIdfObject(openstudio::IddObjectType::AirLoopHVAC_UnitarySystem, modelObject); |
| 108 | |||
| 109 | // Control Type | ||
| 110 |
2/2✓ Branch 1 taken 73 times.
✓ Branch 4 taken 73 times.
|
73 | s = modelObject.controlType(); |
| 111 |
1/2✓ Branch 0 taken 73 times.
✗ Branch 1 not taken.
|
73 | if (s) { |
| 112 |
2/2✓ Branch 1 taken 73 times.
✓ Branch 4 taken 73 times.
|
73 | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::ControlType, s.get()); |
| 113 | } | ||
| 114 | |||
| 115 | // Controlling Zone or Thermostat Location | ||
| 116 |
2/3✓ Branch 1 taken 73 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 73 times.
|
146 | if (boost::optional<ThermalZone> controllingZoneorThermostatLocation = modelObject.controllingZoneorThermostatLocation()) { |
| 117 | ✗ | boost::optional<IdfObject> _controllingZoneorThermostatLocation = translateAndMapModelObject(controllingZoneorThermostatLocation.get()); | |
| 118 | |||
| 119 | ✗ | if (_controllingZoneorThermostatLocation && _controllingZoneorThermostatLocation->name()) { | |
| 120 | ✗ | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::ControllingZoneorThermostatLocation, | |
| 121 | ✗ | _controllingZoneorThermostatLocation->name().get()); | |
| 122 | } | ||
| 123 | 73 | } | |
| 124 | |||
| 125 | // Dehumidification Control Type | ||
| 126 |
2/2✓ Branch 1 taken 73 times.
✓ Branch 4 taken 73 times.
|
73 | s = modelObject.dehumidificationControlType(); |
| 127 |
1/2✓ Branch 0 taken 73 times.
✗ Branch 1 not taken.
|
73 | if (s) { |
| 128 |
2/2✓ Branch 1 taken 73 times.
✓ Branch 4 taken 73 times.
|
73 | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::DehumidificationControlType, s.get()); |
| 129 | } | ||
| 130 | |||
| 131 | // Availability Schedule Name | ||
| 132 |
2/3✓ Branch 1 taken 73 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 73 times.
|
146 | if (boost::optional<Schedule> availabilitySchedule = modelObject.availabilitySchedule()) { |
| 133 | ✗ | boost::optional<IdfObject> _availabilitySchedule = translateAndMapModelObject(availabilitySchedule.get()); | |
| 134 | |||
| 135 | ✗ | if (_availabilitySchedule && _availabilitySchedule->name()) { | |
| 136 | ✗ | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::AvailabilityScheduleName, _availabilitySchedule->name().get()); | |
| 137 | } | ||
| 138 | 73 | } | |
| 139 | |||
| 140 | 73 | boost::optional<std::string> airInletNodeName; | |
| 141 | 73 | boost::optional<std::string> airOutletNodeName; | |
| 142 | |||
| 143 | // Air Inlet Node Name | ||
| 144 |
2/3✓ Branch 1 taken 73 times.
✓ Branch 3 taken 73 times.
✗ Branch 4 not taken.
|
146 | if (boost::optional<Node> node = modelObject.inletNode()) { |
| 145 |
4/4✓ Branch 1 taken 73 times.
✓ Branch 4 taken 73 times.
✓ Branch 7 taken 73 times.
✓ Branch 10 taken 73 times.
|
73 | airInletNodeName = node->name().get(); |
| 146 |
4/4✓ Branch 1 taken 73 times.
✓ Branch 4 taken 73 times.
✓ Branch 7 taken 73 times.
✓ Branch 10 taken 73 times.
|
73 | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::AirInletNodeName, node->name().get()); |
| 147 | 73 | } | |
| 148 | |||
| 149 | // Air Outlet Node Name | ||
| 150 |
2/3✓ Branch 1 taken 73 times.
✓ Branch 3 taken 73 times.
✗ Branch 4 not taken.
|
146 | if (boost::optional<Node> node = modelObject.outletNode()) { |
| 151 |
4/4✓ Branch 1 taken 73 times.
✓ Branch 4 taken 73 times.
✓ Branch 7 taken 73 times.
✓ Branch 10 taken 73 times.
|
73 | airOutletNodeName = node->name().get(); |
| 152 |
4/4✓ Branch 1 taken 73 times.
✓ Branch 4 taken 73 times.
✓ Branch 7 taken 73 times.
✓ Branch 10 taken 73 times.
|
73 | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::AirOutletNodeName, node->name().get()); |
| 153 | 73 | } | |
| 154 | |||
| 155 | // Supply Fan Object Type | ||
| 156 | // Supply Fan Name | ||
| 157 | 73 | boost::optional<IdfObject> _fan; | |
| 158 |
3/3✓ Branch 1 taken 73 times.
✓ Branch 3 taken 24 times.
✓ Branch 4 taken 49 times.
|
146 | if (boost::optional<HVACComponent> supplyFan = modelObject.supplyFan()) { |
| 159 |
2/2✓ Branch 1 taken 24 times.
✓ Branch 4 taken 24 times.
|
24 | _fan = translateAndMapModelObject(supplyFan.get()); |
| 160 | |||
| 161 |
6/12✓ Branch 1 taken 24 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 24 times.
✓ Branch 7 taken 24 times.
✓ Branch 10 taken 24 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 24 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 24 times.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
|
72 | if (_fan && _fan->name()) { |
| 162 |
4/4✓ Branch 1 taken 24 times.
✓ Branch 4 taken 24 times.
✓ Branch 7 taken 24 times.
✓ Branch 10 taken 24 times.
|
24 | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::SupplyFanObjectType, _fan->iddObject().name()); |
| 163 |
4/4✓ Branch 1 taken 24 times.
✓ Branch 4 taken 24 times.
✓ Branch 7 taken 24 times.
✓ Branch 10 taken 24 times.
|
24 | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::SupplyFanName, _fan->name().get()); |
| 164 | } | ||
| 165 | 73 | } | |
| 166 | |||
| 167 | // Fan Placement | ||
| 168 |
1/1✓ Branch 1 taken 73 times.
|
73 | s = modelObject.fanPlacement(); |
| 169 | 73 | bool blowThroughFan = false; | |
| 170 |
2/2✓ Branch 0 taken 30 times.
✓ Branch 1 taken 43 times.
|
73 | if (s) { |
| 171 |
2/2✓ Branch 1 taken 30 times.
✓ Branch 4 taken 30 times.
|
30 | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::FanPlacement, s.get()); |
| 172 |
5/5✓ Branch 1 taken 30 times.
✓ Branch 4 taken 30 times.
✓ Branch 7 taken 30 times.
✓ Branch 10 taken 15 times.
✓ Branch 11 taken 15 times.
|
60 | if (istringEqual(*s, "BlowThrough")) { |
| 173 | 15 | blowThroughFan = true; | |
| 174 | } | ||
| 175 |
2/2✓ Branch 0 taken 8 times.
✓ Branch 1 taken 35 times.
|
43 | } else if (_fan) { |
| 176 | // You must set one, or E+ will crash. | ||
| 177 |
2/2✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
|
16 | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::FanPlacement, "DrawThrough"); |
| 178 | } | ||
| 179 | |||
| 180 | // Supply Air Fan Operating Mode Schedule Name | ||
| 181 |
2/3✓ Branch 1 taken 73 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 73 times.
|
146 | if (boost::optional<Schedule> supplyAirFanOperatingModeSchedule = modelObject.supplyAirFanOperatingModeSchedule()) { |
| 182 | ✗ | boost::optional<IdfObject> _supplyAirFanOperatingModeSchedule = translateAndMapModelObject(supplyAirFanOperatingModeSchedule.get()); | |
| 183 | |||
| 184 | ✗ | if (_supplyAirFanOperatingModeSchedule && _supplyAirFanOperatingModeSchedule->name()) { | |
| 185 | ✗ | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::SupplyAirFanOperatingModeScheduleName, | |
| 186 | ✗ | _supplyAirFanOperatingModeSchedule->name().get()); | |
| 187 | } | ||
| 188 | 73 | } | |
| 189 | |||
| 190 | // Heating Coil Object Type | ||
| 191 | // Heating Coil Name | ||
| 192 | 73 | boost::optional<IdfObject> _heatingCoil; | |
| 193 |
1/1✓ Branch 1 taken 73 times.
|
73 | auto heatingCoil = modelObject.heatingCoil(); |
| 194 |
2/2✓ Branch 0 taken 36 times.
✓ Branch 1 taken 37 times.
|
73 | if (heatingCoil) { |
| 195 |
2/2✓ Branch 1 taken 36 times.
✓ Branch 4 taken 36 times.
|
36 | _heatingCoil = translateAndMapModelObject(heatingCoil.get()); |
| 196 | |||
| 197 |
6/12✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 36 times.
✓ Branch 7 taken 36 times.
✓ Branch 10 taken 36 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 36 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 36 times.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
|
108 | if (_heatingCoil && _heatingCoil->name()) { |
| 198 |
4/4✓ Branch 1 taken 36 times.
✓ Branch 4 taken 36 times.
✓ Branch 7 taken 36 times.
✓ Branch 10 taken 36 times.
|
36 | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::HeatingCoilObjectType, _heatingCoil->iddObject().name()); |
| 199 |
4/4✓ Branch 1 taken 36 times.
✓ Branch 4 taken 36 times.
✓ Branch 7 taken 36 times.
✓ Branch 10 taken 36 times.
|
36 | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::HeatingCoilName, _heatingCoil->name().get()); |
| 200 | } | ||
| 201 | |||
| 202 | // Supply Air Flow Rate Method During Heating Operation | ||
| 203 |
1/1✓ Branch 1 taken 36 times.
|
36 | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::HeatingSupplyAirFlowRateMethod, |
| 204 |
1/1✓ Branch 1 taken 36 times.
|
72 | modelObject.supplyAirFlowRateMethodDuringHeatingOperation()); |
| 205 | |||
| 206 | // Supply Air Flow Rate During Heating Operation | ||
| 207 |
3/3✓ Branch 1 taken 36 times.
✓ Branch 3 taken 32 times.
✓ Branch 4 taken 4 times.
|
36 | if (modelObject.isSupplyAirFlowRateDuringHeatingOperationAutosized()) { |
| 208 |
2/2✓ Branch 1 taken 32 times.
✓ Branch 4 taken 32 times.
|
64 | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::HeatingSupplyAirFlowRate, "Autosize"); |
| 209 |
2/3✓ Branch 1 taken 4 times.
✓ Branch 3 taken 4 times.
✗ Branch 4 not taken.
|
8 | } else if (auto val_ = modelObject.supplyAirFlowRateDuringHeatingOperation()) { |
| 210 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
4 | unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::HeatingSupplyAirFlowRate, val_.get()); |
| 211 | } | ||
| 212 | |||
| 213 | // Supply Air Flow Rate Per Floor Area during Heating Operation | ||
| 214 |
2/3✓ Branch 1 taken 36 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 36 times.
|
72 | if (auto val_ = modelObject.supplyAirFlowRatePerFloorAreaduringHeatingOperation()) { |
| 215 | ✗ | unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::HeatingSupplyAirFlowRatePerFloorArea, val_.get()); | |
| 216 | } | ||
| 217 | |||
| 218 | // Fraction of Autosized Design Heating Supply Air Flow Rate | ||
| 219 |
2/3✓ Branch 1 taken 36 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 36 times.
|
72 | if (auto val_ = modelObject.fractionofAutosizedDesignHeatingSupplyAirFlowRate()) { |
| 220 | ✗ | unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::HeatingFractionofAutosizedHeatingSupplyAirFlowRate, val_.get()); | |
| 221 | } | ||
| 222 | |||
| 223 | // Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation | ||
| 224 |
2/3✓ Branch 1 taken 36 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 36 times.
|
72 | if (auto val_ = modelObject.designSupplyAirFlowRatePerUnitofCapacityDuringHeatingOperation()) { |
| 225 | ✗ | unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::HeatingSupplyAirFlowRatePerUnitofCapacity, val_.get()); | |
| 226 | } | ||
| 227 | } else { | ||
| 228 |
2/2✓ Branch 1 taken 37 times.
✓ Branch 4 taken 37 times.
|
74 | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::HeatingSupplyAirFlowRateMethod, "None"); |
| 229 | } | ||
| 230 | |||
| 231 | // DX Heating Coil Sizing Ratio | ||
| 232 |
2/2✓ Branch 1 taken 73 times.
✓ Branch 4 taken 73 times.
|
73 | d = modelObject.dXHeatingCoilSizingRatio(); |
| 233 |
1/2✓ Branch 0 taken 73 times.
✗ Branch 1 not taken.
|
73 | if (d) { |
| 234 |
2/2✓ Branch 1 taken 73 times.
✓ Branch 4 taken 73 times.
|
73 | unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::DXHeatingCoilSizingRatio, d.get()); |
| 235 | } | ||
| 236 | |||
| 237 | // Cooling Coil Object Type | ||
| 238 | // Cooling Coil Name | ||
| 239 | 73 | boost::optional<IdfObject> _coolingCoil; | |
| 240 |
1/1✓ Branch 1 taken 73 times.
|
73 | auto coolingCoil = modelObject.coolingCoil(); |
| 241 | |||
| 242 |
2/2✓ Branch 0 taken 51 times.
✓ Branch 1 taken 22 times.
|
73 | if (coolingCoil) { |
| 243 |
2/2✓ Branch 1 taken 51 times.
✓ Branch 4 taken 51 times.
|
51 | _coolingCoil = translateAndMapModelObject(coolingCoil.get()); |
| 244 | |||
| 245 |
6/12✓ Branch 1 taken 51 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 51 times.
✓ Branch 7 taken 51 times.
✓ Branch 10 taken 51 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 51 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 51 times.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
|
153 | if (_coolingCoil && _coolingCoil->name()) { |
| 246 |
4/4✓ Branch 1 taken 51 times.
✓ Branch 4 taken 51 times.
✓ Branch 7 taken 51 times.
✓ Branch 10 taken 51 times.
|
51 | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::CoolingCoilObjectType, _coolingCoil->iddObject().name()); |
| 247 |
4/4✓ Branch 1 taken 51 times.
✓ Branch 4 taken 51 times.
✓ Branch 7 taken 51 times.
✓ Branch 10 taken 51 times.
|
51 | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::CoolingCoilName, _coolingCoil->name().get()); |
| 248 | } | ||
| 249 | |||
| 250 | // Supply Air Flow Rate Method During Cooling Operation | ||
| 251 |
1/1✓ Branch 1 taken 51 times.
|
51 | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::CoolingSupplyAirFlowRateMethod, |
| 252 |
1/1✓ Branch 1 taken 51 times.
|
102 | modelObject.supplyAirFlowRateMethodDuringCoolingOperation()); |
| 253 | |||
| 254 | // Supply Air Flow Rate During Cooling Operation | ||
| 255 |
3/3✓ Branch 1 taken 51 times.
✓ Branch 3 taken 47 times.
✓ Branch 4 taken 4 times.
|
51 | if (modelObject.isSupplyAirFlowRateDuringCoolingOperationAutosized()) { |
| 256 |
2/2✓ Branch 1 taken 47 times.
✓ Branch 4 taken 47 times.
|
94 | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::CoolingSupplyAirFlowRate, "Autosize"); |
| 257 |
2/3✓ Branch 1 taken 4 times.
✓ Branch 3 taken 4 times.
✗ Branch 4 not taken.
|
8 | } else if (auto val_ = modelObject.supplyAirFlowRateDuringCoolingOperation()) { |
| 258 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
4 | unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::CoolingSupplyAirFlowRate, val_.get()); |
| 259 | } | ||
| 260 | |||
| 261 | // Supply Air Flow Rate Per Floor Area During Cooling Operation | ||
| 262 |
2/3✓ Branch 1 taken 51 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 51 times.
|
102 | if (auto val_ = modelObject.supplyAirFlowRatePerFloorAreaDuringCoolingOperation()) { |
| 263 | ✗ | unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::CoolingSupplyAirFlowRatePerFloorArea, val_.get()); | |
| 264 | } | ||
| 265 | |||
| 266 | // Fraction of Autosized Design Cooling Supply Air Flow Rate | ||
| 267 |
2/3✓ Branch 1 taken 51 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 51 times.
|
102 | if (auto val_ = modelObject.fractionofAutosizedDesignCoolingSupplyAirFlowRate()) { |
| 268 | ✗ | unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::CoolingFractionofAutosizedCoolingSupplyAirFlowRate, val_.get()); | |
| 269 | } | ||
| 270 | |||
| 271 | // Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation | ||
| 272 |
2/3✓ Branch 1 taken 51 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 51 times.
|
102 | if (auto val_ = modelObject.designSupplyAirFlowRatePerUnitofCapacityDuringCoolingOperation()) { |
| 273 | ✗ | unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::CoolingSupplyAirFlowRatePerUnitofCapacity, val_.get()); | |
| 274 | } | ||
| 275 | } else { | ||
| 276 |
2/2✓ Branch 1 taken 22 times.
✓ Branch 4 taken 22 times.
|
44 | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::CoolingSupplyAirFlowRateMethod, "None"); |
| 277 | } | ||
| 278 | |||
| 279 | // Use DOAS DX Cooling Coil | ||
| 280 |
2/3✓ Branch 1 taken 73 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 73 times.
|
73 | if (modelObject.useDOASDXCoolingCoil()) { |
| 281 | ✗ | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::UseDOASDXCoolingCoil, "Yes"); | |
| 282 | } else { | ||
| 283 |
2/2✓ Branch 1 taken 73 times.
✓ Branch 4 taken 73 times.
|
146 | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::UseDOASDXCoolingCoil, "No"); |
| 284 | } | ||
| 285 | |||
| 286 | // DOAS DX Cooling Coil Leaving Minimum Air Temperature | ||
| 287 |
2/3✓ Branch 1 taken 73 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 73 times.
|
73 | if (modelObject.isDOASDXCoolingCoilLeavingMinimumAirTemperatureAutosized()) { |
| 288 | ✗ | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::MinimumSupplyAirTemperature, "Autosize"); | |
| 289 |
3/4✓ Branch 1 taken 73 times.
✓ Branch 4 taken 73 times.
✓ Branch 7 taken 73 times.
✗ Branch 8 not taken.
|
146 | } else if ((d = modelObject.dOASDXCoolingCoilLeavingMinimumAirTemperature())) { |
| 290 |
2/2✓ Branch 1 taken 73 times.
✓ Branch 4 taken 73 times.
|
73 | unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::MinimumSupplyAirTemperature, d.get()); |
| 291 | } | ||
| 292 | |||
| 293 | // Latent Load Control | ||
| 294 |
2/2✓ Branch 1 taken 73 times.
✓ Branch 4 taken 73 times.
|
73 | s = modelObject.latentLoadControl(); |
| 295 |
1/2✓ Branch 0 taken 73 times.
✗ Branch 1 not taken.
|
73 | if (s) { |
| 296 |
2/2✓ Branch 1 taken 73 times.
✓ Branch 4 taken 73 times.
|
73 | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::LatentLoadControl, s.get()); |
| 297 | } | ||
| 298 | |||
| 299 | // Supplemental Heating Coil Object Type | ||
| 300 | // Supplemental Heating Coil Name | ||
| 301 | 73 | boost::optional<IdfObject> _supplementalHeatingCoil; | |
| 302 | |||
| 303 |
3/3✓ Branch 1 taken 73 times.
✓ Branch 3 taken 20 times.
✓ Branch 4 taken 53 times.
|
146 | if (boost::optional<HVACComponent> supplementalHeatingCoil = modelObject.supplementalHeatingCoil()) { |
| 304 |
2/2✓ Branch 1 taken 20 times.
✓ Branch 4 taken 20 times.
|
20 | _supplementalHeatingCoil = translateAndMapModelObject(supplementalHeatingCoil.get()); |
| 305 | |||
| 306 |
6/12✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 20 times.
✓ Branch 7 taken 20 times.
✓ Branch 10 taken 20 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 20 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 20 times.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
|
60 | if (_supplementalHeatingCoil && _supplementalHeatingCoil->name()) { |
| 307 |
4/4✓ Branch 1 taken 20 times.
✓ Branch 4 taken 20 times.
✓ Branch 7 taken 20 times.
✓ Branch 10 taken 20 times.
|
20 | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::SupplementalHeatingCoilObjectType, _supplementalHeatingCoil->iddObject().name()); |
| 308 |
4/4✓ Branch 1 taken 20 times.
✓ Branch 4 taken 20 times.
✓ Branch 7 taken 20 times.
✓ Branch 10 taken 20 times.
|
20 | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::SupplementalHeatingCoilName, _supplementalHeatingCoil->name().get()); |
| 309 | } | ||
| 310 | 73 | } | |
| 311 | |||
| 312 | // Supply Air Flow Rate Method When No Cooling or Heating is Required | ||
| 313 |
1/1✓ Branch 1 taken 73 times.
|
73 | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::NoLoadSupplyAirFlowRateMethod, |
| 314 |
1/1✓ Branch 1 taken 73 times.
|
146 | modelObject.supplyAirFlowRateMethodWhenNoCoolingorHeatingisRequired()); |
| 315 | |||
| 316 | // Supply Air Flow Rate When No Cooling or Heating is Required | ||
| 317 |
2/3✓ Branch 1 taken 73 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 73 times.
|
73 | if (modelObject.isSupplyAirFlowRateWhenNoCoolingorHeatingisRequiredAutosized()) { |
| 318 | ✗ | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::NoLoadSupplyAirFlowRate, "Autosize"); | |
| 319 |
2/3✓ Branch 1 taken 73 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 73 times.
|
146 | } else if ((d = modelObject.supplyAirFlowRateWhenNoCoolingorHeatingisRequired())) { |
| 320 | ✗ | unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::NoLoadSupplyAirFlowRate, d.get()); | |
| 321 | } | ||
| 322 | |||
| 323 | // Supply Air Flow Rate Per Floor Area When No Cooling or Heating is Required | ||
| 324 |
1/1✓ Branch 1 taken 73 times.
|
73 | d = modelObject.supplyAirFlowRatePerFloorAreaWhenNoCoolingorHeatingisRequired(); |
| 325 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 73 times.
|
73 | if (d) { |
| 326 | ✗ | unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::NoLoadSupplyAirFlowRatePerFloorArea, d.get()); | |
| 327 | } | ||
| 328 | |||
| 329 | // Fraction of Autosized Design Cooling Supply Air Flow Rate When No Cooling or Heating is Required | ||
| 330 |
1/1✓ Branch 1 taken 73 times.
|
73 | d = modelObject.fractionofAutosizedDesignCoolingSupplyAirFlowRateWhenNoCoolingorHeatingisRequired(); |
| 331 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 73 times.
|
73 | if (d) { |
| 332 | ✗ | unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::NoLoadFractionofAutosizedCoolingSupplyAirFlowRate, d.get()); | |
| 333 | } | ||
| 334 | |||
| 335 | // Fraction of Autosized Design Heating Supply Air Flow Rate When No Cooling or Heating is Required | ||
| 336 |
1/1✓ Branch 1 taken 73 times.
|
73 | d = modelObject.fractionofAutosizedDesignHeatingSupplyAirFlowRateWhenNoCoolingorHeatingisRequired(); |
| 337 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 73 times.
|
73 | if (d) { |
| 338 | ✗ | unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::NoLoadFractionofAutosizedHeatingSupplyAirFlowRate, d.get()); | |
| 339 | } | ||
| 340 | |||
| 341 | // Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation When No Cooling or Heating is Required | ||
| 342 |
1/1✓ Branch 1 taken 73 times.
|
73 | d = modelObject.designSupplyAirFlowRatePerUnitofCapacityDuringCoolingOperationWhenNoCoolingorHeatingisRequired(); |
| 343 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 73 times.
|
73 | if (d) { |
| 344 | ✗ | unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::NoLoadSupplyAirFlowRatePerUnitofCapacityDuringCoolingOperation, d.get()); | |
| 345 | } | ||
| 346 | |||
| 347 | // Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation When No Cooling or Heating is Required | ||
| 348 |
1/1✓ Branch 1 taken 73 times.
|
73 | d = modelObject.designSupplyAirFlowRatePerUnitofCapacityDuringHeatingOperationWhenNoCoolingorHeatingisRequired(); |
| 349 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 73 times.
|
73 | if (d) { |
| 350 | ✗ | unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::NoLoadSupplyAirFlowRatePerUnitofCapacityDuringHeatingOperation, d.get()); | |
| 351 | } | ||
| 352 | |||
| 353 | // No Load Supply Air Flow Rate Control Set To Low Speed | ||
| 354 |
2/3✓ Branch 1 taken 73 times.
✓ Branch 3 taken 73 times.
✗ Branch 4 not taken.
|
73 | if (modelObject.noLoadSupplyAirFlowRateControlSetToLowSpeed()) { |
| 355 |
2/2✓ Branch 1 taken 73 times.
✓ Branch 4 taken 73 times.
|
146 | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::NoLoadSupplyAirFlowRateControlSetToLowSpeed, "Yes"); |
| 356 | } else { | ||
| 357 | ✗ | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::NoLoadSupplyAirFlowRateControlSetToLowSpeed, "No"); | |
| 358 | } | ||
| 359 | |||
| 360 | // Maximum Supply Air Temperature | ||
| 361 |
2/3✓ Branch 1 taken 73 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 73 times.
|
73 | if (modelObject.isMaximumSupplyAirTemperatureAutosized()) { |
| 362 | ✗ | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::MaximumSupplyAirTemperature, "Autosize"); | |
| 363 |
2/3✓ Branch 1 taken 73 times.
✓ Branch 3 taken 73 times.
✗ Branch 4 not taken.
|
146 | } else if ((d = modelObject.maximumSupplyAirTemperature())) { |
| 364 |
2/2✓ Branch 1 taken 73 times.
✓ Branch 4 taken 73 times.
|
73 | unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::MaximumSupplyAirTemperature, d.get()); |
| 365 | } | ||
| 366 | |||
| 367 | // Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation | ||
| 368 |
2/2✓ Branch 1 taken 73 times.
✓ Branch 4 taken 73 times.
|
73 | d = modelObject.maximumOutdoorDryBulbTemperatureforSupplementalHeaterOperation(); |
| 369 |
1/2✓ Branch 0 taken 73 times.
✗ Branch 1 not taken.
|
73 | if (d) { |
| 370 |
2/2✓ Branch 1 taken 73 times.
✓ Branch 4 taken 73 times.
|
73 | unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::MaximumOutdoorDryBulbTemperatureforSupplementalHeaterOperation, d.get()); |
| 371 | } | ||
| 372 | |||
| 373 | // Outdoor Dry-Bulb Temperature Sensor Node Name | ||
| 374 |
1/1✓ Branch 1 taken 73 times.
|
73 | s = modelObject.outdoorDryBulbTemperatureSensorNodeName(); |
| 375 |
1/2✓ Branch 0 taken 73 times.
✗ Branch 1 not taken.
|
73 | if (s) { |
| 376 |
2/2✓ Branch 1 taken 73 times.
✓ Branch 4 taken 73 times.
|
73 | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::OutdoorDryBulbTemperatureSensorNodeName, s.get()); |
| 377 | } | ||
| 378 | |||
| 379 | // Ancilliary On-Cycle Electric Power | ||
| 380 |
2/2✓ Branch 1 taken 73 times.
✓ Branch 4 taken 73 times.
|
73 | d = modelObject.ancilliaryOnCycleElectricPower(); |
| 381 |
1/2✓ Branch 0 taken 73 times.
✗ Branch 1 not taken.
|
73 | if (d) { |
| 382 |
2/2✓ Branch 1 taken 73 times.
✓ Branch 4 taken 73 times.
|
73 | unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::AncillaryOnCycleElectricPower, d.get()); |
| 383 | } | ||
| 384 | |||
| 385 | // Ancilliary Off-Cycle Electric Power | ||
| 386 |
2/2✓ Branch 1 taken 73 times.
✓ Branch 4 taken 73 times.
|
73 | d = modelObject.ancilliaryOffCycleElectricPower(); |
| 387 |
1/2✓ Branch 0 taken 73 times.
✗ Branch 1 not taken.
|
73 | if (d) { |
| 388 |
2/2✓ Branch 1 taken 73 times.
✓ Branch 4 taken 73 times.
|
73 | unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::AncillaryOffCycleElectricPower, d.get()); |
| 389 | } | ||
| 390 | |||
| 391 | // Not Implemented | ||
| 392 | // Design Heat Recovery Water Flow Rate | ||
| 393 | // d = modelObject.designHeatRecoveryWaterFlowRate(); | ||
| 394 | // if (d) { | ||
| 395 | // unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::DesignHeatRecoveryWaterFlowRate,d.get()); | ||
| 396 | // } | ||
| 397 | |||
| 398 | // Not Implemented | ||
| 399 | // Maximum Temperature for Heat Recovery | ||
| 400 | // d = modelObject.maximumTemperatureforHeatRecovery(); | ||
| 401 | // if (d) { | ||
| 402 | // unitarySystem.setDouble(AirLoopHVAC_UnitarySystemFields::MaximumTemperatureforHeatRecovery,d.get()); | ||
| 403 | // } | ||
| 404 | |||
| 405 | // Not Implemented | ||
| 406 | // Heat Recovery Water Inlet Node Name | ||
| 407 | // if( boost::optional<ModelObject> mo = modelObject.waterInletModelObject() ) | ||
| 408 | // { | ||
| 409 | // if( boost::optional<Node> node = mo->optionalCast<Node>() ) | ||
| 410 | // { | ||
| 411 | // unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::HeatRecoveryWaterInletNodeName,node->name().get()); | ||
| 412 | // } | ||
| 413 | // } | ||
| 414 | |||
| 415 | // Not Implemented | ||
| 416 | // Heat Recovery Water Outlet Node Name | ||
| 417 | // if( boost::optional<ModelObject> mo = modelObject.waterOutletModelObject() ) | ||
| 418 | // { | ||
| 419 | // if( boost::optional<Node> node = mo->optionalCast<Node>() ) | ||
| 420 | // { | ||
| 421 | // unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::HeatRecoveryWaterOutletNodeName,node->name().get()); | ||
| 422 | // } | ||
| 423 | // } | ||
| 424 | |||
| 425 | // Design Specification Multispeed Object Name | ||
| 426 |
3/3✓ Branch 1 taken 73 times.
✓ Branch 3 taken 11 times.
✓ Branch 4 taken 62 times.
|
146 | if (boost::optional<UnitarySystemPerformanceMultispeed> designSpecificationMultispeedObject = modelObject.designSpecificationMultispeedObject()) { |
| 427 |
2/2✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
|
11 | boost::optional<IdfObject> _unitarySystemPerformance = translateAndMapModelObject(designSpecificationMultispeedObject.get()); |
| 428 | |||
| 429 |
6/12✓ Branch 1 taken 11 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 11 times.
✓ Branch 7 taken 11 times.
✓ Branch 10 taken 11 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 11 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 11 times.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
|
33 | if (_unitarySystemPerformance && _unitarySystemPerformance->name()) { |
| 430 |
1/1✓ Branch 1 taken 11 times.
|
11 | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::DesignSpecificationMultispeedObjectType, |
| 431 |
3/3✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
✓ Branch 7 taken 11 times.
|
22 | _unitarySystemPerformance->iddObject().name()); |
| 432 |
4/4✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
✓ Branch 7 taken 11 times.
✓ Branch 10 taken 11 times.
|
11 | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::DesignSpecificationMultispeedObjectName, _unitarySystemPerformance->name().get()); |
| 433 | } | ||
| 434 | // If it doesn't have one hard set, we check if there's at least one coil that should have speeds | ||
| 435 | 11 | } else if ((coolingCoil | |
| 436 |
5/5✓ Branch 1 taken 44 times.
✓ Branch 4 taken 44 times.
✓ Branch 7 taken 44 times.
✓ Branch 10 taken 41 times.
✓ Branch 11 taken 3 times.
|
44 | && ((coolingCoil->iddObjectType() == model::CoilCoolingDXMultiSpeed::iddObjectType()) |
| 437 |
4/5✓ Branch 1 taken 41 times.
✓ Branch 4 taken 41 times.
✓ Branch 7 taken 41 times.
✓ Branch 10 taken 41 times.
✗ Branch 11 not taken.
|
41 | || (coolingCoil->iddObjectType() == model::CoilCoolingDXVariableSpeed::iddObjectType()) |
| 438 |
5/5✓ Branch 1 taken 41 times.
✓ Branch 4 taken 41 times.
✓ Branch 7 taken 41 times.
✓ Branch 10 taken 38 times.
✓ Branch 11 taken 3 times.
|
41 | || (coolingCoil->iddObjectType() == model::CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit::iddObjectType()))) |
| 439 |
2/2✓ Branch 0 taken 44 times.
✓ Branch 1 taken 18 times.
|
124 | || (heatingCoil |
| 440 |
4/5✓ Branch 1 taken 24 times.
✓ Branch 4 taken 24 times.
✓ Branch 7 taken 24 times.
✓ Branch 10 taken 24 times.
✗ Branch 11 not taken.
|
24 | && ((heatingCoil->iddObjectType() == model::CoilHeatingDXMultiSpeed::iddObjectType()) |
| 441 |
4/5✓ Branch 1 taken 24 times.
✓ Branch 4 taken 24 times.
✓ Branch 7 taken 24 times.
✓ Branch 10 taken 24 times.
✗ Branch 11 not taken.
|
24 | || (heatingCoil->iddObjectType() == model::CoilHeatingDXVariableSpeed::iddObjectType()) |
| 442 |
5/5✓ Branch 1 taken 24 times.
✓ Branch 4 taken 24 times.
✓ Branch 7 taken 24 times.
✓ Branch 10 taken 22 times.
✓ Branch 11 taken 2 times.
|
24 | || (heatingCoil->iddObjectType() == model::CoilHeatingGasMultiStage::iddObjectType()) |
| 443 |
9/9✓ Branch 0 taken 24 times.
✓ Branch 1 taken 32 times.
✓ Branch 3 taken 22 times.
✓ Branch 6 taken 22 times.
✓ Branch 9 taken 22 times.
✓ Branch 12 taken 1 time.
✓ Branch 13 taken 21 times.
✓ Branch 14 taken 9 times.
✓ Branch 15 taken 53 times.
|
140 | || (heatingCoil->iddObjectType() == model::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit::iddObjectType())))) { |
| 444 | |||
| 445 | // If not user specified, then generate the UnitarySystemPerformance:Multispeed used for multi speed coils | ||
| 446 | |||
| 447 |
2/2✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
|
9 | IdfObject _unitarySystemPerformance(openstudio::IddObjectType::UnitarySystemPerformance_Multispeed); |
| 448 |
1/1✓ Branch 1 taken 9 times.
|
9 | m_idfObjects.push_back(_unitarySystemPerformance); |
| 449 |
3/3✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
✓ Branch 7 taken 9 times.
|
9 | _unitarySystemPerformance.setName(unitarySystem.nameString() + " Unitary System Performance"); |
| 450 | |||
| 451 | 9 | boost::optional<model::CoilHeatingDXMultiSpeed> multispeedDXHeating; | |
| 452 | 9 | boost::optional<model::CoilHeatingDXVariableSpeed> varSpeedDXHeating; | |
| 453 | 9 | boost::optional<model::CoilHeatingGasMultiStage> multistageGasHeating; | |
| 454 | 9 | boost::optional<model::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit> varSpeedWaterToAirHeating; | |
| 455 | 9 | boost::optional<model::CoilCoolingDXMultiSpeed> multispeedDXCooling; | |
| 456 | 9 | boost::optional<model::CoilCoolingDXVariableSpeed> varSpeedDXCooling; | |
| 457 | 9 | boost::optional<model::CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit> varSpeedWaterToAirCooling; | |
| 458 | |||
| 459 | 9 | int maxHeatingStages = 0; | |
| 460 | 9 | int maxCoolingStages = 0; | |
| 461 | |||
| 462 |
2/2✓ Branch 0 taken 8 times.
✓ Branch 1 taken 1 time.
|
9 | if (heatingCoil) { |
| 463 |
2/2✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
|
8 | multispeedDXHeating = heatingCoil->optionalCast<model::CoilHeatingDXMultiSpeed>(); |
| 464 |
2/2✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
|
8 | multistageGasHeating = heatingCoil->optionalCast<model::CoilHeatingGasMultiStage>(); |
| 465 |
2/2✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
|
8 | varSpeedDXHeating = heatingCoil->optionalCast<model::CoilHeatingDXVariableSpeed>(); |
| 466 |
2/2✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
|
8 | varSpeedWaterToAirHeating = heatingCoil->optionalCast<model::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit>(); |
| 467 | } | ||
| 468 | |||
| 469 |
2/2✓ Branch 0 taken 8 times.
✓ Branch 1 taken 1 time.
|
9 | if (coolingCoil) { |
| 470 |
2/2✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
|
8 | multispeedDXCooling = coolingCoil->optionalCast<model::CoilCoolingDXMultiSpeed>(); |
| 471 |
2/2✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
|
8 | varSpeedDXCooling = coolingCoil->optionalCast<model::CoilCoolingDXVariableSpeed>(); |
| 472 |
2/2✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
|
8 | varSpeedWaterToAirCooling = coolingCoil->optionalCast<model::CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit>(); |
| 473 | } | ||
| 474 | |||
| 475 | 9 | std::vector<model::CoilHeatingDXMultiSpeedStageData> heatingStages; | |
| 476 | 9 | std::vector<model::CoilHeatingDXVariableSpeedSpeedData> varHeatingStages; | |
| 477 | 9 | std::vector<model::CoilHeatingGasMultiStageStageData> gasHeatingStages; | |
| 478 | 9 | std::vector<model::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData> waterToAirHeatingStages; | |
| 479 | |||
| 480 | 9 | std::vector<model::CoilCoolingDXMultiSpeedStageData> coolingStages; | |
| 481 | 9 | std::vector<model::CoilCoolingDXVariableSpeedSpeedData> varCoolingStages; | |
| 482 | 9 | std::vector<model::CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData> waterToAirCoolingStages; | |
| 483 | |||
| 484 |
2/2✓ Branch 0 taken 3 times.
✓ Branch 1 taken 6 times.
|
9 | if (multispeedDXHeating) { |
| 485 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | heatingStages = multispeedDXHeating->stages(); |
| 486 | 3 | maxHeatingStages = heatingStages.size(); | |
| 487 |
1/1✓ Branch 1 taken 3 times.
|
3 | _unitarySystemPerformance.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforHeating, maxHeatingStages); |
| 488 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
|
6 | } else if (varSpeedDXHeating) { |
| 489 | ✗ | varHeatingStages = varSpeedDXHeating->speeds(); | |
| 490 | ✗ | maxHeatingStages = varHeatingStages.size(); | |
| 491 | ✗ | _unitarySystemPerformance.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforHeating, maxHeatingStages); | |
| 492 |
2/2✓ Branch 0 taken 2 times.
✓ Branch 1 taken 4 times.
|
6 | } else if (multistageGasHeating) { |
| 493 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | gasHeatingStages = multistageGasHeating->stages(); |
| 494 | 2 | maxHeatingStages = gasHeatingStages.size(); | |
| 495 |
1/1✓ Branch 1 taken 2 times.
|
2 | _unitarySystemPerformance.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforHeating, maxHeatingStages); |
| 496 |
2/2✓ Branch 0 taken 3 times.
✓ Branch 1 taken 1 time.
|
4 | } else if (varSpeedWaterToAirHeating) { |
| 497 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | waterToAirHeatingStages = varSpeedWaterToAirHeating->speeds(); |
| 498 | 3 | maxHeatingStages = waterToAirHeatingStages.size(); | |
| 499 |
1/1✓ Branch 1 taken 3 times.
|
3 | _unitarySystemPerformance.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforHeating, maxHeatingStages); |
| 500 | } else { | ||
| 501 |
1/1✓ Branch 1 taken 1 time.
|
1 | _unitarySystemPerformance.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforHeating, 1); |
| 502 | } | ||
| 503 | |||
| 504 |
2/2✓ Branch 0 taken 3 times.
✓ Branch 1 taken 6 times.
|
9 | if (multispeedDXCooling) { |
| 505 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | coolingStages = multispeedDXCooling->stages(); |
| 506 | 3 | maxCoolingStages = coolingStages.size(); | |
| 507 |
1/1✓ Branch 1 taken 3 times.
|
3 | _unitarySystemPerformance.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforCooling, maxCoolingStages); |
| 508 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
|
6 | } else if (varSpeedDXCooling) { |
| 509 | ✗ | varCoolingStages = varSpeedDXCooling->speeds(); | |
| 510 | ✗ | maxCoolingStages = varCoolingStages.size(); | |
| 511 | ✗ | _unitarySystemPerformance.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforCooling, maxCoolingStages); | |
| 512 |
2/2✓ Branch 0 taken 3 times.
✓ Branch 1 taken 3 times.
|
6 | } else if (varSpeedWaterToAirCooling) { |
| 513 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | waterToAirCoolingStages = varSpeedWaterToAirCooling->speeds(); |
| 514 | 3 | maxCoolingStages = waterToAirCoolingStages.size(); | |
| 515 |
1/1✓ Branch 1 taken 3 times.
|
3 | _unitarySystemPerformance.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforCooling, maxCoolingStages); |
| 516 | } else { | ||
| 517 |
1/1✓ Branch 1 taken 3 times.
|
3 | _unitarySystemPerformance.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforCooling, 1); |
| 518 | } | ||
| 519 | |||
| 520 |
2/2✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
|
9 | _unitarySystemPerformance.setString(UnitarySystemPerformance_MultispeedFields::SingleModeOperation, "No"); |
| 521 | |||
| 522 |
1/1✓ Branch 1 taken 9 times.
|
9 | auto heatingFlow = modelObject.supplyAirFlowRateDuringHeatingOperation(); |
| 523 |
1/1✓ Branch 1 taken 9 times.
|
9 | auto coolingFlow = modelObject.supplyAirFlowRateDuringCoolingOperation(); |
| 524 | |||
| 525 | 9 | double totalGasHeatingCap = 0; | |
| 526 |
2/2✓ Branch 5 taken 1 time.
✓ Branch 6 taken 9 times.
|
10 | for (const auto& gasStage : gasHeatingStages) { |
| 527 |
1/1✓ Branch 1 taken 1 time.
|
1 | auto cap = gasStage.nominalCapacity(); |
| 528 |
1/2✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
|
1 | if (cap) { |
| 529 |
1/1✓ Branch 1 taken 1 time.
|
1 | totalGasHeatingCap += cap.get(); |
| 530 | } | ||
| 531 | }; | ||
| 532 | |||
| 533 |
2/2✓ Branch 1 taken 23 times.
✓ Branch 2 taken 9 times.
|
32 | for (int i = 0; i < std::max(maxHeatingStages, maxCoolingStages); ++i) { |
| 534 |
1/1✓ Branch 1 taken 23 times.
|
23 | auto extensible = _unitarySystemPerformance.pushExtensibleGroup(); |
| 535 | |||
| 536 |
2/2✓ Branch 1 taken 6 times.
✓ Branch 2 taken 17 times.
|
23 | if (static_cast<unsigned>(i) < heatingStages.size()) { |
| 537 |
1/1✓ Branch 2 taken 6 times.
|
6 | auto heatingStage = heatingStages[i]; |
| 538 |
1/1✓ Branch 1 taken 6 times.
|
6 | auto stageFlow = heatingStage.ratedAirFlowRate(); |
| 539 |
3/6✓ Branch 0 taken 6 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 6 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 6 times.
✗ Branch 5 not taken.
|
12 | if (stageFlow && heatingFlow) { |
| 540 | 6 | extensible.setDouble(UnitarySystemPerformance_MultispeedExtensibleFields::HeatingSpeedSupplyAirFlowRatio, | |
| 541 |
3/3✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
✓ Branch 7 taken 6 times.
|
6 | stageFlow.get() / heatingFlow.get()); |
| 542 | } else { | ||
| 543 | ✗ | extensible.setString(UnitarySystemPerformance_MultispeedExtensibleFields::HeatingSpeedSupplyAirFlowRatio, "Autosize"); | |
| 544 | } | ||
| 545 |
1/2✗ Branch 2 not taken.
✓ Branch 3 taken 17 times.
|
23 | } else if (static_cast<unsigned>(i) < varHeatingStages.size()) { |
| 546 | ✗ | auto varHeatingStage = varHeatingStages[i]; | |
| 547 | ✗ | double stageFlow = varHeatingStage.referenceUnitRatedAirFlowRate(); | |
| 548 | ✗ | if (heatingFlow) { | |
| 549 | ✗ | extensible.setDouble(UnitarySystemPerformance_MultispeedExtensibleFields::HeatingSpeedSupplyAirFlowRatio, stageFlow / heatingFlow.get()); | |
| 550 | } else { | ||
| 551 | ✗ | extensible.setString(UnitarySystemPerformance_MultispeedExtensibleFields::HeatingSpeedSupplyAirFlowRatio, "Autosize"); | |
| 552 | } | ||
| 553 |
2/2✓ Branch 2 taken 1 time.
✓ Branch 3 taken 16 times.
|
17 | } else if (static_cast<unsigned>(i) < gasHeatingStages.size()) { |
| 554 |
1/1✓ Branch 2 taken 1 time.
|
1 | auto gasHeatingStage = gasHeatingStages[i]; |
| 555 |
1/1✓ Branch 1 taken 1 time.
|
1 | auto stageCap = gasHeatingStage.nominalCapacity(); |
| 556 |
1/2✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
|
1 | if (stageCap) { |
| 557 | 1 | extensible.setDouble(UnitarySystemPerformance_MultispeedExtensibleFields::HeatingSpeedSupplyAirFlowRatio, | |
| 558 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | stageCap.get() / totalGasHeatingCap); |
| 559 | } else { | ||
| 560 | ✗ | extensible.setString(UnitarySystemPerformance_MultispeedExtensibleFields::HeatingSpeedSupplyAirFlowRatio, "Autosize"); | |
| 561 | } | ||
| 562 |
2/2✓ Branch 2 taken 12 times.
✓ Branch 3 taken 4 times.
|
17 | } else if (static_cast<unsigned>(i) < waterToAirHeatingStages.size()) { |
| 563 |
1/1✓ Branch 2 taken 12 times.
|
12 | auto waterToAirHeatingStage = waterToAirHeatingStages[i]; |
| 564 |
1/1✓ Branch 1 taken 12 times.
|
12 | double stageFlow = waterToAirHeatingStage.referenceUnitRatedAirFlow(); |
| 565 |
2/2✓ Branch 0 taken 5 times.
✓ Branch 1 taken 7 times.
|
12 | if (heatingFlow) { |
| 566 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | extensible.setDouble(UnitarySystemPerformance_MultispeedExtensibleFields::HeatingSpeedSupplyAirFlowRatio, stageFlow / heatingFlow.get()); |
| 567 | } else { | ||
| 568 |
2/2✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
|
14 | extensible.setString(UnitarySystemPerformance_MultispeedExtensibleFields::HeatingSpeedSupplyAirFlowRatio, "Autosize"); |
| 569 | } | ||
| 570 | 12 | } else { | |
| 571 |
1/1✓ Branch 1 taken 4 times.
|
4 | extensible.setDouble(UnitarySystemPerformance_MultispeedExtensibleFields::HeatingSpeedSupplyAirFlowRatio, 1.0); |
| 572 | } | ||
| 573 | |||
| 574 |
2/2✓ Branch 1 taken 7 times.
✓ Branch 2 taken 16 times.
|
23 | if (static_cast<unsigned>(i) < coolingStages.size()) { |
| 575 |
1/1✓ Branch 2 taken 7 times.
|
7 | auto coolingStage = coolingStages[i]; |
| 576 |
1/1✓ Branch 1 taken 7 times.
|
7 | auto stageFlow = coolingStage.ratedAirFlowRate(); |
| 577 |
3/6✓ Branch 0 taken 7 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 7 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 7 times.
✗ Branch 5 not taken.
|
14 | if (stageFlow && coolingFlow) { |
| 578 | 7 | extensible.setDouble(UnitarySystemPerformance_MultispeedExtensibleFields::CoolingSpeedSupplyAirFlowRatio, | |
| 579 |
3/3✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 7 taken 7 times.
|
7 | stageFlow.get() / coolingFlow.get()); |
| 580 | } else { | ||
| 581 | ✗ | extensible.setString(UnitarySystemPerformance_MultispeedExtensibleFields::CoolingSpeedSupplyAirFlowRatio, "Autosize"); | |
| 582 | } | ||
| 583 |
1/2✗ Branch 2 not taken.
✓ Branch 3 taken 16 times.
|
23 | } else if (static_cast<unsigned>(i) < varCoolingStages.size()) { |
| 584 | ✗ | auto varCoolingStage = varCoolingStages[i]; | |
| 585 | ✗ | double stageFlow = varCoolingStage.referenceUnitRatedAirFlowRate(); | |
| 586 | ✗ | if (coolingFlow) { | |
| 587 | ✗ | extensible.setDouble(UnitarySystemPerformance_MultispeedExtensibleFields::CoolingSpeedSupplyAirFlowRatio, stageFlow / coolingFlow.get()); | |
| 588 | } else { | ||
| 589 | ✗ | extensible.setString(UnitarySystemPerformance_MultispeedExtensibleFields::CoolingSpeedSupplyAirFlowRatio, "Autosize"); | |
| 590 | } | ||
| 591 |
2/2✓ Branch 2 taken 12 times.
✓ Branch 3 taken 4 times.
|
16 | } else if (static_cast<unsigned>(i) < waterToAirCoolingStages.size()) { |
| 592 |
1/1✓ Branch 2 taken 12 times.
|
12 | auto waterToAirCoolingStage = waterToAirCoolingStages[i]; |
| 593 |
1/1✓ Branch 1 taken 12 times.
|
12 | double stageFlow = waterToAirCoolingStage.referenceUnitRatedAirFlowRate(); |
| 594 |
2/2✓ Branch 0 taken 5 times.
✓ Branch 1 taken 7 times.
|
12 | if (coolingFlow) { |
| 595 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | extensible.setDouble(UnitarySystemPerformance_MultispeedExtensibleFields::CoolingSpeedSupplyAirFlowRatio, stageFlow / coolingFlow.get()); |
| 596 | } else { | ||
| 597 |
2/2✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
|
14 | extensible.setString(UnitarySystemPerformance_MultispeedExtensibleFields::CoolingSpeedSupplyAirFlowRatio, "Autosize"); |
| 598 | } | ||
| 599 | 12 | } else { | |
| 600 |
1/1✓ Branch 1 taken 4 times.
|
4 | extensible.setDouble(UnitarySystemPerformance_MultispeedExtensibleFields::CoolingSpeedSupplyAirFlowRatio, 1.0); |
| 601 | } | ||
| 602 | 23 | } | |
| 603 | |||
| 604 |
3/3✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
✓ Branch 7 taken 9 times.
|
9 | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::DesignSpecificationMultispeedObjectType, _unitarySystemPerformance.iddObject().name()); |
| 605 |
2/2✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
|
9 | unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::DesignSpecificationMultispeedObjectName, _unitarySystemPerformance.nameString()); |
| 606 | 82 | } | |
| 607 | |||
| 608 | // Fill in node names for inner components | ||
| 609 |
3/6✓ Branch 1 taken 73 times.
✗ Branch 2 not taken.
✗ Branch 4 not taken.
✓ Branch 5 taken 73 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 73 times.
|
73 | if (!airInletNodeName || !airOutletNodeName) { |
| 610 | ✗ | LOG(Error, modelObject.briefDescription() << ": Object not attached to AirLoopHVAC"); | |
| 611 | ✗ | return boost::none; | |
| 612 | } | ||
| 613 | |||
| 614 |
3/3✓ Branch 1 taken 73 times.
✓ Branch 4 taken 73 times.
✓ Branch 7 taken 73 times.
|
73 | std::string baseName = modelObject.name().get(); |
| 615 | |||
| 616 | // Figure out node connections: | ||
| 617 | // If BlowThrough: o---- Fan --- CC ---- HC ---- SupplHC ----o | ||
| 618 | // If DrawThrough: o---- CC --- HC ---- Fan ---- SupplHC ----o | ||
| 619 | // (All above components are optional, but at least one must be present) | ||
| 620 | |||
| 621 |
2/2✓ Branch 0 taken 24 times.
✓ Branch 1 taken 49 times.
|
73 | if (_fan) { |
| 622 | 24 | std::string outletNodeName; | |
| 623 |
2/2✓ Branch 1 taken 24 times.
✓ Branch 4 taken 24 times.
|
24 | std::string inletNodeName = airInletNodeName.get(); |
| 624 |
2/2✓ Branch 0 taken 8 times.
✓ Branch 1 taken 16 times.
|
24 | if (blowThroughFan) { |
| 625 |
2/2✓ Branch 0 taken 4 times.
✓ Branch 1 taken 4 times.
|
8 | if (_coolingCoil) { |
| 626 |
1/1✓ Branch 1 taken 4 times.
|
4 | outletNodeName = baseName + " Fan - Cooling Coil Node"; |
| 627 |
2/2✓ Branch 0 taken 2 times.
✓ Branch 1 taken 2 times.
|
4 | } else if (_heatingCoil) { |
| 628 |
1/1✓ Branch 1 taken 2 times.
|
2 | outletNodeName = baseName + " Fan - Heating Coil Node"; |
| 629 |
2/2✓ Branch 0 taken 1 time.
✓ Branch 1 taken 1 time.
|
2 | } else if (_supplementalHeatingCoil) { |
| 630 |
1/1✓ Branch 1 taken 1 time.
|
1 | outletNodeName = baseName + " Fan - Supplemental Coil Node"; |
| 631 | } else { | ||
| 632 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | outletNodeName = airOutletNodeName.get(); |
| 633 | } | ||
| 634 | } else { | ||
| 635 |
2/2✓ Branch 0 taken 12 times.
✓ Branch 1 taken 4 times.
|
16 | if (_heatingCoil) { |
| 636 |
1/1✓ Branch 1 taken 12 times.
|
12 | inletNodeName = baseName + " Heating Coil - Fan Node"; |
| 637 |
2/2✓ Branch 0 taken 2 times.
✓ Branch 1 taken 2 times.
|
4 | } else if (_coolingCoil) { |
| 638 |
1/1✓ Branch 1 taken 2 times.
|
2 | inletNodeName = baseName + " Cooling Coil - Fan Node"; |
| 639 | } | ||
| 640 |
2/2✓ Branch 0 taken 8 times.
✓ Branch 1 taken 8 times.
|
16 | if (_supplementalHeatingCoil) { |
| 641 |
1/1✓ Branch 1 taken 8 times.
|
8 | outletNodeName = baseName + " Fan - Supplemental Coil Node"; |
| 642 | } else { | ||
| 643 |
2/2✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
|
8 | outletNodeName = airOutletNodeName.get(); |
| 644 | } | ||
| 645 | } | ||
| 646 | |||
| 647 |
6/6✓ Branch 1 taken 24 times.
✓ Branch 4 taken 24 times.
✓ Branch 7 taken 24 times.
✓ Branch 10 taken 24 times.
✓ Branch 14 taken 21 times.
✓ Branch 15 taken 3 times.
|
24 | if (_fan->iddObject().type() == IddObjectType::Fan_ConstantVolume) { |
| 648 |
2/2✓ Branch 1 taken 21 times.
✓ Branch 4 taken 21 times.
|
21 | _fan->setString(Fan_ConstantVolumeFields::AirInletNodeName, inletNodeName); |
| 649 |
2/2✓ Branch 1 taken 21 times.
✓ Branch 4 taken 21 times.
|
21 | _fan->setString(Fan_ConstantVolumeFields::AirOutletNodeName, outletNodeName); |
| 650 |
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 | } else if (_fan->iddObject().type() == IddObjectType::Fan_VariableVolume) { |
| 651 | ✗ | _fan->setString(Fan_VariableVolumeFields::AirInletNodeName, inletNodeName); | |
| 652 | ✗ | _fan->setString(Fan_VariableVolumeFields::AirOutletNodeName, outletNodeName); | |
| 653 |
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 | } else if (_fan->iddObject().type() == IddObjectType::Fan_OnOff) { |
| 654 | ✗ | _fan->setString(Fan_OnOffFields::AirInletNodeName, inletNodeName); | |
| 655 | ✗ | _fan->setString(Fan_OnOffFields::AirOutletNodeName, outletNodeName); | |
| 656 |
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 (_fan->iddObject().type() == IddObjectType::Fan_SystemModel) { |
| 657 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | _fan->setString(Fan_SystemModelFields::AirInletNodeName, inletNodeName); |
| 658 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | _fan->setString(Fan_SystemModelFields::AirOutletNodeName, outletNodeName); |
| 659 | ✗ | } else if (_fan->iddObject().type() == IddObjectType::Fan_ComponentModel) { | |
| 660 | ✗ | _fan->setString(Fan_ComponentModelFields::AirInletNodeName, inletNodeName); | |
| 661 | ✗ | _fan->setString(Fan_ComponentModelFields::AirOutletNodeName, outletNodeName); | |
| 662 | } | ||
| 663 | |||
| 664 |
1/1✓ Branch 1 taken 24 times.
|
24 | fixSPMsForUnitarySystem(modelObject, inletNodeName, outletNodeName); |
| 665 | 24 | } | |
| 666 | |||
| 667 |
2/2✓ Branch 0 taken 51 times.
✓ Branch 1 taken 22 times.
|
73 | if (_coolingCoil) { |
| 668 | 51 | std::string outletNodeName; | |
| 669 | 51 | std::string inletNodeName; | |
| 670 |
6/6✓ Branch 0 taken 8 times.
✓ Branch 1 taken 43 times.
✓ Branch 2 taken 4 times.
✓ Branch 3 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 5 taken 47 times.
|
59 | if (blowThroughFan && _fan) { |
| 671 |
1/1✓ Branch 1 taken 4 times.
|
4 | inletNodeName = baseName + " Fan - Cooling Coil Node"; |
| 672 | } else { | ||
| 673 |
2/2✓ Branch 1 taken 47 times.
✓ Branch 4 taken 47 times.
|
47 | inletNodeName = airInletNodeName.get(); |
| 674 | } | ||
| 675 |
2/2✓ Branch 0 taken 22 times.
✓ Branch 1 taken 29 times.
|
51 | if (_heatingCoil) { |
| 676 |
1/1✓ Branch 1 taken 22 times.
|
22 | outletNodeName = baseName + " Cooling Coil - Heating Coil Node"; |
| 677 |
6/6✓ Branch 0 taken 25 times.
✓ Branch 1 taken 4 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 23 times.
✓ Branch 4 taken 2 times.
✓ Branch 5 taken 27 times.
|
54 | } else if (!blowThroughFan && _fan) { |
| 678 |
1/1✓ Branch 1 taken 2 times.
|
2 | outletNodeName = baseName + " Cooling Coil - Fan Node"; |
| 679 |
2/2✓ Branch 0 taken 3 times.
✓ Branch 1 taken 24 times.
|
27 | } else if (_supplementalHeatingCoil) { |
| 680 |
1/1✓ Branch 1 taken 3 times.
|
3 | outletNodeName = baseName + " Cooling Coil - Supplemental Coil Node"; |
| 681 | } else { | ||
| 682 |
2/2✓ Branch 1 taken 24 times.
✓ Branch 4 taken 24 times.
|
24 | outletNodeName = airOutletNodeName.get(); |
| 683 | } | ||
| 684 | |||
| 685 |
6/6✓ Branch 1 taken 51 times.
✓ Branch 4 taken 51 times.
✓ Branch 7 taken 51 times.
✓ Branch 10 taken 51 times.
✓ Branch 14 taken 21 times.
✓ Branch 15 taken 30 times.
|
51 | if (_coolingCoil->iddObject().type() == IddObjectType::Coil_Cooling_DX_SingleSpeed) { |
| 686 |
2/2✓ Branch 1 taken 21 times.
✓ Branch 4 taken 21 times.
|
21 | _coolingCoil->setString(Coil_Cooling_DX_SingleSpeedFields::AirInletNodeName, inletNodeName); |
| 687 |
2/2✓ Branch 1 taken 21 times.
✓ Branch 4 taken 21 times.
|
21 | _coolingCoil->setString(Coil_Cooling_DX_SingleSpeedFields::AirOutletNodeName, outletNodeName); |
| 688 |
6/6✓ Branch 1 taken 30 times.
✓ Branch 4 taken 30 times.
✓ Branch 7 taken 30 times.
✓ Branch 10 taken 30 times.
✓ Branch 14 taken 1 time.
✓ Branch 15 taken 29 times.
|
30 | } else if (_coolingCoil->iddObject().type() == IddObjectType::Coil_Cooling_DX_SingleSpeed_ThermalStorage) { |
| 689 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | _coolingCoil->setString(Coil_Cooling_DX_SingleSpeed_ThermalStorageFields::EvaporatorAirInletNodeName, inletNodeName); |
| 690 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | _coolingCoil->setString(Coil_Cooling_DX_SingleSpeed_ThermalStorageFields::EvaporatorAirOutletNodeName, outletNodeName); |
| 691 |
5/6✓ Branch 1 taken 29 times.
✓ Branch 4 taken 29 times.
✓ Branch 7 taken 29 times.
✓ Branch 10 taken 29 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 29 times.
|
29 | } else if (_coolingCoil->iddObject().type() == IddObjectType::Coil_Cooling_DX_TwoSpeed) { |
| 692 | ✗ | _coolingCoil->setString(Coil_Cooling_DX_TwoSpeedFields::AirInletNodeName, inletNodeName); | |
| 693 | ✗ | _coolingCoil->setString(Coil_Cooling_DX_TwoSpeedFields::AirOutletNodeName, outletNodeName); | |
| 694 |
6/6✓ Branch 1 taken 29 times.
✓ Branch 4 taken 29 times.
✓ Branch 7 taken 29 times.
✓ Branch 10 taken 29 times.
✓ Branch 14 taken 9 times.
✓ Branch 15 taken 20 times.
|
29 | } else if (_coolingCoil->iddObject().type() == IddObjectType::Coil_Cooling_DX_MultiSpeed) { |
| 695 |
2/2✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
|
9 | _coolingCoil->setString(Coil_Cooling_DX_MultiSpeedFields::AirInletNodeName, inletNodeName); |
| 696 |
2/2✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
|
9 | _coolingCoil->setString(Coil_Cooling_DX_MultiSpeedFields::AirOutletNodeName, outletNodeName); |
| 697 |
6/6✓ Branch 1 taken 20 times.
✓ Branch 4 taken 20 times.
✓ Branch 7 taken 20 times.
✓ Branch 10 taken 20 times.
✓ Branch 14 taken 1 time.
✓ Branch 15 taken 19 times.
|
20 | } else if (_coolingCoil->iddObject().type() == IddObjectType::Coil_Cooling_DX_VariableSpeed) { |
| 698 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | _coolingCoil->setString(Coil_Cooling_DX_VariableSpeedFields::IndoorAirInletNodeName, inletNodeName); |
| 699 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | _coolingCoil->setString(Coil_Cooling_DX_VariableSpeedFields::IndoorAirOutletNodeName, outletNodeName); |
| 700 |
6/6✓ Branch 1 taken 19 times.
✓ Branch 4 taken 19 times.
✓ Branch 7 taken 19 times.
✓ Branch 10 taken 19 times.
✓ Branch 14 taken 1 time.
✓ Branch 15 taken 18 times.
|
19 | } else if (_coolingCoil->iddObject().type() == IddObjectType::Coil_Cooling_Water) { |
| 701 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | _coolingCoil->setString(Coil_Cooling_WaterFields::AirInletNodeName, inletNodeName); |
| 702 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | _coolingCoil->setString(Coil_Cooling_WaterFields::AirOutletNodeName, outletNodeName); |
| 703 |
5/6✓ Branch 1 taken 18 times.
✓ Branch 4 taken 18 times.
✓ Branch 7 taken 18 times.
✓ Branch 10 taken 18 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 18 times.
|
18 | } else if (_coolingCoil->iddObject().type() == IddObjectType::Coil_Cooling_DX_TwoStageWithHumidityControlMode) { |
| 704 | ✗ | _coolingCoil->setString(Coil_Cooling_DX_TwoStageWithHumidityControlModeFields::AirInletNodeName, inletNodeName); | |
| 705 | ✗ | _coolingCoil->setString(Coil_Cooling_DX_TwoStageWithHumidityControlModeFields::AirOutletNodeName, outletNodeName); | |
| 706 |
6/6✓ Branch 1 taken 18 times.
✓ Branch 4 taken 18 times.
✓ Branch 7 taken 18 times.
✓ Branch 10 taken 18 times.
✓ Branch 14 taken 1 time.
✓ Branch 15 taken 17 times.
|
18 | } else if (_coolingCoil->iddObject().type() == IddObjectType::Coil_Cooling_WaterToAirHeatPump_EquationFit) { |
| 707 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | _coolingCoil->setString(Coil_Cooling_WaterToAirHeatPump_EquationFitFields::AirInletNodeName, inletNodeName); |
| 708 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | _coolingCoil->setString(Coil_Cooling_WaterToAirHeatPump_EquationFitFields::AirOutletNodeName, outletNodeName); |
| 709 |
6/6✓ Branch 1 taken 17 times.
✓ Branch 4 taken 17 times.
✓ Branch 7 taken 17 times.
✓ Branch 10 taken 17 times.
✓ Branch 14 taken 3 times.
✓ Branch 15 taken 14 times.
|
17 | } else if (_coolingCoil->iddObject().type() == IddObjectType::Coil_Cooling_WaterToAirHeatPump_VariableSpeedEquationFit) { |
| 710 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | _coolingCoil->setString(Coil_Cooling_WaterToAirHeatPump_VariableSpeedEquationFitFields::IndoorAirInletNodeName, inletNodeName); |
| 711 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | _coolingCoil->setString(Coil_Cooling_WaterToAirHeatPump_VariableSpeedEquationFitFields::IndoorAirOutletNodeName, outletNodeName); |
| 712 |
6/6✓ Branch 1 taken 14 times.
✓ Branch 4 taken 14 times.
✓ Branch 7 taken 14 times.
✓ Branch 10 taken 14 times.
✓ Branch 14 taken 1 time.
✓ Branch 15 taken 13 times.
|
14 | } else if (_coolingCoil->iddObject().type() == IddObjectType::CoilSystem_Cooling_DX_HeatExchangerAssisted) { |
| 713 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
✗ Branch 4 not taken.
|
1 | OS_ASSERT(coolingCoil); |
| 714 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | auto coilSystem = coolingCoil->optionalCast<model::CoilSystemCoolingDXHeatExchangerAssisted>(); |
| 715 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
✗ Branch 4 not taken.
|
1 | OS_ASSERT(coilSystem); |
| 716 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | auto hx = coilSystem->heatExchanger(); |
| 717 |
1/1✓ Branch 1 taken 1 time.
|
1 | auto _hx = translateAndMapModelObject(hx); |
| 718 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
✗ Branch 4 not taken.
|
1 | OS_ASSERT(_hx); |
| 719 |
5/6✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✗ Branch 14 not taken.
✓ Branch 15 taken 1 time.
|
1 | if (_hx->iddObject().type() == IddObjectType::HeatExchanger_AirToAir_SensibleAndLatent) { |
| 720 | ✗ | _hx->setString(HeatExchanger_AirToAir_SensibleAndLatentFields::SupplyAirInletNodeName, inletNodeName); | |
| 721 | ✗ | _hx->setString(HeatExchanger_AirToAir_SensibleAndLatentFields::ExhaustAirOutletNodeName, outletNodeName); | |
| 722 |
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 (_hx->iddObject().type() == IddObjectType::HeatExchanger_Desiccant_BalancedFlow) { |
| 723 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | _hx->setString(HeatExchanger_Desiccant_BalancedFlowFields::RegenerationAirInletNodeName, inletNodeName); |
| 724 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | _hx->setString(HeatExchanger_Desiccant_BalancedFlowFields::ProcessAirOutletNodeName, outletNodeName); |
| 725 | } else { | ||
| 726 | ✗ | LOG(Warn, modelObject.briefDescription() << ": Contains an unsupported type " << _hx->iddObject().type() << "."); | |
| 727 | } | ||
| 728 |
6/6✓ Branch 4 taken 13 times.
✓ Branch 7 taken 13 times.
✓ Branch 10 taken 13 times.
✓ Branch 13 taken 13 times.
✓ Branch 17 taken 1 time.
✓ Branch 18 taken 12 times.
|
14 | } else if (_coolingCoil->iddObject().type() == IddObjectType::CoilSystem_Cooling_Water_HeatExchangerAssisted) { |
| 729 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
✗ Branch 4 not taken.
|
1 | OS_ASSERT(coolingCoil); |
| 730 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | auto coilSystem = coolingCoil->optionalCast<model::CoilSystemCoolingWaterHeatExchangerAssisted>(); |
| 731 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
✗ Branch 4 not taken.
|
1 | OS_ASSERT(coilSystem); |
| 732 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | auto hx = coilSystem->heatExchanger(); |
| 733 |
1/1✓ Branch 1 taken 1 time.
|
1 | auto _hx = translateAndMapModelObject(hx); |
| 734 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
✗ Branch 4 not taken.
|
1 | OS_ASSERT(_hx); |
| 735 |
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 | if (_hx->iddObject().type() == IddObjectType::HeatExchanger_AirToAir_SensibleAndLatent) { |
| 736 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | _hx->setString(HeatExchanger_AirToAir_SensibleAndLatentFields::SupplyAirInletNodeName, inletNodeName); |
| 737 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | _hx->setString(HeatExchanger_AirToAir_SensibleAndLatentFields::ExhaustAirOutletNodeName, outletNodeName); |
| 738 | // Note: HeatExchangerDesiccantBalancedFlow is not accepted at this time | ||
| 739 | } else { | ||
| 740 | ✗ | LOG(Warn, modelObject.briefDescription() << ": Contains an unsupported type " << _hx->iddObject().type() << "."); | |
| 741 | } | ||
| 742 |
5/6✓ Branch 4 taken 12 times.
✓ Branch 7 taken 12 times.
✓ Branch 10 taken 12 times.
✓ Branch 13 taken 12 times.
✓ Branch 17 taken 12 times.
✗ Branch 18 not taken.
|
13 | } else if (_coolingCoil->iddObject().type() == IddObjectType::Coil_Cooling_DX) { |
| 743 |
2/2✓ Branch 1 taken 12 times.
✓ Branch 4 taken 12 times.
|
12 | _coolingCoil->setString(Coil_Cooling_DXFields::EvaporatorInletNodeName, inletNodeName); |
| 744 |
2/2✓ Branch 1 taken 12 times.
✓ Branch 4 taken 12 times.
|
12 | _coolingCoil->setString(Coil_Cooling_DXFields::EvaporatorOutletNodeName, outletNodeName); |
| 745 | } else { | ||
| 746 | ✗ | LOG(Warn, modelObject.briefDescription() << ": Contains an unsupported type " << _coolingCoil->iddObject().type() << "."); | |
| 747 | } | ||
| 748 | 51 | } | |
| 749 | |||
| 750 |
2/2✓ Branch 0 taken 36 times.
✓ Branch 1 taken 37 times.
|
73 | if (_heatingCoil) { |
| 751 | 36 | std::string outletNodeName; | |
| 752 | 36 | std::string inletNodeName; | |
| 753 |
2/2✓ Branch 0 taken 22 times.
✓ Branch 1 taken 14 times.
|
36 | if (_coolingCoil) { |
| 754 |
1/1✓ Branch 1 taken 22 times.
|
22 | inletNodeName = baseName + " Cooling Coil - Heating Coil Node"; |
| 755 |
6/6✓ Branch 0 taken 4 times.
✓ Branch 1 taken 10 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 5 taken 12 times.
|
18 | } else if (blowThroughFan && _fan) { |
| 756 |
1/1✓ Branch 1 taken 2 times.
|
2 | inletNodeName = baseName + " Fan - Heating Coil Node"; |
| 757 | } else { | ||
| 758 |
2/2✓ Branch 1 taken 12 times.
✓ Branch 4 taken 12 times.
|
12 | inletNodeName = airInletNodeName.get(); |
| 759 | } | ||
| 760 |
6/6✓ Branch 0 taken 28 times.
✓ Branch 1 taken 8 times.
✓ Branch 2 taken 12 times.
✓ Branch 3 taken 16 times.
✓ Branch 4 taken 12 times.
✓ Branch 5 taken 24 times.
|
64 | if (!blowThroughFan && _fan) { |
| 761 |
1/1✓ Branch 1 taken 12 times.
|
12 | outletNodeName = baseName + " Heating Coil - Fan Node"; |
| 762 |
2/2✓ Branch 0 taken 6 times.
✓ Branch 1 taken 18 times.
|
24 | } else if (_supplementalHeatingCoil) { |
| 763 |
1/1✓ Branch 1 taken 6 times.
|
6 | outletNodeName = baseName + " Heating Coil - Supplemental Coil Node"; |
| 764 | } else { | ||
| 765 |
2/2✓ Branch 1 taken 18 times.
✓ Branch 4 taken 18 times.
|
18 | outletNodeName = airOutletNodeName.get(); |
| 766 | } | ||
| 767 | |||
| 768 |
6/6✓ Branch 1 taken 36 times.
✓ Branch 4 taken 36 times.
✓ Branch 7 taken 36 times.
✓ Branch 10 taken 36 times.
✓ Branch 14 taken 18 times.
✓ Branch 15 taken 18 times.
|
36 | if (_heatingCoil->iddObject().type() == IddObjectType::Coil_Heating_DX_SingleSpeed) { |
| 769 |
2/2✓ Branch 1 taken 18 times.
✓ Branch 4 taken 18 times.
|
18 | _heatingCoil->setString(Coil_Heating_DX_SingleSpeedFields::AirInletNodeName, inletNodeName); |
| 770 |
2/2✓ Branch 1 taken 18 times.
✓ Branch 4 taken 18 times.
|
18 | _heatingCoil->setString(Coil_Heating_DX_SingleSpeedFields::AirOutletNodeName, outletNodeName); |
| 771 |
5/6✓ Branch 1 taken 18 times.
✓ Branch 4 taken 18 times.
✓ Branch 7 taken 18 times.
✓ Branch 10 taken 18 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 18 times.
|
18 | } else if (_heatingCoil->iddObject().type() == IddObjectType::Coil_Heating_Electric) { |
| 772 | ✗ | _heatingCoil->setString(Coil_Heating_ElectricFields::AirInletNodeName, inletNodeName); | |
| 773 | ✗ | _heatingCoil->setString(Coil_Heating_ElectricFields::AirOutletNodeName, outletNodeName); | |
| 774 |
6/6✓ Branch 1 taken 18 times.
✓ Branch 4 taken 18 times.
✓ Branch 7 taken 18 times.
✓ Branch 10 taken 18 times.
✓ Branch 14 taken 2 times.
✓ Branch 15 taken 16 times.
|
18 | } else if (_heatingCoil->iddObject().type() == IddObjectType::Coil_Heating_Electric_MultiStage) { |
| 775 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | _heatingCoil->setString(Coil_Heating_Electric_MultiStageFields::AirInletNodeName, inletNodeName); |
| 776 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | _heatingCoil->setString(Coil_Heating_Electric_MultiStageFields::AirOutletNodeName, outletNodeName); |
| 777 |
5/6✓ Branch 1 taken 16 times.
✓ Branch 4 taken 16 times.
✓ Branch 7 taken 16 times.
✓ Branch 10 taken 16 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 16 times.
|
16 | } else if (_heatingCoil->iddObject().type() == IddObjectType::Coil_Heating_Fuel) { |
| 778 | ✗ | _heatingCoil->setString(Coil_Heating_FuelFields::AirInletNodeName, inletNodeName); | |
| 779 | ✗ | _heatingCoil->setString(Coil_Heating_FuelFields::AirOutletNodeName, outletNodeName); | |
| 780 |
5/6✓ Branch 1 taken 16 times.
✓ Branch 4 taken 16 times.
✓ Branch 7 taken 16 times.
✓ Branch 10 taken 16 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 16 times.
|
16 | } else if (_heatingCoil->iddObject().type() == IddObjectType::Coil_Heating_Water) { |
| 781 | ✗ | _heatingCoil->setString(Coil_Heating_WaterFields::AirInletNodeName, inletNodeName); | |
| 782 | ✗ | _heatingCoil->setString(Coil_Heating_WaterFields::AirOutletNodeName, outletNodeName); | |
| 783 |
6/6✓ Branch 1 taken 16 times.
✓ Branch 4 taken 16 times.
✓ Branch 7 taken 16 times.
✓ Branch 10 taken 16 times.
✓ Branch 14 taken 9 times.
✓ Branch 15 taken 7 times.
|
16 | } else if (_heatingCoil->iddObject().type() == IddObjectType::Coil_Heating_DX_MultiSpeed) { |
| 784 |
2/2✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
|
9 | _heatingCoil->setString(Coil_Heating_DX_MultiSpeedFields::AirInletNodeName, inletNodeName); |
| 785 |
2/2✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
|
9 | _heatingCoil->setString(Coil_Heating_DX_MultiSpeedFields::AirOutletNodeName, outletNodeName); |
| 786 |
6/6✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 7 taken 7 times.
✓ Branch 10 taken 7 times.
✓ Branch 14 taken 1 time.
✓ Branch 15 taken 6 times.
|
7 | } else if (_heatingCoil->iddObject().type() == IddObjectType::Coil_Heating_DX_VariableSpeed) { |
| 787 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | _heatingCoil->setString(Coil_Heating_DX_VariableSpeedFields::IndoorAirInletNodeName, inletNodeName); |
| 788 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | _heatingCoil->setString(Coil_Heating_DX_VariableSpeedFields::IndoorAirOutletNodeName, outletNodeName); |
| 789 |
6/6✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
✓ Branch 7 taken 6 times.
✓ Branch 10 taken 6 times.
✓ Branch 14 taken 2 times.
✓ Branch 15 taken 4 times.
|
6 | } else if (_heatingCoil->iddObject().type() == IddObjectType::Coil_Heating_Gas_MultiStage) { |
| 790 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | _heatingCoil->setString(Coil_Heating_Gas_MultiStageFields::AirInletNodeName, inletNodeName); |
| 791 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | _heatingCoil->setString(Coil_Heating_Gas_MultiStageFields::AirOutletNodeName, outletNodeName); |
| 792 |
5/6✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
✓ Branch 10 taken 4 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 4 times.
|
4 | } else if (_heatingCoil->iddObject().type() == IddObjectType::Coil_Heating_Desuperheater) { |
| 793 | ✗ | _heatingCoil->setString(Coil_Heating_DesuperheaterFields::AirInletNodeName, inletNodeName); | |
| 794 | ✗ | _heatingCoil->setString(Coil_Heating_DesuperheaterFields::AirOutletNodeName, outletNodeName); | |
| 795 |
6/6✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
✓ Branch 10 taken 4 times.
✓ Branch 14 taken 1 time.
✓ Branch 15 taken 3 times.
|
4 | } else if (_heatingCoil->iddObject().type() == IddObjectType::Coil_Heating_WaterToAirHeatPump_EquationFit) { |
| 796 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | _heatingCoil->setString(Coil_Heating_WaterToAirHeatPump_EquationFitFields::AirInletNodeName, inletNodeName); |
| 797 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | _heatingCoil->setString(Coil_Heating_WaterToAirHeatPump_EquationFitFields::AirOutletNodeName, outletNodeName); |
| 798 |
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 (_heatingCoil->iddObject().type() == IddObjectType::Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFit) { |
| 799 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | _heatingCoil->setString(Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFitFields::IndoorAirInletNodeName, inletNodeName); |
| 800 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | _heatingCoil->setString(Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFitFields::IndoorAirOutletNodeName, outletNodeName); |
| 801 | } else { | ||
| 802 | ✗ | LOG(Warn, modelObject.briefDescription() << ": Contains an unsupported type " << _heatingCoil->iddObject().type() << "."); | |
| 803 | } | ||
| 804 | 36 | } | |
| 805 | |||
| 806 |
2/2✓ Branch 0 taken 20 times.
✓ Branch 1 taken 53 times.
|
73 | if (_supplementalHeatingCoil) { |
| 807 | 20 | std::string outletNodeName; | |
| 808 | 20 | std::string inletNodeName; | |
| 809 |
6/6✓ Branch 0 taken 12 times.
✓ Branch 1 taken 8 times.
✓ Branch 2 taken 8 times.
✓ Branch 3 taken 4 times.
✓ Branch 4 taken 8 times.
✓ Branch 5 taken 12 times.
|
32 | if (!blowThroughFan && _fan) { |
| 810 |
1/1✓ Branch 1 taken 8 times.
|
8 | inletNodeName = baseName + " Fan - Supplemental Coil Node"; |
| 811 |
2/2✓ Branch 0 taken 6 times.
✓ Branch 1 taken 6 times.
|
12 | } else if (_heatingCoil) { |
| 812 |
1/1✓ Branch 1 taken 6 times.
|
6 | inletNodeName = baseName + " Heating Coil - Supplemental Coil Node"; |
| 813 |
2/2✓ Branch 0 taken 3 times.
✓ Branch 1 taken 3 times.
|
6 | } else if (_coolingCoil) { |
| 814 |
1/1✓ Branch 1 taken 3 times.
|
3 | inletNodeName = baseName + " Cooling Coil - Supplemental Coil Node"; |
| 815 |
2/2✓ Branch 0 taken 1 time.
✓ Branch 1 taken 2 times.
|
3 | } else if (_fan) { |
| 816 |
1/1✓ Branch 1 taken 1 time.
|
1 | inletNodeName = baseName + " Fan - Supplemental Coil Node"; |
| 817 | } else { | ||
| 818 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | inletNodeName = airInletNodeName.get(); |
| 819 | } | ||
| 820 | |||
| 821 |
6/6✓ Branch 1 taken 20 times.
✓ Branch 4 taken 20 times.
✓ Branch 7 taken 20 times.
✓ Branch 10 taken 20 times.
✓ Branch 14 taken 2 times.
✓ Branch 15 taken 18 times.
|
20 | if (_supplementalHeatingCoil->iddObject().type() == IddObjectType::Coil_Heating_Electric) { |
| 822 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | _supplementalHeatingCoil->setString(Coil_Heating_ElectricFields::AirInletNodeName, inletNodeName); |
| 823 |
3/3✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
|
2 | _supplementalHeatingCoil->setString(Coil_Heating_ElectricFields::AirOutletNodeName, airOutletNodeName.get()); |
| 824 |
6/6✓ Branch 1 taken 18 times.
✓ Branch 4 taken 18 times.
✓ Branch 7 taken 18 times.
✓ Branch 10 taken 18 times.
✓ Branch 14 taken 2 times.
✓ Branch 15 taken 16 times.
|
18 | } else if (_supplementalHeatingCoil->iddObject().type() == IddObjectType::Coil_Heating_Electric_MultiStage) { |
| 825 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | _supplementalHeatingCoil->setString(Coil_Heating_Electric_MultiStageFields::AirInletNodeName, inletNodeName); |
| 826 |
3/3✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
|
2 | _supplementalHeatingCoil->setString(Coil_Heating_Electric_MultiStageFields::AirOutletNodeName, airOutletNodeName.get()); |
| 827 |
5/6✓ Branch 1 taken 16 times.
✓ Branch 4 taken 16 times.
✓ Branch 7 taken 16 times.
✓ Branch 10 taken 16 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 16 times.
|
16 | } else if (_supplementalHeatingCoil->iddObject().type() == IddObjectType::Coil_Heating_Fuel) { |
| 828 | ✗ | _supplementalHeatingCoil->setString(Coil_Heating_FuelFields::AirInletNodeName, inletNodeName); | |
| 829 | ✗ | _supplementalHeatingCoil->setString(Coil_Heating_FuelFields::AirOutletNodeName, airOutletNodeName.get()); | |
| 830 |
5/6✓ Branch 1 taken 16 times.
✓ Branch 4 taken 16 times.
✓ Branch 7 taken 16 times.
✓ Branch 10 taken 16 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 16 times.
|
16 | } else if (_supplementalHeatingCoil->iddObject().type() == IddObjectType::Coil_Heating_Water) { |
| 831 | ✗ | _supplementalHeatingCoil->setString(Coil_Heating_WaterFields::AirInletNodeName, inletNodeName); | |
| 832 | ✗ | _supplementalHeatingCoil->setString(Coil_Heating_WaterFields::AirOutletNodeName, airOutletNodeName.get()); | |
| 833 |
5/6✓ Branch 1 taken 16 times.
✓ Branch 4 taken 16 times.
✓ Branch 7 taken 16 times.
✓ Branch 10 taken 16 times.
✓ Branch 14 taken 16 times.
✗ Branch 15 not taken.
|
16 | } else if (_supplementalHeatingCoil->iddObject().type() == IddObjectType::Coil_Heating_Desuperheater) { |
| 834 |
2/2✓ Branch 1 taken 16 times.
✓ Branch 4 taken 16 times.
|
16 | _supplementalHeatingCoil->setString(Coil_Heating_DesuperheaterFields::AirInletNodeName, inletNodeName); |
| 835 |
3/3✓ Branch 1 taken 16 times.
✓ Branch 4 taken 16 times.
✓ Branch 7 taken 16 times.
|
16 | _supplementalHeatingCoil->setString(Coil_Heating_DesuperheaterFields::AirOutletNodeName, airOutletNodeName.get()); |
| 836 | } else { | ||
| 837 | ✗ | LOG(Warn, modelObject.briefDescription() << ": Contains an unsupported type " << _supplementalHeatingCoil->iddObject().type() << "."); | |
| 838 | } | ||
| 839 | 20 | } | |
| 840 | |||
| 841 |
1/1✓ Branch 1 taken 73 times.
|
73 | return unitarySystem; |
| 842 | 73 | } | |
| 843 | |||
| 844 | } // namespace energyplus | ||
| 845 | |||
| 846 | } // namespace openstudio | ||
| 847 |