OGS
FlowAndTemperatureControl.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <variant>
14#include "BuildingPowerCurves.h"
16
17namespace ProcessLib
18{
19namespace HeatTransportBHE
20{
21namespace BHE
22{
24{
25 double const flow_rate;
26 double const temperature;
27};
28
30{
31 FlowAndTemperature operator()(double const /*T_out*/,
32 double const time) const
33 {
34 return {flow_rate, temperature_curve.getValue(time)};
35 }
36 double flow_rate;
38 static constexpr bool is_power_bc = false;
39};
40
42{
43 FlowAndTemperature operator()(double const /*T_out*/,
44 double const time) const
45 {
46 return {flow_rate_curve.getValue(time),
48 }
51 static constexpr bool is_power_bc = false;
52};
53
55{
56 FlowAndTemperature operator()(double const T_out,
57 double const /*time*/) const
58 {
59 return {flow_rate, power / flow_rate / heat_capacity / density + T_out};
60 }
61 double flow_rate;
62 double power; // Value is expected to be in Watt.
64 double density;
65 static constexpr bool is_power_bc = true;
66};
67
69{
70 FlowAndTemperature operator()(double const T_out, double const time) const
71 {
72 double const flow_rate = flow_curve.getValue(time);
73 return {flow_rate, power / flow_rate / heat_capacity / density + T_out};
74 }
76
77 double power; // Value is expected to be in Watt.
79 double density;
80 static constexpr bool is_power_bc = true;
81};
82
84{
85 FlowAndTemperature operator()(double const T_out, double const time) const
86 {
87 double const power = power_curve.getValue(time);
88 if (power == 0)
89 {
90 return {0.0, T_out};
91 }
92 return {flow_rate, power / flow_rate / heat_capacity / density + T_out};
93 }
95
96 double flow_rate;
98 double density;
99 static constexpr bool is_power_bc = true;
100};
101
103{
104 FlowAndTemperature operator()(double const T_out, double const time) const
105 {
106 double const power = power_curve.getValue(time);
107 double const flow_rate = flow_curve.getValue(time);
108 if (power == 0)
109 {
110 return {0.0, T_out};
111 }
112 return {flow_rate, power / flow_rate / heat_capacity / density + T_out};
113 }
116
118 double density;
119 static constexpr bool is_power_bc = true;
120};
121
123{
124 FlowAndTemperature operator()(double const T_out, double const time) const
125 {
126 double const power = building_power_curves.power_curve.getValue(time);
127 double const cop =
129
130 if (power == 0)
131 {
132 return {0.0, T_out};
133 }
134 return {flow_rate,
135 power * (cop - 1) / cop / flow_rate / heat_capacity / density +
136 T_out};
137 }
139
140 double flow_rate;
142 double density;
143 static constexpr bool is_power_bc = true;
144};
145
153} // namespace BHE
154} // namespace HeatTransportBHE
155} // namespace ProcessLib
Definition of the PiecewiseLinearInterpolation class.
double getValue(double pnt_to_interpolate) const
Calculates the interpolation value.
std::variant< TemperatureCurveConstantFlow, TemperatureCurveFlowCurve, FixedPowerConstantFlow, FixedPowerFlowCurve, PowerCurveConstantFlow, PowerCurveFlowCurve, BuildingPowerCurveConstantFlow > FlowAndTemperatureControl
FlowAndTemperature operator()(double const T_out, double const time) const
MathLib::PiecewiseLinearInterpolation const & cop_heating_curve
MathLib::PiecewiseLinearInterpolation const & power_curve
FlowAndTemperature operator()(double const T_out, double const) const
MathLib::PiecewiseLinearInterpolation const & flow_curve
FlowAndTemperature operator()(double const T_out, double const time) const
FlowAndTemperature operator()(double const T_out, double const time) const
MathLib::PiecewiseLinearInterpolation const & power_curve
MathLib::PiecewiseLinearInterpolation const & power_curve
FlowAndTemperature operator()(double const T_out, double const time) const
MathLib::PiecewiseLinearInterpolation const & flow_curve
FlowAndTemperature operator()(double const, double const time) const
MathLib::PiecewiseLinearInterpolation const & flow_rate_curve
MathLib::PiecewiseLinearInterpolation const & temperature_curve
FlowAndTemperature operator()(double const, double const time) const