ESyS-Particle  2.3.4
CFrictionInteraction Class Reference

Frictional+Elastic interaction between particles. More...

#include <FrictionInteraction.h>

Inheritance diagram for CFrictionInteraction:
Collaboration diagram for CFrictionInteraction:

Public Types

typedef CFrictionIGP ParameterType
 
typedef double(CFrictionInteraction::* ScalarFieldFunction) () const
 
typedef std::pair< bool, double >(CFrictionInteraction::* CheckedScalarFieldFunction) () const
 
typedef Vec3(CFrictionInteraction::* VectorFieldFunction) () const
 

Public Member Functions

 CFrictionInteraction ()
 
 CFrictionInteraction (CParticle *, CParticle *)
 
 CFrictionInteraction (CParticle *, CParticle *, const CFrictionIGP &)
 
virtual ~CFrictionInteraction ()
 
virtual void calcForces ()
 
virtual bool isPersistent ()
 
void setTimeStepSize (double dt)
 
std::pair< bool, double > getAbsFrictionalForce () const
 
std::pair< bool, double > getAbsFN () const
 
std::pair< bool, double > getAbsMuFN () const
 
std::pair< bool, double > getSlipVelocity () const
 
std::pair< bool, double > getNormalStress () const
 
std::pair< bool, double > getMaxFricStress () const
 
std::pair< bool, double > getAbsFrictionalStress () const
 
double getAbsForceDeficit () const
 
double getPotentialEnergy () const
 
double getSlipping () const
 
double getSticking () const
 
double getDissipatedEnergy () const
 
virtual double Count () const
 
Vec3 getForce () const
 
Vec3 getNormalForce () const
 
virtual Vec3 getPos () const
 
std::pair< bool, double > getMuEff (const Vec3 &, const Vec3 &) const
 
std::pair< bool, double > getMuEffXY () const
 
std::pair< bool, double > getMuEffXZ () const
 
virtual void saveRestartData (std::ostream &oStream)
 
virtual void loadRestartData (std::istream &iStream)
 
- Public Member Functions inherited from APairInteraction
 APairInteraction ()
 
 APairInteraction (CParticle *, CParticle *)
 
virtual ~APairInteraction ()
 
const CParticlefirst () const
 
const CParticlesecond () const
 
CParticlefirst ()
 
CParticlesecond ()
 
pair< int, int > getPairID () const
 
void setPP (CParticle *, CParticle *)
 
void checkIDs ()
 
virtual bool hasTag (int, int) const
 
virtual Vec3 getPosFirst () const
 
virtual Vec3 getPosSecond () const
 
esys::lsm::quintuple< Vec3, double, Vec3, double, Vec3getRaw2Data () const
 
template<class TmplParticle >
void setPP (const vector< TmplParticle * > &pp)
 
- Public Member Functions inherited from AInteraction
 AInteraction ()
 
virtual ~AInteraction ()
 
bool initialized () const
 
virtual void calcHeatTrans ()
 
virtual void calcHeatFrict ()
 
vector< int > getAllID () const
 
int getID ()
 
double Count () const
 

Static Public Member Functions

static ScalarFieldFunction getScalarFieldFunction (const string &)
 
static CheckedScalarFieldFunction getCheckedScalarFieldFunction (const string &)
 
static VectorFieldFunction getVectorFieldFunction (const string &)
 
static string getType ()
 

Protected Attributes

double m_k
 spring constant More...
 
double m_r0
 equilibrium distance More...
 
double m_mu
 coefficient of friction More...
 
double m_ks
 shear stiffness (Cundall) More...
 
double m_dt
 time step More...
 
Vec3 m_Ffric
 current frictional force More...
 
Vec3 m_force_deficit
 difference between fric. force & force necessary for slip More...
 
Vec3 m_cpos
 contact position More...
 
Vec3 m_normal_force
 current normal force More...
 
bool m_is_slipping
 static/dynamic status of the interaction More...
 
bool m_is_touching
 contact status of the interaction More...
 
double m_E_diss
 dissipated energy More...
 
bool m_scaling
 scaling k with particle radius More...
 
- Protected Attributes inherited from APairInteraction
CParticlem_p1
 
CParticlem_p2
 
- Protected Attributes inherited from AInteraction
vector< int > m_id
 id's of the particles involved More...
 
int m_iid
 interaction id More...
 
bool m_init
 

Friends

class TML_PackedMessageInterface
 
std::ostream & operator<< (std::ostream &, const CFrictionInteraction &)
 

Detailed Description

Frictional+Elastic interaction between particles.

Author
Steffen Abe $Revision$ $Date$

Member Typedef Documentation

◆ CheckedScalarFieldFunction

typedef std::pair<bool,double>(CFrictionInteraction::* CFrictionInteraction::CheckedScalarFieldFunction) () const

◆ ParameterType

◆ ScalarFieldFunction

typedef double(CFrictionInteraction::* CFrictionInteraction::ScalarFieldFunction) () const

◆ VectorFieldFunction

typedef Vec3(CFrictionInteraction::* CFrictionInteraction::VectorFieldFunction) () const

Constructor & Destructor Documentation

◆ CFrictionInteraction() [1/3]

CFrictionInteraction::CFrictionInteraction ( )

◆ CFrictionInteraction() [2/3]

CFrictionInteraction::CFrictionInteraction ( CParticle p1,
CParticle p2 
)

constructor for CFrictionInteraction without friction parameters, only calls the constructor of APairInteraction with the 2 particle pointers

References m_E_diss, m_is_slipping, and m_is_touching.

◆ CFrictionInteraction() [3/3]

CFrictionInteraction::CFrictionInteraction ( CParticle p1,
CParticle p2,
const CFrictionIGP param 
)

◆ ~CFrictionInteraction()

CFrictionInteraction::~CFrictionInteraction ( )
virtual

Member Function Documentation

◆ calcForces()

void CFrictionInteraction::calcForces ( )
virtual

Calculate elastic and frictional forces.

Implements APairInteraction.

Reimplemented in CVWFriction, and CAdhesiveFriction.

References CParticle::applyForce(), CBasicParticle::getPos(), CBasicParticle::getRad(), CParticle::getVel(), m_cpos, m_dt, m_E_diss, m_Ffric, m_force_deficit, m_is_slipping, m_is_touching, m_k, m_ks, m_mu, m_normal_force, APairInteraction::m_p1, APairInteraction::m_p2, and Vec3::norm().

Referenced by CAdhesiveFriction::calcForces().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Count()

double CFrictionInteraction::Count ( ) const
virtual

return 1 if particles are in contact, 0 otherwise

References m_is_touching.

Referenced by CFractalFriction::getScalarFieldFunction(), getScalarFieldFunction(), and CVWFriction::getScalarFieldFunction().

Here is the caller graph for this function:

◆ getAbsFN()

pair< bool, double > CFrictionInteraction::getAbsFN ( ) const

get current normal force

References m_is_touching, m_normal_force, and Vec3::norm().

Referenced by getCheckedScalarFieldFunction().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAbsForceDeficit()

double CFrictionInteraction::getAbsForceDeficit ( ) const

get the force needed to overcome friction and make the interaction slip

References m_force_deficit, and Vec3::norm().

Referenced by getScalarFieldFunction().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAbsFrictionalForce()

pair< bool, double > CFrictionInteraction::getAbsFrictionalForce ( ) const

get current frictional/stopping force

References CBasicParticle::getPos(), CBasicParticle::getRad(), m_Ffric, APairInteraction::m_p1, APairInteraction::m_p2, and Vec3::norm().

Referenced by CFractalFriction::getCheckedScalarFieldFunction(), getCheckedScalarFieldFunction(), and CVWFriction::getCheckedScalarFieldFunction().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAbsFrictionalStress()

pair< bool, double > CFrictionInteraction::getAbsFrictionalStress ( ) const

get current frictional/stopping stress (f_fric/r^2)

References CBasicParticle::getPos(), CBasicParticle::getRad(), m_Ffric, APairInteraction::m_p1, APairInteraction::m_p2, and Vec3::norm().

Referenced by getCheckedScalarFieldFunction().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAbsMuFN()

pair< bool, double > CFrictionInteraction::getAbsMuFN ( ) const

get max. frictional force, i.e. coeff. of friction * normal force

References CBasicParticle::getPos(), CBasicParticle::getRad(), m_k, APairInteraction::m_p1, APairInteraction::m_p2, and Vec3::norm().

Referenced by CFractalFriction::getCheckedScalarFieldFunction(), getCheckedScalarFieldFunction(), and CVWFriction::getCheckedScalarFieldFunction().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCheckedScalarFieldFunction()

CFrictionInteraction::CheckedScalarFieldFunction CFrictionInteraction::getCheckedScalarFieldFunction ( const string &  name)
static

Get the particle member function which returns a checked scalar field of a given name.

Parameters
namethe name of the field

References getAbsFN(), getAbsFrictionalForce(), getAbsFrictionalStress(), getAbsMuFN(), getMaxFricStress(), getMuEffXY(), getMuEffXZ(), getNormalStress(), getSlipVelocity(), and NULL.

Here is the call graph for this function:

◆ getDissipatedEnergy()

double CFrictionInteraction::getDissipatedEnergy ( ) const

return the amount of energy dissipated during the last time step

References m_E_diss.

Referenced by getScalarFieldFunction().

Here is the caller graph for this function:

◆ getForce()

Vec3 CFrictionInteraction::getForce ( ) const

get net force on particle1 imposed by this interaction. Returns Vec3::ZERO if particles are not in contact.

References m_Ffric, m_is_touching, and m_normal_force.

Referenced by getVectorFieldFunction().

Here is the caller graph for this function:

◆ getMaxFricStress()

pair< bool, double > CFrictionInteraction::getMaxFricStress ( ) const

get max. frictional stress, i.e. coeff. of friction * normal stress

References CBasicParticle::getPos(), CBasicParticle::getRad(), m_k, APairInteraction::m_p1, APairInteraction::m_p2, and Vec3::norm().

Referenced by getCheckedScalarFieldFunction().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMuEff()

pair< bool, double > CFrictionInteraction::getMuEff ( const Vec3 dir,
const Vec3 norm 
) const

Calculate effective coefficient of friction for this interaction for a given direction of the applied shear force. If the effective coefficient of friction is infinite, -1 is returned.

Parameters
dirthe direction of the applied shear force
Returns
the effective coefficient of friction if it is finite, -1 otherwise and -2 for no contact

References CBasicParticle::getPos(), CBasicParticle::getRad(), CParticle::getVel(), m_mu, APairInteraction::m_p1, APairInteraction::m_p2, Vec3::norm(), and Vec3::unit().

Referenced by getMuEffXY(), and getMuEffXZ().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMuEffXY()

std::pair<bool,double> CFrictionInteraction::getMuEffXY ( ) const
inline

References getMuEff().

Referenced by CFractalFriction::getCheckedScalarFieldFunction(), getCheckedScalarFieldFunction(), and CVWFriction::getCheckedScalarFieldFunction().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMuEffXZ()

std::pair<bool,double> CFrictionInteraction::getMuEffXZ ( ) const
inline

References getMuEff().

Referenced by CFractalFriction::getCheckedScalarFieldFunction(), getCheckedScalarFieldFunction(), and CVWFriction::getCheckedScalarFieldFunction().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getNormalForce()

Vec3 CFrictionInteraction::getNormalForce ( ) const

If the particles are in contact, get normal force, if not in contact return (0,0,0)

References m_is_touching, and m_normal_force.

Referenced by getVectorFieldFunction().

Here is the caller graph for this function:

◆ getNormalStress()

pair< bool, double > CFrictionInteraction::getNormalStress ( ) const

get current normal stress

References CBasicParticle::getRad(), m_is_touching, m_normal_force, APairInteraction::m_p1, APairInteraction::m_p2, and Vec3::norm().

Referenced by getCheckedScalarFieldFunction().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPos()

virtual Vec3 CFrictionInteraction::getPos ( ) const
inlinevirtual

Implements APairInteraction.

References m_cpos.

◆ getPotentialEnergy()

double CFrictionInteraction::getPotentialEnergy ( ) const

get the potential energy stored in the interaction

Warning
For performance reasons the tangential part of the elastic energy is calculated directly from the current tangential force whereas it would be more accurate to calculate it incrementally during the force calculation. Be aware that therefore the potential energy is an approximation. Tests suggest an accuracy of a few percent.

References m_Ffric, m_k, m_ks, and m_normal_force.

Referenced by CFractalFriction::getScalarFieldFunction(), getScalarFieldFunction(), and CVWFriction::getScalarFieldFunction().

Here is the caller graph for this function:

◆ getScalarFieldFunction()

CFrictionInteraction::ScalarFieldFunction CFrictionInteraction::getScalarFieldFunction ( const string &  name)
static

Get the particle member function which returns a scalar field of a given name.

Parameters
namethe name of the field

References Count(), getAbsForceDeficit(), getDissipatedEnergy(), getPotentialEnergy(), getSlipping(), getSticking(), and NULL.

Here is the call graph for this function:

◆ getSlipping()

double CFrictionInteraction::getSlipping ( ) const

Get the static/dynamic status of the interaction. Returns 1 for a contact in dynamic friction, 0 for static or no contact

References m_is_slipping.

Referenced by CFractalFriction::getScalarFieldFunction(), getScalarFieldFunction(), and CVWFriction::getScalarFieldFunction().

Here is the caller graph for this function:

◆ getSlipVelocity()

pair< bool, double > CFrictionInteraction::getSlipVelocity ( ) const

get "force deficit", i.e. the force needed to make the contact dynamic

get the slipping velocity, i.e. the absolute value of the tangential part of the relatve particle velocity

References CBasicParticle::getPos(), CBasicParticle::getRad(), CParticle::getVel(), APairInteraction::m_p1, APairInteraction::m_p2, Vec3::norm(), and Vec3::unit().

Referenced by CFractalFriction::getCheckedScalarFieldFunction(), getCheckedScalarFieldFunction(), and CVWFriction::getCheckedScalarFieldFunction().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSticking()

double CFrictionInteraction::getSticking ( ) const

Get "sticking" contacts, i.e. return 1 if the contact is touching but not slipping, 0 otherwise

References m_is_slipping, and m_is_touching.

Referenced by getScalarFieldFunction(), and CVWFriction::getScalarFieldFunction().

Here is the caller graph for this function:

◆ getType()

static string CFrictionInteraction::getType ( )
inlinestatic

◆ getVectorFieldFunction()

CFrictionInteraction::VectorFieldFunction CFrictionInteraction::getVectorFieldFunction ( const string &  name)
static

Get the particle member function which returns a vector field of a given name.

Parameters
namethe name of the field

References getForce(), getNormalForce(), and NULL.

Here is the call graph for this function:

◆ isPersistent()

bool CFrictionInteraction::isPersistent ( )
virtual

References CBasicParticle::getPos(), CBasicParticle::getRad(), APairInteraction::m_p1, and APairInteraction::m_p2.

Here is the call graph for this function:

◆ loadRestartData()

void CFrictionInteraction::loadRestartData ( std::istream &  iStream)
virtual

Load restart data from an open istream

Parameters
iStreamthe input stream

Reimplemented from APairInteraction.

References m_dt, m_Ffric, AInteraction::m_id, m_is_slipping, m_is_touching, m_k, m_ks, m_mu, m_r0, m_scaling, Vec3::X(), Vec3::Y(), and Vec3::Z().

Here is the call graph for this function:

◆ saveRestartData()

void CFrictionInteraction::saveRestartData ( std::ostream &  oStream)
virtual

Save restart data to an open ostream

Parameters
oStreamthe output stream

Reimplemented from APairInteraction.

References m_dt, m_Ffric, AInteraction::m_id, m_is_slipping, m_is_touching, m_k, m_ks, m_mu, m_r0, m_scaling, Vec3::X(), Vec3::Y(), and Vec3::Z().

Here is the call graph for this function:

◆ setTimeStepSize()

void CFrictionInteraction::setTimeStepSize ( double  dt)

References m_dt.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  ,
const CFrictionInteraction  
)
friend

◆ TML_PackedMessageInterface

friend class TML_PackedMessageInterface
friend

Member Data Documentation

◆ m_cpos

Vec3 CFrictionInteraction::m_cpos
protected

◆ m_dt

◆ m_E_diss

double CFrictionInteraction::m_E_diss
protected

dissipated energy

Referenced by calcForces(), CFrictionInteraction(), and getDissipatedEnergy().

◆ m_Ffric

◆ m_force_deficit

Vec3 CFrictionInteraction::m_force_deficit
protected

difference between fric. force & force necessary for slip

Referenced by calcForces(), CVWFriction::calcForces(), and getAbsForceDeficit().

◆ m_is_slipping

bool CFrictionInteraction::m_is_slipping
protected

◆ m_is_touching

bool CFrictionInteraction::m_is_touching
protected

◆ m_k

◆ m_ks

◆ m_mu

◆ m_normal_force

Vec3 CFrictionInteraction::m_normal_force
protected

◆ m_r0

◆ m_scaling

bool CFrictionInteraction::m_scaling
protected

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