diff --git a/Documentation/ProjectFile/properties/property/VermaPruessModel/c_VermaPruessModel.md b/Documentation/ProjectFile/properties/property/VermaPruessModel/c_VermaPruessModel.md new file mode 100644 index 0000000000000000000000000000000000000000..6b2271877d043d87bf6685cda319fb2c729a78fa --- /dev/null +++ b/Documentation/ProjectFile/properties/property/VermaPruessModel/c_VermaPruessModel.md @@ -0,0 +1 @@ +\copydoc MaterialPropertyLib::VermaPruessModel diff --git a/Documentation/ProjectFile/properties/property/VermaPruessModel/t_critical_porosity.md b/Documentation/ProjectFile/properties/property/VermaPruessModel/t_critical_porosity.md new file mode 100644 index 0000000000000000000000000000000000000000..3f788ce88f91cd7d1a2f22e7b2b313ad5de93efa --- /dev/null +++ b/Documentation/ProjectFile/properties/property/VermaPruessModel/t_critical_porosity.md @@ -0,0 +1 @@ +\copydoc MaterialPropertyLib::VermaPruessModel::_phi_c diff --git a/Documentation/ProjectFile/properties/property/VermaPruessModel/t_exponent.md b/Documentation/ProjectFile/properties/property/VermaPruessModel/t_exponent.md new file mode 100644 index 0000000000000000000000000000000000000000..7aba8bba4775c7ed0990108feb04bbe8586b3a5e --- /dev/null +++ b/Documentation/ProjectFile/properties/property/VermaPruessModel/t_exponent.md @@ -0,0 +1 @@ +\copydoc MaterialPropertyLib::VermaPruessModel::_n diff --git a/Documentation/ProjectFile/properties/property/VermaPruessModel/t_initial_permeability.md b/Documentation/ProjectFile/properties/property/VermaPruessModel/t_initial_permeability.md new file mode 100644 index 0000000000000000000000000000000000000000..bc5c0a25bfc0f0da6acfa2d17253b4bd431203c6 --- /dev/null +++ b/Documentation/ProjectFile/properties/property/VermaPruessModel/t_initial_permeability.md @@ -0,0 +1 @@ +\copydoc MaterialPropertyLib::VermaPruessModel::_k0 diff --git a/Documentation/ProjectFile/properties/property/VermaPruessModel/t_initial_porosity.md b/Documentation/ProjectFile/properties/property/VermaPruessModel/t_initial_porosity.md new file mode 100644 index 0000000000000000000000000000000000000000..165f9a38119cddef84646a8fcc29fe48675bba9b --- /dev/null +++ b/Documentation/ProjectFile/properties/property/VermaPruessModel/t_initial_porosity.md @@ -0,0 +1 @@ +\copydoc MaterialPropertyLib::VermaPruessModel::_phi0 diff --git a/Tests/MaterialLib/TestMPLPermeabilityVermaPruessModel.cpp b/Tests/MaterialLib/TestMPLPermeabilityVermaPruessModel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6ac49935001792c19db32ed08e8f2e417affde82 --- /dev/null +++ b/Tests/MaterialLib/TestMPLPermeabilityVermaPruessModel.cpp @@ -0,0 +1,62 @@ +/** + * \copyright + * Copyright (c) 2012-2022, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + * \file + * + * Created on November 2, 2016, 3:09 PM + */ + +#include <gtest/gtest.h> + +#include <vector> + +#include "MaterialLib/MPL/Properties/CreateVermaPruessModel.h" +#include "MaterialLib/MPL/Properties/VermaPruessModel.h" +#include "MaterialLib/MPL/Utils/FormEigenTensor.h" +#include "ParameterLib/ConstantParameter.h" +#include "TestMPL.h" +#include "Tests/TestTools.h" + +TEST(MaterialPropertyLib, PermeabilityVermaPruessModel) +{ + ParameterLib::ConstantParameter<double> const k0("permeability_ini", + 1.5e-14); + ParameterLib::ConstantParameter<double> const phi0("porosity_ini", 0.46); + ParameterLib::ConstantParameter<double> const phi_c("critical_porosity", + 0.3956); + ParameterLib::ConstantParameter<double> const n("exponent", 5); + + auto const k_model = MPL::VermaPruessModel(k0, phi0, phi_c, n); + + ParameterLib::SpatialPosition const pos; + double const t = std::numeric_limits<double>::quiet_NaN(); + double const dt = std::numeric_limits<double>::quiet_NaN(); + + std::vector<double> const porosity{0.44, 0.38}; + std::vector<double> const k_expected{2.3365591132239605e-15, 0.}; + + MPL::VariableArray vars; + + for (std::size_t i = 0; i < porosity.size(); ++i) + { + vars[static_cast<int>(MaterialPropertyLib::Variable::porosity)] = + porosity[i]; + + auto const k = MPL::formEigenTensor<1>(k_model.value(vars, pos, t, dt)); + + // Compare the calculated value with the expected value. + if (k_expected[i] == 0.) + { + ASSERT_EQ(k_expected[i], k(0, 0)); + } + else + { + ASSERT_LE(std::fabs(k_expected[i] - k(0, 0)) / k_expected[i], + 1e-10); + } + } +}