OGS
Pipe.cpp
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2
// SPDX-License-Identifier: BSD-3-Clause
3
4
#include "
Pipe.h
"
5
6
#include "
BaseLib/ConfigTree.h
"
7
#include "
BaseLib/Error.h
"
8
9
namespace
ProcessLib
10
{
11
namespace
HeatTransportBHE
12
{
13
namespace
BHE
14
{
15
Pipe
createPipe
(
BaseLib::ConfigTree
const
& config)
16
{
17
const
auto
diameter =
19
config.
getConfigParameter
<
double
>(
"diameter"
);
20
const
auto
wall_thickness =
22
config.
getConfigParameter
<
double
>(
"wall_thickness"
);
23
const
auto
wall_thermal_conductivity =
25
config.
getConfigParameter
<
double
>(
"wall_thermal_conductivity"
);
26
27
if
(diameter <= 0)
28
{
29
OGS_FATAL
(
"Pipe diameter must be positive, got {:g}."
, diameter);
30
}
31
if
(wall_thickness < 0)
32
{
33
OGS_FATAL
(
"Pipe wall_thickness must be non-negative, got {:g}."
,
34
wall_thickness);
35
}
36
if
(wall_thermal_conductivity <= 0)
37
{
38
OGS_FATAL
(
"Pipe wall_thermal_conductivity must be positive, got {:g}."
,
39
wall_thermal_conductivity);
40
}
41
42
return
{diameter, wall_thickness, wall_thermal_conductivity};
43
}
44
}
// namespace BHE
45
}
// namespace HeatTransportBHE
46
}
// namespace ProcessLib
ConfigTree.h
Error.h
OGS_FATAL
#define OGS_FATAL(...)
Definition
Error.h:19
Pipe.h
BaseLib::ConfigTree
Definition
ConfigTree.h:101
BaseLib::ConfigTree::getConfigParameter
T getConfigParameter(std::string const ¶m) const
Definition
ConfigTree-impl.h:36
ProcessLib::HeatTransportBHE::BHE
Definition
BHE_1P.cpp:18
ProcessLib::HeatTransportBHE::BHE::createPipe
Pipe createPipe(BaseLib::ConfigTree const &config)
Definition
Pipe.cpp:15
ProcessLib::HeatTransportBHE
Definition
BHE_1P.cpp:16
ProcessLib
Definition
ProjectData.h:36
ProcessLib::HeatTransportBHE::BHE::Pipe
Definition
Pipe.h:21
ProcessLib
HeatTransportBHE
BHE
Pipe.cpp
Generated by
1.14.0