OGS
CreateKozenyCarmanModel.cpp
Go to the documentation of this file.
1
11
12#include "BaseLib/ConfigTree.h"
13#include "KozenyCarmanModel.h"
14#include "ParameterLib/Utils.h"
15
16namespace MaterialPropertyLib
17{
18std::unique_ptr<Property> createKozenyCarmanModel(
19 BaseLib::ConfigTree const& config,
20 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters)
21{
23 config.checkConfigParameter("type", "KozenyCarman");
24 DBUG("Create Kozeny-Carman model.");
25
26 auto const& k0 = ParameterLib::findParameter<double>(
28 config.getConfigParameter<std::string>("initial_permeability"),
29 parameters, 0, nullptr);
30
31 auto const& phi0 = ParameterLib::findParameter<double>(
33 config.getConfigParameter<std::string>("initial_porosity"), parameters,
34 1, nullptr);
35
36 return std::make_unique<KozenyCarmanModel>(k0, phi0);
37}
38} // namespace MaterialPropertyLib
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:30
T getConfigParameter(std::string const &param) const
void checkConfigParameter(std::string const &param, std::string_view const value) const
std::unique_ptr< Property > createKozenyCarmanModel(BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters)