93 std::string
const& name,
95 std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& jacobian_assembler,
96 std::vector<ProcessVariable>
const& variables,
97 std::vector<std::unique_ptr<ParameterLib::ParameterBase>>
const& parameters,
98 unsigned const integration_order,
100 std::vector<std::unique_ptr<MeshLib::Mesh>>
const& meshes,
101 std::map<
int, std::shared_ptr<MaterialPropertyLib::Medium>>
const& media)
106 DBUG(
"Create HTProcess.");
108 auto const coupling_scheme =
111 const bool use_monolithic_scheme =
112 !(coupling_scheme && (*coupling_scheme ==
"staggered"));
121 int const heat_transport_process_id = 0;
122 int hydraulic_process_id = 0;
124 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>
126 if (use_monolithic_scheme)
131 variables, pv_config,
136 process_variables.push_back(std::move(per_process_variables));
140 using namespace std::string_literals;
141 for (
auto const& variable_name : {
"temperature"s,
"pressure"s})
143 auto per_process_variables =
145 process_variables.push_back(std::move(per_process_variables));
147 hydraulic_process_id = 1;
151 std::vector<double>
const b =
154 assert(!b.empty() && b.size() < 4);
155 int const mesh_space_dimension =
157 if (
static_cast<int>(b.size()) != mesh_space_dimension)
160 "specific body force (gravity vector) has {:d} components, "
161 "mesh dimension is {:d}",
162 b.size(), mesh_space_dimension);
166 Eigen::VectorXd specific_body_force(b.size());
170 std::copy_n(b.data(), b.size(), specific_body_force.data());
173 std::unique_ptr<ProcessLib::SurfaceFluxData> surfaceflux;
174 auto calculatesurfaceflux_config =
177 if (calculatesurfaceflux_config)
180 *calculatesurfaceflux_config, meshes);
186 DBUG(
"Check the media properties of HT process ...");
188 DBUG(
"Media properties verified.");
194 auto const aperture_config =
201 *aperture_config,
"parameter", parameters, 1);
206 std::vector<Eigen::VectorXd> projected_specific_body_force_vectors;
207 projected_specific_body_force_vectors.reserve(rotation_matrices.size());
209 std::transform(rotation_matrices.begin(), rotation_matrices.end(),
210 std::back_inserter(projected_specific_body_force_vectors),
211 [&specific_body_force](
const auto& R)
212 { return R * R.transpose() * specific_body_force; });
214 auto const equation_balance_type_str =
218 if (equation_balance_type_str !=
"volume" &&
219 equation_balance_type_str !=
"mass")
222 "Invalid equation_balance_type '{}'. Supported values: 'volume' or "
224 equation_balance_type_str);
226 bool const is_volume_balance_equation_type =
227 (equation_balance_type_str ==
"volume");
229 if (is_volume_balance_equation_type)
237 heat_transport_process_id,
238 hydraulic_process_id,
239 std::move(stabilizer),
240 projected_specific_body_force_vectors,
241 mesh_space_dimension,
242 *aperture_size_parameter,
243 is_volume_balance_equation_type,
250 return std::make_unique<HTProcess>(
251 std::move(name), mesh, std::move(jacobian_assembler), parameters,
252 integration_order, std::move(process_variables),
253 std::move(process_data), std::move(secondary_variables),
254 use_monolithic_scheme, std::move(surfaceflux));