src/energyplus/ForwardTranslator/ForwardTranslateRefrigerationSubcoolerLiquidSuction.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/RefrigerationSystem.hpp" | ||
| 9 | #include "../../model/RefrigerationSubcoolerLiquidSuction.hpp" | ||
| 10 | |||
| 11 | #include <utilities/idd/Refrigeration_Subcooler_FieldEnums.hxx> | ||
| 12 | #include "../../utilities/idd/IddEnums.hpp" | ||
| 13 | #include <utilities/idd/IddEnums.hxx> | ||
| 14 | #include <utilities/idd/IddFactory.hxx> | ||
| 15 | |||
| 16 | using namespace openstudio::model; | ||
| 17 | |||
| 18 | namespace openstudio { | ||
| 19 | |||
| 20 | namespace energyplus { | ||
| 21 | |||
| 22 | ✗ | boost::optional<IdfObject> ForwardTranslator::translateRefrigerationSubcoolerLiquidSuction(RefrigerationSubcoolerLiquidSuction& modelObject) { | |
| 23 | ✗ | OptionalModelObject temp; | |
| 24 | ✗ | OptionalString optS; | |
| 25 | ✗ | boost::optional<std::string> s; | |
| 26 | ✗ | boost::optional<double> d; | |
| 27 | |||
| 28 | // Name | ||
| 29 | ✗ | IdfObject subcoolerLiquidSuction = createRegisterAndNameIdfObject(openstudio::IddObjectType::Refrigeration_Subcooler, modelObject); | |
| 30 | |||
| 31 | // Subcooler Type | ||
| 32 | ✗ | subcoolerLiquidSuction.setString(Refrigeration_SubcoolerFields::SubcoolerType, "LiquidSuction"); | |
| 33 | |||
| 34 | // Liquid Suction Design Subcooling Temperature Difference | ||
| 35 | ✗ | d = modelObject.liquidSuctionDesignSubcoolingTemperatureDifference(); | |
| 36 | ✗ | if (d) { | |
| 37 | ✗ | subcoolerLiquidSuction.setDouble(Refrigeration_SubcoolerFields::LiquidSuctionDesignSubcoolingTemperatureDifference, d.get()); | |
| 38 | } | ||
| 39 | |||
| 40 | // Design Liquid Inlet Temperature | ||
| 41 | ✗ | d = modelObject.designLiquidInletTemperature(); | |
| 42 | ✗ | if (d) { | |
| 43 | ✗ | subcoolerLiquidSuction.setDouble(Refrigeration_SubcoolerFields::DesignLiquidInletTemperature, d.get()); | |
| 44 | } | ||
| 45 | |||
| 46 | // Design Vapor Inlet Temperature | ||
| 47 | ✗ | d = modelObject.designVaporInletTemperature(); | |
| 48 | ✗ | if (d) { | |
| 49 | ✗ | subcoolerLiquidSuction.setDouble(Refrigeration_SubcoolerFields::DesignVaporInletTemperature, d.get()); | |
| 50 | } | ||
| 51 | |||
| 52 | ✗ | return subcoolerLiquidSuction; | |
| 53 | ✗ | } | |
| 54 | } // namespace energyplus | ||
| 55 | } // namespace openstudio | ||
| 56 |