Contact model that uses linear spring elements to evaluate contact forces and moments.
More...
#include <model_linear_spring.hpp>
|
| LinearSpring () |
| Default constructor for LinearSpring.
|
|
| LinearSpring (double kn, double kt, double mu, double beta) |
| Constructor for LinearSpring.
|
|
nlohmann::json | PackJson () override |
| Packs the contact model properties into a JSON object.
|
|
void | InitFromJson (nlohmann::json const &js) override |
| Initializes the contact model from a JSON object.
|
|
void | SetProperty (nlohmann::json const &js) override |
| Sets the contact model properties.
|
|
void | SetProperty (std::string const &name, double value) override |
| Sets a specific contact model property.
|
|
ContactModel * | Clone () const override |
| Creates a copy of this contact model.
|
|
void | EvaluateForces (ContactForces *const cnt_forces, CollisionGeometries &cnt_geoms, ContactPP *const cnt, double dt) const override |
| Evaluates the forces and moments between two particles using linear spring elements.
|
|
void | EvaluateForces (ContactForces *const cnt_forces, CollisionGeometries &cnt_geoms, ContactPW *const cnt, double dt) const override |
| Evaluates the forces and moments between a particle and a wall using linear spring elements.
|
|
void | Print () const override |
| Prints the contact model properties.
|
|
virtual void | EvaluateForces (ContactForces *const cnt_forces, BondGeometries &cnt_geoms, ContactPP *const cnt, double dt) const |
| Calculate the contact forces and moments due to this model.
|
|
virtual void | EvaluateForces (ContactForces *const cnt_forces, BondGeometries &cnt_geoms, ContactPW *const cnt, double dt) const |
| Calculate the contact forces and moments due to this model.
|
|
virtual | ~ContactModel () |
|
|
double | kn {2e6} |
| < Parameters used to calculate contact forces.
|
|
double | kt {1e6} |
|
double | beta {0.7} |
|
double | mu {0.5} |
|
int | id {0} |
|
std::string | label {"default"} |
|
int | model_type {0} |
|
std::string | model_name {"contact_model"} |
|
Contact model that uses linear spring elements to evaluate contact forces and moments.
The linear spring contact model calculates the contact force based on the contact deformation, which is proportional to the normal displacement between two particles. The tangential force is calculated based on the Coulomb's friction law.
- Examples
- 00_contact_test_sphere.cpp, 00_hertz_contact.cpp, 00_nut_in_bolt.cpp, 01_contact_test_trimesh.cpp, 02_energy_test.cpp, 03_friction_test_sphere.cpp, 04_friction_test_trimesh.cpp, 0_geometric_solver.cpp, 0_plane_case.cpp, 10_contact_test_sphere.cpp, 11_contact_test_trimesh.cpp, 1_gjk_solver.cpp, 1_membrane_case.cpp, 1_test_triaxial_comp.cpp, 21_test_dataset_ellipsoid_plane.cpp, 26_test_ann_vs_geom_ellipsoid_plane.cpp, 2_sdf_solver.cpp, 31_test_dataset_ellipsoid.cpp, 36_test_ann_vs_geom_ellipsoid.cpp, 37_test_ann_vs_geom_ellipsoid.cpp, 3_hybrid_solver.cpp, 81_golf_ball_impact.cpp, 81_voronoi_packing.cpp, 90_packing_demo.cpp, 90_random_packing.cpp, 91_packing_ellipsoid.cpp, 91_triaixal_comp_trimesh.cpp, 92_angle_repose_trimesh.cpp, 92_nut_in_bolt.cpp, 93_triaixal_comp_trimesh.cpp, 94_angle_repose_trimesh.cpp, 96_random_packing_ellipsoid.cpp, angle_repose_main.cpp, blade_mixing_main.cpp, landslide_main.cpp, and odemetric_comp_main.cpp.
◆ LinearSpring() [1/2]
netdem::LinearSpring::LinearSpring |
( |
| ) |
|
◆ LinearSpring() [2/2]
netdem::LinearSpring::LinearSpring |
( |
double | kn, |
|
|
double | kt, |
|
|
double | mu, |
|
|
double | beta ) |
Constructor for LinearSpring.
- Parameters
-
kn | Normal stiffness parameter used to calculate contact forces. |
kt | Tangential stiffness parameter used to calculate contact forces. |
mu | Coefficient of friction used to calculate contact forces. |
beta | Coefficient of restitution used to calculate contact forces. |
◆ Clone()
Creates a copy of this contact model.
- Returns
- A new instance of the contact model.
Reimplemented from netdem::ContactModel.
◆ EvaluateForces() [1/2]
Evaluates the forces and moments between two particles using linear spring elements.
- Parameters
-
cnt_forces | The contact forces data structure to store the results. |
cnt_geoms | The collision geometries data structure containing the contact information. |
cnt | The contact point between the two particles. |
dt | The simulation timestep. |
Reimplemented from netdem::ContactModel.
◆ EvaluateForces() [2/2]
Evaluates the forces and moments between a particle and a wall using linear spring elements.
- Parameters
-
cnt_forces | The contact forces data structure to store the results. |
cnt_geoms | The collision geometries data structure containing the contact information. |
cnt | The contact point between the particle and the wall. |
dt | The simulation timestep. |
Reimplemented from netdem::ContactModel.
◆ InitFromJson()
void netdem::LinearSpring::InitFromJson |
( |
nlohmann::json const & | js | ) |
|
|
overridevirtual |
Initializes the contact model from a JSON object.
- Parameters
-
js | A JSON object containing the contact model properties. |
Reimplemented from netdem::ContactModel.
◆ PackJson()
nlohmann::json netdem::LinearSpring::PackJson |
( |
| ) |
|
|
overridevirtual |
Packs the contact model properties into a JSON object.
- Returns
- A JSON object containing the contact model properties.
Reimplemented from netdem::ContactModel.
◆ Print()
void netdem::LinearSpring::Print |
( |
| ) |
const |
|
overridevirtual |
◆ SetProperty() [1/2]
void netdem::LinearSpring::SetProperty |
( |
nlohmann::json const & | js | ) |
|
|
overridevirtual |
Sets the contact model properties.
- Parameters
-
js | A JSON object containing the contact model properties. |
Reimplemented from netdem::ContactModel.
◆ SetProperty() [2/2]
void netdem::LinearSpring::SetProperty |
( |
std::string const & | name, |
|
|
double | value ) |
|
overridevirtual |
Sets a specific contact model property.
- Parameters
-
name | The name of the property to set. |
value | The value to set the property to. |
Reimplemented from netdem::ContactModel.
◆ beta
double netdem::LinearSpring::beta {0.7} |
◆ kn
double netdem::LinearSpring::kn {2e6} |
< Parameters used to calculate contact forces.
◆ kt
double netdem::LinearSpring::kt {1e6} |
◆ mu
double netdem::LinearSpring::mu {0.5} |
The documentation for this class was generated from the following files: