54 std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& jacobian_assembler,
55 std::vector<ProcessVariable>
const& variables,
56 std::vector<std::unique_ptr<ParameterLib::ParameterBase>>
const& parameters,
57 std::optional<ParameterLib::CoordinateSystem>
const&
58 local_coordinate_system,
60 std::map<
int, std::shared_ptr<MaterialPropertyLib::Medium>>
const& media)
64 DBUG(
"Create HMPhaseFieldProcess.");
66 auto const coupling_scheme =
69 const bool use_monolithic_scheme = (coupling_scheme !=
"staggered");
77 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>
79 if (use_monolithic_scheme)
81 OGS_FATAL(
"Monolithic implementation is not available.");
85 using namespace std::string_literals;
89 auto const& variable_name :
97 auto per_process_variables =
99 process_variables.push_back(std::move(per_process_variables));
101 variable_ph = &process_variables[0][0].get();
102 variable_p = &process_variables[1][0].get();
103 variable_u = &process_variables[2][0].get();
106 DBUG(
"Associate phase field with process variable '{}'.",
111 "HMPhasefield process variable '{}' is not a scalar variable but "
112 "has {:d} components.",
117 DBUG(
"Associate pressure with process variable '{}'.",
122 "HMPhasefield process variable '{}' is not a scalar variable but "
123 "has {:d} components.",
128 DBUG(
"Associate displacement with process variable '{}'.",
134 "The component number of the process variable '{}' is different "
135 "from the displacement dimension: got {:d}, expected {:d}",
142 auto solid_constitutive_relations =
144 parameters, local_coordinate_system, materialIDs(mesh), config);
146 auto const phasefield_parameters_config =
152 phasefield_parameters_config,
154 "residual_stiffness", parameters, 1);
155 DBUG(
"Use '{}' as residual stiffness.", residual_stiffness.name);
159 phasefield_parameters_config,
161 "crack_resistance", parameters, 1);
162 DBUG(
"Use '{}' as crack resistance.", crack_resistance.name);
166 phasefield_parameters_config,
168 "crack_length_scale", parameters, 1);
169 DBUG(
"Use '{}' as crack length scale.", crack_length_scale.name);
172 auto const characteristic_length =
177 auto const fluid_compressibility =
182 Eigen::Matrix<double, DisplacementDim, 1> specific_body_force;
184 std::vector<double>
const b =
187 "specific_body_force");
188 if (b.size() != DisplacementDim)
191 "The size of the specific body force vector does not match the "
192 "displacement dimension. Vector size is {:d}, displacement "
194 b.size(), DisplacementDim);
197 std::copy_n(b.data(), b.size(), specific_body_force.data());
201 Eigen::Vector<double, DisplacementDim> specific_fracture_direction;
203 std::vector<double>
const fracture_normal =
206 "specific_fracture_direction");
207 if (fracture_normal.size() != DisplacementDim)
210 "The size of the specific fracture direction vector does not "
211 "match the displacement dimension. Vector size is {:d}, "
212 "displacement dimension is {:d}",
213 fracture_normal.size(), DisplacementDim);
216 std::copy_n(fracture_normal.data(), fracture_normal.size(),
217 specific_fracture_direction.data());
220 auto const irreversible_threshold =
224 auto const phasefield_model_string =
227 auto const phasefield_model =
229 DisplacementDim>(phasefield_model_string);
231 auto const softening_curve_string =
234 auto const softening_curve =
236 DisplacementDim>(softening_curve_string);
238 auto const energy_split_model_string =
241 auto const energy_split_model =
243 DisplacementDim>(energy_split_model_string);
245 auto degradation_derivative = creatDegradationDerivative<DisplacementDim>(
246 phasefield_model, characteristic_length, softening_curve);
248 auto const diffused_range_parameter =
252 auto const fracture_threshold =
256 auto const fracture_permeability_parameter =
262 double const fixed_stress_stabilization_parameter =
265 "fixed_stress_stabilization_parameter", 0.5);
267 DBUG(
"Using value {:g} for coupling parameter of staggered scheme.",
268 fixed_stress_stabilization_parameter);
270 auto spatial_stabilization_parameter_optional =
273 "spatial_stabilization_parameter");
274 double const spatial_stabilization_parameter =
275 spatial_stabilization_parameter_optional
276 ? spatial_stabilization_parameter_optional.value()
278 DBUG(
"Using value {} for spatial stablization coupling parameter.",
279 spatial_stabilization_parameter);
285 "width_init", parameters, 0.0);
286 DBUG(
"Use '{}' as initial width.", width_init.name);
290 DBUG(
"Check the media properties of HMPhaseField process ...");
292 DBUG(
"Media properties verified.");
296 std::move(media_map),
297 std::move(solid_constitutive_relations),
302 specific_fracture_direction,
303 irreversible_threshold,
307 characteristic_length,
308 std::move(degradation_derivative),
309 diffused_range_parameter,
310 fluid_compressibility,
312 fracture_permeability_parameter,
313 fixed_stress_stabilization_parameter,
314 spatial_stabilization_parameter,
321 return std::make_unique<HMPhaseFieldProcess<DisplacementDim>>(
322 std::move(name), mesh, std::move(jacobian_assembler), parameters,
323 integration_order, std::move(process_variables),
324 std::move(process_data), std::move(secondary_variables),
325 use_monolithic_scheme);