src/model/ChillerElectricASHRAE205_Impl.hpp
| 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 | #ifndef MODEL_CHILLERELECTRICASHRAE205_IMPL_HPP | ||
| 7 | #define MODEL_CHILLERELECTRICASHRAE205_IMPL_HPP | ||
| 8 | |||
| 9 | #include <model/ModelAPI.hpp> | ||
| 10 | #include "WaterToWaterComponent_Impl.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | |||
| 14 | namespace model { | ||
| 15 | |||
| 16 | class ExternalFile; | ||
| 17 | class Node; | ||
| 18 | class ThermalZone; | ||
| 19 | class Schedule; | ||
| 20 | |||
| 21 | namespace detail { | ||
| 22 | |||
| 23 | /** ChillerElectricASHRAE205_Impl is a WaterToWaterComponent_Impl that is the implementation class for ChillerElectricASHRAE205.*/ | ||
| 24 | class MODEL_API ChillerElectricASHRAE205_Impl : public WaterToWaterComponent_Impl | ||
| 25 | { | ||
| 26 | public: | ||
| 27 | /** @name Constructors and Destructors */ | ||
| 28 | //@{ | ||
| 29 | |||
| 30 | ChillerElectricASHRAE205_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle); | ||
| 31 | |||
| 32 | ChillerElectricASHRAE205_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 33 | |||
| 34 | ChillerElectricASHRAE205_Impl(const ChillerElectricASHRAE205_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 35 | |||
| 36 | 12 | virtual ~ChillerElectricASHRAE205_Impl() override = default; | |
| 37 | |||
| 38 | //@} | ||
| 39 | /** @name Virtual Methods */ | ||
| 40 | //@{ | ||
| 41 | |||
| 42 | virtual const std::vector<std::string>& outputVariableNames() const override; | ||
| 43 | |||
| 44 | virtual IddObjectType iddObjectType() const override; | ||
| 45 | |||
| 46 | virtual std::vector<ScheduleTypeKey> getScheduleTypeKeys(const Schedule& schedule) const override; | ||
| 47 | |||
| 48 | // chilledWaterLoop | ||
| 49 | virtual boost::optional<PlantLoop> plantLoop() const override; | ||
| 50 | virtual unsigned supplyInletPort() const override; | ||
| 51 | virtual unsigned supplyOutletPort() const override; | ||
| 52 | |||
| 53 | // condenserWaterLoop | ||
| 54 | virtual boost::optional<PlantLoop> secondaryPlantLoop() const override; | ||
| 55 | virtual unsigned demandInletPort() const override; | ||
| 56 | virtual unsigned demandOutletPort() const override; | ||
| 57 | |||
| 58 | // heatRecoveryLoop | ||
| 59 | virtual boost::optional<PlantLoop> tertiaryPlantLoop() const override; | ||
| 60 | virtual unsigned tertiaryInletPort() const override; | ||
| 61 | virtual unsigned tertiaryOutletPort() const override; | ||
| 62 | |||
| 63 | virtual std::vector<HVACComponent> edges(const boost::optional<HVACComponent>& prev) override; | ||
| 64 | |||
| 65 | /** This function will perform a check if trying to add it to a node that is on the demand side of a plant loop. | ||
| 66 | * If: | ||
| 67 | * - the node is on the demand side of a loop | ||
| 68 | * - the node isn't on the current condenser water loop itself | ||
| 69 | * - the chiller doesn't already have a heat recovery (tertiary) loop, | ||
| 70 | * then it tries to add it to the Tertiary loop. | ||
| 71 | * In all other cases, it will call the base class' method WaterToWaterComponent_Impl::addToNode() | ||
| 72 | * If this is connecting to the demand side of a loop (not tertiary), will set the chiller condenserType to WaterCooled | ||
| 73 | */ | ||
| 74 | virtual bool addToNode(Node& node) override; | ||
| 75 | |||
| 76 | /* Restricts addToTertiaryNode to a node that is on the demand side of a plant loop (tertiary = Heat Recovery Loop) */ | ||
| 77 | virtual bool addToTertiaryNode(Node& node) override; | ||
| 78 | |||
| 79 | virtual ModelObject clone(Model model) const override; | ||
| 80 | |||
| 81 | virtual void autosize() override; | ||
| 82 | |||
| 83 | virtual void applySizingValues() override; | ||
| 84 | |||
| 85 | virtual ComponentType componentType() const override; | ||
| 86 | virtual std::vector<FuelType> coolingFuelTypes() const override; | ||
| 87 | virtual std::vector<FuelType> heatingFuelTypes() const override; | ||
| 88 | virtual std::vector<AppGFuelType> appGHeatingFuelTypes() const override; | ||
| 89 | |||
| 90 | //@} | ||
| 91 | /** @name Getters */ | ||
| 92 | //@{ | ||
| 93 | |||
| 94 | ExternalFile representationFile() const; | ||
| 95 | |||
| 96 | std::string performanceInterpolationMethod() const; | ||
| 97 | |||
| 98 | boost::optional<double> ratedCapacity() const; | ||
| 99 | bool isRatedCapacityAutosized() const; | ||
| 100 | |||
| 101 | double sizingFactor() const; | ||
| 102 | |||
| 103 | std::string ambientTemperatureIndicator() const; | ||
| 104 | |||
| 105 | boost::optional<Schedule> ambientTemperatureSchedule() const; | ||
| 106 | |||
| 107 | boost::optional<ThermalZone> ambientTemperatureZone() const; | ||
| 108 | |||
| 109 | boost::optional<std::string> ambientTemperatureOutdoorAirNodeName() const; | ||
| 110 | |||
| 111 | boost::optional<double> chilledWaterMaximumRequestedFlowRate() const; | ||
| 112 | bool isChilledWaterMaximumRequestedFlowRateAutosized() const; | ||
| 113 | |||
| 114 | boost::optional<double> condenserMaximumRequestedFlowRate() const; | ||
| 115 | bool isCondenserMaximumRequestedFlowRateAutosized() const; | ||
| 116 | |||
| 117 | std::string chillerFlowMode() const; | ||
| 118 | |||
| 119 | boost::optional<double> oilCoolerDesignFlowRate() const; | ||
| 120 | |||
| 121 | boost::optional<double> auxiliaryCoolingDesignFlowRate() const; | ||
| 122 | |||
| 123 | std::string endUseSubcategory() const; | ||
| 124 | bool isEndUseSubcategoryDefaulted() const; | ||
| 125 | |||
| 126 | //@} | ||
| 127 | /** @name Setters */ | ||
| 128 | //@{ | ||
| 129 | |||
| 130 | bool setRepresentationFile(const ExternalFile& externalFile); | ||
| 131 | |||
| 132 | bool setPerformanceInterpolationMethod(const std::string& performanceInterpolationMethod); | ||
| 133 | |||
| 134 | bool setRatedCapacity(double ratedCapacity); | ||
| 135 | void autosizeRatedCapacity(); | ||
| 136 | |||
| 137 | bool setSizingFactor(double sizingFactor); | ||
| 138 | |||
| 139 | bool setAmbientTemperatureIndicator(const std::string& ambientTemperatureIndicator); | ||
| 140 | |||
| 141 | bool setAmbientTemperatureSchedule(Schedule& schedule); | ||
| 142 | void resetAmbientTemperatureSchedule(); | ||
| 143 | |||
| 144 | bool setAmbientTemperatureZone(const ThermalZone& thermalZone); | ||
| 145 | void resetAmbientTemperatureZone(); | ||
| 146 | |||
| 147 | bool setAmbientTemperatureOutdoorAirNodeName(const std::string& ambientTemperatureOutdoorAirNodeName); | ||
| 148 | void resetAmbientTemperatureOutdoorAirNodeName(); | ||
| 149 | |||
| 150 | bool setChilledWaterMaximumRequestedFlowRate(double chilledWaterMaximumRequestedFlowRate); | ||
| 151 | void autosizeChilledWaterMaximumRequestedFlowRate(); | ||
| 152 | |||
| 153 | bool setCondenserMaximumRequestedFlowRate(double condenserMaximumRequestedFlowRate); | ||
| 154 | void autosizeCondenserMaximumRequestedFlowRate(); | ||
| 155 | |||
| 156 | bool setChillerFlowMode(const std::string& chillerFlowMode); | ||
| 157 | |||
| 158 | bool setOilCoolerDesignFlowRate(double oilCoolerDesignFlowRate); | ||
| 159 | void resetOilCoolerDesignFlowRate(); | ||
| 160 | |||
| 161 | bool setAuxiliaryCoolingDesignFlowRate(double auxiliaryCoolingDesignFlowRate); | ||
| 162 | void resetAuxiliaryCoolingDesignFlowRate(); | ||
| 163 | |||
| 164 | bool setEndUseSubcategory(const std::string& endUseSubcategory); | ||
| 165 | void resetEndUseSubcategory(); | ||
| 166 | |||
| 167 | //@} | ||
| 168 | /** @name Other */ | ||
| 169 | //@{ | ||
| 170 | |||
| 171 | boost::optional<double> autosizedRatedCapacity(); | ||
| 172 | |||
| 173 | boost::optional<double> autosizedChilledWaterMaximumRequestedFlowRate(); | ||
| 174 | |||
| 175 | boost::optional<double> autosizedCondenserMaximumRequestedFlowRate(); | ||
| 176 | |||
| 177 | /** Convenience Function to return the Chilled Water Loop (chiller on supply) **/ | ||
| 178 | boost::optional<PlantLoop> chilledWaterLoop() const; | ||
| 179 | // Same as supplyInletModelObject, but cast to a Node | ||
| 180 | boost::optional<Node> chilledWaterInletNode() const; | ||
| 181 | boost::optional<Node> chilledWaterOutletNode() const; | ||
| 182 | |||
| 183 | /** Convenience Function to return the Condenser Water Loop (chiller on demand side) **/ | ||
| 184 | boost::optional<PlantLoop> condenserWaterLoop() const; | ||
| 185 | boost::optional<Node> condenserInletNode() const; | ||
| 186 | boost::optional<Node> condenserOutletNode() const; | ||
| 187 | |||
| 188 | // Not implemented in E+ 22.2.0, but reserved as a Tertiary Loop for now | ||
| 189 | boost::optional<PlantLoop> heatRecoveryLoop() const; | ||
| 190 | boost::optional<Node> heatRecoveryInletNode() const; | ||
| 191 | boost::optional<Node> heatRecoveryOutletNode() const; | ||
| 192 | |||
| 193 | /*static*/ unsigned oilCoolerInletPort() const; | ||
| 194 | boost::optional<ModelObject> oilCoolerInletModelObject() const; | ||
| 195 | /*static*/ unsigned oilCoolerOutletPort() const; | ||
| 196 | boost::optional<ModelObject> oilCoolerOutletModelObject() const; | ||
| 197 | boost::optional<PlantLoop> oilCoolerLoop() const; | ||
| 198 | bool addDemandBranchOnOilCoolerLoop(PlantLoop& plantLoop); | ||
| 199 | bool addToOilCoolerLoopNode(Node& node); | ||
| 200 | bool removeFromOilCoolerLoop(); | ||
| 201 | boost::optional<Node> oilCoolerInletNode() const; | ||
| 202 | boost::optional<Node> oilCoolerOutletNode() const; | ||
| 203 | |||
| 204 | /*static*/ unsigned auxiliaryInletPort() const; | ||
| 205 | boost::optional<ModelObject> auxiliaryInletModelObject() const; | ||
| 206 | /*static*/ unsigned auxiliaryOutletPort() const; | ||
| 207 | boost::optional<ModelObject> auxiliaryOutletModelObject() const; | ||
| 208 | bool addDemandBranchOnAuxiliaryLoop(PlantLoop& plantLoop); | ||
| 209 | bool addToAuxiliaryLoopNode(Node& node); | ||
| 210 | bool removeFromAuxiliaryLoop(); | ||
| 211 | boost::optional<PlantLoop> auxiliaryLoop() const; | ||
| 212 | boost::optional<Node> auxiliaryInletNode() const; | ||
| 213 | boost::optional<Node> auxiliaryOutletNode() const; | ||
| 214 | |||
| 215 | //@} | ||
| 216 | protected: | ||
| 217 | private: | ||
| 218 | − | REGISTER_LOGGER("openstudio.model.ChillerElectricASHRAE205"); | |
| 219 | |||
| 220 | // Optional getters for use by methods like children() so can remove() if the constructor fails. | ||
| 221 | // There are other ways for the public versions of these getters to fail--perhaps all required | ||
| 222 | // objects should be returned as boost::optionals | ||
| 223 | boost::optional<ExternalFile> optionalRepresentationFile() const; | ||
| 224 | }; | ||
| 225 | |||
| 226 | } // namespace detail | ||
| 227 | |||
| 228 | } // namespace model | ||
| 229 | } // namespace openstudio | ||
| 230 | |||
| 231 | #endif // MODEL_CHILLERELECTRICASHRAE205_IMPL_HPP | ||
| 232 |