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
Turbine.h
Go to the documentation of this file.
1
11#ifndef TOOLS_SUITE_TURBINE_H
12#define TOOLS_SUITE_TURBINE_H
13
14#include <iostream>
15
16#include "SteamProperties.h"
24class Turbine {
25 public:
27 enum class Solve { OutletProperties, IsentropicEfficiency };
29 enum class TurbineProperty { MassFlow, PowerOut };
50 Turbine(Solve solveFor, double inletPressure, SteamProperties::ThermodynamicQuantity inletQuantity,
51 double inletQuantityValue, TurbineProperty turbineProperty, double isentropicEfficiency,
52 double generatorEfficiency, double massFlowOrPowerOut, double outletSteamPressure);
53
77 Turbine(Solve solveFor, double inletPressure, SteamProperties::ThermodynamicQuantity inletQuantity,
78 double inletQuantityValue, TurbineProperty turbineProperty, double generatorEfficiency,
79 double massFlowOrPowerOut, double outletSteamPressure,
80 SteamProperties::ThermodynamicQuantity outletQuantity, double outletQuantityValue);
87 friend std::ostream& operator<<(std::ostream& stream, const Turbine& turbine);
88 friend std::ostream& operator<<(std::ostream& stream, const std::shared_ptr<Turbine>& turbine);
89
90 Solve getSolveFor() const { return solveFor; }
96 double getInletPressure() const { return inletPressure; }
102 double getIsentropicEfficiency() const { return isentropicEfficiency * 100; }
108 double getGeneratorEfficiency() const { return generatorEfficiency * 100; }
114 double getMassFlowOrPowerOut() const { return massFlowOrPowerOut; }
120 double getOutletSteamPressure() const { return outletSteamPressure; }
141 double getInletQuantityValue() const { return inletQuantityValue; }
148 double getOutletQuantityValue() const { return outletQuantityValue; }
154 TurbineProperty getTurbineProperty() const { return turbineProperty; }
160 SteamSystemModelerTool::SteamPropertiesOutput const& getInletProperties() const { return inletProperties; }
166 SteamSystemModelerTool::SteamPropertiesOutput const& getOutletProperties() const { return outletProperties; }
172 double getInletEnergyFlow() const { return inletEnergyFlow; }
178 double getOutletEnergyFlow() const { return outletEnergyFlow; }
184 double getPowerOut() const { return powerOut; }
190 double getEnergyOut() const { return energyOut; }
196 double getMassFlow() const { return massFlow; }
202 void setSolveFor(Solve solveFor);
208 void setInletPressure(double inletPressure);
214 void setIsentropicEfficiency(double isentropicEfficiency);
220 void setGeneratorEfficiency(double generatorEfficiency);
226 void setMassFlowOrPowerOut(double massFlowOrPowerOut);
232 void setOutletSteamPressure(double outletSteamPressure);
253 void setInletQuantityValue(double inletQuantityValue);
260 void setOutletQuantityValue(double outletQuantityValue);
267 void setTurbineProperty(TurbineProperty turbineProperty);
268
269 private:
274 void calculate();
291 void calculateTurbineProperties(double inletSpecificEnthalpy, double outletSpecificEnthalpy);
292
293 Solve solveFor;
294 double inletPressure, isentropicEfficiency, generatorEfficiency, massFlowOrPowerOut, outletSteamPressure;
295 SteamProperties::ThermodynamicQuantity inletQuantity, outletQuantity;
296 double inletQuantityValue, outletQuantityValue = 0;
297 TurbineProperty turbineProperty;
298
299 SteamSystemModelerTool::SteamPropertiesOutput inletProperties, outletProperties;
300
301 double inletEnergyFlow, outletEnergyFlow = 0, energyOut, powerOut, massFlow;
302};
303
304#endif // TOOLS_SUITE_TURBINE_H
ThermodynamicQuantity
enum class for ThermodynamicQuantity
void setInletPressure(double inletPressure)
SteamSystemModelerTool::SteamPropertiesOutput const & getInletProperties() const
Definition Turbine.h:160
double getEnergyOut() const
Definition Turbine.h:190
double getInletPressure() const
Definition Turbine.h:96
TurbineProperty getTurbineProperty() const
Definition Turbine.h:154
double getOutletSteamPressure() const
Definition Turbine.h:120
Turbine(Solve solveFor, double inletPressure, SteamProperties::ThermodynamicQuantity inletQuantity, double inletQuantityValue, TurbineProperty turbineProperty, double generatorEfficiency, double massFlowOrPowerOut, double outletSteamPressure, SteamProperties::ThermodynamicQuantity outletQuantity, double outletQuantityValue)
Turbine(Solve solveFor, double inletPressure, SteamProperties::ThermodynamicQuantity inletQuantity, double inletQuantityValue, TurbineProperty turbineProperty, double isentropicEfficiency, double generatorEfficiency, double massFlowOrPowerOut, double outletSteamPressure)
double getInletQuantityValue() const
Definition Turbine.h:141
double getMassFlow() const
Definition Turbine.h:196
void setGeneratorEfficiency(double generatorEfficiency)
double getIsentropicEfficiency() const
Definition Turbine.h:102
TurbineProperty
enum class for TurbineProperty
Definition Turbine.h:29
void setMassFlowOrPowerOut(double massFlowOrPowerOut)
Sets the Mass Flow Or Power Out.
void solveForIsentropicEfficiency()
double getMassFlowOrPowerOut() const
Definition Turbine.h:114
double getPowerOut() const
Definition Turbine.h:184
double getGeneratorEfficiency() const
Definition Turbine.h:108
void setSolveFor(Solve solveFor)
Solve
enum class for Solve
Definition Turbine.h:27
double getOutletEnergyFlow() const
Definition Turbine.h:178
void setOutletQuantityValue(double outletQuantityValue)
void setOutletSteamPressure(double outletSteamPressure)
void setTurbineProperty(TurbineProperty turbineProperty)
void setInletQuantityValue(double inletQuantityValue)
SteamProperties::ThermodynamicQuantity getInletQuantity() const
Definition Turbine.h:127
double getOutletQuantityValue() const
Definition Turbine.h:148
SteamProperties::ThermodynamicQuantity getOutletQuantity() const
Definition Turbine.h:134
void calculate()
void setOutletQuantity(SteamProperties::ThermodynamicQuantity outletQuantity)
void solveForOutletProperties()
double getInletEnergyFlow() const
Definition Turbine.h:172
void setIsentropicEfficiency(double isentropicEfficiency)
void setInletQuantity(SteamProperties::ThermodynamicQuantity inletQuantity)
void calculateTurbineProperties(double inletSpecificEnthalpy, double outletSpecificEnthalpy)
friend std::ostream & operator<<(std::ostream &stream, const Turbine &turbine)
SteamSystemModelerTool::SteamPropertiesOutput const & getOutletProperties() const
Definition Turbine.h:166