OGS
Pipe.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <cmath>
14#include <numbers>
15
16namespace BaseLib
17{
18class ConfigTree;
19}
20namespace ProcessLib
21{
22namespace HeatTransportBHE
23{
24namespace BHE
25{
26struct Pipe
27{
28 double const diameter;
29 double const wall_thickness;
31
33 double area() const { return circleArea(diameter); }
34
36 double outsideArea() const { return circleArea(outsideDiameter()); }
37
38 double outsideDiameter() const { return diameter + 2 * wall_thickness; }
39
40 double wallThermalResistance() const
41 {
42 double const outside_diameter = outsideDiameter();
43
44 return std::log(outside_diameter / diameter) /
45 (2.0 * std::numbers::pi * wall_thermal_conductivity);
46 }
47
48private:
49 double circleArea(double const diameter) const
50 {
51 return std::numbers::pi * diameter * diameter / 4;
52 }
53};
54
55inline double coaxialPipesAnnulusDiameter(Pipe const& inner_pipe,
56 Pipe const& outer_pipe)
57{
58 return outer_pipe.diameter - inner_pipe.diameter -
59 2 * inner_pipe.wall_thickness;
60}
61
62Pipe createPipe(BaseLib::ConfigTree const& config);
63} // namespace BHE
64} // namespace HeatTransportBHE
65} // namespace ProcessLib
Pipe createPipe(BaseLib::ConfigTree const &config)
Definition Pipe.cpp:21
double coaxialPipesAnnulusDiameter(Pipe const &inner_pipe, Pipe const &outer_pipe)
Definition Pipe.h:55
double outsideArea() const
Area of the pipe's outside including the wall thickness.
Definition Pipe.h:36
double circleArea(double const diameter) const
Definition Pipe.h:49
double area() const
Area of the pipe's inside without the wall.
Definition Pipe.h:33