65 std::string
const& name,
67 std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& jacobian_assembler,
68 std::vector<ProcessVariable>
const& variables,
69 std::vector<std::unique_ptr<ParameterLib::ParameterBase>>
const& parameters,
70 unsigned const integration_order,
72 std::vector<std::unique_ptr<MeshLib::Mesh>>
const& meshes,
73 std::map<
int, std::shared_ptr<MaterialPropertyLib::Medium>>
const& media)
78 DBUG(
"Create HTProcess.");
80 auto const coupling_scheme =
83 const bool use_monolithic_scheme =
84 !(coupling_scheme && (*coupling_scheme ==
"staggered"));
93 int const heat_transport_process_id = 0;
94 int hydraulic_process_id = 0;
96 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>
98 if (use_monolithic_scheme)
103 variables, pv_config,
108 process_variables.push_back(std::move(per_process_variables));
112 using namespace std::string_literals;
113 for (
auto const& variable_name : {
"temperature"s,
"pressure"s})
115 auto per_process_variables =
117 process_variables.push_back(std::move(per_process_variables));
119 hydraulic_process_id = 1;
123 std::vector<double>
const b =
126 assert(!b.empty() && b.size() < 4);
127 int const mesh_space_dimension =
129 if (
static_cast<int>(b.size()) != mesh_space_dimension)
132 "specific body force (gravity vector) has {:d} components, mesh "
134 b.size(), mesh_space_dimension);
138 Eigen::VectorXd specific_body_force(b.size());
142 std::copy_n(b.data(), b.size(), specific_body_force.data());
146 "default solid thermal expansion", 0.);
148 "default_biot constant", 0.);
150 &default_solid_thermal_expansion;
153 auto const solid_config =
156 const bool has_fluid_thermal_expansion =
static_cast<bool>(solid_config);
161 *solid_config,
"thermal_expansion", parameters, 1, &mesh);
162 DBUG(
"Use '{:s}' as solid thermal expansion.",
163 solid_thermal_expansion->
name);
166 *solid_config,
"biot_constant", parameters, 1, &mesh);
167 DBUG(
"Use '{:s}' as Biot's constant.", biot_constant->
name);
170 std::unique_ptr<ProcessLib::SurfaceFluxData> surfaceflux;
171 auto calculatesurfaceflux_config =
174 if (calculatesurfaceflux_config)
177 *calculatesurfaceflux_config, meshes);
183 DBUG(
"Check the media properties of HT process ...");
185 DBUG(
"Media properties verified.");
191 auto const aperture_config =
198 *aperture_config,
"parameter", parameters, 1);
203 std::vector<Eigen::VectorXd> projected_specific_body_force_vectors;
204 projected_specific_body_force_vectors.reserve(rotation_matrices.size());
206 std::transform(rotation_matrices.begin(), rotation_matrices.end(),
207 std::back_inserter(projected_specific_body_force_vectors),
208 [&specific_body_force](
const auto& R)
209 { return R * R.transpose() * specific_body_force; });
212 has_fluid_thermal_expansion,
213 *solid_thermal_expansion,
216 heat_transport_process_id,
217 hydraulic_process_id,
218 std::move(stabilizer),
219 projected_specific_body_force_vectors,
220 mesh_space_dimension,
221 *aperture_size_parameter,
228 return std::make_unique<HTProcess>(
229 std::move(name), mesh, std::move(jacobian_assembler), parameters,
230 integration_order, std::move(process_variables),
231 std::move(process_data), std::move(secondary_variables),
232 use_monolithic_scheme, std::move(surfaceflux));