src/energyplus/ForwardTranslator/ForwardTranslateZoneVentilationDesignFlowRate.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/Schedule.hpp" | ||
| 9 | #include "../../model/Schedule_Impl.hpp" | ||
| 10 | #include "../../model/ModelObject.hpp" | ||
| 11 | #include "../../model/ModelObject_Impl.hpp" | ||
| 12 | #include "../../model/Node.hpp" | ||
| 13 | #include "../../model/Node_Impl.hpp" | ||
| 14 | #include "../../model/ZoneVentilationDesignFlowRate.hpp" | ||
| 15 | #include "../../model/ZoneVentilationDesignFlowRate_Impl.hpp" | ||
| 16 | #include "../../model/ThermalZone.hpp" | ||
| 17 | #include "../../model/ThermalZone_Impl.hpp" | ||
| 18 | #include "../../model/StraightComponent.hpp" | ||
| 19 | #include "../../model/StraightComponent_Impl.hpp" | ||
| 20 | #include <utilities/idd/ZoneVentilation_DesignFlowRate_FieldEnums.hxx> | ||
| 21 | #include "../../utilities/idd/IddEnums.hpp" | ||
| 22 | #include <utilities/idd/IddEnums.hxx> | ||
| 23 | #include <utilities/idd/IddFactory.hxx> | ||
| 24 | |||
| 25 | using namespace openstudio::model; | ||
| 26 | |||
| 27 | namespace openstudio { | ||
| 28 | |||
| 29 | namespace energyplus { | ||
| 30 | |||
| 31 | 2 | boost::optional<IdfObject> ForwardTranslator::translateZoneVentilationDesignFlowRate(ZoneVentilationDesignFlowRate& modelObject) { | |
| 32 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | auto idfObject = createRegisterAndNameIdfObject(IddObjectType::ZoneVentilation_DesignFlowRate, modelObject); |
| 33 | |||
| 34 |
3/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 1 time.
|
4 | if (auto value = modelObject.thermalZone()) { |
| 35 |
4/4✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
|
1 | idfObject.setString(ZoneVentilation_DesignFlowRateFields::ZoneorZoneListorSpaceorSpaceListName, value->name().get()); |
| 36 | 2 | } | |
| 37 | |||
| 38 | { | ||
| 39 |
1/1✓ Branch 1 taken 2 times.
|
2 | auto mo = modelObject.schedule(); |
| 40 |
3/3✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
|
2 | idfObject.setString(ZoneVentilation_DesignFlowRateFields::ScheduleName, mo.name().get()); |
| 41 | 2 | } | |
| 42 | |||
| 43 | { | ||
| 44 |
1/1✓ Branch 1 taken 2 times.
|
2 | auto value = modelObject.designFlowRateCalculationMethod(); |
| 45 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setString(ZoneVentilation_DesignFlowRateFields::DesignFlowRateCalculationMethod, value); |
| 46 | 2 | } | |
| 47 | |||
| 48 | { | ||
| 49 |
1/1✓ Branch 1 taken 2 times.
|
2 | auto value = modelObject.designFlowRate(); |
| 50 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(ZoneVentilation_DesignFlowRateFields::DesignFlowRate, value); |
| 51 | } | ||
| 52 | |||
| 53 | { | ||
| 54 |
1/1✓ Branch 1 taken 2 times.
|
2 | auto value = modelObject.flowRateperZoneFloorArea(); |
| 55 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(ZoneVentilation_DesignFlowRateFields::FlowRateperFloorArea, value); |
| 56 | } | ||
| 57 | |||
| 58 | { | ||
| 59 |
1/1✓ Branch 1 taken 2 times.
|
2 | auto value = modelObject.flowRateperPerson(); |
| 60 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(ZoneVentilation_DesignFlowRateFields::FlowRateperPerson, value); |
| 61 | } | ||
| 62 | |||
| 63 | { | ||
| 64 |
1/1✓ Branch 1 taken 2 times.
|
2 | auto value = modelObject.airChangesperHour(); |
| 65 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(ZoneVentilation_DesignFlowRateFields::AirChangesperHour, value); |
| 66 | } | ||
| 67 | |||
| 68 | { | ||
| 69 |
1/1✓ Branch 1 taken 2 times.
|
2 | auto value = modelObject.ventilationType(); |
| 70 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setString(ZoneVentilation_DesignFlowRateFields::VentilationType, value); |
| 71 | 2 | } | |
| 72 | |||
| 73 | { | ||
| 74 |
1/1✓ Branch 1 taken 2 times.
|
2 | auto value = modelObject.fanPressureRise(); |
| 75 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(ZoneVentilation_DesignFlowRateFields::FanPressureRise, value); |
| 76 | } | ||
| 77 | |||
| 78 | { | ||
| 79 |
1/1✓ Branch 1 taken 2 times.
|
2 | auto value = modelObject.fanTotalEfficiency(); |
| 80 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(ZoneVentilation_DesignFlowRateFields::FanTotalEfficiency, value); |
| 81 | } | ||
| 82 | |||
| 83 | { | ||
| 84 |
1/1✓ Branch 1 taken 2 times.
|
2 | auto value = modelObject.constantTermCoefficient(); |
| 85 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(ZoneVentilation_DesignFlowRateFields::ConstantTermCoefficient, value); |
| 86 | } | ||
| 87 | |||
| 88 | { | ||
| 89 |
1/1✓ Branch 1 taken 2 times.
|
2 | auto value = modelObject.temperatureTermCoefficient(); |
| 90 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(ZoneVentilation_DesignFlowRateFields::TemperatureTermCoefficient, value); |
| 91 | } | ||
| 92 | |||
| 93 | { | ||
| 94 |
1/1✓ Branch 1 taken 2 times.
|
2 | auto value = modelObject.velocityTermCoefficient(); |
| 95 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(ZoneVentilation_DesignFlowRateFields::VelocityTermCoefficient, value); |
| 96 | } | ||
| 97 | |||
| 98 | { | ||
| 99 |
1/1✓ Branch 1 taken 2 times.
|
2 | auto value = modelObject.velocitySquaredTermCoefficient(); |
| 100 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(ZoneVentilation_DesignFlowRateFields::VelocitySquaredTermCoefficient, value); |
| 101 | } | ||
| 102 | |||
| 103 | { | ||
| 104 |
1/1✓ Branch 1 taken 2 times.
|
2 | auto value = modelObject.minimumIndoorTemperature(); |
| 105 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(ZoneVentilation_DesignFlowRateFields::MinimumIndoorTemperature, value); |
| 106 | } | ||
| 107 | |||
| 108 |
3/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 1 time.
|
4 | if (auto value = modelObject.minimumIndoorTemperatureSchedule()) { |
| 109 |
4/4✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
|
1 | idfObject.setString(ZoneVentilation_DesignFlowRateFields::MinimumIndoorTemperatureScheduleName, value->name().get()); |
| 110 | 2 | } | |
| 111 | |||
| 112 | { | ||
| 113 |
1/1✓ Branch 1 taken 2 times.
|
2 | auto value = modelObject.maximumIndoorTemperature(); |
| 114 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(ZoneVentilation_DesignFlowRateFields::MaximumIndoorTemperature, value); |
| 115 | } | ||
| 116 | |||
| 117 |
3/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 1 time.
|
4 | if (auto value = modelObject.maximumIndoorTemperatureSchedule()) { |
| 118 |
4/4✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
|
1 | idfObject.setString(ZoneVentilation_DesignFlowRateFields::MaximumIndoorTemperatureScheduleName, value->name().get()); |
| 119 | 2 | } | |
| 120 | |||
| 121 | { | ||
| 122 |
1/1✓ Branch 1 taken 2 times.
|
2 | auto value = modelObject.deltaTemperature(); |
| 123 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(ZoneVentilation_DesignFlowRateFields::DeltaTemperature, value); |
| 124 | } | ||
| 125 | |||
| 126 |
3/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 1 time.
|
4 | if (auto value = modelObject.deltaTemperatureSchedule()) { |
| 127 |
4/4✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
|
1 | idfObject.setString(ZoneVentilation_DesignFlowRateFields::DeltaTemperatureScheduleName, value->name().get()); |
| 128 | 2 | } | |
| 129 | |||
| 130 | { | ||
| 131 |
1/1✓ Branch 1 taken 2 times.
|
2 | auto value = modelObject.minimumOutdoorTemperature(); |
| 132 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(ZoneVentilation_DesignFlowRateFields::MinimumOutdoorTemperature, value); |
| 133 | } | ||
| 134 | |||
| 135 |
3/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 1 time.
|
4 | if (auto value = modelObject.minimumOutdoorTemperatureSchedule()) { |
| 136 |
4/4✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
|
1 | idfObject.setString(ZoneVentilation_DesignFlowRateFields::MinimumOutdoorTemperatureScheduleName, value->name().get()); |
| 137 | 2 | } | |
| 138 | |||
| 139 | { | ||
| 140 |
1/1✓ Branch 1 taken 2 times.
|
2 | auto value = modelObject.maximumOutdoorTemperature(); |
| 141 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(ZoneVentilation_DesignFlowRateFields::MaximumOutdoorTemperature, value); |
| 142 | } | ||
| 143 | |||
| 144 |
3/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 1 time.
|
4 | if (auto value = modelObject.maximumOutdoorTemperatureSchedule()) { |
| 145 |
4/4✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
|
1 | idfObject.setString(ZoneVentilation_DesignFlowRateFields::MaximumOutdoorTemperatureScheduleName, value->name().get()); |
| 146 | 2 | } | |
| 147 | |||
| 148 | { | ||
| 149 |
1/1✓ Branch 1 taken 2 times.
|
2 | auto value = modelObject.maximumWindSpeed(); |
| 150 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setDouble(ZoneVentilation_DesignFlowRateFields::MaximumWindSpeed, value); |
| 151 | } | ||
| 152 | |||
| 153 | { | ||
| 154 |
1/1✓ Branch 1 taken 2 times.
|
2 | auto value = modelObject.densityBasis(); |
| 155 |
1/1✓ Branch 1 taken 2 times.
|
2 | idfObject.setString(ZoneVentilation_DesignFlowRateFields::DensityBasis, value); |
| 156 | 2 | } | |
| 157 | |||
| 158 |
1/1✓ Branch 1 taken 2 times.
|
4 | return idfObject; |
| 159 | 2 | } | |
| 160 | |||
| 161 | } // namespace energyplus | ||
| 162 | |||
| 163 | } // namespace openstudio | ||
| 164 |