src/energyplus/ForwardTranslator/ForwardTranslateHeatBalanceAlgorithm.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/HeatBalanceAlgorithm.hpp" | ||
| 8 | #include "../../utilities/idd/IddEnums.hpp" | ||
| 9 | #include <utilities/idd/HeatBalanceAlgorithm_FieldEnums.hxx> | ||
| 10 | #include <utilities/idd/IddEnums.hxx> | ||
| 11 | |||
| 12 | using namespace openstudio::model; | ||
| 13 | |||
| 14 | namespace openstudio { | ||
| 15 | |||
| 16 | namespace energyplus { | ||
| 17 | |||
| 18 | 46 | boost::optional<IdfObject> ForwardTranslator::translateHeatBalanceAlgorithm(HeatBalanceAlgorithm& modelObject) { | |
| 19 |
2/2✓ Branch 1 taken 46 times.
✓ Branch 4 taken 46 times.
|
46 | IdfObject idfObject(openstudio::IddObjectType::HeatBalanceAlgorithm); |
| 20 | |||
| 21 |
2/2✓ Branch 1 taken 46 times.
✓ Branch 4 taken 46 times.
|
46 | idfObject.setString(HeatBalanceAlgorithmFields::Algorithm, modelObject.algorithm()); |
| 22 | |||
| 23 |
2/2✓ Branch 1 taken 46 times.
✓ Branch 4 taken 46 times.
|
46 | idfObject.setDouble(HeatBalanceAlgorithmFields::SurfaceTemperatureUpperLimit, modelObject.surfaceTemperatureUpperLimit()); |
| 24 | |||
| 25 |
2/3✓ Branch 1 taken 46 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 46 times.
|
46 | if (!modelObject.isMinimumSurfaceConvectionHeatTransferCoefficientValueDefaulted()) { |
| 26 | ✗ | idfObject.setDouble(HeatBalanceAlgorithmFields::MinimumSurfaceConvectionHeatTransferCoefficientValue, | |
| 27 | modelObject.minimumSurfaceConvectionHeatTransferCoefficientValue()); | ||
| 28 | } | ||
| 29 | |||
| 30 |
2/3✓ Branch 1 taken 46 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 46 times.
|
46 | if (!modelObject.isMaximumSurfaceConvectionHeatTransferCoefficientValueDefaulted()) { |
| 31 | ✗ | idfObject.setDouble(HeatBalanceAlgorithmFields::MaximumSurfaceConvectionHeatTransferCoefficientValue, | |
| 32 | modelObject.maximumSurfaceConvectionHeatTransferCoefficientValue()); | ||
| 33 | } | ||
| 34 | |||
| 35 |
1/1✓ Branch 1 taken 46 times.
|
46 | m_idfObjects.push_back(idfObject); |
| 36 | |||
| 37 |
1/1✓ Branch 1 taken 46 times.
|
92 | return boost::optional<IdfObject>(idfObject); |
| 38 | 46 | } | |
| 39 | |||
| 40 | } // namespace energyplus | ||
| 41 | |||
| 42 | } // namespace openstudio | ||
| 43 |