src/energyplus/ForwardTranslator/ForwardTranslateZoneHVACEnergyRecoveryVentilatorController.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/ZoneHVACEnergyRecoveryVentilatorController.hpp" | ||
| 13 | #include "../../model/ZoneHVACEnergyRecoveryVentilatorController_Impl.hpp" | ||
| 14 | #include "../../model/ThermalZone.hpp" | ||
| 15 | #include "../../model/ThermalZone_Impl.hpp" | ||
| 16 | #include "../../model/Curve.hpp" | ||
| 17 | #include <utilities/idd/ZoneHVAC_EnergyRecoveryVentilator_Controller_FieldEnums.hxx> | ||
| 18 | #include "../../utilities/idd/IddEnums.hpp" | ||
| 19 | #include <utilities/idd/IddEnums.hxx> | ||
| 20 | #include <utilities/idd/IddFactory.hxx> | ||
| 21 | |||
| 22 | using namespace openstudio::model; | ||
| 23 | |||
| 24 | namespace openstudio { | ||
| 25 | |||
| 26 | namespace energyplus { | ||
| 27 | |||
| 28 | boost::optional<IdfObject> | ||
| 29 | ✗ | ForwardTranslator::translateZoneHVACEnergyRecoveryVentilatorController(ZoneHVACEnergyRecoveryVentilatorController& modelObject) { | |
| 30 | ✗ | boost::optional<std::string> s; | |
| 31 | ✗ | boost::optional<double> value; | |
| 32 | ✗ | boost::optional<ModelObject> temp; | |
| 33 | |||
| 34 | // Name | ||
| 35 | ✗ | IdfObject idfObject = createRegisterAndNameIdfObject(openstudio::IddObjectType::ZoneHVAC_EnergyRecoveryVentilator_Controller, modelObject); | |
| 36 | |||
| 37 | // TemperatureHighLimit | ||
| 38 | ✗ | if ((value = modelObject.temperatureHighLimit())) { | |
| 39 | ✗ | idfObject.setDouble(ZoneHVAC_EnergyRecoveryVentilator_ControllerFields::TemperatureHighLimit, value.get()); | |
| 40 | } | ||
| 41 | |||
| 42 | // TemperatureLowLimit | ||
| 43 | ✗ | if ((value = modelObject.temperatureLowLimit())) { | |
| 44 | ✗ | idfObject.setDouble(ZoneHVAC_EnergyRecoveryVentilator_ControllerFields::TemperatureLowLimit, value.get()); | |
| 45 | } | ||
| 46 | |||
| 47 | // EnthalpyHighLimit | ||
| 48 | ✗ | if ((value = modelObject.enthalpyHighLimit())) { | |
| 49 | ✗ | idfObject.setDouble(ZoneHVAC_EnergyRecoveryVentilator_ControllerFields::EnthalpyHighLimit, value.get()); | |
| 50 | } | ||
| 51 | |||
| 52 | // DewpointTemperatureLimit | ||
| 53 | ✗ | if ((value = modelObject.dewpointTemperatureLimit())) { | |
| 54 | ✗ | idfObject.setDouble(ZoneHVAC_EnergyRecoveryVentilator_ControllerFields::DewpointTemperatureLimit, value.get()); | |
| 55 | } | ||
| 56 | |||
| 57 | // ElectronicEnthalpyLimitCurveName | ||
| 58 | ✗ | if ((temp = modelObject.electronicEnthalpyLimitCurve())) { | |
| 59 | ✗ | if (auto _curve = translateAndMapModelObject(temp.get())) { | |
| 60 | ✗ | idfObject.setString(ZoneHVAC_EnergyRecoveryVentilator_ControllerFields::ElectronicEnthalpyLimitCurveName, _curve->name().get()); | |
| 61 | ✗ | } | |
| 62 | } | ||
| 63 | |||
| 64 | // ExhaustAirTemperatureLimit | ||
| 65 | ✗ | if ((s = modelObject.exhaustAirTemperatureLimit())) { | |
| 66 | ✗ | idfObject.setString(ZoneHVAC_EnergyRecoveryVentilator_ControllerFields::ExhaustAirTemperatureLimit, s.get()); | |
| 67 | } | ||
| 68 | |||
| 69 | // ExhaustAirEnthalpyLimit | ||
| 70 | ✗ | if ((s = modelObject.exhaustAirEnthalpyLimit())) { | |
| 71 | ✗ | idfObject.setString(ZoneHVAC_EnergyRecoveryVentilator_ControllerFields::ExhaustAirEnthalpyLimit, s.get()); | |
| 72 | } | ||
| 73 | |||
| 74 | // TimeofDayEconomizerFlowControlScheduleName | ||
| 75 | ✗ | if ((temp = modelObject.timeofDayEconomizerFlowControlSchedule())) { | |
| 76 | ✗ | if (auto _schedule = translateAndMapModelObject(temp.get())) { | |
| 77 | ✗ | idfObject.setString(ZoneHVAC_EnergyRecoveryVentilator_ControllerFields::TimeofDayEconomizerFlowControlScheduleName, _schedule->name().get()); | |
| 78 | ✗ | } | |
| 79 | } | ||
| 80 | |||
| 81 | // HighHumidityControlFlag | ||
| 82 | ✗ | if (modelObject.highHumidityControlFlag()) { | |
| 83 | ✗ | idfObject.setString(ZoneHVAC_EnergyRecoveryVentilator_ControllerFields::HighHumidityControlFlag, "Yes"); | |
| 84 | } else { | ||
| 85 | ✗ | idfObject.setString(ZoneHVAC_EnergyRecoveryVentilator_ControllerFields::HighHumidityControlFlag, "No"); | |
| 86 | } | ||
| 87 | |||
| 88 | // HumidistatControlZoneName | ||
| 89 | // Set in parent object | ||
| 90 | |||
| 91 | // HighHumidityOutdoorAirFlowRatio | ||
| 92 | ✗ | if ((value = modelObject.highHumidityOutdoorAirFlowRatio())) { | |
| 93 | ✗ | idfObject.setDouble(ZoneHVAC_EnergyRecoveryVentilator_ControllerFields::HighHumidityOutdoorAirFlowRatio, value.get()); | |
| 94 | } | ||
| 95 | // ControlHighIndoorHumidityBasedonOutdoorHumidityRatio | ||
| 96 | ✗ | if (modelObject.controlHighIndoorHumidityBasedonOutdoorHumidityRatio()) { | |
| 97 | ✗ | idfObject.setString(ZoneHVAC_EnergyRecoveryVentilator_ControllerFields::ControlHighIndoorHumidityBasedonOutdoorHumidityRatio, "Yes"); | |
| 98 | } else { | ||
| 99 | ✗ | idfObject.setString(ZoneHVAC_EnergyRecoveryVentilator_ControllerFields::ControlHighIndoorHumidityBasedonOutdoorHumidityRatio, "No"); | |
| 100 | } | ||
| 101 | |||
| 102 | ✗ | return idfObject; | |
| 103 | ✗ | } | |
| 104 | |||
| 105 | } // namespace energyplus | ||
| 106 | |||
| 107 | } // namespace openstudio | ||
| 108 |