src/energyplus/ForwardTranslator/ForwardTranslateAirConditionerVariableRefrigerantFlowFluidTemperatureControl.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 | |||
| 9 | #include "../../model/AirConditionerVariableRefrigerantFlowFluidTemperatureControl.hpp" | ||
| 10 | #include "../../model/AirConditionerVariableRefrigerantFlowFluidTemperatureControl_Impl.hpp" | ||
| 11 | #include "../../model/LoadingIndex.hpp" | ||
| 12 | #include "../../model/LoadingIndex_Impl.hpp" | ||
| 13 | |||
| 14 | #include "../../model/Schedule.hpp" | ||
| 15 | #include "../../model/Schedule_Impl.hpp" | ||
| 16 | #include "../../model/Node.hpp" | ||
| 17 | #include "../../model/Node_Impl.hpp" | ||
| 18 | #include "../../model/PlantLoop.hpp" | ||
| 19 | #include "../../model/PlantLoop_Impl.hpp" | ||
| 20 | #include "../../model/ThermalZone.hpp" | ||
| 21 | #include "../../model/ThermalZone_Impl.hpp" | ||
| 22 | #include "../../model/ZoneHVACTerminalUnitVariableRefrigerantFlow.hpp" | ||
| 23 | #include "../../model/ZoneHVACTerminalUnitVariableRefrigerantFlow_Impl.hpp" | ||
| 24 | #include "../../model/Curve.hpp" | ||
| 25 | #include "../../model/Curve_Impl.hpp" | ||
| 26 | |||
| 27 | #include "../../utilities/core/Logger.hpp" | ||
| 28 | #include "../../utilities/core/Assert.hpp" | ||
| 29 | #include "../../utilities/idd/IddEnums.hpp" | ||
| 30 | #include "../../utilities/idf/IdfExtensibleGroup.hpp" | ||
| 31 | |||
| 32 | #include <utilities/idd/AirConditioner_VariableRefrigerantFlow_FluidTemperatureControl_FieldEnums.hxx> | ||
| 33 | #include <utilities/idd/ZoneTerminalUnitList_FieldEnums.hxx> | ||
| 34 | #include <utilities/idd/IddEnums.hxx> | ||
| 35 | #include <utilities/idd/FluidProperties_Name_FieldEnums.hxx> | ||
| 36 | |||
| 37 | using namespace openstudio::model; | ||
| 38 | |||
| 39 | namespace openstudio { | ||
| 40 | |||
| 41 | namespace energyplus { | ||
| 42 | |||
| 43 | 3 | boost::optional<IdfObject> ForwardTranslator::translateAirConditionerVariableRefrigerantFlowFluidTemperatureControl( | |
| 44 | model::AirConditionerVariableRefrigerantFlowFluidTemperatureControl& modelObject) { | ||
| 45 | |||
| 46 | // Terminals | ||
| 47 |
1/1✓ Branch 1 taken 3 times.
|
3 | std::vector<ZoneHVACTerminalUnitVariableRefrigerantFlow> terminals = modelObject.terminals(); |
| 48 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 2 taken 2 times.
|
3 | if (terminals.empty()) { |
| 49 |
7/7✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 14 taken 1 time.
✓ Branch 17 taken 1 time.
✓ Branch 20 taken 1 time.
|
1 | LOG(Warn, modelObject.briefDescription() << " will not be translated as it has no terminals."); |
| 50 | 1 | return boost::none; | |
| 51 | } | ||
| 52 | |||
| 53 | // Name | ||
| 54 | IdfObject idfObject = | ||
| 55 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | createRegisterAndNameIdfObject(openstudio::IddObjectType::AirConditioner_VariableRefrigerantFlow_FluidTemperatureControl, modelObject); |
| 56 | |||
| 57 | // Availability Schedule Name: Optional Object, required in Model | ||
| 58 | { | ||
| 59 |
1/1✓ Branch 1 taken 2 times.
|
2 | auto sch = modelObject.availabilitySchedule(); |
| 60 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
4 | if (boost::optional<IdfObject> owo_ = translateAndMapModelObject(sch)) { |
| 61 |
3/3✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
|
2 | idfObject.setString(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::AvailabilityScheduleName, owo_->nameString()); |
| 62 | 2 | } | |
| 63 | 2 | } | |
| 64 | |||
| 65 | // Refrigerant Type: Optional Object | ||
| 66 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | boost::optional<IdfObject> fluidProperties = createFluidProperties(modelObject.refrigerantType()); |
| 67 |
1/2✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
|
2 | if (fluidProperties) { |
| 68 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | boost::optional<std::string> value = fluidProperties.get().getString(FluidProperties_NameFields::FluidName, true); |
| 69 |
1/2✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
|
2 | if (value) { |
| 70 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setString(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::RefrigerantType, value.get()); |
| 71 | } | ||
| 72 | 2 | } | |
| 73 | |||
| 74 |
2/3✓ Branch 1 taken 2 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 2 times.
|
2 | if (modelObject.isRatedEvaporativeCapacityAutosized()) { |
| 75 | ✗ | idfObject.setString(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::RatedEvaporativeCapacity, "Autosize"); | |
| 76 | } else { | ||
| 77 | // Rated Evaporative Capacity: boost::optional<double> | ||
| 78 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
4 | if (boost::optional<double> _ratedEvaporativeCapacity = modelObject.ratedEvaporativeCapacity()) { |
| 79 | 2 | idfObject.setDouble(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::RatedEvaporativeCapacity, | |
| 80 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | _ratedEvaporativeCapacity.get()); |
| 81 | } | ||
| 82 | } | ||
| 83 | |||
| 84 | // Rated Compressor Power Per Unit of Rated Evaporative Capacity: Optional Double | ||
| 85 |
1/1✓ Branch 1 taken 2 times.
|
2 | double ratedCompressorPowerPerUnitofRatedEvaporativeCapacity = modelObject.ratedCompressorPowerPerUnitofRatedEvaporativeCapacity(); |
| 86 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::RatedCompressorPowerPerUnitofRatedEvaporativeCapacity, |
| 87 | ratedCompressorPowerPerUnitofRatedEvaporativeCapacity); | ||
| 88 | |||
| 89 | // Minimum Outdoor Air Temperature in Cooling Mode: Optional Double | ||
| 90 |
1/1✓ Branch 1 taken 2 times.
|
2 | double minimumOutdoorAirTemperatureinCoolingMode = modelObject.minimumOutdoorAirTemperatureinCoolingMode(); |
| 91 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::MinimumOutdoorAirTemperatureinCoolingMode, |
| 92 | minimumOutdoorAirTemperatureinCoolingMode); | ||
| 93 | |||
| 94 | // Maximum Outdoor Air Temperature in Cooling Mode: Optional Double | ||
| 95 |
1/1✓ Branch 1 taken 2 times.
|
2 | double maximumOutdoorAirTemperatureinCoolingMode = modelObject.maximumOutdoorAirTemperatureinCoolingMode(); |
| 96 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::MaximumOutdoorAirTemperatureinCoolingMode, |
| 97 | maximumOutdoorAirTemperatureinCoolingMode); | ||
| 98 | |||
| 99 | // Minimum Outdoor Air Temperature in Heating Mode: Optional Double | ||
| 100 |
1/1✓ Branch 1 taken 2 times.
|
2 | double minimumOutdoorAirTemperatureinHeatingMode = modelObject.minimumOutdoorAirTemperatureinHeatingMode(); |
| 101 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::MinimumOutdoorAirTemperatureinHeatingMode, |
| 102 | minimumOutdoorAirTemperatureinHeatingMode); | ||
| 103 | |||
| 104 | // Maximum Outdoor Air Temperature in Heating Mode: Optional Double | ||
| 105 |
1/1✓ Branch 1 taken 2 times.
|
2 | double maximumOutdoorAirTemperatureinHeatingMode = modelObject.maximumOutdoorAirTemperatureinHeatingMode(); |
| 106 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::MaximumOutdoorAirTemperatureinHeatingMode, |
| 107 | maximumOutdoorAirTemperatureinHeatingMode); | ||
| 108 | |||
| 109 | // Reference Outdoor Unit Superheating: Optional Double | ||
| 110 |
1/1✓ Branch 1 taken 2 times.
|
2 | double referenceOutdoorUnitSuperheating = modelObject.referenceOutdoorUnitSuperheating(); |
| 111 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::ReferenceOutdoorUnitSuperheating, |
| 112 | referenceOutdoorUnitSuperheating); | ||
| 113 | |||
| 114 | // Reference Outdoor Unit Subcooling: Optional Double | ||
| 115 |
1/1✓ Branch 1 taken 2 times.
|
2 | double referenceOutdoorUnitSubcooling = modelObject.referenceOutdoorUnitSubcooling(); |
| 116 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::ReferenceOutdoorUnitSubcooling, |
| 117 | referenceOutdoorUnitSubcooling); | ||
| 118 | |||
| 119 | // Refrigerant Temperature Control Algorithm for Indoor Unit: Optional String | ||
| 120 |
1/1✓ Branch 1 taken 2 times.
|
2 | std::string refrigerantTemperatureControlAlgorithmforIndoorUnit = modelObject.refrigerantTemperatureControlAlgorithmforIndoorUnit(); |
| 121 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setString(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::RefrigerantTemperatureControlAlgorithmforIndoorUnit, |
| 122 | refrigerantTemperatureControlAlgorithmforIndoorUnit); | ||
| 123 | |||
| 124 | // Reference Evaporating Temperature for Indoor Unit: Optional Double | ||
| 125 |
1/1✓ Branch 1 taken 2 times.
|
2 | double referenceEvaporatingTemperatureforIndoorUnit = modelObject.referenceEvaporatingTemperatureforIndoorUnit(); |
| 126 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::ReferenceEvaporatingTemperatureforIndoorUnit, |
| 127 | referenceEvaporatingTemperatureforIndoorUnit); | ||
| 128 | |||
| 129 | // Reference Condensing Temperature for Indoor Unit: Optional Double | ||
| 130 |
1/1✓ Branch 1 taken 2 times.
|
2 | double referenceCondensingTemperatureforIndoorUnit = modelObject.referenceCondensingTemperatureforIndoorUnit(); |
| 131 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::ReferenceCondensingTemperatureforIndoorUnit, |
| 132 | referenceCondensingTemperatureforIndoorUnit); | ||
| 133 | |||
| 134 | // Variable Evaporating Temperature Minimum for Indoor Unit: Optional Double | ||
| 135 |
1/1✓ Branch 1 taken 2 times.
|
2 | double variableEvaporatingTemperatureMinimumforIndoorUnit = modelObject.variableEvaporatingTemperatureMinimumforIndoorUnit(); |
| 136 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::VariableEvaporatingTemperatureMinimumforIndoorUnit, |
| 137 | variableEvaporatingTemperatureMinimumforIndoorUnit); | ||
| 138 | |||
| 139 | // Variable Evaporating Temperature Maximum for Indoor Unit: Optional Double | ||
| 140 |
1/1✓ Branch 1 taken 2 times.
|
2 | double variableEvaporatingTemperatureMaximumforIndoorUnit = modelObject.variableEvaporatingTemperatureMaximumforIndoorUnit(); |
| 141 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::VariableEvaporatingTemperatureMaximumforIndoorUnit, |
| 142 | variableEvaporatingTemperatureMaximumforIndoorUnit); | ||
| 143 | |||
| 144 | // Variable Condensing Temperature Minimum for Indoor Unit: Optional Double | ||
| 145 |
1/1✓ Branch 1 taken 2 times.
|
2 | double variableCondensingTemperatureMinimumforIndoorUnit = modelObject.variableCondensingTemperatureMinimumforIndoorUnit(); |
| 146 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::VariableCondensingTemperatureMinimumforIndoorUnit, |
| 147 | variableCondensingTemperatureMinimumforIndoorUnit); | ||
| 148 | |||
| 149 | // Variable Condensing Temperature Maximum for Indoor Unit: Optional Double | ||
| 150 |
1/1✓ Branch 1 taken 2 times.
|
2 | double variableCondensingTemperatureMaximumforIndoorUnit = modelObject.variableCondensingTemperatureMaximumforIndoorUnit(); |
| 151 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::VariableCondensingTemperatureMaximumforIndoorUnit, |
| 152 | variableCondensingTemperatureMaximumforIndoorUnit); | ||
| 153 | |||
| 154 | // Outdoor Unit Fan Power Per Unit of Rated Evaporative Capacity: Optional Double | ||
| 155 |
1/1✓ Branch 1 taken 2 times.
|
2 | double outdoorUnitFanPowerPerUnitofRatedEvaporativeCapacity = modelObject.outdoorUnitFanPowerPerUnitofRatedEvaporativeCapacity(); |
| 156 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::OutdoorUnitFanPowerPerUnitofRatedEvaporativeCapacity, |
| 157 | outdoorUnitFanPowerPerUnitofRatedEvaporativeCapacity); | ||
| 158 | |||
| 159 | // Outdoor Unit Fan Flow Rate Per Unit of Rated Evaporative Capacity: Optional Double | ||
| 160 |
1/1✓ Branch 1 taken 2 times.
|
2 | double outdoorUnitFanFlowRatePerUnitofRatedEvaporativeCapacity = modelObject.outdoorUnitFanFlowRatePerUnitofRatedEvaporativeCapacity(); |
| 161 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::OutdoorUnitFanFlowRatePerUnitofRatedEvaporativeCapacity, |
| 162 | outdoorUnitFanFlowRatePerUnitofRatedEvaporativeCapacity); | ||
| 163 | |||
| 164 | // Outdoor Unit Evaporating Temperature Function of Superheating Curve Name: Required Object | ||
| 165 |
1/1✓ Branch 1 taken 2 times.
|
2 | Curve outdoorUnitEvaporatingTemperatureFunctionofSuperheatingCurve = modelObject.outdoorUnitEvaporatingTemperatureFunctionofSuperheatingCurve(); |
| 166 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
4 | if (boost::optional<IdfObject> owo_ = translateAndMapModelObject(outdoorUnitEvaporatingTemperatureFunctionofSuperheatingCurve)) { |
| 167 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setString( |
| 168 | AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::OutdoorUnitEvaporatingTemperatureFunctionofSuperheatingCurveName, | ||
| 169 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
4 | owo_->nameString()); |
| 170 | 2 | } | |
| 171 | |||
| 172 | // Outdoor Unit Condensing Temperature Function of Subcooling Curve Name: Required Object | ||
| 173 |
1/1✓ Branch 1 taken 2 times.
|
2 | Curve outdoorUnitCondensingTemperatureFunctionofSubcoolingCurve = modelObject.outdoorUnitCondensingTemperatureFunctionofSubcoolingCurve(); |
| 174 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
4 | if (boost::optional<IdfObject> owo_ = translateAndMapModelObject(outdoorUnitCondensingTemperatureFunctionofSubcoolingCurve)) { |
| 175 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setString( |
| 176 | AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::OutdoorUnitCondensingTemperatureFunctionofSubcoolingCurveName, | ||
| 177 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
4 | owo_->nameString()); |
| 178 | 2 | } | |
| 179 | |||
| 180 | // Diameter of Main Pipe Connecting Outdoor Unit to the First Branch Joint: Optional Double | ||
| 181 |
1/1✓ Branch 1 taken 2 times.
|
2 | double diameterofMainPipeConnectingOutdoorUnittotheFirstBranchJoint = modelObject.diameterofMainPipeConnectingOutdoorUnittotheFirstBranchJoint(); |
| 182 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble( |
| 183 | AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::DiameterofMainPipeConnectingOutdoorUnittotheFirstBranchJoint, | ||
| 184 | diameterofMainPipeConnectingOutdoorUnittotheFirstBranchJoint); | ||
| 185 | |||
| 186 | // Length of Main Pipe Connecting Outdoor Unit to the First Branch Joint: Optional Double | ||
| 187 |
1/1✓ Branch 1 taken 2 times.
|
2 | double lengthofMainPipeConnectingOutdoorUnittotheFirstBranchJoint = modelObject.lengthofMainPipeConnectingOutdoorUnittotheFirstBranchJoint(); |
| 188 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble( |
| 189 | AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::LengthofMainPipeConnectingOutdoorUnittotheFirstBranchJoint, | ||
| 190 | lengthofMainPipeConnectingOutdoorUnittotheFirstBranchJoint); | ||
| 191 | |||
| 192 | // Equivalent Length of Main Pipe Connecting Outdoor Unit to the First Branch Joint: Optional Double | ||
| 193 | double equivalentLengthofMainPipeConnectingOutdoorUnittotheFirstBranchJoint = | ||
| 194 |
1/1✓ Branch 1 taken 2 times.
|
2 | modelObject.equivalentLengthofMainPipeConnectingOutdoorUnittotheFirstBranchJoint(); |
| 195 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble( |
| 196 | AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::EquivalentLengthofMainPipeConnectingOutdoorUnittotheFirstBranchJoint, | ||
| 197 | equivalentLengthofMainPipeConnectingOutdoorUnittotheFirstBranchJoint); | ||
| 198 | |||
| 199 | // Height Difference Between Outdoor Unit and Indoor Units: Optional Double | ||
| 200 |
1/1✓ Branch 1 taken 2 times.
|
2 | double heightDifferenceBetweenOutdoorUnitandIndoorUnits = modelObject.heightDifferenceBetweenOutdoorUnitandIndoorUnits(); |
| 201 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::HeightDifferenceBetweenOutdoorUnitandIndoorUnits, |
| 202 | heightDifferenceBetweenOutdoorUnitandIndoorUnits); | ||
| 203 | |||
| 204 | // Main Pipe Insulation Thickness: Optional Double | ||
| 205 |
1/1✓ Branch 1 taken 2 times.
|
2 | double mainPipeInsulationThickness = modelObject.mainPipeInsulationThickness(); |
| 206 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::MainPipeInsulationThickness, |
| 207 | mainPipeInsulationThickness); | ||
| 208 | |||
| 209 | // Main Pipe Insulation Thermal Conductivity: Optional Double | ||
| 210 |
1/1✓ Branch 1 taken 2 times.
|
2 | double mainPipeInsulationThermalConductivity = modelObject.mainPipeInsulationThermalConductivity(); |
| 211 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::MainPipeInsulationThermalConductivity, |
| 212 | mainPipeInsulationThermalConductivity); | ||
| 213 | |||
| 214 | // Crankcase Heater Power per Compressor: Optional Double | ||
| 215 |
1/1✓ Branch 1 taken 2 times.
|
2 | double crankcaseHeaterPowerperCompressor = modelObject.crankcaseHeaterPowerperCompressor(); |
| 216 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::CrankcaseHeaterPowerperCompressor, |
| 217 | crankcaseHeaterPowerperCompressor); | ||
| 218 | |||
| 219 | // Number of Compressors: Optional Integer | ||
| 220 |
1/1✓ Branch 1 taken 2 times.
|
2 | int numberofCompressors = modelObject.numberofCompressors(); |
| 221 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setInt(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::NumberofCompressors, numberofCompressors); |
| 222 | |||
| 223 | // Ratio of Compressor Size to Total Compressor Capacity: Optional Double | ||
| 224 |
1/1✓ Branch 1 taken 2 times.
|
2 | double ratioofCompressorSizetoTotalCompressorCapacity = modelObject.ratioofCompressorSizetoTotalCompressorCapacity(); |
| 225 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::RatioofCompressorSizetoTotalCompressorCapacity, |
| 226 | ratioofCompressorSizetoTotalCompressorCapacity); | ||
| 227 | |||
| 228 | // Maximum Outdoor Dry-Bulb Temperature for Crankcase Heater: Optional Double | ||
| 229 |
1/1✓ Branch 1 taken 2 times.
|
2 | double maximumOutdoorDryBulbTemperatureforCrankcaseHeater = modelObject.maximumOutdoorDryBulbTemperatureforCrankcaseHeater(); |
| 230 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::MaximumOutdoorDryBulbTemperatureforCrankcaseHeater, |
| 231 | maximumOutdoorDryBulbTemperatureforCrankcaseHeater); | ||
| 232 | |||
| 233 | // Defrost Strategy: Optional String | ||
| 234 |
1/1✓ Branch 1 taken 2 times.
|
2 | std::string defrostStrategy = modelObject.defrostStrategy(); |
| 235 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setString(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::DefrostStrategy, defrostStrategy); |
| 236 | |||
| 237 | // Defrost Control: Optional String | ||
| 238 |
1/1✓ Branch 1 taken 2 times.
|
2 | std::string defrostControl = modelObject.defrostControl(); |
| 239 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setString(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::DefrostControl, defrostControl); |
| 240 | |||
| 241 | // Defrost Energy Input Ratio Modifier Function of Temperature Curve Name: Optional Object | ||
| 242 | 2 | if (boost::optional<Curve> _defrostEnergyInputRatioModifierFunctionofTemperatureCurve = | |
| 243 |
3/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 1 time.
|
4 | modelObject.defrostEnergyInputRatioModifierFunctionofTemperatureCurve()) { |
| 244 |
3/4✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 6 taken 1 time.
✗ Branch 7 not taken.
|
2 | if (boost::optional<IdfObject> owo_ = translateAndMapModelObject(_defrostEnergyInputRatioModifierFunctionofTemperatureCurve.get())) { |
| 245 |
1/1✓ Branch 1 taken 1 time.
|
1 | idfObject.setString( |
| 246 | AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::DefrostEnergyInputRatioModifierFunctionofTemperatureCurveName, | ||
| 247 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | owo_->nameString()); |
| 248 | 1 | } | |
| 249 | 2 | } | |
| 250 | |||
| 251 | // Defrost Time Period Fraction: Optional Double | ||
| 252 |
1/1✓ Branch 1 taken 2 times.
|
2 | double defrostTimePeriodFraction = modelObject.defrostTimePeriodFraction(); |
| 253 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::DefrostTimePeriodFraction, defrostTimePeriodFraction); |
| 254 | |||
| 255 |
2/3✓ Branch 1 taken 2 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 2 times.
|
2 | if (modelObject.isResistiveDefrostHeaterCapacityAutosized()) { |
| 256 | ✗ | idfObject.setString(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::ResistiveDefrostHeaterCapacity, "Autosize"); | |
| 257 | } else { | ||
| 258 | // Resistive Defrost Heater Capacity: boost::optional<double> | ||
| 259 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
4 | if (boost::optional<double> _resistiveDefrostHeaterCapacity = modelObject.resistiveDefrostHeaterCapacity()) { |
| 260 | 2 | idfObject.setDouble(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::ResistiveDefrostHeaterCapacity, | |
| 261 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | _resistiveDefrostHeaterCapacity.get()); |
| 262 | } | ||
| 263 | } | ||
| 264 | |||
| 265 | // Maximum Outdoor Dry-bulb Temperature for Defrost Operation: Optional Double | ||
| 266 |
1/1✓ Branch 1 taken 2 times.
|
2 | double maximumOutdoorDrybulbTemperatureforDefrostOperation = modelObject.maximumOutdoorDrybulbTemperatureforDefrostOperation(); |
| 267 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::MaximumOutdoorDrybulbTemperatureforDefrostOperation, |
| 268 | maximumOutdoorDrybulbTemperatureforDefrostOperation); | ||
| 269 | |||
| 270 | // Compressor Maximum Delta Pressure: Optional Double | ||
| 271 |
1/1✓ Branch 1 taken 2 times.
|
2 | double compressorMaximumDeltaPressure = modelObject.compressorMaximumDeltaPressure(); |
| 272 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::CompressormaximumdeltaPressure, |
| 273 | compressorMaximumDeltaPressure); | ||
| 274 | |||
| 275 | // Number of Compressor Loading Index Entries: Optional Integer | ||
| 276 |
1/1✓ Branch 1 taken 2 times.
|
2 | std::vector<LoadingIndex> loadingIndexes = modelObject.loadingIndexes(); |
| 277 |
1/2✓ Branch 1 taken 2 times.
✗ Branch 2 not taken.
|
2 | if (auto num = loadingIndexes.size()) { |
| 278 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setInt(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::NumberofCompressorLoadingIndexEntries, num); |
| 279 | } | ||
| 280 | |||
| 281 | // Zone Terminal Unit List Name | ||
| 282 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | IdfObject _zoneTerminalUnitList(IddObjectType::ZoneTerminalUnitList); |
| 283 | |||
| 284 |
3/3✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
|
2 | std::string terminalUnitListName = modelObject.name().get() + " Terminal List"; |
| 285 | |||
| 286 |
1/1✓ Branch 1 taken 2 times.
|
2 | _zoneTerminalUnitList.setString(ZoneTerminalUnitListFields::ZoneTerminalUnitListName, terminalUnitListName); |
| 287 | |||
| 288 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setString(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlFields::ZoneTerminalUnitListName, terminalUnitListName); |
| 289 | |||
| 290 |
1/1✓ Branch 1 taken 2 times.
|
2 | m_idfObjects.push_back(_zoneTerminalUnitList); |
| 291 | |||
| 292 |
2/2✓ Branch 5 taken 2 times.
✓ Branch 6 taken 2 times.
|
4 | for (auto& terminal : terminals) { |
| 293 |
1/1✓ Branch 1 taken 2 times.
|
2 | boost::optional<IdfObject> terminal_ = translateAndMapModelObject(terminal); |
| 294 | |||
| 295 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
✗ Branch 4 not taken.
|
2 | OS_ASSERT(terminal_); |
| 296 | |||
| 297 |
1/1✓ Branch 1 taken 2 times.
|
2 | IdfExtensibleGroup eg = _zoneTerminalUnitList.pushExtensibleGroup(); |
| 298 | |||
| 299 |
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(ZoneTerminalUnitListExtensibleFields::ZoneTerminalUnitName, terminal_->name().get()); |
| 300 | 2 | } | |
| 301 | |||
| 302 | // Loading Index Extensible Groups | ||
| 303 |
2/2✓ Branch 5 taken 6 times.
✓ Branch 6 taken 2 times.
|
8 | for (auto& loadingIndex : loadingIndexes) { |
| 304 |
1/1✓ Branch 1 taken 6 times.
|
6 | auto eg = idfObject.pushExtensibleGroup(); |
| 305 | |||
| 306 | // Compressor Speed at Loading Index | ||
| 307 |
2/2✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
|
6 | eg.setDouble(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlExtensibleFields::CompressorSpeedatLoadingIndex, |
| 308 | loadingIndex.compressorSpeed()); | ||
| 309 | |||
| 310 | // Loading Index Evaporative Capacity Multiplier Function of Temperature Curve Name | ||
| 311 | { | ||
| 312 |
1/1✓ Branch 1 taken 6 times.
|
6 | auto curve = loadingIndex.evaporativeCapacityMultiplierFunctionofTemperatureCurve(); |
| 313 |
2/3✓ Branch 1 taken 6 times.
✓ Branch 3 taken 6 times.
✗ Branch 4 not taken.
|
12 | if (auto curve_ = translateAndMapModelObject(curve)) { |
| 314 | 6 | eg.setString(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlExtensibleFields:: | |
| 315 | LoadingIndexEvaporativeCapacityMultiplierFunctionofTemperatureCurveName, | ||
| 316 |
4/4✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
✓ Branch 7 taken 6 times.
✓ Branch 10 taken 6 times.
|
6 | curve_->name().get()); |
| 317 | 6 | } | |
| 318 | 6 | } | |
| 319 | |||
| 320 | // Loading Index Compressor Power Multiplier Function of Temperature Curve Name | ||
| 321 | { | ||
| 322 |
1/1✓ Branch 1 taken 6 times.
|
6 | auto curve = loadingIndex.compressorPowerMultiplierFunctionofTemperatureCurve(); |
| 323 |
2/3✓ Branch 1 taken 6 times.
✓ Branch 3 taken 6 times.
✗ Branch 4 not taken.
|
12 | if (auto curve_ = translateAndMapModelObject(curve)) { |
| 324 | 6 | eg.setString(AirConditioner_VariableRefrigerantFlow_FluidTemperatureControlExtensibleFields:: | |
| 325 | LoadingIndexCompressorPowerMultiplierFunctionofTemperatureCurveName, | ||
| 326 |
4/4✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
✓ Branch 7 taken 6 times.
✓ Branch 10 taken 6 times.
|
6 | curve_->name().get()); |
| 327 | 6 | } | |
| 328 | 6 | } | |
| 329 | 6 | } | |
| 330 | |||
| 331 |
1/1✓ Branch 1 taken 2 times.
|
2 | return idfObject; |
| 332 | 3 | } // End of translate function | |
| 333 | |||
| 334 | } // end namespace energyplus | ||
| 335 | } // end namespace openstudio | ||
| 336 |