40 #ifdef DEBUG_CONSTRUCTOR
41 std::cout<<
"LinearPlasticViscoelasticNormalSpecies::LinearPlasticViscoelasticNormalSpecies() finished"<<std::endl;
55 #ifdef DEBUG_CONSTRUCTOR
56 std::cout<<
"LinearPlasticViscoelasticNormalSpecies::LinearPlasticViscoelasticNormalSpecies(const LinearPlasticViscoelasticNormalSpecies &p) finished"<<std::endl;
62 #ifdef DEBUG_DESTRUCTOR
63 std::cout<<
"LinearPlasticViscoelasticNormalSpecies::~LinearPlasticViscoelasticNormalSpecies() finished"<<std::endl;
97 return "LinearPlasticViscoelastic";
122 if (loadingStiffness <= 0 || unloadingStiffnessMax < loadingStiffness || cohesionStiffness < 0 || penetrationDepthMax < 0 || penetrationDepthMax > 1)
124 std::cerr <<
"Error: arguments of setPlasticParameters do not make sense" << std::endl;
212 if (dissipation >= 0)
218 std::cerr <<
"Error in setDissipation(" << dissipation <<
")" << std::endl;
280 std::cerr <<
"Error in getCollisionTime(" << mass <<
") mass is not set or has an unexpected value, (getCollisionTime(" << mass <<
"))" << std::endl;
285 std::cerr <<
"Error in getCollisionTime(" << mass <<
") stiffness=" <<
loadingStiffness_ <<
" is not set or has an unexpected value, (getCollisionTime(" << mass <<
"), with stiffness=" <<
loadingStiffness_ <<
")" << std::endl;
290 std::cerr <<
"Error in getCollisionTime(" << mass <<
") dissipation=" <<
dissipation_ <<
" is not set or has an unexpected value, (getCollisionTime(" << mass <<
"), with dissipation=" <<
dissipation_ <<
")" << std::endl;
296 std::cerr <<
"Error in getCollisionTime(" << mass <<
") values for mass, stiffness and dissipation would "
297 "lead to an overdamped system: reduce dissipation." << std::endl;
void setCohesionStiffness(Mdouble cohesionStiffness)
Sets the cohesive stiffness of the linear plastic-viscoelastic normal force.
return type specifically for fuctions returning k and disp at once
Mdouble getCollisionTime(Mdouble mass)
Calculates collision time for two copies of a particle of given disp, k, mass.
Mdouble getUnloadingStiffnessMax() const
Returns the maximum unloading stiffness of the linear plastic-viscoelastic normal force...
MERCURY_DEPRECATED void setLoadingStiffnessAndDissipation(helpers::KAndDisp new_)
Allows the spring and dissipation constants to be changed simultaneously.
Mdouble log(Mdouble Power)
T square(T val)
squares a number
Mdouble cohesionStiffness_
the adhesive spring constant (k^c) for plastic deformations
Mdouble penetrationDepthMax_
the depth (relative to the normalized radius) at which k_2^max is used (phi_f)
LinearPlasticViscoelasticNormalSpecies()
The default constructor.
void setPenetrationDepthMax(Mdouble penetrationDepthMax)
Sets the maximum penetration depth of the linear plastic-viscoelastic normal force.
Mdouble getCohesionStiffness() const
Returns the cohesive stiffness of the linear plastic-viscoelastic normal force.
Mdouble computeTimeStep(Mdouble mass)
Returns the optimal time step to resolve a collision of two particles of a given mass.
Mdouble unloadingStiffnessMax_
the maximum elastic constant (k_2^max) for plastic deformations
Mdouble average(Mdouble a, Mdouble b)
defines the average of two variables by the harmonic mean.
void setCollisionTimeAndRestitutionCoefficient(Mdouble tc, Mdouble eps, Mdouble mass)
Set k, disp such that is matches a given tc and eps for a collision of two different masses...
Mdouble getDissipation() const
Allows the normal dissipation to be accessed.
Mdouble dissipation_
linear dissipation coefficient
void setLoadingStiffness(Mdouble loadingStiffness)
Sets the loading stiffness of the linear plastic-viscoelastic normal force.
void setDissipation(Mdouble dissipation)
Sets the linear dissipation coefficient of the linear plastic-viscoelastic normal force...
void mix(LinearPlasticViscoelasticNormalSpecies *const S, LinearPlasticViscoelasticNormalSpecies *const T)
creates default values for mixed species
Mdouble loadingStiffness_
(normal) spring constant (k_1)
void setPlasticParameters(Mdouble loadingStiffness, Mdouble unloadingStiffnessMax, Mdouble cohesionStiffness, Mdouble penetrationDepthMax)
Sets all parameters of the linear plastic-viscoelastic normal force at once.
void setStiffnessAndRestitutionCoefficient(Mdouble k_, Mdouble eps, Mdouble mass)
Sets k, disp such that it matches a given tc and eps for a collision of two copies of P...
Defines the basic properties that a interactable object can have.
LinearPlasticViscoelasticNormalSpecies contains the parameters used to describe a plastic-cohesive no...
std::string getBaseName() const
Used in Species::getName to obtain a unique name for each Species.
Mdouble getPenetrationDepthMax() const
Returns the maximum penetration depth of the linear plastic-viscoelastic normal force.
virtual ~LinearPlasticViscoelasticNormalSpecies()
The default destructor.
void setUnloadingStiffnessMax(Mdouble unloadingStiffnessMax)
Sets the maximum unloading stiffness of the linear plastic-viscoelastic normal force.
void write(std::ostream &os) const
Writes the species properties to an output stream.
void read(std::istream &is)
Reads the species properties from an input stream.
Mdouble getLoadingStiffness() const
Returns the loading stiffness of the linear plastic-viscoelastic normal force.