Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
parameters_cfd_dem.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) 2020-2026 The Lethe Authors
2// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
3
4#ifndef lethe_parameters_cfd_dem_h
5#define lethe_parameters_cfd_dem_h
6
8
9#include <deal.II/base/parameter_handler.h>
10#include <deal.II/base/parsed_function.h>
11
12using namespace dealii;
13
14/**
15 * @file parameters_cfd_dem.h
16 * @brief Parameter structures for CFD-DEM coupled simulations.
17 *
18 * This file defines the parameter classes and enumerations used to configure
19 * CFD-DEM coupled simulations in Lethe, including void fraction computation
20 * methods, drag models, drag coupling strategies, VANS model selection, and
21 * the main CFDDEM parameter structure.
22 */
23namespace Parameters
24{
25 /**
26 * @brief Method used to compute the void fraction field.
27 */
29 {
30 /// Void fraction prescribed by an analytical function.
32 /// Particle centered method.
34 /// Quadrature centered method.
36 /// Satellite point method (divided approach).
38 };
39
40 /**
41 * @brief Filter kernel used by the Quadrature-Centered Method (QCM) to weigh
42 * particle contributions onto the mesh.
43 *
44 * The characteristic length of the filter is taken from
45 * VoidFractionParameters::qcm_smoothing_length and
46 * VoidFractionParameters::qcm_sphere_equal_cell_volume, with the
47 * interpretation depending on the filter:
48 * - spherical: half of qcm_smoothing_length is the averaging-sphere radius.
49 * - gaussian: half of qcm_smoothing_length is the Gaussian standard
50 * deviation sigma. Note that the Gaussian has non-compact support; sigma
51 * should be small relative to the QCM neighbor-cell stencil reach to avoid
52 * silent truncation bias.
53 */
54 enum class QCMFilterType
55 {
56 /// Spherical indicator (heaviside) filter (default, original QCM).
58 /// Gaussian filter parametrised by a standard deviation sigma.
60 };
61
62 /**
63 * @brief Quadrature rule used for void fraction integration.
64 */
66 {
67 /// Gauss quadrature rule (default).
69 /// Gauss-Lobatto quadrature rule.
71 };
72
73 /**
74 * @brief Drag force model for particle-fluid interaction in CFD-DEM.
75 */
76 enum class DragModel
77 {
78 /// Di Felice
80 /// Rong
82 /// Dallavalle - Valid only for dilute flows
84 /// Koch-Hill
86 /// Beetstra
88 /// Gidaspow
90 };
91
92
93 /**
94 * @enum DragCoupling
95 * @brief Defines the numerical coupling strategy used for drag force computation between fluid and particles.
96 *
97 * This enumeration specifies how the drag interaction term is treated in time
98 * integration schemes for coupled CFD-DEM or multiphase simulations. The
99 * choice of coupling affects both stability and computational cost. The
100 * fully_implicit and fully_explicit schemes are named this way since explicit
101 * is a reserved keyword in C++. Thus, we use fully_implicit and
102 * fully_explicit to ensure a coherent terminology.
103 *
104 * - **fully_implicit**:
105 * The drag force is evaluated using the current (implicit) fluid
106 * velocities and previous (explicit) particle velocity. The resulting
107 * drag is applied to both the particles and the fluid.
108 * Provides maximum stability, but requires more Newton iterations.
109 *
110 * - **semi_implicit**:
111 * The drag force on the particles is computed using the previous velocities
112 * of both the particles and the fluid. When transferring momentum to the
113 * fluid, the previous fluid velocity is used to evaluate the momentum
114 * transfer coefficient, while the current fluid velocity is used to
115 * calculate relative velocity between the particle and the fluid. This
116 * provides extensive stability, but for larger time step may lead to a
117 * slight violation of Newton's third law since the drag applied on the
118 * fluid is not strictly equal to the drag applied to the particles.
119 *
120 * - **fully_explicit**:
121 * The drag is evaluated entirely using known quantities from the previous
122 * time step. The outcome conditionally stable and may require very small
123 * coupling time step when the density of the fluid is much lower than the
124 * density of the particles
125 *
126 */
127 enum class DragCoupling
128 {
129 /// Fully implicit drag coupling
131 /// Semi-implicit drag coupling
133 /// Explicit drag coupling
135 };
136
137
138 /**
139 * @brief Volume-Averaged Navier-Stokes (VANS) model formulation.
140 */
141 enum class VANSModel
142 {
143 /// Model A: volume-averaged continuity and momentum equations.
145 /// Model B: alternative VANS formulation.
147 };
148
149
150 /**
151 * @brief Parameters controlling the void fraction computation in CFD-DEM
152 * simulations.
153 *
154 * This class stores the method, quadrature settings, and auxiliary parameters
155 * used to compute the void fraction field from the particle distribution.
156 *
157 * @tparam dim Number of spatial dimensions.
158 */
159 template <int dim>
161 {
162 public:
166
167 /**
168 * @brief Default destructor.
169 */
170 virtual ~VoidFractionParameters() = default;
171
172 /**
173 * @brief Declare the parameters in the parameter handler.
174 *
175 * @param[in,out] prm The parameter handler object.
176 */
177 virtual void
178 declare_parameters(ParameterHandler &prm);
179
180 /**
181 * @brief Parse the parameters from the parameter handler.
182 *
183 * @param[in] prm The parameter handler object.
184 */
185 virtual void
186 parse_parameters(ParameterHandler &prm);
187
188 public:
189 /// Void fraction computation method.
191
192 /// Analytical void fraction function (used when mode is function).
193 Functions::ParsedFunction<dim> void_fraction;
194
195 /// Read particle data from a DEM simulation checkpoint.
196 bool read_dem = false;
197
198 /// File name of the DEM simulation checkpoint.
199 std::string dem_file_name = "dem";
200
201 /// Smoothing length for L2 projection of the void fraction.
202 double l2_smoothing_length = 0.001;
203
204 /// Refinement factor applied to the particle radius for void fraction.
206
207 /// Smoothing length used in the quadrature centered method. For the
208 /// spherical filter, half of this value is the averaging-sphere radius;
209 /// for the gaussian filter, half of this value is the standard deviation
210 /// sigma.
212
213 /// Use a sphere volume equal to the cell volume in QCM.
215
216 /// Filter kernel used by the QCM to weigh particle contributions onto the
217 /// mesh. The characteristic length of the filter is taken from
218 /// qcm_smoothing_length (and qcm_sphere_equal_cell_volume when no length
219 /// is set). For spherical, the length is the averaging-sphere radius. For
220 /// gaussian, the length is the standard deviation sigma.
222
223 /// Quadrature rule used for void fraction integration.
226
227 /// Number of quadrature points per cell used for void fraction integration.
228 unsigned int n_quadrature_points = 0;
229
230 /// Project particle velocity onto the fluid mesh.
232
233 /// Output QCM quadrature points and filter characteristics.
234 bool output_qcm = false;
235 };
236
237 /**
238 * @brief Parameters for the CFD-DEM coupled solver.
239 *
240 * This structure stores the coupling parameters, force model selections,
241 * and stabilization options used in CFD-DEM simulations.
242 */
243 struct CFDDEM
244 {
245 /// Enable grad-div stabilization.
246 bool grad_div = true;
247
248 /// Drag model used for particle-fluid interaction.
250
251 /// Numerical coupling strategy for drag force computation.
253
254 /// Volume-Averaged Navier-Stokes model formulation.
256
257 /// Method used to control the DEM sub iterations.
260
261 /// Frequency of DEM-CFD coupling (in DEM time steps).
262 unsigned int coupling_frequency = 100;
263
264 /// Fraction of rayleigh time. This is used for when the
265 /// DEMSubIterationLogic uses the Rayleigh time.
267
268 /// Enable drag force on particles.
269 bool drag_force = true;
270
271 /// Enable buoyancy force on particles.
272 bool buoyancy_force = true;
273
274 /// Enable shear force on particles.
275 bool shear_force = true;
276
277 /// Enable pressure gradient force on particles.
278 bool pressure_force = true;
279
280 /// Enable Saffman lift force on particles.
281 bool saffman_lift_force = false;
282
283 /// Enable Magnus lift force on particles.
284 bool magnus_lift_force = false;
285
286 /// Enable rotational viscous torque on particles.
288
289 /// Enable vortical viscous torque on particles.
291
292 /// Include the void fraction time derivative in the equations.
294
295 /// Use interpolated void fraction instead of cell-averaged values.
297
298 /// Stabilization constant for the void fraction equation.
299 double cstar = 1;
300
301 /// Enable implicit stabilization of the void fraction.
303
304 /// Enable output of particle statistics.
306
307 /// Project particle forces onto the fluid mesh.
309
310 /**
311 * @brief Declare the parameters in the parameter handler.
312 *
313 * @param[in,out] prm The parameter handler object.
314 */
315 static void
316 declare_parameters(ParameterHandler &prm);
317
318 /**
319 * @brief Parse the parameters from the parameter handler.
320 *
321 * @param[in] prm The parameter handler object.
322 */
323 void
324 parse_parameters(ParameterHandler &prm);
325 };
326} // namespace Parameters
327#endif
std::string dem_file_name
File name of the DEM simulation checkpoint.
virtual ~VoidFractionParameters()=default
Default destructor.
double l2_smoothing_length
Smoothing length for L2 projection of the void fraction.
VoidFractionMode mode
Void fraction computation method.
bool project_particle_velocity
Project particle velocity onto the fluid mesh.
virtual void parse_parameters(ParameterHandler &prm)
Parse the parameters from the parameter handler.
Functions::ParsedFunction< dim > void_fraction
Analytical void fraction function (used when mode is function).
bool read_dem
Read particle data from a DEM simulation checkpoint.
virtual void declare_parameters(ParameterHandler &prm)
Declare the parameters in the parameter handler.
unsigned int particle_refinement_factor
Refinement factor applied to the particle radius for void fraction.
bool output_qcm
Output QCM quadrature points and filter characteristics.
bool qcm_sphere_equal_cell_volume
Use a sphere volume equal to the cell volume in QCM.
VoidFractionQuadratureRule quadrature_rule
Quadrature rule used for void fraction integration.
unsigned int n_quadrature_points
Number of quadrature points per cell used for void fraction integration.
DEMSubIterationLogic
Type of iteration method for DEM sub simulation control.
@ fixed_number_of_iterations
Fixed number of DEM iterations per CFD time step.
VoidFractionQuadratureRule
Quadrature rule used for void fraction integration.
@ gauss
Gauss quadrature rule (default).
@ gauss_lobatto
Gauss-Lobatto quadrature rule.
VoidFractionMode
Method used to compute the void fraction field.
@ spm
Satellite point method (divided approach).
@ qcm
Quadrature centered method.
@ function
Void fraction prescribed by an analytical function.
@ pcm
Particle centered method.
QCMFilterType
Filter kernel used by the Quadrature-Centered Method (QCM) to weigh particle contributions onto the m...
@ gaussian
Gaussian filter parametrised by a standard deviation sigma.
@ spherical
Spherical indicator (heaviside) filter (default, original QCM).
VANSModel
Volume-Averaged Navier-Stokes (VANS) model formulation.
@ modelA
Model A: volume-averaged continuity and momentum equations.
@ modelB
Model B: alternative VANS formulation.
DragModel
Drag force model for particle-fluid interaction in CFD-DEM.
@ dallavalle
Dallavalle - Valid only for dilute flows.
DragCoupling
Defines the numerical coupling strategy used for drag force computation between fluid and particles.
@ semi_implicit
Semi-implicit drag coupling.
@ fully_implicit
Fully implicit drag coupling.
@ fully_explicit
Explicit drag coupling.
Parameters for the CFD-DEM coupled solver.
bool grad_div
Enable grad-div stabilization.
bool drag_force
Enable drag force on particles.
bool rotational_viscous_torque
Enable rotational viscous torque on particles.
static void declare_parameters(ParameterHandler &prm)
Declare the parameters in the parameter handler.
bool saffman_lift_force
Enable Saffman lift force on particles.
void parse_parameters(ParameterHandler &prm)
Parse the parameters from the parameter handler.
double cstar
Stabilization constant for the void fraction equation.
bool shear_force
Enable shear force on particles.
bool project_particle_forces
Project particle forces onto the fluid mesh.
bool buoyancy_force
Enable buoyancy force on particles.
bool particle_statistics
Enable output of particle statistics.
bool vortical_viscous_torque
Enable vortical viscous torque on particles.
bool interpolated_void_fraction
Use interpolated void fraction instead of cell-averaged values.
VANSModel vans_model
Volume-Averaged Navier-Stokes model formulation.
bool implicit_stabilization
Enable implicit stabilization of the void fraction.
SubSimulationControlDEM::DEMSubIterationLogic dem_iteration_control
Method used to control the DEM sub iterations.
bool pressure_force
Enable pressure gradient force on particles.
unsigned int coupling_frequency
Frequency of DEM-CFD coupling (in DEM time steps).
DragModel drag_model
Drag model used for particle-fluid interaction.
DragCoupling drag_coupling
Numerical coupling strategy for drag force computation.
bool magnus_lift_force
Enable Magnus lift force on particles.
bool void_fraction_time_derivative
Include the void fraction time derivative in the equations.
Controls smaller simulation blocks within simulations.