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

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

#include <SinterNormalSpecies.h>

+ Inheritance diagram for SinterNormalSpecies:

Public Types

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

Public Member Functions

 SinterNormalSpecies ()
 The default constructor. More...
 
 SinterNormalSpecies (const SinterNormalSpecies &p)
 The default copy constructor. More...
 
 ~SinterNormalSpecies ()
 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 (SinterNormalSpecies *S, SinterNormalSpecies *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...
 
Mdouble getCollisionTime (Mdouble mass)
 Calculates collision time for two copies of a particle 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...
 
Mdouble getDissipation () const
 Allows the normal dissipation to be accessed. More...
 
void setSinterAdhesion (Mdouble sinterAdhesion)
 Sets sinterAdhesion_. More...
 
Mdouble getSinterAdhesion () const
 Accesses sinterAdhesion_. More...
 
void setInverseSinterViscosity (Mdouble inverseSinterViscosity)
 Sets inverseSinterViscosity_. More...
 
Mdouble getInverseSinterViscosity () const
 Accesses inverseSinterViscosity_. 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...
 
void setSinterForceAndTime (Mdouble adhesionForce, Mdouble sinterTime, Mdouble radius)
 
void setParhamiMcKeeping (Mdouble alpha, Mdouble beta, Mdouble atomicVolume, Mdouble surfaceEnergy, Mdouble thicknessDiffusion, Mdouble activationEnergy, Mdouble temperature)
 Sets the sinterAdhesion_ and inverseSinterViscosity_ based on the Parhami-McKeeping parameters. More...
 
void setSinterRate (Mdouble sinterRate)
 Sets sinterRate_. More...
 
void setSinterType (SINTERTYPE sinterType)
 Sets sinterRate_. More...
 
Mdouble getSinterRate () const
 Accesses sinterRate_. More...
 
SINTERTYPE getSinterType () const
 
std::function< double(double
temperature)> 
getTemperatureDependentSinterRate () const
 
double getTemperatureDependentSinterRate (double temperature) const
 
void setTemperatureDependentSinterRate (std::function< double(double temperature)> temperatureDependentSinterRate)
 
void setComplianceZero (Mdouble complianceZero)
 
Mdouble getComplianceZero () const
 
void setSurfTension (Mdouble complianceZero)
 
Mdouble getSurfTension () const
 
void setConstantC1 (Mdouble constantC1_)
 
Mdouble getConstantC1 () const
 
void setSeparationDis (Mdouble separationDis)
 
Mdouble getSeparationDis () const
 
- 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...
 
Mdouble sinterAdhesion_
 
Mdouble inverseSinterViscosity_
 
Mdouble sinterRate_
 
Mdouble complianceZero_
 
Mdouble surfTension_
 
Mdouble constantC1_
 
Mdouble separationDis_
 
SINTERTYPE sinterType_
 sinterType options determin how the rate of sintering, d(equilibriumOverlap)/dt is computed PARHAMI_MCKEEPING: sinter rate given by (sinterAdhesion+normalForce)/sinterViscosity CONSTANT_RATE: sinter rate given by sinterRate More...
 
std::function< double(double
temperature)> 
temperatureDependentSinterRate_
 

Detailed Description

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

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

Definition at line 46 of file SinterNormalSpecies.h.

Member Typedef Documentation

Constructor & Destructor Documentation

SinterNormalSpecies::SinterNormalSpecies ( )

The default constructor.

Definition at line 36 of file SinterNormalSpecies.cc.

References cohesionStiffness_, complianceZero_, constantC1_, dissipation_, inverseSinterViscosity_, loadingStiffness_, PARHAMI_MCKEEPING, penetrationDepthMax_, separationDis_, sinterAdhesion_, sinterRate_, sinterType_, surfTension_, and unloadingStiffnessMax_.

37  : BaseNormalForce()
38 {
40  loadingStiffness_ = 0.0;
42  cohesionStiffness_ = 0.0;
44  dissipation_ = 0.0;
45  sinterAdhesion_ = 0.0;
46  sinterRate_ = 0.0;
48  complianceZero_ = 0.0;
49  surfTension_ = 0.0;
50  constantC1_ = 0.0;
51  separationDis_ = 0.0;
52 #ifdef DEBUG_CONSTRUCTOR
53  std::cout<<"SinterNormalSpecies::SinterNormalSpecies() finished"<<std::endl;
54 #endif
55 }
Mdouble unloadingStiffnessMax_
the maximum elastic constant (k_2^max) for plastic deformations
SINTERTYPE sinterType_
sinterType options determin how the rate of sintering, d(equilibriumOverlap)/dt is computed PARHAMI_M...
Mdouble loadingStiffness_
(normal) spring constant (k_1)
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 dissipation_
linear dissipation coefficient
SinterNormalSpecies::SinterNormalSpecies ( const SinterNormalSpecies p)

The default copy constructor.

Parameters
[in]thespecies that is copied

Definition at line 60 of file SinterNormalSpecies.cc.

References cohesionStiffness_, complianceZero_, constantC1_, dissipation_, inverseSinterViscosity_, loadingStiffness_, penetrationDepthMax_, separationDis_, sinterAdhesion_, sinterRate_, sinterType_, surfTension_, and unloadingStiffnessMax_.

61  : BaseNormalForce(p)
62 {
76 #ifdef DEBUG_CONSTRUCTOR
77  std::cout<<"SinterNormalSpecies::SinterNormalSpecies(const SinterNormalSpecies &p) finished"<<std::endl;
78 #endif
79 }
Mdouble unloadingStiffnessMax_
the maximum elastic constant (k_2^max) for plastic deformations
SINTERTYPE sinterType_
sinterType options determin how the rate of sintering, d(equilibriumOverlap)/dt is computed PARHAMI_M...
Mdouble loadingStiffness_
(normal) spring constant (k_1)
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 dissipation_
linear dissipation coefficient
SinterNormalSpecies::~SinterNormalSpecies ( )

The default destructor.

Definition at line 81 of file SinterNormalSpecies.cc.

82 {
83 #ifdef DEBUG_DESTRUCTOR
84  std::cout<<"SinterNormalSpecies::~SinterNormalSpecies() finished"<<std::endl;
85 #endif
86 }

Member Function Documentation

Mdouble SinterNormalSpecies::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]massthe optimal time step is computed to resolve a collision of two particles of this mass.

Definition at line 249 of file SinterNormalSpecies.cc.

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

250 {
251  if (unloadingStiffnessMax_ / (.5 * mass) < mathsFunc::square(dissipation_ / mass))
252  {
253  std::cerr << "Dissipation too high; max. allowed " << sqrt(2.0 * unloadingStiffnessMax_ * mass) << std::endl;
254  exit(-1);
255  }
256  return 0.02 * constants::pi /
257  std::sqrt(unloadingStiffnessMax_ / (.5 * mass) - mathsFunc::square(dissipation_ / mass));
258 }
Mdouble unloadingStiffnessMax_
the maximum elastic constant (k_2^max) for plastic deformations
const Mdouble pi
Definition: ExtendedMath.h:45
Mdouble dissipation_
linear dissipation coefficient
T square(const T val)
squares a number
Definition: ExtendedMath.h:104
std::string SinterNormalSpecies::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 134 of file SinterNormalSpecies.cc.

135 {
136  return "Sinter";
137 }
Mdouble SinterNormalSpecies::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 200 of file SinterNormalSpecies.cc.

References cohesionStiffness_.

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

201 {
202  return cohesionStiffness_;
203 }
Mdouble cohesionStiffness_
the adhesive spring constant (k^c) for plastic deformations
Mdouble SinterNormalSpecies::getCollisionTime ( Mdouble  mass)

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

Definition at line 535 of file SinterNormalSpecies.cc.

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

536 {
537  if (mass <= 0)
538  {
539  std::cerr << "Error in getCollisionTime(" << mass
540  << ") mass is not set or has an unexpected value, (getCollisionTime(" << mass << "))" << std::endl;
541  exit(-1);
542  }
543  if (loadingStiffness_ <= 0)
544  {
545  std::cerr << "Error in getCollisionTime(" << mass << ") stiffness=" << loadingStiffness_
546  << " is not set or has an unexpected value, (getCollisionTime(" << mass << "), with stiffness="
547  << loadingStiffness_ << ")" << std::endl;
548  exit(-1);
549  }
550  if (dissipation_ < 0)
551  {
552  std::cerr << "Error in getCollisionTime(" << mass << ") dissipation=" << dissipation_
553  << " is not set or has an unexpected value, (getCollisionTime(" << mass << "), with dissipation="
554  << dissipation_ << ")" << std::endl;
555  exit(-1);
556  }
557  Mdouble tosqrt = loadingStiffness_ / (.5 * mass) - mathsFunc::square(dissipation_ / mass);
558  if (tosqrt <= -1e-8 * loadingStiffness_ / (.5 * mass))
559  {
560  std::cerr << "Error in getCollisionTime(" << mass
561  << ") values for mass, stiffness and dissipation would lead to an overdamped system, (getCollisionTime("
562  << mass << "), with stiffness=" << loadingStiffness_ << " and dissipation=" << dissipation_ << ")"
563  << std::endl;
564  exit(-1);
565  }
566  return constants::pi / std::sqrt(tosqrt);
567 }
double Mdouble
Definition: GeneralDefine.h:34
Mdouble loadingStiffness_
(normal) spring constant (k_1)
const Mdouble pi
Definition: ExtendedMath.h:45
Mdouble dissipation_
linear dissipation coefficient
T square(const T val)
squares a number
Definition: ExtendedMath.h:104
Mdouble SinterNormalSpecies::getComplianceZero ( ) const

Definition at line 448 of file SinterNormalSpecies.cc.

References complianceZero_.

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

449 {
450  return complianceZero_;
451 }
Mdouble SinterNormalSpecies::getConstantC1 ( ) const

Definition at line 458 of file SinterNormalSpecies.cc.

References constantC1_.

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

459 {
460  return constantC1_;
461 }
Mdouble SinterNormalSpecies::getDissipation ( ) const

Allows the normal dissipation to be accessed.

Returns
the linear dissipation coefficient

Definition at line 419 of file SinterNormalSpecies.cc.

References dissipation_.

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

420 {
421  return dissipation_;
422 }
Mdouble dissipation_
linear dissipation coefficient
Mdouble SinterNormalSpecies::getInverseSinterViscosity ( ) const

Accesses inverseSinterViscosity_.

Returns
value of inverseSinterViscosity_

Definition at line 435 of file SinterNormalSpecies.cc.

References inverseSinterViscosity_.

Referenced by mix(), and setSinterForceAndTime().

436 {
438 }
Mdouble SinterNormalSpecies::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 184 of file SinterNormalSpecies.cc.

References loadingStiffness_.

Referenced by SinterInteraction::computeNormalForce(), SinterInteraction::getElasticEnergy(), SinterInteraction::getUnloadingStiffness(), and mix().

185 {
186  return loadingStiffness_;
187 }
Mdouble loadingStiffness_
(normal) spring constant (k_1)
Mdouble SinterNormalSpecies::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 208 of file SinterNormalSpecies.cc.

References penetrationDepthMax_.

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

209 {
210  return penetrationDepthMax_;
211 }
Mdouble penetrationDepthMax_
the depth (relative to the normalized radius) at which k_2^max is used (phi_f)
Mdouble SinterNormalSpecies::getSeparationDis ( ) const

Definition at line 463 of file SinterNormalSpecies.cc.

References separationDis_.

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

464 {
465  return separationDis_;
466 }
Mdouble SinterNormalSpecies::getSinterAdhesion ( ) const

Accesses sinterAdhesion_.

Returns
value of sinterAdhesion_

Definition at line 427 of file SinterNormalSpecies.cc.

References sinterAdhesion_.

Referenced by SinterInteraction::computeNormalForce(), mix(), and setSinterForceAndTime().

428 {
429  return sinterAdhesion_;
430 }
Mdouble SinterNormalSpecies::getSinterRate ( ) const

Accesses sinterRate_.

Returns
value of sinterAdhesion_

Definition at line 443 of file SinterNormalSpecies.cc.

References sinterRate_.

Referenced by SinterInteraction::computeNormalForce().

444 {
445  return sinterRate_;
446 }
SINTERTYPE SinterNormalSpecies::getSinterType ( ) const

Definition at line 468 of file SinterNormalSpecies.cc.

References sinterType_.

Referenced by SinterInteraction::computeNormalForce().

469 {
470  return sinterType_;
471 }
SINTERTYPE sinterType_
sinterType options determin how the rate of sintering, d(equilibriumOverlap)/dt is computed PARHAMI_M...
Mdouble SinterNormalSpecies::getSurfTension ( ) const

Definition at line 453 of file SinterNormalSpecies.cc.

References surfTension_.

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

454 {
455  return surfTension_;
456 }
std::function< double(double temperature)> SinterNormalSpecies::getTemperatureDependentSinterRate ( ) const

Definition at line 478 of file SinterNormalSpecies.cc.

References temperatureDependentSinterRate_.

Referenced by SinterInteraction::computeNormalForce().

479 {
481 }
std::function< double(double temperature)> temperatureDependentSinterRate_
double SinterNormalSpecies::getTemperatureDependentSinterRate ( double  temperature) const

Definition at line 473 of file SinterNormalSpecies.cc.

References temperatureDependentSinterRate_.

474 {
475  return temperatureDependentSinterRate_(temperature);
476 }
std::function< double(double temperature)> temperatureDependentSinterRate_
Mdouble SinterNormalSpecies::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 192 of file SinterNormalSpecies.cc.

References unloadingStiffnessMax_.

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

193 {
194  return unloadingStiffnessMax_;
195 }
Mdouble unloadingStiffnessMax_
the maximum elastic constant (k_2^max) for plastic deformations
void SinterNormalSpecies::mix ( SinterNormalSpecies S,
SinterNormalSpecies 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 144 of file SinterNormalSpecies.cc.

References BaseSpecies::average(), cohesionStiffness_, complianceZero_, constantC1_, dissipation_, getCohesionStiffness(), getComplianceZero(), getConstantC1(), getDissipation(), getInverseSinterViscosity(), getLoadingStiffness(), getPenetrationDepthMax(), getSeparationDis(), getSinterAdhesion(), getSurfTension(), getUnloadingStiffnessMax(), inverseSinterViscosity_, loadingStiffness_, penetrationDepthMax_, separationDis_, sinterAdhesion_, surfTension_, and unloadingStiffnessMax_.

145 {
157 
158 }
Mdouble unloadingStiffnessMax_
the maximum elastic constant (k_2^max) for plastic deformations
Mdouble loadingStiffness_
(normal) spring constant (k_1)
Mdouble cohesionStiffness_
the adhesive spring constant (k^c) for plastic deformations
Mdouble getSinterAdhesion() const
Accesses sinterAdhesion_.
Mdouble penetrationDepthMax_
the depth (relative to the normalized radius) at which k_2^max is used (phi_f)
Mdouble dissipation_
linear dissipation coefficient
static Mdouble average(Mdouble a, Mdouble b)
Returns the harmonic mean of two variables.
Definition: BaseSpecies.cc:110
Mdouble getComplianceZero() const
Mdouble getLoadingStiffness() const
Returns the loading stiffness of the linear plastic-viscoelastic normal force.
Mdouble getCohesionStiffness() const
Returns the cohesive stiffness of the linear plastic-viscoelastic normal force.
Mdouble getSeparationDis() const
Mdouble getPenetrationDepthMax() const
Returns the maximum penetration depth of the linear plastic-viscoelastic normal force.
Mdouble getUnloadingStiffnessMax() const
Returns the maximum unloading stiffness of the linear plastic-viscoelastic normal force...
Mdouble getDissipation() const
Allows the normal dissipation to be accessed.
Mdouble getSurfTension() const
Mdouble getInverseSinterViscosity() const
Accesses inverseSinterViscosity_.
Mdouble getConstantC1() const
void SinterNormalSpecies::read ( std::istream &  is)

Reads the species properties from an input stream.

Parameters
[in]isinput stream (typically the restart file)

Definition at line 111 of file SinterNormalSpecies.cc.

References cohesionStiffness_, complianceZero_, constantC1_, dissipation_, inverseSinterViscosity_, loadingStiffness_, penetrationDepthMax_, separationDis_, sinterAdhesion_, sinterRate_, sinterType_, surfTension_, and unloadingStiffnessMax_.

112 {
113  std::string dummy;
114  is >> dummy >> loadingStiffness_;
115  is >> dummy >> unloadingStiffnessMax_;
116  is >> dummy >> cohesionStiffness_;
117  is >> dummy >> penetrationDepthMax_;
118  is >> dummy >> dissipation_;
119  is >> dummy >> sinterAdhesion_;
120  is >> dummy >> inverseSinterViscosity_;
121  is >> dummy >> sinterRate_;
122  is >> dummy >> complianceZero_;
123  is >> dummy >> surfTension_;
124  is >> dummy >> constantC1_;
125  is >> dummy >> separationDis_;
126  unsigned type;
127  is >> dummy >> type;
128  sinterType_ = (SINTERTYPE) type;
129 }
Mdouble unloadingStiffnessMax_
the maximum elastic constant (k_2^max) for plastic deformations
SINTERTYPE sinterType_
sinterType options determin how the rate of sintering, d(equilibriumOverlap)/dt is computed PARHAMI_M...
Mdouble loadingStiffness_
(normal) spring constant (k_1)
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 dissipation_
linear dissipation coefficient
void SinterNormalSpecies::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 232 of file SinterNormalSpecies.cc.

References cohesionStiffness_.

Referenced by setPlasticParameters().

233 {
234  cohesionStiffness_ = cohesionStiffness;
235 }
Mdouble cohesionStiffness_
the adhesive spring constant (k^c) for plastic deformations
void SinterNormalSpecies::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]masseffective particle mass, \(\frac{2}{1/m1+1/m2}\)
Todo:
TW: check that the masses are described correctly here (m_eff or m_p?))

Definition at line 497 of file SinterNormalSpecies.cc.

498 {
499  if (eps == 0.0)
500  {
502  dissipation_ = std::sqrt(2.0 * mass * loadingStiffness_);
503  }
504  else
505  {
506  dissipation_ = -mass / tc * std::log(eps);
508  .5 * mass * (mathsFunc::square(constants::pi / tc) + mathsFunc::square(dissipation_ / mass));
509  }
511 }
Mdouble unloadingStiffnessMax_
the maximum elastic constant (k_2^max) for plastic deformations
Mdouble loadingStiffness_
(normal) spring constant (k_1)
Mdouble log(Mdouble Power)
const Mdouble pi
Definition: ExtendedMath.h:45
Mdouble dissipation_
linear dissipation coefficient
T square(const T val)
squares a number
Definition: ExtendedMath.h:104
void SinterNormalSpecies::setComplianceZero ( Mdouble  complianceZero)

Definition at line 301 of file SinterNormalSpecies.cc.

References complianceZero_, ERROR, and logger.

302 {
303  if (complianceZero < 0)
304  {
305  logger(ERROR, "complianceZero(%)", complianceZero);
306  }
307  complianceZero_ = complianceZero;
308 }
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
void SinterNormalSpecies::setConstantC1 ( Mdouble  constantC1_)

Definition at line 319 of file SinterNormalSpecies.cc.

References constantC1_, ERROR, and logger.

320 {
321  if (complianceOne < 0)
322  {
323  logger(ERROR, "ComplianceOne(%)", complianceOne);
324  }
325  constantC1_ = complianceOne;
326 }
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
void SinterNormalSpecies::setDissipation ( Mdouble  dissipation)

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

should be non-negative

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

Definition at line 264 of file SinterNormalSpecies.cc.

References dissipation_, ERROR, and logger.

Referenced by setLoadingStiffnessAndDissipation().

265 {
266  if (dissipation < 0)
267  {
268  logger(ERROR, "setDissipation(%)", dissipation);
269  exit(-1);
270  }
271  dissipation_ = dissipation;
272 }
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
Mdouble dissipation_
linear dissipation coefficient
void SinterNormalSpecies::setInverseSinterViscosity ( Mdouble  inverseSinterViscosity)

Sets inverseSinterViscosity_.

should be non-negative

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

Definition at line 363 of file SinterNormalSpecies.cc.

References ERROR, inverseSinterViscosity_, logger, PARHAMI_MCKEEPING, and setSinterType().

Referenced by setSinterForceAndTime().

364 {
365  //assertOrDie(inverseSinterViscosity < 0, "inverseSinterViscosity should be non-negative!");
366  if (inverseSinterViscosity < 0)
367  {
368  logger(ERROR, "setInverseSinterViscosity(%)", inverseSinterViscosity);
369  }
371  inverseSinterViscosity_ = inverseSinterViscosity;
372 }
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
void setSinterType(SINTERTYPE sinterType)
Sets sinterRate_.
void SinterNormalSpecies::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 216 of file SinterNormalSpecies.cc.

References loadingStiffness_.

Referenced by setLoadingStiffnessAndDissipation(), and setPlasticParameters().

217 {
218  loadingStiffness_ = loadingStiffness;
219 }
Mdouble loadingStiffness_
(normal) spring constant (k_1)
void SinterNormalSpecies::setLoadingStiffnessAndDissipation ( helpers::KAndDisp  new_)

Allows the spring and dissipation constants to be changed simultaneously.

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

Definition at line 410 of file SinterNormalSpecies.cc.

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

411 {
412  setLoadingStiffness(new_.k);
413  setDissipation(new_.disp);
414 }
void setDissipation(Mdouble dissipation)
Sets the linear dissipation coefficient of the linear plastic-viscoelastic normal force...
Mdouble disp
Definition: Helpers.h:49
void setLoadingStiffness(Mdouble loadingStiffness)
Sets the loading stiffness of the linear plastic-viscoelastic normal force.
void SinterNormalSpecies::setParhamiMcKeeping ( Mdouble  alpha,
Mdouble  beta,
Mdouble  atomicVolume,
Mdouble  surfaceEnergy,
Mdouble  thicknessDiffusion,
Mdouble  activationEnergy,
Mdouble  temperature 
)

Sets the sinterAdhesion_ and inverseSinterViscosity_ based on the Parhami-McKeeping parameters.

should be non-negative

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

Definition at line 389 of file SinterNormalSpecies.cc.

References mathsFunc::exp(), INFO, logger, PARHAMI_MCKEEPING, and constants::pi.

391 {
393  const Mdouble boltzmannConstant /*k_B*/ = 1.38064852e-23;
394  const Mdouble gasConstant /*R_g*/ = 8.314459848;
395  const Mdouble thicknessDiffusionVacancy /*DB*/ =
396  thicknessDiffusion * exp(-activationEnergy / gasConstant / temperature);
397  const Mdouble diffusionParameter /*DeltaB*/ =
398  atomicVolume / boltzmannConstant / temperature * thicknessDiffusionVacancy;
399  setInverseSinterViscosity(constants::pi / (2.0 * beta * diffusionParameter));
400  setSinterAdhesion(alpha / beta * constants::pi * surfaceEnergy);
401  logger(INFO,
402  "Set sintering parameters: the adhesion force f_a=%*r, the rate of change of the plastic overlap is d(delta0)/dt=f_ep/(%*a^4)",
405 }
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
double Mdouble
Definition: GeneralDefine.h:34
Mdouble exp(Mdouble Exponent)
Definition: ExtendedMath.cc:84
Mdouble beta(Mdouble z, Mdouble w)
This is the beta function, returns the approximation based on cmath's implementation of ln(gamma) ...
Mdouble getSinterAdhesion() const
Accesses sinterAdhesion_.
void setSinterAdhesion(Mdouble sinterAdhesion)
Sets sinterAdhesion_.
void setInverseSinterViscosity(Mdouble inverseSinterViscosity)
Sets inverseSinterViscosity_.
const Mdouble pi
Definition: ExtendedMath.h:45
void setSinterType(SINTERTYPE sinterType)
Sets sinterRate_.
Mdouble getInverseSinterViscosity() const
Accesses inverseSinterViscosity_.
void SinterNormalSpecies::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 240 of file SinterNormalSpecies.cc.

References penetrationDepthMax_.

Referenced by setPlasticParameters().

241 {
242  penetrationDepthMax_ = penetrationDepthMax;
243 }
Mdouble penetrationDepthMax_
the depth (relative to the normalized radius) at which k_2^max is used (phi_f)
void SinterNormalSpecies::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 166 of file SinterNormalSpecies.cc.

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

168 {
169  if (loadingStiffness <= 0 || unloadingStiffnessMax < loadingStiffness || cohesionStiffness < 0 ||
170  penetrationDepthMax < 0)
171  {
172  std::cerr << "Error: arguments of setPlasticParameters do not make sense" << std::endl;
173  exit(-1);
174  }
175  setLoadingStiffness(loadingStiffness);
176  setUnloadingStiffnessMax(unloadingStiffnessMax);
177  setCohesionStiffness(cohesionStiffness);
178  setPenetrationDepthMax(penetrationDepthMax);
179 }
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 SinterNormalSpecies::setSeparationDis ( Mdouble  separationDis)

Definition at line 328 of file SinterNormalSpecies.cc.

References ERROR, logger, and separationDis_.

329 {
330  if (separationDis < 0)
331  {
332  logger(ERROR, "SeparationDis(%)", separationDis);
333  }
334  separationDis_ = separationDis;
335 }
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
void SinterNormalSpecies::setSinterAdhesion ( Mdouble  sinterAdhesion)

Sets sinterAdhesion_.

should be non-negative

Parameters
[in]sinterAdhesion_

Definition at line 278 of file SinterNormalSpecies.cc.

References ERROR, logger, and sinterAdhesion_.

Referenced by setSinterForceAndTime().

279 {
280  if (sinterAdhesion < 0)
281  {
282  logger(ERROR, "setSinterAdhesion(%)", sinterAdhesion);
283  exit(-1);
284  }
285  sinterAdhesion_ = sinterAdhesion;
286 }
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
void SinterNormalSpecies::setSinterForceAndTime ( Mdouble  adhesionForce,
Mdouble  sinterTime,
Mdouble  radius 
)
Todo:
fix

Definition at line 374 of file SinterNormalSpecies.cc.

References getInverseSinterViscosity(), getSinterAdhesion(), INFO, logger, PARHAMI_MCKEEPING, setInverseSinterViscosity(), setSinterAdhesion(), and sinterType_.

375 {
378  setSinterAdhesion(adhesionForce / radius);
379  setInverseSinterViscosity(1.0 / (93.75 * adhesionForce * sinterTime / std::pow(radius, 5)));
380  logger(INFO, "Set sintering parameters: adhesion force f_a=%*r, sinter viscosity is nu = contactRadius^4/%",
382 }
SINTERTYPE sinterType_
sinterType options determin how the rate of sintering, d(equilibriumOverlap)/dt is computed PARHAMI_M...
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
Mdouble getSinterAdhesion() const
Accesses sinterAdhesion_.
void setSinterAdhesion(Mdouble sinterAdhesion)
Sets sinterAdhesion_.
void setInverseSinterViscosity(Mdouble inverseSinterViscosity)
Sets inverseSinterViscosity_.
Mdouble getInverseSinterViscosity() const
Accesses inverseSinterViscosity_.
void SinterNormalSpecies::setSinterRate ( Mdouble  sinterRate)

Sets sinterRate_.

should be non-negative

Parameters
[in]sinterAdhesion_

Definition at line 292 of file SinterNormalSpecies.cc.

References ERROR, logger, and sinterRate_.

293 {
294  if (sinterRate < 0)
295  {
296  logger(ERROR, "setSinterRate(%)", sinterRate);
297  }
298  sinterRate_ = sinterRate;
299 }
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
void SinterNormalSpecies::setSinterType ( SINTERTYPE  sinterType)

Sets sinterRate_.

should be non-negative

Parameters
[in]sinterAdhesion_

Definition at line 344 of file SinterNormalSpecies.cc.

References CONSTANT_RATE, ERROR, INFO, logger, PARHAMI_MCKEEPING, REGIME_SINTERING, sinterType_, and TEMPERATURE_DEPENDENT_FRENKEL.

Referenced by setInverseSinterViscosity().

345 {
346  sinterType_ = sinterType;
348  logger(INFO, "Sintertype set to CONSTANT_RATE");
350  logger(INFO, "Sintertype set to PARHAMI_MCKEEPING");
352  logger(INFO, "Sintertype set to TEMPERATURE_DEPENDENT_FRENKEL");
354  logger(INFO, "Sintertype set to REGIME_SINTERING");
355  else
356  logger(ERROR, "Sintertype not understood");
357 }
SINTERTYPE sinterType_
sinterType options determin how the rate of sintering, d(equilibriumOverlap)/dt is computed PARHAMI_M...
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
void SinterNormalSpecies::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}\)

Definition at line 519 of file SinterNormalSpecies.cc.

References dissipation_, loadingStiffness_, mathsFunc::log(), constants::sqr_pi, mathsFunc::square(), and unloadingStiffnessMax_.

520 {
521  loadingStiffness_ = stiffness;
522  if (eps == 0.0)
523  {
524  dissipation_ = std::sqrt(2.0 * mass * stiffness);
525  }
526  else
527  {
528  dissipation_ =
529  -std::sqrt(2.0 * mass * stiffness / (constants::sqr_pi + mathsFunc::square(log(eps)))) * log(eps);
530  }
532 }
Mdouble unloadingStiffnessMax_
the maximum elastic constant (k_2^max) for plastic deformations
Mdouble loadingStiffness_
(normal) spring constant (k_1)
Mdouble log(Mdouble Power)
Mdouble dissipation_
linear dissipation coefficient
T square(const T val)
squares a number
Definition: ExtendedMath.h:104
const Mdouble sqr_pi
Definition: ExtendedMath.h:47
void SinterNormalSpecies::setSurfTension ( Mdouble  complianceZero)

Definition at line 310 of file SinterNormalSpecies.cc.

References ERROR, logger, and surfTension_.

311 {
312  if (surfTension < 0)
313  {
314  logger(ERROR, "SurfTension(%)", surfTension);
315  }
316  surfTension_ = surfTension;
317 }
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
void SinterNormalSpecies::setTemperatureDependentSinterRate ( std::function< double(double temperature)>  temperatureDependentSinterRate)

Definition at line 483 of file SinterNormalSpecies.cc.

References temperatureDependentSinterRate_.

485 {
486  temperatureDependentSinterRate_ = temperatureDependentSinterRate;
487 }
std::function< double(double temperature)> temperatureDependentSinterRate_
void SinterNormalSpecies::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 224 of file SinterNormalSpecies.cc.

References unloadingStiffnessMax_.

Referenced by setPlasticParameters().

225 {
226  unloadingStiffnessMax_ = unloadingStiffnessMax;
227 }
Mdouble unloadingStiffnessMax_
the maximum elastic constant (k_2^max) for plastic deformations
void SinterNormalSpecies::write ( std::ostream &  os) const

Writes the species properties to an output stream.

Parameters
[out]outputstream (typically the restart file)

Definition at line 91 of file SinterNormalSpecies.cc.

References cohesionStiffness_, complianceZero_, constantC1_, dissipation_, inverseSinterViscosity_, loadingStiffness_, penetrationDepthMax_, separationDis_, sinterAdhesion_, sinterRate_, sinterType_, surfTension_, and unloadingStiffnessMax_.

92 {
93  os << " loadingStiffness " << loadingStiffness_;
94  os << " maxUnloadingStiffness " << unloadingStiffnessMax_;
95  os << " cohesionStiffness " << cohesionStiffness_;
96  os << " maxPenetration " << penetrationDepthMax_;
97  os << " dissipation " << dissipation_;
98  os << " sinterAdhesion " << sinterAdhesion_;
99  os << " inverseSinterViscosity " << inverseSinterViscosity_;
100  os << " sinterRate " << sinterRate_;
101  os << " complianceZero " << complianceZero_;
102  os << " surfTension " << surfTension_;
103  os << " constantC1 " << constantC1_;
104  os << " separationDis " << separationDis_;
105  os << " sinterType " << (unsigned) sinterType_;
106 }
Mdouble unloadingStiffnessMax_
the maximum elastic constant (k_2^max) for plastic deformations
SINTERTYPE sinterType_
sinterType options determin how the rate of sintering, d(equilibriumOverlap)/dt is computed PARHAMI_M...
Mdouble loadingStiffness_
(normal) spring constant (k_1)
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 dissipation_
linear dissipation coefficient

Member Data Documentation

Mdouble SinterNormalSpecies::cohesionStiffness_
private

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

Definition at line 233 of file SinterNormalSpecies.h.

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

Mdouble SinterNormalSpecies::complianceZero_
private

Compliance 0, C_0, corresponds to the inverse of stiffness at the instantaneous time.

Definition at line 259 of file SinterNormalSpecies.h.

Referenced by getComplianceZero(), mix(), read(), setComplianceZero(), SinterNormalSpecies(), and write().

Mdouble SinterNormalSpecies::constantC1_
private

Material constant

Definition at line 271 of file SinterNormalSpecies.h.

Referenced by getConstantC1(), mix(), read(), setConstantC1(), SinterNormalSpecies(), and write().

Mdouble SinterNormalSpecies::dissipation_
private
Mdouble SinterNormalSpecies::inverseSinterViscosity_
private

Determines sinter viscosity nu = contactRadius^4/inverseSinterViscosity_ in sinter rate: d(delta0)/dt = (fa+fep)/nu

Definition at line 249 of file SinterNormalSpecies.h.

Referenced by getInverseSinterViscosity(), mix(), read(), setInverseSinterViscosity(), SinterNormalSpecies(), and write().

Mdouble SinterNormalSpecies::loadingStiffness_
private
Mdouble SinterNormalSpecies::penetrationDepthMax_
private

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

Definition at line 236 of file SinterNormalSpecies.h.

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

Mdouble SinterNormalSpecies::separationDis_
private

Separation distance comes from the fracture theory.

Definition at line 276 of file SinterNormalSpecies.h.

Referenced by getSeparationDis(), mix(), read(), setSeparationDis(), SinterNormalSpecies(), and write().

Mdouble SinterNormalSpecies::sinterAdhesion_
private

Determines sinter adhesion force fa=sinterAdhesion_*radius in sinter rate: d(delta0)/dt = (fa+fep)/nu

Definition at line 244 of file SinterNormalSpecies.h.

Referenced by getSinterAdhesion(), mix(), read(), setSinterAdhesion(), SinterNormalSpecies(), and write().

Mdouble SinterNormalSpecies::sinterRate_
private

Determines sinter rate: d(delta0)/dt = (fa+fep)/nu

Definition at line 254 of file SinterNormalSpecies.h.

Referenced by getSinterRate(), read(), setSinterRate(), SinterNormalSpecies(), and write().

SINTERTYPE SinterNormalSpecies::sinterType_
private

sinterType options determin how the rate of sintering, d(equilibriumOverlap)/dt is computed PARHAMI_MCKEEPING: sinter rate given by (sinterAdhesion+normalForce)/sinterViscosity CONSTANT_RATE: sinter rate given by sinterRate

Definition at line 283 of file SinterNormalSpecies.h.

Referenced by getSinterType(), read(), setSinterForceAndTime(), setSinterType(), SinterNormalSpecies(), and write().

Mdouble SinterNormalSpecies::surfTension_
private

Material constant

Definition at line 265 of file SinterNormalSpecies.h.

Referenced by getSurfTension(), mix(), read(), setSurfTension(), SinterNormalSpecies(), and write().

std::function<double(double temperature)> SinterNormalSpecies::temperatureDependentSinterRate_
private
Initial value:
= [this](
double temperature) { return sinterRate_; }

Definition at line 288 of file SinterNormalSpecies.h.

Referenced by getTemperatureDependentSinterRate(), and setTemperatureDependentSinterRate().

Mdouble SinterNormalSpecies::unloadingStiffnessMax_
private

the maximum elastic constant (k_2^max) for plastic deformations

Definition at line 230 of file SinterNormalSpecies.h.

Referenced by computeTimeStep(), getUnloadingStiffnessMax(), mix(), read(), setStiffnessAndRestitutionCoefficient(), setUnloadingStiffnessMax(), SinterNormalSpecies(), and write().


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