diff --git a/Documentation/ProjectFile/material/fracture_properties/i_fracture_properties.md b/Documentation/ProjectFile/material/fracture_properties/i_fracture_properties.md new file mode 100644 index 0000000000000000000000000000000000000000..325bb3c6eed811c57e0d492aeaac38a670867400 --- /dev/null +++ b/Documentation/ProjectFile/material/fracture_properties/i_fracture_properties.md @@ -0,0 +1 @@ +Collection of fracture properties for a specific fracture given by material id. diff --git a/Documentation/ProjectFile/material/fracture_properties/permeability_model/CubicLaw/c_CubicLaw.md b/Documentation/ProjectFile/material/fracture_properties/permeability_model/CubicLaw/c_CubicLaw.md new file mode 100644 index 0000000000000000000000000000000000000000..5ccd476a6cc5758fd8096e10098a6e00bf849250 --- /dev/null +++ b/Documentation/ProjectFile/material/fracture_properties/permeability_model/CubicLaw/c_CubicLaw.md @@ -0,0 +1,3 @@ +The permeability is calculated using the mechanical aperture \f$b_m\f$: +\f[ K(b_m) = b_m^3/12,\f] +which is called the cubic law. diff --git a/Documentation/ProjectFile/material/fracture_properties/permeability_model/i_permeability_model.md b/Documentation/ProjectFile/material/fracture_properties/permeability_model/i_permeability_model.md new file mode 100644 index 0000000000000000000000000000000000000000..4af95ba5a53c2c692de959ab4be8a98b33a3b407 --- /dev/null +++ b/Documentation/ProjectFile/material/fracture_properties/permeability_model/i_permeability_model.md @@ -0,0 +1,3 @@ +A hydraulic permeability model for the fracture. It describes the permeability +calculation based on the current mechanical aperture, the initial aperture, and +permeability model specific parameters. diff --git a/Documentation/ProjectFile/material/fracture_properties/permeability_model/t_type.md b/Documentation/ProjectFile/material/fracture_properties/permeability_model/t_type.md new file mode 100644 index 0000000000000000000000000000000000000000..df7e1e25a5bc8d57ec24150346a07e9b64387f91 --- /dev/null +++ b/Documentation/ProjectFile/material/fracture_properties/permeability_model/t_type.md @@ -0,0 +1 @@ +The permeability model type. diff --git a/Documentation/ProjectFile/prj/processes/process/HYDRO_MECHANICS_WITH_LIE/fracture_properties/permeability_model b/Documentation/ProjectFile/prj/processes/process/HYDRO_MECHANICS_WITH_LIE/fracture_properties/permeability_model new file mode 120000 index 0000000000000000000000000000000000000000..8da5ca94f495114f645c42d754d396cdee324961 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HYDRO_MECHANICS_WITH_LIE/fracture_properties/permeability_model @@ -0,0 +1 @@ +../../../../../material/fracture_properties/permeability_model \ No newline at end of file diff --git a/MaterialLib/CMakeLists.txt b/MaterialLib/CMakeLists.txt index 7b7893c63c40e627a8512e383850cb0429d9977a..92a8bd4cfa244568506e7ff36586f4a658a1326a 100644 --- a/MaterialLib/CMakeLists.txt +++ b/MaterialLib/CMakeLists.txt @@ -3,6 +3,7 @@ get_source_files(SOURCES) append_source_files(SOURCES Adsorption) append_source_files(SOURCES SolidModels) append_source_files(SOURCES FractureModels) +append_source_files(SOURCES FractureModels/Permeability) append_source_files(SOURCES Fluid) append_source_files(SOURCES Fluid/Density) diff --git a/MaterialLib/FractureModels/Permeability/CreateCubicLaw.cpp b/MaterialLib/FractureModels/Permeability/CreateCubicLaw.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4785fb50285e4ba13580b9f8d995da04dfcf4ed8 --- /dev/null +++ b/MaterialLib/FractureModels/Permeability/CreateCubicLaw.cpp @@ -0,0 +1,27 @@ +/** + * \file + * \copyright + * Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#include "CreateCubicLaw.h" + +#include "BaseLib/ConfigTree.h" + +#include "CubicLaw.h" + +namespace MaterialLib::Fracture::Permeability +{ +std::unique_ptr<Permeability> createCubicLaw(BaseLib::ConfigTree const& config) +{ + //! \ogs_file_param{material__fracture_properties__permeability_model__type} + config.checkConfigParameter("type", "CubicLaw"); + + //! \ogs_file_param_special{material__fracture_properties__permeability_model__CubicLaw} + return std::make_unique<CubicLaw>(); +} +} // namespace MaterialLib::Fracture::Permeability diff --git a/MaterialLib/FractureModels/Permeability/CreateCubicLaw.h b/MaterialLib/FractureModels/Permeability/CreateCubicLaw.h new file mode 100644 index 0000000000000000000000000000000000000000..df0686f4a6e26b0170153393af13485b1a3f6b10 --- /dev/null +++ b/MaterialLib/FractureModels/Permeability/CreateCubicLaw.h @@ -0,0 +1,28 @@ +/** + * \file + * \copyright + * Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +#include <memory> + +namespace BaseLib +{ +class ConfigTree; +} +namespace MaterialLib::Fracture::Permeability +{ +class CubicLaw; +class Permeability; +} // namespace MaterialLib::Fracture::Permeability + +namespace MaterialLib::Fracture::Permeability +{ +std::unique_ptr<Permeability> createCubicLaw(BaseLib::ConfigTree const& config); +} // namespace MaterialLib::Fracture::Permeability diff --git a/MaterialLib/FractureModels/Permeability/CreatePermeabilityModel.cpp b/MaterialLib/FractureModels/Permeability/CreatePermeabilityModel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..aa2454cdf2b35d157d0ac8884f151dffeaeafbba --- /dev/null +++ b/MaterialLib/FractureModels/Permeability/CreatePermeabilityModel.cpp @@ -0,0 +1,33 @@ +/** + * \file + * \copyright + * Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#include "CreatePermeabilityModel.h" + +#include "BaseLib/ConfigTree.h" +#include "BaseLib/Error.h" + +#include "CreateCubicLaw.h" + +namespace MaterialLib::Fracture::Permeability +{ +std::unique_ptr<Permeability> createPermeabilityModel( + BaseLib::ConfigTree const& config) +{ + auto const permeability_model_type = + //! \ogs_file_param{material__fracture_properties__permeability_model__type} + config.peekConfigParameter<std::string>("type"); + if (permeability_model_type == "CubicLaw") + { + return MaterialLib::Fracture::Permeability::createCubicLaw(config); + } + OGS_FATAL("Unknown fracture permeability model type \"%s\".", + permeability_model_type.c_str()); +} +} // namespace MaterialLib::Fracture::Permeability diff --git a/MaterialLib/FractureModels/Permeability/CreatePermeabilityModel.h b/MaterialLib/FractureModels/Permeability/CreatePermeabilityModel.h new file mode 100644 index 0000000000000000000000000000000000000000..c6a6b0b552dbd7845c606219100dd31953662346 --- /dev/null +++ b/MaterialLib/FractureModels/Permeability/CreatePermeabilityModel.h @@ -0,0 +1,24 @@ +/** + * \file + * \copyright + * Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#include <memory> + +#include "Permeability.h" + +namespace BaseLib +{ +class ConfigTree; +} + +namespace MaterialLib::Fracture::Permeability +{ +std::unique_ptr<Permeability> createPermeabilityModel( + BaseLib::ConfigTree const& config); +} // namespace MaterialLib::Fracture::Permeability diff --git a/MaterialLib/FractureModels/Permeability/CubicLaw.cpp b/MaterialLib/FractureModels/Permeability/CubicLaw.cpp new file mode 100644 index 0000000000000000000000000000000000000000..997da4803e23f9116b0f4af2d91c41d2288fd9c6 --- /dev/null +++ b/MaterialLib/FractureModels/Permeability/CubicLaw.cpp @@ -0,0 +1,29 @@ +/** + * \file + * \copyright + * Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#include "CubicLaw.h" + +namespace MaterialLib::Fracture::Permeability +{ +double CubicLaw::permeability(PermeabilityState const* const /*state*/, + double const /*aperture0*/, + double const aperture_m) const +{ + return aperture_m * aperture_m / 12; +} + +double CubicLaw::dpermeability_daperture( + PermeabilityState const* const /*state*/, + double const /*aperture0*/, + double const aperture_m) const +{ + return aperture_m / 6; +} +} // namespace MaterialLib::Fracture::Permeability diff --git a/MaterialLib/FractureModels/Permeability/CubicLaw.h b/MaterialLib/FractureModels/Permeability/CubicLaw.h new file mode 100644 index 0000000000000000000000000000000000000000..1b6d306a7d0fd523c41b75c91d19c70fd1333c04 --- /dev/null +++ b/MaterialLib/FractureModels/Permeability/CubicLaw.h @@ -0,0 +1,29 @@ +/** + * \file + * \copyright + * Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +#include "Permeability.h" + +namespace MaterialLib::Fracture::Permeability +{ +/// Hydraulic aperture equals the mechanical aperture s.t. multiplication of the +/// permeability by the mechanical aperture yields the cubic law. +class CubicLaw final : public Permeability +{ + double permeability(PermeabilityState const* const /*state*/, + double const /*aperture0*/, + double const aperture_m) const override; + + double dpermeability_daperture(PermeabilityState const* const /*state*/, + double const /*aperture0*/, + double const aperture_m) const override; +}; +} // namespace MaterialLib::Fracture::Permeability diff --git a/MaterialLib/FractureModels/Permeability/Permeability.h b/MaterialLib/FractureModels/Permeability/Permeability.h new file mode 100644 index 0000000000000000000000000000000000000000..ff75a3562e5a029abf7802765be269179e5c41f9 --- /dev/null +++ b/MaterialLib/FractureModels/Permeability/Permeability.h @@ -0,0 +1,43 @@ +/** + * \file + * \copyright + * Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +#include <memory> + +namespace MaterialLib::Fracture::Permeability +{ +struct PermeabilityState +{ + virtual ~PermeabilityState() = default; +}; + +/** + * Interface for fracture permeability models. + */ +class Permeability +{ +public: + virtual double permeability(PermeabilityState const* const state, + double const aperture0, + double const aperture_m) const = 0; + + virtual double dpermeability_daperture(PermeabilityState const* const state, + double const aperture0, + double const aperture_m) const = 0; + + virtual ~Permeability() = default; + + virtual std::unique_ptr<PermeabilityState> getNewState() const + { + return nullptr; + } +}; +} // namespace MaterialLib::Fracture::Permeability diff --git a/MaterialLib/PorousMedium/Permeability/Permeability.h b/MaterialLib/PorousMedium/Permeability/Permeability.h index fa00cd304c1fdb51106226d08c26d3191573ffe1..21883a95cfd7fba47cdb6defe8cdeaaf7e02de0f 100644 --- a/MaterialLib/PorousMedium/Permeability/Permeability.h +++ b/MaterialLib/PorousMedium/Permeability/Permeability.h @@ -1,12 +1,10 @@ /** + * \file * \copyright * Copyright (c) 2012-2019, 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: Permeability.h - * */ #pragma once diff --git a/ProcessLib/LIE/Common/FractureProperty.h b/ProcessLib/LIE/Common/FractureProperty.h index 513363fe7d22f9e05311527e2305af8426bff986..40b50bf0917992d207f8e8931b143181d16ea127 100644 --- a/ProcessLib/LIE/Common/FractureProperty.h +++ b/ProcessLib/LIE/Common/FractureProperty.h @@ -10,9 +10,10 @@ #pragma once #include <memory> - #include <Eigen/Eigen> +#include "MaterialLib/FractureModels/Permeability/Permeability.h" + #include "BranchProperty.h" #include "JunctionProperty.h" #include "Utils.h" @@ -68,6 +69,9 @@ struct FracturePropertyHM : public FractureProperty } ParameterLib::Parameter<double> const& specific_storage; ParameterLib::Parameter<double> const& biot_coefficient; + + std::unique_ptr<MaterialLib::Fracture::Permeability::Permeability> + permeability_model; }; /// configure fracture property based on a fracture element assuming diff --git a/ProcessLib/LIE/HydroMechanics/CreateHydroMechanicsProcess.cpp b/ProcessLib/LIE/HydroMechanics/CreateHydroMechanicsProcess.cpp index 2e4bfaa6116c24308175cdc848b102b13adb16db..fe9b23331430a1495924b4479a8fdfba64cc780d 100644 --- a/ProcessLib/LIE/HydroMechanics/CreateHydroMechanicsProcess.cpp +++ b/ProcessLib/LIE/HydroMechanics/CreateHydroMechanicsProcess.cpp @@ -14,6 +14,7 @@ #include "MaterialLib/FractureModels/CreateCohesiveZoneModeI.h" #include "MaterialLib/FractureModels/CreateLinearElasticIsotropic.h" #include "MaterialLib/FractureModels/CreateMohrCoulomb.h" +#include "MaterialLib/FractureModels/Permeability/CreatePermeabilityModel.h" #include "MaterialLib/SolidModels/CreateConstitutiveRelation.h" #include "ParameterLib/Utils.h" #include "ProcessLib/Output/CreateSecondaryVariables.h" @@ -282,6 +283,13 @@ std::unique_ptr<Process> createHydroMechanicsProcess( "time-dependent.", frac_prop->aperture0.name.c_str()); } + + auto permeability_model_config = + //! \ogs_file_param{prj__processes__process__HYDRO_MECHANICS_WITH_LIE__fracture_properties__permeability_model} + fracture_properties_config.getConfigSubtree("permeability_model"); + frac_prop->permeability_model = + MaterialLib::Fracture::Permeability::createPermeabilityModel( + permeability_model_config); } // initial effective stress in matrix diff --git a/ProcessLib/LIE/HydroMechanics/LocalAssembler/HydroMechanicsLocalAssemblerFracture-impl.h b/ProcessLib/LIE/HydroMechanics/LocalAssembler/HydroMechanicsLocalAssemblerFracture-impl.h index eb4c91fd931a157517c57f8414a055833c7be2a7..df0b6eab7cf6df91050209fc7c734a45ee9789a1 100644 --- a/ProcessLib/LIE/HydroMechanics/LocalAssembler/HydroMechanicsLocalAssemblerFracture-impl.h +++ b/ProcessLib/LIE/HydroMechanics/LocalAssembler/HydroMechanicsLocalAssemblerFracture-impl.h @@ -115,6 +115,9 @@ HydroMechanicsLocalAssemblerFracture<ShapeFunctionDisplacement, ip_data.aperture0 = aperture0_node_values.dot(sm_u.N); ip_data.aperture = ip_data.aperture0; + ip_data.permeability_state = + frac_prop.permeability_model->getNewState(); + auto const initial_effective_stress = _process_data.initial_fracture_effective_stress(0, x_position); for (int i = 0; i < GlobalDim; i++) @@ -252,16 +255,17 @@ void HydroMechanicsLocalAssemblerFracture<ShapeFunctionDisplacement, t, x_position, ip_data.aperture0, stress0, w_prev, w, effective_stress_prev, effective_stress, C, state); - // permeability - double const local_k = b_m * b_m / 12; auto& permeability = ip_data.permeability; - ip_data.permeability = local_k; + permeability = frac_prop.permeability_model->permeability( + ip_data.permeability_state.get(), ip_data.aperture0, b_m); GlobalDimMatrix const k = createRotatedTensor<GlobalDim>(R, permeability); // derivative of permeability respect to aperture - double const local_dk_db = b_m / 6.; + double const local_dk_db = + frac_prop.permeability_model->dpermeability_daperture( + ip_data.permeability_state.get(), ip_data.aperture0, b_m); GlobalDimMatrix const dk_db = createRotatedTensor<GlobalDim>(R, local_dk_db); diff --git a/ProcessLib/LIE/HydroMechanics/LocalAssembler/IntegrationPointDataFracture.h b/ProcessLib/LIE/HydroMechanics/LocalAssembler/IntegrationPointDataFracture.h index 85b40994d9f189bb692bd4289b103da0977f3e2a..c3081d1381c9c64d796f81b3f4f7f6fac93397fc 100644 --- a/ProcessLib/LIE/HydroMechanics/LocalAssembler/IntegrationPointDataFracture.h +++ b/ProcessLib/LIE/HydroMechanics/LocalAssembler/IntegrationPointDataFracture.h @@ -47,6 +47,10 @@ struct IntegrationPointDataFracture final GlobalDim>::MaterialStateVariables> material_state_variables; + std::unique_ptr< + typename MaterialLib::Fracture::Permeability::PermeabilityState> + permeability_state; + Eigen::MatrixXd C; double integration_weight; diff --git a/Tests/Data/LIE/HydroMechanics/TaskB.prj b/Tests/Data/LIE/HydroMechanics/TaskB.prj index b606024f8d5c91eb948bec9f080e0ce8ad256575..605aebe352273c3a8058e058f4f4abac581720a2 100644 --- a/Tests/Data/LIE/HydroMechanics/TaskB.prj +++ b/Tests/Data/LIE/HydroMechanics/TaskB.prj @@ -41,6 +41,9 @@ <initial_aperture>aperture0</initial_aperture> <specific_storage>S_f</specific_storage> <biot_coefficient>biot_f</biot_coefficient> + <permeability_model> + <type>CubicLaw</type> + </permeability_model> </fracture_properties> <secondary_variables> </secondary_variables> diff --git a/Tests/Data/LIE/HydroMechanics/single_fracture.prj b/Tests/Data/LIE/HydroMechanics/single_fracture.prj index e04946a89806368eab8bc93c6eff7710849cc640..f55ef12bacdef913119338c080f04aa6a5c5ed8d 100644 --- a/Tests/Data/LIE/HydroMechanics/single_fracture.prj +++ b/Tests/Data/LIE/HydroMechanics/single_fracture.prj @@ -39,6 +39,9 @@ <initial_aperture>aperture0</initial_aperture> <specific_storage>S_f</specific_storage> <biot_coefficient>biot_f</biot_coefficient> + <permeability_model> + <type>CubicLaw</type> + </permeability_model> </fracture_properties> <initial_fracture_effective_stress>fracture_effective_stress0</initial_fracture_effective_stress> <secondary_variables> diff --git a/Tests/Data/LIE/HydroMechanics/single_fracture_3D.prj b/Tests/Data/LIE/HydroMechanics/single_fracture_3D.prj index af8d3250cceb9375602beb3e65d23a3099e7e1b2..e67552df0901bf521176a4e0d680b0d1c3fb6511 100644 --- a/Tests/Data/LIE/HydroMechanics/single_fracture_3D.prj +++ b/Tests/Data/LIE/HydroMechanics/single_fracture_3D.prj @@ -39,6 +39,9 @@ <initial_aperture>aperture0</initial_aperture> <specific_storage>S_f</specific_storage> <biot_coefficient>biot_f</biot_coefficient> + <permeability_model> + <type>CubicLaw</type> + </permeability_model> </fracture_properties> <initial_fracture_effective_stress>fracture_effective_stress0</initial_fracture_effective_stress> <secondary_variables> diff --git a/Tests/Data/LIE/HydroMechanics/single_fracture_3compartments_flow.prj b/Tests/Data/LIE/HydroMechanics/single_fracture_3compartments_flow.prj index 156ebefa8a679bfcd6cdba55934cbfe491b8b9a5..282881a3a826e9faaf00efdd3e8398220646d11d 100644 --- a/Tests/Data/LIE/HydroMechanics/single_fracture_3compartments_flow.prj +++ b/Tests/Data/LIE/HydroMechanics/single_fracture_3compartments_flow.prj @@ -39,6 +39,9 @@ <initial_aperture>aperture0</initial_aperture> <specific_storage>S_f</specific_storage> <biot_coefficient>biot_f</biot_coefficient> + <permeability_model> + <type>CubicLaw</type> + </permeability_model> </fracture_properties> <initial_fracture_effective_stress>fracture_effective_stress0</initial_fracture_effective_stress> <deactivate_matrix_in_flow>true</deactivate_matrix_in_flow> diff --git a/Tests/Data/LIE/HydroMechanics/single_fracture_3compartments_flow_linear_aperture0.prj b/Tests/Data/LIE/HydroMechanics/single_fracture_3compartments_flow_linear_aperture0.prj index dcdb906810e0044bc5f8810c4441b05ff786f839..a8ed92811fc89cf5ec2f7a142c6b159d71e9b77e 100644 --- a/Tests/Data/LIE/HydroMechanics/single_fracture_3compartments_flow_linear_aperture0.prj +++ b/Tests/Data/LIE/HydroMechanics/single_fracture_3compartments_flow_linear_aperture0.prj @@ -39,6 +39,9 @@ <initial_aperture>aperture0</initial_aperture> <specific_storage>S_f</specific_storage> <biot_coefficient>biot_f</biot_coefficient> + <permeability_model> + <type>CubicLaw</type> + </permeability_model> </fracture_properties> <initial_fracture_effective_stress>fracture_effective_stress0</initial_fracture_effective_stress> <deactivate_matrix_in_flow>true</deactivate_matrix_in_flow> diff --git a/Tests/Data/LIE/HydroMechanics/single_fracture_3compartments_flow_linear_aperture0_e.prj b/Tests/Data/LIE/HydroMechanics/single_fracture_3compartments_flow_linear_aperture0_e.prj index 323be63eb6609699e4a223cb17530d24ff8fe293..486c9204c8a6fae9ba71b009847110ad5552811b 100644 --- a/Tests/Data/LIE/HydroMechanics/single_fracture_3compartments_flow_linear_aperture0_e.prj +++ b/Tests/Data/LIE/HydroMechanics/single_fracture_3compartments_flow_linear_aperture0_e.prj @@ -39,6 +39,9 @@ <initial_aperture>aperture0</initial_aperture> <specific_storage>S_f</specific_storage> <biot_coefficient>biot_f</biot_coefficient> + <permeability_model> + <type>CubicLaw</type> + </permeability_model> </fracture_properties> <initial_fracture_effective_stress>fracture_effective_stress0</initial_fracture_effective_stress> <deactivate_matrix_in_flow>true</deactivate_matrix_in_flow>