Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
grid_impinging_jet_mixer.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_grid_impinging_jet_mixer_h
5#define lethe_grid_impinging_jet_mixer_h
6
7#include <deal.II/base/utilities.h>
8
9#include <deal.II/grid/tria.h>
10
11#include <string>
12
13using namespace dealii;
14
15/**
16 * @brief Geometry dimensions of the impinging-jet mixer (SI units, metres).
17 *
18 * This is the single container for the mixer's geometric dimensions; the
19 * defaults below are used when the grid-argument string is empty, and are
20 * overridden by the constructor otherwise. The member functions expose the
21 * axial coordinates derived from these dimensions in the construction datum
22 * (floor of the mixing chamber at z = 0, with the cone and outlet below it at
23 * negative z), in which the vessel is built before make_grid() re-datums the
24 * mesh so the common inlet axis lands on z = 0.
25 */
27{
28 double R_chamber = 0.05; ///< mixing-chamber radius
29 double r_inlet = 0.02; ///< inlet-pipe radius
30 double r_outlet = 0.025; ///< outlet-pipe radius
31 double H_chamber = 0.16; ///< chamber height (axial extent)
32 double L_cone = 0.06; ///< axial length of the conical reduction
33 double L_outlet = 0.05; ///< length of the straight outlet pipe
34 double L_inlet = 0.08; ///< length of each inlet pipe
35 double z_inlet = 0.08; ///< inlet-axis height above the chamber floor
36
37 /// @name Derived axial coordinates (construction datum).
38 /// @{
39 double
41 {
42 return H_chamber;
43 }
44 double
46 {
47 return -L_cone;
48 }
49 double
51 {
52 return -L_cone - L_outlet;
53 }
54 double
56 {
57 return H_chamber;
58 }
59 /// @}
60};
61
62/**
63 * @brief Generates a 3D mesh for an impinging-jet mixer geometry.
64 *
65 * The geometry (axis of the mixing chamber = z, vertical) consists of:
66 * - A large vertical mixing chamber (cylinder of radius R_chamber) whose top
67 * is closed by a hemispherical dome;
68 * - A conical reduction (R_chamber -> r_outlet) followed by a straight outlet
69 * pipe (radius r_outlet) below the chamber;
70 * - Two opposing, smaller horizontal inlet pipes (radius r_inlet) entering the
71 * side wall of the chamber from +x and -x, whose jets impinge on the chamber
72 * axis. The mesh is datumed so that the common axis of the two inlet pipes
73 * lies on the z = 0 plane (the impingement plane).
74 *
75 * How the inlets are connected to the chamber
76 * --------------------------------------------
77 * A round pipe entering the curved wall of a larger cylinder is a saddle
78 * intersection that cannot be produced conformingly by merging library
79 * primitives (a naive merge leaves the pipes floating against the wall). The
80 * inlet pipes are therefore grown out of the chamber wall itself:
81 * 1. The vessel (chamber + dome + reduction + outlet) is built as one
82 * conforming triangulation and refined so the wall is finely resolved;
83 * 2. at each inlet location, the small patch of chamber-wall faces that falls
84 * inside the inlet footprint is selected;
85 * 3. that patch is extruded outward in +/- x to build the inlet pipe. Because
86 * the new pipe cells reuse the wall-patch vertices, the patch faces become
87 * interior faces shared between chamber and pipe -- the inlet opens into
88 * the chamber and the mesh stays watertight and conforming.
89 *
90 * Boundary IDs are assigned as follows:
91 * - 0: inlet 1 (+x),
92 * - 1: inlet 2 (-x),
93 * - 2: outlet,
94 * - 3: walls (everything else).
95 *
96 * Manifold IDs are assigned as follows:
97 * - 0: cylindrical about the z-axis (chamber, reduction, outlet laterals),
98 * - 1: spherical (hemispherical dome),
99 * - 2: cylindrical about the x-axis (both inlet pipes).
100 *
101 * @tparam dim The dimension of the mesh, must be 3.
102 * @tparam spacedim The dimension of the space, must be 3.
103 */
104template <int dim, int spacedim>
106{
107public:
108 /**
109 * @brief Constructor that parses the geometry dimensions from a
110 * colon-separated string.
111 *
112 * The eight geometric dimensions (all in metres) are, in order:
113 * R_chamber : r_inlet : r_outlet : H_chamber : L_cone : L_outlet :
114 * L_inlet : z_inlet
115 * An empty string keeps the default dimensions. The mesh discretisation is
116 * not exposed and stays hardcoded.
117 *
118 * @param[in] grid_arguments A colon-separated string with the geometry
119 * dimensions, or an empty string to use the defaults.
120 */
121 GridImpingingJetMixer(const std::string &grid_arguments);
122
123 /**
124 * @brief Generate the impinging-jet mixer mesh.
125 *
126 * @param[out] triangulation The triangulation to fill with the mesh.
127 */
128 void
129 make_grid(Triangulation<dim, spacedim> &triangulation);
130
131private:
132 /// Arguments used to generate the grid
133 std::string grid_arguments;
134
135 /// All geometry dimensions (SI units, metres), with their defaults. Populated
136 /// from the grid-argument string by the constructor when one is provided.
138};
139
140#endif
std::string grid_arguments
Arguments used to generate the grid.
GridImpingingJetMixer(const std::string &grid_arguments)
Constructor that parses the geometry dimensions from a colon-separated string.
void make_grid(Triangulation< dim, spacedim > &triangulation)
Generate the impinging-jet mixer mesh.
Geometry dimensions of the impinging-jet mixer (SI units, metres).
double z_inlet
inlet-axis height above the chamber floor
double z_cone_bottom() const
double R_chamber
mixing-chamber radius
double r_inlet
inlet-pipe radius
double L_cone
axial length of the conical reduction
double L_inlet
length of each inlet pipe
double z_chamber_top() const
double z_dome_center() const
double r_outlet
outlet-pipe radius
double H_chamber
chamber height (axial extent)
double z_outlet_bottom() const
double L_outlet
length of the straight outlet pipe