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
7#include "BaseLib/Error.h"
8
9namespace ProcessLib
10{
11namespace HeatTransportBHE
12{
13namespace BHE
14{
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
#define OGS_FATAL(...)
Definition Error.h:19
T getConfigParameter(std::string const &param) const
Pipe createPipe(BaseLib::ConfigTree const &config)
Definition Pipe.cpp:15