src/energyplus/ForwardTranslator/ForwardTranslateZoneHVACDehumidifierDX.cpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /*********************************************************************************************************************** | ||
| 2 | * OpenStudio(R), Copyright (c) Alliance for Energy Innovation, LLC. | ||
| 3 | * See also https://openstudio.net/license | ||
| 4 | ***********************************************************************************************************************/ | ||
| 5 | |||
| 6 | #include "../ForwardTranslator.hpp" | ||
| 7 | #include "../../model/Model.hpp" | ||
| 8 | #include "../../model/Schedule.hpp" | ||
| 9 | #include "../../model/Schedule_Impl.hpp" | ||
| 10 | #include "../../model/Node.hpp" | ||
| 11 | #include "../../model/Node_Impl.hpp" | ||
| 12 | #include "../../model/Curve.hpp" | ||
| 13 | #include "../../model/Curve_Impl.hpp" | ||
| 14 | #include "../../model/ZoneHVACDehumidifierDX.hpp" | ||
| 15 | #include "../../model/ZoneHVACDehumidifierDX_Impl.hpp" | ||
| 16 | #include <utilities/idd/ZoneHVAC_Dehumidifier_DX_FieldEnums.hxx> | ||
| 17 | #include "../../utilities/idd/IddEnums.hpp" | ||
| 18 | #include <utilities/idd/IddEnums.hxx> | ||
| 19 | #include <utilities/idd/IddFactory.hxx> | ||
| 20 | |||
| 21 | using namespace openstudio::model; | ||
| 22 | |||
| 23 | namespace openstudio { | ||
| 24 | |||
| 25 | namespace energyplus { | ||
| 26 | |||
| 27 | ✗ | boost::optional<IdfObject> ForwardTranslator::translateZoneHVACDehumidifierDX(ZoneHVACDehumidifierDX& modelObject) { | |
| 28 | ✗ | boost::optional<std::string> s; | |
| 29 | ✗ | boost::optional<double> value; | |
| 30 | ✗ | boost::optional<ModelObject> temp; | |
| 31 | |||
| 32 | // Name | ||
| 33 | ✗ | IdfObject idfObject = createRegisterAndNameIdfObject(openstudio::IddObjectType::ZoneHVAC_Dehumidifier_DX, modelObject); | |
| 34 | |||
| 35 | // AvailabilityScheduleName | ||
| 36 | { | ||
| 37 | ✗ | auto schedule = modelObject.availabilitySchedule(); | |
| 38 | ✗ | if (auto _schedule = translateAndMapModelObject(schedule)) { | |
| 39 | ✗ | idfObject.setString(ZoneHVAC_Dehumidifier_DXFields::AvailabilityScheduleName, _schedule->name().get()); | |
| 40 | ✗ | } | |
| 41 | ✗ | } | |
| 42 | |||
| 43 | // AirInletNodeName | ||
| 44 | ✗ | if (auto node = modelObject.inletNode()) { | |
| 45 | ✗ | idfObject.setString(ZoneHVAC_Dehumidifier_DXFields::AirInletNodeName, node->name().get()); | |
| 46 | ✗ | } | |
| 47 | |||
| 48 | // AirOutletNodeName | ||
| 49 | ✗ | if (auto node = modelObject.outletNode()) { | |
| 50 | ✗ | idfObject.setString(ZoneHVAC_Dehumidifier_DXFields::AirOutletNodeName, node->name().get()); | |
| 51 | ✗ | } | |
| 52 | |||
| 53 | // RatedWaterRemoval | ||
| 54 | ✗ | if ((value = modelObject.ratedWaterRemoval())) { | |
| 55 | ✗ | idfObject.setDouble(ZoneHVAC_Dehumidifier_DXFields::RatedWaterRemoval, value.get()); | |
| 56 | } | ||
| 57 | |||
| 58 | // RatedEnergyFactor | ||
| 59 | ✗ | if ((value = modelObject.ratedEnergyFactor())) { | |
| 60 | ✗ | idfObject.setDouble(ZoneHVAC_Dehumidifier_DXFields::RatedEnergyFactor, value.get()); | |
| 61 | } | ||
| 62 | |||
| 63 | // RatedAirFlowRate | ||
| 64 | ✗ | if ((value = modelObject.ratedAirFlowRate())) { | |
| 65 | ✗ | idfObject.setDouble(ZoneHVAC_Dehumidifier_DXFields::RatedAirFlowRate, value.get()); | |
| 66 | } | ||
| 67 | |||
| 68 | // WaterRemovalCurveName | ||
| 69 | { | ||
| 70 | ✗ | auto curve = modelObject.waterRemovalCurve(); | |
| 71 | ✗ | if (auto _curve = translateAndMapModelObject(curve)) { | |
| 72 | ✗ | idfObject.setString(ZoneHVAC_Dehumidifier_DXFields::WaterRemovalCurveName, _curve->name().get()); | |
| 73 | ✗ | } | |
| 74 | ✗ | } | |
| 75 | |||
| 76 | // EnergyFactorCurveName | ||
| 77 | { | ||
| 78 | ✗ | auto curve = modelObject.energyFactorCurve(); | |
| 79 | ✗ | if (auto _curve = translateAndMapModelObject(curve)) { | |
| 80 | ✗ | idfObject.setString(ZoneHVAC_Dehumidifier_DXFields::EnergyFactorCurveName, _curve->name().get()); | |
| 81 | ✗ | } | |
| 82 | ✗ | } | |
| 83 | |||
| 84 | // PartLoadFractionCorrelationCurveName | ||
| 85 | { | ||
| 86 | ✗ | auto curve = modelObject.partLoadFractionCorrelationCurve(); | |
| 87 | ✗ | if (auto _curve = translateAndMapModelObject(curve)) { | |
| 88 | ✗ | idfObject.setString(ZoneHVAC_Dehumidifier_DXFields::PartLoadFractionCorrelationCurveName, _curve->name().get()); | |
| 89 | ✗ | } | |
| 90 | ✗ | } | |
| 91 | |||
| 92 | // MinimumDry-BulbTemperatureforDehumidifierOperation | ||
| 93 | ✗ | if ((value = modelObject.minimumDryBulbTemperatureforDehumidifierOperation())) { | |
| 94 | ✗ | idfObject.setDouble(ZoneHVAC_Dehumidifier_DXFields::MinimumDryBulbTemperatureforDehumidifierOperation, value.get()); | |
| 95 | } | ||
| 96 | |||
| 97 | // MaximumDry-BulbTemperatureforDehumidifierOperation | ||
| 98 | ✗ | if ((value = modelObject.maximumDryBulbTemperatureforDehumidifierOperation())) { | |
| 99 | ✗ | idfObject.setDouble(ZoneHVAC_Dehumidifier_DXFields::MaximumDryBulbTemperatureforDehumidifierOperation, value.get()); | |
| 100 | } | ||
| 101 | |||
| 102 | // Off-CycleParasiticElectricLoad | ||
| 103 | ✗ | if ((value = modelObject.offCycleParasiticElectricLoad())) { | |
| 104 | ✗ | idfObject.setDouble(ZoneHVAC_Dehumidifier_DXFields::OffCycleParasiticElectricLoad, value.get()); | |
| 105 | } | ||
| 106 | |||
| 107 | // CondensateCollectionWaterStorageTankName | ||
| 108 | |||
| 109 | ✗ | return idfObject; | |
| 110 | ✗ | } | |
| 111 | |||
| 112 | } // namespace energyplus | ||
| 113 | |||
| 114 | } // namespace openstudio | ||
| 115 |