58 std::string
const& name,
60 std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& jacobian_assembler,
61 std::vector<ProcessVariable>
const& variables,
62 std::vector<std::unique_ptr<ParameterLib::ParameterBase>>
const& parameters,
63 unsigned const integration_order,
65 std::vector<std::unique_ptr<MeshLib::Mesh>>
const& meshes,
66 std::map<
int, std::shared_ptr<MaterialPropertyLib::Medium>>
const& media)
71 DBUG(
"Create HTProcess.");
73 auto const coupling_scheme =
76 const bool use_monolithic_scheme =
77 !(coupling_scheme && (*coupling_scheme ==
"staggered"));
86 int const heat_transport_process_id = 0;
87 int hydraulic_process_id = 0;
89 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>
91 if (use_monolithic_scheme)
101 process_variables.push_back(std::move(per_process_variables));
105 using namespace std::string_literals;
106 for (
auto const& variable_name : {
"temperature"s,
"pressure"s})
108 auto per_process_variables =
110 process_variables.push_back(std::move(per_process_variables));
112 hydraulic_process_id = 1;
116 std::vector<double>
const b =
119 assert(!b.empty() && b.size() < 4);
120 int const mesh_space_dimension =
122 if (
static_cast<int>(b.size()) != mesh_space_dimension)
125 "specific body force (gravity vector) has {:d} components, mesh "
127 b.size(), mesh_space_dimension);
131 Eigen::VectorXd specific_body_force(b.size());
135 std::copy_n(b.data(), b.size(), specific_body_force.data());
139 "default solid thermal expansion", 0.);
141 "default_biot constant", 0.);
143 &default_solid_thermal_expansion;
146 auto const solid_config =
149 const bool has_fluid_thermal_expansion =
static_cast<bool>(solid_config);
154 *solid_config,
"thermal_expansion", parameters, 1, &mesh);
155 DBUG(
"Use '{:s}' as solid thermal expansion.",
156 solid_thermal_expansion->
name);
159 *solid_config,
"biot_constant", parameters, 1, &mesh);
160 DBUG(
"Use '{:s}' as Biot's constant.", biot_constant->
name);
163 std::unique_ptr<ProcessLib::SurfaceFluxData> surfaceflux;
164 auto calculatesurfaceflux_config =
167 if (calculatesurfaceflux_config)
170 *calculatesurfaceflux_config, meshes);
176 DBUG(
"Check the media properties of HT process ...");
178 DBUG(
"Media properties verified.");
184 auto const aperture_config =
191 *aperture_config,
"parameter", parameters, 1);
196 std::vector<Eigen::VectorXd> projected_specific_body_force_vectors;
197 projected_specific_body_force_vectors.reserve(rotation_matrices.size());
199 std::transform(rotation_matrices.begin(), rotation_matrices.end(),
200 std::back_inserter(projected_specific_body_force_vectors),
201 [&specific_body_force](
const auto& R)
202 { return R * R.transpose() * specific_body_force; });
205 has_fluid_thermal_expansion,
206 *solid_thermal_expansion,
209 heat_transport_process_id,
210 hydraulic_process_id,
211 std::move(stabilizer),
212 projected_specific_body_force_vectors,
213 mesh_space_dimension,
214 *aperture_size_parameter,
221 return std::make_unique<HTProcess>(
222 std::move(name), mesh, std::move(jacobian_assembler), parameters,
223 integration_order, std::move(process_variables),
224 std::move(process_data), std::move(secondary_variables),
225 use_monolithic_scheme, std::move(surfaceflux));