OGS
CreateVermaPruessModel.cpp
Go to the documentation of this file.
1
11
12#include "BaseLib/ConfigTree.h"
13#include "ParameterLib/Utils.h"
14#include "VermaPruessModel.h"
15
16namespace MaterialPropertyLib
17{
18std::unique_ptr<Property> createVermaPruessModel(
19 BaseLib::ConfigTree const& config,
20 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters)
21{
23 config.checkConfigParameter("type", "VermaPruess");
24 DBUG("Create Verma-Pruess model.");
25
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 auto const& phi_c = ParameterLib::findParameter<double>(
38 config.getConfigParameter<std::string>("critical_porosity"), parameters,
39 1, nullptr);
40
43 config.getConfigParameter<std::string>("exponent"), parameters, 1,
44 nullptr);
45
46 return std::make_unique<VermaPruessModel>(k0, phi0, phi_c, n);
47}
48} // 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 > createVermaPruessModel(BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters)
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