GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 27 / 0 / 27
Functions: 100.0% 1 / 0 / 1
Branches: 95.3% 41 / 0 / 43

src/energyplus/ForwardTranslator/ForwardTranslateSolarCollectorPerformancePhotovoltaicThermalBIPVT.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/SolarCollectorPerformancePhotovoltaicThermalBIPVT.hpp"
9 #include "../../model/Model.hpp"
10 #include "../../model/SurfacePropertyOtherSideConditionsModel.hpp"
11 #include "../../model/Schedule.hpp"
12
13 #include <utilities/idd/SolarCollectorPerformance_PhotovoltaicThermal_BIPVT_FieldEnums.hxx>
14 #include <utilities/idd/IddEnums.hxx>
15
16 using namespace openstudio::model;
17
18 namespace openstudio {
19
20 namespace energyplus {
21
22 1 boost::optional<IdfObject> ForwardTranslator::translateSolarCollectorPerformancePhotovoltaicThermalBIPVT(
23 model::SolarCollectorPerformancePhotovoltaicThermalBIPVT& modelObject) {
24
25 // Instantiate an IdfObject of the class to store the values
26
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 IdfObject idfObject = createRegisterAndNameIdfObject(openstudio::IddObjectType::SolarCollectorPerformance_PhotovoltaicThermal_BIPVT, modelObject);
27
28 // Boundary Conditions Model Name: Required Object
29 {
30
1/1
✓ Branch 1 taken 1 time.
1 auto boundaryConditionsModel = modelObject.boundaryConditionsModel();
31
2/3
✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
2 if (boost::optional<IdfObject> wo_ = translateAndMapModelObject(boundaryConditionsModel)) {
32
3/3
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
1 idfObject.setString(SolarCollectorPerformance_PhotovoltaicThermal_BIPVTFields::BoundaryConditionsModelName, wo_->nameString());
33 1 }
34 1 }
35
36 // Availability Schedule Name: Optional Object (but required in model)
37 {
38
1/1
✓ Branch 1 taken 1 time.
1 auto availabilitySchedule = modelObject.availabilitySchedule();
39
2/3
✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
2 if (boost::optional<IdfObject> wo_ = translateAndMapModelObject(availabilitySchedule)) {
40
3/3
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
1 idfObject.setString(SolarCollectorPerformance_PhotovoltaicThermal_BIPVTFields::AvailabilityScheduleName, wo_->nameString());
41 1 }
42 1 }
43
44 // Effective Plenum Gap Thickness Behind PV Modules: Required Double
45
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 idfObject.setDouble(SolarCollectorPerformance_PhotovoltaicThermal_BIPVTFields::EffectivePlenumGapThicknessBehindPVModules,
46 modelObject.effectivePlenumGapThicknessBehindPVModules());
47
48 // PV Cell Normal Transmittance-Absorptance Product: Optional Double (but required in model)
49
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 idfObject.setDouble(SolarCollectorPerformance_PhotovoltaicThermal_BIPVTFields::PVCellNormalTransmittanceAbsorptanceProduct,
50 modelObject.pVCellNormalTransmittanceAbsorptanceProduct());
51
52 // Backing Material Normal Transmittance-Absorptance Product: Optional Double (but required in model)
53
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 idfObject.setDouble(SolarCollectorPerformance_PhotovoltaicThermal_BIPVTFields::BackingMaterialNormalTransmittanceAbsorptanceProduct,
54 modelObject.backingMaterialNormalTransmittanceAbsorptanceProduct());
55
56 // Cladding Normal Transmittance-Absorptance Product: Optional Double (but required in model)
57
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 idfObject.setDouble(SolarCollectorPerformance_PhotovoltaicThermal_BIPVTFields::CladdingNormalTransmittanceAbsorptanceProduct,
58 modelObject.claddingNormalTransmittanceAbsorptanceProduct());
59
60 // Fraction of Collector Gross Area Covered by PV Module: Optional Double (but required in model)
61
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 idfObject.setDouble(SolarCollectorPerformance_PhotovoltaicThermal_BIPVTFields::FractionofCollectorGrossAreaCoveredbyPVModule,
62 modelObject.fractionofCollectorGrossAreaCoveredbyPVModule());
63
64 // Fraction of PV Cell Area to PV Module Area: Optional Double (but required in model)
65
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 idfObject.setDouble(SolarCollectorPerformance_PhotovoltaicThermal_BIPVTFields::FractionofPVCellAreatoPVModuleArea,
66 modelObject.fractionofPVCellAreatoPVModuleArea());
67
68 // PV Module Top Thermal Resistance: Optional Double (but required in model)
69
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 idfObject.setDouble(SolarCollectorPerformance_PhotovoltaicThermal_BIPVTFields::PVModuleTopThermalResistance,
70 modelObject.pVModuleTopThermalResistance());
71
72 // PV Module Bottom Thermal Resistance: Optional Double (but required in model)
73
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 idfObject.setDouble(SolarCollectorPerformance_PhotovoltaicThermal_BIPVTFields::PVModuleBottomThermalResistance,
74 modelObject.pVModuleBottomThermalResistance());
75
76 // PV Module Front Longwave Emissivity: Optional Double (but required in model)
77
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 idfObject.setDouble(SolarCollectorPerformance_PhotovoltaicThermal_BIPVTFields::PVModuleFrontLongwaveEmissivity,
78 modelObject.pVModuleFrontLongwaveEmissivity());
79
80 // PV Module Back Longwave Emissivity: Optional Double (but required in model)
81
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 idfObject.setDouble(SolarCollectorPerformance_PhotovoltaicThermal_BIPVTFields::PVModuleBackLongwaveEmissivity,
82 modelObject.pVModuleBackLongwaveEmissivity());
83
84 // Glass Thickness: Optional Double (but required in model)
85
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 idfObject.setDouble(SolarCollectorPerformance_PhotovoltaicThermal_BIPVTFields::GlassThickness, modelObject.glassThickness());
86
87 // Glass Refraction Index: Optional Double (but required in model)
88
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 idfObject.setDouble(SolarCollectorPerformance_PhotovoltaicThermal_BIPVTFields::GlassRefractionIndex, modelObject.glassRefractionIndex());
89
90 // Glass Extinction Coefficient: Optional Double (but required in model)
91
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 idfObject.setDouble(SolarCollectorPerformance_PhotovoltaicThermal_BIPVTFields::GlassExtinctionCoefficient,
92 modelObject.glassExtinctionCoefficient());
93
94
1/1
✓ Branch 1 taken 1 time.
2 return idfObject;
95 1 } // End of translate function
96
97 } // end namespace energyplus
98 } // end namespace openstudio
99