OGS
CreateBHECoaxial.cpp
Go to the documentation of this file.
1
11#include "CreateBHECoaxial.h"
12
13#include "BHE_CXA.h"
14#include "BHE_CXC.h"
15#include "BaseLib/ConfigTree.h"
17namespace ProcessLib
18{
19namespace HeatTransportBHE
20{
21namespace BHE
22{
23static std::tuple<BoreholeGeometry,
24 RefrigerantProperties,
25 GroutParameters,
27 PipeConfigurationCoaxial,
28 bool>
30 BaseLib::ConfigTree const& config,
31 std::map<std::string,
32 std::unique_ptr<MathLib::PiecewiseLinearInterpolation>> const&
33 curves)
34{
35 // if the BHE is using python boundary condition
36 auto const bhe_if_use_python_bc_conf =
38 config.getConfigParameter<bool>("use_bhe_pipe_network", false);
39 DBUG("If using python boundary condition : {:s}",
40 (bhe_if_use_python_bc_conf) ? "true" : "false");
41
42 auto const borehole_geometry =
44 createBoreholeGeometry(config.getConfigSubtree("borehole"));
45
47 auto const& pipes_config = config.getConfigSubtree("pipes");
49 Pipe const outer_pipe = createPipe(pipes_config.getConfigSubtree("outer"));
50 Pipe const inner_pipe =
52 createPipe(pipes_config.getConfigSubtree("inner"));
53 const auto pipe_longitudinal_dispersion_length =
55 pipes_config.getConfigParameter<double>(
56 "longitudinal_dispersion_length");
57 PipeConfigurationCoaxial const pipes{inner_pipe, outer_pipe,
58 pipe_longitudinal_dispersion_length};
59
61 auto const grout = createGroutParameters(config.getConfigSubtree("grout"));
62
63 auto const refrigerant =
65 createRefrigerantProperties(config.getConfigSubtree("refrigerant"));
66
67 auto const flowAndTemperatureControl = createFlowAndTemperatureControl(
69 config.getConfigSubtree("flow_and_temperature_control"),
70 curves,
71 refrigerant);
72
73 return {borehole_geometry, refrigerant, grout,
74 flowAndTemperatureControl, pipes, bhe_if_use_python_bc_conf};
75}
76
77template <typename T_BHE>
79 BaseLib::ConfigTree const& config,
80 std::map<std::string,
81 std::unique_ptr<MathLib::PiecewiseLinearInterpolation>> const&
82 curves)
83{
84 auto coaxial = parseBHECoaxialConfig(config, curves);
85 return {std::get<0>(coaxial), std::get<1>(coaxial), std::get<2>(coaxial),
86 std::get<3>(coaxial), std::get<4>(coaxial), std::get<5>(coaxial)};
87}
88
90 BaseLib::ConfigTree const& config,
91 std::map<std::string,
92 std::unique_ptr<MathLib::PiecewiseLinearInterpolation>> const&
93 curves);
94
96 BaseLib::ConfigTree const& config,
97 std::map<std::string,
98 std::unique_ptr<MathLib::PiecewiseLinearInterpolation>> const&
99 curves);
100} // namespace BHE
101} // namespace HeatTransportBHE
102} // namespace ProcessLib
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:30
T getConfigParameter(std::string const &param) const
ConfigTree getConfigSubtree(std::string const &root) const
RefrigerantProperties createRefrigerantProperties(BaseLib::ConfigTree const &config)
std::variant< TemperatureCurveConstantFlow, TemperatureCurveFlowCurve, FixedPowerConstantFlow, FixedPowerFlowCurve, PowerCurveConstantFlow, PowerCurveFlowCurve, BuildingPowerCurveConstantFlow > FlowAndTemperatureControl
Pipe createPipe(BaseLib::ConfigTree const &config)
Definition Pipe.cpp:21
static std::tuple< BoreholeGeometry, RefrigerantProperties, GroutParameters, FlowAndTemperatureControl, PipeConfigurationCoaxial, bool > parseBHECoaxialConfig(BaseLib::ConfigTree const &config, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation > > const &curves)
template BHE_CXC createBHECoaxial< BHE_CXC >(BaseLib::ConfigTree const &config, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation > > const &curves)
FlowAndTemperatureControl createFlowAndTemperatureControl(BaseLib::ConfigTree const &config, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation > > const &curves, RefrigerantProperties const &refrigerant)
GroutParameters createGroutParameters(BaseLib::ConfigTree const &config)
template BHE_CXA createBHECoaxial< BHE_CXA >(BaseLib::ConfigTree const &config, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation > > const &curves)
BoreholeGeometry createBoreholeGeometry(BaseLib::ConfigTree const &config)
T_BHE createBHECoaxial(BaseLib::ConfigTree const &config, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation > > const &curves)