NetDEM
v1.0
Loading...
Searching...
No Matches
contact_pw.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
#include "
wall.hpp
"
8
#include <string>
9
10
namespace
netdem
{
11
12
class
Particle;
13
class
Wall;
14
22
class
ContactPW
{
23
public
:
27
Particle
*
particle
{
nullptr
};
28
32
Wall
*
wall
{
nullptr
};
33
37
ContactModel
*
bond_model
{
nullptr
}, *
collision_model
{
nullptr
};
38
43
VecXT<BondEntry>
bond_entries
;
44
49
VecXT<CollisionEntry>
collision_entries
;
50
57
bool
active
{
true
};
58
62
MiniMap<std::string, double>
dynamic_properties
;
63
67
ContactPW
();
68
76
ContactPW
(
Particle
*
const
p,
Wall
*
const
w);
77
84
void
Init
(
Particle
*
const
p,
Wall
*
const
w);
85
92
void
SetBondModel
(
ContactModel
*
const
cnt_model);
93
100
void
SetCollisionModel
(
ContactModel
*
const
cnt_model);
101
108
void
SetDynamicProperty
(std::string
const
&key,
double
value);
109
116
void
EvaluateForces
(
double
dt);
117
121
void
ApplyToParticle
();
122
126
void
ApplyToWall
();
127
133
bool
IsActive
();
134
138
void
Clear
();
139
143
void
Print
()
const
;
144
};
145
146
}
// namespace netdem
bond_entry.hpp
netdem::ContactModel
An abstract base class for contact models.
Definition
contact_model.hpp:25
netdem::ContactPW
A class representing a contact between a particle and a wall.
Definition
contact_pw.hpp:22
netdem::ContactPW::collision_entries
VecXT< CollisionEntry > collision_entries
A list of CollisionEntry objects representing the collision geometries used by the contact model.
Definition
contact_pw.hpp:49
netdem::ContactPW::particle
Particle * particle
A pointer to the particle in the contact pair.
Definition
contact_pw.hpp:27
netdem::ContactPW::Clear
void Clear()
Reset all properties of the contact.
Definition
contact_pw.cpp:88
netdem::ContactPW::dynamic_properties
MiniMap< std::string, double > dynamic_properties
A MiniMap object containing dynamic properties of the contact.
Definition
contact_pw.hpp:62
netdem::ContactPW::SetBondModel
void SetBondModel(ContactModel *const cnt_model)
Set the bond model used to calculate bonded forces between the particle and the wall.
Definition
contact_pw.cpp:18
netdem::ContactPW::IsActive
bool IsActive()
Check if the contact is still active.
Definition
contact_pw.cpp:84
netdem::ContactPW::ApplyToParticle
void ApplyToParticle()
Apply the contact forces and moments to the particle.
Definition
contact_pw.cpp:48
netdem::ContactPW::Init
void Init(Particle *const p, Wall *const w)
Initialize the contact with a particle and a wall.
Definition
contact_pw.cpp:13
netdem::ContactPW::Print
void Print() const
Print the properties of the contact.
Definition
contact_pw.cpp:93
netdem::ContactPW::wall
Wall * wall
A pointer to the wall in the contact pair.
Definition
contact_pw.hpp:32
netdem::ContactPW::SetCollisionModel
void SetCollisionModel(ContactModel *const cnt_model)
Set the collision model used to calculate collision forces between the particle and the wall.
Definition
contact_pw.cpp:22
netdem::ContactPW::bond_model
ContactModel * bond_model
The contact model used to calculate contact forces.
Definition
contact_pw.hpp:37
netdem::ContactPW::EvaluateForces
void EvaluateForces(double dt)
Calculate and apply the contact forces and moments between the particle and the wall.
Definition
contact_pw.cpp:30
netdem::ContactPW::active
bool active
A flag indicating whether the contact is active.
Definition
contact_pw.hpp:57
netdem::ContactPW::ApplyToWall
void ApplyToWall()
Apply the contact forces and moments to the wall.
Definition
contact_pw.cpp:66
netdem::ContactPW::ContactPW
ContactPW()
Default constructor for the ContactPW class.
Definition
contact_pw.cpp:9
netdem::ContactPW::collision_model
ContactModel * collision_model
Definition
contact_pw.hpp:37
netdem::ContactPW::bond_entries
VecXT< BondEntry > bond_entries
A list of BondEntry objects representing the bonded pairs between the particle and the wall.
Definition
contact_pw.hpp:43
netdem::ContactPW::SetDynamicProperty
void SetDynamicProperty(std::string const &key, double value)
Set the value of a dynamic property identified by the given key.
Definition
contact_pw.cpp:26
netdem::MiniMap
Definition
mini_map.hpp:17
netdem::Particle
Definition
particle.hpp:26
netdem::Wall
A class representing a wall object in a physics simulation.
Definition
wall.hpp:32
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
wall.hpp
netdem
src
scene
contact_pw.hpp
Generated by
1.12.0