src/energyplus/ForwardTranslator/ForwardTranslateAirflowNetwork.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 | |||
| 8 | #include "../../model/AirflowNetworkSimulationControl.hpp" | ||
| 9 | #include "../../model/AirflowNetworkSimulationControl_Impl.hpp" | ||
| 10 | #include "../../model/AirflowNetworkZone.hpp" | ||
| 11 | #include "../../model/AirflowNetworkZone_Impl.hpp" | ||
| 12 | #include "../../model/AirflowNetworkSurface.hpp" | ||
| 13 | #include "../../model/AirflowNetworkSurface_Impl.hpp" | ||
| 14 | #include "../../model/AirflowNetworkExternalNode.hpp" | ||
| 15 | #include "../../model/AirflowNetworkExternalNode_Impl.hpp" | ||
| 16 | #include "../../model/AirflowNetworkComponent.hpp" | ||
| 17 | #include "../../model/AirflowNetworkReferenceCrackConditions.hpp" | ||
| 18 | #include "../../model/AirflowNetworkReferenceCrackConditions_Impl.hpp" | ||
| 19 | #include "../../model/AirflowNetworkCrack.hpp" | ||
| 20 | #include "../../model/AirflowNetworkCrack_Impl.hpp" | ||
| 21 | #include "../../model/AirflowNetworkEffectiveLeakageArea.hpp" | ||
| 22 | #include "../../model/AirflowNetworkEffectiveLeakageArea_Impl.hpp" | ||
| 23 | #include "../../model/AirflowNetworkSpecifiedFlowRate.hpp" | ||
| 24 | #include "../../model/AirflowNetworkSpecifiedFlowRate_Impl.hpp" | ||
| 25 | #include "../../model/AirflowNetworkDetailedOpening.hpp" | ||
| 26 | #include "../../model/AirflowNetworkDetailedOpening_Impl.hpp" | ||
| 27 | #include "../../model/AirflowNetworkSimpleOpening.hpp" | ||
| 28 | #include "../../model/AirflowNetworkSimpleOpening_Impl.hpp" | ||
| 29 | #include "../../model/AirflowNetworkHorizontalOpening.hpp" | ||
| 30 | #include "../../model/AirflowNetworkHorizontalOpening_Impl.hpp" | ||
| 31 | #include "../../model/AirflowNetworkZoneExhaustFan.hpp" | ||
| 32 | #include "../../model/AirflowNetworkZoneExhaustFan_Impl.hpp" | ||
| 33 | #include "../../model/AirflowNetworkDistributionNode.hpp" | ||
| 34 | #include "../../model/AirflowNetworkDistributionNode_Impl.hpp" | ||
| 35 | #include "../../model/AirflowNetworkLeakageRatio.hpp" | ||
| 36 | #include "../../model/AirflowNetworkLeakageRatio_Impl.hpp" | ||
| 37 | #include "../../model/AirflowNetworkDuct.hpp" | ||
| 38 | #include "../../model/AirflowNetworkDuct_Impl.hpp" | ||
| 39 | #include "../../model/AirflowNetworkFan.hpp" | ||
| 40 | #include "../../model/AirflowNetworkFan_Impl.hpp" | ||
| 41 | #include "../../model/AirflowNetworkEquivalentDuct.hpp" | ||
| 42 | #include "../../model/AirflowNetworkEquivalentDuct_Impl.hpp" | ||
| 43 | #include "../../model/AirflowNetworkConstantPressureDrop.hpp" | ||
| 44 | #include "../../model/AirflowNetworkConstantPressureDrop_Impl.hpp" | ||
| 45 | #include "../../model/AirflowNetworkOutdoorAirflow.hpp" | ||
| 46 | #include "../../model/AirflowNetworkOutdoorAirflow_Impl.hpp" | ||
| 47 | #include "../../model/AirflowNetworkDistributionLinkage.hpp" | ||
| 48 | #include "../../model/AirflowNetworkDistributionLinkage_Impl.hpp" | ||
| 49 | #include "../../model/AirflowNetworkDuctViewFactors.hpp" | ||
| 50 | #include "../../model/AirflowNetworkDuctViewFactors_Impl.hpp" | ||
| 51 | #include "../../model/AirflowNetworkOccupantVentilationControl.hpp" | ||
| 52 | #include "../../model/AirflowNetworkOccupantVentilationControl_Impl.hpp" | ||
| 53 | |||
| 54 | #include "../../model/Schedule.hpp" | ||
| 55 | #include "../../model/ThermalZone.hpp" | ||
| 56 | #include "../../model/PlanarSurface.hpp" | ||
| 57 | #include "../../model/Curve.hpp" | ||
| 58 | #include "../../model/StraightComponent.hpp" | ||
| 59 | #include "../../model/FanConstantVolume.hpp" | ||
| 60 | #include "../../model/FanVariableVolume.hpp" | ||
| 61 | #include "../../model/FanOnOff.hpp" | ||
| 62 | #include "../../model/FanSystemModel.hpp" | ||
| 63 | #include "../../model/Node.hpp" | ||
| 64 | #include "../../model/AirLoopHVACZoneMixer.hpp" | ||
| 65 | #include "../../model/AirLoopHVACZoneSplitter.hpp" | ||
| 66 | #include "../../model/AirLoopHVACOutdoorAirSystem.hpp" | ||
| 67 | |||
| 68 | #include "../../utilities/core/Assert.hpp" | ||
| 69 | #include "../../utilities/idf/IdfExtensibleGroup.hpp" | ||
| 70 | |||
| 71 | #include <utilities/idd/AirflowNetwork_SimulationControl_FieldEnums.hxx> | ||
| 72 | #include <utilities/idd/AirflowNetwork_MultiZone_Zone_FieldEnums.hxx> | ||
| 73 | #include <utilities/idd/AirflowNetwork_MultiZone_Surface_FieldEnums.hxx> | ||
| 74 | #include <utilities/idd/AirflowNetwork_MultiZone_ReferenceCrackConditions_FieldEnums.hxx> | ||
| 75 | #include <utilities/idd/AirflowNetwork_MultiZone_Surface_Crack_FieldEnums.hxx> | ||
| 76 | #include <utilities/idd/AirflowNetwork_MultiZone_Surface_EffectiveLeakageArea_FieldEnums.hxx> | ||
| 77 | #include <utilities/idd/AirflowNetwork_MultiZone_SpecifiedFlowRate_FieldEnums.hxx> | ||
| 78 | #include <utilities/idd/AirflowNetwork_MultiZone_Component_DetailedOpening_FieldEnums.hxx> | ||
| 79 | #include <utilities/idd/AirflowNetwork_MultiZone_Component_SimpleOpening_FieldEnums.hxx> | ||
| 80 | #include <utilities/idd/AirflowNetwork_MultiZone_Component_HorizontalOpening_FieldEnums.hxx> | ||
| 81 | #include <utilities/idd/AirflowNetwork_MultiZone_Component_ZoneExhaustFan_FieldEnums.hxx> | ||
| 82 | #include <utilities/idd/AirflowNetwork_MultiZone_ExternalNode_FieldEnums.hxx> | ||
| 83 | #include <utilities/idd/AirflowNetwork_Distribution_Node_FieldEnums.hxx> | ||
| 84 | #include <utilities/idd/AirflowNetwork_Distribution_Component_LeakageRatio_FieldEnums.hxx> | ||
| 85 | #include <utilities/idd/AirflowNetwork_Distribution_Component_Duct_FieldEnums.hxx> | ||
| 86 | #include <utilities/idd/AirflowNetwork_Distribution_Component_Fan_FieldEnums.hxx> | ||
| 87 | #include <utilities/idd/AirflowNetwork_Distribution_Component_Coil_FieldEnums.hxx> | ||
| 88 | #include <utilities/idd/AirflowNetwork_Distribution_Component_HeatExchanger_FieldEnums.hxx> | ||
| 89 | #include <utilities/idd/AirflowNetwork_Distribution_Component_TerminalUnit_FieldEnums.hxx> | ||
| 90 | #include <utilities/idd/AirflowNetwork_Distribution_Component_ConstantPressureDrop_FieldEnums.hxx> | ||
| 91 | #include <utilities/idd/AirflowNetwork_Distribution_Component_OutdoorAirFlow_FieldEnums.hxx> | ||
| 92 | #include <utilities/idd/AirflowNetwork_Distribution_Linkage_FieldEnums.hxx> | ||
| 93 | #include <utilities/idd/AirflowNetwork_Distribution_DuctViewFactors_FieldEnums.hxx> | ||
| 94 | #include <utilities/idd/AirflowNetwork_OccupantVentilationControl_FieldEnums.hxx> | ||
| 95 | |||
| 96 | #include "../../utilities/idd/IddEnums.hpp" | ||
| 97 | #include <utilities/idd/IddEnums.hxx> | ||
| 98 | #include <utilities/idd/IddFactory.hxx> | ||
| 99 | |||
| 100 | using namespace openstudio::model; | ||
| 101 | |||
| 102 | namespace openstudio { | ||
| 103 | namespace energyplus { | ||
| 104 | |||
| 105 | 7 | boost::optional<IdfObject> ForwardTranslator::translateAirflowNetworkSimulationControl(AirflowNetworkSimulationControl& modelObject) { | |
| 106 |
2/2✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
|
7 | IdfObject idfObject(IddObjectType::AirflowNetwork_SimulationControl); |
| 107 | |||
| 108 |
1/1✓ Branch 1 taken 7 times.
|
7 | m_idfObjects.push_back(idfObject); |
| 109 | |||
| 110 |
2/3✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✗ Branch 5 not taken.
|
14 | if (modelObject.name()) { |
| 111 |
2/3✓ Branch 1 taken 7 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 7 times.
|
7 | if (modelObject.nameString().empty()) { |
| 112 | ✗ | idfObject.setString(AirflowNetwork_SimulationControlFields::Name, modelObject.nameString()); | |
| 113 | } else { | ||
| 114 |
2/2✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
|
14 | idfObject.setString(AirflowNetwork_SimulationControlFields::Name, "AFNSimControl 1"); |
| 115 | } | ||
| 116 | } else { | ||
| 117 | ✗ | idfObject.setString(AirflowNetwork_SimulationControlFields::Name, "AFNSimControl 1"); | |
| 118 | } | ||
| 119 |
2/3✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✗ Branch 5 not taken.
|
14 | if (modelObject.airflowNetworkControl()) { |
| 120 |
3/3✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 7 taken 7 times.
|
7 | idfObject.setString(AirflowNetwork_SimulationControlFields::AirflowNetworkControl, modelObject.airflowNetworkControl().get()); |
| 121 | } | ||
| 122 |
2/3✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✗ Branch 5 not taken.
|
14 | if (modelObject.windPressureCoefficientType()) { |
| 123 |
3/3✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 7 taken 7 times.
|
7 | idfObject.setString(AirflowNetwork_SimulationControlFields::WindPressureCoefficientType, modelObject.windPressureCoefficientType().get()); |
| 124 | } | ||
| 125 |
2/3✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✗ Branch 5 not taken.
|
14 | if (modelObject.heightSelectionforLocalWindPressureCalculation()) { |
| 126 | 7 | idfObject.setString(AirflowNetwork_SimulationControlFields::HeightSelectionforLocalWindPressureCalculation, | |
| 127 |
3/3✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 7 taken 7 times.
|
7 | modelObject.heightSelectionforLocalWindPressureCalculation().get()); |
| 128 | } | ||
| 129 |
2/3✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✗ Branch 5 not taken.
|
14 | if (modelObject.buildingType()) { |
| 130 |
3/3✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 7 taken 7 times.
|
7 | idfObject.setString(AirflowNetwork_SimulationControlFields::BuildingType, modelObject.buildingType().get()); |
| 131 | } | ||
| 132 |
2/3✓ Branch 1 taken 7 times.
✓ Branch 3 taken 7 times.
✗ Branch 4 not taken.
|
14 | if (modelObject.maximumNumberofIterations()) { |
| 133 |
3/3✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 7 taken 7 times.
|
7 | idfObject.setInt(AirflowNetwork_SimulationControlFields::MaximumNumberofIterations, modelObject.maximumNumberofIterations().get()); |
| 134 | } | ||
| 135 |
2/3✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✗ Branch 5 not taken.
|
14 | if (modelObject.initializationType()) { |
| 136 |
3/3✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 7 taken 7 times.
|
7 | idfObject.setString(AirflowNetwork_SimulationControlFields::InitializationType, modelObject.initializationType().get()); |
| 137 | } | ||
| 138 |
2/3✓ Branch 1 taken 7 times.
✓ Branch 3 taken 7 times.
✗ Branch 4 not taken.
|
14 | if (modelObject.relativeAirflowConvergenceTolerance()) { |
| 139 | 7 | idfObject.setDouble(AirflowNetwork_SimulationControlFields::RelativeAirflowConvergenceTolerance, | |
| 140 |
3/3✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 7 taken 7 times.
|
7 | modelObject.relativeAirflowConvergenceTolerance().get()); |
| 141 | } | ||
| 142 |
2/3✓ Branch 1 taken 7 times.
✓ Branch 3 taken 7 times.
✗ Branch 4 not taken.
|
14 | if (modelObject.absoluteAirflowConvergenceTolerance()) { |
| 143 | 7 | idfObject.setDouble(AirflowNetwork_SimulationControlFields::AbsoluteAirflowConvergenceTolerance, | |
| 144 |
3/3✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 7 taken 7 times.
|
7 | modelObject.absoluteAirflowConvergenceTolerance().get()); |
| 145 | } | ||
| 146 |
2/3✓ Branch 1 taken 7 times.
✓ Branch 3 taken 7 times.
✗ Branch 4 not taken.
|
14 | if (modelObject.convergenceAccelerationLimit()) { |
| 147 |
3/3✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 7 taken 7 times.
|
7 | idfObject.setDouble(AirflowNetwork_SimulationControlFields::ConvergenceAccelerationLimit, modelObject.convergenceAccelerationLimit().get()); |
| 148 | } | ||
| 149 |
2/3✓ Branch 1 taken 7 times.
✓ Branch 3 taken 7 times.
✗ Branch 4 not taken.
|
14 | if (modelObject.azimuthAngleofLongAxisofBuilding()) { |
| 150 | 7 | idfObject.setDouble(AirflowNetwork_SimulationControlFields::AzimuthAngleofLongAxisofBuilding, | |
| 151 |
3/3✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 7 taken 7 times.
|
7 | modelObject.azimuthAngleofLongAxisofBuilding().get()); |
| 152 | } | ||
| 153 |
2/3✓ Branch 1 taken 7 times.
✓ Branch 3 taken 7 times.
✗ Branch 4 not taken.
|
14 | if (modelObject.buildingAspectRatio()) { |
| 154 | 7 | idfObject.setDouble(AirflowNetwork_SimulationControlFields::RatioofBuildingWidthAlongShortAxistoWidthAlongLongAxis, | |
| 155 |
3/3✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 7 taken 7 times.
|
7 | modelObject.buildingAspectRatio().get()); |
| 156 | } | ||
| 157 |
2/3✓ Branch 1 taken 7 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 7 times.
|
7 | if (modelObject.heightDependenceofExternalNodeTemperature()) { |
| 158 | ✗ | idfObject.setString(AirflowNetwork_SimulationControlFields::HeightDependenceofExternalNodeTemperature, "Yes"); | |
| 159 | } | ||
| 160 | |||
| 161 |
2/3✓ Branch 1 taken 7 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 7 times.
|
7 | if (!modelObject.isSolverDefaulted()) { |
| 162 | ✗ | idfObject.setString(AirflowNetwork_SimulationControlFields::Solver, modelObject.solver()); | |
| 163 | } | ||
| 164 | |||
| 165 |
2/3✓ Branch 1 taken 7 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 7 times.
|
7 | if (!modelObject.isAllowUnsupportedZoneEquipmentDefaulted()) { |
| 166 | ✗ | if (modelObject.allowUnsupportedZoneEquipment()) { | |
| 167 | ✗ | idfObject.setString(AirflowNetwork_SimulationControlFields::AllowUnsupportedZoneEquipment, "Yes"); | |
| 168 | } else { | ||
| 169 | ✗ | idfObject.setString(AirflowNetwork_SimulationControlFields::AllowUnsupportedZoneEquipment, "No"); | |
| 170 | } | ||
| 171 | } | ||
| 172 | |||
| 173 |
1/1✓ Branch 1 taken 7 times.
|
14 | return idfObject; |
| 174 | 7 | } | |
| 175 | |||
| 176 | ✗ | boost::optional<IdfObject> ForwardTranslator::translateAirflowNetworkZone(AirflowNetworkZone& modelObject) { | |
| 177 | ✗ | IdfObject idfObject(IddObjectType::AirflowNetwork_MultiZone_Zone); | |
| 178 | |||
| 179 | ✗ | m_idfObjects.push_back(idfObject); | |
| 180 | |||
| 181 | ✗ | idfObject.setString(AirflowNetwork_MultiZone_ZoneFields::ZoneName, modelObject.thermalZone().nameString()); | |
| 182 | ✗ | idfObject.setString(AirflowNetwork_MultiZone_ZoneFields::VentilationControlMode, modelObject.ventilationControlMode()); | |
| 183 | ✗ | if (modelObject.ventilationControlZoneTemperatureSetpointSchedule()) { | |
| 184 | ✗ | idfObject.setString(AirflowNetwork_MultiZone_ZoneFields::VentilationControlZoneTemperatureSetpointScheduleName, | |
| 185 | ✗ | modelObject.ventilationControlZoneTemperatureSetpointSchedule()->nameString()); | |
| 186 | } | ||
| 187 | ✗ | idfObject.setDouble(AirflowNetwork_MultiZone_ZoneFields::MinimumVentingOpenFactor, modelObject.minimumVentingOpenFactor()); | |
| 188 | ✗ | idfObject.setDouble(AirflowNetwork_MultiZone_ZoneFields::IndoorandOutdoorTemperatureDifferenceLowerLimitForMaximumVentingOpenFactor, | |
| 189 | modelObject.indoorandOutdoorTemperatureDifferenceLowerLimitForMaximumVentingOpenFactor()); | ||
| 190 | ✗ | idfObject.setDouble(AirflowNetwork_MultiZone_ZoneFields::IndoorandOutdoorTemperatureDifferenceUpperLimitforMinimumVentingOpenFactor, | |
| 191 | modelObject.indoorandOutdoorTemperatureDifferenceUpperLimitforMinimumVentingOpenFactor()); | ||
| 192 | ✗ | idfObject.setDouble(AirflowNetwork_MultiZone_ZoneFields::IndoorandOutdoorEnthalpyDifferenceLowerLimitForMaximumVentingOpenFactor, | |
| 193 | modelObject.indoorandOutdoorEnthalpyDifferenceLowerLimitForMaximumVentingOpenFactor()); | ||
| 194 | ✗ | idfObject.setDouble(AirflowNetwork_MultiZone_ZoneFields::IndoorandOutdoorEnthalpyDifferenceUpperLimitforMinimumVentingOpenFactor, | |
| 195 | modelObject.indoorandOutdoorEnthalpyDifferenceUpperLimitforMinimumVentingOpenFactor()); | ||
| 196 | ✗ | if (modelObject.ventingAvailabilitySchedule()) { | |
| 197 | ✗ | idfObject.setString(AirflowNetwork_MultiZone_ZoneFields::VentingAvailabilityScheduleName, | |
| 198 | ✗ | modelObject.ventingAvailabilitySchedule()->nameString()); | |
| 199 | } | ||
| 200 | ✗ | idfObject.setString(AirflowNetwork_MultiZone_ZoneFields::SingleSidedWindPressureCoefficientAlgorithm, | |
| 201 | ✗ | modelObject.singleSidedWindPressureCoefficientAlgorithm()); | |
| 202 | ✗ | idfObject.setDouble(AirflowNetwork_MultiZone_ZoneFields::FacadeWidth, modelObject.facadeWidth()); | |
| 203 | ✗ | if (modelObject.occupantVentilationControl()) { | |
| 204 | ✗ | idfObject.setString(AirflowNetwork_MultiZone_ZoneFields::OccupantVentilationControlName, | |
| 205 | ✗ | modelObject.occupantVentilationControl()->nameString()); | |
| 206 | } | ||
| 207 | |||
| 208 | ✗ | return idfObject; | |
| 209 | ✗ | } | |
| 210 | |||
| 211 | 5 | boost::optional<IdfObject> ForwardTranslator::translateAirflowNetworkSurface(AirflowNetworkSurface& modelObject) { | |
| 212 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | IdfObject idfObject(IddObjectType::AirflowNetwork_MultiZone_Surface); |
| 213 | |||
| 214 |
1/1✓ Branch 1 taken 5 times.
|
5 | m_idfObjects.push_back(idfObject); |
| 215 | |||
| 216 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
|
5 | idfObject.setString(AirflowNetwork_MultiZone_SurfaceFields::SurfaceName, modelObject.surface().nameString()); |
| 217 |
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(AirflowNetwork_MultiZone_SurfaceFields::LeakageComponentName, modelObject.leakageComponent()->nameString()); |
| 218 |
2/3✓ Branch 1 taken 5 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 5 times.
|
10 | if (modelObject.externalNode()) { |
| 219 | ✗ | idfObject.setString(AirflowNetwork_MultiZone_SurfaceFields::ExternalNodeName, modelObject.externalNode()->nameString()); | |
| 220 | } | ||
| 221 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | idfObject.setDouble(AirflowNetwork_MultiZone_SurfaceFields::Window_DoorOpeningFactororCrackFactor, |
| 222 | modelObject.windowDoorOpeningFactorOrCrackFactor()); | ||
| 223 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | idfObject.setString(AirflowNetwork_MultiZone_SurfaceFields::VentilationControlMode, modelObject.ventilationControlMode()); |
| 224 |
2/3✓ Branch 1 taken 5 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 5 times.
|
10 | if (modelObject.ventilationControlZoneTemperatureSetpointSchedule()) { |
| 225 | ✗ | idfObject.setString(AirflowNetwork_MultiZone_SurfaceFields::VentilationControlZoneTemperatureSetpointScheduleName, | |
| 226 | ✗ | modelObject.ventilationControlZoneTemperatureSetpointSchedule()->nameString()); | |
| 227 | } | ||
| 228 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | idfObject.setDouble(AirflowNetwork_MultiZone_SurfaceFields::MinimumVentingOpenFactor, modelObject.minimumVentingOpenFactor()); |
| 229 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | idfObject.setDouble(AirflowNetwork_MultiZone_SurfaceFields::IndoorandOutdoorTemperatureDifferenceLowerLimitForMaximumVentingOpenFactor, |
| 230 | modelObject.indoorandOutdoorTemperatureDifferenceLowerLimitForMaximumVentingOpenFactor()); | ||
| 231 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | idfObject.setDouble(AirflowNetwork_MultiZone_SurfaceFields::IndoorandOutdoorTemperatureDifferenceUpperLimitforMinimumVentingOpenFactor, |
| 232 | modelObject.indoorandOutdoorTemperatureDifferenceUpperLimitforMinimumVentingOpenFactor()); | ||
| 233 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | idfObject.setDouble(AirflowNetwork_MultiZone_SurfaceFields::IndoorandOutdoorEnthalpyDifferenceLowerLimitForMaximumVentingOpenFactor, |
| 234 | modelObject.indoorandOutdoorEnthalpyDifferenceLowerLimitForMaximumVentingOpenFactor()); | ||
| 235 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | idfObject.setDouble(AirflowNetwork_MultiZone_SurfaceFields::IndoorandOutdoorEnthalpyDifferenceUpperLimitforMinimumVentingOpenFactor, |
| 236 | modelObject.indoorandOutdoorEnthalpyDifferenceUpperLimitforMinimumVentingOpenFactor()); | ||
| 237 |
2/3✓ Branch 1 taken 5 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 5 times.
|
10 | if (modelObject.ventingAvailabilitySchedule()) { |
| 238 | ✗ | idfObject.setString(AirflowNetwork_MultiZone_SurfaceFields::VentingAvailabilityScheduleName, | |
| 239 | ✗ | modelObject.ventingAvailabilitySchedule()->nameString()); | |
| 240 | } | ||
| 241 |
2/3✓ Branch 1 taken 5 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 5 times.
|
10 | if (modelObject.occupantVentilationControl()) { |
| 242 | ✗ | idfObject.setString(AirflowNetwork_MultiZone_SurfaceFields::OccupantVentilationControlName, | |
| 243 | ✗ | modelObject.occupantVentilationControl()->nameString()); | |
| 244 | } | ||
| 245 | //if (modelObject.equivalentRectangleMethod()) { | ||
| 246 | // idfObject.setString(AirflowNetwork_MultiZone_SurfaceFields::EquivalentRectangleMethod, modelObject.equivalentRectangleMethod().get()); | ||
| 247 | //} | ||
| 248 | //if (modelObject.equivalentRectangleAspectRatio()) { | ||
| 249 | // idfObject.setDouble(AirflowNetwork_MultiZone_SurfaceFields::EquivalentRectangleAspectRatio, modelObject.equivalentRectangleAspectRatio().get()); | ||
| 250 | //} | ||
| 251 | |||
| 252 |
1/1✓ Branch 1 taken 5 times.
|
10 | return idfObject; |
| 253 | 5 | } | |
| 254 | |||
| 255 | ✗ | boost::optional<IdfObject> ForwardTranslator::translateAirflowNetworkReferenceCrackConditions(AirflowNetworkReferenceCrackConditions& modelObject) { | |
| 256 | ✗ | IdfObject idfObject(IddObjectType::AirflowNetwork_MultiZone_ReferenceCrackConditions); | |
| 257 | |||
| 258 | ✗ | m_idfObjects.push_back(idfObject); | |
| 259 | |||
| 260 | ✗ | idfObject.setString(AirflowNetwork_MultiZone_ReferenceCrackConditionsFields::Name, modelObject.nameString()); | |
| 261 | ✗ | idfObject.setDouble(AirflowNetwork_MultiZone_ReferenceCrackConditionsFields::ReferenceTemperature, modelObject.temperature()); | |
| 262 | ✗ | idfObject.setDouble(AirflowNetwork_MultiZone_ReferenceCrackConditionsFields::ReferenceBarometricPressure, modelObject.barometricPressure()); | |
| 263 | ✗ | idfObject.setDouble(AirflowNetwork_MultiZone_ReferenceCrackConditionsFields::ReferenceHumidityRatio, modelObject.humidityRatio()); | |
| 264 | |||
| 265 | ✗ | return idfObject; | |
| 266 | ✗ | } | |
| 267 | |||
| 268 | ✗ | boost::optional<IdfObject> ForwardTranslator::translateAirflowNetworkCrack(AirflowNetworkCrack& modelObject) { | |
| 269 | ✗ | IdfObject idfObject(IddObjectType::AirflowNetwork_MultiZone_Surface_Crack); | |
| 270 | |||
| 271 | ✗ | m_idfObjects.push_back(idfObject); | |
| 272 | |||
| 273 | ✗ | idfObject.setString(AirflowNetwork_MultiZone_Surface_CrackFields::Name, modelObject.nameString()); | |
| 274 | ✗ | idfObject.setDouble(AirflowNetwork_MultiZone_Surface_CrackFields::AirMassFlowCoefficientatReferenceConditions, | |
| 275 | modelObject.airMassFlowCoefficient()); | ||
| 276 | ✗ | idfObject.setDouble(AirflowNetwork_MultiZone_Surface_CrackFields::AirMassFlowExponent, modelObject.airMassFlowExponent()); | |
| 277 | ✗ | if (modelObject.referenceCrackConditions()) { | |
| 278 | ✗ | idfObject.setString(AirflowNetwork_MultiZone_Surface_CrackFields::ReferenceCrackConditions, | |
| 279 | ✗ | modelObject.referenceCrackConditions()->nameString()); | |
| 280 | } | ||
| 281 | |||
| 282 | ✗ | return idfObject; | |
| 283 | ✗ | } | |
| 284 | |||
| 285 | 1 | boost::optional<IdfObject> ForwardTranslator::translateAirflowNetworkEffectiveLeakageArea(AirflowNetworkEffectiveLeakageArea& modelObject) { | |
| 286 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | IdfObject idfObject(IddObjectType::AirflowNetwork_MultiZone_Surface_EffectiveLeakageArea); |
| 287 | |||
| 288 |
1/1✓ Branch 1 taken 1 time.
|
1 | m_idfObjects.push_back(idfObject); |
| 289 | |||
| 290 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setString(AirflowNetwork_MultiZone_Surface_EffectiveLeakageAreaFields::Name, modelObject.nameString()); |
| 291 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(AirflowNetwork_MultiZone_Surface_EffectiveLeakageAreaFields::EffectiveLeakageArea, modelObject.effectiveLeakageArea()); |
| 292 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(AirflowNetwork_MultiZone_Surface_EffectiveLeakageAreaFields::DischargeCoefficient, modelObject.dischargeCoefficient()); |
| 293 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(AirflowNetwork_MultiZone_Surface_EffectiveLeakageAreaFields::ReferencePressureDifference, |
| 294 | modelObject.referencePressureDifference()); | ||
| 295 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(AirflowNetwork_MultiZone_Surface_EffectiveLeakageAreaFields::AirMassFlowExponent, modelObject.airMassFlowExponent()); |
| 296 | |||
| 297 |
1/1✓ Branch 1 taken 1 time.
|
2 | return idfObject; |
| 298 | 1 | } | |
| 299 | |||
| 300 | 1 | boost::optional<IdfObject> ForwardTranslator::translateAirflowNetworkDetailedOpening(AirflowNetworkDetailedOpening& modelObject) { | |
| 301 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | IdfObject idfObject(IddObjectType::AirflowNetwork_MultiZone_Component_DetailedOpening); |
| 302 | |||
| 303 |
1/1✓ Branch 1 taken 1 time.
|
1 | m_idfObjects.push_back(idfObject); |
| 304 | |||
| 305 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setString(AirflowNetwork_MultiZone_Component_DetailedOpeningFields::Name, modelObject.nameString()); |
| 306 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(AirflowNetwork_MultiZone_Component_DetailedOpeningFields::AirMassFlowCoefficientWhenOpeningisClosed, |
| 307 | modelObject.airMassFlowCoefficientWhenOpeningisClosed()); | ||
| 308 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(AirflowNetwork_MultiZone_Component_DetailedOpeningFields::AirMassFlowExponentWhenOpeningisClosed, |
| 309 | modelObject.airMassFlowExponentWhenOpeningisClosed()); | ||
| 310 |
1/1✓ Branch 1 taken 1 time.
|
1 | idfObject.setString(AirflowNetwork_MultiZone_Component_DetailedOpeningFields::TypeofRectangularLargeVerticalOpening_LVO_, |
| 311 |
1/1✓ Branch 1 taken 1 time.
|
2 | modelObject.typeofRectangularLargeVerticalOpening()); |
| 312 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(AirflowNetwork_MultiZone_Component_DetailedOpeningFields::ExtraCrackLengthorHeightofPivotingAxis, |
| 313 | modelObject.extraCrackLengthorHeightofPivotingAxis()); | ||
| 314 |
1/1✓ Branch 1 taken 1 time.
|
1 | auto factors = modelObject.openingFactors(); |
| 315 | |||
| 316 |
1/1✓ Branch 2 taken 1 time.
|
1 | idfObject.setInt(AirflowNetwork_MultiZone_Component_DetailedOpeningFields::NumberofSetsofOpeningFactorData, factors.size()); |
| 317 | |||
| 318 |
2/2✓ Branch 5 taken 2 times.
✓ Branch 6 taken 1 time.
|
3 | for (const DetailedOpeningFactorData& factor : factors) { |
| 319 |
1/1✓ Branch 1 taken 2 times.
|
2 | auto eg = idfObject.pushExtensibleGroup(); |
| 320 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | eg.setDouble(AirflowNetwork_MultiZone_Component_DetailedOpeningExtensibleFields::OpeningFactor, factor.openingFactor()); |
| 321 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | eg.setDouble(AirflowNetwork_MultiZone_Component_DetailedOpeningExtensibleFields::DischargeCoefficientforOpeningFactor, |
| 322 | factor.dischargeCoefficient()); | ||
| 323 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | eg.setDouble(AirflowNetwork_MultiZone_Component_DetailedOpeningExtensibleFields::WidthFactorforOpeningFactor, factor.widthFactor()); |
| 324 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | eg.setDouble(AirflowNetwork_MultiZone_Component_DetailedOpeningExtensibleFields::HeightFactorforOpeningFactor, factor.heightFactor()); |
| 325 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | eg.setDouble(AirflowNetwork_MultiZone_Component_DetailedOpeningExtensibleFields::StartHeightFactorforOpeningFactor, factor.startHeightFactor()); |
| 326 | 2 | } | |
| 327 | |||
| 328 |
1/1✓ Branch 1 taken 1 time.
|
2 | return idfObject; |
| 329 | 1 | } | |
| 330 | |||
| 331 | 1 | boost::optional<IdfObject> ForwardTranslator::translateAirflowNetworkSimpleOpening(AirflowNetworkSimpleOpening& modelObject) { | |
| 332 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | IdfObject idfObject(IddObjectType::AirflowNetwork_MultiZone_Component_SimpleOpening); |
| 333 | |||
| 334 |
1/1✓ Branch 1 taken 1 time.
|
1 | m_idfObjects.push_back(idfObject); |
| 335 | |||
| 336 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setString(AirflowNetwork_MultiZone_Component_SimpleOpeningFields::Name, modelObject.nameString()); |
| 337 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(AirflowNetwork_MultiZone_Component_SimpleOpeningFields::AirMassFlowCoefficientWhenOpeningisClosed, |
| 338 | modelObject.airMassFlowCoefficientWhenOpeningisClosed()); | ||
| 339 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(AirflowNetwork_MultiZone_Component_SimpleOpeningFields::AirMassFlowExponentWhenOpeningisClosed, |
| 340 | modelObject.airMassFlowExponentWhenOpeningisClosed()); | ||
| 341 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(AirflowNetwork_MultiZone_Component_SimpleOpeningFields::MinimumDensityDifferenceforTwoWayFlow, |
| 342 | modelObject.minimumDensityDifferenceforTwoWayFlow()); | ||
| 343 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(AirflowNetwork_MultiZone_Component_SimpleOpeningFields::DischargeCoefficient, modelObject.dischargeCoefficient()); |
| 344 | |||
| 345 |
1/1✓ Branch 1 taken 1 time.
|
2 | return idfObject; |
| 346 | 1 | } | |
| 347 | |||
| 348 | 1 | boost::optional<IdfObject> ForwardTranslator::translateAirflowNetworkHorizontalOpening(AirflowNetworkHorizontalOpening& modelObject) { | |
| 349 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | IdfObject idfObject(IddObjectType::AirflowNetwork_MultiZone_Component_HorizontalOpening); |
| 350 | |||
| 351 |
1/1✓ Branch 1 taken 1 time.
|
1 | m_idfObjects.push_back(idfObject); |
| 352 | |||
| 353 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setString(AirflowNetwork_MultiZone_Component_HorizontalOpeningFields::Name, modelObject.nameString()); |
| 354 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(AirflowNetwork_MultiZone_Component_HorizontalOpeningFields::AirMassFlowCoefficientWhenOpeningisClosed, |
| 355 | modelObject.airMassFlowCoefficientWhenOpeningisClosed()); | ||
| 356 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(AirflowNetwork_MultiZone_Component_HorizontalOpeningFields::AirMassFlowExponentWhenOpeningisClosed, |
| 357 | modelObject.airMassFlowExponentWhenOpeningisClosed()); | ||
| 358 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(AirflowNetwork_MultiZone_Component_HorizontalOpeningFields::SlopingPlaneAngle, modelObject.slopingPlaneAngle()); |
| 359 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(AirflowNetwork_MultiZone_Component_HorizontalOpeningFields::DischargeCoefficient, modelObject.dischargeCoefficient()); |
| 360 | |||
| 361 |
1/1✓ Branch 1 taken 1 time.
|
2 | return idfObject; |
| 362 | 1 | } | |
| 363 | |||
| 364 | 1 | boost::optional<IdfObject> ForwardTranslator::translateAirflowNetworkSpecifiedFlowRate(AirflowNetworkSpecifiedFlowRate& modelObject) { | |
| 365 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | IdfObject idfObject(IddObjectType::AirflowNetwork_MultiZone_SpecifiedFlowRate); |
| 366 | |||
| 367 |
1/1✓ Branch 1 taken 1 time.
|
1 | m_idfObjects.push_back(idfObject); |
| 368 | |||
| 369 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setString(AirflowNetwork_MultiZone_SpecifiedFlowRateFields::Name, modelObject.nameString()); |
| 370 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(AirflowNetwork_MultiZone_SpecifiedFlowRateFields::AirFlowValue, modelObject.airFlowValue()); |
| 371 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setString(AirflowNetwork_MultiZone_SpecifiedFlowRateFields::AirFlowUnits, modelObject.airFlowUnits()); |
| 372 | |||
| 373 |
1/1✓ Branch 1 taken 1 time.
|
2 | return idfObject; |
| 374 | 1 | } | |
| 375 | |||
| 376 | ✗ | boost::optional<IdfObject> ForwardTranslator::translateAirflowNetworkZoneExhaustFan(AirflowNetworkZoneExhaustFan& modelObject) { | |
| 377 | ✗ | IdfObject idfObject(IddObjectType::AirflowNetwork_MultiZone_Component_ZoneExhaustFan); | |
| 378 | |||
| 379 | ✗ | if (modelObject.crack()) { | |
| 380 | ✗ | m_idfObjects.push_back(idfObject); | |
| 381 | |||
| 382 | ✗ | idfObject.setString(AirflowNetwork_MultiZone_Component_ZoneExhaustFanFields::Name, modelObject.nameString()); | |
| 383 | ✗ | idfObject.setDouble( | |
| 384 | AirflowNetwork_MultiZone_Component_ZoneExhaustFanFields::AirMassFlowCoefficientWhentheZoneExhaustFanisOffatReferenceConditions, | ||
| 385 | ✗ | modelObject.crack()->airMassFlowCoefficient()); | |
| 386 | ✗ | idfObject.setDouble(AirflowNetwork_MultiZone_Component_ZoneExhaustFanFields::AirMassFlowExponentWhentheZoneExhaustFanisOff, | |
| 387 | ✗ | modelObject.crack()->airMassFlowExponent()); | |
| 388 | ✗ | if (modelObject.crack()->referenceCrackConditions()) { | |
| 389 | ✗ | idfObject.setString(AirflowNetwork_MultiZone_Component_ZoneExhaustFanFields::ReferenceCrackConditions, | |
| 390 | ✗ | modelObject.crack()->referenceCrackConditions()->nameString()); | |
| 391 | } | ||
| 392 | } // else warning? | ||
| 393 | ✗ | return idfObject; | |
| 394 | ✗ | } | |
| 395 | |||
| 396 | ✗ | boost::optional<IdfObject> ForwardTranslator::translateAirflowNetworkExternalNode(AirflowNetworkExternalNode& modelObject) { | |
| 397 | ✗ | IdfObject idfObject(IddObjectType::AirflowNetwork_MultiZone_ExternalNode); | |
| 398 | |||
| 399 | ✗ | m_idfObjects.push_back(idfObject); | |
| 400 | |||
| 401 | ✗ | idfObject.setString(AirflowNetwork_MultiZone_ExternalNodeFields::Name, modelObject.nameString()); | |
| 402 | ✗ | idfObject.setDouble(AirflowNetwork_MultiZone_ExternalNodeFields::ExternalNodeHeight, modelObject.externalNodeHeight()); | |
| 403 | ✗ | idfObject.setString(AirflowNetwork_MultiZone_ExternalNodeFields::WindPressureCoefficientCurveName, | |
| 404 | ✗ | modelObject.windPressureCoefficientCurve().nameString()); | |
| 405 | ✗ | if (modelObject.symmetricWindPressureCoefficientCurve()) { | |
| 406 | ✗ | idfObject.setString(AirflowNetwork_MultiZone_ExternalNodeFields::SymmetricWindPressureCoefficientCurve, "Yes"); | |
| 407 | } | ||
| 408 | ✗ | idfObject.setString(AirflowNetwork_MultiZone_ExternalNodeFields::WindAngleType, modelObject.windAngleType()); | |
| 409 | |||
| 410 | ✗ | return idfObject; | |
| 411 | ✗ | } | |
| 412 | |||
| 413 | 4 | boost::optional<IdfObject> ForwardTranslator::translateAirflowNetworkDistributionNode(AirflowNetworkDistributionNode& modelObject) { | |
| 414 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
4 | IdfObject idfObject(IddObjectType::AirflowNetwork_Distribution_Node); |
| 415 | |||
| 416 |
1/1✓ Branch 1 taken 4 times.
|
4 | m_idfObjects.push_back(idfObject); |
| 417 | |||
| 418 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
4 | idfObject.setString(AirflowNetwork_Distribution_NodeFields::Name, modelObject.nameString()); |
| 419 | |||
| 420 |
3/3✓ Branch 1 taken 4 times.
✓ Branch 4 taken 3 times.
✓ Branch 5 taken 1 time.
|
8 | if (modelObject.node()) { |
| 421 |
4/4✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✓ Branch 10 taken 3 times.
|
3 | idfObject.setString(AirflowNetwork_Distribution_NodeFields::ComponentNameorNodeName, modelObject.node().get().nameString()); |
| 422 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
6 | idfObject.setString(AirflowNetwork_Distribution_NodeFields::ComponentObjectTypeorNodeType, "Other"); |
| 423 |
2/3✓ Branch 1 taken 1 time.
✗ Branch 4 not taken.
✓ Branch 5 taken 1 time.
|
2 | } else if (modelObject.airLoopHVACZoneMixer()) { |
| 424 | // JWD: This and the comments below will probably be uncommented and used once multiple airloops hit. | ||
| 425 | //idfObject.setString(AirflowNetwork_Distribution_NodeFields::ComponentNameorNodeName, modelObject.airLoopHVACZoneMixer().get().nameString()); | ||
| 426 | ✗ | idfObject.setString(AirflowNetwork_Distribution_NodeFields::ComponentObjectTypeorNodeType, "AirLoopHVAC:ZoneMixer"); | |
| 427 |
2/3✓ Branch 1 taken 1 time.
✗ Branch 4 not taken.
✓ Branch 5 taken 1 time.
|
2 | } else if (modelObject.airLoopHVACZoneSplitter()) { |
| 428 | //idfObject.setString(AirflowNetwork_Distribution_NodeFields::ComponentNameorNodeName, modelObject.airLoopHVACZoneSplitter().get().nameString()); | ||
| 429 | ✗ | idfObject.setString(AirflowNetwork_Distribution_NodeFields::ComponentObjectTypeorNodeType, "AirLoopHVAC:ZoneSplitter"); | |
| 430 |
2/3✓ Branch 1 taken 1 time.
✗ Branch 4 not taken.
✓ Branch 5 taken 1 time.
|
2 | } else if (modelObject.airLoopHVACOutdoorAirSystem()) { |
| 431 | //idfObject.setString(AirflowNetwork_Distribution_NodeFields::ComponentNameorNodeName, modelObject.airLoopHVACOutdoorAirSystem().get().nameString()); | ||
| 432 | ✗ | idfObject.setString(AirflowNetwork_Distribution_NodeFields::ComponentObjectTypeorNodeType, "AirLoopHVAC:OutdoorAirSystem"); | |
| 433 | } else { | ||
| 434 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(AirflowNetwork_Distribution_NodeFields::ComponentObjectTypeorNodeType, "Other"); |
| 435 | } | ||
| 436 | |||
| 437 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
4 | idfObject.setDouble(AirflowNetwork_Distribution_NodeFields::NodeHeight, modelObject.nodeHeight()); |
| 438 |
1/1✓ Branch 1 taken 4 times.
|
8 | return idfObject; |
| 439 | 4 | } | |
| 440 | |||
| 441 | ✗ | boost::optional<IdfObject> ForwardTranslator::translateAirflowNetworkLeakageRatio(AirflowNetworkLeakageRatio& modelObject) { | |
| 442 | ✗ | IdfObject idfObject(IddObjectType::AirflowNetwork_Distribution_Component_LeakageRatio); | |
| 443 | |||
| 444 | ✗ | m_idfObjects.push_back(idfObject); | |
| 445 | |||
| 446 | ✗ | idfObject.setString(AirflowNetwork_Distribution_Component_LeakageRatioFields::Name, modelObject.nameString()); | |
| 447 | ✗ | if (modelObject.effectiveLeakageRatio()) { | |
| 448 | ✗ | idfObject.setDouble(AirflowNetwork_Distribution_Component_LeakageRatioFields::EffectiveLeakageRatio, modelObject.effectiveLeakageRatio().get()); | |
| 449 | } | ||
| 450 | ✗ | idfObject.setDouble(AirflowNetwork_Distribution_Component_LeakageRatioFields::MaximumFlowRate, modelObject.maximumFlowRate()); | |
| 451 | ✗ | idfObject.setDouble(AirflowNetwork_Distribution_Component_LeakageRatioFields::ReferencePressureDifference, | |
| 452 | modelObject.referencePressureDifference()); | ||
| 453 | ✗ | idfObject.setDouble(AirflowNetwork_Distribution_Component_LeakageRatioFields::AirMassFlowExponent, modelObject.airMassFlowExponent()); | |
| 454 | |||
| 455 | ✗ | return idfObject; | |
| 456 | ✗ | } | |
| 457 | |||
| 458 | ✗ | boost::optional<IdfObject> ForwardTranslator::translateAirflowNetworkDuct(AirflowNetworkDuct& modelObject) { | |
| 459 | ✗ | IdfObject idfObject(IddObjectType::AirflowNetwork_Distribution_Component_Duct); | |
| 460 | |||
| 461 | ✗ | m_idfObjects.push_back(idfObject); | |
| 462 | |||
| 463 | ✗ | idfObject.setString(AirflowNetwork_Distribution_Component_DuctFields::Name, modelObject.nameString()); | |
| 464 | ✗ | idfObject.setDouble(AirflowNetwork_Distribution_Component_DuctFields::DuctLength, modelObject.ductLength()); | |
| 465 | ✗ | idfObject.setDouble(AirflowNetwork_Distribution_Component_DuctFields::HydraulicDiameter, modelObject.hydraulicDiameter()); | |
| 466 | ✗ | idfObject.setDouble(AirflowNetwork_Distribution_Component_DuctFields::CrossSectionArea, modelObject.crossSectionArea()); | |
| 467 | ✗ | idfObject.setDouble(AirflowNetwork_Distribution_Component_DuctFields::SurfaceRoughness, modelObject.surfaceRoughness()); | |
| 468 | ✗ | idfObject.setDouble(AirflowNetwork_Distribution_Component_DuctFields::CoefficientforLocalDynamicLossDuetoFitting, | |
| 469 | modelObject.coefficientforLocalDynamicLossDuetoFitting()); | ||
| 470 | ✗ | idfObject.setDouble(AirflowNetwork_Distribution_Component_DuctFields::HeatTransmittanceCoefficient_UFactor_forDuctWallConstruction, | |
| 471 | modelObject.ductWallHeatTransmittanceCoefficient()); | ||
| 472 | ✗ | idfObject.setDouble(AirflowNetwork_Distribution_Component_DuctFields::OverallMoistureTransmittanceCoefficientfromAirtoAir, | |
| 473 | modelObject.overallMoistureTransmittanceCoefficientfromAirtoAir()); | ||
| 474 | ✗ | idfObject.setDouble(AirflowNetwork_Distribution_Component_DuctFields::OutsideConvectionCoefficient, modelObject.outsideConvectionCoefficient()); | |
| 475 | ✗ | idfObject.setDouble(AirflowNetwork_Distribution_Component_DuctFields::InsideConvectionCoefficient, modelObject.insideConvectionCoefficient()); | |
| 476 | |||
| 477 | ✗ | return idfObject; | |
| 478 | ✗ | } | |
| 479 | |||
| 480 | 1 | boost::optional<IdfObject> ForwardTranslator::translateAirflowNetworkFan(AirflowNetworkFan& modelObject) { | |
| 481 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | IdfObject idfObject(IddObjectType::AirflowNetwork_Distribution_Component_Fan); |
| 482 | |||
| 483 |
2/3✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
|
2 | if (boost::optional<FanConstantVolume> _fan = modelObject.fanConstantVolume()) { |
| 484 |
3/3✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
|
1 | idfObject.setString(AirflowNetwork_Distribution_Component_FanFields::FanName, _fan->nameString()); |
| 485 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setString(AirflowNetwork_Distribution_Component_FanFields::SupplyFanObjectType, "Fan:ConstantVolume"); |
| 486 |
1/1✓ Branch 1 taken 1 time.
|
1 | m_idfObjects.push_back(idfObject); |
| 487 | ✗ | } else if (boost::optional<FanVariableVolume> _fan = modelObject.fanVariableVolume()) { | |
| 488 | ✗ | idfObject.setString(AirflowNetwork_Distribution_Component_FanFields::FanName, _fan->nameString()); | |
| 489 | ✗ | idfObject.setString(AirflowNetwork_Distribution_Component_FanFields::SupplyFanObjectType, "Fan:VariableVolume"); | |
| 490 | ✗ | m_idfObjects.push_back(idfObject); | |
| 491 | ✗ | } else if (boost::optional<FanOnOff> _fan = modelObject.fanOnOff()) { | |
| 492 | ✗ | idfObject.setString(AirflowNetwork_Distribution_Component_FanFields::FanName, _fan->nameString()); | |
| 493 | ✗ | idfObject.setString(AirflowNetwork_Distribution_Component_FanFields::SupplyFanObjectType, "Fan:OnOff"); | |
| 494 | ✗ | m_idfObjects.push_back(idfObject); | |
| 495 | ✗ | } else if (boost::optional<FanSystemModel> _fan = modelObject.fanSystemModel()) { | |
| 496 | ✗ | idfObject.setString(AirflowNetwork_Distribution_Component_FanFields::FanName, _fan->nameString()); | |
| 497 | ✗ | idfObject.setString(AirflowNetwork_Distribution_Component_FanFields::SupplyFanObjectType, "Fan:SystemModel"); | |
| 498 | ✗ | m_idfObjects.push_back(idfObject); | |
| 499 | } else { | ||
| 500 | // Warning or error? | ||
| 501 | 1 | } | |
| 502 | |||
| 503 |
1/1✓ Branch 1 taken 1 time.
|
2 | return idfObject; |
| 504 | 1 | } | |
| 505 | |||
| 506 | 2 | boost::optional<IdfObject> ForwardTranslator::translateAirflowNetworkEquivalentDuct(AirflowNetworkEquivalentDuct& modelObject) { | |
| 507 |
1/1✓ Branch 1 taken 2 times.
|
2 | boost::optional<std::string> opttype = modelObject.coilObjectType(); |
| 508 |
1/2✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
|
2 | if (opttype) { |
| 509 | // Coil | ||
| 510 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | IdfObject idfObject(IddObjectType::AirflowNetwork_Distribution_Component_Coil); |
| 511 |
1/1✓ Branch 1 taken 2 times.
|
2 | m_idfObjects.push_back(idfObject); |
| 512 |
4/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✓ Branch 10 taken 2 times.
|
2 | idfObject.setString(AirflowNetwork_Distribution_Component_CoilFields::CoilName, modelObject.straightComponent().get().nameString()); |
| 513 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setString(AirflowNetwork_Distribution_Component_CoilFields::CoilObjectType, opttype.get()); |
| 514 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setDouble(AirflowNetwork_Distribution_Component_CoilFields::AirPathLength, modelObject.airPathLength()); |
| 515 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setDouble(AirflowNetwork_Distribution_Component_CoilFields::AirPathHydraulicDiameter, modelObject.airPathHydraulicDiameter()); |
| 516 |
1/1✓ Branch 1 taken 2 times.
|
2 | return idfObject; |
| 517 | 2 | } | |
| 518 | |||
| 519 | ✗ | opttype = modelObject.heatExchangerObjectType(); | |
| 520 | ✗ | if (opttype) { | |
| 521 | // Heat exchanger | ||
| 522 | ✗ | IdfObject idfObject(IddObjectType::AirflowNetwork_Distribution_Component_HeatExchanger); | |
| 523 | ✗ | m_idfObjects.push_back(idfObject); | |
| 524 | ✗ | idfObject.setString(AirflowNetwork_Distribution_Component_HeatExchangerFields::HeatExchangerName, modelObject.nameString()); | |
| 525 | ✗ | idfObject.setString(AirflowNetwork_Distribution_Component_HeatExchangerFields::HeatExchangerObjectType, opttype.get()); | |
| 526 | ✗ | idfObject.setDouble(AirflowNetwork_Distribution_Component_HeatExchangerFields::AirPathLength, modelObject.airPathLength()); | |
| 527 | ✗ | idfObject.setDouble(AirflowNetwork_Distribution_Component_HeatExchangerFields::AirPathHydraulicDiameter, | |
| 528 | modelObject.airPathHydraulicDiameter()); | ||
| 529 | ✗ | return idfObject; | |
| 530 | ✗ | } | |
| 531 | |||
| 532 | ✗ | opttype = modelObject.terminalUnitObjectType(); | |
| 533 | ✗ | if (opttype) { | |
| 534 | // Terminal Unit | ||
| 535 | ✗ | IdfObject idfObject(IddObjectType::AirflowNetwork_Distribution_Component_TerminalUnit); | |
| 536 | ✗ | m_idfObjects.push_back(idfObject); | |
| 537 | ✗ | idfObject.setString(AirflowNetwork_Distribution_Component_TerminalUnitFields::TerminalUnitName, modelObject.nameString()); | |
| 538 | ✗ | idfObject.setString(AirflowNetwork_Distribution_Component_TerminalUnitFields::TerminalUnitObjectType, opttype.get()); | |
| 539 | ✗ | idfObject.setDouble(AirflowNetwork_Distribution_Component_TerminalUnitFields::AirPathLength, modelObject.airPathLength()); | |
| 540 | ✗ | idfObject.setDouble(AirflowNetwork_Distribution_Component_TerminalUnitFields::AirPathHydraulicDiameter, modelObject.airPathHydraulicDiameter()); | |
| 541 | ✗ | return idfObject; | |
| 542 | ✗ | } | |
| 543 | |||
| 544 | ✗ | return boost::none; | |
| 545 | 2 | } | |
| 546 | |||
| 547 | ✗ | boost::optional<IdfObject> ForwardTranslator::translateAirflowNetworkConstantPressureDrop(AirflowNetworkConstantPressureDrop& modelObject) { | |
| 548 | ✗ | IdfObject idfObject(IddObjectType::AirflowNetwork_Distribution_Component_ConstantPressureDrop); | |
| 549 | |||
| 550 | ✗ | m_idfObjects.push_back(idfObject); | |
| 551 | |||
| 552 | ✗ | idfObject.setString(AirflowNetwork_Distribution_Component_ConstantPressureDropFields::Name, modelObject.nameString()); | |
| 553 | ✗ | idfObject.setDouble(AirflowNetwork_Distribution_Component_ConstantPressureDropFields::PressureDifferenceAcrosstheComponent, | |
| 554 | modelObject.pressureDrop()); | ||
| 555 | |||
| 556 | ✗ | return idfObject; | |
| 557 | ✗ | } | |
| 558 | |||
| 559 | ✗ | boost::optional<IdfObject> ForwardTranslator::translateAirflowNetworkOutdoorAirflow(AirflowNetworkOutdoorAirflow& modelObject) { | |
| 560 | ✗ | IdfObject idfObject(IddObjectType::AirflowNetwork_Distribution_Component_OutdoorAirFlow); | |
| 561 | |||
| 562 | ✗ | if (modelObject.crack()) { | |
| 563 | ✗ | m_idfObjects.push_back(idfObject); | |
| 564 | |||
| 565 | ✗ | idfObject.setString(AirflowNetwork_MultiZone_Component_ZoneExhaustFanFields::Name, modelObject.nameString()); | |
| 566 | ✗ | idfObject.setDouble( | |
| 567 | AirflowNetwork_MultiZone_Component_ZoneExhaustFanFields::AirMassFlowCoefficientWhentheZoneExhaustFanisOffatReferenceConditions, | ||
| 568 | ✗ | modelObject.crack()->airMassFlowCoefficient()); | |
| 569 | ✗ | idfObject.setDouble(AirflowNetwork_MultiZone_Component_ZoneExhaustFanFields::AirMassFlowExponentWhentheZoneExhaustFanisOff, | |
| 570 | ✗ | modelObject.crack()->airMassFlowExponent()); | |
| 571 | ✗ | if (modelObject.crack()->referenceCrackConditions()) { | |
| 572 | ✗ | idfObject.setString(AirflowNetwork_MultiZone_Component_ZoneExhaustFanFields::ReferenceCrackConditions, | |
| 573 | ✗ | modelObject.crack()->referenceCrackConditions()->nameString()); | |
| 574 | } | ||
| 575 | } // else warning? | ||
| 576 | |||
| 577 | ✗ | return idfObject; | |
| 578 | ✗ | } | |
| 579 | |||
| 580 | 2 | boost::optional<IdfObject> ForwardTranslator::translateAirflowNetworkDistributionLinkage(AirflowNetworkDistributionLinkage& modelObject) { | |
| 581 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | IdfObject idfObject(IddObjectType::AirflowNetwork_Distribution_Linkage); |
| 582 | |||
| 583 |
1/1✓ Branch 1 taken 2 times.
|
2 | m_idfObjects.push_back(idfObject); |
| 584 | |||
| 585 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setString(AirflowNetwork_Distribution_LinkageFields::Name, modelObject.nameString()); |
| 586 | |||
| 587 | 2 | boost::optional<IdfObject> obj; | |
| 588 | |||
| 589 |
1/1✓ Branch 1 taken 2 times.
|
2 | AirflowNetworkNode node1 = modelObject.node1(); |
| 590 |
2/3✓ Branch 1 taken 2 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 2 times.
|
4 | if (node1.optionalCast<AirflowNetworkZone>()) { |
| 591 | // DLM: Jason, the thermal zone and other objects may be renamed on translation, need to get the translated object's name | ||
| 592 | ✗ | auto z = node1.cast<AirflowNetworkZone>().thermalZone(); | |
| 593 | ✗ | obj = translateAndMapModelObject(z); | |
| 594 | ✗ | OS_ASSERT(obj); | |
| 595 | ✗ | idfObject.setString(AirflowNetwork_Distribution_LinkageFields::Node1Name, obj->nameString()); | |
| 596 | ✗ | } else { | |
| 597 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setString(AirflowNetwork_Distribution_LinkageFields::Node1Name, node1.nameString()); |
| 598 | } | ||
| 599 | |||
| 600 |
1/1✓ Branch 1 taken 2 times.
|
2 | AirflowNetworkNode node2 = modelObject.node2(); |
| 601 |
2/3✓ Branch 1 taken 2 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 2 times.
|
4 | if (node2.optionalCast<AirflowNetworkZone>()) { |
| 602 | ✗ | auto z = node1.cast<AirflowNetworkZone>().thermalZone(); | |
| 603 | ✗ | obj = translateAndMapModelObject(z); | |
| 604 | ✗ | OS_ASSERT(obj); | |
| 605 | ✗ | idfObject.setString(AirflowNetwork_Distribution_LinkageFields::Node2Name, obj->nameString()); | |
| 606 | ✗ | } else { | |
| 607 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setString(AirflowNetwork_Distribution_LinkageFields::Node2Name, node2.nameString()); |
| 608 | } | ||
| 609 | |||
| 610 |
1/1✓ Branch 1 taken 2 times.
|
2 | AirflowNetworkComponent component = modelObject.component(); |
| 611 |
4/5✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✓ Branch 10 taken 2 times.
✗ Branch 11 not taken.
|
2 | switch (component.iddObject().type().value()) { |
| 612 | 2 | case openstudio::IddObjectType::OS_AirflowNetworkFan: | |
| 613 | case openstudio::IddObjectType::OS_AirflowNetworkEquivalentDuct: | ||
| 614 |
2/4✓ Branch 1 taken 2 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 2 times.
✗ Branch 7 not taken.
|
2 | OS_ASSERT(component.componentModelObject()); |
| 615 |
3/3✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
|
2 | obj = translateAndMapModelObject(component.componentModelObject().get()); |
| 616 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
✗ Branch 4 not taken.
|
2 | OS_ASSERT(obj); |
| 617 |
3/3✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
|
2 | idfObject.setString(AirflowNetwork_Distribution_LinkageFields::ComponentName, obj->nameString()); |
| 618 | 2 | break; | |
| 619 | ✗ | default: | |
| 620 | ✗ | idfObject.setString(AirflowNetwork_Distribution_LinkageFields::ComponentName, component.nameString()); | |
| 621 | ✗ | break; | |
| 622 | } | ||
| 623 | |||
| 624 |
2/3✓ Branch 1 taken 2 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 2 times.
|
4 | if (modelObject.thermalZone()) { |
| 625 | ✗ | obj = translateAndMapModelObject(modelObject.thermalZone().get()); | |
| 626 | ✗ | OS_ASSERT(obj); | |
| 627 | ✗ | idfObject.setString(AirflowNetwork_Distribution_LinkageFields::ThermalZoneName, obj->nameString()); | |
| 628 | } | ||
| 629 | |||
| 630 |
1/1✓ Branch 1 taken 2 times.
|
4 | return idfObject; |
| 631 | 2 | } | |
| 632 | |||
| 633 | ✗ | boost::optional<IdfObject> ForwardTranslator::translateAirflowNetworkDuctViewFactors(AirflowNetworkDuctViewFactors& modelObject) { | |
| 634 | ✗ | IdfObject idfObject(IddObjectType::AirflowNetwork_Distribution_DuctViewFactors); | |
| 635 | |||
| 636 | ✗ | std::vector<ViewFactorData> vfs = modelObject.viewFactors(); | |
| 637 | |||
| 638 | ✗ | if (!vfs.empty()) { | |
| 639 | ✗ | m_idfObjects.push_back(idfObject); | |
| 640 | |||
| 641 | ✗ | idfObject.setString(AirflowNetwork_Distribution_DuctViewFactorsFields::LinkageName, modelObject.linkage().nameString()); | |
| 642 | ✗ | idfObject.setDouble(AirflowNetwork_Distribution_DuctViewFactorsFields::DuctSurfaceExposureFraction, modelObject.ductSurfaceExposureFraction()); | |
| 643 | ✗ | idfObject.setDouble(AirflowNetwork_Distribution_DuctViewFactorsFields::DuctSurfaceEmittance, modelObject.ductSurfaceEmittance()); | |
| 644 | |||
| 645 | ✗ | idfObject.clearExtensibleGroups(); | |
| 646 | ✗ | for (const auto& vf : vfs) { | |
| 647 | ✗ | IdfExtensibleGroup group = idfObject.pushExtensibleGroup(); | |
| 648 | ✗ | OS_ASSERT(group.numFields() == 2); | |
| 649 | ✗ | group.setString(0, vf.planarSurface().nameString()); | |
| 650 | ✗ | group.setDouble(1, vf.viewFactor()); | |
| 651 | ✗ | } | |
| 652 | |||
| 653 | ✗ | return idfObject; | |
| 654 | } else { | ||
| 655 | ✗ | LOG(Warn, "Empty view factor object " << modelObject.briefDescription() << " not translated."); | |
| 656 | } | ||
| 657 | |||
| 658 | ✗ | return boost::none; | |
| 659 | ✗ | } | |
| 660 | |||
| 661 | boost::optional<IdfObject> | ||
| 662 | ✗ | ForwardTranslator::translateAirflowNetworkOccupantVentilationControl(AirflowNetworkOccupantVentilationControl& modelObject) { | |
| 663 | ✗ | IdfObject idfObject(IddObjectType::AirflowNetwork_OccupantVentilationControl); | |
| 664 | |||
| 665 | ✗ | m_idfObjects.push_back(idfObject); | |
| 666 | |||
| 667 | ✗ | idfObject.setString(AirflowNetwork_OccupantVentilationControlFields::Name, modelObject.nameString()); | |
| 668 | ✗ | idfObject.setDouble(AirflowNetwork_OccupantVentilationControlFields::MinimumOpeningTime, modelObject.minimumOpeningTime()); | |
| 669 | ✗ | idfObject.setDouble(AirflowNetwork_OccupantVentilationControlFields::MinimumClosingTime, modelObject.minimumClosingTime()); | |
| 670 | ✗ | idfObject.setString(AirflowNetwork_OccupantVentilationControlFields::ThermalComfortLowTemperatureCurveName, | |
| 671 | ✗ | modelObject.thermalComfortLowTemperatureCurve().nameString()); | |
| 672 | ✗ | idfObject.setDouble(AirflowNetwork_OccupantVentilationControlFields::ThermalComfortTemperatureBoundaryPoint, | |
| 673 | modelObject.thermalComfortTemperatureBoundaryPoint()); | ||
| 674 | ✗ | if (modelObject.thermalComfortHighTemperatureCurve()) { | |
| 675 | ✗ | idfObject.setString(AirflowNetwork_OccupantVentilationControlFields::ThermalComfortHighTemperatureCurveName, | |
| 676 | ✗ | modelObject.thermalComfortHighTemperatureCurve()->nameString()); | |
| 677 | } | ||
| 678 | ✗ | idfObject.setDouble(AirflowNetwork_OccupantVentilationControlFields::MaximumThresholdforPersonsDissatisfiedPPD, | |
| 679 | modelObject.maximumPredictedPercentageofDissatisfiedThreshold()); | ||
| 680 | ✗ | if (modelObject.occupancyCheck()) { | |
| 681 | ✗ | idfObject.setString(AirflowNetwork_OccupantVentilationControlFields::OccupancyCheck, "Yes"); | |
| 682 | } | ||
| 683 | ✗ | if (modelObject.openingProbabilitySchedule()) { | |
| 684 | ✗ | idfObject.setString(AirflowNetwork_OccupantVentilationControlFields::OpeningProbabilityScheduleName, | |
| 685 | ✗ | modelObject.openingProbabilitySchedule()->nameString()); | |
| 686 | } | ||
| 687 | ✗ | if (modelObject.closingProbabilitySchedule()) { | |
| 688 | ✗ | idfObject.setString(AirflowNetwork_OccupantVentilationControlFields::ClosingProbabilityScheduleName, | |
| 689 | ✗ | modelObject.closingProbabilitySchedule()->nameString()); | |
| 690 | } | ||
| 691 | |||
| 692 | ✗ | return idfObject; | |
| 693 | ✗ | } | |
| 694 | |||
| 695 | } // namespace energyplus | ||
| 696 | } // namespace openstudio | ||
| 697 |