Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
particle_point_line_contact_force.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) 2020-2025 The Lethe Authors
2// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
3
4#ifndef lethe_particle_point_line_force_h
5#define lethe_particle_point_line_force_h
6
9
10#include <deal.II/base/point.h>
11#include <deal.II/base/tensor.h>
12
13#include <deal.II/particles/particle_iterator.h>
14
15#include <vector>
16
17using namespace dealii;
18
19/**
20 * @brief Calculate the non-linear particle-point and particle-line contact force
21 * using the information obtained from the fine search and physical properties
22 * of particles and walls. Since the inputs and the calculation method of
23 * particle-point and particle-line contact forces are similar, we only used one
24 * function for both tasks.
25 *
26 * @tparam dim An integer that denotes the number of spatial dimensions.
27 * @tparam PropertiesIndex Index of the properties used within the ParticleHandler.
28 */
29template <int dim, typename PropertiesIndex>
31{
32public:
34
35 /**
36 * @brief Calculate of the particle-point contact force using
37 * non-linear (Hertzian) model
38 *
39 * @param particle_point_pairs_in_contact Required information for
40 * calculation of the particle-point contact force
41 * @param physical_properties DEM physical_properties declared in the .prm
42 * file
43 * @param force Force acting on particles
44 */
45 void
48 *particle_point_pairs_in_contact,
50 &physical_properties,
51 std::vector<Tensor<1, 3>> &force);
52
53 /**
54 * @brief Calculate of the particle-line contact force using
55 * non-linear (Hertzian) model
56 *
57 * @param particle_line_pairs_in_contact Required information for
58 * calculation of the particle-line contact force
59 * @param physical_properties DEM physical_properties declared in the .prm
60 * file
61 * @param force Force acting on particles
62 */
63 void
66 *particle_line_pairs_in_contact,
68 &physical_properties,
69 std::vector<Tensor<1, 3>> &force);
70
71 /**
72 * @brief Calculate the displacements that separate the particles from the
73 * boundary points they overlap. This "contact force" model is used by the
74 * packed insertion method.
75 *
76 * @param[in] particle_point_pairs_in_contact Required information for
77 * calculation of the particle-point contacts.
78 * @param[in,out] displacement Displacement of each local particle. The
79 * displacement of each particle-point contact is added to the entry of its
80 * particle.
81 */
82 void
85 &particle_point_pairs_in_contact,
86 std::vector<Tensor<1, 3>> &displacement);
87
88 /**
89 * @brief Calculate the displacements that separate the particles from the
90 * boundary lines they overlap. This "contact force" model is used by the
91 * packed insertion method.
92 *
93 * @param[in] particle_line_pairs_in_contact Required information for
94 * calculation of the particle-line contacts.
95 * @param[in,out] displacement Displacement of each local particle. The
96 * displacement of each particle-line contact is added to the entry of its
97 * particle.
98 */
99 void
102 &particle_line_pairs_in_contact,
103 std::vector<Tensor<1, 3>> &displacement);
104
105 /**
106 * @brief Return the number of particle-point and particle-line contacts
107 * that occurred in the present pseudo-time step when using the packed
108 * insertion method.
109 */
110 unsigned int
112 {
113 return n_contacts;
114 }
115
116 /**
117 * @brief Reset the counter of number of contacts for the next pseudo-time step.
118 */
119 void
121 {
122 n_contacts = 0;
123 }
124
125private:
126 /**
127 * @brief Add the displacement that separates a particle from the boundary
128 * point or line it overlaps to the displacement of the particle. The
129 * displacement is along the normal from the closest point of the boundary
130 * to the particle center and is slightly larger than the normal overlap, as
131 * in the particle-wall shift model.
132 *
133 * @param[in] particle Iterator of the particle in contact.
134 * @param[in] particle_location Location of the particle center in 3D.
135 * @param[in] contact_point Point of the boundary point or line that is the
136 * closest to the particle center.
137 * @param[in,out] displacement Displacement of each local particle.
138 */
139 void
140 add_shift_displacement(const Particles::ParticleIterator<dim> &particle,
141 const Point<3> &particle_location,
142 const Point<3> &contact_point,
143 std::vector<Tensor<1, 3>> &displacement);
144
145 /**
146 * @brief This private function is used to find the projection of point_p on
147 * a line with beginning and ending vertices of point_a and point_b,
148 * respectively
149 * @param point_p A point which is going to be projected on the line
150 * @param point_a Beginning point of the line
151 * @param point_b Ending point of the line
152 * @return The projection of point_p on the line (from point_a to point_b)
153 */
154 Point<3>
155 find_projection_point(const Point<3> &point_p,
156 const Point<3> &point_a,
157 const Point<3> &point_b);
158
159 /**
160 * @brief Number of particle-point and particle-line contacts in the present
161 * pseudo-time step when using the packed insertion method.
162 */
163 unsigned int n_contacts = 0;
164};
165
166#endif
void add_shift_displacement(const Particles::ParticleIterator< dim > &particle, const Point< 3 > &particle_location, const Point< 3 > &contact_point, std::vector< Tensor< 1, 3 > > &displacement)
Add the displacement that separates a particle from the boundary point or line it overlaps to the dis...
void calculate_particle_line_contact_force(const typename DEM::dem_data_structures< dim >::particle_line_in_contact *particle_line_pairs_in_contact, const Parameters::Lagrangian::LagrangianPhysicalProperties &physical_properties, std::vector< Tensor< 1, 3 > > &force)
Calculate of the particle-line contact force using non-linear (Hertzian) model.
void calculate_particle_point_shift_displacement(const typename DEM::dem_data_structures< dim >::particle_point_in_contact &particle_point_pairs_in_contact, std::vector< Tensor< 1, 3 > > &displacement)
Calculate the displacements that separate the particles from the boundary points they overlap....
Point< 3 > find_projection_point(const Point< 3 > &point_p, const Point< 3 > &point_a, const Point< 3 > &point_b)
This private function is used to find the projection of point_p on a line with beginning and ending v...
unsigned int get_number_of_contacts() const
Return the number of particle-point and particle-line contacts that occurred in the present pseudo-ti...
unsigned int n_contacts
Number of particle-point and particle-line contacts in the present pseudo-time step when using the pa...
void calculate_particle_point_contact_force(const typename DEM::dem_data_structures< dim >::particle_point_in_contact *particle_point_pairs_in_contact, const Parameters::Lagrangian::LagrangianPhysicalProperties &physical_properties, std::vector< Tensor< 1, 3 > > &force)
Calculate of the particle-point contact force using non-linear (Hertzian) model.
void reset_number_of_contacts()
Reset the counter of number of contacts for the next pseudo-time step.
void calculate_particle_line_shift_displacement(const typename DEM::dem_data_structures< dim >::particle_line_in_contact &particle_line_pairs_in_contact, std::vector< Tensor< 1, 3 > > &displacement)
Calculate the displacements that separate the particles from the boundary lines they overlap....
std::unordered_map< types::particle_index, particle_line_contact_info< dim > > particle_line_in_contact
std::unordered_map< types::particle_index, particle_point_contact_info< dim > > particle_point_in_contact
Physical properties of particles, walls, and interstitial gas for Lagrangian (DEM) simulations.