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
TurbineInput.h
1#pragma once
2
3#include <iostream>
4#include <type_traits>
5
9enum class CondensingTurbineOperation { POWER_GENERATION = 1, STEAM_FLOW = 0 };
10
14enum class PressureTurbineOperation {
15 BALANCE_HEADER = 2,
16 FLOW_RANGE = 4,
17 POWER_GENERATION = 1,
18 POWER_RANGE = 3,
19 STEAM_FLOW = 0
20};
21
22template <typename T>
23std::ostream& operator<<(typename std::enable_if<std::is_enum<T>::value, std::ostream>::type& stream, const T& e) {
24 return stream << static_cast<typename std::underlying_type<T>::type>(e);
25}
26
31 public:
32 CondensingTurbine(double isentropicEfficiency, double generationEfficiency, double condenserPressure,
33 CondensingTurbineOperation operationType, double operationValue, bool useTurbine);
34
35 friend std::ostream& operator<<(std::ostream& stream, const CondensingTurbine& ct);
36
37 double getIsentropicEfficiency() const;
38
39 double getGenerationEfficiency() const;
40
41 double getCondenserPressure() const;
42
43 CondensingTurbineOperation getOperationType() const;
44
45 double getOperationValue() const;
46
47 bool isUseTurbine() const;
48
49 private:
50 double isentropicEfficiency;
51 double generationEfficiency;
52 double condenserPressure;
53 CondensingTurbineOperation operationType;
54 double operationValue;
55 bool useTurbine;
56};
57
62 public:
63 PressureTurbine(double isentropicEfficiency, double generationEfficiency, PressureTurbineOperation operationType,
64 double operationValue1, double operationValue2, bool useTurbine);
65
66 friend std::ostream& operator<<(std::ostream& stream, const PressureTurbine& pt);
67
68 double getIsentropicEfficiency() const;
69
70 double getGenerationEfficiency() const;
71
72 PressureTurbineOperation getOperationType() const;
73
74 double getOperationValue1() const;
75
76 double getOperationValue2() const;
77
78 bool isUseTurbine() const;
79
80 private:
81 double isentropicEfficiency;
82 double generationEfficiency;
83 PressureTurbineOperation operationType;
84 double operationValue1;
85 double operationValue2;
86 bool useTurbine;
87};
88
93 public:
94 TurbineInput(const CondensingTurbine& condensingTurbine, const PressureTurbine& highToLowTurbine,
95 const PressureTurbine& highToMediumTurbine, const PressureTurbine& mediumToLowTurbine);
96
97 friend std::ostream& operator<<(std::ostream& stream, const TurbineInput& turbineInput);
98
99 CondensingTurbine getCondensingTurbine() const;
100
101 PressureTurbine getHighToLowTurbine() const;
102
103 PressureTurbine getHighToMediumTurbine() const;
104
105 PressureTurbine getMediumToLowTurbine() const;
106
107 private:
108 CondensingTurbine condensingTurbine;
109 PressureTurbine highToLowTurbine;
110 PressureTurbine highToMediumTurbine;
111 PressureTurbine mediumToLowTurbine;
112};
113