src/model/SpaceInfiltrationDesignFlowRate_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_SPACEINFILTRATIONDESIGNFLOWRATE_IMPL_HPP | ||
| 7 | #define MODEL_SPACEINFILTRATIONDESIGNFLOWRATE_IMPL_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "SpaceLoad_Impl.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | namespace model { | ||
| 14 | |||
| 15 | class Schedule; | ||
| 16 | class SpaceInfiltrationDesignFlowRate; | ||
| 17 | |||
| 18 | namespace detail { | ||
| 19 | |||
| 20 | /** SpaceInfiltrationDesignFlowRate_Impl is a SpaceLoad_Impl that is the implementation class for SpaceInfiltrationDesignFlowRate.*/ | ||
| 21 | class MODEL_API SpaceInfiltrationDesignFlowRate_Impl : public SpaceLoad_Impl | ||
| 22 | { | ||
| 23 | public: | ||
| 24 | /** @name Constructors and Destructors */ | ||
| 25 | //@{ | ||
| 26 | |||
| 27 | SpaceInfiltrationDesignFlowRate_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle); | ||
| 28 | |||
| 29 | SpaceInfiltrationDesignFlowRate_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 30 | |||
| 31 | SpaceInfiltrationDesignFlowRate_Impl(const SpaceInfiltrationDesignFlowRate_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 32 | |||
| 33 | 1638 | virtual ~SpaceInfiltrationDesignFlowRate_Impl() override = default; | |
| 34 | |||
| 35 | //@} | ||
| 36 | /** @name Virtual Methods */ | ||
| 37 | //@{ | ||
| 38 | |||
| 39 | virtual const std::vector<std::string>& outputVariableNames() const override; | ||
| 40 | |||
| 41 | virtual IddObjectType iddObjectType() const override; | ||
| 42 | |||
| 43 | virtual std::vector<ScheduleTypeKey> getScheduleTypeKeys(const Schedule& schedule) const override; | ||
| 44 | |||
| 45 | virtual bool hardSize() override; | ||
| 46 | |||
| 47 | virtual bool hardApplySchedules() override; | ||
| 48 | |||
| 49 | virtual bool isAbsolute() const override; | ||
| 50 | |||
| 51 | //@} | ||
| 52 | /** @name Getters */ | ||
| 53 | //@{ | ||
| 54 | |||
| 55 | /** Returns the (fractional) infiltration schedule. If this object does not | ||
| 56 | * specify a schedule this function will search the hierarchy. */ | ||
| 57 | boost::optional<Schedule> schedule() const; | ||
| 58 | |||
| 59 | /** Returns true if this object does not specify a schedule directly. */ | ||
| 60 | bool isScheduleDefaulted() const; | ||
| 61 | |||
| 62 | std::string designFlowRateCalculationMethod() const; | ||
| 63 | |||
| 64 | boost::optional<double> designFlowRate() const; | ||
| 65 | |||
| 66 | boost::optional<double> flowperSpaceFloorArea() const; | ||
| 67 | |||
| 68 | boost::optional<double> flowperExteriorSurfaceArea() const; | ||
| 69 | |||
| 70 | boost::optional<double> flowperExteriorWallArea() const; | ||
| 71 | |||
| 72 | boost::optional<double> airChangesperHour() const; | ||
| 73 | |||
| 74 | double constantTermCoefficient() const; | ||
| 75 | |||
| 76 | bool isConstantTermCoefficientDefaulted() const; | ||
| 77 | |||
| 78 | double temperatureTermCoefficient() const; | ||
| 79 | |||
| 80 | bool isTemperatureTermCoefficientDefaulted() const; | ||
| 81 | |||
| 82 | double velocityTermCoefficient() const; | ||
| 83 | |||
| 84 | bool isVelocityTermCoefficientDefaulted() const; | ||
| 85 | |||
| 86 | double velocitySquaredTermCoefficient() const; | ||
| 87 | |||
| 88 | bool isVelocitySquaredTermCoefficientDefaulted() const; | ||
| 89 | |||
| 90 | virtual std::vector<EMSActuatorNames> emsActuatorNames() const override; | ||
| 91 | |||
| 92 | virtual std::vector<std::string> emsInternalVariableNames() const override; | ||
| 93 | |||
| 94 | std::string densityBasis() const; | ||
| 95 | |||
| 96 | //@} | ||
| 97 | /** @name Setters */ | ||
| 98 | //@{ | ||
| 99 | |||
| 100 | /** Sets the (fractional) Schedule. */ | ||
| 101 | bool setSchedule(Schedule& schedule); | ||
| 102 | |||
| 103 | /** Resets the (fractional) Schedule. */ | ||
| 104 | void resetSchedule(); | ||
| 105 | |||
| 106 | bool setDesignFlowRate(boost::optional<double> designFlowRate); | ||
| 107 | |||
| 108 | bool setFlowperSpaceFloorArea(boost::optional<double> flowperSpaceFloorArea); | ||
| 109 | |||
| 110 | bool setFlowperExteriorSurfaceArea(boost::optional<double> flowperExteriorSurfaceArea); | ||
| 111 | |||
| 112 | bool setFlowperExteriorWallArea(boost::optional<double> flowperExteriorWallArea); | ||
| 113 | |||
| 114 | bool setAirChangesperHour(boost::optional<double> airChangesperHour); | ||
| 115 | |||
| 116 | bool setConstantTermCoefficient(double constantTermCoefficient); | ||
| 117 | |||
| 118 | void resetConstantTermCoefficient(); | ||
| 119 | |||
| 120 | bool setTemperatureTermCoefficient(double temperatureTermCoefficient); | ||
| 121 | |||
| 122 | void resetTemperatureTermCoefficient(); | ||
| 123 | |||
| 124 | bool setVelocityTermCoefficient(double velocityTermCoefficient); | ||
| 125 | |||
| 126 | void resetVelocityTermCoefficient(); | ||
| 127 | |||
| 128 | bool setVelocitySquaredTermCoefficient(double velocitySquaredTermCoefficient); | ||
| 129 | |||
| 130 | void resetVelocitySquaredTermCoefficient(); | ||
| 131 | |||
| 132 | bool setDensityBasis(const std::string& densityBasis); | ||
| 133 | |||
| 134 | //@} | ||
| 135 | /** @name Other */ | ||
| 136 | //@{ | ||
| 137 | |||
| 138 | /** Returns the design flow rate (m^3/s) based on the floorArea (m^2), | ||
| 139 | * exteriorSurfaceArea (m^2), exteriorWallArea (m^2), and airVolume (m^3). */ | ||
| 140 | double getDesignFlowRate(double floorArea, double exteriorSurfaceArea, double exteriorWallArea, double airVolume) const; | ||
| 141 | |||
| 142 | /** Returns the design flow per space floor area (m^3/m^2*s) based on the | ||
| 143 | * floorArea (m^2), exteriorSurfaceArea (m^2), exteriorWallArea (m^2), and | ||
| 144 | * airVolume (m^3). */ | ||
| 145 | double getFlowPerSpaceFloorArea(double floorArea, double exteriorSurfaceArea, double exteriorWallArea, double airVolume) const; | ||
| 146 | |||
| 147 | /** Returns the design flow per exterior surface area (m^3/m^2*s) based on the | ||
| 148 | * floorArea (m^2), exteriorSurfaceArea (m^2), exteriorWallArea (m^2), and | ||
| 149 | * airVolume (m^3). */ | ||
| 150 | double getFlowPerExteriorSurfaceArea(double floorArea, double exteriorSurfaceArea, double exteriorWallArea, double airVolume) const; | ||
| 151 | |||
| 152 | /** Returns the design flow per exterior wall area (m^3/m^2*s) based on the | ||
| 153 | * floorArea (m^2), exteriorSurfaceArea (m^2), exteriorWallArea (m^2), and | ||
| 154 | * airVolume (m^3). */ | ||
| 155 | double getFlowPerExteriorWallArea(double floorArea, double exteriorSurfaceArea, double exteriorWallArea, double airVolume) const; | ||
| 156 | |||
| 157 | /** Returns the design air changes per hour (1/h) based on the floorArea (m^2), | ||
| 158 | * exteriorSurfaceArea (m^2), exteriorWallArea (m^2), and airVolume (m^3). */ | ||
| 159 | double getAirChangesPerHour(double floorArea, double exteriorSurfaceArea, double exteriorWallArea, double airVolume) const; | ||
| 160 | |||
| 161 | //@} | ||
| 162 | protected: | ||
| 163 | // index of the space name | ||
| 164 | virtual int spaceIndex() const override; | ||
| 165 | |||
| 166 | private: | ||
| 167 | REGISTER_LOGGER("openstudio.model.SpaceInfiltrationDesignFlowRate"); | ||
| 168 | |||
| 169 | boost::optional<ModelObject> scheduleAsModelObject() const; | ||
| 170 | |||
| 171 | bool setScheduleAsModelObject(const boost::optional<ModelObject>& modelObject); | ||
| 172 | }; | ||
| 173 | |||
| 174 | } // namespace detail | ||
| 175 | |||
| 176 | } // namespace model | ||
| 177 | } // namespace openstudio | ||
| 178 | |||
| 179 | #endif // MODEL_SPACEINFILTRATIONDESIGNFLOWRATE_IMPL_HPP | ||
| 180 |