src/energyplus/ForwardTranslator/ForwardTranslateWindowPropertyFrameAndDivider.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/WindowPropertyFrameAndDivider.hpp" | ||
| 8 | #include "../../model/SubSurface.hpp" | ||
| 9 | |||
| 10 | #include "../../utilities/core/Assert.hpp" | ||
| 11 | #include <utilities/idd/WindowProperty_FrameAndDivider_FieldEnums.hxx> | ||
| 12 | #include <utilities/idd/IddEnums.hxx> | ||
| 13 | |||
| 14 | using namespace openstudio::model; | ||
| 15 | |||
| 16 | using namespace std; | ||
| 17 | |||
| 18 | namespace openstudio { | ||
| 19 | |||
| 20 | namespace energyplus { | ||
| 21 | |||
| 22 | 2 | boost::optional<IdfObject> ForwardTranslator::translateWindowPropertyFrameAndDivider(WindowPropertyFrameAndDivider& modelObject) { | |
| 23 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | IdfObject idfObject(IddObjectType::WindowProperty_FrameAndDivider); |
| 24 |
1/1✓ Branch 1 taken 2 times.
|
2 | m_idfObjects.push_back(idfObject); |
| 25 | |||
| 26 | // DLM: do we need to make sure this is unique? not empty? | ||
| 27 |
1/1✓ Branch 1 taken 2 times.
|
2 | boost::optional<std::string> s = modelObject.name(); |
| 28 |
1/2✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
|
2 | if (s) { |
| 29 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setName(*s); |
| 30 | } | ||
| 31 | |||
| 32 | // DLM: write OpenStudio defaults to IDF | ||
| 33 | //if (!modelObject.isFrameWidthDefaulted()){ | ||
| 34 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setDouble(WindowProperty_FrameAndDividerFields::FrameWidth, modelObject.frameWidth()); |
| 35 | //} | ||
| 36 | |||
| 37 | //if (!modelObject.isFrameOutsideProjectionDefaulted()){ | ||
| 38 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setDouble(WindowProperty_FrameAndDividerFields::FrameOutsideProjection, modelObject.frameOutsideProjection()); |
| 39 | //} | ||
| 40 | |||
| 41 | //if (!modelObject.isFrameInsideProjectionDefaulted()){ | ||
| 42 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setDouble(WindowProperty_FrameAndDividerFields::FrameInsideProjection, modelObject.frameInsideProjection()); |
| 43 | //} | ||
| 44 | |||
| 45 | //if (!modelObject.isFrameConductanceDefaulted()){ | ||
| 46 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setDouble(WindowProperty_FrameAndDividerFields::FrameConductance, modelObject.frameConductance()); |
| 47 | //} | ||
| 48 | |||
| 49 | //if (!modelObject.isRatioOfFrameEdgeGlassConductanceToCenterOfGlassConductanceDefaulted()){ | ||
| 50 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setDouble(WindowProperty_FrameAndDividerFields::RatioofFrameEdgeGlassConductancetoCenterOfGlassConductance, |
| 51 | modelObject.ratioOfFrameEdgeGlassConductanceToCenterOfGlassConductance()); | ||
| 52 | //} | ||
| 53 | |||
| 54 | //if (!modelObject.isFrameSolarAbsorptanceDefaulted()){ | ||
| 55 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setDouble(WindowProperty_FrameAndDividerFields::FrameSolarAbsorptance, modelObject.frameSolarAbsorptance()); |
| 56 | //} | ||
| 57 | |||
| 58 | //if (!modelObject.isFrameVisibleAbsorptanceDefaulted()){ | ||
| 59 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setDouble(WindowProperty_FrameAndDividerFields::FrameVisibleAbsorptance, modelObject.frameVisibleAbsorptance()); |
| 60 | //} | ||
| 61 | |||
| 62 | //if (!modelObject.isFrameThermalHemisphericalEmissivityDefaulted()){ | ||
| 63 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setDouble(WindowProperty_FrameAndDividerFields::FrameThermalHemisphericalEmissivity, modelObject.frameThermalHemisphericalEmissivity()); |
| 64 | //} | ||
| 65 | |||
| 66 | //if (!modelObject.isDividerTypeDefaulted()){ | ||
| 67 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setString(WindowProperty_FrameAndDividerFields::DividerType, modelObject.dividerType()); |
| 68 | //} | ||
| 69 | |||
| 70 | //if (!modelObject.isDividerWidthDefaulted()){ | ||
| 71 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setDouble(WindowProperty_FrameAndDividerFields::DividerWidth, modelObject.dividerWidth()); |
| 72 | //} | ||
| 73 | |||
| 74 | //if (!modelObject.isNumberOfHorizontalDividersDefaulted()){ | ||
| 75 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setInt(WindowProperty_FrameAndDividerFields::NumberofHorizontalDividers, modelObject.numberOfHorizontalDividers()); |
| 76 | //} | ||
| 77 | |||
| 78 | //if (!modelObject.isNumberOfVerticalDividersDefaulted()){ | ||
| 79 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setInt(WindowProperty_FrameAndDividerFields::NumberofVerticalDividers, modelObject.numberOfVerticalDividers()); |
| 80 | //} | ||
| 81 | |||
| 82 | //if (!modelObject.isDividerOutsideProjectionDefaulted()){ | ||
| 83 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setDouble(WindowProperty_FrameAndDividerFields::DividerOutsideProjection, modelObject.dividerOutsideProjection()); |
| 84 | //} | ||
| 85 | |||
| 86 | //if (!modelObject.isDividerInsideProjectionDefaulted()){ | ||
| 87 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setDouble(WindowProperty_FrameAndDividerFields::DividerInsideProjection, modelObject.dividerInsideProjection()); |
| 88 | //} | ||
| 89 | |||
| 90 | //if (!modelObject.isDividerConductanceDefaulted()){ | ||
| 91 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setDouble(WindowProperty_FrameAndDividerFields::DividerConductance, modelObject.dividerConductance()); |
| 92 | //} | ||
| 93 | |||
| 94 | //if (!modelObject.isRatioOfDividerEdgeGlassConductanceToCenterOfGlassConductanceDefaulted()){ | ||
| 95 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setDouble(WindowProperty_FrameAndDividerFields::RatioofDividerEdgeGlassConductancetoCenterOfGlassConductance, |
| 96 | modelObject.ratioOfDividerEdgeGlassConductanceToCenterOfGlassConductance()); | ||
| 97 | //} | ||
| 98 | |||
| 99 | //if (!modelObject.isDividerSolarAbsorptanceDefaulted()){ | ||
| 100 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setDouble(WindowProperty_FrameAndDividerFields::DividerSolarAbsorptance, modelObject.dividerSolarAbsorptance()); |
| 101 | //} | ||
| 102 | |||
| 103 | //if (!modelObject.isDividerVisibleAbsorptanceDefaulted()){ | ||
| 104 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setDouble(WindowProperty_FrameAndDividerFields::DividerVisibleAbsorptance, modelObject.dividerVisibleAbsorptance()); |
| 105 | //} | ||
| 106 | |||
| 107 | //if (!modelObject.isDividerThermalHemisphericalEmissivityDefaulted()){ | ||
| 108 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setDouble(WindowProperty_FrameAndDividerFields::DividerThermalHemisphericalEmissivity, |
| 109 | modelObject.dividerThermalHemisphericalEmissivity()); | ||
| 110 | //} | ||
| 111 | |||
| 112 | // outsideRevealDepth mapped to surface vertices | ||
| 113 | |||
| 114 | //if (!modelObject.isOutsideRevealSolarAbsorptanceDefaulted()){ | ||
| 115 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setDouble(WindowProperty_FrameAndDividerFields::OutsideRevealSolarAbsorptance, modelObject.outsideRevealSolarAbsorptance()); |
| 116 | //} | ||
| 117 | |||
| 118 | //if (!modelObject.isInsideSillDepthDefaulted()){ | ||
| 119 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setDouble(WindowProperty_FrameAndDividerFields::InsideSillDepth, modelObject.insideSillDepth()); |
| 120 | //} | ||
| 121 | |||
| 122 | //if (!modelObject.isInsideSillSolarAbsorptanceDefaulted()){ | ||
| 123 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setDouble(WindowProperty_FrameAndDividerFields::InsideSillSolarAbsorptance, modelObject.insideSillSolarAbsorptance()); |
| 124 | //} | ||
| 125 | |||
| 126 | //if (!modelObject.isInsideRevealDepthDefaulted()){ | ||
| 127 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setDouble(WindowProperty_FrameAndDividerFields::InsideRevealDepth, modelObject.insideRevealDepth()); |
| 128 | //} | ||
| 129 | |||
| 130 | //if (!modelObject.isInsideRevealSolarAbsorptanceDefaulted()){ | ||
| 131 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | idfObject.setDouble(WindowProperty_FrameAndDividerFields::InsideRevealSolarAbsorptance, modelObject.insideRevealSolarAbsorptance()); |
| 132 | //} | ||
| 133 | |||
| 134 | //if (!modelObject.isNFRCProductTypeforAssemblyCalculationsDefaulted()){ | ||
| 135 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setString(WindowProperty_FrameAndDividerFields::NFRCProductTypeforAssemblyCalculations, |
| 136 |
1/1✓ Branch 1 taken 2 times.
|
4 | modelObject.nfrcProductTypeforAssemblyCalculations()); |
| 137 | //} | ||
| 138 | |||
| 139 |
1/1✓ Branch 1 taken 2 times.
|
4 | return idfObject; |
| 140 | 2 | } | |
| 141 | |||
| 142 | } // namespace energyplus | ||
| 143 | } // namespace openstudio | ||
| 144 |