MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
ContContact3DCL Class Reference
Inheritance diagram for ContContact3DCL:
Collaboration diagram for ContContact3DCL:

Public Types

enum  Type { CC_FLORES_ET_AL = ContContactCL::CC_FLORES_ET_AL, CC_HUNT_CROSSLEY = ContContactCL::CC_HUNT_CROSSLEY, CC_LANKARANI_NIKRAVESH = ContContactCL::CC_LANKARANI_NIKRAVESH }
 
- Public Types inherited from ConstitutiveLaw< Vec3, Mat3x3 >
typedef ConstitutiveLaw< Vec3,
Mat3x3 >::ErrNotAvailable 
Err
 
- Public Types inherited from SimulationEntity
typedef std::vector< Hint * > Hints
 

Public Member Functions

 ContContact3DCL (const TplDriveCaller< Vec3 > *pTplDC, doublereal dSign, ContContact3DCL::Type type, doublereal dRest, doublereal dK, doublereal dExp, doublereal dInitialEpsPrimeTol)
 
virtual ~ContContact3DCL (void)
 
virtual ConstLawType::Type GetConstLawType (void) const
 
virtual ConstitutiveLaw< Vec3,
Mat3x3 > * 
pCopy (void) const
 
virtual std::ostream & Restart (std::ostream &out) const
 
virtual void Update (const Vec3 &Eps, const Vec3 &EpsPrime)
 
virtual std::ostream & OutputAppend (std::ostream &out) const
 
virtual void AfterConvergence (const Vec3 &Eps, const Vec3 &EpsPrime=Zero3)
 
- Public Member Functions inherited from ElasticConstitutiveLaw< Vec3, Mat3x3 >
 ElasticConstitutiveLaw (const TplDriveCaller< Vec3 > *pDC, const Vec3 &PStress)
 
virtual ~ElasticConstitutiveLaw (void)
 
ConstLawType::Type GetConstLawType (void) const
 
void SetValue (DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *ph=0)
 
virtual HintParseHint (DataManager *pDM, const char *s) const
 
- Public Member Functions inherited from ConstitutiveLaw< Vec3, Mat3x3 >
 ConstitutiveLaw (void)
 
virtual ~ConstitutiveLaw (void)
 
virtual const Vec3GetEpsilon (void) const
 
virtual const Vec3GetEpsilonPrime (void) const
 
virtual const Vec3GetF (void) const
 
virtual const Mat3x3GetFDE (void) const
 
virtual const Mat3x3GetFDEPrime (void) const
 
virtual unsigned int iGetNumDof (void) const
 
virtual std::ostream & DescribeDof (std::ostream &out, const char *prefix="", bool bInitial=false) const
 
virtual void DescribeDof (std::vector< std::string > &desc, bool bInitial=false, int i=-1) const
 
virtual std::ostream & DescribeEq (std::ostream &out, const char *prefix="", bool bInitial=false) const
 
virtual void DescribeEq (std::vector< std::string > &desc, bool bInitial=false, int i=-1) const
 
virtual DofOrder::Order GetDofType (unsigned int i) const
 
- Public Member Functions inherited from WithLabel
 WithLabel (unsigned int uL=0, const std::string &sN="")
 
virtual ~WithLabel (void)
 
void PutLabel (unsigned int uL)
 
void PutName (const std::string &sN)
 
unsigned int GetLabel (void) const
 
const std::string & GetName (void) const
 
- Public Member Functions inherited from SimulationEntity
 SimulationEntity (void)
 
virtual ~SimulationEntity (void)
 
virtual bool bIsValidIndex (unsigned int i) const
 
virtual DofOrder::Order GetEqType (unsigned int i) const
 
virtual void BeforePredict (VectorHandler &, VectorHandler &, VectorHandler &, VectorHandler &) const
 
virtual void AfterPredict (VectorHandler &X, VectorHandler &XP)
 
virtual void Update (const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual void DerivativesUpdate (const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual void Update (const VectorHandler &XCurr, InverseDynamics::Order iOrder)
 
virtual void AfterConvergence (const VectorHandler &X, const VectorHandler &XP)
 
virtual void AfterConvergence (const VectorHandler &X, const VectorHandler &XP, const VectorHandler &XPP)
 
virtual unsigned int iGetNumPrivData (void) const
 
virtual unsigned int iGetPrivDataIdx (const char *s) const
 
virtual doublereal dGetPrivData (unsigned int i) const
 
virtual void ReadInitialState (MBDynParser &HP)
 
- Public Member Functions inherited from TplDriveOwner< Vec3 >
 TplDriveOwner (const TplDriveCaller< Vec3 > *pDC=0)
 
virtual ~TplDriveOwner (void)
 
void Set (const TplDriveCaller< Vec3 > *pDC)
 
TplDriveCaller< Vec3 > * pGetDriveCaller (void) const
 
Vec3 Get (const doublereal &dVar) const
 
Vec3 Get (void) const
 
virtual bool bIsDifferentiable (void) const
 
virtual Vec3 GetP (void) const
 

Protected Attributes

const doublereal m_dSign
 
const doublereal m_dInitialEpsPrimeTol
 
const doublereal m_dRest
 
ContContact3DCL::Type m_type
 
const doublereal m_dK
 
const doublereal m_dExp
 
bool m_bActive
 
bool m_bToggling
 
doublereal m_dInitialEpsPrime
 
doublereal m_dDissCoef
 
- Protected Attributes inherited from ElasticConstitutiveLaw< Vec3, Mat3x3 >
Vec3 PreStress
 
- Protected Attributes inherited from ConstitutiveLaw< Vec3, Mat3x3 >
Vec3 Epsilon
 
Vec3 EpsilonPrime
 
Vec3 F
 
Mat3x3 FDE
 
Mat3x3 FDEPrime
 
- Protected Attributes inherited from WithLabel
unsigned int uLabel
 
std::string sName
 
- Protected Attributes inherited from TplDriveOwner< Vec3 >
TplDriveCaller< Vec3 > * pTplDriveCaller
 

Additional Inherited Members

- Protected Member Functions inherited from ElasticConstitutiveLaw< Vec3, Mat3x3 >
virtual std::ostream & Restart_int (std::ostream &out) const
 

Detailed Description

Definition at line 359 of file module-cont-contact.cc.

Member Enumeration Documentation

Constructor & Destructor Documentation

ContContact3DCL::ContContact3DCL ( const TplDriveCaller< Vec3 > *  pTplDC,
doublereal  dSign,
ContContact3DCL::Type  type,
doublereal  dRest,
doublereal  dK,
doublereal  dExp,
doublereal  dInitialEpsPrimeTol 
)
inline

Definition at line 388 of file module-cont-contact.cc.

References NO_OP.

Referenced by pCopy().

392  m_dSign(dSign), m_dInitialEpsPrimeTol(dInitialEpsPrimeTol),
393  m_dRest(dRest), m_type(type), m_dK(dK), m_dExp(dExp),
394  m_bActive(false), m_bToggling(false), m_dInitialEpsPrime(0.)
395  {
396  NO_OP;
397  };
const doublereal m_dInitialEpsPrimeTol
const doublereal m_dK
const Vec3 Zero3(0., 0., 0.)
const doublereal m_dSign
#define NO_OP
Definition: myassert.h:74
doublereal m_dInitialEpsPrime
ContContact3DCL::Type m_type
const doublereal m_dRest
const doublereal m_dExp
virtual ContContact3DCL::~ContContact3DCL ( void  )
inlinevirtual

Definition at line 399 of file module-cont-contact.cc.

References NO_OP.

399  {
400  NO_OP;
401  };
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

virtual void ContContact3DCL::AfterConvergence ( const Vec3 Eps,
const Vec3 EpsPrime = Zero3 
)
inlinevirtual

Reimplemented from ConstitutiveLaw< Vec3, Mat3x3 >.

Definition at line 509 of file module-cont-contact.cc.

References ConstitutiveLaw< T, Tder >::Epsilon, ConstitutiveLaw< T, Tder >::F, m_bActive, m_bToggling, m_dInitialEpsPrime, and m_dSign.

509  {
510 
511 #if 0
512  if (m_bActive) {
515  silent_cout( " " << eps2show << " " << F2show << std::endl);
516  }
517 #endif
518 
519  if (m_bToggling) {
520 
521 #if 0
522  silent_cout(">> ContContact3DCL::AfterConvergence() "
523  "m_bToggling=" << (m_bToggling ? "true" : "false") << " "
524  "m_bActive=" << (m_bActive ? "true" : "false") << " "
525  "m_dInitialEpsPrime=" << m_dInitialEpsPrime << std::endl);
526 #endif
527 
528  if (m_bActive) {
529  m_bActive = false;
530  m_dInitialEpsPrime = 0.;
531 
532  } else {
533  m_bActive = true;
534  }
535  m_bToggling = false;
536 
537 #if 0
538  silent_cout("<< ContContact3DCL::AfterConvergence() "
539  "m_bToggling=" << (m_bToggling ? "true" : "false") << " "
540  "m_bActive=" << (m_bActive ? "true" : "false") << " "
541  "m_dInitialEpsPrime=" << m_dInitialEpsPrime << std::endl);
542 #endif
543  }
544  };
const doublereal m_dSign
doublereal m_dInitialEpsPrime
double doublereal
Definition: colamd.c:52
virtual ConstLawType::Type ContContact3DCL::GetConstLawType ( void  ) const
inlinevirtual

Implements ConstitutiveLaw< Vec3, Mat3x3 >.

Definition at line 403 of file module-cont-contact.cc.

References ConstLawType::VISCOELASTIC.

403  {
405  };
virtual std::ostream& ContContact3DCL::OutputAppend ( std::ostream &  out) const
inlinevirtual

Reimplemented from SimulationEntity.

Definition at line 505 of file module-cont-contact.cc.

References m_dDissCoef, and m_dInitialEpsPrime.

505  {
506  return out << " " << m_dInitialEpsPrime << " " << m_dDissCoef;
507  };
doublereal m_dInitialEpsPrime
virtual ConstitutiveLaw<Vec3, Mat3x3>* ContContact3DCL::pCopy ( void  ) const
inlinevirtual

Implements ConstitutiveLaw< Vec3, Mat3x3 >.

Definition at line 407 of file module-cont-contact.cc.

References ContContact3DCL(), m_dExp, m_dInitialEpsPrimeTol, m_dK, m_dRest, m_dSign, m_type, TplDriveOwner< Vec3 >::pGetDriveCaller(), and SAFENEWWITHCONSTRUCTOR.

407  {
409 
410  // pass parameters to copy constructor
414 
415  return pCL;
416  };
const doublereal m_dInitialEpsPrimeTol
const doublereal m_dK
virtual ConstitutiveLaw< Vec3, Mat3x3 > * pCopy(void) const
const doublereal m_dSign
TplDriveCaller< Vec3 > * pGetDriveCaller(void) const
Definition: tpldrive.h:105
ContContact3DCL::Type m_type
const doublereal m_dRest
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
Definition: mynewmem.h:698
ContContact3DCL(const TplDriveCaller< Vec3 > *pTplDC, doublereal dSign, ContContact3DCL::Type type, doublereal dRest, doublereal dK, doublereal dExp, doublereal dInitialEpsPrimeTol)
const doublereal m_dExp

Here is the call graph for this function:

virtual std::ostream& ContContact3DCL::Restart ( std::ostream &  out) const
inlinevirtual

Reimplemented from ConstitutiveLaw< Vec3, Mat3x3 >.

Definition at line 418 of file module-cont-contact.cc.

References CC_FLORES_ET_AL, CC_HUNT_CROSSLEY, CC_LANKARANI_NIKRAVESH, m_dExp, m_dInitialEpsPrimeTol, m_dK, m_dRest, m_dSign, m_type, and ElasticConstitutiveLaw< T, Tder >::Restart_int().

418  {
419  out << "continuous contact"
420  << ", sign, " << m_dSign
421  << ", formulation, ";
422 
423  switch (m_type) {
424  case CC_FLORES_ET_AL:
425  out << "flores";
426  break;
427 
428  case CC_HUNT_CROSSLEY:
429  out << "hunt crossley";
430  break;
431 
433  out << "lankarani nikravesh";
434  break;
435  }
436 
437  out
438  << ", restitution, " << m_dRest
439  << ", kappa, " << m_dK
440  << ", exp, " << m_dExp
441  << ", EpsPrimeTol, " << m_dInitialEpsPrimeTol
443  return out;
444  };
const doublereal m_dInitialEpsPrimeTol
const doublereal m_dK
const doublereal m_dSign
virtual std::ostream & Restart_int(std::ostream &out) const
ContContact3DCL::Type m_type
const doublereal m_dRest
const doublereal m_dExp

Here is the call graph for this function:

virtual void ContContact3DCL::Update ( const Vec3 Eps,
const Vec3 EpsPrime 
)
inlinevirtual

Implements ConstitutiveLaw< Vec3, Mat3x3 >.

Definition at line 446 of file module-cont-contact.cc.

References CC_FLORES_ET_AL, CC_HUNT_CROSSLEY, CC_LANKARANI_NIKRAVESH, ConstitutiveLaw< T, Tder >::Epsilon, ConstitutiveLaw< T, Tder >::EpsilonPrime, ConstitutiveLaw< T, Tder >::F, ConstitutiveLaw< T, Tder >::FDE, ConstitutiveLaw< T, Tder >::FDEPrime, TplDriveOwner< T >::Get(), m_bActive, m_bToggling, m_dDissCoef, m_dExp, m_dInitialEpsPrime, m_dInitialEpsPrimeTol, m_dK, m_dRest, m_dSign, m_type, grad::pow(), Zero3, and Zero3x3.

446  {
449 
451  if (x < 0.) {
452  if (m_bActive) {
453  if (!m_bToggling) {
454  m_bToggling = true;
455  }
456  }
457 
461 
462  } else {
464 
465  if (!m_bActive && !m_bToggling) {
466  m_bToggling = true;
468 
469  switch (m_type) {
470  case CC_FLORES_ET_AL:
471  m_dDissCoef = (std::abs(xp) > m_dInitialEpsPrimeTol) * 8./5. * m_dK * (1. - m_dRest) / m_dRest / m_dInitialEpsPrime;
472  break;
473 
474  case CC_HUNT_CROSSLEY:
475  m_dDissCoef = (std::abs(xp) > m_dInitialEpsPrimeTol) * 3./2. * m_dK * (1. - m_dRest) / m_dInitialEpsPrime;
476  break;
477 
479  m_dDissCoef = (std::abs(xp) > m_dInitialEpsPrimeTol) * 3./4. * m_dK * (1. - std::pow(m_dRest, 2)) / m_dInitialEpsPrime;
480  break;
481  }
482  }
483 
484 // doublereal xn = std::pow(x, m_dExp);
485 // doublereal xnm1 = std::pow(x, m_dExp - 1.);
486 
487 // doublereal xp_t = ( ( (m_dDissCoef*xp < 0.)&&(abs(m_dDissCoef*xp) > m_dK)) ? abs(m_dK/m_dDissCoef/xp) : 1. ); // Threshold
488 
489 // ConstitutiveLaw<doublereal, doublereal>::F = m_dSign*(m_dK*xn + m_dDissCoef *xn* xp * xp_t); // FIXME
490 // ConstitutiveLaw<doublereal, doublereal>::FDE = m_dSign*(m_dExp*m_dK*xnm1 + m_dDissCoef *m_dExp*xnm1* xp_t); //FIXME
491 // ConstitutiveLaw<doublereal, doublereal>::FDEPrime = m_dSign*(m_dDissCoef * xn) * xp_t ;
492 
493  doublereal xn = std::pow(x, m_dExp);
494  doublereal xnm1 = std::pow(x, m_dExp - 1.);
495 
496 //----------------------FIXME CHECK CORRECTNESS
500 
501 
502  }
503  };
const doublereal m_dInitialEpsPrimeTol
const doublereal m_dK
const Vec3 Zero3(0., 0., 0.)
GradientExpression< BinaryExpr< FuncPow, LhsExpr, RhsExpr > > pow(const GradientExpression< LhsExpr > &u, const GradientExpression< RhsExpr > &v)
Definition: gradient.h:2961
const doublereal m_dSign
const Mat3x3 Zero3x3(0., 0., 0., 0., 0., 0., 0., 0., 0.)
doublereal m_dInitialEpsPrime
ContContact3DCL::Type m_type
const doublereal m_dRest
const doublereal m_dExp
double doublereal
Definition: colamd.c:52
T Get(void) const
Definition: tpldrive.h:113

Here is the call graph for this function:

Member Data Documentation

bool ContContact3DCL::m_bActive
mutableprotected

Definition at line 382 of file module-cont-contact.cc.

Referenced by AfterConvergence(), and Update().

bool ContContact3DCL::m_bToggling
mutableprotected

Definition at line 383 of file module-cont-contact.cc.

Referenced by AfterConvergence(), and Update().

doublereal ContContact3DCL::m_dDissCoef
mutableprotected

Definition at line 385 of file module-cont-contact.cc.

Referenced by OutputAppend(), and Update().

const doublereal ContContact3DCL::m_dExp
protected

Definition at line 380 of file module-cont-contact.cc.

Referenced by pCopy(), Restart(), and Update().

doublereal ContContact3DCL::m_dInitialEpsPrime
mutableprotected

Definition at line 384 of file module-cont-contact.cc.

Referenced by AfterConvergence(), OutputAppend(), and Update().

const doublereal ContContact3DCL::m_dInitialEpsPrimeTol
protected

Definition at line 370 of file module-cont-contact.cc.

Referenced by pCopy(), Restart(), and Update().

const doublereal ContContact3DCL::m_dK
protected

Definition at line 379 of file module-cont-contact.cc.

Referenced by pCopy(), Restart(), and Update().

const doublereal ContContact3DCL::m_dRest
protected

Definition at line 372 of file module-cont-contact.cc.

Referenced by pCopy(), Restart(), and Update().

const doublereal ContContact3DCL::m_dSign
protected

Definition at line 369 of file module-cont-contact.cc.

Referenced by AfterConvergence(), pCopy(), Restart(), and Update().

ContContact3DCL::Type ContContact3DCL::m_type
protected

Definition at line 374 of file module-cont-contact.cc.

Referenced by pCopy(), Restart(), and Update().


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