7#include <deal.II/base/exceptions.h>
15 deprecated_quadrature_rule_names = {
26 deprecated_dem_iteration_control_names = {
27 {
"number of iterations",
28 SubSimulationControlDEM::DEMSubIterationLogic::
29 fixed_number_of_iterations},
30 {
"fraction of rayleigh time",
31 SubSimulationControlDEM::DEMSubIterationLogic::
32 fixed_fraction_of_rayleigh_time_step}};
39 prm.enter_subsection(
"void fraction");
44 "Choose the method for the calculation of the void fraction.");
46 prm.enter_subsection(
"function");
48 prm.leave_subsection();
50 prm.declare_entry(
"read dem",
51 Patterns::Tools::Convert<bool>::to_string(
read_dem),
53 "Define particles using a DEM simulation results file.");
55 prm.declare_entry(
"dem file name",
58 "File output dem prefix");
60 prm.declare_entry(
"l2 smoothing length",
61 Patterns::Tools::Convert<double>::to_string(
64 "The smoothing length for void fraction L2 projection");
67 "particle refinement factor",
68 Patterns::Tools::Convert<unsigned int>::to_string(
71 "The refinement factor used to calculate the number of pseudo-particles in the satellite point method");
74 "qcm smoothing length",
77 "The smoothing length of the QCM filter. With the spherical filter, half of this value is the averaging-sphere radius; with the gaussian filter, half of this value is the standard deviation sigma.");
80 "qcm sphere equal cell volume",
83 "Specify whether the virtual sphere has the same volume as the mesh element");
89 "Filter kernel used by the QCM to weigh particle contributions. With 'spherical' (default), half of 'qcm smoothing length' is the averaging-sphere radius. With 'gaussian', half of 'qcm smoothing length' is the standard deviation sigma of the Gaussian; sigma should be small compared to the QCM neighbor-cell stencil reach to avoid silent truncation bias.");
95 "Choose which quadrature rule to follow when distributing quadrature points for the QCM void fraction scheme.",
96 deprecated_quadrature_rule_names);
99 "n quadrature points",
102 "Number of quadrature points per cell used in the QCM void fraction scheme");
105 "project particle velocity",
108 "Specify whether the particle velocity is projected using QCM");
112 Patterns::Tools::Convert<bool>::to_string(
output_qcm),
114 "Output QCM quadrature points and QCM filter characteristics");
116 prm.leave_subsection();
123 prm.enter_subsection(
"void fraction");
125 prm.enter_subsection(
"function");
127 prm.leave_subsection();
129 read_dem = prm.get_bool(
"read dem");
140 prm.get(
"quadrature rule"),
141 deprecated_quadrature_rule_names,
153 "The output of QCM quadrature points is only available when the void fraction mode is set to 'qcm'."));
155 prm.leave_subsection();
162 prm.enter_subsection(
"cfd-dem");
163 prm.declare_entry(
"grad div",
164 Patterns::Tools::Convert<bool>::to_string(
167 "Choose whether or not to apply grad_div stabilization");
168 prm.declare_entry(
"void fraction time derivative",
169 Patterns::Tools::Convert<bool>::to_string(
172 "Choose whether or not to implement d(epsilon)/dt ");
174 "interpolated void fraction",
175 Patterns::Tools::Convert<bool>::to_string(
178 "Choose whether the void fraction is the one of the cell or the one interpolated at the particle position.");
179 prm.declare_entry(
"drag force",
180 Patterns::Tools::Convert<bool>::to_string(
183 "Choose whether or not to apply drag force");
184 prm.declare_entry(
"buoyancy force",
185 Patterns::Tools::Convert<bool>::to_string(
188 "Choose whether or not to apply buoyancy force");
189 prm.declare_entry(
"shear force",
190 Patterns::Tools::Convert<bool>::to_string(
193 "Choose whether or not to apply shear force");
194 prm.declare_entry(
"pressure force",
195 Patterns::Tools::Convert<bool>::to_string(
198 "Choose whether or not to apply pressure force");
199 prm.declare_entry(
"saffman lift force",
200 Patterns::Tools::Convert<bool>::to_string(
203 "Choose whether or not to apply Saffman-Mei lift force");
204 prm.declare_entry(
"magnus lift force",
205 Patterns::Tools::Convert<bool>::to_string(
208 "Choose whether or not to apply Magnus lift force");
210 "rotational viscous torque",
211 Patterns::Tools::Convert<bool>::to_string(
214 "Choose whether or not to apply rotational viscous torque on particles");
216 "vortical viscous torque",
217 Patterns::Tools::Convert<bool>::to_string(
220 "Choose whether or not to apply vortical viscous torque on particles");
225 "The drag model used to determine the drag coefficient.");
228 "dem iteration control",
230 "The strategy used to control the DEM iterations in CFD-DEM simulations.",
231 deprecated_dem_iteration_control_names);
232 prm.declare_entry(
"coupling frequency",
233 Patterns::Tools::Convert<unsigned int>::to_string(
235 Patterns::Integer(1),
236 "dem-cfd coupling frequency");
238 "fraction rayleigh time",
239 Patterns::Tools::Convert<double>::to_string(
241 Patterns::Double(0., 1.),
242 "Fraction of Rayleigh time used to control the DEM iterations.");
246 "The volume averaged Navier Stokes model to be solved.");
248 "grad-div length scale",
249 Patterns::Tools::Convert<double>::to_string(defaults.
cstar),
251 "Constant cs for the calculation of the grad-div stabilization (gamma = kinematic_viscosity + cs * velocity)");
253 "implicit stabilization",
254 Patterns::Tools::Convert<bool>::to_string(
257 "Choose whether or not to use implicit or explicit stabilization");
260 "particle statistics",
263 "Outputs statistics about the particles such as their total kinetic energy, angular momentum, etc.");
269 "Formulation for the drag force. The default value is semi_implicit, which represents the legacy coupling method.",
270 deprecated_drag_coupling_names);
273 "project particle forces",
274 Patterns::Tools::Convert<bool>::to_string(
277 "In the VANS solver, specify whether the two-way coupling forces, including the drag, are calculated by projecting the forces acting on the particles onto the fluid grid using the QCM filter.");
279 prm.leave_subsection();
285 prm.enter_subsection(
"cfd-dem");
286 grad_div = prm.get_bool(
"grad div");
288 prm.get_bool(
"void fraction time derivative");
300 cstar = prm.get_double(
"grad-div length scale");
307 prm.get(
"dem iteration control"),
308 deprecated_dem_iteration_control_names,
309 "dem iteration control");
315 deprecated_drag_coupling_names,
319 prm.leave_subsection();
Parameters controlling the void fraction computation in CFD-DEM simulations.
std::string dem_file_name
File name of the DEM simulation checkpoint.
double l2_smoothing_length
Smoothing length for L2 projection of the void fraction.
QCMFilterType qcm_filter_type
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.
double qcm_smoothing_length
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.
std::vector< std::pair< std::string, EnumType > > DeprecatedEnumNames
Deprecated strings of an enum parameter, each paired with the enumerator it stands for....
EnumType string_to_enum(const std::string &name)
Return the enumerator whose identifier is name, e.g. to parse the value of a parameter entry into its...
void declare_enum_entry(ParameterHandler &prm, const std::string &entry_name, const EnumType default_value, const std::string &description, const DeprecatedEnumNames< EnumType > &deprecated_names={}, const std::vector< EnumType > &allowed_values={})
Declare a parameter entry whose value is an enumerator. The default value, the accepted values and th...
@ gauss_lobatto
Gauss-Lobatto quadrature rule.
@ qcm
Quadrature centered method.
@ semi_implicit
Semi-implicit drag coupling.
@ fully_implicit
Fully implicit drag coupling.
@ fully_explicit
Explicit drag coupling.
Parameter structures for CFD-DEM coupled simulations.
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.
double fraction_of_rayleigh_time
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.