29 std::string
const& name,
31 std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& jacobian_assembler,
32 std::vector<ProcessVariable>
const& variables,
33 std::vector<std::unique_ptr<ParameterLib::ParameterBase>>
const& parameters,
34 std::optional<ParameterLib::CoordinateSystem>
const&
35 local_coordinate_system,
36 unsigned const integration_order,
41 DBUG(
"Create ThermoMechanicalPhaseFieldProcess.");
44 "Solve the coupling with the staggered scheme,"
45 "which is the only option for TM-Phasefield in the current code");
51 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>
53 int heat_conduction_process_id = 0;
54 int mechanics_related_process_id = 1;
55 int phase_field_process_id = 2;
62 process_variables.push_back(std::move(process_variable_T));
64 &process_variables[process_variables.size() - 1][0].get();
70 process_variables.push_back(std::move(process_variable_u));
72 &process_variables[process_variables.size() - 1][0].get();
77 process_variables.push_back(std::move(process_variable_ph));
79 &process_variables[process_variables.size() - 1][0].get();
81 DBUG(
"Associate displacement with process variable '{:s}'.",
87 "Number of components of the process variable '{:s}' is different "
88 "from the displacement dimension: got {:d}, expected {:d}",
94 DBUG(
"Associate phase field with process variable '{:s}'.",
99 "Phasefield process variable '{:s}' is not a scalar variable but "
100 "has {:d} components.",
105 DBUG(
"Associate temperature with process variable '{:s}'.",
110 "Temperature process variable '{:s}' is not a scalar variable but "
111 "has {:d} components.",
117 auto solid_constitutive_relations =
119 parameters, local_coordinate_system, materialIDs(mesh), config);
121 auto const phasefield_parameters_config =
125 auto const thermal_parameters_config =
131 phasefield_parameters_config,
133 "residual_stiffness", parameters, 1, &mesh);
134 DBUG(
"Use '{:s}' as residual stiffness.", residual_stiffness.name);
138 phasefield_parameters_config,
140 "crack_resistance", parameters, 1, &mesh);
141 DBUG(
"Use '{:s}' as crack resistance.", crack_resistance.name);
145 phasefield_parameters_config,
147 "crack_length_scale", parameters, 1, &mesh);
148 DBUG(
"Use '{:s}' as crack length scale.", crack_length_scale.name);
152 phasefield_parameters_config,
154 "kinetic_coefficient", parameters, 1, &mesh);
155 DBUG(
"Use '{:s}' as kinetic coefficient.", kinetic_coefficient.name);
161 "solid_density", parameters, 1, &mesh);
162 DBUG(
"Use '{:s}' as solid density parameter.", solid_density.name);
165 auto const& linear_thermal_expansion_coefficient =
167 thermal_parameters_config,
169 "linear_thermal_expansion_coefficient", parameters, 1, &mesh);
170 DBUG(
"Use '{:s}' as linear thermal expansion coefficient.",
171 linear_thermal_expansion_coefficient.name);
175 thermal_parameters_config,
177 "specific_heat_capacity", parameters, 1, &mesh);
178 DBUG(
"Use '{:s}' as specific heat capacity.", specific_heat_capacity.name);
182 thermal_parameters_config,
184 "thermal_conductivity", parameters, 1, &mesh);
185 DBUG(
"Use '{:s}' as thermal conductivity parameter.",
186 thermal_conductivity.name);
190 thermal_parameters_config,
192 "residual_thermal_conductivity", parameters, 1, &mesh);
193 DBUG(
"Use '{:s}' as residual thermal conductivity parameter.",
194 residual_thermal_conductivity.name);
196 const auto reference_temperature =
201 Eigen::Matrix<double, DisplacementDim, 1> specific_body_force;
203 std::vector<double>
const b =
206 "specific_body_force");
207 if (specific_body_force.size() != DisplacementDim)
210 "The size of the specific body force vector does not match the "
211 "displacement dimension. Vector size is {:d}, displacement "
213 specific_body_force.size(), DisplacementDim);
216 std::copy_n(b.data(), b.size(), specific_body_force.data());
221 std::move(solid_constitutive_relations),
227 linear_thermal_expansion_coefficient,
228 specific_heat_capacity,
229 thermal_conductivity,
230 residual_thermal_conductivity,
232 reference_temperature};
238 return std::make_unique<ThermoMechanicalPhaseFieldProcess<DisplacementDim>>(
239 std::move(name), mesh, std::move(jacobian_assembler), parameters,
240 integration_order, std::move(process_variables),
241 std::move(process_data), std::move(secondary_variables),
242 mechanics_related_process_id, phase_field_process_id,
243 heat_conduction_process_id);