NetDEM v1.0
Loading...
Searching...
No Matches
model_volume_based.hpp
Go to the documentation of this file.
1#pragma once
2
4#include "contact_model.hpp"
5#include <unordered_map>
6
7namespace netdem {
8
13class VolumeBased : public ContactModel {
14public:
17 int order{2};
19 double kn{2e6}, kt{1e6}, beta{0.7}, mu{0.5};
20
25
33 VolumeBased(double kn, double kt, double mu, double beta);
34
39 nlohmann::json PackJson() override;
40
45 void InitFromJson(nlohmann::json const &js) override;
46
51 void SetProperty(nlohmann::json const &js) override;
52
57 ContactModel *Clone() const override;
58
67 void EvaluateForces(ContactForces *const cnt_forces,
68 CollisionGeometries &cnt_geoms, ContactPP *const cnt,
69 double dt) const override;
70
79 void EvaluateForces(ContactForces *const cnt_forces,
80 CollisionGeometries &cnt_geoms, ContactPW *const cnt,
81 double dt) const override;
82
86 void Print() const override;
87};
88
89} // namespace netdem
An abstract base class for contact models.
Definition contact_model.hpp:25
Contact model that evaluates forces and moments based on volume overlap and relative velocity.
Definition model_volume_based.hpp:13
double beta
Definition model_volume_based.hpp:19
void EvaluateForces(ContactForces *const cnt_forces, CollisionGeometries &cnt_geoms, ContactPP *const cnt, double dt) const override
Evaluates the forces and moments between two particles.
Definition model_volume_based.cpp:72
void SetProperty(nlohmann::json const &js) override
Sets the contact model properties.
Definition model_volume_based.cpp:52
double kt
Definition model_volume_based.hpp:19
void InitFromJson(nlohmann::json const &js) override
Initializes the contact model from a JSON object.
Definition model_volume_based.cpp:34
void Print() const override
Prints the contact model properties.
Definition model_volume_based.cpp:141
int order
Parameters used to calculate contact forces.
Definition model_volume_based.hpp:17
VolumeBased()
Default constructor for VolumeBased.
Definition model_volume_based.cpp:12
nlohmann::json PackJson() override
Packs the contact model properties into a JSON object.
Definition model_volume_based.cpp:23
ContactModel * Clone() const override
Creates a copy of this contact model.
Definition model_volume_based.cpp:70
double kn
Definition model_volume_based.hpp:19
double mu
Definition model_volume_based.hpp:19
Definition bond_entry.hpp:7