MEASUR-Tools-Suite v1.0.11
The MEASUR Tools Suite is a collection of industrial efficiency calculations written in C++ and with bindings for compilation to WebAssembly.
Loading...
Searching...
No Matches
PRV.h
Go to the documentation of this file.
1
12#include "SteamProperties.h"
13
14#ifndef TOOLS_SUITE_PRV_H
15 #define TOOLS_SUITE_PRV_H
16
22 public:
34 double quantityValue, double inletMassFlow, double outletPressure);
35
36 friend std::ostream& operator<<(std::ostream& stream, const PrvWithoutDesuperheating& prv);
37 friend std::ostream& operator<<(std::ostream& stream, const std::shared_ptr<PrvWithoutDesuperheating>& prv);
38
39 virtual bool isWithDesuperheating() const { return false; }
40
46 double getInletPressure() const { return inletPressure; }
47
55
62 double getQuantityValue() const { return quantityValue; }
63
69 double getInletMassFlow() const { return inletMassFlow; }
70
76 double getOutletPressure() const { return outletPressure; }
77
82 SteamSystemModelerTool::SteamPropertiesOutput const& getInletProperties() const { return inletProperties; };
83
88 SteamSystemModelerTool::SteamPropertiesOutput const& getOutletProperties() const { return outletProperties; };
89
94 double getInletEnergyFlow() const { return inletEnergyFlow; }
95
101 virtual double getOutletMassFlow() const { return inletMassFlow; }
102
108 virtual double getOutletEnergyFlow() const { return inletEnergyFlow; }
109
116 void setInletPressure(double inletPressure) {
117 this->inletPressure = inletPressure;
118 calculateProperties();
119 }
120
129 this->quantityType = quantityType;
130 calculateProperties();
131 }
139 void setQuantityValue(double quantityValue) {
140 this->quantityValue = quantityValue;
141 calculateProperties();
142 }
143
150 void setInletMassFlow(double inletMassFlow) {
151 this->inletMassFlow = inletMassFlow;
152 calculateProperties();
153 }
154
161 void setOutletPressure(double outletPressure) {
162 this->outletPressure = outletPressure;
163 calculateProperties();
164 }
165
166 protected:
167 virtual void calculateProperties();
168
169 double inletPressure, quantityValue, inletMassFlow, outletPressure;
170 SteamSystemModelerTool::SteamPropertiesOutput inletProperties, outletProperties;
172
173 private:
174 double inletEnergyFlow;
175};
176
182 public:
201 double quantityValue, double inletMassFlow, double outletPressure, double feedwaterPressure,
202 SteamProperties::ThermodynamicQuantity feedwaterQuantityType, double feedwaterQuantityValue,
203 double desuperheatingTemp);
204
205 friend std::ostream& operator<<(std::ostream& stream, const PrvWithDesuperheating& prv);
206 friend std::ostream& operator<<(std::ostream& stream, const std::shared_ptr<PrvWithDesuperheating>& prv);
207
208 bool isWithDesuperheating() const override { return true; }
209
216 void setFeedwaterPressure(double feedwaterPressure) {
217 this->feedwaterPressure = feedwaterPressure;
218 calculateProperties();
219 }
220
226 double getFeedwaterPressure() const { return feedwaterPressure; }
227
236 this->feedwaterQuantityType = feedwaterQuantityType;
237 calculateProperties();
238 }
239
246 SteamProperties::ThermodynamicQuantity getFeedwaterQuantityType() const { return feedwaterQuantityType; }
247
255 void setFeedwaterQuantityValue(double feedwaterQuantityValue) {
256 this->feedwaterQuantityValue = feedwaterQuantityValue;
257 calculateProperties();
258 }
259
266 double getFeedwaterQuantityValue() const { return feedwaterQuantityValue; }
267
274 void setDesuperheatingTemp(double desuperheatingTemp) {
275 this->desuperheatingTemp = desuperheatingTemp;
276 calculateProperties();
277 }
278
284 double getDesuperheatingTemp() const { return desuperheatingTemp; }
285
290 SteamSystemModelerTool::SteamPropertiesOutput const& getFeedwaterProperties() const { return feedwaterProperties; };
291
296 double getOutletMassFlow() const override { return outletMassFlow; };
297
302 double getOutletEnergyFlow() const override { return outletEnergyFlow; };
303
308 double getFeedwaterMassFlow() const { return feedwaterMassFlow; };
309
314 double getFeedwaterEnergyFlow() const { return feedwaterEnergyFlow; };
315
320 SteamSystemModelerTool::SteamPropertiesOutput const& getInletProperties() const { return inletProperties; };
321
326 SteamSystemModelerTool::SteamPropertiesOutput const& getOutletProperties() const { return outletProperties; };
327
332 double getInletEnergyFlow() const { return inletEnergyFlow; }
333
338 double getInletMassFlow() const { return inletMassFlow; }
339
340 protected:
341 void calculateProperties() override;
342
343 private:
344 // In values
345 double feedwaterPressure, feedwaterQuantityValue, desuperheatingTemp;
346 SteamProperties::ThermodynamicQuantity feedwaterQuantityType;
347
348 // Out values
350 double inletEnergyFlow, outletMassFlow, outletEnergyFlow, feedwaterMassFlow, feedwaterEnergyFlow;
351};
352
354 public:
356 std::shared_ptr<PrvWithDesuperheating> Cast(std::shared_ptr<PrvWithoutDesuperheating> prvWithout) {
357 return std::static_pointer_cast<PrvWithDesuperheating>(prvWithout);
358 }
359};
360
361#endif // TOOLS_SUITE_PRV_H
double getInletMassFlow() const
Definition PRV.h:338
double getOutletEnergyFlow() const override
Definition PRV.h:302
double getFeedwaterPressure() const
Definition PRV.h:226
SteamSystemModelerTool::SteamPropertiesOutput const & getFeedwaterProperties() const
Definition PRV.h:290
void setFeedwaterQuantityType(SteamProperties::ThermodynamicQuantity feedwaterQuantityType)
Definition PRV.h:235
double getFeedwaterEnergyFlow() const
Definition PRV.h:314
SteamSystemModelerTool::SteamPropertiesOutput const & getInletProperties() const
Definition PRV.h:320
SteamSystemModelerTool::SteamPropertiesOutput const & getOutletProperties() const
Definition PRV.h:326
double getOutletMassFlow() const override
Definition PRV.h:296
void setFeedwaterPressure(double feedwaterPressure)
Definition PRV.h:216
double getFeedwaterQuantityValue() const
Definition PRV.h:266
double getInletEnergyFlow() const
Definition PRV.h:332
double getFeedwaterMassFlow() const
Definition PRV.h:308
SteamProperties::ThermodynamicQuantity getFeedwaterQuantityType() const
Definition PRV.h:246
void setDesuperheatingTemp(double desuperheatingTemp)
Definition PRV.h:274
PrvWithDesuperheating(double inletPressure, SteamProperties::ThermodynamicQuantity quantityType, double quantityValue, double inletMassFlow, double outletPressure, double feedwaterPressure, SteamProperties::ThermodynamicQuantity feedwaterQuantityType, double feedwaterQuantityValue, double desuperheatingTemp)
double getDesuperheatingTemp() const
Definition PRV.h:284
void setFeedwaterQuantityValue(double feedwaterQuantityValue)
Definition PRV.h:255
double getInletEnergyFlow() const
Definition PRV.h:94
double getInletMassFlow() const
Definition PRV.h:69
void setOutletPressure(double outletPressure)
Definition PRV.h:161
double getQuantityValue() const
Definition PRV.h:62
SteamSystemModelerTool::SteamPropertiesOutput const & getInletProperties() const
Definition PRV.h:82
void setQuantityType(SteamProperties::ThermodynamicQuantity quantityType)
Definition PRV.h:128
void setInletPressure(double inletPressure)
Definition PRV.h:116
PrvWithoutDesuperheating(double inletPressure, SteamProperties::ThermodynamicQuantity quantityType, double quantityValue, double inletMassFlow, double outletPressure)
double getInletPressure() const
Definition PRV.h:46
void setQuantityValue(double quantityValue)
Definition PRV.h:139
virtual double getOutletEnergyFlow() const
Definition PRV.h:108
SteamSystemModelerTool::SteamPropertiesOutput const & getOutletProperties() const
Definition PRV.h:88
void setInletMassFlow(double inletMassFlow)
Definition PRV.h:150
SteamProperties::ThermodynamicQuantity getQuantityType() const
Definition PRV.h:54
double getOutletPressure() const
Definition PRV.h:76
virtual double getOutletMassFlow() const
Definition PRV.h:101
ThermodynamicQuantity
enum class for ThermodynamicQuantity