30 std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& jacobian_assembler,
31 std::vector<ProcessVariable>
const& variables,
32 std::vector<std::unique_ptr<ParameterLib::ParameterBase>>
const& parameters,
33 std::optional<ParameterLib::CoordinateSystem>
const&
34 local_coordinate_system,
36 std::map<
int, std::shared_ptr<MaterialPropertyLib::Medium>>
const& media)
40 DBUG(
"Create ThermoHydroMechanicsProcess.");
42 auto const coupling_scheme =
45 const bool use_monolithic_scheme =
46 !(coupling_scheme && (*coupling_scheme ==
"staggered"));
56 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>
58 if (use_monolithic_scheme)
70 variable_T = &per_process_variables[0].get();
71 variable_p = &per_process_variables[1].get();
72 variable_u = &per_process_variables[2].get();
73 process_variables.push_back(std::move(per_process_variables));
77 using namespace std::string_literals;
78 for (
auto const& variable_name :
79 {
"temperature"s,
"pressure"s,
"displacement"s})
81 auto per_process_variables =
83 process_variables.push_back(std::move(per_process_variables));
85 variable_T = &process_variables[0][0].get();
86 variable_p = &process_variables[1][0].get();
87 variable_u = &process_variables[2][0].get();
93 "The shape function order of temperature must be 1 but its input "
94 "value in <process_variable><order> is {:d}. Please correct it.",
100 "The shape function order of pressure must be 1 but its input "
101 "value in <process_variable><order> is {:d}. Please correct it.",
105 DBUG(
"Associate displacement with process variable '{:s}'.",
111 "Number of components of the process variable '{:s}' is different "
112 "from the displacement dimension: got {:d}, expected {:d}",
118 DBUG(
"Associate pressure with process variable '{:s}'.",
123 "Pressure process variable '{:s}' is not a scalar variable but has "
129 DBUG(
"Associate temperature with process variable '{:s}'.",
134 "temperature process variable '{:s}' is not a scalar variable but "
135 "has {:d} components.",
141 auto solid_constitutive_relations =
143 parameters, local_coordinate_system, materialIDs(mesh), config);
145 auto ice_constitutive_relation =
147 parameters, local_coordinate_system, config);
150 Eigen::Matrix<double, DisplacementDim, 1> specific_body_force;
152 std::vector<double>
const b =
155 "specific_body_force");
156 if (b.size() != DisplacementDim)
159 "The size of the specific body force vector does not match the "
160 "displacement dimension. Vector size is {:d}, displacement "
162 b.size(), DisplacementDim);
165 std::copy_n(b.data(), b.size(), specific_body_force.data());
168 auto const is_linear =
177 auto const equation_balance_type_str =
181 if (equation_balance_type_str ==
"volume")
190 config, parameters, mesh);
194 bool const is_volume_balance_equation_type =
195 equation_balance_type_str ==
"volume";
198 std::move(media_map),
199 std::move(solid_constitutive_relations),
200 std::move(ice_constitutive_relation),
201 is_volume_balance_equation_type,
202 std::move(initial_stress),
204 std::move(stabilizer)};
210 return std::make_unique<ThermoHydroMechanicsProcess<DisplacementDim>>(
211 std::move(name), mesh, std::move(jacobian_assembler), parameters,
212 integration_order, std::move(process_variables),
213 std::move(process_data), std::move(secondary_variables),
214 use_monolithic_scheme, is_linear);