28 std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& jacobian_assembler,
29 std::vector<ProcessVariable>
const& variables,
30 std::vector<std::unique_ptr<ParameterLib::ParameterBase>>
const& parameters,
31 std::optional<ParameterLib::CoordinateSystem>
const&
32 local_coordinate_system,
34 std::map<
int, std::shared_ptr<MaterialPropertyLib::Medium>>
const& media)
38 DBUG(
"Create ThermoHydroMechanicsProcess.");
40 auto const coupling_scheme =
43 const bool use_monolithic_scheme =
44 !(coupling_scheme && (*coupling_scheme ==
"staggered"));
54 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>
56 if (use_monolithic_scheme)
68 variable_T = &per_process_variables[0].get();
69 variable_p = &per_process_variables[1].get();
70 variable_u = &per_process_variables[2].get();
71 process_variables.push_back(std::move(per_process_variables));
75 using namespace std::string_literals;
76 for (
auto const& variable_name :
77 {
"temperature"s,
"pressure"s,
"displacement"s})
79 auto per_process_variables =
81 process_variables.push_back(std::move(per_process_variables));
83 variable_T = &process_variables[0][0].get();
84 variable_p = &process_variables[1][0].get();
85 variable_u = &process_variables[2][0].get();
91 "The shape function order of temperature must be 1 but its input "
92 "value in <process_variable><order> is {:d}. Please correct it.",
98 "The shape function order of pressure must be 1 but its input "
99 "value in <process_variable><order> is {:d}. Please correct it.",
103 DBUG(
"Associate displacement with process variable '{:s}'.",
109 "Number of components of the process variable '{:s}' is different "
110 "from the displacement dimension: got {:d}, expected {:d}",
116 DBUG(
"Associate pressure with process variable '{:s}'.",
121 "Pressure process variable '{:s}' is not a scalar variable but has "
127 DBUG(
"Associate temperature with process variable '{:s}'.",
132 "temperature process variable '{:s}' is not a scalar variable but "
133 "has {:d} components.",
139 auto solid_constitutive_relations =
141 parameters, local_coordinate_system, materialIDs(mesh), config);
143 auto ice_constitutive_relation =
145 parameters, local_coordinate_system, config);
148 Eigen::Matrix<double, DisplacementDim, 1> specific_body_force;
150 std::vector<double>
const b =
153 "specific_body_force");
154 if (b.size() != DisplacementDim)
157 "The size of the specific body force vector does not match the "
158 "displacement dimension. Vector size is {:d}, displacement "
160 b.size(), DisplacementDim);
163 std::copy_n(b.data(), b.size(), specific_body_force.data());
166 auto const is_linear =
176 config, parameters, mesh);
182 std::move(media_map),
183 std::move(solid_constitutive_relations),
184 std::move(ice_constitutive_relation),
185 std::move(initial_stress),
187 std::move(stabilizer)};
193 return std::make_unique<ThermoHydroMechanicsProcess<DisplacementDim>>(
194 std::move(name), mesh, std::move(jacobian_assembler), parameters,
195 integration_order, std::move(process_variables),
196 std::move(process_data), std::move(secondary_variables),
197 use_monolithic_scheme, is_linear);