OGS
WellboreGeometry.cpp
Go to the documentation of this file.
1
11#include "WellboreGeometry.h"
12
13#include <string>
14
15#include "BaseLib/ConfigTree.h"
16#include "ParameterLib/Utils.h"
17
18namespace ProcessLib
19{
20namespace WellboreSimulator
21{
23 BaseLib::ConfigTree const& config,
24 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters)
25{
26 double const length =
28 config.getConfigParameter<double>("length");
29
30 auto const& diameter = ParameterLib::findParameter<double>(
32 config.getConfigParameter<std::string>("diameter"),
33 parameters,
34 1,
35 nullptr);
36
37 auto const& casing_thickness = ParameterLib::findParameter<double>(
39 config.getConfigParameter<std::string>("casing_thickness"),
40 parameters,
41 1,
42 nullptr);
43
44 auto const& pipe_thickness = ParameterLib::findParameter<double>(
46 config.getConfigParameter<std::string>("pipe_thickness"),
47 parameters,
48 1,
49 nullptr);
50
51 auto const& roughness = ParameterLib::findParameter<double>(
53 config.getConfigParameter<std::string>("roughness"),
54 parameters,
55 1,
56 nullptr);
57
58 return {length, diameter, casing_thickness, pipe_thickness, roughness};
59}
60} // namespace WellboreSimulator
61} // namespace ProcessLib
T getConfigParameter(std::string const &param) const
OGS_NO_DANGLING Parameter< ParameterDataType > & findParameter(std::string const &parameter_name, std::vector< std::unique_ptr< ParameterBase > > const &parameters, int const num_components, MeshLib::Mesh const *const mesh=nullptr)
Definition Utils.h:102
WellboreGeometry createWellboreGeometry(BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters)