Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
heat_transfer_boundary_conditions.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) 2026 The Lethe Authors
2// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
3
4#ifndef lethe_heat_transfer_boundary_conditions_h
5#define lethe_heat_transfer_boundary_conditions_h
6
8#include <core/utilities.h>
9
10#include <deal.II/base/parameter_handler.h>
11#include <deal.II/base/parsed_function.h>
12
13#include <map>
14#include <memory>
15#include <vector>
16
17using namespace dealii;
18
19namespace BoundaryConditions
20{
21 /// Boundary condition types of the heat transfer. periodic_neighbor is not a
22 /// user choice: it is assigned to the boundary matching a periodic boundary.
31
32 /// Deprecated strings of the heat transfer boundary condition "type"
33 /// parameter, which remain accepted in parameter files
38
39 /// Boundary condition types of the heat transfer which can be selected in
40 /// the parameter file
41 inline const std::vector<HeatTransferBoundaryType>
47
48 /**
49 * @brief This class manages the boundary conditions for Heat-Transfer solver
50 * It introduces the boundary functions and declares the boundary conditions
51 * coherently.
52 * The members "value", "h" and "Tinf" contain double used for bc calculation:
53 *
54 * - if bc type is "noflux", no flux is assembled at the boundary
55 *
56 * - if bc type is "temperature" (Dirichlet condition), "value" is the
57 * double passed to the deal.ii ConstantFunction
58 *
59 * - if bc type is "convection_radiation" (Robin condition), "h" is the
60 * convective heat transfer coefficient and "Tinf" is the
61 * environment temperature at the boundary, "emissivity" is the emissivity
62 * coefficient, and "Stefan-Boltzmann constant" is the Stefan-Boltzmann
63 * constant = 5.6703*10-8 \f$(W.m^{-2}.K^{-4})\f$. It is also possible to
64 * impose a heat flux using "heat_flux"
65 *
66 */
67 template <int dim>
69 : public BoundaryConditions<HeatTransferBoundaryType>
70 {
71 public:
72 /// Temperature values for Dirichlet boundary conditions
73 std::map<types::boundary_id,
74 std::shared_ptr<Functions::ParsedFunction<dim>>>
76 /// Convective heat transfer coefficients for Robin conditions
77 std::map<types::boundary_id,
78 std::shared_ptr<Functions::ParsedFunction<dim>>>
80 /// Environment temperatures for Robin conditions
81 std::map<types::boundary_id,
82 std::shared_ptr<Functions::ParsedFunction<dim>>>
84 /// Emissivity coefficients for radiation boundary conditions
85 std::map<types::boundary_id,
86 std::shared_ptr<Functions::ParsedFunction<dim>>>
88 /// Heat-flux values for flux boundary conditions
89 std::map<types::boundary_id,
90 std::shared_ptr<Functions::ParsedFunction<dim>>>
92 /// Stefan-Boltzmann constant used in radiation boundary conditions
94
95 /**
96 * @brief Declare the default parameters for one heat transfer boundary condition.
97 *
98 * @param[in, out] prm The parameter handler object.
99 * @param[in] default_boundary_id The default mesh boundary id.
100 */
101 void
102 declare_default_entry(ParameterHandler &prm,
103 types::boundary_id default_boundary_id);
104
105 /**
106 * @brief Declare the heat transfer boundary condition parameters.
107 *
108 * @param[in, out] prm The parameter handler object.
109 * @param[in] number_of_boundary_conditions The number of boundary
110 * conditions to declare.
111 */
112 void
113 declare_parameters(ParameterHandler &prm,
114 unsigned int number_of_boundary_conditions);
115
116 /**
117 * @brief Parse the information for one heat transfer boundary condition.
118 *
119 * @param[in] prm The parameter handler object.
120 */
121 void
122 parse_boundary(ParameterHandler &prm);
123
124 /**
125 * @brief Parse the heat transfer boundary condition parameters.
126 *
127 * @param[in] prm The parameter handler object.
128 */
129 void
130 parse_parameters(ParameterHandler &prm);
131
132 // Flag that indicates wheter a convection-radiation boundary exists in the
133 // domain
135 };
136} // namespace BoundaryConditions
137
138#endif
This class manages the boundary conditions for Heat-Transfer solver It introduces the boundary functi...
std::map< types::boundary_id, std::shared_ptr< Functions::ParsedFunction< dim > > > heat_flux_bc
Heat-flux values for flux boundary conditions.
std::map< types::boundary_id, std::shared_ptr< Functions::ParsedFunction< dim > > > emissivity
Emissivity coefficients for radiation boundary conditions.
std::map< types::boundary_id, std::shared_ptr< Functions::ParsedFunction< dim > > > h
Convective heat transfer coefficients for Robin conditions.
void declare_parameters(ParameterHandler &prm, unsigned int number_of_boundary_conditions)
Declare the heat transfer boundary condition parameters.
void declare_default_entry(ParameterHandler &prm, types::boundary_id default_boundary_id)
Declare the default parameters for one heat transfer boundary condition.
void parse_parameters(ParameterHandler &prm)
Parse the heat transfer boundary condition parameters.
std::map< types::boundary_id, std::shared_ptr< Functions::ParsedFunction< dim > > > Tinf
Environment temperatures for Robin conditions.
void parse_boundary(ParameterHandler &prm)
Parse the information for one heat transfer boundary condition.
std::map< types::boundary_id, std::shared_ptr< Functions::ParsedFunction< dim > > > dirichlet_value
Temperature values for Dirichlet boundary conditions.
double Stefan_Boltzmann_constant
Stefan-Boltzmann constant used in radiation boundary conditions.
std::vector< std::pair< std::string, EnumType > > DeprecatedEnumNames
Deprecated strings of an enum parameter, each paired with the enumerator it stands for....
Definition utilities.h:765
const std::vector< HeatTransferBoundaryType > heat_transfer_boundary_types
const DeprecatedEnumNames< HeatTransferBoundaryType > deprecated_heat_transfer_boundary_type_names