MercuryDPM  Trunk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LinearPlasticViscoelasticNormalSpecies Class Reference

LinearPlasticViscoelasticNormalSpecies contains the parameters used to describe a plastic-cohesive normal force (Stefan Ludings plastic-cohesive force model). More...

#include <LinearPlasticViscoelasticNormalSpecies.h>

+ Inheritance diagram for LinearPlasticViscoelasticNormalSpecies:

Public Types

typedef
LinearPlasticViscoelasticInteraction 
InteractionType
 The correct Interaction type for this FrictionForceSpecies. More...
 

Public Member Functions

 LinearPlasticViscoelasticNormalSpecies ()
 The default constructor. More...
 
 LinearPlasticViscoelasticNormalSpecies (const LinearPlasticViscoelasticNormalSpecies &p)
 The default copy constructor. More...
 
 ~LinearPlasticViscoelasticNormalSpecies ()
 The default destructor. More...
 
void read (std::istream &is)
 Reads the species properties from an input stream. More...
 
void write (std::ostream &os) const
 Writes the species properties to an output stream. More...
 
std::string getBaseName () const
 Used in Species::getName to obtain a unique name for each Species. More...
 
void mix (LinearPlasticViscoelasticNormalSpecies *S, LinearPlasticViscoelasticNormalSpecies *T)
 creates default values for mixed species More...
 
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. More...
 
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. More...
 
void setRestitutionCoefficient (double eps, Mdouble mass)
 Sets disp to obtain a restitution coefficient eps for a collision of two particles of mass m. More...
 
Mdouble getCollisionTime (Mdouble mass) const
 Calculates collision time for two copies of a particle of given disp, k, mass. More...
 
Mdouble getRestitutionCoefficient (Mdouble mass) const
 Calculates restitution coefficient for two copies of given disp, k, mass. More...
 
void setPlasticParameters (Mdouble loadingStiffness, Mdouble unloadingStiffnessMax, Mdouble cohesionStiffness, Mdouble penetrationDepthMax)
 Sets all parameters of the linear plastic-viscoelastic normal force at once. More...
 
Mdouble getLoadingStiffness () const
 Returns the loading stiffness of the linear plastic-viscoelastic normal force. More...
 
Mdouble getUnloadingStiffnessMax () const
 Returns the maximum unloading stiffness of the linear plastic-viscoelastic normal force. More...
 
Mdouble getCohesionStiffness () const
 Returns the cohesive stiffness of the linear plastic-viscoelastic normal force. More...
 
Mdouble getPenetrationDepthMax () const
 Returns the maximum penetration depth of the linear plastic-viscoelastic normal force. More...
 
void setLoadingStiffness (Mdouble loadingStiffness)
 Sets the loading stiffness of the linear plastic-viscoelastic normal force. More...
 
void setUnloadingStiffnessMax (Mdouble unloadingStiffnessMax)
 Sets the maximum unloading stiffness of the linear plastic-viscoelastic normal force. More...
 
void setCohesionStiffness (Mdouble cohesionStiffness)
 Sets the cohesive stiffness of the linear plastic-viscoelastic normal force. More...
 
void setPenetrationDepthMax (Mdouble penetrationDepthMax)
 Sets the maximum penetration depth of the linear plastic-viscoelastic normal force. More...
 
void setDissipation (Mdouble dissipation)
 Sets the linear dissipation coefficient of the linear plastic-viscoelastic normal force. More...
 
MERCURY_DEPRECATED void setLoadingStiffnessAndDissipation (helpers::KAndDisp new_)
 Allows the spring and dissipation constants to be changed simultaneously. More...
 
Mdouble computeTimeStep (Mdouble mass)
 Returns the optimal time step to resolve a collision of two particles of a given mass. More...
 
Mdouble getDissipation () const
 Allows the normal dissipation to be accessed. More...
 
Mdouble computeBondNumberMax (Mdouble harmonicMeanRadius, Mdouble gravitationalAcceleration) const
 1) Computes the maximum plastic overlap delta_p* = phi*r 2) Computes the overlap at which the maximum adhesive force is generated: delta_c* = delta_p* / (1+k_c/k_2*) 3) Computes the maximum adhesive force f_c* = k_c * delta_c* 4) Computes the maximum bond number Bo* = f_c* / (m*g) More...
 
bool getDoConstantUnloadingStiffness () const
 
void setDoConstantUnloadingStiffness (bool doConstantUnloadingStiffness)
 
- Public Member Functions inherited from BaseNormalForce
 BaseNormalForce ()
 
 BaseNormalForce (const BaseNormalForce &p)
 
bool getConstantRestitution () const
 
void setConstantRestitution (bool constantRestitution)
 
- Public Member Functions inherited from BaseForce
BaseSpeciesgetBaseSpecies () const
 
void setBaseSpecies (BaseSpecies *baseSpecies)
 

Private Attributes

Mdouble loadingStiffness_
 (normal) spring constant (k_1) More...
 
Mdouble unloadingStiffnessMax_
 the maximum elastic constant (k_2^max) for plastic deformations More...
 
Mdouble cohesionStiffness_
 the adhesive spring constant (k^c) for plastic deformations More...
 
Mdouble penetrationDepthMax_
 the depth (relative to the normalized radius) at which k_2^max is used (phi_f) More...
 
Mdouble dissipation_
 linear dissipation coefficient More...
 
bool doConstantUnloadingStiffness_ = false
 

Detailed Description

LinearPlasticViscoelasticNormalSpecies contains the parameters used to describe a plastic-cohesive normal force (Stefan Ludings plastic-cohesive force model).

See LinearPlasticViscoelasticNormalInteraction::computeForce for a description of the force law.

Definition at line 40 of file LinearPlasticViscoelasticNormalSpecies.h.

Member Typedef Documentation

Constructor & Destructor Documentation

LinearPlasticViscoelasticNormalSpecies::LinearPlasticViscoelasticNormalSpecies ( )

The default constructor.

Definition at line 35 of file LinearPlasticViscoelasticNormalSpecies.cc.

References cohesionStiffness_, dissipation_, doConstantUnloadingStiffness_, loadingStiffness_, penetrationDepthMax_, and unloadingStiffnessMax_.

36  : BaseNormalForce()
37 {
38  loadingStiffness_ = 0.0;
40  cohesionStiffness_ = 0.0;
42  dissipation_ = 0.0;
44 #ifdef DEBUG_CONSTRUCTOR
45  std::cout<<"LinearPlasticViscoelasticNormalSpecies::LinearPlasticViscoelasticNormalSpecies() finished"<<std::endl;
46 #endif
47 }
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)
Mdouble unloadingStiffnessMax_
the maximum elastic constant (k_2^max) for plastic deformations
Mdouble loadingStiffness_
(normal) spring constant (k_1)
LinearPlasticViscoelasticNormalSpecies::LinearPlasticViscoelasticNormalSpecies ( const LinearPlasticViscoelasticNormalSpecies p)

The default copy constructor.

Parameters
[in]thespecies that is copied

Definition at line 52 of file LinearPlasticViscoelasticNormalSpecies.cc.

References cohesionStiffness_, dissipation_, doConstantUnloadingStiffness_, loadingStiffness_, penetrationDepthMax_, and unloadingStiffnessMax_.

54  : BaseNormalForce(p)
55 {
62 #ifdef DEBUG_CONSTRUCTOR
63  std::cout<<"LinearPlasticViscoelasticNormalSpecies::LinearPlasticViscoelasticNormalSpecies(const LinearPlasticViscoelasticNormalSpecies &p) finished"<<std::endl;
64 #endif
65 }
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)
Mdouble unloadingStiffnessMax_
the maximum elastic constant (k_2^max) for plastic deformations
Mdouble loadingStiffness_
(normal) spring constant (k_1)
LinearPlasticViscoelasticNormalSpecies::~LinearPlasticViscoelasticNormalSpecies ( )

The default destructor.

Definition at line 67 of file LinearPlasticViscoelasticNormalSpecies.cc.

68 {
69 #ifdef DEBUG_DESTRUCTOR
70  std::cout<<"LinearPlasticViscoelasticNormalSpecies::~LinearPlasticViscoelasticNormalSpecies() finished"<<std::endl;
71 #endif
72 }

Member Function Documentation

Mdouble LinearPlasticViscoelasticNormalSpecies::computeBondNumberMax ( Mdouble  harmonicMeanRadius,
Mdouble  gravitationalAcceleration 
) const

1) Computes the maximum plastic overlap delta_p* = phi*r 2) Computes the overlap at which the maximum adhesive force is generated: delta_c* = delta_p* / (1+k_c/k_2*) 3) Computes the maximum adhesive force f_c* = k_c * delta_c* 4) Computes the maximum bond number Bo* = f_c* / (m*g)

Definition at line 337 of file LinearPlasticViscoelasticNormalSpecies.cc.

References cohesionStiffness_, BaseForce::getBaseSpecies(), BaseNormalForce::getConstantRestitution(), logger, penetrationDepthMax_, and unloadingStiffnessMax_.

337  {
338  if (getConstantRestitution()) {
339  //harmonicMeanRadius unused
340  const Mdouble plasticOverlapMax = penetrationDepthMax_;
341  const Mdouble overlapMaxCohesion = plasticOverlapMax / (1 + cohesionStiffness_ / unloadingStiffnessMax_);
342  const Mdouble cohesionAccelerationMax = cohesionStiffness_ * overlapMaxCohesion;
343  return cohesionAccelerationMax / gravitationalAcceleration;
344  } else {
345  const Mdouble plasticOverlapMax = penetrationDepthMax_ * harmonicMeanRadius;
346  const Mdouble overlapMaxCohesion = plasticOverlapMax / (1 + cohesionStiffness_ / unloadingStiffnessMax_);
347  const Mdouble cohesionForceMax = cohesionStiffness_ * overlapMaxCohesion;
348  auto species = dynamic_cast<const ParticleSpecies*>(getBaseSpecies());
349  logger.assert(species,"computeBondNumberMax: species needs to be a ParticleSpecies");
350  const Mdouble gravitationalForce = gravitationalAcceleration * species->getMassFromRadius(harmonicMeanRadius);
351  return cohesionForceMax / gravitationalForce;
352  }
353 }
bool getConstantRestitution() const
BaseSpecies * getBaseSpecies() const
Definition: BaseForce.h:35
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
double Mdouble
Definition: GeneralDefine.h:34
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)
Mdouble unloadingStiffnessMax_
the maximum elastic constant (k_2^max) for plastic deformations
Mdouble LinearPlasticViscoelasticNormalSpecies::computeTimeStep ( Mdouble  mass)

Returns the optimal time step to resolve a collision of two particles of a given mass.

Calculates collision time for stiffest spring constant, divides by 50

Parameters
[in]theoptimal time step is computed to resolve a collision of two particles of this mass. If constant restitution is enabled, the collision time is mass-independent.

Definition at line 217 of file LinearPlasticViscoelasticNormalSpecies.cc.

References dissipation_, BaseNormalForce::getConstantRestitution(), constants::pi, mathsFunc::square(), and unloadingStiffnessMax_.

218 {
219  if (getConstantRestitution()) mass = 1;
220  return 0.02 * constants::pi /
221  std::sqrt(unloadingStiffnessMax_ / (.5 * mass) - mathsFunc::square(dissipation_ / mass));
222 }
bool getConstantRestitution() const
Mdouble unloadingStiffnessMax_
the maximum elastic constant (k_2^max) for plastic deformations
const Mdouble pi
Definition: ExtendedMath.h:45
T square(const T val)
squares a number
Definition: ExtendedMath.h:104
std::string LinearPlasticViscoelasticNormalSpecies::getBaseName ( ) const

Used in Species::getName to obtain a unique name for each Species.

Returns
a string containing the name of the species (minus the word "Species")

Definition at line 104 of file LinearPlasticViscoelasticNormalSpecies.cc.

105 {
106  return "LinearPlasticViscoelastic";
107 }
Mdouble LinearPlasticViscoelasticNormalSpecies::getCohesionStiffness ( ) const

Returns the cohesive stiffness of the linear plastic-viscoelastic normal force.

Returns
the cohesive stiffness of the linear plastic-viscoelastic normal force.

Definition at line 167 of file LinearPlasticViscoelasticNormalSpecies.cc.

References cohesionStiffness_.

Referenced by LinearPlasticViscoelasticInteraction::computeNormalForce(), and mix().

168 {
169  return cohesionStiffness_;
170 }
Mdouble cohesionStiffness_
the adhesive spring constant (k^c) for plastic deformations
Mdouble LinearPlasticViscoelasticNormalSpecies::getCollisionTime ( Mdouble  mass) const

Calculates collision time for two copies of a particle of given disp, k, mass.

Calculates collision time for two copies of a particle of given disp, k, mass If constant restitution is enabled, the collision time is mass-independent.

Todo:
should this use unloading stiffness?

Definition at line 315 of file LinearPlasticViscoelasticNormalSpecies.cc.

References dissipation_, BaseNormalForce::getConstantRestitution(), loadingStiffness_, logger, constants::pi, and mathsFunc::square().

Referenced by getRestitutionCoefficient().

316 {
317  if (getConstantRestitution()) mass = 1;
318 
319  logger.assert(mass > 0, "getCollisionTime(%): mass should be positive",mass);
320 
321  Mdouble elasticContribution = loadingStiffness_ / (.5 * mass);
322  Mdouble elastoDissipativeContribution = elasticContribution - mathsFunc::square(dissipation_ / mass);
323 
324  logger.assert(elastoDissipativeContribution > -1e-8 * elasticContribution,
325  "getCollisionTime(%): values for mass, stiffness and dissipation lead to an overdamped system: reduce dissipation",mass);
326 
327  return constants::pi / std::sqrt(elastoDissipativeContribution);
328 }
bool getConstantRestitution() const
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
double Mdouble
Definition: GeneralDefine.h:34
const Mdouble pi
Definition: ExtendedMath.h:45
Mdouble loadingStiffness_
(normal) spring constant (k_1)
T square(const T val)
squares a number
Definition: ExtendedMath.h:104
Mdouble LinearPlasticViscoelasticNormalSpecies::getDissipation ( ) const

Allows the normal dissipation to be accessed.

Returns
the linear dissipation coefficient

Definition at line 246 of file LinearPlasticViscoelasticNormalSpecies.cc.

References dissipation_.

Referenced by LinearPlasticViscoelasticInteraction::computeNormalForce(), mix(), and SlidingFrictionSpecies::setCollisionTimeAndNormalAndTangentialRestitutionCoefficient().

247 {
248  return dissipation_;
249 }
bool LinearPlasticViscoelasticNormalSpecies::getDoConstantUnloadingStiffness ( ) const
inline
Mdouble LinearPlasticViscoelasticNormalSpecies::getLoadingStiffness ( ) const

Returns the loading stiffness of the linear plastic-viscoelastic normal force.

Returns
the loading stiffness of the linear plastic-viscoelastic normal force.

Definition at line 151 of file LinearPlasticViscoelasticNormalSpecies.cc.

References loadingStiffness_.

Referenced by LinearPlasticViscoelasticInteraction::computeNormalForce(), LinearPlasticViscoelasticInteraction::getElasticEnergy(), LinearPlasticViscoelasticInteraction::getUnloadingStiffness(), mix(), SlidingFrictionSpecies::setCollisionTimeAndNormalAndTangentialRestitutionCoefficient(), and setRestitutionCoefficient().

152 {
153  return loadingStiffness_;
154 }
Mdouble loadingStiffness_
(normal) spring constant (k_1)
Mdouble LinearPlasticViscoelasticNormalSpecies::getPenetrationDepthMax ( ) const

Returns the maximum penetration depth of the linear plastic-viscoelastic normal force.

Returns
the maximum penetration depth of the linear plastic-viscoelastic normal force.

Definition at line 175 of file LinearPlasticViscoelasticNormalSpecies.cc.

References penetrationDepthMax_.

Referenced by LinearPlasticViscoelasticInteraction::computeNormalForce(), LinearPlasticViscoelasticInteraction::getUnloadingStiffness(), and mix().

176 {
177  return penetrationDepthMax_;
178 }
Mdouble penetrationDepthMax_
the depth (relative to the normalized radius) at which k_2^max is used (phi_f)
Mdouble LinearPlasticViscoelasticNormalSpecies::getRestitutionCoefficient ( Mdouble  mass) const

Calculates restitution coefficient for two copies of given disp, k, mass.

Definition at line 330 of file LinearPlasticViscoelasticNormalSpecies.cc.

References dissipation_, mathsFunc::exp(), getCollisionTime(), and BaseNormalForce::getConstantRestitution().

331 {
332  if (getConstantRestitution()) mass = 1;
333 
334  return std::exp(-dissipation_ / mass * getCollisionTime(mass));
335 }
bool getConstantRestitution() const
Mdouble exp(Mdouble Exponent)
Definition: ExtendedMath.cc:84
Mdouble getCollisionTime(Mdouble mass) const
Calculates collision time for two copies of a particle of given disp, k, mass.
Mdouble LinearPlasticViscoelasticNormalSpecies::getUnloadingStiffnessMax ( ) const

Returns the maximum unloading stiffness of the linear plastic-viscoelastic normal force.

Returns
the maximum unloading stiffness of the linear plastic-viscoelastic normal force.

Definition at line 159 of file LinearPlasticViscoelasticNormalSpecies.cc.

References unloadingStiffnessMax_.

Referenced by LinearPlasticViscoelasticInteraction::computeNormalForce(), LinearPlasticViscoelasticInteraction::getUnloadingStiffness(), and mix().

160 {
161  return unloadingStiffnessMax_;
162 }
Mdouble unloadingStiffnessMax_
the maximum elastic constant (k_2^max) for plastic deformations
void LinearPlasticViscoelasticNormalSpecies::mix ( LinearPlasticViscoelasticNormalSpecies S,
LinearPlasticViscoelasticNormalSpecies T 
)

creates default values for mixed species

For all parameters we assume that the harmonic mean of the parameters of the original two species is a sensible default.

Parameters
[in]S,Tthe two species whose properties are mixed to create the new species

Definition at line 114 of file LinearPlasticViscoelasticNormalSpecies.cc.

References BaseSpecies::average(), cohesionStiffness_, dissipation_, doConstantUnloadingStiffness_, getCohesionStiffness(), getDissipation(), getLoadingStiffness(), getPenetrationDepthMax(), getUnloadingStiffnessMax(), loadingStiffness_, logger, penetrationDepthMax_, and unloadingStiffnessMax_.

116 {
122  logger.assert(S->doConstantUnloadingStiffness_==T->doConstantUnloadingStiffness_,"you cannot mix species where doConstantUnloadingStiffness is not the same");
124 }
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
Mdouble getUnloadingStiffnessMax() const
Returns the maximum unloading stiffness of the linear plastic-viscoelastic normal force...
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)
Mdouble getCohesionStiffness() const
Returns the cohesive stiffness of the linear plastic-viscoelastic normal force.
Mdouble unloadingStiffnessMax_
the maximum elastic constant (k_2^max) for plastic deformations
static Mdouble average(Mdouble a, Mdouble b)
Returns the harmonic mean of two variables.
Definition: BaseSpecies.cc:110
Mdouble getDissipation() const
Allows the normal dissipation to be accessed.
Mdouble loadingStiffness_
(normal) spring constant (k_1)
Mdouble getPenetrationDepthMax() const
Returns the maximum penetration depth of the linear plastic-viscoelastic normal force.
Mdouble getLoadingStiffness() const
Returns the loading stiffness of the linear plastic-viscoelastic normal force.
void LinearPlasticViscoelasticNormalSpecies::read ( std::istream &  is)

Reads the species properties from an input stream.

Parameters
[in]inputstream (typically the restart file)

Definition at line 90 of file LinearPlasticViscoelasticNormalSpecies.cc.

References cohesionStiffness_, dissipation_, doConstantUnloadingStiffness_, loadingStiffness_, penetrationDepthMax_, and unloadingStiffnessMax_.

91 {
92  std::string dummy;
93  is >> dummy >> loadingStiffness_;
94  is >> dummy >> unloadingStiffnessMax_;
95  helpers::readOptionalVariable<bool>(is,"doConstantUnloadingStiffness",doConstantUnloadingStiffness_);
96  is >> dummy >> cohesionStiffness_;
97  is >> dummy >> penetrationDepthMax_;
98  is >> dummy >> dissipation_;
99 }
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)
Mdouble unloadingStiffnessMax_
the maximum elastic constant (k_2^max) for plastic deformations
Mdouble loadingStiffness_
(normal) spring constant (k_1)
void LinearPlasticViscoelasticNormalSpecies::setCohesionStiffness ( Mdouble  cohesionStiffness)

Sets the cohesive stiffness of the linear plastic-viscoelastic normal force.

Parameters
[in]cohesionStiffnessthe cohesive stiffness of the linear plastic-viscoelastic normal force.

Definition at line 199 of file LinearPlasticViscoelasticNormalSpecies.cc.

References cohesionStiffness_.

Referenced by setPlasticParameters().

200 {
201  cohesionStiffness_ = cohesionStiffness;
202 }
Mdouble cohesionStiffness_
the adhesive spring constant (k^c) for plastic deformations
void LinearPlasticViscoelasticNormalSpecies::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.

Recall the resitution constant is a function of k, disp and the mass of each particle in the collision See also setCollisionTimeAndRestitutionCoefficient(Mdouble tc, Mdouble eps, Mdouble mass)

Sets k, disp such that it matches a given tc and eps for a collision of two copies of equal mass m

Parameters
[in]tccollision time
[in]epsrestitution coefficient
[in]massharmonic mean of particle mass, \(\frac{2}{1/m1+1/m2}\) If constant restitution is enabled, the collision time and restitution is mass-independent.
Todo:
TW: check that the masses are described correctly here (m_eff or m_p?))

Definition at line 260 of file LinearPlasticViscoelasticNormalSpecies.cc.

References dissipation_, BaseNormalForce::getConstantRestitution(), loadingStiffness_, mathsFunc::log(), constants::pi, mathsFunc::square(), and unloadingStiffnessMax_.

261 {
262  if (getConstantRestitution()) mass = 1;
263  if (eps == 0.0)
264  {
266  dissipation_ = std::sqrt(2.0 * mass * loadingStiffness_);
267  }
268  else
269  {
270  dissipation_ = -mass / tc * std::log(eps);
272  .5 * mass * (mathsFunc::square(constants::pi / tc) + mathsFunc::square(dissipation_ / mass));
273  }
275 }
bool getConstantRestitution() const
Mdouble log(Mdouble Power)
Mdouble unloadingStiffnessMax_
the maximum elastic constant (k_2^max) for plastic deformations
const Mdouble pi
Definition: ExtendedMath.h:45
Mdouble loadingStiffness_
(normal) spring constant (k_1)
T square(const T val)
squares a number
Definition: ExtendedMath.h:104
void LinearPlasticViscoelasticNormalSpecies::setDissipation ( Mdouble  dissipation)

Sets the linear dissipation coefficient of the linear plastic-viscoelastic normal force.

should be non-negative

Parameters
[in]thelinear dissipation coefficient of the linear plastic-viscoelastic normal force.

Definition at line 228 of file LinearPlasticViscoelasticNormalSpecies.cc.

References dissipation_, and logger.

Referenced by SlidingFrictionSpecies::setCollisionTimeAndNormalAndTangentialRestitutionCoefficient(), and setLoadingStiffnessAndDissipation().

229 {
230  logger.assert(dissipation >= 0, "setDissipation(%): dissipation should be non-negative",dissipation);
231  dissipation_ = dissipation;
232 }
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
void LinearPlasticViscoelasticNormalSpecies::setDoConstantUnloadingStiffness ( bool  doConstantUnloadingStiffness)
inline
void LinearPlasticViscoelasticNormalSpecies::setLoadingStiffness ( Mdouble  loadingStiffness)

Sets the loading stiffness of the linear plastic-viscoelastic normal force.

Parameters
[in]loadingStiffnessthe loading stiffness of the linear plastic-viscoelastic normal force.

Definition at line 183 of file LinearPlasticViscoelasticNormalSpecies.cc.

References loadingStiffness_.

Referenced by SlidingFrictionSpecies::setCollisionTimeAndNormalAndTangentialRestitutionCoefficient(), setLoadingStiffnessAndDissipation(), and setPlasticParameters().

184 {
185  loadingStiffness_ = loadingStiffness;
186 }
Mdouble loadingStiffness_
(normal) spring constant (k_1)
void LinearPlasticViscoelasticNormalSpecies::setLoadingStiffnessAndDissipation ( helpers::KAndDisp  new_)

Allows the spring and dissipation constants to be changed simultaneously.

Parameters
[in]ahelper struct containing both the loading stiffness and the disssipation coefficient.

Definition at line 237 of file LinearPlasticViscoelasticNormalSpecies.cc.

References helpers::KAndDisp::disp, helpers::KAndDisp::k, setDissipation(), and setLoadingStiffness().

238 {
239  setLoadingStiffness(new_.k);
240  setDissipation(new_.disp);
241 }
Mdouble disp
Definition: Helpers.h:49
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 LinearPlasticViscoelasticNormalSpecies::setPenetrationDepthMax ( Mdouble  penetrationDepthMax)

Sets the maximum penetration depth of the linear plastic-viscoelastic normal force.

Parameters
[in]penetrationDepthMaxthe maximum penetration depth of the linear plastic-viscoelastic normal force.

Definition at line 207 of file LinearPlasticViscoelasticNormalSpecies.cc.

References penetrationDepthMax_.

Referenced by setPlasticParameters().

208 {
209  penetrationDepthMax_ = penetrationDepthMax;
210 }
Mdouble penetrationDepthMax_
the depth (relative to the normalized radius) at which k_2^max is used (phi_f)
void LinearPlasticViscoelasticNormalSpecies::setPlasticParameters ( Mdouble  loadingStiffness,
Mdouble  unloadingStiffnessMax,
Mdouble  cohesionStiffness,
Mdouble  penetrationDepthMax 
)

Sets all parameters of the linear plastic-viscoelastic normal force at once.

Parameters
[in]loadingStiffnessthe loading stiffness of the linear plastic-viscoelastic normal force.
[in]unloadingStiffnessMaxthe maximum unloading stiffness of the linear plastic-viscoelastic normal force.
[in]cohesionStiffnessthe cohesive stiffness of the linear plastic-viscoelastic normal force.
[in]penetrationDepthMaxthe maximum penetration depth of the linear plastic-viscoelastic normal force.

Definition at line 133 of file LinearPlasticViscoelasticNormalSpecies.cc.

References setCohesionStiffness(), setLoadingStiffness(), setPenetrationDepthMax(), and setUnloadingStiffnessMax().

135 {
136  if (loadingStiffness <= 0 || unloadingStiffnessMax < loadingStiffness || cohesionStiffness < 0 ||
137  penetrationDepthMax < 0 || penetrationDepthMax > 1)
138  {
139  std::cerr << "Error: arguments of setPlasticParameters do not make sense" << std::endl;
140  exit(-1);
141  }
142  setLoadingStiffness(loadingStiffness);
143  setUnloadingStiffnessMax(unloadingStiffnessMax);
144  setCohesionStiffness(cohesionStiffness);
145  setPenetrationDepthMax(penetrationDepthMax);
146 }
void setCohesionStiffness(Mdouble cohesionStiffness)
Sets the cohesive stiffness of the linear plastic-viscoelastic normal force.
void setPenetrationDepthMax(Mdouble penetrationDepthMax)
Sets the maximum penetration depth of the linear plastic-viscoelastic normal force.
void setLoadingStiffness(Mdouble loadingStiffness)
Sets the loading stiffness of the linear plastic-viscoelastic normal force.
void setUnloadingStiffnessMax(Mdouble unloadingStiffnessMax)
Sets the maximum unloading stiffness of the linear plastic-viscoelastic normal force.
void LinearPlasticViscoelasticNormalSpecies::setRestitutionCoefficient ( double  eps,
Mdouble  mass 
)

Sets disp to obtain a restitution coefficient eps for a collision of two particles of mass m.

Sets k, disp such that it matches a given tc and eps for a collision of two copies of P

Parameters
[in]stiffnessstiffness
[in]epsrestitution coefficient
[in]masseffective particle mass, \(\frac{2}{1/m1+1/m2}\) If constant restitution is enabled, the restitution coefficient is mass-independent.

Definition at line 298 of file LinearPlasticViscoelasticNormalSpecies.cc.

References dissipation_, BaseNormalForce::getConstantRestitution(), getLoadingStiffness(), mathsFunc::log(), constants::sqr_pi, and mathsFunc::square().

Referenced by setStiffnessAndRestitutionCoefficient().

299 {
300  if (getConstantRestitution()) mass = 1;
301  if (eps == 0.0) {
302  dissipation_ = std::sqrt(2.0 * mass * getLoadingStiffness());
303  } else {
304  const Mdouble logEps = log(eps);
305  dissipation_ = -std::sqrt(2.0 * mass * getLoadingStiffness()
306  / (constants::sqr_pi + mathsFunc::square(logEps))) * logEps;
307  }
308 }
bool getConstantRestitution() const
double Mdouble
Definition: GeneralDefine.h:34
Mdouble log(Mdouble Power)
T square(const T val)
squares a number
Definition: ExtendedMath.h:104
const Mdouble sqr_pi
Definition: ExtendedMath.h:47
Mdouble getLoadingStiffness() const
Returns the loading stiffness of the linear plastic-viscoelastic normal force.
void LinearPlasticViscoelasticNormalSpecies::setStiffnessAndRestitutionCoefficient ( Mdouble  stiffness,
Mdouble  eps,
Mdouble  mass 
)

Sets k, disp such that it matches a given tc and eps for a collision of two copies of P.

Sets k, disp such that it matches a given tc and eps for a collision of two copies of P

Parameters
[in]stiffnessstiffness
[in]epsrestitution coefficient
[in]masseffective particle mass, \(\frac{2}{1/m1+1/m2}\) If constant restitution is enabled, the restitution coefficient is mass-independent.

Definition at line 284 of file LinearPlasticViscoelasticNormalSpecies.cc.

References BaseNormalForce::getConstantRestitution(), loadingStiffness_, and setRestitutionCoefficient().

285 {
286  if (getConstantRestitution()) mass = 1;
287  loadingStiffness_ = stiffness;
288  setRestitutionCoefficient(eps, mass);
289 }
bool getConstantRestitution() const
void setRestitutionCoefficient(double eps, Mdouble mass)
Sets disp to obtain a restitution coefficient eps for a collision of two particles of mass m...
Mdouble loadingStiffness_
(normal) spring constant (k_1)
void LinearPlasticViscoelasticNormalSpecies::setUnloadingStiffnessMax ( Mdouble  unloadingStiffnessMax)

Sets the maximum unloading stiffness of the linear plastic-viscoelastic normal force.

Parameters
[in]unloadingStiffnessMaxthe maximum unloading stiffness of the linear plastic-viscoelastic normal force.

Definition at line 191 of file LinearPlasticViscoelasticNormalSpecies.cc.

References unloadingStiffnessMax_.

Referenced by setPlasticParameters().

192 {
193  unloadingStiffnessMax_ = unloadingStiffnessMax;
194 }
Mdouble unloadingStiffnessMax_
the maximum elastic constant (k_2^max) for plastic deformations
void LinearPlasticViscoelasticNormalSpecies::write ( std::ostream &  os) const

Writes the species properties to an output stream.

Parameters
[out]outputstream (typically the restart file)

Definition at line 77 of file LinearPlasticViscoelasticNormalSpecies.cc.

References cohesionStiffness_, dissipation_, doConstantUnloadingStiffness_, loadingStiffness_, penetrationDepthMax_, and unloadingStiffnessMax_.

78 {
79  os << " loadingStiffness " << loadingStiffness_;
80  os << " maxUnloadingStiffness " << unloadingStiffnessMax_;
81  if (doConstantUnloadingStiffness_) os << " doConstantUnloadingStiffness " << doConstantUnloadingStiffness_;
82  os << " cohesionStiffness " << cohesionStiffness_;
83  os << " maxPenetration " << penetrationDepthMax_;
84  os << " dissipation " << dissipation_;
85 }
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)
Mdouble unloadingStiffnessMax_
the maximum elastic constant (k_2^max) for plastic deformations
Mdouble loadingStiffness_
(normal) spring constant (k_1)

Member Data Documentation

Mdouble LinearPlasticViscoelasticNormalSpecies::cohesionStiffness_
private

the adhesive spring constant (k^c) for plastic deformations

Definition at line 181 of file LinearPlasticViscoelasticNormalSpecies.h.

Referenced by computeBondNumberMax(), getCohesionStiffness(), LinearPlasticViscoelasticNormalSpecies(), mix(), read(), setCohesionStiffness(), and write().

bool LinearPlasticViscoelasticNormalSpecies::doConstantUnloadingStiffness_ = false
private
Mdouble LinearPlasticViscoelasticNormalSpecies::penetrationDepthMax_
private

the depth (relative to the normalized radius) at which k_2^max is used (phi_f)

Definition at line 184 of file LinearPlasticViscoelasticNormalSpecies.h.

Referenced by computeBondNumberMax(), getPenetrationDepthMax(), LinearPlasticViscoelasticNormalSpecies(), mix(), read(), setPenetrationDepthMax(), and write().

Mdouble LinearPlasticViscoelasticNormalSpecies::unloadingStiffnessMax_
private

The documentation for this class was generated from the following files: