src/energyplus/ForwardTranslator/ForwardTranslateSolarCollectorPerformanceIntegralCollectorStorage.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 | |||
| 8 | #include "../../model/SolarCollectorPerformanceIntegralCollectorStorage.hpp" | ||
| 9 | |||
| 10 | #include <utilities/idd/SolarCollectorPerformance_IntegralCollectorStorage_FieldEnums.hxx> | ||
| 11 | #include "../../utilities/idd/IddEnums.hpp" | ||
| 12 | #include <utilities/idd/IddEnums.hxx> | ||
| 13 | |||
| 14 | using namespace openstudio::model; | ||
| 15 | |||
| 16 | namespace openstudio { | ||
| 17 | |||
| 18 | namespace energyplus { | ||
| 19 | |||
| 20 | 1 | boost::optional<IdfObject> ForwardTranslator::translateSolarCollectorPerformanceIntegralCollectorStorage( | |
| 21 | model::SolarCollectorPerformanceIntegralCollectorStorage& modelObject) { | ||
| 22 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | IdfObject idfObject(openstudio::IddObjectType::SolarCollectorPerformance_IntegralCollectorStorage); |
| 23 | |||
| 24 |
1/1✓ Branch 1 taken 1 time.
|
1 | m_idfObjects.push_back(idfObject); |
| 25 | |||
| 26 | 1 | boost::optional<double> d; | |
| 27 | |||
| 28 |
3/3✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
|
1 | std::string name = modelObject.name().get(); |
| 29 |
1/1✓ Branch 1 taken 1 time.
|
1 | idfObject.setName(name); |
| 30 | |||
| 31 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setString(SolarCollectorPerformance_IntegralCollectorStorageFields::ICSCollectorType, modelObject.iCSCollectorType()); |
| 32 | |||
| 33 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | d = modelObject.grossArea(); |
| 34 |
1/2✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
|
1 | if (d) { |
| 35 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(SolarCollectorPerformance_IntegralCollectorStorageFields::GrossArea, *d); |
| 36 | } | ||
| 37 | |||
| 38 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | d = modelObject.collectorWaterVolume(); |
| 39 |
1/2✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
|
1 | if (d) { |
| 40 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(SolarCollectorPerformance_IntegralCollectorStorageFields::CollectorWaterVolume, *d); |
| 41 | } | ||
| 42 | |||
| 43 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(SolarCollectorPerformance_IntegralCollectorStorageFields::BottomHeatLossConductance, modelObject.bottomHeatLossConductance()); |
| 44 | |||
| 45 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(SolarCollectorPerformance_IntegralCollectorStorageFields::SideHeatLossConductance, modelObject.sideHeatLossConductance()); |
| 46 | |||
| 47 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(SolarCollectorPerformance_IntegralCollectorStorageFields::AspectRatio, modelObject.aspectRatio()); |
| 48 | |||
| 49 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(SolarCollectorPerformance_IntegralCollectorStorageFields::CollectorSideHeight, modelObject.collectorSideHeight()); |
| 50 | |||
| 51 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(SolarCollectorPerformance_IntegralCollectorStorageFields::ThermalMassofAbsorberPlate, |
| 52 | modelObject.thermalMassOfAbsorberPlate()); | ||
| 53 | |||
| 54 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setInt(SolarCollectorPerformance_IntegralCollectorStorageFields::NumberofCovers, modelObject.numberOfCovers()); |
| 55 | |||
| 56 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(SolarCollectorPerformance_IntegralCollectorStorageFields::CoverSpacing, modelObject.coverSpacing()); |
| 57 | |||
| 58 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(SolarCollectorPerformance_IntegralCollectorStorageFields::RefractiveIndexofOuterCover, |
| 59 | modelObject.refractiveIndexOfOuterCover()); | ||
| 60 | |||
| 61 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(SolarCollectorPerformance_IntegralCollectorStorageFields::ExtinctionCoefficientTimesThicknessofOuterCover, |
| 62 | modelObject.extinctionCoefficientTimesThicknessOfOuterCover()); | ||
| 63 | |||
| 64 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(SolarCollectorPerformance_IntegralCollectorStorageFields::EmissivityofOuterCover, modelObject.emissivityOfOuterCover()); |
| 65 | |||
| 66 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(SolarCollectorPerformance_IntegralCollectorStorageFields::RefractiveIndexofInnerCover, |
| 67 | modelObject.refractiveIndexOfInnerCover()); | ||
| 68 | |||
| 69 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(SolarCollectorPerformance_IntegralCollectorStorageFields::ExtinctionCoefficientTimesThicknessoftheinnerCover, |
| 70 | modelObject.extinctionCoefficientTimesThicknessOfTheInnerCover()); | ||
| 71 | |||
| 72 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(SolarCollectorPerformance_IntegralCollectorStorageFields::EmissivityofInnerCover, modelObject.emissivityOfInnerCover()); |
| 73 | |||
| 74 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(SolarCollectorPerformance_IntegralCollectorStorageFields::AbsorptanceofAbsorberPlate, |
| 75 | modelObject.absorptanceOfAbsorberPlate()); | ||
| 76 | |||
| 77 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(SolarCollectorPerformance_IntegralCollectorStorageFields::EmissivityofAbsorberPlate, modelObject.emissivityOfAbsorberPlate()); |
| 78 | |||
| 79 |
1/1✓ Branch 1 taken 1 time.
|
2 | return idfObject; |
| 80 | 1 | } | |
| 81 | |||
| 82 | } // namespace energyplus | ||
| 83 | |||
| 84 | } // namespace openstudio | ||
| 85 |