Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
parameters_lagrangian.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/**
5 * @file parameters_lagrangian.h
6 * @brief Parameter structures for Lagrangian (DEM) particle simulations.
7 *
8 * This file defines the parameter classes and enumerations used to configure
9 * Lagrangian particle simulations in Lethe, including contact force models,
10 * particle physical properties, insertion methods, model parameters,
11 * floating walls, boundary conditions, grid motion, and post-processing.
12 */
13
14#ifndef lethe_parameters_lagrangian_h
15#define lethe_parameters_lagrangian_h
16
17#include <core/parameters.h>
19
20#include <deal.II/base/parameter_handler.h>
21
22#include <map>
23#include <set>
24#include <string>
25
26using namespace dealii;
27namespace Parameters
28{
29 namespace Lagrangian
30 {
31 /**
32 * @brief Contact force model for particle-particle interactions.
33 */
34 enum class ParticleParticleContactForceModel : std::uint8_t
35 {
36 /// Linear model
38 /// Hertz-Mindlin model with a limitation on tangential force
40 /// Hertz-Mindlin model with a limitation on tangential overlap
42 /// Pure Hertz model
44 /// Hertz model with Johnson-Kendall-Roberts cohesive force
46 /// Derjaguin-Muller-Toporov model
48 /// Shift collision model. This model shifts the particles using their
49 /// overlap. It is only used for the packed insertion method and does not
50 /// constitute a real collision model.
52 };
53
54 /**
55 * @brief Contact force model for particle-wall interactions.
56 */
57 enum class ParticleWallContactForceModel : std::uint8_t
58 {
59 /// Linear model
61 /// Non-linear force model that corresponds to a Hertz-Mindlin with
62 /// limitation on tangential overlap
64 /// Johnson-Kendall-Roberts model
66 /// Derjaguin-Muller-Toporov model
68 /// Shift collision model. This model shifts the particles using their
69 /// overlap. It is only used for the packed insertion method and does not
70 /// constitute a real collision model.
72 };
73
74 /**
75 * @brief Method used to compute the rolling resistance torque.
76 */
77 enum RollingResistanceMethod : std::uint8_t
78 {
79 /// No rolling resistance
81 /// Constant rolling resistance
83 /// Viscous rolling resistance
85 /// Elastic-plastic spring-dashpot
87 };
88
89 /**
90 * @brief Type of particle size distribution.
91 */
92 enum class SizeDistributionType : std::uint8_t
93 {
94 /// Uniform distribution
96 /// Normal distribution
98 /// Log-normal distribution
100 /// Custom distribution
102 };
103
104 /**
105 * @brief Weighting basis for particle size distributions.
106 */
107 enum class DistributionWeightingType : std::uint8_t
108 {
109 /// Number-based distribution weighting
111 /// Volume-based distribution weighting
113 };
114
115 enum class ProbabilityFunctionType : std::uint8_t
116 {
117 /// Probability density function
119 /// Cumulative density function
121 };
122
123 /**
124 * @brief Physical properties of particles, walls, and interstitial gas
125 * for Lagrangian (DEM) simulations.
126 *
127 * This structure stores all material properties needed for contact force
128 * computations, including per-particle-type mechanical and thermal
129 * properties, wall properties, and interstitial gas properties.
130 */
132 {
133 public:
134 /// Gravitational acceleration vector.
135 Tensor<1, 3> g;
136
137 /// Number of particle types.
138 unsigned int particle_type_number = 1;
139
140 // Distribution type of each particle type (uniform, normal, lognormal,
141 // custom)
142 std::vector<SizeDistributionType> distribution_type;
143
144 /// Average diameter of each particle type
145 std::vector<double> particle_average_diameter;
146
147 /// Size standard deviation of each particle type
148 std::vector<double> particle_size_std;
149
150 /// Indicate if the custom distribution is read from file
152
153 /// Filename for the custom distribution for each particle type
154 std::vector<std::string> custom_distribution_filenames;
155
156 /// Custom distribution function type (PDF or CDF)
157 std::vector<ProbabilityFunctionType> custom_probability_function_type;
158
159 /// Indicates whether the diameter values generated from the custom
160 /// distribution are interpolated
162
163 /// List of diameters for the custom distribution for each particle type
164 std::vector<std::vector<double>> particle_custom_diameter;
165
166 /// Probability of each diameter value based on volume fraction for the
167 /// custom distribution for each particle type
168 std::vector<std::vector<double>> particle_custom_probability;
169
170 /// Distribution weighting type of each particle type (number-based,
171 /// volume-based)
172 std::vector<DistributionWeightingType> distribution_weighting_type;
173
174 /// Random seed for the size distribution.
175 std::vector<unsigned int> seed_for_distributions;
176
177 /// Minimum diameter cutoff for lognormal distribution.
178 std::vector<double> diameter_min_cutoff;
179
180 /// Maximum diameter cutoff for lognormal distribution.
181 std::vector<double> diameter_max_cutoff;
182
183 /// Number particles of each particle type
184 std::vector<int> number;
185
186 /// Density of each particle type
187 std::vector<double> density_particle;
188
189 /// Young's modulus of each particle type
190 std::vector<double> youngs_modulus_particle;
191
192 /// Poisson's ratio of each particle type
193 std::vector<double> poisson_ratio_particle;
194
195 /// Coefficients of restitution of each particle type
197
198 /// Friction coefficient of each particle type
199 std::vector<double> friction_coefficient_particle;
200
201 /// Rolling viscous damping coefficient of each particle type
203
204 /// Rolling friction coefficient of each particle type
206
207 /// Surface energy of each particle type
208 std::vector<double> surface_energy_particle;
209
210 /// Hamaker constant of each particle type
211 std::vector<double> hamaker_constant_particle;
212
213 /// Thermal conductivity of each particle type
214 std::vector<double> thermal_conductivity_particle;
215
216 /// Specific heat of each particle type
217 std::vector<double> specific_heat_particle;
218
219 /// Microhardness of each particle type
220 std::vector<double> microhardness_particle;
221
222 /// Surface slope of each particle type
223 std::vector<double> surface_slope_particle;
224
225 /// Surface roughness of each particle type
226 std::vector<double> surface_roughness_particle;
227
228 /// Thermal accommodation coefficient of each particle type
230
231 /// Real Young's modulus of each particle type
232 std::vector<double> real_youngs_modulus_particle;
233
234 /// Young's modulus of the wall.
235 double youngs_modulus_wall = 1000000.;
236
237 /// Poisson's ratio of the wall.
238 double poisson_ratio_wall = 0.3;
239
240 /// Coefficient of restitution of the wall.
242
243 /// Friction coefficient of the wall.
245
246 /// Rolling friction coefficient of the wall.
248
249 /// Rolling viscous damping coefficient of the wall.
251
252 /// Surface energy of the wall.
254
255 /// Hamaker constant of the wall.
256 double hamaker_constant_wall = 4.e-19;
257
258 /// Thermal conductivity of the wall.
260
261 /// Microhardness of the wall.
262 double microhardness_wall = 1.e9;
263
264 /// Surface slope of the wall.
265 double surface_slope_wall = 0.1;
266
267 /// Surface roughness of the wall.
268 double surface_roughness_wall = 1.e-10;
269
270 /// Thermal accommodation coefficient of the wall.
272
273 /// Real Young's modulus of the wall.
275
276 /// Thermal conductivity of the interstitial gas.
278
279 /// Specific heat of the interstitial gas.
280 double specific_heat_gas = 1000;
281
282 /// Dynamic viscosity of the interstitial gas.
283 double dynamic_viscosity_gas = 1.e-5;
284
285 /// Specific heats ratio of the interstitial gas.
287
288 /// Molecular mean free path of the interstitial gas.
290
291 /**
292 * @brief Declare the parameters in the parameter handler.
293 *
294 * @param[in,out] prm The parameter handler object.
295 */
296 void
297 declare_parameters(ParameterHandler &prm) const;
298
299 /**
300 * @brief Parse the parameters from the parameter handler.
301 *
302 * @param[in] prm The parameter handler object.
303 */
304 void
305 parse_parameters(ParameterHandler &prm);
306
307 /**
308 * @brief Declare default parameter entries for a single particle type.
309 *
310 * @param[in,out] prm The parameter handler object.
311 */
312 static void
313 declare_default_entry(ParameterHandler &prm);
314
315 /**
316 * @brief Parse the physical properties for a given particle type.
317 *
318 * @param[in] particle_type Index of the particle type to parse.
319 * @param[in] prm The parameter handler object.
320 */
321 void
322 parse_particle_properties(const unsigned int &particle_type,
323 const ParameterHandler &prm);
324
325 private:
327
328 /**
329 * @brief initialize_containers - Initialize the containers
330 * used to store the particle size distribution and physical properties
331 * of each particle type.
332 *
333 * @param[in,out] dist_types Indicates the SizeDistributionType type.
334 * @param[in,out] p_average_diameter Average diameter.
335 * @param[in,out] p_size_std Diameter standard deviation for the
336 * normal and lognormal distributions.
337 * @param[in,out] custom_dist_read_from_file Indicates whether the
338 * diameter and probability values are stored in a separate file.
339 * @param[in,out] custom_dist_file_names Vector of filenames from which
340 * the custom distributions are read.
341 * @param[in,out] custom_function_type Indicates whether the values
342 * defining the custom distribution correspond to the PDF or the CDF.
343 * @param[in,out] custom_interpolation Indicates whether the diameter
344 * values are interpolated from the input values.
345 * @param[in,out] custom_diameter_values Lists of diameters for the custom
346 * distribution.
347 * @param[in,out] custom_probabilities_values Lists of probability values
348 * corresponding to each diameter value in the custom distribution.
349 * @param[in,out] distribution_weighting_basis_type Weighting basis for
350 * the PSD.
351 * @param[in,out] seed_for_dist Pseudo random seed for the PSD sampling.
352 * @param[in,out] dia_min_cutoff Minimal cutoff value when sampling a PSD.
353 * @param[in,out] dia_max_cutoff Maximal cutoff value when sampling a PSD.
354 * @param[in,out] p_number Number of particles.
355 * @param[in,out] p_density Density.
356 * @param[in,out] p_youngs_modulus Young's modulus.
357 * @param[in,out] p_poisson_ratio Poisson's ratio.
358 * @param[in,out] p_restitution_coefficient Coefficient of restitution.
359 * @param[in,out] p_friction_coefficient Sliding friction coefficient.
360 * @param[in,out] p_rolling_viscous_damping_coefficient Rolling viscous
361 * damping coefficient
362 * @param[in,out] p_rolling_friction_coefficient Rolling friction
363 * coefficient.
364 * @param[in,out] p_surface_energy Surface energy.
365 * @param[in,out] p_hamaker_constant Hamaker constant.
366 * @param[in,out] p_thermal_conductivity Thermal conductivity.
367 * @param[in,out] p_specific_heat Specific heat.
368 * @param[in,out] p_microhardness Microhardness.
369 * @param[in,out] p_surface_slope Surface slope.
370 * @param[in,out] p_surface_roughness Surface roughness.
371 * @param[in,out] p_thermal_accommodation Thermal accommodation
372 * coefficient.
373 * @param[in,out] p_real_youngs_modulus Real Young's modulus.
374 */
375 void
377 std::vector<SizeDistributionType> &dist_types,
378 std::vector<double> &p_average_diameter,
379 std::vector<double> &p_size_std,
380 std::vector<bool> &custom_dist_read_from_file,
381 std::vector<std::string> &custom_dist_file_names,
382 std::vector<ProbabilityFunctionType> &custom_function_type,
383 std::vector<bool> &custom_interpolation,
384 std::vector<std::vector<double>> &custom_diameter_values,
385 std::vector<std::vector<double>> &custom_probabilities_values,
386 std::vector<DistributionWeightingType>
387 &distribution_weighting_basis_type,
388 std::vector<unsigned int> &seed_for_dist,
389 std::vector<double> &dia_min_cutoff,
390 std::vector<double> &dia_max_cutoff,
391 std::vector<int> &p_number,
392 std::vector<double> &p_density,
393 std::vector<double> &p_youngs_modulus,
394 std::vector<double> &p_poisson_ratio,
395 std::vector<double> &p_restitution_coefficient,
396 std::vector<double> &p_friction_coefficient,
397 std::vector<double> &p_rolling_viscous_damping_coefficient,
398 std::vector<double> &p_rolling_friction_coefficient,
399 std::vector<double> &p_surface_energy,
400 std::vector<double> &p_hamaker_constant,
401 std::vector<double> &p_thermal_conductivity,
402 std::vector<double> &p_specific_heat,
403 std::vector<double> &p_microhardness,
404 std::vector<double> &p_surface_slope,
405 std::vector<double> &p_surface_roughness,
406 std::vector<double> &p_thermal_accommodation,
407 std::vector<double> &p_real_youngs_modulus) const;
408 };
409
410 /**
411 * @brief Parameters controlling particle insertion in DEM simulations.
412 *
413 * This class stores the insertion method, geometry, initial conditions,
414 * and scheduling parameters used to introduce particles into the domain.
415 * Four insertion methods are supported: file, list, plane, and volume.
416 *
417 * @tparam dim Number of spatial dimensions.
418 */
419 template <int dim>
421 {
422 public:
423 /**
424 * @brief Method used to insert particles.
425 */
427 {
428 /// Insertion from a file listing particles
430 /// Insertion from a list in the prm file
432 /// Insertion from a plane defined by a point and a normal
434 /// Insertion within a volume defined by a box
436 /// Insertion using the packed method
438 } insertion_method = InsertionMethod::volume; ///< Method used to insert
439 ///< particles
440
441 /// Number of particles inserted at each insertion step.
442 unsigned int inserted_this_step = 0;
443
444 /// Frequency of insertion (in time steps).
446
447 /// Enable removal of particles in a specified region.
449
450 /// First corner of the particle removal box.
452
453 /// Second corner of the particle removal box.
454 Point<3> clear_box_point_2{1., 1., 1.};
455
456 /// List of input files for the file insertion method.
457 std::vector<std::string> list_of_input_files{"particles.input"};
458
459 /// Normal vector of the insertion plane (plane method).
460 Tensor<1, 3> insertion_plane_normal_vector{{1., 0., 0.}};
461
462 /// Point on the insertion plane (plane method).
464
465 // Position and velocity components for the list insertion method.
466 std::vector<double> list_x{0.}, ///< x-position for list insertion.
467 list_y{0.}, ///< y-position for list insertion.
468 list_z{0.}, ///< z-position for list insertion.
469 list_vx{0.}, ///< x-velocity for list insertion.
470 list_vy{0.}, ///< y-velocity for list insertion.
471 list_vz{0.}, ///< z-velocity for list insertion.
472 list_wx{0.}, ///< x-angular velocity for list insertion.
473 list_wy{0.}, ///< y-angular velocity for list insertion.
474 list_wz{0.}, ///< z-angular velocity for list insertion.
475 list_d{-1.0}, ///< Diameter for list insertion.
476 list_T{0.}; ///< Temperature for list insertion
477
478 /// Direction sequence for particle insertion (1st, 2nd, 3rd).
479 std::vector<unsigned int> direction_sequence =
480 (dim == 2) ? std::vector<unsigned int>{0, 1} :
481 std::vector<unsigned int>{0, 1, 2};
482
483 /// First corner of the insertion box (volume method).
485
486 /// Second corner of the insertion box (volume method).
487 Point<3> insertion_box_point_2{1., 1., 1.};
488
489 /// Initial translational velocity of inserted particles.
490 Tensor<1, 3> initial_vel;
491
492 /// Initial angular velocity of inserted particles.
493 Tensor<1, 3> initial_omega;
494
495 /// Function returning the initial temperature of a particle based on
496 /// time or its position.
497 std::shared_ptr<Function<dim>> initial_temperature_function;
498
499 /// Minimum distance threshold between inserted particles.
501
502 /// Maximum random offset applied to insertion positions.
504
505 /// Random seed for particle insertion.
507
508 /// Function used to accept or reject point in the insertion box when
509 /// using the volume insertion.
510 std::shared_ptr<Function<dim>> insertion_acceptance_fct;
511
512 /**
513 * @brief Declare the parameters in the parameter handler.
514 *
515 * @param[in,out] prm The parameter handler object.
516 */
517 static void
518 declare_parameters(ParameterHandler &prm);
519
520 /**
521 * @brief Parse the parameters from the parameter handler.
522 *
523 * @param[in] prm The parameter handler object.
524 */
525 void
526 parse_parameters(ParameterHandler &prm);
527 };
528
529 /**
530 * @brief Numerical model parameters for DEM simulations.
531 *
532 * This class stores the contact detection, load balancing, force model
533 * selection, time integration, and sparse contact optimization parameters.
534 *
535 * @tparam dim Number of spatial dimensions.
536 */
537 template <int dim>
539 {
540 public:
541 /**
542 * @brief Load balancing strategy for parallel DEM simulations.
543 */
545 {
546 /// No load-balancing will be performed.
548 /// Perform load-balancing once.
550 /// Perform load-balancing at a given frequency.
552 /// Perform load-balancing when the computational load among processes
553 /// becomes too uneven.
555 /// Perform load-balancing in a similar manner to
556 /// LoadBalanceMethod::dynamic but considering also the mobility status
557 /// of the cells.
560 LoadBalanceMethod::none; ///< Load balancing
561 ///< strategy for parallel DEM simulations.
562
563 /// Load balance step (for single-step load balancing).
564 unsigned int load_balance_step = 100000;
565
566 /// Load balance frequency (in time steps).
567 unsigned int load_balance_frequency = 100000;
568
569 /// Load balance threshold (for dynamic load balancing).
571
572 /// Check frequency for dynamic load balancing.
574
575 /// Frequency of particle-particle and particle-wall contact detection.
577
578 /// Function returning the weight of a cell based on its barycenter
579 /// position.
580 std::shared_ptr<Function<dim>> cell_weight_function;
581
582 /// Particle weight used for load balancing.
583 unsigned int load_balance_particle_weight = 2000;
584
585 /// Factor applied to particle weight for active cells in load balancing
586 /// (only used with adaptive sparse contacts).
588
589 /// Factor applied to particle weight for inactive cells in load balancing
590 /// (only used with adaptive sparse contacts).
592
593 /// Safety factor for dynamic contact search.
595
596 /**
597 * @brief Contact detection method used in the simulation.
598 */
600 {
601 /// Carry-out contact detection at a constant frequency.
603 /// Carry-out contact detection when the maximum displacement of a
604 /// particle exceeds the smallest contact search criterion.
607 ContactDetectionMethod::dynamic; ///< Contact detection method used in
608 ///< the simulation.
609
610 /// Contact search neighborhood threshold (neighborhood diameter to
611 /// particle diameter ratio).
613
614 /// Cut-off threshold beyond which Van der Waals forces are ignored.
616
617 /// Particle-particle contact force model.
620
621 /// Particle-wall contact force model.
624
625 /// Rolling resistance torque method.
628
629 /// Model parameter for the EPSD rolling resistance model.
631
632 /**
633 * @brief Time integration method for particle motion.
634 */
636 {
637 /// Velocity Verlet second-order time integration scheme.
639 /// Explicit Euler first-order time integration scheme.
642 IntegrationMethod::velocity_verlet; ///< Time integration method for
643 ///< particle motion.
644
645 /// Solver type (DEM, CFD-DEM, or DEM multiphysics).
647
648 /// Enable sparse particle contacts to optimize performance.
650
651 /// Enable advection of particles using cell-averaged fluid velocity and
652 /// acceleration.
653 bool advect_particles = false;
654
655 /// Minimum granular temperature for cells where particle contacts are
656 /// evaluated.
658
659 /// Maximum solid fraction for cells where particle contacts are always
660 /// evaluated regardless of granular temperature.
662
663 /// Disable position integration for particles.
665
666 /**
667 * @brief Declare the parameters in the parameter handler.
668 *
669 * @param[in,out] prm The parameter handler object.
670 */
671 static void
672 declare_parameters(ParameterHandler &prm);
673
674 /**
675 * @brief Parse the parameters from the parameter handler.
676 *
677 * @param[in] prm The parameter handler object.
678 */
679 void
680 parse_parameters(ParameterHandler &prm);
681 };
682
683 /**
684 * @brief ForceTorqueOnWall - Defines the parameters for the
685 * force and torques calculation on boundaries of the domain.
686 */
687 template <int dim>
689 {
690 public:
691 /// Enable force and torque post-processing on wall boundaries.
693
694 /// Verbosity level for force and torque output.
697
698 /// Output frequency (in time steps).
699 unsigned int output_frequency = 1;
700
701 /// File name prefix for force and torque output.
702 std::string force_torque_output_name = "force";
703
704 /// Center of mass used for torque computation.
706
707 /**
708 * @brief Declare the parameters in the parameter handler.
709 *
710 * @param[in,out] prm The parameter handler object.
711 */
712 static void
713 declare_parameters(ParameterHandler &prm);
714
715 /**
716 * @brief Parse the parameters from the parameter handler.
717 *
718 * @param[in] prm The parameter handler object.
719 */
720 void
721 parse_parameters(ParameterHandler &prm);
722 };
723
724 /**
725 * @brief Parameters for floating walls in DEM simulations.
726 *
727 * Floating walls are planar boundaries that can be activated and
728 * deactivated at specified times during the simulation. Each wall
729 * is defined by a point on its surface and a normal vector.
730 *
731 * @tparam dim Number of spatial dimensions.
732 */
733 template <int dim>
735 {
736 public:
737 /// Number of floating walls.
738 unsigned int floating_walls_number = 0;
739
740 /// A point on each floating wall surface.
741 std::vector<Point<dim>> points_on_walls;
742
743 /// Outward normal vector of each floating wall.
744 std::vector<Tensor<1, dim>> floating_walls_normal_vectors;
745
746 /// Activation time of each floating wall.
747 std::vector<double> time_start;
748
749 /// Deactivation time of each floating wall.
750 std::vector<double> time_end;
751
752 /**
753 * @brief Declare the parameters in the parameter handler.
754 *
755 * @param[in,out] prm The parameter handler object.
756 */
757 void
758 declare_parameters(ParameterHandler &prm) const;
759
760 /**
761 * @brief Parse the parameters from the parameter handler.
762 *
763 * @param[in] prm The parameter handler object.
764 */
765 void
766 parse_parameters(ParameterHandler &prm);
767
768 /**
769 * @brief Declare default parameter entries for a single floating wall.
770 *
771 * @param[in,out] prm The parameter handler object.
772 */
773 static void
774 declare_default_entry(ParameterHandler &prm);
775
776 /**
777 * @brief Parse parameters for a single floating wall.
778 *
779 * @param[in] prm The parameter handler object.
780 */
781 void
782 parse_floating_wall(const ParameterHandler &prm);
783
784 private:
786 };
787
788
789 /**
790 * @brief Thermal boundary type of the grid in multiphysic DEM. It is used to define the thermal boundary condition of the walls in DEM simulations.
791 */
793 {
794 /// No heat flux through the wall.
796 /// Temperature imposed on the wall. It can vary in space and time.
798 };
799
800 /**
801 * @brief Boundary conditions for DEM simulations.
802 *
803 * This structure stores the motion parameters, the thermal parameters and
804 * the periodic boundary information for each boundary of the DEM domain. A
805 * boundary's type is encoded by which container holds it (see
806 * outlet_boundaries below); fixed walls are the default and are not stored
807 * in any container. For multi-physics simulations, each wall also has a
808 * thermal boundary type (adiabatic by default) and, if its temperature is
809 * imposed, a temperature function.
810 */
811 struct BCDEM
812 {
813 public:
814 /// Number of DEM boundary conditions.
816
817 /// Boundary ids designated as outlets. A boundary's DEM boundary
818 /// condition type is encoded by which container holds it: outlets here,
819 /// translational/rotational boundaries in the motion maps below, and
820 /// periodic boundaries in periodic_boundaries. Fixed walls (the default)
821 /// appear in none of these containers.
822 std::set<types::boundary_id> outlet_boundaries;
823
824 /// Translational velocity of each translational boundary, keyed by the
825 /// mesh boundary id. Only translational boundaries have an entry.
826 std::map<types::boundary_id, Tensor<1, 3>>
828
829 /// Rotational speed (rad/s) of each rotational boundary, keyed by the
830 /// mesh boundary id. Only rotational boundaries have an entry.
831 std::map<types::boundary_id, double> boundary_rotational_speed;
832
833 /// Rotational axis vector of each rotational boundary, keyed by the mesh
834 /// boundary id. Only rotational boundaries have an entry.
835 std::map<types::boundary_id, Tensor<1, 3>> boundary_rotational_vector;
836
837 /// Point on the rotational axis of each rotational boundary, keyed by the
838 /// mesh boundary id. Only rotational boundaries have an entry.
839 std::map<types::boundary_id, Point<3>> point_on_rotation_axis;
840
841 /// Type of thermal boundary condition of each wall, keyed by the mesh
842 /// boundary id. Only the walls (fixed_wall, translational and rotational
843 /// boundaries) declared in the DEM boundary conditions have an entry. It
844 /// is only used in multiphysic DEM. The boundaries without an entry are
845 /// adiabatic.
846 std::map<types::boundary_id, WallThermalBoundaryType>
848
849 /// Temperature function of each wall with an imposed temperature, keyed
850 /// by the mesh boundary id. It is evaluated at the particle-wall contact
851 /// points, so it can vary in space and time.
852 std::map<types::boundary_id, std::shared_ptr<Function<3>>>
854
855 /// Periodic boundary pairs, keyed by the principal periodic boundary id
856 /// (periodic id 0).
858
859 /**
860 * @brief Declare the parameters in the parameter handler.
861 *
862 * @param[in,out] prm The parameter handler object.
863 */
864 void
865 declare_parameters(ParameterHandler &prm) const;
866
867 /**
868 * @brief Parse the parameters from the parameter handler.
869 *
870 * @param[in] prm The parameter handler object.
871 */
872 void
873 parse_parameters(ParameterHandler &prm);
874
875 /**
876 * @brief Declare default parameter entries for a single boundary
877 * condition.
878 *
879 * @param[in,out] prm The parameter handler object.
880 *
881 * @param[in] default_boundary_id Default value of the boundary id. This
882 * corresponds to the number of the boundary condition subsection.
883 */
884 static void
885 declare_default_entry(ParameterHandler &prm,
886 const types::boundary_id default_boundary_id);
887
888 /**
889 * @brief Parse boundary condition parameters for a single boundary.
890 *
891 * @param[in] prm The parameter handler object.
892 */
893 void
894 parse_boundary_conditions(ParameterHandler &prm);
895
896 private:
897 /// Maximum number of boundary condition subsections declared in the
898 /// parameter handler.
899 static constexpr unsigned int max_number_of_dem_boundary_conditions = 10;
900 };
901
902 /**
903 * @brief Parameters for grid (mesh) motion in DEM simulations.
904 *
905 * This class defines the type and parameters of the grid motion, which
906 * can be translational, rotational or none.
907 *
908 * @tparam dim Number of spatial dimensions.
909 */
910 template <int dim>
912 {
913 public:
914 /**
915 * @brief Type of grid motion.
916 */
917 enum class MotionType
918 {
919 /// Translating grid at the velocity
920 /// GridMotion::grid_translational_velocity.
922 /// Rotating grid at the speed GridMotion::grid_rotational_speed around
923 /// the GridMotion::grid_rotational_axis.
925 /// Static grid.
927 } motion_type = MotionType::none; ///< Type of grid motion.
928
929 /// Translational velocity of the moving grid.
931
932 /// Rotational speed of the rotating grid (rad/s).
934
935 /// Rotational axis of the rotating grid (0=x, 1=y, 2=z).
936 unsigned int grid_rotational_axis = 0;
937
938 /**
939 * @brief Declare the parameters in the parameter handler.
940 *
941 * @param[in,out] prm The parameter handler object.
942 */
943 static void
944 declare_parameters(ParameterHandler &prm);
945
946 /**
947 * @brief Parse the parameters from the parameter handler.
948 *
949 * @param[in] prm The parameter handler object.
950 */
951 void
952 parse_parameters(ParameterHandler &prm);
953 };
954
955 /**
956 * @brief Lagrangian Postprocessing - Defines the parameters
957 * for the Lagrangian post-processing.
958 *
959 */
961 {
962 /// Enable Lagrangian post-processing.
964
965 /// Enable force chains visualization.
966 bool force_chains = false;
967
968 /// Enable logging of particle-wall contact statistics.
970
971 /// Log collisions with all walls (if false, only selected boundaries).
973
974 /// Boundary IDs of the walls for which collisions are logged.
976
977 /// Verbosity level for collision statistics output.
979
980 /// File name for exporting collision statistics (CSV format).
981 std::string collision_stats_file_name = "collision_statistics.csv";
982
983 /**
984 * @brief Declare the parameters in the parameter handler.
985 *
986 * @param[in,out] prm The parameter handler object.
987 */
988 static void
989 declare_parameters(ParameterHandler &prm);
990
991 /**
992 * @brief Parse the parameters from the parameter handler.
993 *
994 * @param[in] prm The parameter handler object.
995 */
996 void
997 parse_parameters(ParameterHandler &prm);
998 };
999
1000 /**
1001 * @brief Parameters for a floating grid in DEM simulations.
1002 *
1003 * A floating grid is an auxiliary mesh that can move independently of
1004 * the main triangulation, activated between specified start and end times.
1005 *
1006 * @tparam dim Number of spatial dimensions.
1007 */
1008 template <int dim>
1010 {
1011 public:
1012 /// Mesh parameters for the floating grid.
1014
1015 /// Motion parameters for the floating grid.
1017
1018 /// Activation time of the floating grid.
1019 double time_start = 0.;
1020
1021 /// Deactivation time of the floating grid.
1022 double time_end = 0.;
1023
1024 /**
1025 * @brief Declare the parameters in the parameter handler.
1026 *
1027 * @param[in,out] prm The parameter handler object.
1028 */
1029 void
1030 declare_parameters(ParameterHandler &prm);
1031
1032 /**
1033 * @brief Parse the parameters from the parameter handler.
1034 *
1035 * @param[in] prm The parameter handler object.
1036 */
1037 void
1038 parse_parameters(ParameterHandler &prm);
1039 };
1040
1041 /**
1042 * @brief Defines parameters used to construct particle
1043 * ray tracing class.
1044 */
1045 template <int dim>
1047 {
1048 /// Location of the first photon to be inserted.
1050
1051 /// Unit direction vectors along which photons are inserted relative to
1052 /// the starting point.
1053 std::vector<Tensor<1, 3>> insertion_directions_units_vector{
1054 Tensor<1, 3>{{1., 0., 0.}},
1055 Tensor<1, 3>{{0., 1., 0.}},
1056 Tensor<1, 3>{{0., 0., 1.}}};
1057
1058 /// Number of photons to insert along each direction.
1059 std::vector<unsigned int> n_photons_each_directions{1, 1, 1};
1060
1061 /// Spacing between consecutive photons along each direction (at zero
1062 /// offset).
1063 std::vector<double> step_between_photons_each_directions{1., 1., 1.};
1064
1065 /// Reference unit tensor defining the photon displacement direction.
1066 Tensor<1, 3> ref_displacement_tensor_unit{{0., 0., 1.}};
1067
1068 /// Maximum random offset applied to the photon insertion position.
1070
1071 /// Random seed for photon insertion position offset.
1073
1074 /// Maximum angular offset applied to the photon displacement direction.
1076
1077 /// Random seed for photon displacement angular offset.
1079
1080 /**
1081 * @brief Declare the parameters in the parameter handler.
1082 *
1083 * @param[in,out] prm The parameter handler object.
1084 */
1085 static void
1086 declare_parameters(ParameterHandler &prm);
1087
1088 /**
1089 * @brief Parse the parameters from the parameter handler.
1090 *
1091 * @param[in] prm The parameter handler object.
1092 */
1093 void
1094 parse_parameters(ParameterHandler &prm);
1095 };
1096
1097 } // namespace Lagrangian
1098} // namespace Parameters
1099#endif /* lethe_parameters_lagrangian_h */
Parameters for a floating grid in DEM simulations.
Parameters::Mesh< dim > mesh
Mesh parameters for the floating grid.
void declare_parameters(ParameterHandler &prm)
Declare the parameters in the parameter handler.
void parse_parameters(ParameterHandler &prm)
Parse the parameters from the parameter handler.
Parameters::Lagrangian::GridMotion< dim > motion
Motion parameters for the floating grid.
double time_start
Activation time of the floating grid.
double time_end
Deactivation time of the floating grid.
Parameters for floating walls in DEM simulations.
std::vector< double > time_end
Deactivation time of each floating wall.
static void declare_default_entry(ParameterHandler &prm)
Declare default parameter entries for a single floating wall.
std::vector< Point< dim > > points_on_walls
A point on each floating wall surface.
void parse_parameters(ParameterHandler &prm)
Parse the parameters from the parameter handler.
std::vector< Tensor< 1, dim > > floating_walls_normal_vectors
Outward normal vector of each floating wall.
void parse_floating_wall(const ParameterHandler &prm)
Parse parameters for a single floating wall.
void declare_parameters(ParameterHandler &prm) const
Declare the parameters in the parameter handler.
unsigned int floating_walls_number
Number of floating walls.
std::vector< double > time_start
Activation time of each floating wall.
ForceTorqueOnWall - Defines the parameters for the force and torques calculation on boundaries of the...
Parameters::Verbosity force_torque_verbosity
Verbosity level for force and torque output.
unsigned int output_frequency
Output frequency (in time steps).
Point< 3 > point_center_mass
Center of mass used for torque computation.
static void declare_parameters(ParameterHandler &prm)
Declare the parameters in the parameter handler.
void parse_parameters(ParameterHandler &prm)
Parse the parameters from the parameter handler.
std::string force_torque_output_name
File name prefix for force and torque output.
bool calculate_force_torque
Enable force and torque post-processing on wall boundaries.
Parameters for grid (mesh) motion in DEM simulations.
double grid_rotational_speed
Rotational speed of the rotating grid (rad/s).
unsigned int grid_rotational_axis
Rotational axis of the rotating grid (0=x, 1=y, 2=z).
enum Parameters::Lagrangian::GridMotion::MotionType motion_type
Type of grid motion.
void parse_parameters(ParameterHandler &prm)
Parse the parameters from the parameter handler.
Tensor< 1, dim > grid_translational_velocity
Translational velocity of the moving grid.
static void declare_parameters(ParameterHandler &prm)
Declare the parameters in the parameter handler.
Parameters controlling particle insertion in DEM simulations.
void parse_parameters(ParameterHandler &prm)
Parse the parameters from the parameter handler.
std::vector< double > list_vy
y-velocity for list insertion.
Point< 3 > insertion_box_point_1
First corner of the insertion box (volume method).
std::shared_ptr< Function< dim > > initial_temperature_function
std::vector< double > list_vx
x-velocity for list insertion.
std::shared_ptr< Function< dim > > insertion_acceptance_fct
Point< 3 > clear_box_point_1
First corner of the particle removal box.
std::vector< double > list_z
z-position for list insertion.
unsigned int inserted_this_step
Number of particles inserted at each insertion step.
std::vector< double > list_wz
z-angular velocity for list insertion.
Point< 3 > clear_box_point_2
Second corner of the particle removal box.
static void declare_parameters(ParameterHandler &prm)
Declare the parameters in the parameter handler.
std::vector< double > list_x
x-position for list insertion.
std::vector< double > list_T
Temperature for list insertion.
double insertion_maximum_offset
Maximum random offset applied to insertion positions.
Point< 3 > insertion_plane_point
Point on the insertion plane (plane method).
InsertionMethod
Method used to insert particles.
@ volume
Insertion within a volume defined by a box.
@ plane
Insertion from a plane defined by a point and a normal.
std::vector< double > list_wy
y-angular velocity for list insertion.
std::vector< double > list_vz
z-velocity for list insertion.
int insertion_frequency
Frequency of insertion (in time steps).
double distance_threshold
Minimum distance threshold between inserted particles.
std::vector< unsigned int > direction_sequence
Direction sequence for particle insertion (1st, 2nd, 3rd).
std::vector< double > list_y
y-position for list insertion.
Tensor< 1, 3 > initial_omega
Initial angular velocity of inserted particles.
std::vector< std::string > list_of_input_files
List of input files for the file insertion method.
bool removing_particles_in_region
Enable removal of particles in a specified region.
Tensor< 1, 3 > initial_vel
Initial translational velocity of inserted particles.
int seed_for_insertion
Random seed for particle insertion.
enum Parameters::Lagrangian::InsertionInfo::InsertionMethod insertion_method
Point< 3 > insertion_box_point_2
Second corner of the insertion box (volume method).
std::vector< double > list_wx
x-angular velocity for list insertion.
std::vector< double > list_d
Diameter for list insertion.
Tensor< 1, 3 > insertion_plane_normal_vector
Normal vector of the insertion plane (plane method).
Numerical model parameters for DEM simulations.
unsigned int dynamic_load_balance_check_frequency
Check frequency for dynamic load balancing.
double f_coefficient_epsd
Model parameter for the EPSD rolling resistance model.
std::shared_ptr< Function< dim > > cell_weight_function
enum Parameters::Lagrangian::ModelParameters::ContactDetectionMethod contact_detection_method
LoadBalanceMethod
Load balancing strategy for parallel DEM simulations.
@ frequent
Perform load-balancing at a given frequency.
DEM::SolverType solver_type
Solver type (DEM, CFD-DEM, or DEM multiphysics).
RollingResistanceMethod rolling_resistance_method
Rolling resistance torque method.
unsigned int load_balance_particle_weight
Particle weight used for load balancing.
IntegrationMethod
Time integration method for particle motion.
@ velocity_verlet
Velocity Verlet second-order time integration scheme.
@ explicit_euler
Explicit Euler first-order time integration scheme.
void parse_parameters(ParameterHandler &prm)
Parse the parameters from the parameter handler.
ContactDetectionMethod
Contact detection method used in the simulation.
enum Parameters::Lagrangian::ModelParameters::LoadBalanceMethod load_balance_method
double dynamic_contact_search_factor
Safety factor for dynamic contact search.
unsigned int contact_detection_frequency
Frequency of particle-particle and particle-wall contact detection.
enum Parameters::Lagrangian::ModelParameters::IntegrationMethod integration_method
bool disable_position_integration
Disable position integration for particles.
unsigned int load_balance_frequency
Load balance frequency (in time steps).
double dmt_cut_off_threshold
Cut-off threshold beyond which Van der Waals forces are ignored.
bool sparse_particle_contacts
Enable sparse particle contacts to optimize performance.
double load_balance_threshold
Load balance threshold (for dynamic load balancing).
ParticleParticleContactForceModel particle_particle_contact_force_model
Particle-particle contact force model.
ParticleWallContactForceModel particle_wall_contact_force_method
Particle-wall contact force model.
static void declare_parameters(ParameterHandler &prm)
Declare the parameters in the parameter handler.
unsigned int load_balance_step
Load balance step (for single-step load balancing).
Mesh - Parameters that control mesh reading and mesh generation.
SolverType
Identifies which physics is solved for the DEM particles.
ParticleParticleContactForceModel
Contact force model for particle-particle interactions.
@ hertz_JKR
Hertz model with Johnson-Kendall-Roberts cohesive force.
@ hertz_mindlin_limit_overlap
Hertz-Mindlin model with a limitation on tangential overlap.
@ hertz_mindlin_limit_force
Hertz-Mindlin model with a limitation on tangential force.
SizeDistributionType
Type of particle size distribution.
WallThermalBoundaryType
Thermal boundary type of the grid in multiphysic DEM. It is used to define the thermal boundary condi...
@ temperature
Temperature imposed on the wall. It can vary in space and time.
DistributionWeightingType
Weighting basis for particle size distributions.
@ volume_based
Volume-based distribution weighting.
@ number_based
Number-based distribution weighting.
ParticleWallContactForceModel
Contact force model for particle-wall interactions.
RollingResistanceMethod
Method used to compute the rolling resistance torque.
@ epsd
Elastic-plastic spring-dashpot.
@ viscous
Viscous rolling resistance.
@ constant
Constant rolling resistance.
@ none
No rolling resistance.
std::map< dealii::types::boundary_id, PeriodicBoundary > PeriodicBoundaries
The periodic boundary pairs of a simulation, keyed by the principal (first) boundary id of each pair.
Boundary conditions for DEM simulations.
void parse_boundary_conditions(ParameterHandler &prm)
Parse boundary condition parameters for a single boundary.
std::map< types::boundary_id, double > boundary_rotational_speed
void parse_parameters(ParameterHandler &prm)
Parse the parameters from the parameter handler.
std::map< types::boundary_id, Tensor< 1, 3 > > boundary_translational_velocity
void declare_parameters(ParameterHandler &prm) const
Declare the parameters in the parameter handler.
static void declare_default_entry(ParameterHandler &prm, const types::boundary_id default_boundary_id)
Declare default parameter entries for a single boundary condition.
std::set< types::boundary_id > outlet_boundaries
std::map< types::boundary_id, std::shared_ptr< Function< 3 > > > boundary_temperature
unsigned int number_of_dem_boundary_conditions
Number of DEM boundary conditions.
std::map< types::boundary_id, WallThermalBoundaryType > thermal_boundary_type
std::map< types::boundary_id, Tensor< 1, 3 > > boundary_rotational_vector
std::map< types::boundary_id, Point< 3 > > point_on_rotation_axis
static constexpr unsigned int max_number_of_dem_boundary_conditions
Physical properties of particles, walls, and interstitial gas for Lagrangian (DEM) simulations.
double specific_heats_ratio_gas
Specific heats ratio of the interstitial gas.
double molecular_mean_free_path_gas
Molecular mean free path of the interstitial gas.
std::vector< double > friction_coefficient_particle
Friction coefficient of each particle type.
double thermal_accommodation_wall
Thermal accommodation coefficient of the wall.
double dynamic_viscosity_gas
Dynamic viscosity of the interstitial gas.
void parse_parameters(ParameterHandler &prm)
Parse the parameters from the parameter handler.
std::vector< ProbabilityFunctionType > custom_probability_function_type
Custom distribution function type (PDF or CDF).
void parse_particle_properties(const unsigned int &particle_type, const ParameterHandler &prm)
Parse the physical properties for a given particle type.
std::vector< DistributionWeightingType > distribution_weighting_type
double thermal_conductivity_wall
Thermal conductivity of the wall.
Tensor< 1, 3 > g
Gravitational acceleration vector.
std::vector< double > rolling_friction_coefficient_particle
Rolling friction coefficient of each particle type.
std::vector< double > surface_energy_particle
Surface energy of each particle type.
std::vector< bool > custom_distribution_from_file
Indicate if the custom distribution is read from file.
double hamaker_constant_wall
Hamaker constant of the wall.
std::vector< double > youngs_modulus_particle
Young's modulus of each particle type.
std::vector< std::vector< double > > particle_custom_probability
std::vector< double > thermal_conductivity_particle
Thermal conductivity of each particle type.
std::vector< double > hamaker_constant_particle
Hamaker constant of each particle type.
std::vector< double > particle_size_std
Size standard deviation of each particle type.
std::vector< double > surface_roughness_particle
Surface roughness of each particle type.
void declare_parameters(ParameterHandler &prm) const
Declare the parameters in the parameter handler.
double real_youngs_modulus_wall
Real Young's modulus of the wall.
std::vector< double > specific_heat_particle
Specific heat of each particle type.
std::vector< double > diameter_min_cutoff
Minimum diameter cutoff for lognormal distribution.
double friction_coefficient_wall
Friction coefficient of the wall.
std::vector< double > rolling_viscous_damping_coefficient_particle
Rolling viscous damping coefficient of each particle type.
std::vector< double > real_youngs_modulus_particle
Real Young's modulus of each particle type.
void initialize_containers(std::vector< SizeDistributionType > &dist_types, std::vector< double > &p_average_diameter, std::vector< double > &p_size_std, std::vector< bool > &custom_dist_read_from_file, std::vector< std::string > &custom_dist_file_names, std::vector< ProbabilityFunctionType > &custom_function_type, std::vector< bool > &custom_interpolation, std::vector< std::vector< double > > &custom_diameter_values, std::vector< std::vector< double > > &custom_probabilities_values, std::vector< DistributionWeightingType > &distribution_weighting_basis_type, std::vector< unsigned int > &seed_for_dist, std::vector< double > &dia_min_cutoff, std::vector< double > &dia_max_cutoff, std::vector< int > &p_number, std::vector< double > &p_density, std::vector< double > &p_youngs_modulus, std::vector< double > &p_poisson_ratio, std::vector< double > &p_restitution_coefficient, std::vector< double > &p_friction_coefficient, std::vector< double > &p_rolling_viscous_damping_coefficient, std::vector< double > &p_rolling_friction_coefficient, std::vector< double > &p_surface_energy, std::vector< double > &p_hamaker_constant, std::vector< double > &p_thermal_conductivity, std::vector< double > &p_specific_heat, std::vector< double > &p_microhardness, std::vector< double > &p_surface_slope, std::vector< double > &p_surface_roughness, std::vector< double > &p_thermal_accommodation, std::vector< double > &p_real_youngs_modulus) const
initialize_containers - Initialize the containers used to store the particle size distribution and ph...
std::vector< double > poisson_ratio_particle
Poisson's ratio of each particle type.
static void declare_default_entry(ParameterHandler &prm)
Declare default parameter entries for a single particle type.
std::vector< double > diameter_max_cutoff
Maximum diameter cutoff for lognormal distribution.
std::vector< std::string > custom_distribution_filenames
Filename for the custom distribution for each particle type.
std::vector< double > density_particle
Density of each particle type.
std::vector< double > surface_slope_particle
Surface slope of each particle type.
std::vector< std::vector< double > > particle_custom_diameter
List of diameters for the custom distribution for each particle type.
std::vector< double > particle_average_diameter
Average diameter of each particle type.
std::vector< double > microhardness_particle
Microhardness of each particle type.
unsigned int particle_type_number
Number of particle types.
double specific_heat_gas
Specific heat of the interstitial gas.
double rolling_friction_wall
Rolling friction coefficient of the wall.
std::vector< double > thermal_accommodation_particle
Thermal accommodation coefficient of each particle type.
double thermal_conductivity_gas
Thermal conductivity of the interstitial gas.
double rolling_viscous_damping_wall
Rolling viscous damping coefficient of the wall.
double restitution_coefficient_wall
Coefficient of restitution of the wall.
std::vector< unsigned int > seed_for_distributions
Random seed for the size distribution.
std::vector< double > restitution_coefficient_particle
Coefficients of restitution of each particle type.
std::vector< int > number
Number particles of each particle type.
double surface_roughness_wall
Surface roughness of the wall.
Lagrangian Postprocessing - Defines the parameters for the Lagrangian post-processing.
Parameters::Verbosity collision_verbosity
Verbosity level for collision statistics output.
static void declare_parameters(ParameterHandler &prm)
Declare the parameters in the parameter handler.
bool lagrangian_post_processing_enabled
Enable Lagrangian post-processing.
std::vector< int > particle_wall_collision_boundary_ids
Boundary IDs of the walls for which collisions are logged.
bool particle_wall_collision_statistics
Enable logging of particle-wall contact statistics.
std::string collision_stats_file_name
File name for exporting collision statistics (CSV format).
bool force_chains
Enable force chains visualization.
bool log_collisions_with_all_walls
Log collisions with all walls (if false, only selected boundaries).
void parse_parameters(ParameterHandler &prm)
Parse the parameters from the parameter handler.
Defines parameters used to construct particle ray tracing class.
double max_angular_offset
Maximum angular offset applied to the photon displacement direction.
unsigned int prn_seed_photon_displacement
Random seed for photon displacement angular offset.
static void declare_parameters(ParameterHandler &prm)
Declare the parameters in the parameter handler.
void parse_parameters(ParameterHandler &prm)
Parse the parameters from the parameter handler.
double max_insertion_offset
Maximum random offset applied to the photon insertion position.
std::vector< Tensor< 1, 3 > > insertion_directions_units_vector
std::vector< unsigned int > n_photons_each_directions
Number of photons to insert along each direction.
Point< 3 > starting_point
Location of the first photon to be inserted.
unsigned int prn_seed_photon_insertion
Random seed for photon insertion position offset.
Tensor< 1, 3 > ref_displacement_tensor_unit
Reference unit tensor defining the photon displacement direction.