NetDEM
v1.0
Loading...
Searching...
No Matches
contact_pp.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include "
bond_entry.hpp
"
4
#include "
collision_entry.hpp
"
5
#include "
mini_map.hpp
"
6
#include "
particle.hpp
"
7
8
namespace
netdem
{
9
10
class
Particle;
11
class
Wall;
12
20
class
ContactPP
{
21
public
:
25
Particle
*
particle_1
{
nullptr
};
26
30
Particle
*
particle_2
{
nullptr
};
31
35
ContactModel
*
bond_model
{
nullptr
}, *
collision_model
{
nullptr
};
36
41
VecXT<BondEntry>
bond_entries
;
42
47
VecXT<CollisionEntry>
collision_entries
;
48
55
bool
active
{
true
};
56
60
MiniMap<std::string, double>
dynamic_properties
;
61
65
ContactPP
();
66
74
ContactPP
(
Particle
*
const
p1,
Particle
*
const
p2);
75
82
void
Init
(
Particle
*
const
p1,
Particle
*
const
p2);
83
90
void
SetBondModel
(
ContactModel
*
const
cnt_model);
91
98
void
SetCollisionModel
(
ContactModel
*
const
cnt_model);
99
106
void
SetDynamicProperty
(std::string
const
&key,
double
value);
107
114
void
EvaluateForces
(
double
dt);
115
119
void
ApplyToParticle
();
120
125
void
ApplyToParticle1
();
126
131
void
ApplyToParticle2
();
132
138
bool
IsActive
();
139
143
void
Clear
();
144
148
void
Print
()
const
;
149
};
150
151
}
// namespace netdem
bond_entry.hpp
netdem::ContactModel
An abstract base class for contact models.
Definition
contact_model.hpp:25
netdem::ContactPP
A class representing a contact between two particles.
Definition
contact_pp.hpp:20
netdem::ContactPP::ContactPP
ContactPP()
Default constructor for the ContactPP class.
Definition
contact_pp.cpp:9
netdem::ContactPP::bond_model
ContactModel * bond_model
The contact model used to calculate contact forces.
Definition
contact_pp.hpp:35
netdem::ContactPP::bond_entries
VecXT< BondEntry > bond_entries
A list of BondEntry objects representing the bonded pairs between particles.
Definition
contact_pp.hpp:41
netdem::ContactPP::ApplyToParticle1
void ApplyToParticle1()
Apply the contact forces and moments to the first particle in the contact pair.
Definition
contact_pp.cpp:78
netdem::ContactPP::particle_2
Particle * particle_2
A pointer to the second particle in the contact pair.
Definition
contact_pp.hpp:30
netdem::ContactPP::dynamic_properties
MiniMap< std::string, double > dynamic_properties
A MiniMap object containing dynamic properties of the contact.
Definition
contact_pp.hpp:60
netdem::ContactPP::Init
void Init(Particle *const p1, Particle *const p2)
Initialize the contact with two particles.
Definition
contact_pp.cpp:13
netdem::ContactPP::Print
void Print() const
Print the properties of the contact.
Definition
contact_pp.cpp:123
netdem::ContactPP::SetCollisionModel
void SetCollisionModel(ContactModel *const cnt_model)
Set the collision model used to calculate collision forces between particles.
Definition
contact_pp.cpp:22
netdem::ContactPP::ApplyToParticle2
void ApplyToParticle2()
Apply the contact forces and moments to the second particle in the contact pair.
Definition
contact_pp.cpp:96
netdem::ContactPP::ApplyToParticle
void ApplyToParticle()
Apply the contact forces and moments to the particles.
Definition
contact_pp.cpp:48
netdem::ContactPP::SetBondModel
void SetBondModel(ContactModel *const cnt_model)
Set the bond model used to calculate bonded forces between particles.
Definition
contact_pp.cpp:18
netdem::ContactPP::SetDynamicProperty
void SetDynamicProperty(std::string const &key, double value)
Set the value of a dynamic property identified by the given key.
Definition
contact_pp.cpp:26
netdem::ContactPP::active
bool active
A flag indicating whether the contact is active.
Definition
contact_pp.hpp:55
netdem::ContactPP::collision_entries
VecXT< CollisionEntry > collision_entries
A list of CollisionEntry objects representing the collision geometries used by the contact model.
Definition
contact_pp.hpp:47
netdem::ContactPP::IsActive
bool IsActive()
Check if the contact is still active.
Definition
contact_pp.cpp:114
netdem::ContactPP::collision_model
ContactModel * collision_model
Definition
contact_pp.hpp:35
netdem::ContactPP::Clear
void Clear()
Reset all properties of the contact.
Definition
contact_pp.cpp:118
netdem::ContactPP::particle_1
Particle * particle_1
A pointer to the first particle in the contact pair.
Definition
contact_pp.hpp:25
netdem::ContactPP::EvaluateForces
void EvaluateForces(double dt)
Calculate and apply the contact forces and moments between particles.
Definition
contact_pp.cpp:30
netdem::MiniMap
Definition
mini_map.hpp:17
netdem::Particle
Definition
particle.hpp:26
collision_entry.hpp
mini_map.hpp
netdem
Definition
bond_entry.hpp:7
netdem::VecXT
std::vector< T > VecXT
Definition
utils_macros.hpp:31
particle.hpp
netdem
src
scene
contact_pp.hpp
Generated by
1.12.0