33 std::map<
int, std::shared_ptr<MaterialPropertyLib::Medium>>
const& media)
35 std::array
const required_medium_properties = {
42 std::array
const required_liquid_properties = {
46 for (
auto const& m : media)
48 checkRequiredProperties(*m.second, required_medium_properties);
49 checkRequiredProperties(m.second->phase(
"AqueousLiquid"),
50 required_liquid_properties);
51 checkRequiredProperties(m.second->phase(
"Solid"),
52 required_solid_properties);
58 std::string
const& name,
60 std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& jacobian_assembler,
61 std::vector<ProcessVariable>
const& variables,
62 std::vector<std::unique_ptr<ParameterLib::ParameterBase>>
const& parameters,
63 std::optional<ParameterLib::CoordinateSystem>
const&
64 local_coordinate_system,
65 unsigned const integration_order,
67 std::map<
int, std::shared_ptr<MaterialPropertyLib::Medium>>
const& media)
71 DBUG(
"Create RichardsMechanicsProcess.");
73 auto const coupling_scheme =
76 const bool use_monolithic_scheme =
77 !(coupling_scheme && (*coupling_scheme ==
"staggered"));
86 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>
88 if (use_monolithic_scheme)
98 variable_p = &per_process_variables[0].get();
99 variable_u = &per_process_variables[1].get();
100 process_variables.push_back(std::move(per_process_variables));
104 using namespace std::string_literals;
105 for (
auto const& variable_name : {
"pressure"s,
"displacement"s})
107 auto per_process_variables =
109 process_variables.push_back(std::move(per_process_variables));
111 variable_p = &process_variables[0][0].get();
112 variable_u = &process_variables[1][0].get();
115 DBUG(
"Associate displacement with process variable '{:s}'.",
121 "Number of components of the process variable '{:s}' is different "
122 "from the displacement dimension: got {:d}, expected {:d}",
128 DBUG(
"Associate pressure with process variable '{:s}'.",
133 "Pressure process variable '{:s}' is not a scalar variable but has "
139 auto solid_constitutive_relations =
140 MaterialLib::Solids::createConstitutiveRelations<DisplacementDim>(
141 parameters, local_coordinate_system, materialIDs(mesh), config);
145 Eigen::Matrix<double, DisplacementDim, 1> specific_body_force;
147 std::vector<double>
const b =
150 "specific_body_force");
151 if (b.size() != DisplacementDim)
154 "The size of the specific body force vector does not match the "
155 "displacement dimension. Vector size is {:d}, displacement "
157 b.size(), DisplacementDim);
160 std::copy_n(b.data(), b.size(), specific_body_force.data());
165 DBUG(
"Check the media properties of RichardsMechanics process ...");
167 DBUG(
"Media properties verified.");
170 auto const initial_stress =
171 ProcessLib::createInitialStress<DisplacementDim>(config, parameters,
174 std::optional<MicroPorosityParameters> micro_porosity_parameters;
175 if (
auto const micro_porosity_config =
182 micro_porosity_config->getConfigSubtree(
"nonlinear_solver")),
184 micro_porosity_config->getConfigParameter<
double>(
185 "mass_exchange_coefficient")};
188 auto const mass_lumping =
192 auto const explicit_hm_coupling_in_unsaturated_zone =
195 "explicit_hm_coupling_in_unsaturated_zone",
false);
199 std::move(media_map),
200 std::move(solid_constitutive_relations),
203 micro_porosity_parameters,
205 explicit_hm_coupling_in_unsaturated_zone};
211 return std::make_unique<RichardsMechanicsProcess<DisplacementDim>>(
212 std::move(name), mesh, std::move(jacobian_assembler), parameters,
213 integration_order, std::move(process_variables),
214 std::move(process_data), std::move(secondary_variables),
215 use_monolithic_scheme);
template std::unique_ptr< Process > createRichardsMechanicsProcess< 3 >(std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
std::unique_ptr< Process > createRichardsMechanicsProcess(std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
template std::unique_ptr< Process > createRichardsMechanicsProcess< 2 >(std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)