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

Public Types

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

Public Member Functions

 ContContactCL (const TplDriveCaller< doublereal > *pTplDC, doublereal dSign, ContContactCL::Type type, doublereal dRest, doublereal dK, doublereal dExp, doublereal dInitialEpsPrimeTol)
 
virtual ~ContContactCL (void)
 
virtual ConstLawType::Type GetConstLawType (void) const
 
virtual ConstitutiveLaw
< doublereal, doublereal > * 
pCopy (void) const
 
virtual std::ostream & Restart (std::ostream &out) const
 
virtual void Update (const doublereal &Eps, const doublereal &EpsPrime)
 
virtual std::ostream & OutputAppend (std::ostream &out) const
 
virtual void AfterConvergence (const doublereal &Eps, const doublereal &EpsPrime=0.)
 
- Public Member Functions inherited from ElasticConstitutiveLaw< doublereal, doublereal >
 ElasticConstitutiveLaw (const TplDriveCaller< doublereal > *pDC, const doublereal &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< doublereal, doublereal >
 ConstitutiveLaw (void)
 
virtual ~ConstitutiveLaw (void)
 
virtual const doublerealGetEpsilon (void) const
 
virtual const doublerealGetEpsilonPrime (void) const
 
virtual const doublerealGetF (void) const
 
virtual const doublerealGetFDE (void) const
 
virtual const doublerealGetFDEPrime (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< doublereal >
 TplDriveOwner (const TplDriveCaller< doublereal > *pDC=0)
 
virtual ~TplDriveOwner (void)
 
void Set (const TplDriveCaller< doublereal > *pDC)
 
TplDriveCaller< doublereal > * pGetDriveCaller (void) const
 
doublereal Get (const doublereal &dVar) const
 
doublereal Get (void) const
 
virtual bool bIsDifferentiable (void) const
 
virtual doublereal GetP (void) const
 

Protected Attributes

const doublereal m_dSign
 
const doublereal m_dInitialEpsPrimeTol
 
const doublereal m_dRest
 
ContContactCL::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< doublereal, doublereal >
doublereal PreStress
 
- Protected Attributes inherited from ConstitutiveLaw< doublereal, doublereal >
doublereal Epsilon
 
doublereal EpsilonPrime
 
doublereal F
 
doublereal FDE
 
doublereal FDEPrime
 
- Protected Attributes inherited from WithLabel
unsigned int uLabel
 
std::string sName
 
- Protected Attributes inherited from TplDriveOwner< doublereal >
TplDriveCaller< doublereal > * pTplDriveCaller
 

Additional Inherited Members

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

Detailed Description

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

Member Enumeration Documentation

Enumerator
CC_FLORES_ET_AL 
CC_HUNT_CROSSLEY 
CC_LANKARANI_NIKRAVESH 

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

Constructor & Destructor Documentation

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

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

References NO_OP.

Referenced by pCopy().

82  m_dSign(dSign), m_dInitialEpsPrimeTol(dInitialEpsPrimeTol),
83  m_dRest(dRest), m_type(type), m_dK(dK), m_dExp(dExp),
84  m_bActive(false), m_bToggling(false),
86  {
87  NO_OP;
88  };
const doublereal m_dK
ContContactCL::Type m_type
const doublereal m_dInitialEpsPrimeTol
#define NO_OP
Definition: myassert.h:74
doublereal m_dInitialEpsPrime
const doublereal m_dRest
const doublereal m_dExp
const doublereal m_dSign
virtual ContContactCL::~ContContactCL ( void  )
inlinevirtual

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

References NO_OP.

90  {
91  NO_OP;
92  };
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

virtual void ContContactCL::AfterConvergence ( const doublereal Eps,
const doublereal EpsPrime = 0. 
)
inlinevirtual

Reimplemented from ConstitutiveLaw< doublereal, doublereal >.

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

References m_bActive, m_bToggling, m_dInitialEpsPrime, and m_dSign.

201  {
202 
203 #if 0
204  if (m_bActive) {
207  silent_cout( " " << eps2show << " " << F2show << std::endl);
208  }
209 #endif
210 
211  if (m_bToggling) {
212 
213 #if 0
214  silent_cout(">> ContContactCL::AfterConvergence() "
215  "m_bToggling=" << (m_bToggling ? "true" : "false") << " "
216  "m_bActive=" << (m_bActive ? "true" : "false") << " "
217  "m_dInitialEpsPrime=" << m_dInitialEpsPrime << std::endl);
218 #endif
219 
220  if (m_bActive) {
221  m_bActive = false;
222  m_dInitialEpsPrime = 0.;
223 
224  } else {
225  m_bActive = true;
226  }
227  m_bToggling = false;
228 #if 0
229  silent_cout("<< ContContactCL::AfterConvergence() "
230  "m_bToggling=" << (m_bToggling ? "true" : "false") << " "
231  "m_bActive=" << (m_bActive ? "true" : "false") << " "
232  "m_dInitialEpsPrime=" << m_dInitialEpsPrime << std::endl);
233 #endif
234  }
235  };
doublereal m_dInitialEpsPrime
double doublereal
Definition: colamd.c:52
const doublereal m_dSign
virtual ConstLawType::Type ContContactCL::GetConstLawType ( void  ) const
inlinevirtual
virtual std::ostream& ContContactCL::OutputAppend ( std::ostream &  out) const
inlinevirtual

Reimplemented from SimulationEntity.

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

References m_dDissCoef, and m_dInitialEpsPrime.

196  {
197  return out << " " << m_dInitialEpsPrime << " " << m_dDissCoef;
198  };
doublereal m_dInitialEpsPrime
doublereal m_dDissCoef
virtual ConstitutiveLaw<doublereal, doublereal>* ContContactCL::pCopy ( void  ) const
inlinevirtual

Implements ConstitutiveLaw< doublereal, doublereal >.

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

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

98  {
100 
101  // pass parameters to copy constructor
105 
106  return pCL;
107  };
const doublereal m_dK
ContContactCL::Type m_type
const doublereal m_dInitialEpsPrimeTol
ContContactCL(const TplDriveCaller< doublereal > *pTplDC, doublereal dSign, ContContactCL::Type type, doublereal dRest, doublereal dK, doublereal dExp, doublereal dInitialEpsPrimeTol)
TplDriveCaller< doublereal > * pGetDriveCaller(void) const
Definition: tpldrive.h:105
const doublereal m_dRest
const doublereal m_dExp
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
Definition: mynewmem.h:698
virtual ConstitutiveLaw< doublereal, doublereal > * pCopy(void) const
const doublereal m_dSign

Here is the call graph for this function:

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

Reimplemented from ConstitutiveLaw< doublereal, doublereal >.

Definition at line 109 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().

109  {
110  out << "continuous contact"
111  << ", sign, " << m_dSign
112  << ", formulation, ";
113 
114  switch (m_type) {
115  case CC_FLORES_ET_AL:
116  out << "flores";
117  break;
118 
119  case CC_HUNT_CROSSLEY:
120  out << "hunt crossley";
121  break;
122 
124  out << "lankarani nikravesh";
125  break;
126  }
127 
128  out
129  << ", restitution, " << m_dRest
130  << ", kappa, " << m_dK
131  << ", exp, " << m_dExp
132  << ", EpsPrimeTol, " << m_dInitialEpsPrimeTol
134  return out;
135  };
const doublereal m_dK
ContContactCL::Type m_type
const doublereal m_dInitialEpsPrimeTol
virtual std::ostream & Restart_int(std::ostream &out) const
const doublereal m_dRest
const doublereal m_dExp
const doublereal m_dSign

Here is the call graph for this function:

virtual void ContContactCL::Update ( const doublereal Eps,
const doublereal EpsPrime 
)
inlinevirtual

Implements ConstitutiveLaw< doublereal, doublereal >.

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

References CC_FLORES_ET_AL, CC_HUNT_CROSSLEY, CC_LANKARANI_NIKRAVESH, TplDriveOwner< T >::Get(), m_bActive, m_bToggling, m_dDissCoef, m_dExp, m_dInitialEpsPrime, m_dInitialEpsPrimeTol, m_dK, m_dRest, m_dSign, m_type, and grad::pow().

137  {
140 
142  if (x < 0.) {
143  if (m_bActive) {
144  if (!m_bToggling) {
145  m_bToggling = true;
146  }
147  }
148 
152 
153  } else {
155 
156  if (!m_bActive && !m_bToggling) {
157  m_bToggling = true;
159 
160  switch (m_type) {
161  case CC_FLORES_ET_AL:
162  m_dDissCoef = (std::abs(xp) > m_dInitialEpsPrimeTol) * 8./5. * m_dK * (1. - m_dRest) / m_dRest / m_dInitialEpsPrime;
163  break;
164 
165  case CC_HUNT_CROSSLEY:
166  m_dDissCoef = (std::abs(xp) > m_dInitialEpsPrimeTol) * 3./2. * m_dK * (1. - m_dRest) / m_dInitialEpsPrime;
167  break;
168 
170  m_dDissCoef = (std::abs(xp) > m_dInitialEpsPrimeTol) * 3./4. * m_dK * (1. - std::pow(m_dRest, 2)) / m_dInitialEpsPrime;
171  break;
172  }
173  }
174 
175 // doublereal xn = std::pow(x, m_dExp);
176 // doublereal xnm1 = std::pow(x, m_dExp - 1.);
177 
178 // doublereal xp_t = ( ( (m_dDissCoef*xp < 0.)&&(abs(m_dDissCoef*xp) > m_dK)) ? abs(m_dK/m_dDissCoef/xp) : 1. ); // Threshold
179 
180 // ConstitutiveLaw<doublereal, doublereal>::F = m_dSign*(m_dK*xn + m_dDissCoef *xn* xp * xp_t); // FIXME
181 // ConstitutiveLaw<doublereal, doublereal>::FDE = m_dSign*(m_dExp*m_dK*xnm1 + m_dDissCoef *m_dExp*xnm1* xp_t); //FIXME
182 // ConstitutiveLaw<doublereal, doublereal>::FDEPrime = m_dSign*(m_dDissCoef * xn) * xp_t ;
183 
184 
185  doublereal xn = std::pow(x, m_dExp);
186  doublereal xnm1 = std::pow(x, m_dExp - 1.);
187 
191 
192 // silent_cout("hello " << std::endl);
193  }
194  };
const doublereal m_dK
GradientExpression< BinaryExpr< FuncPow, LhsExpr, RhsExpr > > pow(const GradientExpression< LhsExpr > &u, const GradientExpression< RhsExpr > &v)
Definition: gradient.h:2961
ContContactCL::Type m_type
const doublereal m_dInitialEpsPrimeTol
doublereal m_dInitialEpsPrime
doublereal m_dDissCoef
const doublereal m_dRest
const doublereal m_dExp
double doublereal
Definition: colamd.c:52
T Get(void) const
Definition: tpldrive.h:113
const doublereal m_dSign

Here is the call graph for this function:

Member Data Documentation

bool ContContactCL::m_bActive
mutableprotected

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

Referenced by AfterConvergence(), and Update().

bool ContContactCL::m_bToggling
mutableprotected

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

Referenced by AfterConvergence(), and Update().

doublereal ContContactCL::m_dDissCoef
mutableprotected

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

Referenced by OutputAppend(), and Update().

const doublereal ContContactCL::m_dExp
protected

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

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

doublereal ContContactCL::m_dInitialEpsPrime
mutableprotected

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

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

const doublereal ContContactCL::m_dInitialEpsPrimeTol
protected

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

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

const doublereal ContContactCL::m_dK
protected

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

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

const doublereal ContContactCL::m_dRest
protected

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

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

const doublereal ContContactCL::m_dSign
protected

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

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

ContContactCL::Type ContContactCL::m_type
protected

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

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


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