src/energyplus/ForwardTranslator/ForwardTranslateCoilCoolingDXCurveFitSpeed.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/CoilCoolingDXCurveFitSpeed.hpp" | ||
| 10 | |||
| 11 | #include "../../model/Curve.hpp" | ||
| 12 | #include "../../model/Curve_Impl.hpp" | ||
| 13 | |||
| 14 | #include <utilities/idd/Coil_Cooling_DX_CurveFit_Speed_FieldEnums.hxx> | ||
| 15 | #include "../../utilities/idd/IddEnums.hpp" | ||
| 16 | #include <utilities/idd/IddEnums.hxx> | ||
| 17 | |||
| 18 | using namespace openstudio::model; | ||
| 19 | |||
| 20 | namespace openstudio { | ||
| 21 | |||
| 22 | namespace energyplus { | ||
| 23 | |||
| 24 | 11 | boost::optional<IdfObject> ForwardTranslator::translateCoilCoolingDXCurveFitSpeed(CoilCoolingDXCurveFitSpeed& modelObject) { | |
| 25 | 11 | boost::optional<std::string> s; | |
| 26 | 11 | boost::optional<double> value; | |
| 27 | |||
| 28 |
2/2✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
|
11 | IdfObject idfObject(openstudio::IddObjectType::Coil_Cooling_DX_CurveFit_Speed); |
| 29 | |||
| 30 |
1/1✓ Branch 1 taken 11 times.
|
11 | m_idfObjects.push_back(idfObject); |
| 31 | |||
| 32 | // Name | ||
| 33 |
3/3✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
✓ Branch 7 taken 11 times.
|
11 | idfObject.setString(Coil_Cooling_DX_CurveFit_SpeedFields::Name, modelObject.name().get()); |
| 34 | |||
| 35 | // GrossTotalCoolingCapacityFunction | ||
| 36 |
2/2✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
|
11 | idfObject.setDouble(Coil_Cooling_DX_CurveFit_SpeedFields::GrossTotalCoolingCapacityFraction, modelObject.grossTotalCoolingCapacityFraction()); |
| 37 | |||
| 38 | // EvaporatorAirFlowRateFraction | ||
| 39 |
2/2✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
|
11 | idfObject.setDouble(Coil_Cooling_DX_CurveFit_SpeedFields::EvaporatorAirFlowRateFraction, modelObject.evaporatorAirFlowRateFraction()); |
| 40 | |||
| 41 | // CondenserAirFlowRateFraction: (Unused if parent operatingMode's condenserType = "AirCooled") | ||
| 42 |
2/2✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
|
11 | idfObject.setDouble(Coil_Cooling_DX_CurveFit_SpeedFields::CondenserAirFlowRateFraction, modelObject.condenserAirFlowRateFraction()); |
| 43 | |||
| 44 | // GrossSensibleHeatRatio | ||
| 45 |
1/1✓ Branch 1 taken 11 times.
|
11 | value = modelObject.grossSensibleHeatRatio(); |
| 46 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 11 times.
|
11 | if (value) { |
| 47 | ✗ | idfObject.setDouble(Coil_Cooling_DX_CurveFit_SpeedFields::GrossSensibleHeatRatio, value.get()); | |
| 48 | } else { | ||
| 49 |
2/2✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
|
22 | idfObject.setString(Coil_Cooling_DX_CurveFit_SpeedFields::GrossSensibleHeatRatio, "Autosize"); |
| 50 | } | ||
| 51 | |||
| 52 | // GrossCoolingCOP | ||
| 53 |
2/2✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
|
11 | idfObject.setDouble(Coil_Cooling_DX_CurveFit_SpeedFields::GrossCoolingCOP, modelObject.grossCoolingCOP()); |
| 54 | |||
| 55 | // ActiveFractionofCoilFaceArea | ||
| 56 |
2/2✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
|
11 | idfObject.setDouble(Coil_Cooling_DX_CurveFit_SpeedFields::ActiveFractionofCoilFaceArea, modelObject.activeFractionofCoilFaceArea()); |
| 57 | |||
| 58 | // RatedEvaporatorFanPowerPerVolumeFlowRate2017 | ||
| 59 |
2/2✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
|
11 | idfObject.setDouble(Coil_Cooling_DX_CurveFit_SpeedFields::RatedEvaporatorFanPowerPerVolumeFlowRate2017, |
| 60 | modelObject.ratedEvaporatorFanPowerPerVolumeFlowRate2017()); | ||
| 61 | |||
| 62 | // RatedEvaporatorFanPowerPerVolumeFlowRate2023 | ||
| 63 |
2/2✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
|
11 | idfObject.setDouble(Coil_Cooling_DX_CurveFit_SpeedFields::RatedEvaporatorFanPowerPerVolumeFlowRate2023, |
| 64 | modelObject.ratedEvaporatorFanPowerPerVolumeFlowRate2023()); | ||
| 65 | |||
| 66 | // EvaporativeCondenserPumpPowerFraction | ||
| 67 |
2/2✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
|
11 | idfObject.setDouble(Coil_Cooling_DX_CurveFit_SpeedFields::EvaporativeCondenserPumpPowerFraction, |
| 68 | modelObject.evaporativeCondenserPumpPowerFraction()); | ||
| 69 | |||
| 70 | // EvaporativeCondenserEffectiveness | ||
| 71 |
2/2✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
|
11 | idfObject.setDouble(Coil_Cooling_DX_CurveFit_SpeedFields::EvaporativeCondenserEffectiveness, modelObject.evaporativeCondenserEffectiveness()); |
| 72 | |||
| 73 | // TotalCoolingCapacityModifierFunctionofTemperatureCurveName | ||
| 74 |
3/3✓ Branch 1 taken 11 times.
✓ Branch 3 taken 8 times.
✓ Branch 4 taken 3 times.
|
22 | if (auto optCurve = modelObject.totalCoolingCapacityModifierFunctionofTemperatureCurve()) { |
| 75 |
3/4✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
✓ Branch 6 taken 8 times.
✗ Branch 7 not taken.
|
16 | if (auto _curve = translateAndMapModelObject(optCurve.get())) { |
| 76 |
4/4✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
✓ Branch 7 taken 8 times.
✓ Branch 10 taken 8 times.
|
8 | idfObject.setString(Coil_Cooling_DX_CurveFit_SpeedFields::TotalCoolingCapacityModifierFunctionofTemperatureCurveName, _curve->name().get()); |
| 77 | 8 | } | |
| 78 | 11 | } | |
| 79 | |||
| 80 | // TotalCoolingCapacityModifierFunctionofAirFlowFractionCurveName | ||
| 81 |
3/3✓ Branch 1 taken 11 times.
✓ Branch 3 taken 7 times.
✓ Branch 4 taken 4 times.
|
22 | if (auto optCurve = modelObject.totalCoolingCapacityModifierFunctionofAirFlowFractionCurve()) { |
| 82 |
3/4✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 6 taken 7 times.
✗ Branch 7 not taken.
|
14 | if (auto _curve = translateAndMapModelObject(optCurve.get())) { |
| 83 | 7 | idfObject.setString(Coil_Cooling_DX_CurveFit_SpeedFields::TotalCoolingCapacityModifierFunctionofAirFlowFractionCurveName, | |
| 84 |
4/4✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 7 taken 7 times.
✓ Branch 10 taken 7 times.
|
7 | _curve->name().get()); |
| 85 | 7 | } | |
| 86 | 11 | } | |
| 87 | |||
| 88 | // EnergyInputRatioModifierFunctionofTemperatureCurveName | ||
| 89 |
3/3✓ Branch 1 taken 11 times.
✓ Branch 3 taken 6 times.
✓ Branch 4 taken 5 times.
|
22 | if (auto optCurve = modelObject.energyInputRatioModifierFunctionofTemperatureCurve()) { |
| 90 |
3/4✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
✓ Branch 6 taken 6 times.
✗ Branch 7 not taken.
|
12 | if (auto _curve = translateAndMapModelObject(optCurve.get())) { |
| 91 |
4/4✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
✓ Branch 7 taken 6 times.
✓ Branch 10 taken 6 times.
|
6 | idfObject.setString(Coil_Cooling_DX_CurveFit_SpeedFields::EnergyInputRatioModifierFunctionofTemperatureCurveName, _curve->name().get()); |
| 92 | 6 | } | |
| 93 | 11 | } | |
| 94 | |||
| 95 | // EnergyInputRatioModifierFunctionofAirFlowFractionCurveName | ||
| 96 |
3/3✓ Branch 1 taken 11 times.
✓ Branch 3 taken 5 times.
✓ Branch 4 taken 6 times.
|
22 | if (auto optCurve = modelObject.energyInputRatioModifierFunctionofAirFlowFractionCurve()) { |
| 97 |
3/4✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 6 taken 5 times.
✗ Branch 7 not taken.
|
10 | if (auto _curve = translateAndMapModelObject(optCurve.get())) { |
| 98 |
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(Coil_Cooling_DX_CurveFit_SpeedFields::EnergyInputRatioModifierFunctionofAirFlowFractionCurveName, _curve->name().get()); |
| 99 | 5 | } | |
| 100 | 11 | } | |
| 101 | |||
| 102 | // PartLoadFractionCorrelationCurveName | ||
| 103 |
3/3✓ Branch 1 taken 11 times.
✓ Branch 3 taken 4 times.
✓ Branch 4 taken 7 times.
|
22 | if (auto optCurve = modelObject.partLoadFractionCorrelationCurve()) { |
| 104 |
3/4✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 6 taken 4 times.
✗ Branch 7 not taken.
|
8 | if (auto _curve = translateAndMapModelObject(optCurve.get())) { |
| 105 |
4/4✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
✓ Branch 10 taken 4 times.
|
4 | idfObject.setString(Coil_Cooling_DX_CurveFit_SpeedFields::PartLoadFractionCorrelationCurveName, _curve->name().get()); |
| 106 | 4 | } | |
| 107 | 11 | } | |
| 108 | |||
| 109 | // WasteHeatModifierFunctionofTemperatureCurveName | ||
| 110 |
3/3✓ Branch 1 taken 11 times.
✓ Branch 3 taken 3 times.
✓ Branch 4 taken 8 times.
|
22 | if (auto optCurve = modelObject.wasteHeatModifierFunctionofTemperatureCurve()) { |
| 111 |
3/4✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 6 taken 3 times.
✗ Branch 7 not taken.
|
6 | if (auto _curve = translateAndMapModelObject(optCurve.get())) { |
| 112 |
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(Coil_Cooling_DX_CurveFit_SpeedFields::WasteHeatModifierFunctionofTemperatureCurveName, _curve->name().get()); |
| 113 | 3 | } | |
| 114 | 11 | } | |
| 115 | |||
| 116 | // RatedWasteHeatFractionofPowerInput | ||
| 117 |
2/2✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
|
11 | idfObject.setDouble(Coil_Cooling_DX_CurveFit_SpeedFields::RatedWasteHeatFractionofPowerInput, modelObject.ratedWasteHeatFractionofPowerInput()); |
| 118 | |||
| 119 | // SensibleHeatRatioModifierFunctionofTemperatureCurveName | ||
| 120 |
3/3✓ Branch 1 taken 11 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 9 times.
|
22 | if (auto optCurve = modelObject.sensibleHeatRatioModifierFunctionofTemperatureCurve()) { |
| 121 |
3/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 6 taken 2 times.
✗ Branch 7 not taken.
|
4 | if (auto _curve = translateAndMapModelObject(optCurve.get())) { |
| 122 |
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(Coil_Cooling_DX_CurveFit_SpeedFields::SensibleHeatRatioModifierFunctionofTemperatureCurveName, _curve->name().get()); |
| 123 | 2 | } | |
| 124 | 11 | } | |
| 125 | |||
| 126 | // SensibleHeatRatioModifierFunctionofFlowFractionCurveName | ||
| 127 |
3/3✓ Branch 1 taken 11 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 10 times.
|
22 | if (auto optCurve = modelObject.sensibleHeatRatioModifierFunctionofFlowFractionCurve()) { |
| 128 |
3/4✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 6 taken 1 time.
✗ Branch 7 not taken.
|
2 | if (auto _curve = translateAndMapModelObject(optCurve.get())) { |
| 129 |
4/4✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
|
1 | idfObject.setString(Coil_Cooling_DX_CurveFit_SpeedFields::SensibleHeatRatioModifierFunctionofFlowFractionCurveName, _curve->name().get()); |
| 130 | 1 | } | |
| 131 | 11 | } | |
| 132 | |||
| 133 |
1/1✓ Branch 1 taken 11 times.
|
22 | return boost::optional<IdfObject>(idfObject); |
| 134 | 11 | } // End of translate function | |
| 135 | |||
| 136 | } // end namespace energyplus | ||
| 137 | } // end namespace openstudio | ||
| 138 |