src/model/PumpConstantSpeed_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_PUMPCONSTANTSPEED_IMPL_HPP | ||
| 7 | #define MODEL_PUMPCONSTANTSPEED_IMPL_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "StraightComponent_Impl.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | namespace model { | ||
| 14 | |||
| 15 | class Connection; | ||
| 16 | class Schedule; | ||
| 17 | class Curve; | ||
| 18 | class ThermalZone; | ||
| 19 | |||
| 20 | namespace detail { | ||
| 21 | |||
| 22 | /** PumpConstantSpeed_Impl is a StraightComponent_Impl that is the implementation class for PumpConstantSpeed.*/ | ||
| 23 | class MODEL_API PumpConstantSpeed_Impl : public StraightComponent_Impl | ||
| 24 | { | ||
| 25 | public: | ||
| 26 | PumpConstantSpeed_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle); | ||
| 27 | |||
| 28 | PumpConstantSpeed_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 29 | |||
| 30 | PumpConstantSpeed_Impl(const PumpConstantSpeed_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 31 | |||
| 32 | 81 | virtual ~PumpConstantSpeed_Impl() override = default; | |
| 33 | |||
| 34 | //@} | ||
| 35 | /** @name Virtual Methods */ | ||
| 36 | //@{ | ||
| 37 | // | ||
| 38 | virtual const std::vector<std::string>& outputVariableNames() const override; | ||
| 39 | |||
| 40 | virtual IddObjectType iddObjectType() const override; | ||
| 41 | |||
| 42 | virtual std::vector<ScheduleTypeKey> getScheduleTypeKeys(const Schedule& schedule) const override; | ||
| 43 | |||
| 44 | virtual unsigned inletPort() const override; | ||
| 45 | |||
| 46 | virtual unsigned outletPort() const override; | ||
| 47 | |||
| 48 | virtual bool addToNode(Node& node) override; | ||
| 49 | |||
| 50 | virtual void autosize() override; | ||
| 51 | |||
| 52 | virtual void applySizingValues() override; | ||
| 53 | |||
| 54 | virtual std::vector<EMSActuatorNames> emsActuatorNames() const override; | ||
| 55 | |||
| 56 | virtual std::vector<std::string> emsInternalVariableNames() const override; | ||
| 57 | |||
| 58 | virtual ComponentType componentType() const override; | ||
| 59 | virtual std::vector<FuelType> coolingFuelTypes() const override; | ||
| 60 | virtual std::vector<FuelType> heatingFuelTypes() const override; | ||
| 61 | virtual std::vector<AppGFuelType> appGHeatingFuelTypes() const override; | ||
| 62 | |||
| 63 | //@} | ||
| 64 | /** @name Getters */ | ||
| 65 | //@{ | ||
| 66 | |||
| 67 | boost::optional<double> ratedFlowRate() const; | ||
| 68 | |||
| 69 | bool isRatedFlowRateAutosized() const; | ||
| 70 | |||
| 71 | double ratedPumpHead() const; | ||
| 72 | |||
| 73 | bool isRatedPumpHeadDefaulted() const; | ||
| 74 | |||
| 75 | boost::optional<double> ratedPowerConsumption() const; | ||
| 76 | |||
| 77 | bool isRatedPowerConsumptionAutosized() const; | ||
| 78 | |||
| 79 | double motorEfficiency() const; | ||
| 80 | |||
| 81 | bool isMotorEfficiencyDefaulted() const; | ||
| 82 | |||
| 83 | double fractionofMotorInefficienciestoFluidStream() const; | ||
| 84 | |||
| 85 | bool isFractionofMotorInefficienciestoFluidStreamDefaulted() const; | ||
| 86 | |||
| 87 | std::string pumpControlType() const; | ||
| 88 | |||
| 89 | bool isPumpControlTypeDefaulted() const; | ||
| 90 | |||
| 91 | boost::optional<Schedule> pumpFlowRateSchedule() const; | ||
| 92 | |||
| 93 | boost::optional<Curve> pumpCurve() const; | ||
| 94 | |||
| 95 | boost::optional<double> impellerDiameter() const; | ||
| 96 | |||
| 97 | boost::optional<double> rotationalSpeed() const; | ||
| 98 | |||
| 99 | boost::optional<ThermalZone> zone() const; | ||
| 100 | |||
| 101 | boost::optional<double> skinLossRadiativeFraction() const; | ||
| 102 | |||
| 103 | std::string endUseSubcategory() const; | ||
| 104 | |||
| 105 | std::string designPowerSizingMethod() const; | ||
| 106 | |||
| 107 | double designElectricPowerPerUnitFlowRate() const; | ||
| 108 | |||
| 109 | double designShaftPowerPerUnitFlowRatePerUnitHead() const; | ||
| 110 | |||
| 111 | //@} | ||
| 112 | /** @name Setters */ | ||
| 113 | //@{ | ||
| 114 | |||
| 115 | bool setRatedFlowRate(boost::optional<double> ratedFlowRate); | ||
| 116 | |||
| 117 | void resetRatedFlowRate(); | ||
| 118 | |||
| 119 | void autosizeRatedFlowRate(); | ||
| 120 | |||
| 121 | bool setRatedPumpHead(double ratedPumpHead); | ||
| 122 | |||
| 123 | void resetRatedPumpHead(); | ||
| 124 | |||
| 125 | bool setRatedPowerConsumption(boost::optional<double> ratedPowerConsumption); | ||
| 126 | |||
| 127 | void resetRatedPowerConsumption(); | ||
| 128 | |||
| 129 | void autosizeRatedPowerConsumption(); | ||
| 130 | |||
| 131 | bool setMotorEfficiency(double motorEfficiency); | ||
| 132 | |||
| 133 | void resetMotorEfficiency(); | ||
| 134 | |||
| 135 | bool setFractionofMotorInefficienciestoFluidStream(double fractionofMotorInefficienciestoFluidStream); | ||
| 136 | |||
| 137 | void resetFractionofMotorInefficienciestoFluidStream(); | ||
| 138 | |||
| 139 | bool setPumpControlType(const std::string& pumpControlType); | ||
| 140 | |||
| 141 | void resetPumpControlType(); | ||
| 142 | |||
| 143 | bool setPumpFlowRateSchedule(Schedule& schedule); | ||
| 144 | |||
| 145 | void resetPumpFlowRateSchedule(); | ||
| 146 | |||
| 147 | bool setPumpCurve(const boost::optional<Curve>& curve); | ||
| 148 | |||
| 149 | void resetPumpCurve(); | ||
| 150 | |||
| 151 | bool setImpellerDiameter(boost::optional<double> impellerDiameter); | ||
| 152 | |||
| 153 | void resetImpellerDiameter(); | ||
| 154 | |||
| 155 | bool setRotationalSpeed(boost::optional<double> rotationalSpeed); | ||
| 156 | |||
| 157 | void resetRotationalSpeed(); | ||
| 158 | |||
| 159 | bool setZone(const boost::optional<ThermalZone>& thermalZone); | ||
| 160 | |||
| 161 | void resetZone(); | ||
| 162 | |||
| 163 | bool setSkinLossRadiativeFraction(boost::optional<double> skinLossRadiativeFraction); | ||
| 164 | |||
| 165 | void resetSkinLossRadiativeFraction(); | ||
| 166 | |||
| 167 | bool setDesignPowerSizingMethod(const std::string& designPowerSizingMethod); | ||
| 168 | |||
| 169 | bool setDesignElectricPowerPerUnitFlowRate(double designElectricPowerPerUnitFlowRate); | ||
| 170 | |||
| 171 | bool setDesignShaftPowerPerUnitFlowRatePerUnitHead(double designShaftPowerPerUnitFlowRatePerUnitHead); | ||
| 172 | |||
| 173 | bool setEndUseSubcategory(const std::string& endUseSubcategory); | ||
| 174 | |||
| 175 | //@} | ||
| 176 | /** @name Other */ | ||
| 177 | //@{ | ||
| 178 | |||
| 179 | boost::optional<double> autosizedRatedFlowRate() const; | ||
| 180 | |||
| 181 | boost::optional<double> autosizedRatedPowerConsumption() const; | ||
| 182 | |||
| 183 | //@} | ||
| 184 | protected: | ||
| 185 | private: | ||
| 186 | REGISTER_LOGGER("openstudio.model.PumpConstantSpeed"); | ||
| 187 | |||
| 188 | boost::optional<Connection> optionalInletNode() const; | ||
| 189 | boost::optional<Connection> optionalOutletNode() const; | ||
| 190 | |||
| 191 | std::vector<std::string> pumpControlTypeValues() const; | ||
| 192 | boost::optional<ModelObject> pumpFlowRateScheduleAsModelObject() const; | ||
| 193 | boost::optional<ModelObject> pumpCurveAsModelObject() const; | ||
| 194 | boost::optional<ModelObject> zoneAsModelObject() const; | ||
| 195 | |||
| 196 | bool setPumpFlowRateScheduleAsModelObject(const boost::optional<ModelObject>& modelObject); | ||
| 197 | bool setPumpCurveAsModelObject(const boost::optional<ModelObject>& modelObject); | ||
| 198 | bool setZoneAsModelObject(const boost::optional<ModelObject>& modelObject); | ||
| 199 | }; | ||
| 200 | |||
| 201 | } // namespace detail | ||
| 202 | |||
| 203 | } // namespace model | ||
| 204 | } // namespace openstudio | ||
| 205 | |||
| 206 | #endif // MODEL_PUMPCONSTANTSPEED_IMPL_HPP | ||
| 207 |