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#pragma once
2
13#include <iostream>
14
15#include "SteamProperties.h"
23class Turbine {
24 public:
26 enum class Solve { OutletProperties, IsentropicEfficiency };
28 enum class TurbineProperty { MassFlow, PowerOut };
49 Turbine(Solve solveFor, double inletPressure, SteamProperties::ThermodynamicQuantity inletQuantity,
50 double inletQuantityValue, TurbineProperty turbineProperty, double isentropicEfficiency,
51 double generatorEfficiency, double massFlowOrPowerOut, double outletSteamPressure);
52
76 Turbine(Solve solveFor, double inletPressure, SteamProperties::ThermodynamicQuantity inletQuantity,
77 double inletQuantityValue, TurbineProperty turbineProperty, double generatorEfficiency,
78 double massFlowOrPowerOut, double outletSteamPressure,
79 SteamProperties::ThermodynamicQuantity outletQuantity, double outletQuantityValue);
86 friend std::ostream& operator<<(std::ostream& stream, const Turbine& turbine);
87 friend std::ostream& operator<<(std::ostream& stream, const std::shared_ptr<Turbine>& turbine);
88
89 Solve getSolveFor() const { return solveFor; }
95 double getInletPressure() const { return inletPressure; }
101 double getIsentropicEfficiency() const { return isentropicEfficiency * 100; }
107 double getGeneratorEfficiency() const { return generatorEfficiency * 100; }
113 double getMassFlowOrPowerOut() const { return massFlowOrPowerOut; }
119 double getOutletSteamPressure() const { return outletSteamPressure; }
140 double getInletQuantityValue() const { return inletQuantityValue; }
147 double getOutletQuantityValue() const { return outletQuantityValue; }
153 TurbineProperty getTurbineProperty() const { return turbineProperty; }
159 SteamSystemModelerTool::SteamPropertiesOutput const& getInletProperties() const { return inletProperties; }
165 SteamSystemModelerTool::SteamPropertiesOutput const& getOutletProperties() const { return outletProperties; }
171 double getInletEnergyFlow() const { return inletEnergyFlow; }
177 double getOutletEnergyFlow() const { return outletEnergyFlow; }
183 double getPowerOut() const { return powerOut; }
189 double getEnergyOut() const { return energyOut; }
195 double getMassFlow() const { return massFlow; }
201 void setSolveFor(Solve solveFor);
207 void setInletPressure(double inletPressure);
213 void setIsentropicEfficiency(double isentropicEfficiency);
219 void setGeneratorEfficiency(double generatorEfficiency);
225 void setMassFlowOrPowerOut(double massFlowOrPowerOut);
231 void setOutletSteamPressure(double outletSteamPressure);
252 void setInletQuantityValue(double inletQuantityValue);
259 void setOutletQuantityValue(double outletQuantityValue);
266 void setTurbineProperty(TurbineProperty turbineProperty);
267
268 private:
273 void calculate();
290 void calculateTurbineProperties(double inletSpecificEnthalpy, double outletSpecificEnthalpy);
291
292 Solve solveFor;
293 double inletPressure, isentropicEfficiency, generatorEfficiency, massFlowOrPowerOut, outletSteamPressure;
294 SteamProperties::ThermodynamicQuantity inletQuantity, outletQuantity;
295 double inletQuantityValue, outletQuantityValue = 0;
296 TurbineProperty turbineProperty;
297
298 SteamSystemModelerTool::SteamPropertiesOutput inletProperties, outletProperties;
299
300 double inletEnergyFlow, outletEnergyFlow = 0, energyOut, powerOut, massFlow;
301};
302
ThermodynamicQuantity
enum class for ThermodynamicQuantity
void setInletPressure(double inletPressure)
SteamSystemModelerTool::SteamPropertiesOutput const & getInletProperties() const
Definition Turbine.h:159
double getEnergyOut() const
Definition Turbine.h:189
double getInletPressure() const
Definition Turbine.h:95
TurbineProperty getTurbineProperty() const
Definition Turbine.h:153
double getOutletSteamPressure() const
Definition Turbine.h:119
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:140
double getMassFlow() const
Definition Turbine.h:195
void setGeneratorEfficiency(double generatorEfficiency)
double getIsentropicEfficiency() const
Definition Turbine.h:101
TurbineProperty
enum class for TurbineProperty
Definition Turbine.h:28
void setMassFlowOrPowerOut(double massFlowOrPowerOut)
Sets the Mass Flow Or Power Out.
void solveForIsentropicEfficiency()
double getMassFlowOrPowerOut() const
Definition Turbine.h:113
double getPowerOut() const
Definition Turbine.h:183
double getGeneratorEfficiency() const
Definition Turbine.h:107
void setSolveFor(Solve solveFor)
Solve
enum class for Solve
Definition Turbine.h:26
double getOutletEnergyFlow() const
Definition Turbine.h:177
void setOutletQuantityValue(double outletQuantityValue)
void setOutletSteamPressure(double outletSteamPressure)
void setTurbineProperty(TurbineProperty turbineProperty)
void setInletQuantityValue(double inletQuantityValue)
SteamProperties::ThermodynamicQuantity getInletQuantity() const
Definition Turbine.h:126
double getOutletQuantityValue() const
Definition Turbine.h:147
SteamProperties::ThermodynamicQuantity getOutletQuantity() const
Definition Turbine.h:133
void calculate()
void setOutletQuantity(SteamProperties::ThermodynamicQuantity outletQuantity)
void solveForOutletProperties()
double getInletEnergyFlow() const
Definition Turbine.h:171
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:165