29 #ifndef _libDEM_Spring_hpp_
30 #define _libDEM_Spring_hpp_
54 Spring(
Element& el1,
Element& el2,
double stiffness,
double damping,
double max_relative_elongation = 0);
55 Spring(
Element& el1,
Element& el2,
double stiffness,
double damping,
double attrac_coef,
double rep_coeff,
double max_relative_elongation = 0);
66 virtual std::string
info()
const;
69 GRANOO_ACCESS (stiffness ,
double ,
_stiffness );
104 template<
class Archive>
void serialize(Archive&,
const unsigned int);
109 template<
class Archive>
void
111 ar & boost::serialization::base_object<Bond>(*
this);
121 #include <boost/serialization/version.hpp>
128 namespace serialization
130 template<
class Archive>
139 template<
class Archive>
154 GRANOO_CLASS_DECLARE_TPL(DEM::Spring);
BOOST_CLASS_VERSION(GranOO3::DEM::Spring, 0) namespace boost
Definition: Spring.hpp:122
Definition: SetOf.hpp:346
the base class for all bonds between discrete elements.
Definition: Bond.hpp:49
a base class that represents an element
Definition: Element.hpp:55
a bond spring
Definition: Spring.hpp:46
double _attractive_coeff
the attractive coefficient which is used as a multiplication factor on the reaction force when the el...
Definition: Spring.hpp:84
double _elongation_energy
the current elongation energy of the spring
Definition: Spring.hpp:91
virtual void update()
update the current values of elongation, local frame, etc...
Definition: Spring.cpp:83
Geom::Vector _d1
the current relative displacement of the element1 for energy computation (internal usage)
Definition: Spring.hpp:96
Spring & operator=(const Spring &)=delete
virtual ~Spring()
destructor
Definition: Spring.cpp:75
void set_restitution_coeff(double val)
set the current value of the restitution coefficient
Definition: Spring.cpp:134
virtual double compute_critical_time_step() const
compute the critical time of the bond
Definition: Spring.cpp:141
double _repulsive_coeff
the repulsive coefficient which is used as a multiplication factor on the reaction force when the elo...
Definition: Spring.hpp:85
virtual std::string info() const
Display some useful info in the terminal
Definition: Spring.cpp:154
virtual double get_angular_stiffness() const
always return 0 in case of spring
Definition: Spring.cpp:123
void serialize(Archive &, const unsigned int)
complete serializing of the bond in the *.gdd format
Definition: Spring.hpp:110
Geom::Vector _F2
the current force acting on the element2 for energy computation (internal usage)
Definition: Spring.hpp:95
virtual double get_linear_stiffness() const
compute the linear stiffness of the bond
Definition: Spring.cpp:118
double get_restitution_coeff() const
get the current value of the restitution coefficient
Definition: Spring.cpp:129
double _stiffness
the stiffness of the spring in [N/m]
Definition: Spring.hpp:83
void init()
initialize the spring (it does nothing)
Definition: Spring.cpp:79
virtual void compute_load()
trigger the computation of the reaction force and torque of the spring
Definition: Spring.cpp:111
friend class boost::serialization::access
Definition: Spring.hpp:103
void process()
update the current value of reaction force
Definition: Spring.cpp:93
Geom::Vector _direction
the current direction of the spring (for internal usage)
Definition: Spring.hpp:88
Geom::Vector _F1
the current force acting on the element1 for energy computation (internal usage)
Definition: Spring.hpp:94
Spring(const Spring &)=delete
Geom::Vector _d2
the current relative displacement of the element2 for energy computation (internal usage)
Definition: Spring.hpp:97
Definition: Vector.hpp:75
pure virtual class for modeling classes able to compute a critical time step
Definition: CriticalTimeStep.hpp:50
Definition: Common.hpp:198
void save_construct_data(Archive &ar, const GranOO3::Core::Pair< type > *t, const unsigned int)
Definition: Pair.hpp:207
void load_construct_data(Archive &ar, GranOO3::Core::Pair< type > *t, const unsigned int)
Definition: Pair.hpp:217
x y t t *t x y t t t x y t t t x *y t *t t x *y t *t t x y t t t x y t t t t(t+t)") define_sfop3(16