diff --git a/Applications/ApplicationsLib/ProjectData.cpp b/Applications/ApplicationsLib/ProjectData.cpp index 95eece383956bcc27c23e692e1850f3feb30ab84..9aae20a6fa952f0b29783914d2ad15b022c7ebba 100644 --- a/Applications/ApplicationsLib/ProjectData.cpp +++ b/Applications/ApplicationsLib/ProjectData.cpp @@ -922,7 +922,7 @@ void ProjectData::parseProcesses( name, *_mesh_vec[0], std::move(jacobian_assembler), _process_variables, _parameters, _local_coordinate_system, integration_order, - process_config); + process_config, _media); break; case 3: process = ProcessLib::LIE::HydroMechanics:: @@ -930,7 +930,7 @@ void ProjectData::parseProcesses( name, *_mesh_vec[0], std::move(jacobian_assembler), _process_variables, _parameters, _local_coordinate_system, integration_order, - process_config); + process_config, _media); break; default: OGS_FATAL( diff --git a/ProcessLib/LIE/HydroMechanics/CreateHydroMechanicsProcess.cpp b/ProcessLib/LIE/HydroMechanics/CreateHydroMechanicsProcess.cpp index ba887104e637b90ec1c99818edf360e319b29d17..95f10727c5737a16155752ddf86c7fc676111997 100644 --- a/ProcessLib/LIE/HydroMechanics/CreateHydroMechanicsProcess.cpp +++ b/ProcessLib/LIE/HydroMechanics/CreateHydroMechanicsProcess.cpp @@ -18,6 +18,8 @@ #include "MaterialLib/FractureModels/CreateCoulomb.h" #include "MaterialLib/FractureModels/CreateLinearElasticIsotropic.h" #include "MaterialLib/FractureModels/Permeability/CreatePermeabilityModel.h" +#include "MaterialLib/MPL/CreateMaterialSpatialDistributionMap.h" +#include "MaterialLib/MPL/MaterialSpatialDistributionMap.h" #include "MaterialLib/SolidModels/CreateConstitutiveRelation.h" #include "ParameterLib/Utils.h" #include "ProcessLib/Output/CreateSecondaryVariables.h" @@ -38,7 +40,8 @@ std::unique_ptr<Process> createHydroMechanicsProcess( std::optional<ParameterLib::CoordinateSystem> const& local_coordinate_system, unsigned const integration_order, - BaseLib::ConfigTree const& config) + BaseLib::ConfigTree const& config, + std::map<int, std::shared_ptr<MaterialPropertyLib::Medium>> const& media) { //! \ogs_file_param{prj__processes__process__type} config.checkConfigParameter("type", "HYDRO_MECHANICS_WITH_LIE"); @@ -326,9 +329,13 @@ std::unique_ptr<Process> createHydroMechanicsProcess( //! \ogs_file_param{prj__processes__process__HYDRO_MECHANICS_WITH_LIE__use_b_bar} auto const use_b_bar = config.getConfigParameter<bool>("use_b_bar", false); + auto media_map = + MaterialPropertyLib::createMaterialSpatialDistributionMap(media, mesh); + HydroMechanicsProcessData<GlobalDim> process_data{ materialIDs(mesh), std::move(solid_constitutive_relations), + std::move(media_map), intrinsic_permeability, specific_storage, fluid_viscosity, @@ -343,7 +350,8 @@ std::unique_ptr<Process> createHydroMechanicsProcess( initial_fracture_effective_stress, deactivate_matrix_in_flow, reference_temperature, - use_b_bar}; + use_b_bar, + }; SecondaryVariableCollection secondary_variables; @@ -365,7 +373,9 @@ template std::unique_ptr<Process> createHydroMechanicsProcess<2>( std::optional<ParameterLib::CoordinateSystem> const& local_coordinate_system, unsigned const integration_order, - BaseLib::ConfigTree const& config); + BaseLib::ConfigTree const& config, + std::map<int, std::shared_ptr<MaterialPropertyLib::Medium>> const& media); + template std::unique_ptr<Process> createHydroMechanicsProcess<3>( std::string const& name, MeshLib::Mesh& mesh, @@ -375,7 +385,8 @@ template std::unique_ptr<Process> createHydroMechanicsProcess<3>( std::optional<ParameterLib::CoordinateSystem> const& local_coordinate_system, unsigned const integration_order, - BaseLib::ConfigTree const& config); + BaseLib::ConfigTree const& config, + std::map<int, std::shared_ptr<MaterialPropertyLib::Medium>> const& media); } // namespace HydroMechanics } // namespace LIE diff --git a/ProcessLib/LIE/HydroMechanics/CreateHydroMechanicsProcess.h b/ProcessLib/LIE/HydroMechanics/CreateHydroMechanicsProcess.h index c3795c43471d32ec4dd299f90368e7a4f732bf52..02ce3c87434fee179e43b9c97ac87523e3b12d82 100644 --- a/ProcessLib/LIE/HydroMechanics/CreateHydroMechanicsProcess.h +++ b/ProcessLib/LIE/HydroMechanics/CreateHydroMechanicsProcess.h @@ -10,6 +10,7 @@ #pragma once +#include <map> #include <memory> #include <optional> #include <string> @@ -19,6 +20,12 @@ namespace BaseLib { class ConfigTree; } + +namespace MaterialPropertyLib +{ +class Medium; +} + namespace MeshLib { class Mesh; @@ -51,8 +58,8 @@ std::unique_ptr<Process> createHydroMechanicsProcess( std::optional<ParameterLib::CoordinateSystem> const& local_coordinate_system, unsigned const integration_order, - BaseLib::ConfigTree const& config); - + BaseLib::ConfigTree const& config, + std::map<int, std::shared_ptr<MaterialPropertyLib::Medium>> const& media); } // namespace HydroMechanics } // namespace LIE } // namespace ProcessLib diff --git a/ProcessLib/LIE/HydroMechanics/HydroMechanicsProcessData.h b/ProcessLib/LIE/HydroMechanics/HydroMechanicsProcessData.h index 09d0e506b27338f69a6b773def104ef32a435b6d..994223ab27db13461aeb222b80e5ea02c91c8984 100644 --- a/ProcessLib/LIE/HydroMechanics/HydroMechanicsProcessData.h +++ b/ProcessLib/LIE/HydroMechanics/HydroMechanicsProcessData.h @@ -15,6 +15,7 @@ #include <utility> #include "MaterialLib/FractureModels/FractureModelBase.h" +#include "MaterialLib/MPL/MaterialSpatialDistributionMap.h" #include "MaterialLib/SolidModels/MechanicsBase.h" #include "MeshLib/ElementStatus.h" #include "MeshLib/PropertyVector.h" @@ -38,6 +39,9 @@ struct HydroMechanicsProcessData std::map<int, std::shared_ptr<MaterialLib::Solids::MechanicsBase<GlobalDim>>> solid_materials; + + MaterialPropertyLib::MaterialSpatialDistributionMap media_map; + ParameterLib::Parameter<double> const& intrinsic_permeability; ParameterLib::Parameter<double> const& specific_storage; ParameterLib::Parameter<double> const& fluid_viscosity;