48 std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& jacobian_assembler,
49 std::vector<ProcessVariable>
const& variables,
50 std::vector<std::unique_ptr<ParameterLib::ParameterBase>>
const& parameters,
51 std::optional<ParameterLib::CoordinateSystem>
const&
52 local_coordinate_system,
54 std::map<
int, std::shared_ptr<MaterialPropertyLib::Medium>>
const& media)
58 DBUG(
"Create ThermoMechanicsProcess.");
60 auto const coupling_scheme =
63 const bool use_monolithic_scheme =
64 !(coupling_scheme && (*coupling_scheme ==
"staggered"));
72 int heat_conduction_process_id = 0;
73 int mechanics_process_id = 0;
77 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>
79 if (use_monolithic_scheme)
89 variable_T = &per_process_variables[0].get();
90 variable_u = &per_process_variables[1].get();
91 process_variables.push_back(std::move(per_process_variables));
95 using namespace std::string_literals;
96 for (
auto const& variable_name : {
"temperature"s,
"displacement"s})
98 auto per_process_variables =
100 process_variables.push_back(std::move(per_process_variables));
102 variable_T = &process_variables[0][0].get();
103 variable_u = &process_variables[1][0].get();
105 heat_conduction_process_id = 0;
106 mechanics_process_id = 1;
109 DBUG(
"Associate displacement with process variable '{:s}'.",
115 "Number of components of the process variable '{:s}' is different "
116 "from the displacement dimension: got {:d}, expected {:d}",
122 DBUG(
"Associate temperature with process variable '{:s}'.",
127 "Pressure process variable '{:s}' is not a scalar variable but has "
136 auto solid_constitutive_relations =
137 MaterialLib::Solids::createConstitutiveRelations<DisplacementDim>(
138 parameters, local_coordinate_system, materialIDs(mesh), config);
141 Eigen::Matrix<double, DisplacementDim, 1> specific_body_force;
143 std::vector<double>
const b =
146 "specific_body_force");
147 if (b.size() != DisplacementDim)
150 "The size of the specific body force vector does not match the "
151 "displacement dimension. Vector size is {:d}, displacement "
153 b.size(), DisplacementDim);
156 std::copy_n(b.data(), b.size(), specific_body_force.data());
160 auto const initial_stress = ParameterLib::findOptionalTagParameter<double>(
162 config,
"initial_stress", parameters,
169 DBUG(
"Check the solid properties of ThermoMechanics process ...");
171 DBUG(
"Solid properties verified.");
175 std::move(media_map),
176 std::move(solid_constitutive_relations),
179 mechanics_process_id,
180 heat_conduction_process_id};
186 return std::make_unique<ThermoMechanicsProcess<DisplacementDim>>(
187 std::move(name), mesh, std::move(jacobian_assembler), parameters,
188 integration_order, std::move(process_variables),
189 std::move(process_data), std::move(secondary_variables),
190 use_monolithic_scheme);