OGS
WellboreGeometry.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 "
WellboreGeometry.h
"
5
6
#include <string>
7
8
#include "
BaseLib/ConfigTree.h
"
9
#include "
ParameterLib/Utils.h
"
10
11
namespace
ProcessLib
12
{
13
namespace
WellboreSimulator
14
{
15
WellboreGeometry
createWellboreGeometry
(
16
BaseLib::ConfigTree
const
& config,
17
std::vector<std::unique_ptr<ParameterLib::ParameterBase>>
const
& parameters)
18
{
19
double
const
length =
21
config.
getConfigParameter
<
double
>(
"length"
);
22
23
auto
const
& diameter =
ParameterLib::findParameter<double>
(
25
config.
getConfigParameter
<std::string>(
"diameter"
),
26
parameters,
27
1,
28
nullptr
);
29
30
auto
const
& casing_thickness =
ParameterLib::findParameter<double>
(
32
config.
getConfigParameter
<std::string>(
"casing_thickness"
),
33
parameters,
34
1,
35
nullptr
);
36
37
auto
const
& pipe_thickness =
ParameterLib::findParameter<double>
(
39
config.
getConfigParameter
<std::string>(
"pipe_thickness"
),
40
parameters,
41
1,
42
nullptr
);
43
44
auto
const
& roughness =
ParameterLib::findParameter<double>
(
46
config.
getConfigParameter
<std::string>(
"roughness"
),
47
parameters,
48
1,
49
nullptr
);
50
51
return
{length, diameter, casing_thickness, pipe_thickness, roughness};
52
}
53
}
// namespace WellboreSimulator
54
}
// namespace ProcessLib
ConfigTree.h
Utils.h
WellboreGeometry.h
BaseLib::ConfigTree
Definition
ConfigTree.h:101
BaseLib::ConfigTree::getConfigParameter
T getConfigParameter(std::string const ¶m) const
Definition
ConfigTree-impl.h:35
ParameterLib::findParameter
OGS_NO_DANGLING Parameter< ParameterDataType > & findParameter(std::string const ¶meter_name, std::vector< std::unique_ptr< ParameterBase > > const ¶meters, int const num_components, MeshLib::Mesh const *const mesh=nullptr)
Definition
ParameterLib/Utils.h:95
ProcessLib::WellboreSimulator
Definition
CreateWellboreSimulatorProcess.cpp:22
ProcessLib::WellboreSimulator::createWellboreGeometry
WellboreGeometry createWellboreGeometry(BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters)
Definition
WellboreGeometry.cpp:15
ProcessLib
Definition
ProjectData.h:40
ProcessLib::WellboreSimulator::WellboreGeometry
Definition
WellboreGeometry.h:25
ProcessLib
WellboreSimulator
WellboreGeometry.cpp
Generated by
1.14.0