OGS 6.2.0-244-g47b8a9a9d
Pipe.h
Go to the documentation of this file.
1 
12 #pragma once
13 
14 #include <boost/math/constants/constants.hpp>
15 
16 namespace BaseLib
17 {
18 class ConfigTree;
19 }
20 namespace ProcessLib
21 {
22 namespace HeatTransportBHE
23 {
24 namespace BHE
25 {
26 struct 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  constexpr double pi = boost::math::constants::pi<double>();
43 
44  double const outside_diameter = outsideDiameter();
45 
46  return std::log(outside_diameter / diameter) /
47  (2.0 * pi * wall_thermal_conductivity);
48  }
49 
50 private:
51  double circleArea(double const diameter) const
52  {
53  constexpr double pi = boost::math::constants::pi<double>();
54  return pi * diameter * diameter / 4;
55  }
56 };
57 
58 inline double coaxialPipesAnnulusDiameter(Pipe const& inner_pipe,
59  Pipe const& outer_pipe)
60 {
61  return outer_pipe.diameter - inner_pipe.diameter -
62  2 * inner_pipe.wall_thickness;
63 }
64 
65 Pipe createPipe(BaseLib::ConfigTree const& config);
66 } // namespace BHE
67 } // namespace HeatTransportBHE
68 } // namespace ProcessLib
double coaxialPipesAnnulusDiameter(Pipe const &inner_pipe, Pipe const &outer_pipe)
Definition: Pipe.h:58
double wallThermalResistance() const
Definition: Pipe.h:40
double const wall_thermal_conductivity
Definition: Pipe.h:30
double circleArea(double const diameter) const
Definition: Pipe.h:51
double outsideArea() const
Area of the pipe&#39;s outside including the wall thickness.
Definition: Pipe.h:36
Pipe createPipe(BaseLib::ConfigTree const &config)
Definition: Pipe.cpp:21
Build information.
double area() const
Area of the pipe&#39;s inside without the wall.
Definition: Pipe.h:33