MercuryDPM  Alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HertzianSinterInteraction Class Reference

Computes normal forces in case of a linear plastic visco-elastic interaction. More...

#include <HertzianSinterInteraction.h>

+ Inheritance diagram for HertzianSinterInteraction:

Public Member Functions

 HertzianSinterInteraction (BaseInteractable *P, BaseInteractable *I, Mdouble timeStamp)
 Constructor. More...
 
 HertzianSinterInteraction (const HertzianSinterInteraction &p)
 Copy constructor. More...
 
virtual ~HertzianSinterInteraction ()
 Destructor. More...
 
void computeSinterForce ()
 Creates a copy of an object of this class. (Deep copy) More...
 
void computeNormalForce ()
 Calls computeSinterForce(). More...
 
virtual void read (std::istream &is)
 Interaction read function, which accepts an std::istream as input. More...
 
virtual void write (std::ostream &os) const
 Interaction write function, which accepts an std::ostream as input. More...
 
virtual std::string getBaseName () const
 Returns the name of the interaction. More...
 
Mdouble getElasticEnergy () const
 Computes and returns the amount of elastic energy stored in the spring. More...
 
const HertzianSinterNormalSpeciesgetSpecies () const
 
Mdouble getMaxOverlap () const
 
void setMaxOverlap (const Mdouble)
 
Mdouble getUnloadingModulus () const
 
- Public Member Functions inherited from BaseInteraction
 BaseInteraction (BaseInteractable *P, BaseInteractable *I, Mdouble timeStamp)
 A constructor takes the BaseInteractable objects which are interacting (come into contact) and time the interaction starts. More...
 
 BaseInteraction (const BaseInteraction &p)
 Copy constructor. More...
 
 BaseInteraction ()
 Empty constructor. More...
 
virtual ~BaseInteraction ()
 The default destructor. More...
 
virtual void actionsOnErase ()
 If an interaction needs to do something before it gets erased, add it here. E.g. Liquid bridges rupture at the end of their lifetime, and the liquid bridge volume has to be redistributed. The reason this action is not done in the destructor is that this action should not be taken when erasing ghost interactions. More...
 
virtual void computeForce ()
 Virtual function that contains the force law between the two objects interacting. More...
 
void writeToFStat (std::ostream &os) const
 Writes forces data to the FStat file. More...
 
virtual std::string getName () const
 Virtual function which allows interactions to be named. More...
 
void setDistance (Mdouble distance)
 Sets the interaction distance between the two interacting objects. More...
 
void setNormal (Vec3D normal)
 Sets the normal vector between the two interacting objects. More...
 
void setOverlap (Mdouble overlap)
 Set the overlap between the two interacting object. More...
 
void setContactPoint (Vec3D contactPoint)
 Set the location of the contact point between the two interacting objects. More...
 
void setTimeStamp (Mdouble timeStamp)
 Updates the time step of the interacting. Note, timesteps used to find completed interactions. More...
 
void setSpecies (BaseSpecies *species)
 Set the Species of the interaction; note this can either be a Species or MixedSpecies. More...
 
void setP (BaseInteractable *P)
 Sets the first object involved in the interaction (normally a particle). More...
 
void setI (BaseInteractable *I)
 Sets the second object involved in the interaction (often particle or wall). More...
 
void setHandler (InteractionHandler *handler)
 Sets the pointer to the interaction hander which is storing this interaction. More...
 
InteractionHandlergetHandler () const
 Gets a point to the interaction handlers to which this interaction belongs. More...
 
const Vec3DgetForce () const
 Gets the current force (vector) between the two interacting objects. More...
 
const Vec3DgetTorque () const
 Gets the current torque (vector) between the two interacting objects. More...
 
const Vec3DgetNormal () const
 Gets the normal vector between the two interacting objects. More...
 
const Vec3DgetContactPoint () const
 Gets constant reference to contact point (vector). More...
 
Mdouble getOverlap () const
 Returns a Mdouble with the current overlap between the two interacting objects. More...
 
Mdouble getContactRadius () const
 Returns a Mdouble with the current contact between the two interacting objects. More...
 
void removeFromHandler ()
 Removes this interaction from its interaction hander. More...
 
void copySwitchPointer (const BaseInteractable *original, BaseInteractable *ghost) const
 This copies the interactions of the original particle and replaces the original with the ghost copy. More...
 
void gatherContactStatistics ()
 
BaseInteractablegetP ()
 Returns a pointer to first object involved in the interaction (normally a particle). More...
 
BaseInteractablegetI ()
 
const BaseInteractablegetP () const
 
const BaseInteractablegetI () const
 Returns a constant pointer to the second object involved in the interaction. More...
 
Mdouble getTimeStamp () const
 Returns an Mdouble which is the time stamp of the interaction. More...
 
virtual void integrate (Mdouble timeStep)
 integrates variables of the interaction which need to be integrate e.g. the tangential overlap. More...
 
virtual Mdouble getTangentialOverlap () const
 get the length of the current tangential overlap More...
 
Mdouble getDistance () const
 Returns an Mdouble which is the norm (length) of distance vector. More...
 
const Vec3DgetRelativeVelocity () const
 Returns a constant reference to a vector of relative velocity. More...
 
Mdouble getNormalRelativeVelocity () const
 Returns a double which is the norm (length) of the relative velocity vector. More...
 
Mdouble getAbsoluteNormalForce () const
 Returns the absolute value of the norm (length) of the Normal force vector. More...
 
virtual BaseInteractioncopy () const =0
 Makes a copy of the interaction and returns a pointer to the copy. More...
 
unsigned int getMultiContactIdentifier () const
 
void setMultiContactIdentifier (unsigned int multiContactIdentifier_)
 
virtual void rotateHistory (Matrix3D &rotationMatrix)
 When periodic particles are used, some interactions need certain history properties rotated (e.g. tangential springs). This is the function for that. More...
 
virtual void actionsAfterTimeStep ()
 
virtual unsigned getNumberOfFieldsVTK () const
 
virtual std::string getTypeVTK (unsigned i) const
 
virtual std::string getNameVTK (unsigned i) const
 
virtual std::vector< MdoublegetFieldVTK (unsigned i) const
 
void setForce (Vec3D force)
 set total force (this is used by the normal force, tangential forces are added use addForce) More...
 
- Public Member Functions inherited from BaseObject
 BaseObject ()
 Default constructor. More...
 
 BaseObject (const BaseObject &p)
 Copy constructor, copies all the objects BaseObject contains. More...
 
virtual ~BaseObject ()
 virtual destructor More...
 
virtual void moveInHandler (const unsigned int index)
 Except that it is virtual, it does the same thing as setIndex() does. More...
 
void setIndex (const unsigned int index)
 Allows one to assign an index to an object in the handler/container. More...
 
void setId (const unsigned int id)
 Assigns a unique identifier to each object in the handler (container) which remains constant even after the object is deleted from the container/handler. More...
 
unsigned int getIndex () const
 Returns the index of the object in the handler. More...
 
unsigned int getId () const
 Returns the unique identifier of any particular object. More...
 

Private Attributes

Mdouble maxOverlap_
 

Additional Inherited Members

- Protected Member Functions inherited from BaseInteraction
virtual const Vec3D getTangentialForce () const
 
Mdouble getEffectiveRadius () const
 Returns a Mdouble to the effective radius of the interaction. (Not corrected for the overlap) More...
 
Mdouble getEffectiveMass () const
 Returns a Mdouble to the effective radius of the interaction. (Not corrected for the overlap) More...
 
Mdouble getEffectiveCorrectedRadius ()
 Returns a Mdouble to the effective radius corrected for the overlaps of the particles. More...
 
void addForce (Vec3D force)
 add an force increment to the total force. More...
 
void addTorque (Vec3D torque)
 
void setTorque (Vec3D torque)
 set the total force (this is used by the normal force, tangential torques are added use addTorque) More...
 
void setRelativeVelocity (Vec3D relativeVelocity)
 set the relative velocity of the current of the interactions. More...
 
void setNormalRelativeVelocity (Mdouble normalRelativeVelocit)
 set the normal component of the relative velocity. More...
 
void setAbsoluteNormalForce (Mdouble absoluteNormalForce)
 the absolute values of the norm (length) of the normal force More...
 
const BaseSpeciesgetBaseSpecies () const
 Return a constant point to BaseSpecies of the interaction. More...
 
virtual Mdouble getElasticEnergyAtEquilibrium (Mdouble adhesiveForce) const
 
virtual void reverseHistory ()
 When periodic particles some interaction need certain history properties reversing. This is the function for that. More...
 

Detailed Description

Computes normal forces in case of a linear plastic visco-elastic interaction.

Definition at line 36 of file HertzianSinterInteraction.h.

Constructor & Destructor Documentation

HertzianSinterInteraction::HertzianSinterInteraction ( BaseInteractable P,
BaseInteractable I,
Mdouble  timeStamp 
)

Constructor.

Parameters
[in]P
[in]I
[in]timeStamp

Definition at line 41 of file HertzianSinterInteraction.cc.

References maxOverlap_.

42  : BaseInteraction(P, I, timeStamp)
43 {
44  maxOverlap_=0;
45 #ifdef DEBUG_CONSTRUCTOR
46  std::cout<<"HertzianSinterInteraction::HertzianSinterInteraction() finished"<<std::endl;
47 #endif
48 }
BaseInteraction()
Empty constructor.
HertzianSinterInteraction::HertzianSinterInteraction ( const HertzianSinterInteraction p)

Copy constructor.

Parameters
[in]p

Definition at line 52 of file HertzianSinterInteraction.cc.

References maxOverlap_.

53  : BaseInteraction(p)
54 {
56 #ifdef DEBUG_CONSTRUCTOR
57  std::cout<<"HertzianSinterInteraction::HertzianSinterInteraction(const HertzianSinterInteraction &p finished"<<std::endl;
58 #endif
59 }
BaseInteraction()
Empty constructor.
HertzianSinterInteraction::~HertzianSinterInteraction ( )
virtual

Destructor.

Definition at line 63 of file HertzianSinterInteraction.cc.

64 {
65 #ifdef DEBUG_DESTRUCTOR
66  std::cout<<"HertzianSinterInteraction::~HertzianSinterInteraction() finished"<<std::endl;
67 #endif
68 }

Member Function Documentation

void HertzianSinterInteraction::computeNormalForce ( )

Calls computeSinterForce().

Definition at line 175 of file HertzianSinterInteraction.cc.

References computeSinterForce().

176 {
178 }
void computeSinterForce()
Creates a copy of an object of this class. (Deep copy)
void HertzianSinterInteraction::computeSinterForce ( )

Creates a copy of an object of this class. (Deep copy)

Computes the normal forces due to linear plastic visco elastic interaction.

Definition at line 99 of file HertzianSinterInteraction.cc.

References Vec3D::dot(), HertzianSinterNormalSpecies::getCohesionModulus(), BaseInteraction::getContactPoint(), HertzianSinterNormalSpecies::getDissipation(), BaseHandler< T >::getDPMBase(), BaseInteraction::getEffectiveRadius(), BaseInteraction::getHandler(), BaseInteraction::getI(), HertzianSinterNormalSpecies::getLoadingModulus(), getMaxOverlap(), BaseInteraction::getNormal(), BaseInteraction::getNormalRelativeVelocity(), BaseInteraction::getOverlap(), BaseInteraction::getP(), HertzianSinterNormalSpecies::getPenetrationDepthMax(), BaseInteraction::getRelativeVelocity(), HertzianSinterNormalSpecies::getSinterRate(), getSpecies(), DPMBase::getTime(), DPMBase::getTimeStep(), HertzianSinterNormalSpecies::getUnloadingModulusMax(), maxOverlap_, BaseInteraction::setAbsoluteNormalForce(), BaseInteraction::setForce(), setMaxOverlap(), BaseInteraction::setNormalRelativeVelocity(), BaseInteraction::setRelativeVelocity(), BaseInteraction::setTorque(), and mathsFunc::square().

Referenced by computeNormalForce().

100 {
101  // Compute the relative velocity vector of particle P w.r.t. I
102  setRelativeVelocity(getP()->getVelocityAtContact(getContactPoint()) - getI()->getVelocityAtContact(getContactPoint()));
103  // Compute the projection of vrel onto the normal (can be negative)
105 
106  if (getOverlap() > 0) //if contact forces
107  {
108  const HertzianSinterNormalSpecies* species = getSpecies();
109  Mdouble effectiveDiameter = 2.0*getEffectiveRadius();
110 
111  //calculate the overlap above which the max. unloading stiffness becomes active (the 'fluid branch')
112  static Mdouble maxFactor = 1
113  -mathsFunc::square(cbrt((species->getLoadingModulus()+species->getCohesionModulus())/species->getUnloadingModulusMax()));
114  Mdouble deltaStar = species->getPenetrationDepthMax() * effectiveDiameter/maxFactor;
115 
116  //increase max overlap if necessary
117  if (getOverlap()>getMaxOverlap()) {
119  std::cout << "," << getHandler()->getDPMBase()->getTime();
120  }
121  //limit max overlap if necessary
122  if (getMaxOverlap()>deltaStar)
123  setMaxOverlap(deltaStar);
124 
125  //calculate the unloading modulus
126  Mdouble loadingCohesionModulus = species->getLoadingModulus()+species->getCohesionModulus();
127  Mdouble unloadingModulus = loadingCohesionModulus
128  + (species->getUnloadingModulusMax() - loadingCohesionModulus) * (getMaxOverlap() / deltaStar);
129 
130  //calculate the overlap where the force is minimal
131  Mdouble factor = 1-mathsFunc::square(cbrt(loadingCohesionModulus/unloadingModulus));
132  Mdouble minOverlap = factor*maxOverlap_;
133 
134  //add dissipative force
135  Mdouble normalForce = -species->getDissipation() * getNormalRelativeVelocity();
136 
137  //compute elastic force
138  if (getOverlap() < minOverlap) {
139  //decrease max overlap if in cohesive range
140  std::cout << "." << getHandler()->getDPMBase()->getTime();
141  setMaxOverlap(getOverlap()/factor);
142  } else {
143  Mdouble contactRadius = sqrt(2.0*effectiveDiameter * (getOverlap()-minOverlap));
144  normalForce += 4./3.*unloadingModulus * contactRadius *(getOverlap()-minOverlap);
145  }
146 
147  setAbsoluteNormalForce(std::abs(normalForce)); //used for the friction force calculations;
148 
149  Mdouble contactRadius = sqrt(2.0*effectiveDiameter * getOverlap());
150  normalForce -= 4./3.*species->getCohesionModulus() * contactRadius *getOverlap();
151 
152  setForce(getNormal() * normalForce);
153  setTorque(Vec3D(0.0, 0.0, 0.0));
154 
155  //now add the sintering model 'modified Frenkel' of the Pokula paper
156  //plasticOverlap_+=species->getSinterRate()*(deltaStar-plasticOverlap_)*getHandler()->getDPMBase()->getTimeStep();
157  //x/a=sqrt(2*a*del)/a
158  Mdouble x = 1e-10+sqrt(2.0*maxOverlap_/effectiveDiameter);
159  //Mdouble x2 = x*x;
160  Mdouble dx = 0.5/x;//+ x*(-0.5 + x2* (0.15625 + x2*(-0.0208333 +x2*(-0.00325521 +x2*(0.000189887 +x2*0.0000542535)))));
161  Mdouble doverlap = x*dx*effectiveDiameter;
162  //doverlap = 0.5/(factor*factor*plasticOverlap_);
163  maxOverlap_ += species->getSinterRate()*doverlap*getHandler()->getDPMBase()->getTimeStep();
164  }
165  else
166  {
168  setForce(Vec3D(0.0, 0.0, 0.0));
169  setTorque(Vec3D(0.0, 0.0, 0.0));
170  }
171 }
const HertzianSinterNormalSpecies * getSpecies() const
Mdouble getEffectiveRadius() const
Returns a Mdouble to the effective radius of the interaction. (Not corrected for the overlap) ...
Mdouble getLoadingModulus() const
Returns the loading stiffness of the linear plastic-viscoelastic normal force.
InteractionHandler * getHandler() const
Gets a point to the interaction handlers to which this interaction belongs.
Mdouble getDissipation() const
Allows the normal dissipation to be accessed.
const Vec3D & getRelativeVelocity() const
Returns a constant reference to a vector of relative velocity.
double Mdouble
void setRelativeVelocity(Vec3D relativeVelocity)
set the relative velocity of the current of the interactions.
void setForce(Vec3D force)
set total force (this is used by the normal force, tangential forces are added use addForce) ...
static Mdouble dot(const Vec3D &a, const Vec3D &b)
Calculates the dot product of two Vec3D: .
Definition: Vector.cc:167
void setNormalRelativeVelocity(Mdouble normalRelativeVelocit)
set the normal component of the relative velocity.
T square(T val)
squares a number
Definition: ExtendedMath.h:91
Mdouble getSinterRate() const
Allows the normal dissipation to be accessed.
const Vec3D & getContactPoint() const
Gets constant reference to contact point (vector).
Mdouble getNormalRelativeVelocity() const
Returns a double which is the norm (length) of the relative velocity vector.
Mdouble getCohesionModulus() const
Returns the cohesive stiffness of the linear plastic-viscoelastic normal force.
const Vec3D & getNormal() const
Gets the normal vector between the two interacting objects.
void setTorque(Vec3D torque)
set the total force (this is used by the normal force, tangential torques are added use addTorque) ...
HertzianSinterNormalSpecies contains the parameters used to describe a plastic-cohesive normal force ...
Mdouble getOverlap() const
Returns a Mdouble with the current overlap between the two interacting objects.
void setAbsoluteNormalForce(Mdouble absoluteNormalForce)
the absolute values of the norm (length) of the normal force
BaseInteractable * getI()
BaseInteractable * getP()
Returns a pointer to first object involved in the interaction (normally a particle).
Implementation of a 3D vector (by Vitaliy).
Definition: Vector.h:45
DPMBase * getDPMBase()
Gets the problem that is solved using this handler.
Definition: BaseHandler.h:543
Mdouble getTimeStep() const
Allows the time step dt to be accessed.
Definition: DPMBase.cc:465
Mdouble getTime() const
Access function for the time.
Definition: DPMBase.cc:169
Mdouble getUnloadingModulusMax() const
Returns the maximum unloading stiffness of the linear plastic-viscoelastic normal force...
Mdouble getPenetrationDepthMax() const
Returns the maximum penetration depth of the linear plastic-viscoelastic normal force.
std::string HertzianSinterInteraction::getBaseName ( ) const
virtual

Returns the name of the interaction.

Returns
std::string

Definition at line 92 of file HertzianSinterInteraction.cc.

93 {
94  return "HertzianSinter";
95 }
Mdouble HertzianSinterInteraction::getElasticEnergy ( ) const
virtual

Computes and returns the amount of elastic energy stored in the spring.

Returns
Mdouble
Todo:
TW this is not correct; we should count the return energy

Reimplemented from BaseInteraction.

Definition at line 182 of file HertzianSinterInteraction.cc.

References HertzianSinterNormalSpecies::getLoadingModulus(), BaseInteraction::getOverlap(), getSpecies(), and mathsFunc::square().

183 {
184  if (getOverlap() > 0)
185  return 0.5 * (getSpecies()->getLoadingModulus() * mathsFunc::square(getOverlap()));
186  else
187  return 0.0;
189 }
const HertzianSinterNormalSpecies * getSpecies() const
Mdouble getLoadingModulus() const
Returns the loading stiffness of the linear plastic-viscoelastic normal force.
T square(T val)
squares a number
Definition: ExtendedMath.h:91
Mdouble getOverlap() const
Returns a Mdouble with the current overlap between the two interacting objects.
Mdouble HertzianSinterInteraction::getMaxOverlap ( ) const
Returns
Mdouble plasticOverlap_

Definition at line 200 of file HertzianSinterInteraction.cc.

References maxOverlap_.

Referenced by computeSinterForce(), and getUnloadingModulus().

201 {
202  return maxOverlap_;
203 }
const HertzianSinterNormalSpecies * HertzianSinterInteraction::getSpecies ( ) const
Returns
const HertzianSinterNormalSpecies*

Definition at line 193 of file HertzianSinterInteraction.cc.

References BaseInteraction::getBaseSpecies().

Referenced by computeSinterForce(), getElasticEnergy(), and getUnloadingModulus().

194 {
195  return dynamic_cast<const HertzianSinterNormalSpecies*>(getBaseSpecies());
196 }
const BaseSpecies * getBaseSpecies() const
Return a constant point to BaseSpecies of the interaction.
HertzianSinterNormalSpecies contains the parameters used to describe a plastic-cohesive normal force ...
Mdouble HertzianSinterInteraction::getUnloadingModulus ( ) const
Returns
Mdouble

Definition at line 214 of file HertzianSinterInteraction.cc.

References BaseInteraction::getEffectiveRadius(), HertzianSinterNormalSpecies::getLoadingModulus(), getMaxOverlap(), BaseInteraction::getOverlap(), HertzianSinterNormalSpecies::getPenetrationDepthMax(), getSpecies(), and HertzianSinterNormalSpecies::getUnloadingModulusMax().

215 {
216  const HertzianSinterNormalSpecies* species = getSpecies();
217  Mdouble effectiveDiameter = 2.0*getEffectiveRadius();
218  Mdouble deltaMaxFluid = species->getPenetrationDepthMax() * effectiveDiameter / (1.0-species->getLoadingModulus()/species->getUnloadingModulusMax());
219  if (getOverlap() > deltaMaxFluid)
220  return species->getUnloadingModulusMax();
221  else
222  return species->getLoadingModulus() + (species->getUnloadingModulusMax() - species->getLoadingModulus()) * getMaxOverlap()/deltaMaxFluid;
223 }
const HertzianSinterNormalSpecies * getSpecies() const
Mdouble getEffectiveRadius() const
Returns a Mdouble to the effective radius of the interaction. (Not corrected for the overlap) ...
Mdouble getLoadingModulus() const
Returns the loading stiffness of the linear plastic-viscoelastic normal force.
double Mdouble
HertzianSinterNormalSpecies contains the parameters used to describe a plastic-cohesive normal force ...
Mdouble getOverlap() const
Returns a Mdouble with the current overlap between the two interacting objects.
Mdouble getUnloadingModulusMax() const
Returns the maximum unloading stiffness of the linear plastic-viscoelastic normal force...
Mdouble getPenetrationDepthMax() const
Returns the maximum penetration depth of the linear plastic-viscoelastic normal force.
void HertzianSinterInteraction::read ( std::istream &  is)
virtual

Interaction read function, which accepts an std::istream as input.

Calls the read function of BaseInteraction().

Parameters
[in,out]is

Reimplemented from BaseInteraction.

Definition at line 83 of file HertzianSinterInteraction.cc.

References maxOverlap_, and BaseInteraction::read().

84 {
86  std::string dummy;
87  is >> dummy >> maxOverlap_;
88 }
virtual void read(std::istream &is)
Interaction read function, which accepts an std::istream as input.
void HertzianSinterInteraction::setMaxOverlap ( const Mdouble  maxOverlap)
Parameters
[in]maxOverlap

Definition at line 207 of file HertzianSinterInteraction.cc.

References maxOverlap_.

Referenced by computeSinterForce().

208 {
209  maxOverlap_ = maxOverlap;
210 }
void HertzianSinterInteraction::write ( std::ostream &  os) const
virtual

Interaction write function, which accepts an std::ostream as input.

Calls the write function of BaseInteraction().

Parameters
[in,out]os

Reimplemented from BaseInteraction.

Definition at line 74 of file HertzianSinterInteraction.cc.

References maxOverlap_, and BaseInteraction::write().

75 {
77  os << " maxOverlap " << maxOverlap_;
78 }
virtual void write(std::ostream &os) const
Interaction print function, which accepts an std::ostream as input.

Member Data Documentation

Mdouble HertzianSinterInteraction::maxOverlap_
private

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