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
Header.h
1#ifndef TOOLS_SUITE_HEADER_H
2#define TOOLS_SUITE_HEADER_H
3
4#include <iostream>
5#include <string>
6#include <vector>
7
8#include "SteamProperties.h"
9
10class Inlet {
11 public:
22 Inlet(double pressure, SteamProperties::ThermodynamicQuantity quantityType, double quantityValue, double massFlow);
23
24 double getPressure() const { return pressure; }
25 double getQuantityValue() const { return quantityValue; }
26 double getMassFlow() const { return massFlow; }
27 SteamProperties::ThermodynamicQuantity getQuantityType() const { return quantityType; }
28 double getInletEnergyFlow() const { return inletEnergyFlow; }
29 SteamSystemModelerTool::SteamPropertiesOutput const& getInletProperties() const { return inletProperties; }
30
31 friend std::ostream& operator<<(std::ostream& stream, const Inlet& inlet);
32
33 void setPressure(double pressure);
34 void setQuantityValue(double quantityValue);
35 void setMassFlow(double massFlow);
36 void setQuantityType(SteamProperties::ThermodynamicQuantity quantityType);
37
38 private:
39 void calculate();
40
41 double pressure, quantityValue, massFlow;
43 double inletEnergyFlow;
45};
46
47class Header {
48 public:
55 Header(double headerPressure, std::vector<Inlet> inletVec);
56
57 friend std::ostream& operator<<(std::ostream& stream, const Header& header);
61 double getHeaderPressure() const { return headerPressure; }
62
66 double getSpecificEnthalpy() const { return specificEnthalpy; }
67
71 double getInletEnergyFlow() const { return inletEnergyFlow; }
72
76 double getInletMassFlow() const { return inletMassFlow; }
77
81 std::vector<Inlet> const& getInlets() const { return inlets; }
82
86 SteamSystemModelerTool::SteamPropertiesOutput const& getHeaderProperties() const { return headerProperties; }
87
91 void setHeaderPressure(double headerPressure);
92
96 void setInlets(std::vector<Inlet>& inlets);
97
98 private:
99 void calculate();
100 double headerPressure, specificEnthalpy, inletEnergyFlow, inletMassFlow;
101 std::vector<Inlet> inlets;
103};
104
105#endif // TOOLS_SUITE_HEADER_H
std::vector< Inlet > const & getInlets() const
Definition Header.h:81
SteamSystemModelerTool::SteamPropertiesOutput const & getHeaderProperties() const
Definition Header.h:86
double getInletEnergyFlow() const
Definition Header.h:71
void setHeaderPressure(double headerPressure)
Header(double headerPressure, std::vector< Inlet > inletVec)
double getInletMassFlow() const
Definition Header.h:76
double getHeaderPressure() const
Definition Header.h:61
void setInlets(std::vector< Inlet > &inlets)
double getSpecificEnthalpy() const
Definition Header.h:66
Definition Header.h:10
Inlet(double pressure, SteamProperties::ThermodynamicQuantity quantityType, double quantityValue, double massFlow)
ThermodynamicQuantity
enum class for ThermodynamicQuantity