src/energyplus/ForwardTranslator/ForwardTranslateFanComponentModel.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/FanComponentModel.hpp" | ||
| 10 | |||
| 11 | #include "../../model/Schedule.hpp" | ||
| 12 | #include "../../model/Curve.hpp" | ||
| 13 | #include "../../model/Node.hpp" | ||
| 14 | #include "../../model/Node_Impl.hpp" | ||
| 15 | |||
| 16 | #include <utilities/idd/Fan_ComponentModel_FieldEnums.hxx> | ||
| 17 | // #include "../../utilities/idd/IddEnums.hpp" | ||
| 18 | #include <utilities/idd/IddEnums.hxx> | ||
| 19 | |||
| 20 | using namespace openstudio::model; | ||
| 21 | |||
| 22 | namespace openstudio { | ||
| 23 | |||
| 24 | namespace energyplus { | ||
| 25 | |||
| 26 | 3 | boost::optional<IdfObject> ForwardTranslator::translateFanComponentModel(model::FanComponentModel& modelObject) { | |
| 27 | 3 | boost::optional<IdfObject> result; | |
| 28 | 3 | boost::optional<WorkspaceObject> _wo; | |
| 29 | 3 | boost::optional<ModelObject> _mo; | |
| 30 | |||
| 31 | // Instantiate an IdfObject of the class to store the values, | ||
| 32 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | IdfObject idfObject = createRegisterAndNameIdfObject(openstudio::IddObjectType::Fan_ComponentModel, modelObject); |
| 33 | // If it doesn't have a name, or if you aren't sure you are going to want to return it | ||
| 34 | // IdfObject idfObject( openstudio::IddObjectType::Fan_ComponentModel ); | ||
| 35 | // m_idfObjects.push_back(idfObject); | ||
| 36 | |||
| 37 | // TODO: Note JM 2018-10-17 | ||
| 38 | // You are responsible for implementing any additional logic based on choice fields, etc. | ||
| 39 | // The ForwardTranslator generator script is meant to facilitate your work, not get you 100% of the way | ||
| 40 | |||
| 41 | // TODO: If you keep createRegisterAndNameIdfObject above, you don't need this. | ||
| 42 | // But in some cases, you'll want to handle failure without pushing to the map | ||
| 43 | // Name | ||
| 44 |
2/3✓ Branch 1 taken 3 times.
✓ Branch 3 taken 3 times.
✗ Branch 4 not taken.
|
6 | if (boost::optional<std::string> moName = modelObject.name()) { |
| 45 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | idfObject.setName(*moName); |
| 46 | 3 | } | |
| 47 | |||
| 48 | // Air Inlet Node Name: Required Node | ||
| 49 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 1 time.
|
6 | if (boost::optional<ModelObject> inletModelObject = modelObject.inletModelObject()) { |
| 50 |
3/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 6 taken 2 times.
✗ Branch 7 not taken.
|
4 | if (boost::optional<Node> inletNode = inletModelObject->optionalCast<Node>()) { |
| 51 |
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(Fan_ComponentModelFields::AirInletNodeName, inletNode->name().get()); |
| 52 | 2 | } | |
| 53 | 3 | } | |
| 54 | |||
| 55 | // Air Outlet Node Name: Required Node | ||
| 56 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 1 time.
|
6 | if (boost::optional<ModelObject> outletModelObject = modelObject.outletModelObject()) { |
| 57 |
3/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 6 taken 2 times.
✗ Branch 7 not taken.
|
4 | if (boost::optional<Node> outletNode = outletModelObject->optionalCast<Node>()) { |
| 58 |
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(Fan_ComponentModelFields::AirOutletNodeName, outletNode->name().get()); |
| 59 | 2 | } | |
| 60 | 3 | } | |
| 61 | |||
| 62 | // Availability Schedule Name: Optional Object | ||
| 63 | { | ||
| 64 |
1/1✓ Branch 1 taken 3 times.
|
3 | Schedule availabilitySchedule = modelObject.availabilitySchedule(); |
| 65 |
2/3✓ Branch 1 taken 3 times.
✓ Branch 3 taken 3 times.
✗ Branch 4 not taken.
|
6 | if (boost::optional<IdfObject> _owo = translateAndMapModelObject(availabilitySchedule)) { |
| 66 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
|
3 | idfObject.setString(Fan_ComponentModelFields::AvailabilityScheduleName, _owo->nameString()); |
| 67 | 3 | } | |
| 68 | 3 | } | |
| 69 | |||
| 70 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 1 time.
|
3 | if (modelObject.isMaximumFlowRateAutosized()) { |
| 71 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
4 | idfObject.setString(Fan_ComponentModelFields::MaximumFlowRate, "Autosize"); |
| 72 | } else { | ||
| 73 | // Maximum Flow Rate: boost::optional<double> | ||
| 74 |
2/3✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
|
2 | if (boost::optional<double> _maximumFlowRate = modelObject.maximumFlowRate()) { |
| 75 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(Fan_ComponentModelFields::MaximumFlowRate, _maximumFlowRate.get()); |
| 76 | } | ||
| 77 | } | ||
| 78 | |||
| 79 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 1 time.
|
3 | if (modelObject.isMinimumFlowRateAutosized()) { |
| 80 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
4 | idfObject.setString(Fan_ComponentModelFields::MinimumFlowRate, "Autosize"); |
| 81 | } else { | ||
| 82 | // Minimum Flow Rate: boost::optional<double> | ||
| 83 |
2/3✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
|
2 | if (boost::optional<double> _minimumFlowRate = modelObject.minimumFlowRate()) { |
| 84 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(Fan_ComponentModelFields::MinimumFlowRate, _minimumFlowRate.get()); |
| 85 | } | ||
| 86 | } | ||
| 87 | |||
| 88 | // Fan Sizing Factor: Optional Double | ||
| 89 |
1/1✓ Branch 1 taken 3 times.
|
3 | double fanSizingFactor = modelObject.fanSizingFactor(); |
| 90 |
1/1✓ Branch 1 taken 3 times.
|
3 | idfObject.setDouble(Fan_ComponentModelFields::FanSizingFactor, fanSizingFactor); |
| 91 | |||
| 92 | // Fan Wheel Diameter: Required Double | ||
| 93 |
1/1✓ Branch 1 taken 3 times.
|
3 | double fanWheelDiameter = modelObject.fanWheelDiameter(); |
| 94 |
1/1✓ Branch 1 taken 3 times.
|
3 | idfObject.setDouble(Fan_ComponentModelFields::FanWheelDiameter, fanWheelDiameter); |
| 95 | |||
| 96 | // Fan Outlet Area: Required Double | ||
| 97 |
1/1✓ Branch 1 taken 3 times.
|
3 | double fanOutletArea = modelObject.fanOutletArea(); |
| 98 |
1/1✓ Branch 1 taken 3 times.
|
3 | idfObject.setDouble(Fan_ComponentModelFields::FanOutletArea, fanOutletArea); |
| 99 | |||
| 100 | // Maximum Fan Static Efficiency: Required Double | ||
| 101 |
1/1✓ Branch 1 taken 3 times.
|
3 | double maximumFanStaticEfficiency = modelObject.maximumFanStaticEfficiency(); |
| 102 |
1/1✓ Branch 1 taken 3 times.
|
3 | idfObject.setDouble(Fan_ComponentModelFields::MaximumFanStaticEfficiency, maximumFanStaticEfficiency); |
| 103 | |||
| 104 | // Euler Number at Maximum Fan Static Efficiency: Required Double | ||
| 105 |
1/1✓ Branch 1 taken 3 times.
|
3 | double eulerNumberatMaximumFanStaticEfficiency = modelObject.eulerNumberatMaximumFanStaticEfficiency(); |
| 106 |
1/1✓ Branch 1 taken 3 times.
|
3 | idfObject.setDouble(Fan_ComponentModelFields::EulerNumberatMaximumFanStaticEfficiency, eulerNumberatMaximumFanStaticEfficiency); |
| 107 | |||
| 108 | // Maximum Dimensionless Fan Airflow: Required Double | ||
| 109 |
1/1✓ Branch 1 taken 3 times.
|
3 | double maximumDimensionlessFanAirflow = modelObject.maximumDimensionlessFanAirflow(); |
| 110 |
1/1✓ Branch 1 taken 3 times.
|
3 | idfObject.setDouble(Fan_ComponentModelFields::MaximumDimensionlessFanAirflow, maximumDimensionlessFanAirflow); |
| 111 | |||
| 112 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 1 time.
|
3 | if (modelObject.isMotorFanPulleyRatioAutosized()) { |
| 113 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
4 | idfObject.setString(Fan_ComponentModelFields::MotorFanPulleyRatio, "Autosize"); |
| 114 | } else { | ||
| 115 | // Motor Fan Pulley Ratio: boost::optional<double> | ||
| 116 |
2/3✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
|
2 | if (boost::optional<double> _motorFanPulleyRatio = modelObject.motorFanPulleyRatio()) { |
| 117 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(Fan_ComponentModelFields::MotorFanPulleyRatio, _motorFanPulleyRatio.get()); |
| 118 | } | ||
| 119 | } | ||
| 120 | |||
| 121 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 1 time.
|
3 | if (modelObject.isBeltMaximumTorqueAutosized()) { |
| 122 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
4 | idfObject.setString(Fan_ComponentModelFields::BeltMaximumTorque, "Autosize"); |
| 123 | } else { | ||
| 124 | // Belt Maximum Torque: boost::optional<double> | ||
| 125 |
2/3✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
|
2 | if (boost::optional<double> _beltMaximumTorque = modelObject.beltMaximumTorque()) { |
| 126 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(Fan_ComponentModelFields::BeltMaximumTorque, _beltMaximumTorque.get()); |
| 127 | } | ||
| 128 | } | ||
| 129 | |||
| 130 | // Belt Sizing Factor: Optional Double | ||
| 131 |
1/1✓ Branch 1 taken 3 times.
|
3 | double beltSizingFactor = modelObject.beltSizingFactor(); |
| 132 |
1/1✓ Branch 1 taken 3 times.
|
3 | idfObject.setDouble(Fan_ComponentModelFields::BeltSizingFactor, beltSizingFactor); |
| 133 | |||
| 134 | // Belt Fractional Torque Transition: Optional Double | ||
| 135 |
1/1✓ Branch 1 taken 3 times.
|
3 | double beltFractionalTorqueTransition = modelObject.beltFractionalTorqueTransition(); |
| 136 |
1/1✓ Branch 1 taken 3 times.
|
3 | idfObject.setDouble(Fan_ComponentModelFields::BeltFractionalTorqueTransition, beltFractionalTorqueTransition); |
| 137 | |||
| 138 | // Motor Maximum Speed: Required Double | ||
| 139 |
1/1✓ Branch 1 taken 3 times.
|
3 | double motorMaximumSpeed = modelObject.motorMaximumSpeed(); |
| 140 |
1/1✓ Branch 1 taken 3 times.
|
3 | idfObject.setDouble(Fan_ComponentModelFields::MotorMaximumSpeed, motorMaximumSpeed); |
| 141 | |||
| 142 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 1 time.
|
3 | if (modelObject.isMaximumMotorOutputPowerAutosized()) { |
| 143 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
4 | idfObject.setString(Fan_ComponentModelFields::MaximumMotorOutputPower, "Autosize"); |
| 144 | } else { | ||
| 145 | // Maximum Motor Output Power: boost::optional<double> | ||
| 146 |
2/3✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
|
2 | if (boost::optional<double> _maximumMotorOutputPower = modelObject.maximumMotorOutputPower()) { |
| 147 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(Fan_ComponentModelFields::MaximumMotorOutputPower, _maximumMotorOutputPower.get()); |
| 148 | } | ||
| 149 | } | ||
| 150 | |||
| 151 | // Motor Sizing Factor: Optional Double | ||
| 152 |
1/1✓ Branch 1 taken 3 times.
|
3 | double motorSizingFactor = modelObject.motorSizingFactor(); |
| 153 |
1/1✓ Branch 1 taken 3 times.
|
3 | idfObject.setDouble(Fan_ComponentModelFields::MotorSizingFactor, motorSizingFactor); |
| 154 | |||
| 155 | // Motor In Airstream Fraction: Optional Double | ||
| 156 |
1/1✓ Branch 1 taken 3 times.
|
3 | double motorInAirstreamFraction = modelObject.motorInAirstreamFraction(); |
| 157 |
1/1✓ Branch 1 taken 3 times.
|
3 | idfObject.setDouble(Fan_ComponentModelFields::MotorInAirstreamFraction, motorInAirstreamFraction); |
| 158 | |||
| 159 | // VFD Efficiency Type: boost::optional<std::string> | ||
| 160 |
3/4✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 8 taken 3 times.
✗ Branch 9 not taken.
|
6 | if (boost::optional<std::string> _vFDEfficiencyType = modelObject.vFDEfficiencyType()) { |
| 161 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | idfObject.setString(Fan_ComponentModelFields::VFDEfficiencyType, _vFDEfficiencyType.get()); |
| 162 | 3 | } | |
| 163 | |||
| 164 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 1 time.
|
3 | if (modelObject.isMaximumVFDOutputPowerAutosized()) { |
| 165 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
4 | idfObject.setString(Fan_ComponentModelFields::MaximumVFDOutputPower, "Autosize"); |
| 166 | } else { | ||
| 167 | // Maximum VFD Output Power: boost::optional<double> | ||
| 168 |
2/3✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
|
2 | if (boost::optional<double> _maximumVFDOutputPower = modelObject.maximumVFDOutputPower()) { |
| 169 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(Fan_ComponentModelFields::MaximumVFDOutputPower, _maximumVFDOutputPower.get()); |
| 170 | } | ||
| 171 | } | ||
| 172 | |||
| 173 | // VFD Sizing Factor: Optional Double | ||
| 174 |
1/1✓ Branch 1 taken 3 times.
|
3 | double vFDSizingFactor = modelObject.vFDSizingFactor(); |
| 175 |
1/1✓ Branch 1 taken 3 times.
|
3 | idfObject.setDouble(Fan_ComponentModelFields::VFDSizingFactor, vFDSizingFactor); |
| 176 | |||
| 177 | // Fan Pressure Rise Curve Name: Required Object | ||
| 178 |
1/1✓ Branch 1 taken 3 times.
|
3 | Curve fanPressureRiseCurve = modelObject.fanPressureRiseCurve(); |
| 179 |
2/3✓ Branch 1 taken 3 times.
✓ Branch 3 taken 3 times.
✗ Branch 4 not taken.
|
6 | if (boost::optional<IdfObject> _owo = translateAndMapModelObject(fanPressureRiseCurve)) { |
| 180 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
|
3 | idfObject.setString(Fan_ComponentModelFields::FanPressureRiseCurveName, _owo->nameString()); |
| 181 | 3 | } | |
| 182 | |||
| 183 | // Duct Static Pressure Reset Curve Name: Required Object | ||
| 184 |
1/1✓ Branch 1 taken 3 times.
|
3 | Curve ductStaticPressureResetCurve = modelObject.ductStaticPressureResetCurve(); |
| 185 |
2/3✓ Branch 1 taken 3 times.
✓ Branch 3 taken 3 times.
✗ Branch 4 not taken.
|
6 | if (boost::optional<IdfObject> _owo = translateAndMapModelObject(ductStaticPressureResetCurve)) { |
| 186 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
|
3 | idfObject.setString(Fan_ComponentModelFields::DuctStaticPressureResetCurveName, _owo->nameString()); |
| 187 | 3 | } | |
| 188 | |||
| 189 | // Normalized Fan Static Efficiency Curve Name-Non-Stall Region: Required Object | ||
| 190 |
1/1✓ Branch 1 taken 3 times.
|
3 | Curve normalizedFanStaticEfficiencyCurveNonStallRegion = modelObject.normalizedFanStaticEfficiencyCurveNonStallRegion(); |
| 191 |
2/3✓ Branch 1 taken 3 times.
✓ Branch 3 taken 3 times.
✗ Branch 4 not taken.
|
6 | if (boost::optional<IdfObject> _owo = translateAndMapModelObject(normalizedFanStaticEfficiencyCurveNonStallRegion)) { |
| 192 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
|
3 | idfObject.setString(Fan_ComponentModelFields::NormalizedFanStaticEfficiencyCurveNameNonStallRegion, _owo->nameString()); |
| 193 | 3 | } | |
| 194 | |||
| 195 | // Normalized Fan Static Efficiency Curve Name-Stall Region: Required Object | ||
| 196 |
1/1✓ Branch 1 taken 3 times.
|
3 | Curve normalizedFanStaticEfficiencyCurveStallRegion = modelObject.normalizedFanStaticEfficiencyCurveStallRegion(); |
| 197 |
2/3✓ Branch 1 taken 3 times.
✓ Branch 3 taken 3 times.
✗ Branch 4 not taken.
|
6 | if (boost::optional<IdfObject> _owo = translateAndMapModelObject(normalizedFanStaticEfficiencyCurveStallRegion)) { |
| 198 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
|
3 | idfObject.setString(Fan_ComponentModelFields::NormalizedFanStaticEfficiencyCurveNameStallRegion, _owo->nameString()); |
| 199 | 3 | } | |
| 200 | |||
| 201 | // Normalized Dimensionless Airflow Curve Name-Non-Stall Region: Required Object | ||
| 202 |
1/1✓ Branch 1 taken 3 times.
|
3 | Curve normalizedDimensionlessAirflowCurveNonStallRegion = modelObject.normalizedDimensionlessAirflowCurveNonStallRegion(); |
| 203 |
2/3✓ Branch 1 taken 3 times.
✓ Branch 3 taken 3 times.
✗ Branch 4 not taken.
|
6 | if (boost::optional<IdfObject> _owo = translateAndMapModelObject(normalizedDimensionlessAirflowCurveNonStallRegion)) { |
| 204 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
|
3 | idfObject.setString(Fan_ComponentModelFields::NormalizedDimensionlessAirflowCurveNameNonStallRegion, _owo->nameString()); |
| 205 | 3 | } | |
| 206 | |||
| 207 | // Normalized Dimensionless Airflow Curve Name-Stall Region: Required Object | ||
| 208 |
1/1✓ Branch 1 taken 3 times.
|
3 | Curve normalizedDimensionlessAirflowCurveStallRegion = modelObject.normalizedDimensionlessAirflowCurveStallRegion(); |
| 209 |
2/3✓ Branch 1 taken 3 times.
✓ Branch 3 taken 3 times.
✗ Branch 4 not taken.
|
6 | if (boost::optional<IdfObject> _owo = translateAndMapModelObject(normalizedDimensionlessAirflowCurveStallRegion)) { |
| 210 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
|
3 | idfObject.setString(Fan_ComponentModelFields::NormalizedDimensionlessAirflowCurveNameStallRegion, _owo->nameString()); |
| 211 | 3 | } | |
| 212 | |||
| 213 | // Maximum Belt Efficiency Curve Name: Optional Object | ||
| 214 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 2 times.
|
6 | if (boost::optional<Curve> _maximumBeltEfficiencyCurve = modelObject.maximumBeltEfficiencyCurve()) { |
| 215 |
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(_maximumBeltEfficiencyCurve.get())) { |
| 216 |
3/3✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
|
1 | idfObject.setString(Fan_ComponentModelFields::MaximumBeltEfficiencyCurveName, _owo->nameString()); |
| 217 | 1 | } | |
| 218 | 3 | } | |
| 219 | |||
| 220 | // Normalized Belt Efficiency Curve Name - Region 1: Optional Object | ||
| 221 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 2 times.
|
6 | if (boost::optional<Curve> _normalizedBeltEfficiencyCurveRegion1 = modelObject.normalizedBeltEfficiencyCurveRegion1()) { |
| 222 |
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(_normalizedBeltEfficiencyCurveRegion1.get())) { |
| 223 |
3/3✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
|
1 | idfObject.setString(Fan_ComponentModelFields::NormalizedBeltEfficiencyCurveNameRegion1, _owo->nameString()); |
| 224 | 1 | } | |
| 225 | 3 | } | |
| 226 | |||
| 227 | // Normalized Belt Efficiency Curve Name - Region 2: Optional Object | ||
| 228 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 2 times.
|
6 | if (boost::optional<Curve> _normalizedBeltEfficiencyCurveRegion2 = modelObject.normalizedBeltEfficiencyCurveRegion2()) { |
| 229 |
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(_normalizedBeltEfficiencyCurveRegion2.get())) { |
| 230 |
3/3✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
|
1 | idfObject.setString(Fan_ComponentModelFields::NormalizedBeltEfficiencyCurveNameRegion2, _owo->nameString()); |
| 231 | 1 | } | |
| 232 | 3 | } | |
| 233 | |||
| 234 | // Normalized Belt Efficiency Curve Name - Region 3: Optional Object | ||
| 235 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 2 times.
|
6 | if (boost::optional<Curve> _normalizedBeltEfficiencyCurveRegion3 = modelObject.normalizedBeltEfficiencyCurveRegion3()) { |
| 236 |
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(_normalizedBeltEfficiencyCurveRegion3.get())) { |
| 237 |
3/3✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
|
1 | idfObject.setString(Fan_ComponentModelFields::NormalizedBeltEfficiencyCurveNameRegion3, _owo->nameString()); |
| 238 | 1 | } | |
| 239 | 3 | } | |
| 240 | |||
| 241 | // Maximum Motor Efficiency Curve Name: Optional Object | ||
| 242 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 2 times.
|
6 | if (boost::optional<Curve> _maximumMotorEfficiencyCurve = modelObject.maximumMotorEfficiencyCurve()) { |
| 243 |
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(_maximumMotorEfficiencyCurve.get())) { |
| 244 |
3/3✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
|
1 | idfObject.setString(Fan_ComponentModelFields::MaximumMotorEfficiencyCurveName, _owo->nameString()); |
| 245 | 1 | } | |
| 246 | 3 | } | |
| 247 | |||
| 248 | // Normalized Motor Efficiency Curve Name: Optional Object | ||
| 249 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 2 times.
|
6 | if (boost::optional<Curve> _normalizedMotorEfficiencyCurve = modelObject.normalizedMotorEfficiencyCurve()) { |
| 250 |
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(_normalizedMotorEfficiencyCurve.get())) { |
| 251 |
3/3✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
|
1 | idfObject.setString(Fan_ComponentModelFields::NormalizedMotorEfficiencyCurveName, _owo->nameString()); |
| 252 | 1 | } | |
| 253 | 3 | } | |
| 254 | |||
| 255 | // VFD Efficiency Curve Name: Optional Object | ||
| 256 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 2 times.
|
6 | if (boost::optional<Curve> _vFDEfficiencyCurve = modelObject.vFDEfficiencyCurve()) { |
| 257 |
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(_vFDEfficiencyCurve.get())) { |
| 258 |
3/3✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
|
1 | idfObject.setString(Fan_ComponentModelFields::VFDEfficiencyCurveName, _owo->nameString()); |
| 259 | 1 | } | |
| 260 | 3 | } | |
| 261 | |||
| 262 | // End-Use Subcategory: Optional String | ||
| 263 |
1/1✓ Branch 1 taken 3 times.
|
3 | std::string endUseSubcategory = modelObject.endUseSubcategory(); |
| 264 |
1/1✓ Branch 1 taken 3 times.
|
3 | idfObject.setString(Fan_ComponentModelFields::EndUseSubcategory, endUseSubcategory); |
| 265 | |||
| 266 |
1/1✓ Branch 1 taken 3 times.
|
3 | result = idfObject; |
| 267 | 6 | return result; | |
| 268 | 3 | } // End of translate function | |
| 269 | |||
| 270 | } // end namespace energyplus | ||
| 271 | } // end namespace openstudio | ||
| 272 |