41 std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& jacobian_assembler,
42 std::vector<ProcessVariable>
const& variables,
43 std::vector<std::unique_ptr<ParameterLib::ParameterBase>>
const& parameters,
44 std::optional<ParameterLib::CoordinateSystem>
const&
45 local_coordinate_system,
47 std::map<
int, std::shared_ptr<MaterialPropertyLib::Medium>>
const& media)
51 DBUG(
"Create ThermoMechanicsProcess.");
53 auto const coupling_scheme =
56 const bool use_monolithic_scheme =
57 !(coupling_scheme && (*coupling_scheme ==
"staggered"));
65 int heat_conduction_process_id = 0;
66 int mechanics_process_id = 0;
70 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>
72 if (use_monolithic_scheme)
82 variable_T = &per_process_variables[0].get();
83 variable_u = &per_process_variables[1].get();
84 process_variables.push_back(std::move(per_process_variables));
88 using namespace std::string_literals;
89 for (
auto const& variable_name : {
"temperature"s,
"displacement"s})
91 auto per_process_variables =
93 process_variables.push_back(std::move(per_process_variables));
95 variable_T = &process_variables[0][0].get();
96 variable_u = &process_variables[1][0].get();
98 heat_conduction_process_id = 0;
99 mechanics_process_id = 1;
102 DBUG(
"Associate displacement with process variable '{:s}'.",
108 "Number of components of the process variable '{:s}' is different "
109 "from the displacement dimension: got {:d}, expected {:d}",
115 DBUG(
"Associate temperature with process variable '{:s}'.",
120 "Pressure process variable '{:s}' is not a scalar variable but has "
129 auto solid_constitutive_relations =
131 parameters, local_coordinate_system, materialIDs(mesh), config);
134 Eigen::Matrix<double, DisplacementDim, 1> specific_body_force;
136 std::vector<double>
const b =
139 "specific_body_force");
140 if (b.size() != DisplacementDim)
143 "The size of the specific body force vector does not match the "
144 "displacement dimension. Vector size is {:d}, displacement "
146 b.size(), DisplacementDim);
149 std::copy_n(b.data(), b.size(), specific_body_force.data());
155 config,
"initial_stress", parameters,
162 DBUG(
"Check the solid properties of ThermoMechanics process ...");
164 DBUG(
"Solid properties verified.");
168 std::move(media_map),
169 std::move(solid_constitutive_relations),
172 mechanics_process_id,
173 heat_conduction_process_id};
179 return std::make_unique<ThermoMechanicsProcess<DisplacementDim>>(
180 std::move(name), mesh, std::move(jacobian_assembler), parameters,
181 integration_order, std::move(process_variables),
182 std::move(process_data), std::move(secondary_variables),
183 use_monolithic_scheme);