Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
particle_particle_contact_force.templates.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) 2026 The Lethe Authors
2// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
3
4#ifndef lethe_particle_particle_contact_force_templates_h
5#define lethe_particle_particle_contact_force_templates_h
6
7// This file contains the definitions of the member functions of
8// ParticleParticleContactForce that are not defined in the class body.
9// They are in a header rather than in a source file because the explicit
10// instantiations of the class are distributed over two source files
11// (particle_particle_contact_force_2d.cc and
12// particle_particle_contact_force_3d.cc) so that they are compiled in parallel.
13// Only these source files should include this header; everything else should
14// include particle_particle_contact_force.h.
15
17
19
20template <
21 int dim,
22 typename PropertiesIndex,
27 contact_model,
28 rolling_friction_model>::
29 ParticleParticleContactForce(const DEMSolverParameters<dim> &dem_parameters)
30 : dmt_cut_off_threshold(dem_parameters.model_parameters.dmt_cut_off_threshold)
31 , f_coefficient_epsd(dem_parameters.model_parameters.f_coefficient_epsd)
32{
33 set_effective_properties(dem_parameters);
35 {
36 set_multiphysic_properties(dem_parameters);
37 }
38}
39
40template <
41 int dim,
42 typename PropertiesIndex,
45void
47 PropertiesIndex,
48 contact_model,
49 rolling_friction_model>::
50 calculate_particle_particle_contact(
52 &local_adjacent_particles,
54 &ghost_adjacent_particles,
56 &local_local_periodic_adjacent_particles,
58 &local_ghost_periodic_adjacent_particles,
60 &ghost_local_periodic_adjacent_particles,
61 const double dt,
63{
64 // Calculating the contact forces and heat transfer rates for local-local
65 // adjacent particles.
66 for (auto &&adjacent_particles_list :
67 local_adjacent_particles | boost::adaptors::map_values)
68 {
70 adjacent_particles_list, dt, contact_outcome);
71 }
72
73 // Calculating the contact forces and heat transfer rates for local-ghost
74 // adjacent particles.
75 for (auto &&adjacent_particles_list :
76 ghost_adjacent_particles | boost::adaptors::map_values)
77 {
79 adjacent_particles_list, dt, contact_outcome);
80 }
81
82 // Calculating the contact forces and heat transfer rates for local-local
83 // periodic adjacent particles.
84 for (auto &&periodic_adjacent_particles_list :
85 local_local_periodic_adjacent_particles | boost::adaptors::map_values)
86 {
89 periodic_adjacent_particles_list, dt, contact_outcome);
90 }
91
92 // Calculating the contact forces and heat transfer rates for local-ghost
93 // periodic adjacent particles.
94 for (auto &&periodic_adjacent_particles_list :
95 local_ghost_periodic_adjacent_particles | boost::adaptors::map_values)
96 {
99 periodic_adjacent_particles_list, dt, contact_outcome);
100 }
101
102 // Calculating the contact forces and heat transfer rates for ghost-local
103 // periodic adjacent particles.
104 for (auto &&periodic_adjacent_particles_list :
105 ghost_local_periodic_adjacent_particles | boost::adaptors::map_values)
106 {
109 periodic_adjacent_particles_list, dt, contact_outcome);
110 }
111}
112
113#endif
Handles all the parameters declared in the parameter handler file.
Class where the outcomes of particle-particle interactions are stored.
Execute calculation of particle-particle contact forces including linear, non-linear contact models,...
void execute_contact_calculation(ContactInfoContainer &adjacent_particles_list, const double dt, ParticleInteractionOutcomes< PropertiesIndex > &contact_outcome)
Execute the contact calculation step for the particle-particle contact according to the contact type.
void set_multiphysic_properties(const DEMSolverParameters< dim > &dem_parameters)
Set every container needed to carry the heat transfer rate calculation.
void set_effective_properties(const DEMSolverParameters< dim > &dem_parameters)
Set every container needed to carry the particle-particle force calculation.
@ ghost_periodic_particle_particle
@ ghost_local_periodic_particle_particle
@ local_periodic_particle_particle
PropertiesIndex
Particle property indices for pure DEM simulations.
constexpr bool has_thermal_properties
Whether a properties index set carries thermal properties.
ParticleParticleContactForceModel
Contact force model for particle-particle interactions.
RollingResistanceMethod
Method used to compute the rolling resistance torque.
Parameter structures for Lagrangian (DEM) particle simulations.
ankerl::unordered_dense::map< types::particle_index, periodic_adjacent_particle_pairs_value > periodic_adjacent_particle_pairs
ankerl::unordered_dense::map< types::particle_index, adjacent_particle_pairs_value > adjacent_particle_pairs