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
PRV.h
Go to the documentation of this file.
1 
12 #include "SteamProperties.h"
13 
14 #ifndef AMO_TOOLS_SUITE_PRV_H
15 #define AMO_TOOLS_SUITE_PRV_H
16 
22 public:
31  PrvWithoutDesuperheating(double inletPressure, SteamProperties::ThermodynamicQuantity quantityType,
32  double quantityValue, double inletMassFlow, double outletPressure);
33 
34  friend std::ostream &operator<<(std::ostream &stream, const PrvWithoutDesuperheating &prv);
35  friend std::ostream &operator<<(std::ostream &stream, const std::shared_ptr<PrvWithoutDesuperheating> &prv);
36 
37  virtual bool isWithDesuperheating() const { return false; }
38 
44  double getInletPressure() const {
45  return inletPressure;
46  }
47 
54  return quantityType;
55  }
56 
62  double getQuantityValue() const {
63  return quantityValue;
64  }
65 
71  double getInletMassFlow() const {
72  return inletMassFlow;
73  }
74 
80  double getOutletPressure() const {
81  return outletPressure;
82  }
83 
88  SteamSystemModelerTool::SteamPropertiesOutput const & getInletProperties() const { return inletProperties; };
89 
94  SteamSystemModelerTool::SteamPropertiesOutput const & getOutletProperties() const { return outletProperties; };
95 
100  double getInletEnergyFlow() const { return inletEnergyFlow; }
101 
107  virtual double getOutletMassFlow() const { return inletMassFlow; }
108 
114  virtual double getOutletEnergyFlow() const { return inletEnergyFlow; }
115 
122  void setInletPressure(double inletPressure) {
123  this->inletPressure = inletPressure;
124  calculateProperties();
125  }
126 
134  this->quantityType = quantityType;
135  calculateProperties();
136  }
143  void setQuantityValue(double quantityValue) {
144  this->quantityValue = quantityValue;
145  calculateProperties();
146  }
147 
154  void setInletMassFlow(double inletMassFlow) {
155  this->inletMassFlow = inletMassFlow;
156  calculateProperties();
157  }
158 
165  void setOutletPressure(double outletPressure) {
166  this->outletPressure = outletPressure;
167  calculateProperties();
168  }
169 
170 protected:
171  virtual void calculateProperties();
172 
173  double inletPressure, quantityValue, inletMassFlow, outletPressure;
174  SteamSystemModelerTool::SteamPropertiesOutput inletProperties, outletProperties;
176 
177 private:
178  double inletEnergyFlow;
179 };
180 
181 
182 
188 public:
202  PrvWithDesuperheating(double inletPressure, SteamProperties::ThermodynamicQuantity quantityType,
203  double quantityValue, double inletMassFlow, double outletPressure, double feedwaterPressure,
204  SteamProperties::ThermodynamicQuantity feedwaterQuantityType, double feedwaterQuantityValue,
205  double desuperheatingTemp);
206 
207  friend std::ostream &operator<<(std::ostream &stream, const PrvWithDesuperheating &prv);
208  friend std::ostream &operator<<(std::ostream &stream, const std::shared_ptr<PrvWithDesuperheating> &prv);
209 
210  bool isWithDesuperheating() const override { return true; }
211 
218  void setFeedwaterPressure(double feedwaterPressure) {
219  this->feedwaterPressure = feedwaterPressure;
220  calculateProperties();
221  }
222 
228  double getFeedwaterPressure() const { return feedwaterPressure; }
229 
237  this->feedwaterQuantityType = feedwaterQuantityType;
238  calculateProperties();
239  }
240 
246  SteamProperties::ThermodynamicQuantity getFeedwaterQuantityType() const { return feedwaterQuantityType; }
247 
254  void setFeedwaterQuantityValue(double feedwaterQuantityValue) {
255  this->feedwaterQuantityValue = feedwaterQuantityValue;
256  calculateProperties();
257  }
258 
264  double getFeedwaterQuantityValue() const { return feedwaterQuantityValue; }
265 
272  void setDesuperheatingTemp(double desuperheatingTemp) {
273  this->desuperheatingTemp = desuperheatingTemp;
274  calculateProperties();
275  }
276 
282  double getDesuperheatingTemp() const { return desuperheatingTemp; }
283 
288  SteamSystemModelerTool::SteamPropertiesOutput const & getFeedwaterProperties() const { return feedwaterProperties; };
289 
290 
295  double getOutletMassFlow() const override { return outletMassFlow; };
296 
301  double getOutletEnergyFlow() const override { return outletEnergyFlow; };
302 
307  double getFeedwaterMassFlow() const { return feedwaterMassFlow; };
308 
313  double getFeedwaterEnergyFlow() const { return feedwaterEnergyFlow; };
314 
315 protected:
316  void calculateProperties() override;
317 
318 private:
319  // In values
320  double feedwaterPressure, feedwaterQuantityValue, desuperheatingTemp;
321  SteamProperties::ThermodynamicQuantity feedwaterQuantityType;
322 
323  // Out values
325  double inletEnergyFlow, outletMassFlow, outletEnergyFlow, feedwaterMassFlow, feedwaterEnergyFlow;
326 };
327 
328 #endif //AMO_TOOLS_SUITE_PRV_H
double getInletPressure() const
Definition: PRV.h:44
void setOutletPressure(double outletPressure)
Definition: PRV.h:165
SteamSystemModelerTool::SteamPropertiesOutput const & getInletProperties() const
Definition: PRV.h:88
void setFeedwaterQuantityValue(double feedwaterQuantityValue)
Definition: PRV.h:254
virtual double getOutletEnergyFlow() const
Definition: PRV.h:114
SteamProperties::ThermodynamicQuantity getQuantityType() const
Definition: PRV.h:53
virtual double getOutletMassFlow() const
Definition: PRV.h:107
double getQuantityValue() const
Definition: PRV.h:62
PrvWithoutDesuperheating(double inletPressure, SteamProperties::ThermodynamicQuantity quantityType, double quantityValue, double inletMassFlow, double outletPressure)
Definition: PRV.cpp:13
void setFeedwaterPressure(double feedwaterPressure)
Definition: PRV.h:218
void setDesuperheatingTemp(double desuperheatingTemp)
Definition: PRV.h:272
void setInletMassFlow(double inletMassFlow)
Definition: PRV.h:154
double getInletEnergyFlow() const
Definition: PRV.h:100
void setQuantityValue(double quantityValue)
Definition: PRV.h:143
SteamSystemModelerTool::SteamPropertiesOutput const & getOutletProperties() const
Definition: PRV.h:94
double getOutletEnergyFlow() const override
Definition: PRV.h:301
double getOutletPressure() const
Definition: PRV.h:80
double getInletMassFlow() const
Definition: PRV.h:71
double getFeedwaterMassFlow() const
Definition: PRV.h:307
double getFeedwaterPressure() const
Definition: PRV.h:228
ThermodynamicQuantity
enum class for ThermodynamicQuantity
void setQuantityType(SteamProperties::ThermodynamicQuantity quantityType)
Definition: PRV.h:133
double getFeedwaterQuantityValue() const
Definition: PRV.h:264
double getFeedwaterEnergyFlow() const
Definition: PRV.h:313
double getOutletMassFlow() const override
Definition: PRV.h:295
SteamSystemModelerTool::SteamPropertiesOutput const & getFeedwaterProperties() const
Definition: PRV.h:288
SteamProperties::ThermodynamicQuantity getFeedwaterQuantityType() const
Definition: PRV.h:246
double getDesuperheatingTemp() const
Definition: PRV.h:282
void setInletPressure(double inletPressure)
Definition: PRV.h:122
void setFeedwaterQuantityType(SteamProperties::ThermodynamicQuantity feedwaterQuantityType)
Definition: PRV.h:236