src/energyplus/ForwardTranslator/ForwardTranslateZoneHVACLowTempRadiantVarFlow.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/Schedule.hpp" | ||
| 9 | #include "../../model/Schedule_Impl.hpp" | ||
| 10 | #include "../../model/ModelObject.hpp" | ||
| 11 | #include "../../model/ModelObject_Impl.hpp" | ||
| 12 | #include "../../model/Node.hpp" | ||
| 13 | #include "../../model/Node_Impl.hpp" | ||
| 14 | #include "../../model/ThermalZone.hpp" | ||
| 15 | #include "../../model/ThermalZone_Impl.hpp" | ||
| 16 | #include "../../model/Surface.hpp" | ||
| 17 | #include "../../model/Surface_Impl.hpp" | ||
| 18 | #include "../../model/Space.hpp" | ||
| 19 | #include "../../model/Space_Impl.hpp" | ||
| 20 | #include "../../model/ConstructionWithInternalSource.hpp" | ||
| 21 | #include "../../model/ConstructionWithInternalSource_Impl.hpp" | ||
| 22 | #include "../../model/Construction.hpp" | ||
| 23 | #include "../../model/Construction_Impl.hpp" | ||
| 24 | #include "../../model/ZoneHVACLowTempRadiantVarFlow.hpp" | ||
| 25 | #include "../../model/ZoneHVACLowTempRadiantVarFlow_Impl.hpp" | ||
| 26 | #include "../../model/ZoneHVACEquipmentList.hpp" | ||
| 27 | #include "../../model/ZoneHVACEquipmentList_Impl.hpp" | ||
| 28 | #include "../../model/StraightComponent.hpp" | ||
| 29 | #include "../../model/StraightComponent_Impl.hpp" | ||
| 30 | #include "../../model/CoilHeatingLowTempRadiantVarFlow.hpp" | ||
| 31 | #include "../../model/CoilHeatingLowTempRadiantVarFlow_Impl.hpp" | ||
| 32 | #include "../../model/CoilCoolingLowTempRadiantVarFlow.hpp" | ||
| 33 | #include "../../model/CoilCoolingLowTempRadiantVarFlow_Impl.hpp" | ||
| 34 | #include "../../model/ZoneHVACComponent.hpp" | ||
| 35 | #include "../../model/ZoneHVACComponent_Impl.hpp" | ||
| 36 | |||
| 37 | #include "../../utilities/core/Assert.hpp" | ||
| 38 | #include "../../utilities/idf/IdfExtensibleGroup.hpp" | ||
| 39 | |||
| 40 | #include <utilities/idd/ZoneHVAC_LowTemperatureRadiant_VariableFlow_FieldEnums.hxx> | ||
| 41 | #include <utilities/idd/ZoneHVAC_LowTemperatureRadiant_VariableFlow_Design_FieldEnums.hxx> | ||
| 42 | #include "../../utilities/idd/IddEnums.hpp" | ||
| 43 | #include <utilities/idd/IddEnums.hxx> | ||
| 44 | #include <utilities/idd/IddFactory.hxx> | ||
| 45 | |||
| 46 | using namespace openstudio::model; | ||
| 47 | |||
| 48 | namespace openstudio { | ||
| 49 | |||
| 50 | namespace energyplus { | ||
| 51 | |||
| 52 | 15 | boost::optional<IdfObject> ForwardTranslator::translateZoneHVACLowTempRadiantVarFlow(ZoneHVACLowTempRadiantVarFlow& modelObject) { | |
| 53 | 15 | boost::optional<std::string> s; | |
| 54 | 15 | boost::optional<double> value; | |
| 55 | 15 | boost::optional<ModelObject> temp; | |
| 56 | |||
| 57 | // If it doesn't have any surfaces, then don't bother translating it, E+ will crash | ||
| 58 |
3/3✓ Branch 1 taken 15 times.
✓ Branch 5 taken 8 times.
✓ Branch 6 taken 7 times.
|
15 | if (modelObject.surfaces().empty()) { |
| 59 |
7/7✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
✓ Branch 7 taken 8 times.
✓ Branch 10 taken 8 times.
✓ Branch 14 taken 8 times.
✓ Branch 17 taken 8 times.
✓ Branch 20 taken 8 times.
|
8 | LOG(Info, |
| 60 | modelObject.briefDescription() << " does not have any target surfaces with ConstructionWithInternalSource, it will not be translated"); | ||
| 61 | 8 | return boost::none; | |
| 62 | } | ||
| 63 | |||
| 64 |
1/1✓ Branch 1 taken 7 times.
|
7 | boost::optional<HVACComponent> heatingCoil = modelObject.heatingCoil(); |
| 65 |
1/1✓ Branch 1 taken 7 times.
|
7 | boost::optional<HVACComponent> coolingCoil = modelObject.coolingCoil(); |
| 66 |
6/6✓ Branch 1 taken 4 times.
✓ Branch 2 taken 3 times.
✓ Branch 4 taken 2 times.
✓ Branch 5 taken 2 times.
✓ Branch 6 taken 2 times.
✓ Branch 7 taken 5 times.
|
7 | if (!(heatingCoil.has_value() || coolingCoil.has_value())) { |
| 67 |
7/7✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✓ Branch 10 taken 2 times.
✓ Branch 14 taken 2 times.
✓ Branch 17 taken 2 times.
✓ Branch 20 taken 2 times.
|
2 | LOG(Info, modelObject.briefDescription() << " does not have either a Heating nor a Cooling Coil, it will not be translated"); |
| 68 | 2 | return boost::none; | |
| 69 | } | ||
| 70 | |||
| 71 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | IdfObject idfObject(IddObjectType::ZoneHVAC_LowTemperatureRadiant_VariableFlow); |
| 72 |
1/1✓ Branch 1 taken 5 times.
|
5 | m_idfObjects.push_back(idfObject); |
| 73 | |||
| 74 | //Name | ||
| 75 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
|
5 | std::string baseName = modelObject.name().get(); |
| 76 |
1/1✓ Branch 1 taken 5 times.
|
5 | idfObject.setName(baseName); |
| 77 | |||
| 78 | // Design Object | ||
| 79 | // E+ 9.5.0: This object got broken into two: a zonehvac object, and a design object | ||
| 80 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | IdfObject designObject(openstudio::IddObjectType::ZoneHVAC_LowTemperatureRadiant_VariableFlow_Design); |
| 81 |
1/1✓ Branch 1 taken 5 times.
|
5 | m_idfObjects.push_back(designObject); |
| 82 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | designObject.setName(baseName + " Design"); |
| 83 | |||
| 84 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | idfObject.setString(ZoneHVAC_LowTemperatureRadiant_VariableFlowFields::DesignObject, designObject.nameString()); |
| 85 | |||
| 86 | // AvailabilityScheduleName | ||
| 87 |
3/4✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 8 taken 5 times.
✗ Branch 9 not taken.
|
10 | if (boost::optional<Schedule> schedule = modelObject.availabilitySchedule()) { |
| 88 |
3/4✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 6 taken 5 times.
✗ Branch 7 not taken.
|
10 | if (boost::optional<IdfObject> _schedule = translateAndMapModelObject(schedule.get())) { |
| 89 |
4/4✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
✓ Branch 10 taken 5 times.
|
5 | idfObject.setString(ZoneHVAC_LowTemperatureRadiant_VariableFlowFields::AvailabilityScheduleName, _schedule->name().get()); |
| 90 | 5 | } | |
| 91 | 5 | } | |
| 92 | |||
| 93 | //field Zone Name | ||
| 94 | 5 | boost::optional<std::string> thermalZoneName; | |
| 95 |
2/3✓ Branch 1 taken 5 times.
✓ Branch 3 taken 5 times.
✗ Branch 4 not taken.
|
10 | if (boost::optional<ThermalZone> zone = modelObject.thermalZone()) { |
| 96 |
3/4✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 8 taken 5 times.
✗ Branch 9 not taken.
|
10 | if ((s = zone->name())) { |
| 97 |
1/1✓ Branch 1 taken 5 times.
|
5 | thermalZoneName = s; |
| 98 | |||
| 99 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | idfObject.setString(ZoneHVAC_LowTemperatureRadiant_VariableFlowFields::ZoneName, thermalZoneName.get()); |
| 100 | } | ||
| 101 | 5 | } | |
| 102 | |||
| 103 | //field Surface Name or Radiant Surface Type | ||
| 104 | |||
| 105 | //create a new surface group object | ||
| 106 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | IdfObject _surfaceGroup(IddObjectType::ZoneHVAC_LowTemperatureRadiant_SurfaceGroup); |
| 107 | |||
| 108 | //create a name for the surface group | ||
| 109 |
4/4✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
✓ Branch 10 taken 5 times.
|
5 | std::string sname = baseName + "" + modelObject.radiantSurfaceType().get(); |
| 110 |
1/1✓ Branch 1 taken 5 times.
|
5 | _surfaceGroup.setName(sname); |
| 111 | |||
| 112 | //attach the surface group to the zone low temp radiant object | ||
| 113 |
1/1✓ Branch 1 taken 5 times.
|
5 | idfObject.setString(ZoneHVAC_LowTemperatureRadiant_VariableFlowFields::SurfaceNameorRadiantSurfaceGroupName, sname); |
| 114 | |||
| 115 | //get rid of any existing surface (just to be safe) | ||
| 116 |
1/1✓ Branch 1 taken 5 times.
|
5 | idfObject.clearExtensibleGroups(); |
| 117 | |||
| 118 | //aggregator for total area; will be used to create weighted area | ||
| 119 | 5 | double totalAreaOfSurfaces = 0; | |
| 120 | |||
| 121 | //loop through all surfaces, adding up their area | ||
| 122 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 7 taken 8 times.
✓ Branch 8 taken 5 times.
|
13 | for (const Surface& surface : modelObject.surfaces()) { |
| 123 |
1/1✓ Branch 1 taken 8 times.
|
8 | totalAreaOfSurfaces = totalAreaOfSurfaces + surface.grossArea(); |
| 124 | 5 | } | |
| 125 | |||
| 126 | //loop through all the surfaces, adding them and their flow fractions (weighted per-area) | ||
| 127 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 8 taken 8 times.
✓ Branch 9 taken 5 times.
|
13 | for (const Surface& surface : modelObject.surfaces()) { |
| 128 |
1/1✓ Branch 1 taken 8 times.
|
8 | IdfExtensibleGroup group = _surfaceGroup.pushExtensibleGroup(); |
| 129 |
2/4✓ Branch 1 taken 8 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 8 times.
✗ Branch 6 not taken.
|
8 | OS_ASSERT(group.numFields() == 2); |
| 130 |
3/3✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
✓ Branch 7 taken 8 times.
|
8 | group.setString(0, surface.name().get()); |
| 131 |
2/2✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
|
8 | group.setDouble(1, (surface.grossArea() / totalAreaOfSurfaces)); |
| 132 | 13 | } | |
| 133 | |||
| 134 | //add the surface group to the list of idf objects | ||
| 135 |
1/1✓ Branch 1 taken 5 times.
|
5 | m_idfObjects.push_back(_surfaceGroup); |
| 136 | |||
| 137 | //field Hydronic Tubing Length | ||
| 138 |
2/3✓ Branch 1 taken 5 times.
✓ Branch 3 taken 5 times.
✗ Branch 4 not taken.
|
5 | if (modelObject.isHydronicTubingLengthAutosized()) { |
| 139 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
10 | idfObject.setString(ZoneHVAC_LowTemperatureRadiant_VariableFlowFields::HydronicTubingLength, "Autosize"); |
| 140 | ✗ | } else if ((value = modelObject.hydronicTubingLength())) { | |
| 141 | ✗ | idfObject.setDouble(ZoneHVAC_LowTemperatureRadiant_VariableFlowFields::HydronicTubingLength, value.get()); | |
| 142 | } | ||
| 143 | |||
| 144 | // Heating Coil | ||
| 145 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 2 taken 2 times.
|
5 | if (heatingCoil.has_value()) { |
| 146 |
3/4✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 6 taken 3 times.
✗ Branch 7 not taken.
|
6 | if (auto coilOptionalHeating = heatingCoil->optionalCast<CoilHeatingLowTempRadiantVarFlow>()) { |
| 147 | |||
| 148 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | CoilHeatingLowTempRadiantVarFlow coilHeat = *coilOptionalHeating; |
| 149 | |||
| 150 | // Heating Design Capacity | ||
| 151 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 1 time.
|
3 | if (coilHeat.isHeatingDesignCapacityAutosized()) { |
| 152 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
4 | idfObject.setString(ZoneHVAC_LowTemperatureRadiant_VariableFlowFields::HeatingDesignCapacity, "Autosize"); |
| 153 |
2/3✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
|
2 | } else if ((value = coilHeat.heatingDesignCapacity())) { |
| 154 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(ZoneHVAC_LowTemperatureRadiant_VariableFlowFields::HeatingDesignCapacity, value.get()); |
| 155 | } | ||
| 156 | |||
| 157 | // field Maximum Hot Water Flow | ||
| 158 |
2/3✓ Branch 1 taken 3 times.
✓ Branch 3 taken 3 times.
✗ Branch 4 not taken.
|
3 | if (coilHeat.isMaximumHotWaterFlowAutosized()) { |
| 159 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
6 | idfObject.setString(ZoneHVAC_LowTemperatureRadiant_VariableFlowFields::MaximumHotWaterFlow, "Autosize"); |
| 160 | ✗ | } else if ((value = coilHeat.maximumHotWaterFlow())) { | |
| 161 | ✗ | idfObject.setDouble(ZoneHVAC_LowTemperatureRadiant_VariableFlowFields::MaximumHotWaterFlow, value.get()); | |
| 162 | } | ||
| 163 | |||
| 164 | // field Heating Water Inlet Node Name | ||
| 165 |
1/1✓ Branch 1 taken 3 times.
|
3 | temp = coilHeat.inletModelObject(); |
| 166 |
2/2✓ Branch 0 taken 2 times.
✓ Branch 1 taken 1 time.
|
3 | if (temp) { |
| 167 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | s = temp->name(); |
| 168 |
1/2✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
|
2 | if (s) { |
| 169 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setString(openstudio::ZoneHVAC_LowTemperatureRadiant_VariableFlowFields::HeatingWaterInletNodeName, *s); |
| 170 | } | ||
| 171 | } | ||
| 172 | |||
| 173 | //field Heating Water Outlet Node Name | ||
| 174 |
1/1✓ Branch 1 taken 3 times.
|
3 | temp = coilHeat.outletModelObject(); |
| 175 |
2/2✓ Branch 0 taken 2 times.
✓ Branch 1 taken 1 time.
|
3 | if (temp) { |
| 176 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | s = temp->name(); |
| 177 |
1/2✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
|
2 | if (s) { |
| 178 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setString(openstudio::ZoneHVAC_LowTemperatureRadiant_VariableFlowFields::HeatingWaterOutletNodeName, *s); |
| 179 | } | ||
| 180 | } | ||
| 181 | |||
| 182 | // All these fields are now on the Design object | ||
| 183 | |||
| 184 | // Heating Design Capacity Method | ||
| 185 |
1/1✓ Branch 1 taken 3 times.
|
3 | designObject.setString(ZoneHVAC_LowTemperatureRadiant_VariableFlow_DesignFields::HeatingDesignCapacityMethod, |
| 186 |
1/1✓ Branch 1 taken 3 times.
|
6 | coilHeat.heatingDesignCapacityMethod()); |
| 187 | |||
| 188 | // Heating Design Capacity Per Floor Area | ||
| 189 |
3/4✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✗ Branch 8 not taken.
|
6 | if ((value = coilHeat.heatingDesignCapacityPerFloorArea())) { |
| 190 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | designObject.setDouble(ZoneHVAC_LowTemperatureRadiant_VariableFlow_DesignFields::HeatingDesignCapacityPerFloorArea, value.get()); |
| 191 | } | ||
| 192 | |||
| 193 | // Fraction of Autosized Heating Design Capacity | ||
| 194 |
3/4✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✗ Branch 8 not taken.
|
6 | if ((value = coilHeat.fractionofAutosizedHeatingDesignCapacity())) { |
| 195 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | designObject.setDouble(ZoneHVAC_LowTemperatureRadiant_VariableFlow_DesignFields::FractionofAutosizedHeatingDesignCapacity, value.get()); |
| 196 | } | ||
| 197 | |||
| 198 | //field Heating Control Throttling Range | ||
| 199 |
3/4✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✗ Branch 8 not taken.
|
6 | if ((value = coilHeat.heatingControlThrottlingRange())) { |
| 200 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | designObject.setDouble(ZoneHVAC_LowTemperatureRadiant_VariableFlow_DesignFields::HeatingControlThrottlingRange, value.get()); |
| 201 | } | ||
| 202 | |||
| 203 | //field Heating Control Temperature Schedule Name | ||
| 204 |
2/3✓ Branch 1 taken 3 times.
✓ Branch 3 taken 3 times.
✗ Branch 4 not taken.
|
6 | if (boost::optional<Schedule> schedule = coilHeat.heatingControlTemperatureSchedule()) { |
| 205 |
3/4✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 6 taken 3 times.
✗ Branch 7 not taken.
|
6 | if (boost::optional<IdfObject> _schedule = translateAndMapModelObject(schedule.get())) { |
| 206 | 3 | designObject.setString(ZoneHVAC_LowTemperatureRadiant_VariableFlow_DesignFields::HeatingControlTemperatureScheduleName, | |
| 207 |
4/4✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✓ Branch 10 taken 3 times.
|
3 | _schedule->name().get()); |
| 208 | 3 | } | |
| 209 | 3 | } | |
| 210 | 6 | } | |
| 211 | } | ||
| 212 | |||
| 213 | // Cooling Coil | ||
| 214 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 2 taken 2 times.
|
5 | if (coolingCoil.has_value()) { |
| 215 |
3/4✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 6 taken 3 times.
✗ Branch 7 not taken.
|
6 | if (auto coilOptionalCooling = coolingCoil->optionalCast<CoilCoolingLowTempRadiantVarFlow>()) { |
| 216 | |||
| 217 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | CoilCoolingLowTempRadiantVarFlow coilCool = *coilOptionalCooling; |
| 218 | |||
| 219 | // Cooling Design Capacity | ||
| 220 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 1 time.
|
3 | if (coilCool.isCoolingDesignCapacityAutosized()) { |
| 221 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
4 | idfObject.setString(ZoneHVAC_LowTemperatureRadiant_VariableFlowFields::CoolingDesignCapacity, "Autosize"); |
| 222 |
2/3✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
|
2 | } else if ((value = coilCool.coolingDesignCapacity())) { |
| 223 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(ZoneHVAC_LowTemperatureRadiant_VariableFlowFields::CoolingDesignCapacity, value.get()); |
| 224 | } | ||
| 225 | |||
| 226 | // Field Maximum Cold Water Flow | ||
| 227 |
2/3✓ Branch 1 taken 3 times.
✓ Branch 3 taken 3 times.
✗ Branch 4 not taken.
|
3 | if (coilCool.isMaximumColdWaterFlowAutosized()) { |
| 228 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
6 | idfObject.setString(ZoneHVAC_LowTemperatureRadiant_VariableFlowFields::MaximumColdWaterFlow, "Autosize"); |
| 229 | ✗ | } else if ((value = coilCool.maximumColdWaterFlow())) { | |
| 230 | ✗ | idfObject.setDouble(ZoneHVAC_LowTemperatureRadiant_VariableFlowFields::MaximumColdWaterFlow, value.get()); | |
| 231 | } | ||
| 232 | |||
| 233 | // field Cooling Water Inlet Node Name | ||
| 234 |
1/1✓ Branch 1 taken 3 times.
|
3 | temp = coilCool.inletModelObject(); |
| 235 |
2/2✓ Branch 0 taken 2 times.
✓ Branch 1 taken 1 time.
|
3 | if (temp) { |
| 236 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | s = temp->name(); |
| 237 |
1/2✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
|
2 | if (s) { |
| 238 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setString(openstudio::ZoneHVAC_LowTemperatureRadiant_VariableFlowFields::CoolingWaterInletNodeName, *s); |
| 239 | } | ||
| 240 | } | ||
| 241 | |||
| 242 | //field Cooling Water Outlet Node Name | ||
| 243 |
1/1✓ Branch 1 taken 3 times.
|
3 | temp = coilCool.outletModelObject(); |
| 244 |
2/2✓ Branch 0 taken 2 times.
✓ Branch 1 taken 1 time.
|
3 | if (temp) { |
| 245 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | s = temp->name(); |
| 246 |
1/2✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
|
2 | if (s) { |
| 247 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setString(openstudio::ZoneHVAC_LowTemperatureRadiant_VariableFlowFields::CoolingWaterOutletNodeName, *s); |
| 248 | } | ||
| 249 | } | ||
| 250 | |||
| 251 | // All these fields are now on the Design object | ||
| 252 | |||
| 253 | // Cooling Design Capacity Method | ||
| 254 |
1/1✓ Branch 1 taken 3 times.
|
3 | designObject.setString(ZoneHVAC_LowTemperatureRadiant_VariableFlow_DesignFields::CoolingDesignCapacityMethod, |
| 255 |
1/1✓ Branch 1 taken 3 times.
|
6 | coilCool.coolingDesignCapacityMethod()); |
| 256 | |||
| 257 | //field Cooling Control Throttling Range | ||
| 258 | |||
| 259 |
3/4✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✗ Branch 8 not taken.
|
6 | if ((value = coilCool.coolingControlThrottlingRange())) { |
| 260 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | designObject.setDouble(ZoneHVAC_LowTemperatureRadiant_VariableFlow_DesignFields::CoolingControlThrottlingRange, value.get()); |
| 261 | } | ||
| 262 | |||
| 263 | // Cooling Design Capacity Per Floor Area | ||
| 264 |
3/4✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✗ Branch 8 not taken.
|
6 | if ((value = coilCool.coolingDesignCapacityPerFloorArea())) { |
| 265 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | designObject.setDouble(ZoneHVAC_LowTemperatureRadiant_VariableFlow_DesignFields::CoolingDesignCapacityPerFloorArea, value.get()); |
| 266 | } | ||
| 267 | |||
| 268 | // Fraction of Autosized Cooling Design Capacity | ||
| 269 |
3/4✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✗ Branch 8 not taken.
|
6 | if ((value = coilCool.fractionofAutosizedCoolingDesignCapacity())) { |
| 270 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | designObject.setDouble(ZoneHVAC_LowTemperatureRadiant_VariableFlow_DesignFields::FractionofAutosizedCoolingDesignCapacity, value.get()); |
| 271 | } | ||
| 272 | |||
| 273 | //field Cooling Control Temperature Schedule Name | ||
| 274 |
2/3✓ Branch 1 taken 3 times.
✓ Branch 3 taken 3 times.
✗ Branch 4 not taken.
|
6 | if (boost::optional<Schedule> schedule = coilCool.coolingControlTemperatureSchedule()) { |
| 275 |
3/4✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 6 taken 3 times.
✗ Branch 7 not taken.
|
6 | if (boost::optional<IdfObject> _schedule = translateAndMapModelObject(schedule.get())) { |
| 276 | 3 | designObject.setString(ZoneHVAC_LowTemperatureRadiant_VariableFlow_DesignFields::CoolingControlTemperatureScheduleName, | |
| 277 |
4/4✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✓ Branch 10 taken 3 times.
|
3 | _schedule->name().get()); |
| 278 | 3 | } | |
| 279 | 3 | } | |
| 280 | |||
| 281 | //field Condensation Control Type | ||
| 282 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | designObject.setString(ZoneHVAC_LowTemperatureRadiant_VariableFlow_DesignFields::CondensationControlType, coilCool.condensationControlType()); |
| 283 | |||
| 284 | //field Condensation Control Dewpoint Offset | ||
| 285 |
3/4✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✗ Branch 8 not taken.
|
6 | if ((value = coilCool.condensationControlDewpointOffset())) { |
| 286 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | designObject.setDouble(ZoneHVAC_LowTemperatureRadiant_VariableFlow_DesignFields::CondensationControlDewpointOffset, value.get()); |
| 287 | } | ||
| 288 | 6 | } | |
| 289 | } | ||
| 290 | |||
| 291 | //field Number of Circuits | ||
| 292 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | idfObject.setString(ZoneHVAC_LowTemperatureRadiant_VariableFlowFields::NumberofCircuits, modelObject.numberofCircuits()); |
| 293 | |||
| 294 | //field Circuit Length | ||
| 295 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | idfObject.setDouble(ZoneHVAC_LowTemperatureRadiant_VariableFlowFields::CircuitLength, modelObject.circuitLength()); |
| 296 | |||
| 297 | // All these fields are now on the Design object | ||
| 298 | |||
| 299 | //field Hydronic Tubing Conductivity | ||
| 300 |
3/4✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
✗ Branch 8 not taken.
|
10 | if ((value = modelObject.hydronicTubingConductivity())) { |
| 301 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | designObject.setDouble(ZoneHVAC_LowTemperatureRadiant_VariableFlow_DesignFields::HydronicTubingConductivity, value.get()); |
| 302 | } | ||
| 303 | |||
| 304 | //field Temperature Control Type | ||
| 305 |
3/4✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 8 taken 5 times.
✗ Branch 9 not taken.
|
10 | if (boost::optional<std::string> tempCtrlType = modelObject.temperatureControlType()) { |
| 306 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | designObject.setString(ZoneHVAC_LowTemperatureRadiant_VariableFlow_DesignFields::TemperatureControlType, tempCtrlType.get()); |
| 307 | 5 | } | |
| 308 | |||
| 309 | //field Setpoint Control Type | ||
| 310 |
3/4✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 8 taken 5 times.
✗ Branch 9 not taken.
|
10 | if (boost::optional<std::string> setpCtrlType = modelObject.setpointControlType()) { |
| 311 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | designObject.setString(ZoneHVAC_LowTemperatureRadiant_VariableFlow_DesignFields::SetpointControlType, setpCtrlType.get()); |
| 312 | 5 | } | |
| 313 | |||
| 314 | //field Fluid to Radiant Surface Heat Transfer Model | ||
| 315 |
3/4✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 8 taken 5 times.
✗ Branch 9 not taken.
|
10 | if (boost::optional<std::string> modelType = modelObject.fluidtoRadiantSurfaceHeatTransferModel()) { |
| 316 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | designObject.setString(ZoneHVAC_LowTemperatureRadiant_VariableFlow_DesignFields::FluidtoRadiantSurfaceHeatTransferModel, modelType.get()); |
| 317 | 5 | } | |
| 318 | |||
| 319 | //field Hydronic Tubing Inside Diameter | ||
| 320 |
3/4✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
✗ Branch 8 not taken.
|
10 | if ((value = modelObject.hydronicTubingInsideDiameter())) { |
| 321 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | designObject.setDouble(ZoneHVAC_LowTemperatureRadiant_VariableFlow_DesignFields::HydronicTubingInsideDiameter, value.get()); |
| 322 | } | ||
| 323 | |||
| 324 | //field Hydronic Tubing Outside Diameter | ||
| 325 |
3/4✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
✗ Branch 8 not taken.
|
10 | if ((value = modelObject.hydronicTubingOutsideDiameter())) { |
| 326 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | designObject.setDouble(ZoneHVAC_LowTemperatureRadiant_VariableFlow_DesignFields::HydronicTubingOutsideDiameter, value.get()); |
| 327 | } | ||
| 328 | |||
| 329 | //field Changeover Delay Time Period Schedule | ||
| 330 |
2/3✓ Branch 1 taken 5 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 5 times.
|
10 | if (auto _changeoverDelayTimePeriodSchedule = modelObject.changeoverDelayTimePeriodSchedule()) { |
| 331 | ✗ | if (auto _sch = translateAndMapModelObject(_changeoverDelayTimePeriodSchedule.get())) { | |
| 332 | ✗ | designObject.setString(ZoneHVAC_LowTemperatureRadiant_VariableFlow_DesignFields::ChangeoverDelayTimePeriodSchedule, _sch->nameString()); | |
| 333 | ✗ | } | |
| 334 | 5 | } | |
| 335 | |||
| 336 |
1/1✓ Branch 1 taken 5 times.
|
5 | return idfObject; |
| 337 | 15 | } | |
| 338 | |||
| 339 | } // namespace energyplus | ||
| 340 | |||
| 341 | } // namespace openstudio | ||
| 342 |