42 std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& jacobian_assembler,
43 std::vector<ProcessVariable>
const& variables,
44 std::vector<std::unique_ptr<ParameterLib::ParameterBase>>
const& parameters,
45 std::optional<ParameterLib::CoordinateSystem>
const&
46 local_coordinate_system,
48 std::map<
int, std::shared_ptr<MaterialPropertyLib::Medium>>
const& media)
52 DBUG(
"Create ThermoMechanicsProcess.");
54 auto const coupling_scheme =
57 const bool use_monolithic_scheme =
58 !(coupling_scheme && (*coupling_scheme ==
"staggered"));
66 int heat_conduction_process_id = 0;
67 int mechanics_process_id = 0;
71 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>
73 if (use_monolithic_scheme)
83 variable_T = &per_process_variables[0].get();
84 variable_u = &per_process_variables[1].get();
85 process_variables.push_back(std::move(per_process_variables));
89 using namespace std::string_literals;
90 for (
auto const& variable_name : {
"temperature"s,
"displacement"s})
92 auto per_process_variables =
94 process_variables.push_back(std::move(per_process_variables));
96 variable_T = &process_variables[0][0].get();
97 variable_u = &process_variables[1][0].get();
99 heat_conduction_process_id = 0;
100 mechanics_process_id = 1;
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 temperature with process variable '{:s}'.",
121 "Pressure process variable '{:s}' is not a scalar variable but has "
130 auto solid_constitutive_relations =
132 parameters, local_coordinate_system, materialIDs(mesh), config);
135 Eigen::Matrix<double, DisplacementDim, 1> specific_body_force;
137 std::vector<double>
const b =
140 "specific_body_force");
141 if (b.size() != DisplacementDim)
144 "The size of the specific body force vector does not match the "
145 "displacement dimension. Vector size is {:d}, displacement "
147 b.size(), DisplacementDim);
150 std::copy_n(b.data(), b.size(), specific_body_force.data());
156 config,
"initial_stress", parameters,
163 DBUG(
"Check the solid properties of ThermoMechanics process ...");
165 DBUG(
"Solid properties verified.");
169 std::move(media_map),
170 std::move(solid_constitutive_relations),
173 mechanics_process_id,
174 heat_conduction_process_id};
180 return std::make_unique<ThermoMechanicsProcess<DisplacementDim>>(
181 std::move(name), mesh, std::move(jacobian_assembler), parameters,
182 integration_order, std::move(process_variables),
183 std::move(process_data), std::move(secondary_variables),
184 use_monolithic_scheme);