Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
particle_wall_contact_force.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_particle_wall_contact_force_h
5#define lethe_particle_wall_contact_force_h
6
9#include <core/serial_solid.h>
10
11#include <dem/contact_info.h>
12#include <dem/data_containers.h>
17
18#include <deal.II/base/function.h>
19
20#include <boost/math/special_functions.hpp>
21
22#include <algorithm>
23#include <map>
24#include <memory>
25#include <vector>
26
27using namespace dealii;
28
29/**
30 * @brief Base class for the particle-wall contact force models
31 * This class does not implement any of the models, but ensures that
32 * an interface without template specialization is available. All the
33 * actual implementation of the models are carried out in the
34 * ParticleWallContactForce class which is templated by the contact model
35 * type.
36 * @tparam dim An integer that denotes the number of spatial dimensions.
37 * @tparam PropertiesIndex Index of the properties used within the ParticleHandler.
38 */
39template <int dim, typename PropertiesIndex>
41{
42public:
43 /**
44 * @brief Calculate the contact outcomes for particle-wall contacts
45 * using the contact pair information and physical properties.
46 *
47 * @param[in] particle_wall_pairs_in_contact Required information for the
48 * calculation of the particle-wall contact.
49 * @param[in] dt DEM time step.
50 * @param[out] contact_outcome Interaction outcomes.
51 */
52 virtual void
55 &particle_wall_pairs_in_contact,
56 const double dt,
58
59 /**
60 * @brief Calculate the contact outcomes for particle-solid objects contacts
61 * using the contact pair information and physical properties.
62 *
63 * @param[in] particle_floating_mesh_potentially_in_contact A container that
64 * stores the information of particle-floating mesh contact.
65 * @param[in] dt DEM time step.
66 * @param[in] solids Floating solids.
67 * @param[out] contact_outcome Interaction outcomes.
68 */
69 virtual void
72 dim>::particle_floating_mesh_potentially_in_contact
73 &particle_floating_mesh_potentially_in_contact,
74 const double dt,
75 const std::vector<std::shared_ptr<SerialSolid<dim - 1, dim>>> &solids,
77
78 /**
79 * @brief Return the number of contacts that occurred in the
80 * present pseudo-time step when using the packed insertion method.
81 */
82 unsigned int
84 {
85 return n_contacts;
86 }
87
88 /**
89 * @brief Reset the counter of number of contacts for the next pseudo-time step.
90 */
91 void
96
97protected:
98 unsigned int n_contacts = 0;
99};
100
101/**
102 * @brief Execute calculation of particle-wall contacts.
103 *
104 * @tparam dim The dimension of the problem.
105 * @tparam contact_model The particle-wall contact force model.
106 * @tparam rolling_friction_model The rolling resistance model.
107 */
108template <
109 int dim,
110 typename PropertiesIndex,
114 : public ParticleWallContactForceBase<dim, PropertiesIndex>
115{
116public:
118
119 virtual ~ParticleWallContactForce() = default;
120
121 /**
122 * @brief Calculate the contact outcomes for particle-wall contacts
123 * using the contact pair information and physical properties.
124 *
125 * @param[in] particle_wall_pairs_in_contact Required information for the
126 * calculation of the particle-wall contact.
127 * @param[in] dt DEM time step.
128 * @param[out] contact_outcome Interaction outcomes.
129 */
130 virtual void
133 &particle_wall_pairs_in_contact,
134 const double dt,
135 ParticleInteractionOutcomes<PropertiesIndex> &contact_outcome) override;
136
137 /**
138 * @brief Calculate the contact outcomes for particle-solid objects contacts
139 * using the contact pair information and physical properties.
140 *
141 * @param[in] particle_floating_mesh_potentially_in_contact A container that
142 * stores the information of particle-floating mesh contact.
143 * @param[in] dt DEM time step.
144 * @param[in] solids Floating solids.
145 * @param[out] contact_outcome Interaction outcomes.
146 */
147 virtual void
150 dim>::particle_floating_mesh_potentially_in_contact
151 &particle_floating_mesh_potentially_in_contact,
152 const double dt,
153 const std::vector<std::shared_ptr<SerialSolid<dim - 1, dim>>> &solids,
154 ParticleInteractionOutcomes<PropertiesIndex> &contact_outcome) override;
155
156protected:
157 /**
158 * @brief Update the contact pair information for contact calculations.
159 *
160 * @param[in,out] contact_info Contact information of a particle-wall pair.
161 * @param[out] tangential_relative_velocity Tangential relative velocity.
162 * @param[out] normal_relative_velocity_value Normal relative contact
163 * velocity value.
164 * @param[in] particle_location Location of particle in 3d.
165 * @param[in] particle_properties Properties of particle.
166 * @param[in] dt DEM time step.
167 */
168 inline void
170 Tensor<1, 3> &tangential_relative_velocity,
171 double &normal_relative_velocity_value,
172 const Point<3> &particle_location,
173 const ArrayView<const double> &particle_properties,
174 const double dt)
175 {
176 // i is the particle, j is the wall.
177 // There is a minus sign in front of the normal_vector to respect the
178 // convention i -> j
179 Tensor<1, 3> normal_vector = -contact_info.normal_vector;
180 const unsigned int boundary_id = contact_info.boundary_id;
181
182 Tensor<1, 3> particle_velocity{{particle_properties[PropertiesIndex::v_x],
183 particle_properties[PropertiesIndex::v_y],
184 particle_properties[PropertiesIndex::v_z]}};
185
186 Tensor<1, 3> particle_angular_velocity{
187 {particle_properties[PropertiesIndex::omega_x],
188 particle_properties[PropertiesIndex::omega_y],
189 particle_properties[PropertiesIndex::omega_z]}};
190
191 // Calculating approximation of the contact point using the normal vector
192 Point<3> contact_point =
193 particle_location +
194 0.5 * particle_properties[PropertiesIndex::dp] * normal_vector;
195
196 // Look up the boundary motion for this boundary. Boundaries without a
197 // translational or rotational DEM boundary condition simply have no entry
198 // in the maps, in which case the corresponding contribution is zero. The
199 // maps are looked up with find() rather than operator[] to avoid inserting
200 // entries during the contact force evaluation.
201 const auto translational_velocity_it =
202 this->boundary_translational_velocity_map.find(boundary_id);
203 const Tensor<1, 3> boundary_translational_velocity =
204 (translational_velocity_it !=
206 translational_velocity_it->second :
207 Tensor<1, 3>();
208
209 const auto rotational_speed_it =
210 this->boundary_rotational_speed_map.find(boundary_id);
211 const double boundary_rotational_speed =
212 (rotational_speed_it != this->boundary_rotational_speed_map.end()) ?
213 rotational_speed_it->second :
214 0.;
215
216 const auto rotational_vector_it =
217 this->boundary_rotational_vector.find(boundary_id);
218 const Tensor<1, 3> boundary_rotation =
219 (rotational_vector_it != this->boundary_rotational_vector.end()) ?
220 rotational_vector_it->second :
221 Tensor<1, 3>();
222
223 const auto rotation_point_it =
224 this->point_on_rotation_vector.find(boundary_id);
225 const Point<3> point_on_axis_of_rotation =
226 (rotation_point_it != this->point_on_rotation_vector.end()) ?
227 rotation_point_it->second :
228 Point<3>();
229
230 // Getting vector pointing from the contact point to the origin of the
231 // rotation axis
232 Tensor<1, 3> vector_to_rotating_axis =
233 contact_point - point_on_axis_of_rotation;
234
235 // Removing the rotating axis component of that vector
236 vector_to_rotating_axis =
237 vector_to_rotating_axis -
238 (vector_to_rotating_axis * boundary_rotation) * boundary_rotation;
239
240 // Defining relative contact velocity using the convention
241 // v_ij = v_j - v_i
242 Tensor<1, 3> contact_relative_velocity =
243 boundary_translational_velocity - particle_velocity +
244 cross_product_3d((-0.5 * particle_properties[PropertiesIndex::dp] *
245 particle_angular_velocity),
246 normal_vector) +
247 cross_product_3d(boundary_rotational_speed * boundary_rotation,
248 vector_to_rotating_axis);
249
250 // Calculating normal relative velocity
251 normal_relative_velocity_value = contact_relative_velocity * normal_vector;
252
253 // Calculating tangential relative velocity
254 tangential_relative_velocity =
255 contact_relative_velocity -
256 (normal_relative_velocity_value * normal_vector);
257
258 // Calculating new tangential_displacement
259 // Since this value is history-dependent, it needs the value at previous
260 // time step. This variable is the main reason that we have iteration over
261 // two different vectors (pairs_in_contact and contact_pair_candidates):
262 // tangential_displacement of the particles which were already in contact
263 // (pairs_in_contact) needs to be modified using its history, while the
264 // tangential_displacements of new particles are equal to zero.
265 contact_info.tangential_displacement += tangential_relative_velocity * dt;
266 }
267
268 /**
269 * @brief Update the contact pair information for particle-solid object contacts.
270 *
271 * @param[in,out] contact_info Contact information of a particle-wall pair.
272 * @param[out] tangential_relative_velocity Tangential relative velocity.
273 * @param[out] normal_relative_velocity_value Normal relative contact
274 * velocity value.
275 * @param[in] particle_properties Properties of particle.
276 * @param[in] dt DEM time step.
277 * @param[in] cut_cell_translational_velocity Translational velocity of the
278 * cut cell.
279 * @param[in] cut_cell_rotational_velocity Rotational velocity of the cut
280 * cell.
281 * @param[in] center_of_rotation_particle_distance Distance between the
282 * particle and the center of rotation of the floating mesh.
283 */
284 inline void
287 Tensor<1, 3> &tangential_relative_velocity,
288 double &normal_relative_velocity_value,
289 const ArrayView<const double> &particle_properties,
290 const double dt,
291 const Tensor<1, 3> &cut_cell_translational_velocity,
292 const Tensor<1, 3> &cut_cell_rotational_velocity,
293 const double center_of_rotation_particle_distance)
294 {
295 // i is the particle, j is the wall.
296 // we need to put a minus sign in front of the normal_vector to respect the
297 // convention (i -> j)
298 const Tensor<1, 3> normal_vector = -contact_info.normal_vector;
299
300 // Using velocity and angular velocity of particle as
301 // local vectors
302 Tensor<1, 3> particle_velocity{{particle_properties[PropertiesIndex::v_x],
303 particle_properties[PropertiesIndex::v_y],
304 particle_properties[PropertiesIndex::v_z]}};
305
306 Tensor<1, 3> particle_angular_velocity{
307 {particle_properties[PropertiesIndex::omega_x],
308 particle_properties[PropertiesIndex::omega_y],
309 particle_properties[PropertiesIndex::omega_z]}};
310
311 // Defining relative contact velocity
312 // v_ij = v_j - v_i
313 Tensor<1, 3> contact_relative_velocity =
314 cut_cell_translational_velocity - particle_velocity +
315 cross_product_3d((center_of_rotation_particle_distance *
316 cut_cell_rotational_velocity -
317 0.5 * particle_properties[PropertiesIndex::dp] *
318 particle_angular_velocity),
319 normal_vector);
320
321 // Calculation of normal relative velocity
322 normal_relative_velocity_value = contact_relative_velocity * normal_vector;
323
324 // Calculation of tangential relative velocity
325 tangential_relative_velocity =
326 contact_relative_velocity -
327 normal_relative_velocity_value * normal_vector;
328
329 // Calculate the new tangential_displacement
330 // Since this value is history-dependent, it needs the value at
331 // previous time step.
332 contact_info.tangential_displacement += tangential_relative_velocity * dt;
333 }
334
335 /**
336 * @brief This function is used to find the projection of vector_a on
337 * vector_b
338 * @param[in] vector_a A vector which is going to be projected on vector_b
339 * @param[in] vector_b The projection vector of vector_a
340 * @return The projection of vector_a on vector_b
341 */
342 static inline Tensor<1, 3>
343 find_projection(const Tensor<1, 3> &vector_a, const Tensor<1, 3> &vector_b)
344 {
345 Tensor<1, 3> vector_c;
346 vector_c = ((vector_a * vector_b) / (vector_b.norm_square())) * vector_b;
347
348 return vector_c;
349 }
350
351 /**
352 * @brief Get the 3d location of the particle.
353 *
354 * @param[in] particle The particle to get the location from.
355 * @return 3d location of particle.
356 */
357 inline Point<3>
358 get_location(const Particles::ParticleIterator<dim> &particle) &
359 {
360 if constexpr (dim == 3)
361 return particle->get_location();
362
363 if constexpr (dim == 2)
364 return point_nd_to_3d(particle->get_location());
365 }
366
367 /**
368 * @brief Calculate the particle-wall contact force and torque
369 * according to the contact model.
370 *
371 * @param[in,out] contact_info A container with the required
372 * information for calculation of the contact force for a particle-wall pair
373 * in contact.
374 * @param[in] tangential_relative_velocity Tangential relative velocity.
375 * @param[in] normal_relative_velocity_value Normal relative velocity value.
376 * @param[in] normal_overlap Contact normal overlap.
377 * @param[in] dt DEM time step.
378 * @param[in] particle_properties Properties of particle.
379 * @param[out] normal_force Contact normal force.
380 * @param[out] tangential_force Contact tangential force.
381 * @param[out] tangential_torque Contact tangential torque.
382 * @param[out] rolling_resistance_torque Contact rolling resistance torque.
383 */
384 inline void
386 const Tensor<1, 3> &tangential_relative_velocity,
387 const double normal_relative_velocity_value,
388 const double normal_overlap,
389 const double dt,
390 const ArrayView<const double> &particle_properties,
391 Tensor<1, 3> &normal_force,
392 Tensor<1, 3> &tangential_force,
393 Tensor<1, 3> &tangential_torque,
394 Tensor<1, 3> &rolling_resistance_torque)
395 {
396 using namespace Parameters::Lagrangian;
397
398 if constexpr (contact_model == ParticleWallContactForceModel::linear)
399 {
400 calculate_linear_contact(contact_info,
401 tangential_relative_velocity,
402 normal_relative_velocity_value,
403 normal_overlap,
404 dt,
405 particle_properties,
406 normal_force,
407 tangential_force,
408 tangential_torque,
409 rolling_resistance_torque);
410 }
411
412 if constexpr (contact_model == ParticleWallContactForceModel::nonlinear)
413 {
414 calculate_nonlinear_contact(contact_info,
415 tangential_relative_velocity,
416 normal_relative_velocity_value,
417 normal_overlap,
418 dt,
419 particle_properties,
420 normal_force,
421 tangential_force,
422 tangential_torque,
423 rolling_resistance_torque);
424 }
425
426 if constexpr (contact_model == ParticleWallContactForceModel::JKR)
427 {
428 calculate_JKR_contact(contact_info,
429 tangential_relative_velocity,
430 normal_relative_velocity_value,
431 normal_overlap,
432 dt,
433 particle_properties,
434 normal_force,
435 tangential_force,
436 tangential_torque,
437 rolling_resistance_torque);
438 }
439
440 if constexpr (contact_model == ParticleWallContactForceModel::DMT)
441 {
442 calculate_DMT_contact(contact_info,
443 tangential_relative_velocity,
444 normal_relative_velocity_value,
445 normal_overlap,
446 dt,
447 particle_properties,
448 normal_force,
449 tangential_force,
450 tangential_torque,
451 rolling_resistance_torque);
452 }
453
454 if constexpr (contact_model == ParticleWallContactForceModel::shift)
455 {
456 // The shift model returns a displacement instead of a force. It goes
457 // through the normal force so that it is accumulated on the particle
458 // like a force.
459 calculate_shift_displacement(normal_overlap,
460 contact_info,
461 particle_properties,
462 normal_force);
463 }
464 }
465
466 /**
467 * @brief Calculate the minimum overlap at which particle-wall forces are
468 * computed. This function is useful for non-contact cohesive force models
469 * such as the DMT.
470 *
471 * @return minimum overlap for the force calculation.
472 */
473 inline double
475 {
476 if constexpr (contact_model ==
478 {
479 // We are looking for the maximum Hamaker constant and minimum surface
480 // energy to compute the biggest distance at which force will be
481 // computed. In other words, we are maximising the delta_0.
482 // This way, force_calculation_threshold_distance can be set
483 // to const variable, which should make the code faster.
484 const double max_effective_hamaker_constant =
485 *(std::ranges::max_element(this->effective_hamaker_constant));
486 const double min_effective_surface_energy =
487 *(std::ranges::min_element(this->effective_surface_energy));
488
489 // Return the critical delta_0. We put a minus sign in front of since a
490 // positive overlap means that there is contact.
491 return -std::sqrt(
492 max_effective_hamaker_constant /
493 (12. * M_PI * min_effective_surface_energy * dmt_cut_off_threshold));
494 }
495 return 0.;
496 }
497
498private:
499 /**
500 * @brief Apply the calculated force and torque on the
501 * particle in contact.
502 *
503 * @param[in] normal_force Contact normal force.
504 * @param[in] tangential_force Contact tangential force.
505 * @param[in] tangential_torque Contact torque induced by the tangential
506 * force.
507 * @param[in] rolling_resistance_torque Contact rolling resistance torque.
508 * @param[in,out] particle_torque Torque acting on particle.
509 * @param[in,out] particle_force Force acting on particle.
510 */
511 inline void
512 apply_force_and_torque(const Tensor<1, 3> &normal_force,
513 const Tensor<1, 3> &tangential_force,
514 const Tensor<1, 3> &tangential_torque,
515 const Tensor<1, 3> &rolling_resistance_torque,
516 Tensor<1, 3> &particle_torque,
517 Tensor<1, 3> &particle_force)
518 {
519 // Calculating total force
520 Tensor<1, 3> total_force = normal_force + tangential_force;
521
522 // Updating force and torque on particle in the particle handler
523 // Since the force was calculated on the wall, we use -= operator
524 particle_force -= total_force;
525 // Since the torque was directly calculated on the particle, we use +=
526 // operator
527 particle_torque += tangential_torque + rolling_resistance_torque;
528 }
529
530 /**
531 * @brief Calculate the rolling resistance torque acting on the particle
532 * according to the rolling resistance model.
533 *
534 * @param[in] particle_radius Radius of the particle.
535 * @param[in] particle_properties Properties of particle.
536 * @param[in] rolling_friction_coeff Effective rolling friction coefficient.
537 * @param[in] rolling_viscous_damping_coeff Effective rolling viscous damping
538 * coefficient
539 * @param[in] dt DEM time step.
540 * @param[in] normal_spring_constant Normal contact stiffness constant.
541 * @param[in] normal_force_norm Norm of the normal force.
542 * @param[in] normal_unit_vector Normal unit vector.
543 * @param[in,out] cumulative_rolling_resistance_spring_torque Cumulative
544 * spring rolling resistance torque.
545 *
546 * @return Rolling resistance torque.
547 *
548 */
549 inline Tensor<1, 3>
551 [[maybe_unused]] const double particle_radius,
552 [[maybe_unused]] const ArrayView<const double> &particle_properties,
553 [[maybe_unused]] const double rolling_friction_coeff,
554 [[maybe_unused]] const double rolling_viscous_damping_coeff,
555 [[maybe_unused]] const double dt,
556 [[maybe_unused]] const double normal_spring_constant,
557 [[maybe_unused]] const double normal_force_norm,
558 [[maybe_unused]] const Tensor<1, 3> &normal_unit_vector,
559 [[maybe_unused]] Tensor<1, 3> &cumulative_rolling_resistance_spring_torque)
560 {
561 using namespace Parameters::Lagrangian;
562
563 if constexpr (rolling_friction_model == none)
564 {
565 return no_rolling_torque();
566 }
567
568 if constexpr (rolling_friction_model == constant)
569 {
570 return constant_rolling_torque<PropertiesIndex>(particle_radius,
571 particle_properties,
572 rolling_friction_coeff,
573 normal_force_norm);
574 }
575
576 if constexpr (rolling_friction_model == viscous)
577 {
578 return viscous_rolling_torque<PropertiesIndex>(particle_radius,
579 particle_properties,
580 rolling_friction_coeff,
581 normal_force_norm,
582 normal_unit_vector);
583 }
584 if constexpr (rolling_friction_model == epsd)
585 {
587 particle_radius,
588 particle_properties,
589 rolling_friction_coeff,
590 rolling_viscous_damping_coeff,
591 this->f_coefficient_epsd,
592 normal_force_norm,
593 dt,
594 normal_spring_constant,
595 normal_unit_vector,
596 cumulative_rolling_resistance_spring_torque);
597 }
598 }
599
600 /**
601 * @brief Calculate the particle-wall linear contact force and torque
602 * based on the updated values in contact_info.
603 *
604 * @param[in,out] contact_info A container that contains the required
605 * information for calculation of the contact force for a particle-wall pair.
606 * @param[in] tangential_relative_velocity Tangential relative velocity.
607 * @param[in] normal_relative_velocity_value Normal relative velocity value.
608 * @param[in] normal_overlap Contact normal overlap.
609 * @param[in] dt DEM time step.
610 * @param[in] particle_properties Properties of particle.
611 * @param[out] normal_force Contact normal force.
612 * @param[out] tangential_force Contact tangential force.
613 * @param[out] tangential_torque Contact tangential torque.
614 * @param[out] rolling_resistance_torque Contact rolling resistance torque.
615 */
616 inline void
618 const Tensor<1, 3> &tangential_relative_velocity,
619 const double normal_relative_velocity_value,
620 const double normal_overlap,
621 const double dt,
622 const ArrayView<const double> &particle_properties,
623 Tensor<1, 3> &normal_force,
624 Tensor<1, 3> &tangential_force,
625 Tensor<1, 3> &tangential_torque,
626 Tensor<1, 3> &rolling_resistance_torque)
627 {
628 // i is the particle, j is the wall.
629 // there is a minus sign in front of the normal_vector to respect the
630 // convention (i -> j), the forces are thus calculated on the wall
631 const Tensor<1, 3> normal_vector = -contact_info.normal_vector;
632 const unsigned int particle_type =
633 static_cast<unsigned int>(particle_properties[PropertiesIndex::type]);
634 const double particle_radius =
635 particle_properties[PropertiesIndex::dp] * 0.5;
636
637 const double youngs_modulus = this->effective_youngs_modulus[particle_type];
638 const double beta = this->model_parameter_beta[particle_type];
639 const double friction_coeff =
640 this->effective_coefficient_of_friction[particle_type];
641 const double rolling_viscous_damping_coeff =
643 const double rolling_friction_coeff =
645
646 // Calculation of normal and tangential spring and dashpot constants
647 // using particle properties
648 const double rp_sqrt = sqrt(particle_radius);
649
650 const double normal_spring_constant =
651 1.0667 * rp_sqrt * youngs_modulus *
652 pow((0.9375 * particle_properties[PropertiesIndex::mass] * 1.0 *
653 1.0 / // Characteristic velocity is set to 1.0
654 (rp_sqrt * youngs_modulus)),
655 0.2);
656
657 // There is no minus sign here since model_parameter_beta is negative or
658 // equal to zero.
659 const double normal_damping_constant =
660 2 * beta *
661 sqrt(particle_properties[PropertiesIndex::mass] * normal_spring_constant);
662
663 // REF : R. Garg, J. Galvin-Carney, T. Li, and S. Pannala, “Documentation
664 // of open-source MFIX–DEM software for gas-solids flows,” Tingwen Li Dr.,
665 // p. 10, Sep. 2012. There is a minus sign since the tangential force is
666 // applied in the opposite direction of the tangential_displacement
667 const double tangential_spring_constant = -normal_spring_constant * 0.4;
668
669 const double tangential_damping_constant =
670 normal_damping_constant * 0.6324555320336759; // sqrt(0.4)
671
672 // Calculation of normal force using spring and dashpot normal forces
673 normal_force = (normal_spring_constant * normal_overlap +
674 normal_damping_constant * normal_relative_velocity_value) *
675 normal_vector;
676
677 // Calculation of tangential force
678 tangential_force =
679 (tangential_spring_constant * contact_info.tangential_displacement +
680 tangential_damping_constant * tangential_relative_velocity);
681
682 const double coulomb_threshold = friction_coeff * normal_force.norm();
683 // Check for gross sliding
684 if (tangential_force.norm() > coulomb_threshold)
685 {
686 // Gross sliding occurs and the tangential displacement and tangential
687 // force are limited to Coulomb's criterion
688 tangential_force =
689 coulomb_threshold * (tangential_force / tangential_force.norm());
690
691 contact_info.tangential_displacement =
692 tangential_force / (tangential_spring_constant + DBL_MIN);
693 }
694
695 // Calculation torque caused by tangential force
696 // We add the minus sign here since the tangential_force is applied on the
697 // particle in the opposite direction
698 tangential_torque =
699 cross_product_3d((particle_radius * normal_vector), -tangential_force);
700
701 rolling_resistance_torque = calculate_rolling_resistance_torque(
702 particle_radius,
703 particle_properties,
704 rolling_friction_coeff,
705 rolling_viscous_damping_coeff,
706 dt,
707 normal_spring_constant,
708 normal_force.norm(),
709 contact_info.normal_vector,
711 }
712
713 /**
714 * @brief Calculate the particle-wall non-linear contact force and torque
715 * based on the updated values in contact_info.
716 *
717 * @param[in,out] contact_info A container that contains the required
718 * information for calculation of the contact force for a particle-wall pair.
719 * @param[in] tangential_relative_velocity Tangential relative velocity.
720 * @param[in] normal_relative_velocity_value Normal relative velocity value.
721 * @param[in] normal_overlap Contact normal overlap.
722 * @param[in] dt DEM time step.
723 * @param[in] particle_properties Properties of particle.
724 * @param[out] normal_force Contact normal force.
725 * @param[out] tangential_force Contact tangential force.
726 * @param[out] tangential_torque Contact tangential torque.
727 * @param[out] rolling_resistance_torque Contact rolling resistance torque.
728 */
729 inline void
732 const Tensor<1, 3> &tangential_relative_velocity,
733 const double normal_relative_velocity_value,
734 const double normal_overlap,
735 const double dt,
736 const ArrayView<const double> &particle_properties,
737 Tensor<1, 3> &normal_force,
738 Tensor<1, 3> &tangential_force,
739 Tensor<1, 3> &tangential_torque,
740 Tensor<1, 3> &rolling_resistance_torque)
741 {
742 // i is the particle, j is the wall.
743 // there is a minus sign in front of the normal_vector to respect the
744 // convention (i -> j), the forces are thus calculated on the wall
745 const Tensor<1, 3> normal_vector = -contact_info.normal_vector;
746 const double particle_radius =
747 particle_properties[PropertiesIndex::dp] * 0.5;
748 const unsigned int particle_type =
749 static_cast<unsigned int>(particle_properties[PropertiesIndex::type]);
750
751 const double youngs_modulus = this->effective_youngs_modulus[particle_type];
752 const double shear_modulus = this->effective_shear_modulus[particle_type];
753 const double beta = this->model_parameter_beta[particle_type];
754 const double friction_coeff =
755 this->effective_coefficient_of_friction[particle_type];
756 const double rolling_viscous_damping_coeff =
758 const double rolling_friction_coeff =
760
761 // Calculate intermediate model parameters
762 // These values are used to consider non-linear relation of the contact
763 // force to the normal overlap
764 const double radius_times_overlap_sqrt =
765 sqrt(particle_radius * normal_overlap);
766 const double model_parameter_sn =
767 2.0 * youngs_modulus * radius_times_overlap_sqrt;
768 const double model_parameter_st =
769 8.0 * shear_modulus * radius_times_overlap_sqrt;
770
771 // Calculation of normal and tangential spring and dashpot constants
772 // using particle and wall properties
773 const double normal_spring_constant =
774 1.3333 * youngs_modulus * radius_times_overlap_sqrt;
775
776 // There is no minus sign here since beta is negative or
777 // equal to zero.
778 const double normal_damping_constant =
779 1.8257 * beta *
780 sqrt(model_parameter_sn * particle_properties[PropertiesIndex::mass]);
781
782 // There is a minus sign since the tangential force is applied in the
783 // opposite direction of the tangential_displacement
784 const double tangential_spring_constant =
785 -8.0 * shear_modulus * radius_times_overlap_sqrt + DBL_MIN;
786
787 const double tangential_damping_constant =
788 normal_damping_constant * sqrt(model_parameter_st / model_parameter_sn);
789
790 // Calculation of normal force using spring and dashpot normal forces
791 normal_force = (normal_spring_constant * normal_overlap +
792 normal_damping_constant * normal_relative_velocity_value) *
793 normal_vector;
794
795 // Calculation of tangential force. Since we need damping tangential force
796 // in the gross sliding again, we define it as a separate variable
797 const Tensor<1, 3> damping_tangential_force =
798 tangential_damping_constant * tangential_relative_velocity;
799 tangential_force =
800 tangential_spring_constant * contact_info.tangential_displacement +
801 damping_tangential_force;
802
803 const double coulomb_threshold = friction_coeff * normal_force.norm();
804
805 // Check for gross sliding
806 const double tangential_force_norm = tangential_force.norm();
807 if (tangential_force_norm > coulomb_threshold)
808 {
809 // Gross sliding occurs and the tangential displacement and tangential
810 // force are limited to Coulomb's criterion
811 contact_info.tangential_displacement =
812 (coulomb_threshold *
813 (tangential_force / (tangential_force_norm + DBL_MIN)) -
814 damping_tangential_force) /
815 (tangential_spring_constant + DBL_MIN);
816
817 tangential_force =
818 (tangential_spring_constant * contact_info.tangential_displacement) +
819 damping_tangential_force;
820 }
821
822 // Calculating torque caused by tangential force
823 // We add the minus sign here since the tangential_force applied on the
824 // particle is in the opposite direction
825 tangential_torque =
826 cross_product_3d((particle_radius * normal_vector), -tangential_force);
827
828 // Rolling resistance torque
829 rolling_resistance_torque = calculate_rolling_resistance_torque(
830 particle_radius,
831 particle_properties,
832 rolling_friction_coeff,
833 rolling_viscous_damping_coeff,
834 dt,
835 normal_spring_constant,
836 normal_force.norm(),
837 contact_info.normal_vector,
839 }
840
841 /**
842 * @brief Calculate the particle-wall JKR contact force and torque
843 * based on the updated values in contact_info.
844 *
845 * @param[in,out] contact_info A container that contains the required
846 * information for calculation of the contact force for a particle-wall pair.
847 * @param[in] tangential_relative_velocity Tangential relative velocity.
848 * @param[in] normal_relative_velocity_value Normal relative velocity value.
849 * @param[in] normal_overlap Contact normal overlap.
850 * @param[in] dt DEM time step.
851 * @param[in] particle_properties Properties of particle.
852 * @param[out] normal_force Contact normal force.
853 * @param[out] tangential_force Contact tangential force.
854 * @param[out] tangential_torque Contact tangential torque.
855 * @param[out] rolling_resistance_torque Contact rolling resistance torque.
856 */
857 inline void
859 const Tensor<1, 3> &tangential_relative_velocity,
860 const double normal_relative_velocity_value,
861 const double normal_overlap,
862 const double dt,
863 const ArrayView<const double> &particle_properties,
864 Tensor<1, 3> &normal_force,
865 Tensor<1, 3> &tangential_force,
866 Tensor<1, 3> &tangential_torque,
867 Tensor<1, 3> &rolling_resistance_torque)
868 {
869 // i is the particle, j is the wall.
870 // there is a minus sign in front of the normal_vector to respect the
871 // convention (i -> j), the forces are thus calculated on the wall
872 const Tensor<1, 3> normal_vector = -contact_info.normal_vector;
873 const double particle_radius =
874 0.5 * particle_properties[PropertiesIndex::dp];
875 const unsigned int particle_type =
876 static_cast<unsigned int>(particle_properties[PropertiesIndex::type]);
877
878 const double youngs_modulus = this->effective_youngs_modulus[particle_type];
879 const double shear_modulus = this->effective_shear_modulus[particle_type];
880 const double beta = this->model_parameter_beta[particle_type];
881 const double friction_coeff =
882 this->effective_coefficient_of_friction[particle_type];
883 const double rolling_viscous_damping_coeff =
885 const double rolling_friction_coeff =
887 const double surface_energy = this->effective_surface_energy[particle_type];
888
889 // Calculate intermediate model parameters
890 // These values are used to consider non-linear relation of the contact
891 // force to the normal overlap
892 const double radius_times_overlap_sqrt =
893 sqrt(particle_radius * normal_overlap);
894 const double model_parameter_sn =
895 2.0 * youngs_modulus * radius_times_overlap_sqrt;
896 const double model_parameter_st =
897 8.0 * shear_modulus * radius_times_overlap_sqrt;
898
899 // Calculation of the contact patch radius (a) using the analytical solution
900 // described in the theory guide.
901 const double c0 =
902 Utilities::fixed_power<2>(particle_radius * normal_overlap);
903 const double c1 = -2. * Utilities::fixed_power<2>(particle_radius) * M_PI *
904 surface_energy / youngs_modulus;
905 const double c2 = -2. * normal_overlap * particle_radius;
906 const double P = -Utilities::fixed_power<2>(c2) / 12. - c0;
907 const double Q = -Utilities::fixed_power<3>(c2) / 108. + c0 * c2 / 3. -
908 Utilities::fixed_power<2>(c1) * 0.125;
909 const double root1 = std::max(0.,
910 (0.25 * Utilities::fixed_power<2>(Q)) +
911 (Utilities::fixed_power<3>(P) / 27.));
912 const double U = std::cbrt(-0.5 * Q + std::sqrt(root1));
913 const double s = -c2 * (5. / 6.) + U - P / (3. * U);
914 const double w = std::sqrt(std::max(1e-16, c2 + 2. * s));
915 const double lambda = 0.5 * c1 / w;
916 const double root2 = std::max(1e-16, w * w - 4. * (c2 + s + lambda));
917 const double a = 0.5 * (w + std::sqrt(root2));
918
919 // Calculation of normal damping and tangential spring and dashpot constants
920 // using particle and wall properties.
921 // There is no minus sign here since model_parameter_beta is negative or
922 // equal to zero.
923 const double normal_damping_constant =
924 1.8257 * beta * // 2. * sqrt(5./6.)
925 sqrt(model_parameter_sn * particle_properties[PropertiesIndex::mass]);
926
927 // Tangential spring constant is set as a negative just like in the other
928 // particle-wall models. This must be taken into account for the square root
929 // in the tangential_damping_calculation.
930 const double tangential_spring_constant =
931 -8.0 * shear_modulus * radius_times_overlap_sqrt;
932
933 // There is no minus sign here since model_parameter_beta is negative or
934 // equal to zero.
935 const double tangential_damping_constant =
936 normal_damping_constant *
937 sqrt(model_parameter_st / (model_parameter_sn + DBL_MIN));
938
939 // Calculation of the normal force coefficient (F_n_JKR)
940 const double normal_force_norm =
941 4. * youngs_modulus * Utilities::fixed_power<3>(a) /
942 (3. * particle_radius) -
943 std::sqrt(8. * M_PI * surface_energy * youngs_modulus *
944 Utilities::fixed_power<3>(a)) +
945 normal_damping_constant * normal_relative_velocity_value;
946
947 // Calculation of normal force using the normal_force_norm and the
948 // normal vector.
949 normal_force = normal_force_norm * normal_vector;
950
951 // Calculation of tangential forces.
952 Tensor<1, 3> damping_tangential_force =
953 tangential_damping_constant * tangential_relative_velocity;
954 tangential_force =
955 tangential_spring_constant * contact_info.tangential_displacement +
956 damping_tangential_force;
957
958 // JKR theory says that the coulomb threshold must be modified with the
959 // pull-out force. (Thornton 1991)
960 const double modified_coulomb_threshold =
961 (normal_force_norm + 3. * M_PI * surface_energy * particle_radius) *
962 friction_coeff;
963
964 // Check for gross sliding
965 const double tangential_force_norm = tangential_force.norm();
966 if (tangential_force_norm > modified_coulomb_threshold)
967 {
968 // Gross sliding occurs and the tangential displacement and tangential
969 // force are limited to Coulomb's criterion
970 contact_info.tangential_displacement =
971 (modified_coulomb_threshold *
972 (tangential_force / (tangential_force_norm + DBL_MIN)) -
973 damping_tangential_force) /
974 (tangential_spring_constant + DBL_MIN);
975
976 tangential_force =
977 (tangential_spring_constant * contact_info.tangential_displacement) +
978 damping_tangential_force;
979 }
980
981 // Calculation of torque caused by tangential force (tangential_torque)
982 // We add the minus sign here since the tangential_force applied on the
983 // particle is in the opposite direction
984 tangential_torque =
985 cross_product_3d((particle_radius * normal_vector), -tangential_force);
986
987 // We need to compute the normal spring constant for case where we use the
988 // EPSD rolling resistance model.
989 const double normal_spring_constant = 0.66665 * model_parameter_sn;
990
991 // Rolling resistance torque
992 rolling_resistance_torque = calculate_rolling_resistance_torque(
993 particle_radius,
994 particle_properties,
995 rolling_friction_coeff,
996 rolling_viscous_damping_coeff,
997 dt,
998 normal_spring_constant,
999 normal_force.norm(),
1000 contact_info.normal_vector,
1002 }
1003
1004 /**
1005 * @brief Calculate the particle-wall cohesive force and
1006 * contact torque based on the updated values in contact_info. It uses the DMT
1007 * cohesive force model.
1008 *
1009 * @param[in,out] contact_info A container that contains the required
1010 * information for calculation of the contact force for a particle-wall.
1011 * @param[in] tangential_relative_velocity Tangential relative velocity.
1012 * @param[in] normal_relative_velocity_value Normal relative velocity value.
1013 * @param[in] normal_overlap Contact normal overlap.
1014 * @param[in] dt DEM time step.
1015 * @param[in] particle_properties Properties of particle.
1016 * @param[out] normal_force Contact normal force.
1017 * @param[out] tangential_force Contact tangential force.
1018 * @param[out] tangential_torque Contact tangential torque.
1019 * @param[out] rolling_resistance_torque Contact rolling resistance torque.
1020 */
1021 inline void
1023 const Tensor<1, 3> &tangential_relative_velocity,
1024 const double normal_relative_velocity_value,
1025 const double normal_overlap,
1026 const double dt,
1027 const ArrayView<const double> &particle_properties,
1028 Tensor<1, 3> &normal_force,
1029 Tensor<1, 3> &tangential_force,
1030 Tensor<1, 3> &tangential_torque,
1031 Tensor<1, 3> &rolling_resistance_torque)
1032 {
1033 constexpr double M_2PI = 2. * M_PI;
1034
1035 // i is the particle, j is the wall.
1036 // there is a minus sign in front of the normal_vector to respect the
1037 // convention (i -> j), the forces are thus calculated on the wall
1038 const Tensor<1, 3> normal_vector = -contact_info.normal_vector;
1039 const double particle_radius =
1040 0.5 * particle_properties[PropertiesIndex::dp];
1041 const unsigned int particle_type =
1042 static_cast<unsigned int>(particle_properties[PropertiesIndex::type]);
1043
1044 const double surface_energy = this->effective_surface_energy[particle_type];
1045 const double hamaker_constant =
1046 this->effective_hamaker_constant[particle_type];
1047
1048 const double F_po = M_2PI * particle_radius * surface_energy;
1049
1050 const double delta_0 =
1051 -std::sqrt(hamaker_constant * particle_radius / (6. * F_po));
1052
1053 // Cohesive force.
1054 double cohesive_term;
1055
1056 // Contact particle-wall + constant cohesive force.
1057 if (normal_overlap > 0.)
1058 {
1059 cohesive_term = -F_po;
1060
1061 calculate_nonlinear_contact(contact_info,
1062 tangential_relative_velocity,
1063 normal_relative_velocity_value,
1064 normal_overlap,
1065 dt,
1066 particle_properties,
1067 normal_force,
1068 tangential_force,
1069 tangential_torque,
1070 rolling_resistance_torque);
1071 }
1072 // No contact, but still in the constant zone for the cohesive force.
1073 else if (normal_overlap > delta_0)
1074 {
1075 cohesive_term = -F_po;
1076 contact_info.tangential_displacement.clear();
1077 contact_info.rolling_resistance_spring_torque.clear();
1078 }
1079 // No contact. The cohesive force is not constant. It needs to be computed.
1080 else
1081 {
1082 cohesive_term = -hamaker_constant * particle_radius /
1083 (6. * Utilities::fixed_power<2>(normal_overlap));
1084 contact_info.tangential_displacement.clear();
1085 contact_info.rolling_resistance_spring_torque.clear();
1086 }
1087 normal_force += cohesive_term * normal_vector;
1088 }
1089
1090 /**
1091 * @brief Calculate the displacement that separates a particle from a wall it
1092 * overlaps. This "contact force" model is used by the packed insertion
1093 * method. The displacement is along the wall normal and is slightly larger
1094 * than the normal overlap, so that the particle is separated from the wall
1095 * once it is displaced.
1096 *
1097 * @param[in] normal_overlap Contact normal overlap.
1098 * @param[in] contact_info A container that contains the required
1099 * information for calculation of the contact force for a particle-wall pair.
1100 * @param[in] particle_properties Properties of the particle.
1101 * @param[out] normal_displacement Displacement along the contact normal,
1102 * pointing from the particle to the wall like the contact forces. The
1103 * particle is displaced by its opposite.
1104 */
1105 inline void
1107 const double normal_overlap,
1108 const particle_wall_contact_info<dim> &contact_info,
1109 const ArrayView<const double> &particle_properties,
1110 Tensor<1, 3> &normal_displacement)
1111 {
1112 if (normal_overlap > 0.)
1113 {
1114 ++this->n_contacts;
1115 // i is the particle, j is the wall.
1116 // there is a minus sign in front of the normal_vector to respect the
1117 // convention (i -> j), the forces are thus calculated on the wall
1118 const Tensor<1, 3> normal_vector = -contact_info.normal_vector;
1119
1120 // TODO: 1.02 and 0.01 are arbitrary values. These values could be
1121 // input parameters from a parameter file.
1122 normal_displacement =
1123 (1.02 * normal_overlap +
1124 0.01 * particle_properties[PropertiesIndex::dp]) *
1125 normal_vector;
1126 }
1127 else
1128 normal_displacement.clear();
1129 }
1130
1131 /**
1132 * @brief Set every container needed to carry the particle-wall force
1133 * calculation.
1134 *
1135 * @param[in] dem_parameters DEM parameters declared in the .prm file.
1136 */
1137 void
1139
1140 /**
1141 * @brief Set every containers needed to carry the heat transfer rate
1142 * calculation.
1143 *
1144 * @param[in] dem_parameters DEM parameters declared in the .prm
1145 * file.
1146 */
1147 void
1149
1150 /**
1151 * @brief Return the thermal boundary type of a wall of the background
1152 * triangulation. The walls without a thermal boundary type are adiabatic by
1153 * default.
1154 *
1155 * @param[in] boundary_id Boundary id of the wall.
1156 *
1157 * @return The thermal boundary type of the wall.
1158 */
1160 get_thermal_boundary_type(const types::boundary_id boundary_id) const
1161 {
1162 const auto thermal_type_it =
1163 this->boundary_thermal_type_map.find(boundary_id);
1164
1165 // If the boundary id is not found in the map, return adiabatic as the
1166 // default
1167 return (thermal_type_it != this->boundary_thermal_type_map.end()) ?
1168 thermal_type_it->second :
1170 }
1171
1172 /**
1173 * @brief Return the temperature at a given point of a wall of the background
1174 * triangulation. The temperature is evaluated at the time set by the solver
1175 * with set_wall_temperature_time (see particle_heat_transfer.h).
1176 *
1177 * @param[in] boundary_id Boundary id of the wall, whose temperature is
1178 * imposed.
1179 * @param[in] point Point of the wall where the temperature is evaluated.
1180 *
1181 * @return The temperature of the wall at the point.
1182 */
1183 inline double
1184 get_boundary_temperature(const types::boundary_id boundary_id,
1185 const Point<3> &point) const
1186 {
1187 return this->boundary_temperature_function.at(boundary_id)->value(point);
1188 }
1189
1190 /**
1191 * @brief Clears the tangential displacement and rolling resistance spring torque
1192 * from a contact info structure.
1193 *
1194 */
1195 static void
1197 {
1198 contact_info.tangential_displacement.clear();
1199 contact_info.rolling_resistance_spring_torque.clear();
1200 }
1201
1202 // Members of the class
1203
1204 unsigned int n_particle_types;
1205 std::vector<double> effective_youngs_modulus;
1207 std::vector<double> effective_shear_modulus;
1212 std::vector<double> effective_surface_energy;
1213 std::vector<double> effective_hamaker_constant;
1214 std::vector<double> model_parameter_beta;
1215 std::vector<double> equivalent_surface_roughness;
1216 std::vector<double> equivalent_surface_slope;
1217 std::vector<double> effective_microhardness;
1219 std::vector<double> gas_parameter_m;
1224
1225 std::map<types::boundary_id, double> boundary_rotational_speed_map;
1226 std::map<types::boundary_id, Tensor<1, 3>>
1228 std::map<types::boundary_id, Tensor<1, 3>> boundary_rotational_vector;
1229 std::map<types::boundary_id, Point<3>> point_on_rotation_vector;
1230 std::map<types::boundary_id, Parameters::Lagrangian::WallThermalBoundaryType>
1232 std::map<types::boundary_id, std::shared_ptr<Function<3>>>
1234
1235 const unsigned int vertices_per_triangle = 3;
1237
1238 /**
1239 * @brief Contact candidate between a particle and a triangle
1240 * from a solid surface. Stores the required information to evaluate the
1241 * contact.
1242 *
1243 * @tparam dim Dimensionality of the simulation space.
1244 *
1245 * @param triangle_cell Iterator pointing to the triangle cell involved in the contact.
1246 * @param normal_overlap Magnitude of the normal overlap between the particle and the triangle.
1247 * @param contact_indicator Indicator representing the type of particle-triangle contact.
1248 * @param contact_info Pointer to additional contact-related information, if applicable.
1249 */
1257
1258 /**
1259 * @brief All the particle-triangle contact candidates found for a single
1260 * particle against the triangles of one solid object. A particle may lie
1261 * close enough to several triangles of the same solid (e.g. near an edge
1262 * or vertex shared by adjacent triangles), so more than one candidate can
1263 * be stored for the same particle.
1264 */
1266 std::vector<particle_triangle_contact_candidate>;
1267
1268 /**
1269 * @brief Contact record for one solid object, mapping the local index of
1270 * every particle with at least one contact candidate against this solid's
1271 * triangles to its particle_triangle_contact_description.
1272 */
1274 ankerl::unordered_dense::map<types::particle_index,
1276
1277 /**
1278 * @brief Every solid-object is associated with a contact record. This
1279 * container is index for each solid object. This container is cleared every
1280 * DEM time step rather than reallocated.
1281 */
1282 std::vector<particle_triangle_contact_record> solid_contact_records;
1283};
1284
1285#endif
Handles all the parameters declared in the parameter handler file.
Class where the outcomes of particle-particle interactions are stored.
Base class for the particle-wall contact force models This class does not implement any of the models...
unsigned int get_number_of_contacts() const
Return the number of contacts that occurred in the present pseudo-time step when using the packed ins...
virtual void calculate_particle_wall_contact(typename DEM::dem_data_structures< dim >::particle_wall_in_contact &particle_wall_pairs_in_contact, const double dt, ParticleInteractionOutcomes< PropertiesIndex > &contact_outcome)=0
Calculate the contact outcomes for particle-wall contacts using the contact pair information and phys...
virtual void calculate_particle_solid_object_contact(typename DEM::dem_data_structures< dim >::particle_floating_mesh_potentially_in_contact &particle_floating_mesh_potentially_in_contact, const double dt, const std::vector< std::shared_ptr< SerialSolid< dim - 1, dim > > > &solids, ParticleInteractionOutcomes< PropertiesIndex > &contact_outcome)=0
Calculate the contact outcomes for particle-solid objects contacts using the contact pair information...
void reset_number_of_contacts()
Reset the counter of number of contacts for the next pseudo-time step.
std::vector< double > effective_coefficient_of_rolling_viscous_damping
std::map< types::boundary_id, Point< 3 > > point_on_rotation_vector
void calculate_linear_contact(particle_wall_contact_info< dim > &contact_info, const Tensor< 1, 3 > &tangential_relative_velocity, const double normal_relative_velocity_value, const double normal_overlap, const double dt, const ArrayView< const double > &particle_properties, Tensor< 1, 3 > &normal_force, Tensor< 1, 3 > &tangential_force, Tensor< 1, 3 > &tangential_torque, Tensor< 1, 3 > &rolling_resistance_torque)
Calculate the particle-wall linear contact force and torque based on the updated values in contact_in...
std::vector< double > equivalent_surface_slope
std::map< types::boundary_id, Parameters::Lagrangian::WallThermalBoundaryType > boundary_thermal_type_map
std::vector< particle_triangle_contact_record > solid_contact_records
Every solid-object is associated with a contact record. This container is index for each solid object...
void set_effective_properties(const DEMSolverParameters< dim > &dem_parameters)
Set every container needed to carry the particle-wall force calculation.
static Tensor< 1, 3 > find_projection(const Tensor< 1, 3 > &vector_a, const Tensor< 1, 3 > &vector_b)
This function is used to find the projection of vector_a on vector_b.
void calculate_shift_displacement(const double normal_overlap, const particle_wall_contact_info< dim > &contact_info, const ArrayView< const double > &particle_properties, Tensor< 1, 3 > &normal_displacement)
Calculate the displacement that separates a particle from a wall it overlaps. This "contact force" mo...
void update_contact_information(particle_wall_contact_info< dim > &contact_info, Tensor< 1, 3 > &tangential_relative_velocity, double &normal_relative_velocity_value, const Point< 3 > &particle_location, const ArrayView< const double > &particle_properties, const double dt)
Update the contact pair information for contact calculations.
void calculate_JKR_contact(particle_wall_contact_info< dim > &contact_info, const Tensor< 1, 3 > &tangential_relative_velocity, const double normal_relative_velocity_value, const double normal_overlap, const double dt, const ArrayView< const double > &particle_properties, Tensor< 1, 3 > &normal_force, Tensor< 1, 3 > &tangential_force, Tensor< 1, 3 > &tangential_torque, Tensor< 1, 3 > &rolling_resistance_torque)
Calculate the particle-wall JKR contact force and torque based on the updated values in contact_info.
std::vector< double > effective_surface_energy
std::map< types::boundary_id, std::shared_ptr< Function< 3 > > > boundary_temperature_function
void update_particle_solid_object_contact_information(particle_wall_contact_info< dim > &contact_info, Tensor< 1, 3 > &tangential_relative_velocity, double &normal_relative_velocity_value, const ArrayView< const double > &particle_properties, const double dt, const Tensor< 1, 3 > &cut_cell_translational_velocity, const Tensor< 1, 3 > &cut_cell_rotational_velocity, const double center_of_rotation_particle_distance)
Update the contact pair information for particle-solid object contacts.
void calculate_contact(particle_wall_contact_info< dim > &contact_info, const Tensor< 1, 3 > &tangential_relative_velocity, const double normal_relative_velocity_value, const double normal_overlap, const double dt, const ArrayView< const double > &particle_properties, Tensor< 1, 3 > &normal_force, Tensor< 1, 3 > &tangential_force, Tensor< 1, 3 > &tangential_torque, Tensor< 1, 3 > &rolling_resistance_torque)
Calculate the particle-wall contact force and torque according to the contact model.
void apply_force_and_torque(const Tensor< 1, 3 > &normal_force, const Tensor< 1, 3 > &tangential_force, const Tensor< 1, 3 > &tangential_torque, const Tensor< 1, 3 > &rolling_resistance_torque, Tensor< 1, 3 > &particle_torque, Tensor< 1, 3 > &particle_force)
Apply the calculated force and torque on the particle in contact.
double get_boundary_temperature(const types::boundary_id boundary_id, const Point< 3 > &point) const
Return the temperature at a given point of a wall of the background triangulation....
ankerl::unordered_dense::map< types::particle_index, particle_triangle_contact_description > particle_triangle_contact_record
Contact record for one solid object, mapping the local index of every particle with at least one cont...
std::map< types::boundary_id, double > boundary_rotational_speed_map
std::vector< double > effective_youngs_modulus
Tensor< 1, 3 > calculate_rolling_resistance_torque(const double particle_radius, const ArrayView< const double > &particle_properties, const double rolling_friction_coeff, const double rolling_viscous_damping_coeff, const double dt, const double normal_spring_constant, const double normal_force_norm, const Tensor< 1, 3 > &normal_unit_vector, Tensor< 1, 3 > &cumulative_rolling_resistance_spring_torque)
Calculate the rolling resistance torque acting on the particle according to the rolling resistance mo...
std::vector< double > effective_coefficient_of_friction
std::vector< particle_triangle_contact_candidate > particle_triangle_contact_description
All the particle-triangle contact candidates found for a single particle against the triangles of one...
double get_force_calculation_threshold_distance()
Calculate the minimum overlap at which particle-wall forces are computed. This function is useful for...
std::vector< double > effective_hamaker_constant
void set_multiphysic_properties(const DEMSolverParameters< dim > &dem_parameters)
Set every containers needed to carry the heat transfer rate calculation.
virtual void calculate_particle_solid_object_contact(typename DEM::dem_data_structures< dim >::particle_floating_mesh_potentially_in_contact &particle_floating_mesh_potentially_in_contact, const double dt, const std::vector< std::shared_ptr< SerialSolid< dim - 1, dim > > > &solids, ParticleInteractionOutcomes< PropertiesIndex > &contact_outcome) override
Calculate the contact outcomes for particle-solid objects contacts using the contact pair information...
std::vector< double > effective_microhardness
std::map< types::boundary_id, Tensor< 1, 3 > > boundary_translational_velocity_map
std::vector< double > equivalent_surface_roughness
ParticleWallContactForce(const DEMSolverParameters< dim > &dem_parameters)
virtual ~ParticleWallContactForce()=default
Point< 3 > get_location(const Particles::ParticleIterator< dim > &particle) &
Get the 3d location of the particle.
std::vector< double > effective_real_youngs_modulus
std::vector< double > effective_shear_modulus
void calculate_DMT_contact(particle_wall_contact_info< dim > &contact_info, const Tensor< 1, 3 > &tangential_relative_velocity, const double normal_relative_velocity_value, const double normal_overlap, const double dt, const ArrayView< const double > &particle_properties, Tensor< 1, 3 > &normal_force, Tensor< 1, 3 > &tangential_force, Tensor< 1, 3 > &tangential_torque, Tensor< 1, 3 > &rolling_resistance_torque)
Calculate the particle-wall cohesive force and contact torque based on the updated values in contact_...
Parameters::Lagrangian::WallThermalBoundaryType get_thermal_boundary_type(const types::boundary_id boundary_id) const
Return the thermal boundary type of a wall of the background triangulation. The walls without a therm...
std::vector< double > effective_coefficient_of_restitution
std::vector< double > effective_coefficient_of_rolling_friction
std::map< types::boundary_id, Tensor< 1, 3 > > boundary_rotational_vector
virtual void calculate_particle_wall_contact(typename DEM::dem_data_structures< dim >::particle_wall_in_contact &particle_wall_pairs_in_contact, const double dt, ParticleInteractionOutcomes< PropertiesIndex > &contact_outcome) override
Calculate the contact outcomes for particle-wall contacts using the contact pair information and phys...
void calculate_nonlinear_contact(particle_wall_contact_info< dim > &contact_info, const Tensor< 1, 3 > &tangential_relative_velocity, const double normal_relative_velocity_value, const double normal_overlap, const double dt, const ArrayView< const double > &particle_properties, Tensor< 1, 3 > &normal_force, Tensor< 1, 3 > &tangential_force, Tensor< 1, 3 > &tangential_torque, Tensor< 1, 3 > &rolling_resistance_torque)
Calculate the particle-wall non-linear contact force and torque based on the updated values in contac...
std::vector< double > particle_thermal_conductivity
static void clear_contact_info(particle_wall_contact_info< dim > &contact_info)
Clears the tangential displacement and rolling resistance spring torque from a contact info structure...
DEM particle property definitions and output name management.
ParticleTriangleContactIndicator
Indicates the type of contact between a particle and a triangle.
WallThermalBoundaryType
Thermal boundary type of the grid in multiphysic DEM. It is used to define the thermal boundary condi...
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.
Tensor< 1, 3 > no_rolling_torque()
No rolling resistance torque. No calculation is being done with this model.
Tensor< 1, 3 > viscous_rolling_torque(const double particle_radius, const ArrayView< const double > &particle_properties, const double effective_rolling_friction_coefficient, const double normal_force_norm, const Tensor< 1, 3 > &normal_unit_vector)
Calculation of the viscous rolling resistance torque using the information obtained from the fine sea...
Tensor< 1, 3 > epsd_rolling_torque(const double particle_radius, const ArrayView< const double > &particle_properties, const double effective_rolling_friction_coefficient, const double effective_rolling_viscous_damping_coefficient, const double f_coefficient, const double normal_force_norm, const double dt, const double normal_spring_constant, const Tensor< 1, 3 > &normal_unit_vector, Tensor< 1, 3 > &cumulative_rolling_resistance_spring_torque)
Calculation of the EPSD rolling resistance torque using the information obtained from the fine search...
Tensor< 1, 3 > constant_rolling_torque(const double particle_radius, const ArrayView< const double > &particle_properties, const double effective_rolling_friction_coefficient, const double normal_force_norm)
Calculation of the constant rolling resistance torque using the information obtained from the fine se...
DEM data structure containers To improve readability of containers, there's a simple description abov...
ankerl::unordered_dense::map< types::particle_index, ankerl::unordered_dense::map< global_face_id, particle_wall_contact_info< dim > > > particle_wall_in_contact
Contact candidate between a particle and a triangle from a solid surface. Stores the required informa...
LetheGridTools::ParticleTriangleContactIndicator contact_indicator
Triangulation< dim-1, dim >::active_cell_iterator triangle_cell
Handle the information related to the calculation of the particle-wall contact forces.
types::boundary_id boundary_id
Tensor< 1, 3 > normal_vector
Tensor< 1, 3 > tangential_displacement
Tensor< 1, 3 > rolling_resistance_spring_torque
Point< 3 > point_nd_to_3d(const Point< dim > &point)