AMO-Tools-Suite  v.0.9.0
Set of tools for calculating energy efficiency in industrial equipment
All Classes Namespaces Files Functions Variables Enumerations Friends Macros Pages
Atmosphere.h
Go to the documentation of this file.
1 
13 #include <string>
14 
15 #ifndef AMO_SUITE_ATMOSPHERE_H
16 #define AMO_SUITE_ATMOSPHERE_H
17 
19 #define REFERENCE_TEMPERATURE 60.0
20 
31 class Atmosphere {
32 public:
45  Atmosphere(const double inletTemperature, const double outletTemperature, const double flowRate,
46  const double correctionFactor, const double specificHeat)
47  : inletTemperature(inletTemperature),
48  outletTemperature(outletTemperature),
49  flowRate(flowRate),
50  correctionFactor(correctionFactor),
51  specificHeat(specificHeat)
52  {
53  totalHeat = 0.0;
54  }
55 
56  Atmosphere() = default;
57 
62  double getInletTemperature() const {
63  return inletTemperature;
64  }
65 
70  void setInletTemperature(const double inletTemperature) {
71  this->inletTemperature = inletTemperature;
72  }
73 
78  double getOutletTemperature() const {
79  return outletTemperature;
80  }
81 
86  void setOutletTemperature(const double outletTemperature) {
87  this->outletTemperature = outletTemperature;
88  }
89 
94  double getFlowRate() const {
95  return flowRate;
96  }
97 
102  void setFlowRate(const double flowRate) {
103  this->flowRate = flowRate;
104  }
105 
110  double getCorrectionFactor() const {
111  return correctionFactor;
112  }
113 
118  void setCorrectionFactor(const double correctionFactor) {
119  this->correctionFactor = correctionFactor;
120  }
121 
126  double getSpecificHeat() const {
127  return specificHeat;
128  }
129 
134  void setSpecificHeat(const double specificHeat) {
135  this->specificHeat = specificHeat;
136  }
137 
142  double getTotalHeat();
143 
148  std::string getSubstance() const {
149  return substance;
150  }
151 
156  void setSubstance(std::string substance) {
157  this->substance = std::move(substance);
158  }
159 
164  int getID() const {
165  return this->id;
166  }
167 
172  void setID(const int id) {
173  this->id = id;
174  }
175 
177  bool operator == (const Atmosphere& rhs) const
178  {
179  return specificHeat == rhs.specificHeat &&
180  substance == rhs.substance && id == rhs.id;
181  }
182 
184  bool operator != (const Atmosphere& rhs) const
185  {
186  return !(*this == rhs);
187  }
188 
189 private:
190  // In values
191  double inletTemperature;
192  double outletTemperature;
193  double flowRate;
194  double correctionFactor;
195  double specificHeat;
196 
197  std::string substance = "Unknown";
198  int id = 0;
199  // Out value
200 
202  double totalHeat;
203 
204  friend class SQLite;
205 
211  Atmosphere(
212  std::string substance,
213  double specificHeat)
214  : specificHeat(specificHeat),
215  substance(std::move(substance))
216  {}
217 };
218 
219 
220 #endif //AMO_SUITE_ATMOSPHERE_H
int getID() const
Definition: Atmosphere.h:164
bool operator==(const Atmosphere &rhs) const
bool operator
Definition: Atmosphere.h:177
void setSpecificHeat(const double specificHeat)
Definition: Atmosphere.h:134
void setFlowRate(const double flowRate)
Definition: Atmosphere.h:102
Definition: SQLite.h:104
double getFlowRate() const
Definition: Atmosphere.h:94
void setSubstance(std::string substance)
Definition: Atmosphere.h:156
void setInletTemperature(const double inletTemperature)
Definition: Atmosphere.h:70
void setOutletTemperature(const double outletTemperature)
Definition: Atmosphere.h:86
double getTotalHeat()
Definition: Atmosphere.cpp:11
double getOutletTemperature() const
Definition: Atmosphere.h:78
double getSpecificHeat() const
Definition: Atmosphere.h:126
Atmosphere(const double inletTemperature, const double outletTemperature, const double flowRate, const double correctionFactor, const double specificHeat)
Definition: Atmosphere.h:45
double getInletTemperature() const
Definition: Atmosphere.h:62
double getCorrectionFactor() const
Definition: Atmosphere.h:110
bool operator!=(const Atmosphere &rhs) const
bool operator
Definition: Atmosphere.h:184
void setCorrectionFactor(const double correctionFactor)
Definition: Atmosphere.h:118
std::string getSubstance() const
Definition: Atmosphere.h:148
void setID(const int id)
Definition: Atmosphere.h:172