OGS
CreateKozenyCarmanModel.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
5
7#include "KozenyCarmanModel.h"
9
10namespace MaterialPropertyLib
11{
12std::unique_ptr<Property> createKozenyCarmanModel(
13 BaseLib::ConfigTree const& config,
14 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters)
15{
17 config.checkConfigParameter("type", "KozenyCarman");
18 DBUG("Create Kozeny-Carman model.");
19
22 config.getConfigParameter<std::string>("initial_permeability"),
23 parameters, 0, nullptr);
24
25 auto const& phi0 = ParameterLib::findParameter<double>(
27 config.getConfigParameter<std::string>("initial_porosity"), parameters,
28 1, nullptr);
29
30 return std::make_unique<KozenyCarmanModel>(k0, phi0);
31}
32} // namespace MaterialPropertyLib
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:22
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)
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)