29 std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& jacobian_assembler,
30 std::vector<ProcessVariable>
const& variables,
31 std::vector<std::unique_ptr<ParameterLib::ParameterBase>>
const& parameters,
32 std::optional<ParameterLib::CoordinateSystem>
const&
33 local_coordinate_system,
35 std::map<
int, std::shared_ptr<MaterialPropertyLib::Medium>>
const& media)
39 DBUG(
"Create ThermoHydroMechanicsProcess.");
41 auto const coupling_scheme =
44 const bool use_monolithic_scheme =
45 !(coupling_scheme && (*coupling_scheme ==
"staggered"));
55 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>
57 if (use_monolithic_scheme)
69 variable_T = &per_process_variables[0].get();
70 variable_p = &per_process_variables[1].get();
71 variable_u = &per_process_variables[2].get();
72 process_variables.push_back(std::move(per_process_variables));
76 using namespace std::string_literals;
77 for (
auto const& variable_name :
78 {
"temperature"s,
"pressure"s,
"displacement"s})
80 auto per_process_variables =
82 process_variables.push_back(std::move(per_process_variables));
84 variable_T = &process_variables[0][0].get();
85 variable_p = &process_variables[1][0].get();
86 variable_u = &process_variables[2][0].get();
92 "The shape function order of temperature must be 1 but its input "
93 "value in <process_variable><order> is {:d}. Please correct it.",
99 "The shape function order of pressure must be 1 but its input "
100 "value in <process_variable><order> is {:d}. Please correct it.",
104 DBUG(
"Associate displacement with process variable '{:s}'.",
110 "Number of components of the process variable '{:s}' is different "
111 "from the displacement dimension: got {:d}, expected {:d}",
117 DBUG(
"Associate pressure with process variable '{:s}'.",
122 "Pressure process variable '{:s}' is not a scalar variable but has "
128 DBUG(
"Associate temperature with process variable '{:s}'.",
133 "temperature process variable '{:s}' is not a scalar variable but "
134 "has {:d} components.",
140 auto solid_constitutive_relations =
142 parameters, local_coordinate_system, materialIDs(mesh), config);
144 auto ice_constitutive_relation =
146 parameters, local_coordinate_system, config);
149 Eigen::Matrix<double, DisplacementDim, 1> specific_body_force;
151 std::vector<double>
const b =
154 "specific_body_force");
155 if (b.size() != DisplacementDim)
158 "The size of the specific body force vector does not match the "
159 "displacement dimension. Vector size is {:d}, displacement "
161 b.size(), DisplacementDim);
164 std::copy_n(b.data(), b.size(), specific_body_force.data());
167 auto const is_linear =
174 auto const equation_balance_type_str =
178 if (equation_balance_type_str ==
"volume")
187 config, parameters, mesh);
191 bool const is_volume_balance_equation_type =
192 equation_balance_type_str ==
"volume";
195 std::move(media_map),
196 std::move(solid_constitutive_relations),
197 std::move(ice_constitutive_relation),
198 is_volume_balance_equation_type,
199 std::move(initial_stress),
201 std::move(stabilizer)};
207 return std::make_unique<ThermoHydroMechanicsProcess<DisplacementDim>>(
208 std::move(name), mesh, std::move(jacobian_assembler), parameters,
209 integration_order, std::move(process_variables),
210 std::move(process_data), std::move(secondary_variables),
211 use_monolithic_scheme, is_linear);