Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
qmom_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_qmom_boundary_conditions_h
5#define lethe_qmom_boundary_conditions_h
6
9#include <core/utilities.h>
10
11#include <deal.II/base/parameter_handler.h>
12
13#include <map>
14
15using namespace dealii;
16
17namespace BoundaryConditions
18{
19 /// Boundary condition types of the QMOM physics
26
27 /**
28 * @brief Boundary conditions of the QMOM physics. They apply to the advective
29 * flux of all the QMOM fields (scalars and moments), which is meant to be
30 * computed with an upwind numerical flux:
31 * - dirichlet: the prescribed values enter the domain where the flow enters
32 * (u.n < 0) and the interior values leave it where the flow leaves;
33 * - outlet: the interior values leave the domain where the flow leaves and
34 * nothing enters where the flow enters (backflow);
35 * - none: the advective flux is zero, which is the natural choice for
36 * walls.
37 * Boundaries without a QMOM boundary condition are treated as none.
38 *
39 * @tparam dim Number of spatial dimensions.
40 */
41 template <int dim>
42 class QMOMBoundaryConditions : public BoundaryConditions<QMOMBoundaryType>
43 {
44 public:
45 /// Values imposed by the Dirichlet boundary conditions, for each boundary
46 /// id of type dirichlet
47 std::map<types::boundary_id, Parameters::QMOMFunctions<dim>> dirichlet;
48
49 /**
50 * @brief Declare the parameters of one boundary condition.
51 *
52 * @param[in,out] prm Parameter handler.
53 * @param[in] default_boundary_id Default boundary id of the boundary
54 * condition.
55 */
56 void
57 declare_default_entry(ParameterHandler &prm,
58 const types::boundary_id default_boundary_id);
59
60 /**
61 * @brief Declare the "boundary conditions qmom" subsection.
62 *
63 * @param[in,out] prm Parameter handler.
64 * @param[in] number_of_boundary_conditions Maximal number of boundary
65 * conditions, used to declare the "bc i" subsections.
66 */
67 void
68 declare_parameters(ParameterHandler &prm,
69 const unsigned int number_of_boundary_conditions);
70
71 /**
72 * @brief Parse one boundary condition.
73 *
74 * @param[in,out] prm Parameter handler.
75 */
76 void
77 parse_boundary(ParameterHandler &prm);
78
79 /**
80 * @brief Parse the "boundary conditions qmom" subsection.
81 *
82 * @param[in,out] prm Parameter handler.
83 */
84 void
85 parse_parameters(ParameterHandler &prm);
86 };
87} // namespace BoundaryConditions
88
89#endif
Boundary conditions of the QMOM physics. They apply to the advective flux of all the QMOM fields (sca...
void declare_default_entry(ParameterHandler &prm, const types::boundary_id default_boundary_id)
Declare the parameters of one boundary condition.
void declare_parameters(ParameterHandler &prm, const unsigned int number_of_boundary_conditions)
Declare the "boundary conditions qmom" subsection.
void parse_parameters(ParameterHandler &prm)
Parse the "boundary conditions qmom" subsection.
void parse_boundary(ParameterHandler &prm)
Parse one boundary condition.
std::map< types::boundary_id, Parameters::QMOMFunctions< dim > > dirichlet
QMOMBoundaryType
Boundary condition types of the QMOM physics.