OGS 6.2.2-330-gf48c72f61.dirty.20200225212913
FlowAndTemperatureControl.h
Go to the documentation of this file.
1 
11 #pragma once
12 
13 #include <variant>
15 
16 namespace ProcessLib
17 {
18 namespace HeatTransportBHE
19 {
20 namespace BHE
21 {
23 {
24  double const flow_rate;
25  double const temperature;
26 };
27 
29 {
30  FlowAndTemperature operator()(double const /*T_out*/,
31  double const time) const
32  {
33  return {flow_rate, temperature_curve.getValue(time)};
34  }
35  double flow_rate;
37 };
38 
40 {
41  FlowAndTemperature operator()(double const T_out,
42  double const /*time*/) const
43  {
44  return {flow_rate, power / flow_rate / heat_capacity / density + T_out};
45  }
46  double flow_rate;
47  double power; // Value is expected to be in Watt.
48  double heat_capacity;
49  double density;
50 };
51 
53 {
54  FlowAndTemperature operator()(double const T_out, double const time) const
55  {
56  double const flow_rate = flow_curve.getValue(time);
57  return {flow_rate, power / flow_rate / heat_capacity / density + T_out};
58  }
60 
61  double power; // Value is expected to be in Watt.
62  double heat_capacity;
63  double density;
64 };
65 
67 {
68  FlowAndTemperature operator()(double const T_out, double const time) const
69  {
70  double const power = power_curve.getValue(time);
71  if (power == 0)
72  {
73  return {0.0, T_out};
74  }
75  return {flow_rate, power / flow_rate / heat_capacity / density + T_out};
76  }
78 
79  double flow_rate;
80  double heat_capacity;
81  double density;
82 };
83 
88 } // namespace BHE
89 } // namespace HeatTransportBHE
90 } // namespace ProcessLib
FlowAndTemperature operator()(double const T_out, double const time) const
Definition of the PiecewiseLinearInterpolation class.
FlowAndTemperature operator()(double const T_out, double const time) const
FlowAndTemperature operator()(double const T_out, double const) const
MathLib::PiecewiseLinearInterpolation const & temperature_curve
FlowAndTemperature operator()(double const, double const time) const
std::variant< TemperatureCurveConstantFlow, FixedPowerConstantFlow, FixedPowerFlowCurve, PowerCurveConstantFlow > FlowAndTemperatureControl
MathLib::PiecewiseLinearInterpolation const & power_curve
MathLib::PiecewiseLinearInterpolation const & flow_curve