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
Turbine.h
Go to the documentation of this file.
1 
11 #ifndef AMO_TOOLS_SUITE_TURBINE_H
12 #define AMO_TOOLS_SUITE_TURBINE_H
13 
14 #include <iostream>
15 #include "SteamProperties.h"
23 class Turbine {
24 public:
26  enum class Solve {
27  OutletProperties,
28  IsentropicEfficiency
29  };
31  enum class TurbineProperty {
32  MassFlow,
33  PowerOut
34  };
52  Turbine(Solve solveFor, double inletPressure, SteamProperties::ThermodynamicQuantity inletQuantity,
53  double inletQuantityValue, TurbineProperty turbineProperty, double isentropicEfficiency,
54  double generatorEfficiency, double massFlowOrPowerOut, double outletSteamPressure);
55 
74  Turbine(Solve solveFor, double inletPressure, SteamProperties::ThermodynamicQuantity inletQuantity,
75  double inletQuantityValue, TurbineProperty turbineProperty, double generatorEfficiency,
76  double massFlowOrPowerOut, double outletSteamPressure,
77  SteamProperties::ThermodynamicQuantity outletQuantity, double outletQuantityValue);
84  friend std::ostream &operator<<(std::ostream &stream, const Turbine &turbine);
85  friend std::ostream &operator<<(std::ostream &stream, const std::shared_ptr<Turbine> &turbine);
86 
87  Solve getSolveFor() const { return solveFor; }
93  double getInletPressure() const { return inletPressure; }
99  double getIsentropicEfficiency() const { return isentropicEfficiency * 100; }
105  double getGeneratorEfficiency() const { return generatorEfficiency * 100; }
111  double getMassFlowOrPowerOut() const { return massFlowOrPowerOut; }
117  double getOutletSteamPressure() const { return outletSteamPressure; }
135  double getInletQuantityValue() const { return inletQuantityValue; }
141  double getOutletQuantityValue() const { return outletQuantityValue; }
147  TurbineProperty getTurbineProperty() const { return turbineProperty; }
153  SteamSystemModelerTool::SteamPropertiesOutput const & getInletProperties() const { return inletProperties; }
159  SteamSystemModelerTool::SteamPropertiesOutput const & getOutletProperties() const { return outletProperties; }
165  double getInletEnergyFlow() const { return inletEnergyFlow; }
171  double getOutletEnergyFlow() const { return outletEnergyFlow; }
177  double getPowerOut() const { return powerOut; }
183  double getEnergyOut() const { return energyOut; }
189  double getMassFlow() const { return massFlow; }
195  void setSolveFor(Solve solveFor);
201  void setInletPressure(double inletPressure);
207  void setIsentropicEfficiency(double isentropicEfficiency);
213  void setGeneratorEfficiency(double generatorEfficiency);
219  void setMassFlowOrPowerOut(double massFlowOrPowerOut);
225  void setOutletSteamPressure(double outletSteamPressure);
243  void setInletQuantityValue(double inletQuantityValue);
249  void setOutletQuantityValue(double outletQuantityValue);
256  void setTurbineProperty(TurbineProperty turbineProperty);
257 
258 private:
263  void calculate();
268  void solveForOutletProperties();
273  void solveForIsentropicEfficiency();
280  void calculateTurbineProperties(double inletSpecificEnthalpy, double outletSpecificEnthalpy);
281 
282  Solve solveFor;
283  double inletPressure, isentropicEfficiency, generatorEfficiency, massFlowOrPowerOut, outletSteamPressure;
284  SteamProperties::ThermodynamicQuantity inletQuantity, outletQuantity;
285  double inletQuantityValue, outletQuantityValue = 0;
286  TurbineProperty turbineProperty;
287 
288  SteamSystemModelerTool::SteamPropertiesOutput inletProperties, outletProperties;
289 
290  double inletEnergyFlow, outletEnergyFlow = 0, energyOut, powerOut, massFlow;
291 };
292 
293 #endif //AMO_TOOLS_SUITE_TURBINE_H
double getInletEnergyFlow() const
Definition: Turbine.h:165
friend std::ostream & operator<<(std::ostream &stream, const Turbine &turbine)
Definition: Turbine.cpp:91
double getIsentropicEfficiency() const
Definition: Turbine.h:99
void setOutletSteamPressure(double outletSteamPressure)
Definition: Turbine.cpp:149
Turbine(Solve solveFor, double inletPressure, SteamProperties::ThermodynamicQuantity inletQuantity, double inletQuantityValue, TurbineProperty turbineProperty, double isentropicEfficiency, double generatorEfficiency, double massFlowOrPowerOut, double outletSteamPressure)
Definition: Turbine.cpp:4
void setMassFlowOrPowerOut(double massFlowOrPowerOut)
Sets the Mass Flow Or Power Out.
Definition: Turbine.cpp:144
void setInletQuantityValue(double inletQuantityValue)
Definition: Turbine.cpp:164
double getOutletSteamPressure() const
Definition: Turbine.h:117
TurbineProperty
enum class for TurbineProperty
Definition: Turbine.h:31
void setTurbineProperty(TurbineProperty turbineProperty)
Definition: Turbine.cpp:174
void setInletQuantity(SteamProperties::ThermodynamicQuantity inletQuantity)
Definition: Turbine.cpp:154
double getOutletQuantityValue() const
Definition: Turbine.h:141
void setOutletQuantity(SteamProperties::ThermodynamicQuantity outletQuantity)
Definition: Turbine.cpp:159
void setOutletQuantityValue(double outletQuantityValue)
Definition: Turbine.cpp:169
double getInletPressure() const
Definition: Turbine.h:93
Solve
enum class for Solve
Definition: Turbine.h:26
SteamProperties::ThermodynamicQuantity getOutletQuantity() const
Definition: Turbine.h:129
SteamSystemModelerTool::SteamPropertiesOutput const & getOutletProperties() const
Definition: Turbine.h:159
TurbineProperty getTurbineProperty() const
Definition: Turbine.h:147
SteamProperties::ThermodynamicQuantity getInletQuantity() const
Definition: Turbine.h:123
void setGeneratorEfficiency(double generatorEfficiency)
Definition: Turbine.cpp:139
double getMassFlow() const
Definition: Turbine.h:189
ThermodynamicQuantity
enum class for ThermodynamicQuantity
SteamSystemModelerTool::SteamPropertiesOutput const & getInletProperties() const
Definition: Turbine.h:153
double getEnergyOut() const
Definition: Turbine.h:183
double getPowerOut() const
Definition: Turbine.h:177
void setSolveFor(Solve solveFor)
Definition: Turbine.cpp:124
double getMassFlowOrPowerOut() const
Definition: Turbine.h:111
void setInletPressure(double inletPressure)
Definition: Turbine.cpp:129
double getInletQuantityValue() const
Definition: Turbine.h:135
void setIsentropicEfficiency(double isentropicEfficiency)
Definition: Turbine.cpp:134
double getGeneratorEfficiency() const
Definition: Turbine.h:105
double getOutletEnergyFlow() const
Definition: Turbine.h:171