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
MediumToLowPressureTurbineCalculator.h
1#pragma once
2
3#include <steamModeler/api/HeaderInput.h>
4#include <steamModeler/api/TurbineInput.h>
5#include <steamModeler/service/medium_pressure_header/ReducedSteamException.h>
6#include <steamModeler/service/RestarterService.h>
7#include <steamModeler/service/SteamReducer.h>
8#include <steamModeler/SteamSystemModelerTool.h>
10
11#include "SteamBalanceCheckerService.h"
12#include "steamModeler/domain/TurbineFactory.h"
13#include "steamModeler/service/TurbineCalculator.h"
14
15// TODO extract this as separate class
17 public:
18 std::shared_ptr<Turbine> mediumToLowPressureTurbine;
19 std::shared_ptr<Turbine> mediumToLowPressureTurbineIdeal;
20 std::shared_ptr<Turbine> highToLowPressureTurbineUpdated;
21 std::shared_ptr<Turbine> highToLowPressureTurbineIdealUpdated;
22
23 friend std::ostream& operator<<(std::ostream& stream, const MediumToLowPressureTurbineCalculatorOutput& domain) {
24 stream << "MediumToLowPressureTurbineCalculatorOutput["
25 << "mediumToLowPressureTurbine=" << domain.mediumToLowPressureTurbine
26 << ", mediumToLowPressureTurbineIdeal=" << domain.mediumToLowPressureTurbineIdeal
27 << ", highToLowPressureTurbineUpdated=" << domain.highToLowPressureTurbineUpdated
28 << ", highToLowPressureTurbineIdealUpdated=" << domain.highToLowPressureTurbineIdealUpdated << "]";
29 return stream;
30 }
31};
32
34 public:
36 calc(const PressureTurbine& highToLowTurbineInput, const std::shared_ptr<Turbine>& highToLowPressureTurbine,
37 const std::shared_ptr<Turbine>& highToLowPressureTurbineIdeal, const PressureTurbine& mediumToLowTurbineInput,
38 const SteamSystemModelerTool::FluidProperties& highPressureHeaderOutput,
39 const std::shared_ptr<HeaderNotHighestPressure>& mediumPressureHeaderInput,
40 const SteamSystemModelerTool::FluidProperties& mediumPressureHeaderOutput,
41 const std::shared_ptr<HeaderNotHighestPressure>& lowPressureHeaderInput, const Boiler& boiler) const;
42
43 private:
44 const SteamBalanceCheckerService steamBalanceCheckerService = SteamBalanceCheckerService();
45 const TurbineFactory turbineFactory = TurbineFactory();
46
48 calc(const double availableMassFlow, const PressureTurbine& highToLowTurbineInput,
49 const std::shared_ptr<Turbine>& highToLowPressureTurbine,
50 const std::shared_ptr<Turbine>& highToLowPressureTurbineIdeal,
51 const SteamSystemModelerTool::FluidProperties& highPressureHeaderOutput,
52 const PressureTurbine& mediumToLowTurbineInput,
53 const SteamSystemModelerTool::FluidProperties& mediumPressureHeaderOutput,
54 const std::shared_ptr<HeaderNotHighestPressure>& lowPressureHeaderInput, const Boiler& boiler) const;
55
57 calcFlowRange(const double availableMassFlow, const PressureTurbine& mediumToLowTurbineInput,
58 const SteamSystemModelerTool::FluidProperties& mediumPressureHeaderOutput,
59 const std::shared_ptr<HeaderNotHighestPressure>& lowPressureHeaderInput, const Boiler& boiler,
60 const PressureTurbine& highToLowTurbineInput,
61 const std::shared_ptr<Turbine>& highToLowPressureTurbine,
62 const std::shared_ptr<Turbine>& highToLowPressureTurbineIdeal,
63 const SteamSystemModelerTool::FluidProperties& highPressureHeaderOutput) const;
64
66 calcPowerRange(const double availableMassFlow, const PressureTurbine& mediumToLowTurbineInput,
67 const SteamSystemModelerTool::FluidProperties& mediumPressureHeaderOutput,
68 const std::shared_ptr<HeaderNotHighestPressure>& lowPressureHeaderInput, const Boiler& boiler,
69 const PressureTurbine& highToLowTurbineInput,
70 const std::shared_ptr<Turbine>& highToLowPressureTurbine,
71 const std::shared_ptr<Turbine>& highToLowPressureTurbineIdeal,
72 const SteamSystemModelerTool::FluidProperties& highPressureHeaderOutput) const;
73
75 calcPowerGeneration(const double availableMassFlow, const PressureTurbine& mediumToLowTurbineInput,
76 const SteamSystemModelerTool::FluidProperties& mediumPressureHeaderOutput,
77 const std::shared_ptr<HeaderNotHighestPressure>& lowPressureHeaderInput, const Boiler& boiler,
78 const PressureTurbine& highToLowTurbineInput,
79 const std::shared_ptr<Turbine>& highToLowPressureTurbine,
80 const std::shared_ptr<Turbine>& highToLowPressureTurbineIdeal,
81 const SteamSystemModelerTool::FluidProperties& highPressureHeaderOutput) const;
82
84 calcSteamFlow(const double availableMassFlow, const PressureTurbine& mediumToLowTurbineInput,
85 const SteamSystemModelerTool::FluidProperties& mediumPressureHeaderOutput,
86 const std::shared_ptr<HeaderNotHighestPressure>& lowPressureHeaderInput, const Boiler& boiler,
87 const PressureTurbine& highToLowTurbineInput,
88 const std::shared_ptr<Turbine>& highToLowPressureTurbine,
89 const std::shared_ptr<Turbine>& highToLowPressureTurbineIdeal,
90 const SteamSystemModelerTool::FluidProperties& highPressureHeaderOutput) const;
91
93 calcBalanceHeader(const double availableMassFlow, const PressureTurbine& mediumToLowTurbineInput,
94 const SteamSystemModelerTool::FluidProperties& mediumPressureHeaderOutput,
95 const std::shared_ptr<HeaderNotHighestPressure>& lowPressureHeaderInput,
96 const std::shared_ptr<Turbine>& highToLowPressureTurbine,
97 const std::shared_ptr<Turbine>& highToLowPressureTurbineIdeal) const;
98
99 double calcAvailableMassFlow(const std::shared_ptr<HeaderNotHighestPressure>& mediumPressureHeaderInput,
100 const SteamSystemModelerTool::FluidProperties& mediumPressureHeaderOutput) const;
101};
102
Calculator for turbines for steam systems.