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)
 
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...
 
MERCURYDPM_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)
 
virtual void actionsAfterTimeStep (BaseParticle *particle) const
 
- 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.

Member Typedef Documentation

◆ InteractionType

The correct Interaction type for this FrictionForceSpecies.

Constructor & Destructor Documentation

◆ SinterNormalSpecies() [1/2]

SinterNormalSpecies::SinterNormalSpecies ( )

The default constructor.

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 }
BaseNormalForce()
Definition: BaseNormalForce.h:35
Mdouble sinterAdhesion_
Definition: SinterNormalSpecies.h:244
Mdouble cohesionStiffness_
the adhesive spring constant (k^c) for plastic deformations
Definition: SinterNormalSpecies.h:233
Mdouble unloadingStiffnessMax_
the maximum elastic constant (k_2^max) for plastic deformations
Definition: SinterNormalSpecies.h:230
Mdouble penetrationDepthMax_
the depth (relative to the normalized radius) at which k_2^max is used (phi_f)
Definition: SinterNormalSpecies.h:236
Mdouble complianceZero_
Definition: SinterNormalSpecies.h:259
Mdouble surfTension_
Definition: SinterNormalSpecies.h:265
Mdouble separationDis_
Definition: SinterNormalSpecies.h:276
Mdouble inverseSinterViscosity_
Definition: SinterNormalSpecies.h:249
SINTERTYPE sinterType_
sinterType options determin how the rate of sintering, d(equilibriumOverlap)/dt is computed PARHAMI_M...
Definition: SinterNormalSpecies.h:283
Mdouble sinterRate_
Definition: SinterNormalSpecies.h:254
Mdouble loadingStiffness_
(normal) spring constant (k_1)
Definition: SinterNormalSpecies.h:227
Mdouble constantC1_
Definition: SinterNormalSpecies.h:271
Mdouble dissipation_
linear dissipation coefficient
Definition: SinterNormalSpecies.h:239

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

◆ SinterNormalSpecies() [2/2]

SinterNormalSpecies::SinterNormalSpecies ( const SinterNormalSpecies p)

The default copy constructor.

Parameters
[in]thespecies that is copied
61  : BaseNormalForce(p)
62 {
76 #ifdef DEBUG_CONSTRUCTOR
77  std::cout<<"SinterNormalSpecies::SinterNormalSpecies(const SinterNormalSpecies &p) finished"<<std::endl;
78 #endif
79 }

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

◆ ~SinterNormalSpecies()

SinterNormalSpecies::~SinterNormalSpecies ( )

The default destructor.

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

Member Function Documentation

◆ computeTimeStep()

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.
249 {
250  if (unloadingStiffnessMax_ / (.5 * mass) < mathsFunc::square(dissipation_ / mass))
251  {
252  logger(ERROR, "Dissipation too high; max. allowed %", sqrt(2.0 * unloadingStiffnessMax_ * mass));
253  }
254  return 0.02 * constants::pi /
255  std::sqrt(unloadingStiffnessMax_ / (.5 * mass) - mathsFunc::square(dissipation_ / mass));
256 }
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
@ ERROR
const Mdouble pi
Definition: ExtendedMath.h:45
T square(const T val)
squares a number
Definition: ExtendedMath.h:106

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

◆ getBaseName()

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")
135 {
136  return "Sinter";
137 }

◆ getCohesionStiffness()

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.
200 {
201  return cohesionStiffness_;
202 }

References cohesionStiffness_.

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

◆ getCollisionTime()

Mdouble SinterNormalSpecies::getCollisionTime ( Mdouble  mass)

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

532 {
533  if (mass <= 0)
534  {
535  logger(ERROR, "Error in getCollisionTime(%) mass is not set or has an unexpected value, (getCollisionTime(%))",
536  mass, mass);
537  }
538  if (loadingStiffness_ <= 0)
539  {
540  logger(ERROR, "Error in getCollisionTime(%) stiffness=% is not set or has an unexpected value "
541  "(getCollisionTime(%), with stiffness=%)",
542  mass, loadingStiffness_, mass, loadingStiffness_);
543  }
544  if (dissipation_ < 0)
545  {
546  logger(ERROR, "Error in getCollisionTime(%) dissipation=%"
547  " is not set or has an unexpected value, (getCollisionTime(%), with dissipation=%)",
548  mass, dissipation_, mass, dissipation_);
549  }
550  Mdouble tosqrt = loadingStiffness_ / (.5 * mass) - mathsFunc::square(dissipation_ / mass);
551  if (tosqrt <= -1e-8 * loadingStiffness_ / (.5 * mass))
552  {
553  logger(ERROR, "Error in getCollisionTime(%) values for mass, stiffness and dissipation would lead to an "
554  "overdamped system, (getCollisionTime(%), with stiffness=% and dissipation=%)",
555  mass, mass, loadingStiffness_, dissipation_);
556  }
557  return constants::pi / std::sqrt(tosqrt);
558 }
double Mdouble
Definition: GeneralDefine.h:34

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

◆ getComplianceZero()

Mdouble SinterNormalSpecies::getComplianceZero ( ) const
445 {
446  return complianceZero_;
447 }

References complianceZero_.

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

◆ getConstantC1()

Mdouble SinterNormalSpecies::getConstantC1 ( ) const
455 {
456  return constantC1_;
457 }

References constantC1_.

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

◆ getDissipation()

Mdouble SinterNormalSpecies::getDissipation ( ) const

Allows the normal dissipation to be accessed.

Returns
the linear dissipation coefficient
416 {
417  return dissipation_;
418 }

References dissipation_.

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

◆ getInverseSinterViscosity()

Mdouble SinterNormalSpecies::getInverseSinterViscosity ( ) const

Accesses inverseSinterViscosity_.

Returns
value of inverseSinterViscosity_
432 {
434 }

References inverseSinterViscosity_.

Referenced by mix(), setParhamiMcKeeping(), and setSinterForceAndTime().

◆ getLoadingStiffness()

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.
184 {
185  return loadingStiffness_;
186 }

References loadingStiffness_.

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

◆ getPenetrationDepthMax()

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.
208 {
209  return penetrationDepthMax_;
210 }

References penetrationDepthMax_.

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

◆ getSeparationDis()

Mdouble SinterNormalSpecies::getSeparationDis ( ) const
460 {
461  return separationDis_;
462 }

References separationDis_.

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

◆ getSinterAdhesion()

Mdouble SinterNormalSpecies::getSinterAdhesion ( ) const

Accesses sinterAdhesion_.

Returns
value of sinterAdhesion_
424 {
425  return sinterAdhesion_;
426 }

References sinterAdhesion_.

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

◆ getSinterRate()

Mdouble SinterNormalSpecies::getSinterRate ( ) const

Accesses sinterRate_.

Returns
value of sinterAdhesion_
440 {
441  return sinterRate_;
442 }

References sinterRate_.

Referenced by SinterInteraction::computeNormalForce().

◆ getSinterType()

SINTERTYPE SinterNormalSpecies::getSinterType ( ) const
465 {
466  return sinterType_;
467 }

References sinterType_.

Referenced by SinterInteraction::computeNormalForce().

◆ getSurfTension()

Mdouble SinterNormalSpecies::getSurfTension ( ) const
450 {
451  return surfTension_;
452 }

References surfTension_.

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

◆ getTemperatureDependentSinterRate() [1/2]

std::function< double(double temperature)> SinterNormalSpecies::getTemperatureDependentSinterRate ( ) const
475 {
477 }
std::function< double(double temperature)> temperatureDependentSinterRate_
Definition: SinterNormalSpecies.h:288

References temperatureDependentSinterRate_.

Referenced by SinterInteraction::computeNormalForce().

◆ getTemperatureDependentSinterRate() [2/2]

double SinterNormalSpecies::getTemperatureDependentSinterRate ( double  temperature) const
470 {
471  return temperatureDependentSinterRate_(temperature);
472 }

References temperatureDependentSinterRate_.

◆ getUnloadingStiffnessMax()

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.
192 {
193  return unloadingStiffnessMax_;
194 }

References unloadingStiffnessMax_.

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

◆ mix()

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
145 {
157 
158 }
static Mdouble average(Mdouble a, Mdouble b)
Returns the harmonic mean of two variables.
Definition: BaseSpecies.cc:110
Mdouble getUnloadingStiffnessMax() const
Returns the maximum unloading stiffness of the linear plastic-viscoelastic normal force.
Definition: SinterNormalSpecies.cc:191
Mdouble getComplianceZero() const
Definition: SinterNormalSpecies.cc:444
Mdouble getPenetrationDepthMax() const
Returns the maximum penetration depth of the linear plastic-viscoelastic normal force.
Definition: SinterNormalSpecies.cc:207
Mdouble getSeparationDis() const
Definition: SinterNormalSpecies.cc:459
Mdouble getConstantC1() const
Definition: SinterNormalSpecies.cc:454
Mdouble getDissipation() const
Allows the normal dissipation to be accessed.
Definition: SinterNormalSpecies.cc:415
Mdouble getInverseSinterViscosity() const
Accesses inverseSinterViscosity_.
Definition: SinterNormalSpecies.cc:431
Mdouble getSinterAdhesion() const
Accesses sinterAdhesion_.
Definition: SinterNormalSpecies.cc:423
Mdouble getSurfTension() const
Definition: SinterNormalSpecies.cc:449
Mdouble getLoadingStiffness() const
Returns the loading stiffness of the linear plastic-viscoelastic normal force.
Definition: SinterNormalSpecies.cc:183
Mdouble getCohesionStiffness() const
Returns the cohesive stiffness of the linear plastic-viscoelastic normal force.
Definition: SinterNormalSpecies.cc:199

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_.

◆ read()

void SinterNormalSpecies::read ( std::istream &  is)

Reads the species properties from an input stream.

Parameters
[in]isinput stream (typically the restart file)
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 }
SINTERTYPE
Definition: SinterNormalSpecies.h:35

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

◆ setCohesionStiffness()

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.
232 {
233  cohesionStiffness_ = cohesionStiffness;
234 }

References cohesionStiffness_.

Referenced by setPlasticParameters().

◆ setCollisionTimeAndRestitutionCoefficient()

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?))
494 {
495  if (eps == 0.0)
496  {
498  dissipation_ = std::sqrt(2.0 * mass * loadingStiffness_);
499  }
500  else
501  {
502  dissipation_ = -mass / tc * std::log(eps);
504  .5 * mass * (mathsFunc::square(constants::pi / tc) + mathsFunc::square(dissipation_ / mass));
505  }
507 }
Mdouble log(Mdouble Power)
Definition: ExtendedMath.cc:104

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

◆ setComplianceZero()

void SinterNormalSpecies::setComplianceZero ( Mdouble  complianceZero)
298 {
299  if (complianceZero < 0)
300  {
301  logger(ERROR, "complianceZero(%) argument should be non-negative!", complianceZero);
302  }
303  complianceZero_ = complianceZero;
304 }

References complianceZero_, ERROR, and logger.

◆ setConstantC1()

void SinterNormalSpecies::setConstantC1 ( Mdouble  constantC1_)
316 {
317  if (complianceOne < 0)
318  {
319  logger(ERROR, "ComplianceOne(%) argument should be non-negative!", complianceOne);
320  }
321  constantC1_ = complianceOne;
322 }

References constantC1_, ERROR, and logger.

◆ setDissipation()

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.
263 {
264  if (dissipation < 0)
265  {
266  logger(ERROR, "setDissipation(%) argument should be non-negative!", dissipation);
267  }
268  dissipation_ = dissipation;
269 }

References dissipation_, ERROR, and logger.

Referenced by setLoadingStiffnessAndDissipation().

◆ setInverseSinterViscosity()

void SinterNormalSpecies::setInverseSinterViscosity ( Mdouble  inverseSinterViscosity)

Sets inverseSinterViscosity_.

should be non-negative

Parameters
[in]thelinear dissipation coefficient of the linear plastic-viscoelastic normal force.
360 {
361  //assertOrDie(inverseSinterViscosity < 0, "inverseSinterViscosity should be non-negative!");
362  if (inverseSinterViscosity < 0)
363  {
364  logger(ERROR, "setInverseSinterViscosity(%) argument should be non-negative!", inverseSinterViscosity);
365  }
367  inverseSinterViscosity_ = inverseSinterViscosity;
368 }
void setSinterType(SINTERTYPE sinterType)
Sets sinterRate_.
Definition: SinterNormalSpecies.cc:340

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

Referenced by setParhamiMcKeeping(), and setSinterForceAndTime().

◆ setLoadingStiffness()

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.
216 {
217  loadingStiffness_ = loadingStiffness;
218 }

References loadingStiffness_.

Referenced by setLoadingStiffnessAndDissipation(), and setPlasticParameters().

◆ setLoadingStiffnessAndDissipation()

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.
407 {
408  setLoadingStiffness(new_.k);
409  setDissipation(new_.disp);
410 }
void setLoadingStiffness(Mdouble loadingStiffness)
Sets the loading stiffness of the linear plastic-viscoelastic normal force.
Definition: SinterNormalSpecies.cc:215
void setDissipation(Mdouble dissipation)
Sets the linear dissipation coefficient of the linear plastic-viscoelastic normal force.
Definition: SinterNormalSpecies.cc:262
Mdouble k
Definition: FormulaHelpers.h:39
Mdouble disp
Definition: FormulaHelpers.h:40

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

◆ setParhamiMcKeeping()

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.
387 {
389  const Mdouble boltzmannConstant /*k_B*/ = 1.38064852e-23;
390  const Mdouble gasConstant /*R_g*/ = 8.314459848;
391  const Mdouble thicknessDiffusionVacancy /*DB*/ =
392  thicknessDiffusion * exp(-activationEnergy / gasConstant / temperature);
393  const Mdouble diffusionParameter /*DeltaB*/ =
394  atomicVolume / boltzmannConstant / temperature * thicknessDiffusionVacancy;
395  setInverseSinterViscosity(constants::pi / (2.0 * beta * diffusionParameter));
396  setSinterAdhesion(alpha / beta * constants::pi * surfaceEnergy);
397  logger(INFO,
398  "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)",
401 }
@ INFO
void setInverseSinterViscosity(Mdouble inverseSinterViscosity)
Sets inverseSinterViscosity_.
Definition: SinterNormalSpecies.cc:359
void setSinterAdhesion(Mdouble sinterAdhesion)
Sets sinterAdhesion_.
Definition: SinterNormalSpecies.cc:275
Mdouble beta(Mdouble z, Mdouble w)
This is the beta function, returns the approximation based on cmath's implementation of ln(gamma)
Definition: ExtendedMath.cc:164
Mdouble exp(Mdouble Exponent)
Definition: ExtendedMath.cc:84

References mathsFunc::beta(), mathsFunc::exp(), getInverseSinterViscosity(), getSinterAdhesion(), INFO, logger, PARHAMI_MCKEEPING, constants::pi, setInverseSinterViscosity(), setSinterAdhesion(), and setSinterType().

◆ setPenetrationDepthMax()

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.
240 {
241  penetrationDepthMax_ = penetrationDepthMax;
242 }

References penetrationDepthMax_.

Referenced by setPlasticParameters().

◆ setPlasticParameters()

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.
168 {
169  if (loadingStiffness <= 0 || unloadingStiffnessMax < loadingStiffness || cohesionStiffness < 0 ||
170  penetrationDepthMax < 0)
171  {
172  logger(ERROR, "arguments of setPlasticParameters do not make sense");
173  }
174  setLoadingStiffness(loadingStiffness);
175  setUnloadingStiffnessMax(unloadingStiffnessMax);
176  setCohesionStiffness(cohesionStiffness);
177  setPenetrationDepthMax(penetrationDepthMax);
178 }
void setCohesionStiffness(Mdouble cohesionStiffness)
Sets the cohesive stiffness of the linear plastic-viscoelastic normal force.
Definition: SinterNormalSpecies.cc:231
void setPenetrationDepthMax(Mdouble penetrationDepthMax)
Sets the maximum penetration depth of the linear plastic-viscoelastic normal force.
Definition: SinterNormalSpecies.cc:239
void setUnloadingStiffnessMax(Mdouble unloadingStiffnessMax)
Sets the maximum unloading stiffness of the linear plastic-viscoelastic normal force.
Definition: SinterNormalSpecies.cc:223

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

◆ setSeparationDis()

void SinterNormalSpecies::setSeparationDis ( Mdouble  separationDis)
325 {
326  if (separationDis < 0)
327  {
328  logger(ERROR, "SeparationDis(%) argument should be non-negative!", separationDis);
329  }
330  separationDis_ = separationDis;
331 }

References ERROR, logger, and separationDis_.

◆ setSinterAdhesion()

void SinterNormalSpecies::setSinterAdhesion ( Mdouble  sinterAdhesion)

Sets sinterAdhesion_.

should be non-negative

Parameters
[in]sinterAdhesion_
276 {
277  if (sinterAdhesion < 0)
278  {
279  logger(ERROR, "setSinterAdhesion(%) argument should be non-negative!", sinterAdhesion);
280  }
281  sinterAdhesion_ = sinterAdhesion;
282 }

References ERROR, logger, and sinterAdhesion_.

Referenced by setParhamiMcKeeping(), and setSinterForceAndTime().

◆ setSinterForceAndTime()

void SinterNormalSpecies::setSinterForceAndTime ( Mdouble  adhesionForce,
Mdouble  sinterTime,
Mdouble  radius 
)
Todo:
fix
371 {
374  setSinterAdhesion(adhesionForce / radius);
375  setInverseSinterViscosity(1.0 / (93.75 * adhesionForce * sinterTime / std::pow(radius, 5)));
376  logger(INFO, "Set sintering parameters: adhesion force f_a=%*r, sinter viscosity is nu = contactRadius^4/%",
378 }

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

◆ setSinterRate()

void SinterNormalSpecies::setSinterRate ( Mdouble  sinterRate)

Sets sinterRate_.

should be non-negative

Parameters
[in]sinterAdhesion_
289 {
290  if (sinterRate < 0)
291  {
292  logger(ERROR, "setSinterRate(%) argument should be non-negative!", sinterRate);
293  }
294  sinterRate_ = sinterRate;
295 }

References ERROR, logger, and sinterRate_.

◆ setSinterType()

void SinterNormalSpecies::setSinterType ( SINTERTYPE  sinterType)

Sets sinterRate_.

should be non-negative

Parameters
[in]sinterAdhesion_
341 {
342  sinterType_ = sinterType;
344  logger(INFO, "Sintertype set to CONSTANT_RATE");
346  logger(INFO, "Sintertype set to PARHAMI_MCKEEPING");
348  logger(INFO, "Sintertype set to TEMPERATURE_DEPENDENT_FRENKEL");
350  logger(INFO, "Sintertype set to REGIME_SINTERING");
351  else
352  logger(ERROR, "Sintertype not understood");
353 }
@ TEMPERATURE_DEPENDENT_FRENKEL

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

Referenced by setInverseSinterViscosity(), and setParhamiMcKeeping().

◆ setStiffnessAndRestitutionCoefficient()

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}\)
516 {
517  loadingStiffness_ = stiffness;
518  if (eps == 0.0)
519  {
520  dissipation_ = std::sqrt(2.0 * mass * stiffness);
521  }
522  else
523  {
524  dissipation_ =
525  -std::sqrt(2.0 * mass * stiffness / (constants::sqr_pi + mathsFunc::square(log(eps)))) * log(eps);
526  }
528 }
const Mdouble sqr_pi
Definition: ExtendedMath.h:47

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

◆ setSurfTension()

void SinterNormalSpecies::setSurfTension ( Mdouble  complianceZero)
307 {
308  if (surfTension < 0)
309  {
310  logger(ERROR, "SurfTension(%) argument should be non-negative!", surfTension);
311  }
312  surfTension_ = surfTension;
313 }

References ERROR, logger, and surfTension_.

◆ setTemperatureDependentSinterRate()

void SinterNormalSpecies::setTemperatureDependentSinterRate ( std::function< double(double temperature)>  temperatureDependentSinterRate)
481 {
482  temperatureDependentSinterRate_ = temperatureDependentSinterRate;
483 }

References temperatureDependentSinterRate_.

◆ setUnloadingStiffnessMax()

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.
224 {
225  unloadingStiffnessMax_ = unloadingStiffnessMax;
226 }

References unloadingStiffnessMax_.

Referenced by setPlasticParameters().

◆ write()

void SinterNormalSpecies::write ( std::ostream &  os) const

Writes the species properties to an output stream.

Parameters
[out]outputstream (typically the restart file)
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 }

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

Member Data Documentation

◆ cohesionStiffness_

Mdouble SinterNormalSpecies::cohesionStiffness_
private

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

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

◆ complianceZero_

Mdouble SinterNormalSpecies::complianceZero_
private

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

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

◆ constantC1_

Mdouble SinterNormalSpecies::constantC1_
private

Material constant

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

◆ dissipation_

◆ inverseSinterViscosity_

Mdouble SinterNormalSpecies::inverseSinterViscosity_
private

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

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

◆ loadingStiffness_

◆ penetrationDepthMax_

Mdouble SinterNormalSpecies::penetrationDepthMax_
private

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

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

◆ separationDis_

Mdouble SinterNormalSpecies::separationDis_
private

Separation distance comes from the fracture theory.

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

◆ sinterAdhesion_

Mdouble SinterNormalSpecies::sinterAdhesion_
private

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

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

◆ sinterRate_

Mdouble SinterNormalSpecies::sinterRate_
private

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

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

◆ sinterType_

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

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

◆ surfTension_

Mdouble SinterNormalSpecies::surfTension_
private

Material constant

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

◆ temperatureDependentSinterRate_

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

Referenced by getTemperatureDependentSinterRate(), and setTemperatureDependentSinterRate().

◆ unloadingStiffnessMax_

Mdouble SinterNormalSpecies::unloadingStiffnessMax_
private

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