MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
ScrewJointSh_c Class Reference

#include <friction.h>

Inheritance diagram for ScrewJointSh_c:
Collaboration diagram for ScrewJointSh_c:

Public Member Functions

 ScrewJointSh_c (const doublereal r, const doublereal hta)
 
doublereal ComputePitchAngle (const doublereal pitch)
 
virtual doublereal Sh_c (void) const
 
doublereal Sh_c (const doublereal f, const doublereal F, const doublereal v)
 
void dSh_c (ExpandableRowVector &dShc, const doublereal f, const doublereal F, const doublereal v, const ExpandableRowVector &dfc, const ExpandableRowVector &dF, const ExpandableRowVector &dv) const
 
- Public Member Functions inherited from BasicShapeCoefficient
virtual ~BasicShapeCoefficient (void)
 

Private Attributes

doublereal shc
 
const doublereal radius
 
const doublereal half_thread_angle
 
const doublereal pitch_angle
 
const doublereal sec_half_thread_angle
 
const doublereal tg_pitch
 
const doublereal tg_pitch2
 

Detailed Description

Simple, low load shape coefficient for revolute hinge (PlaneHingeJoint)

Definition at line 338 of file friction.h.

Constructor & Destructor Documentation

ScrewJointSh_c::ScrewJointSh_c ( const doublereal  r,
const doublereal  hta 
)
inline

Definition at line 349 of file friction.h.

352  :
353  radius(r),
354  half_thread_angle(hta),
355  pitch_angle(0.),
357  tg_pitch(0.),
358  tg_pitch2(0.) {
359  };
const doublereal tg_pitch2
Definition: friction.h:347
const doublereal radius
Definition: friction.h:342
const doublereal half_thread_angle
Definition: friction.h:343
const doublereal tg_pitch
Definition: friction.h:346
const doublereal pitch_angle
Definition: friction.h:344
const doublereal sec_half_thread_angle
Definition: friction.h:345
GradientExpression< UnaryExpr< FuncCos, Expr > > cos(const GradientExpression< Expr > &u)
Definition: gradient.h:2978

Member Function Documentation

doublereal ScrewJointSh_c::ComputePitchAngle ( const doublereal  pitch)
inline

Definition at line 360 of file friction.h.

References grad::atan(), grad::cos(), half_thread_angle, M_PI, pitch_angle, radius, grad::tan(), tg_pitch, and tg_pitch2.

360  {
361  const_cast<doublereal&>(tg_pitch) = pitch / (2. * M_PI * radius);
362  const_cast<doublereal&>(tg_pitch2) = tg_pitch * tg_pitch;
363  const_cast<doublereal&>(pitch_angle) = std::atan(tg_pitch);
364  const_cast<doublereal&>(half_thread_angle) = std::atan(
366  );
367  return radius / std::cos(pitch_angle);
368  };
const doublereal tg_pitch2
Definition: friction.h:347
#define M_PI
Definition: gradienttest.cc:67
const doublereal radius
Definition: friction.h:342
const doublereal half_thread_angle
Definition: friction.h:343
const doublereal tg_pitch
Definition: friction.h:346
const doublereal pitch_angle
Definition: friction.h:344
GradientExpression< UnaryExpr< FuncCos, Expr > > cos(const GradientExpression< Expr > &u)
Definition: gradient.h:2978
GradientExpression< UnaryExpr< FuncAtan, Expr > > atan(const GradientExpression< Expr > &u)
Definition: gradient.h:2985
double doublereal
Definition: colamd.c:52
GradientExpression< UnaryExpr< FuncTan, Expr > > tan(const GradientExpression< Expr > &u)
Definition: gradient.h:2979

Here is the call graph for this function:

void ScrewJointSh_c::dSh_c ( ExpandableRowVector dShc,
const doublereal  f,
const doublereal  F,
const doublereal  v,
const ExpandableRowVector dfc,
const ExpandableRowVector dF,
const ExpandableRowVector dv 
) const
inlinevirtual

Compute derivatives of the shape coefficient

Implements BasicShapeCoefficient.

Definition at line 379 of file friction.h.

References ExpandableRowVector::Link(), grad::pow(), radius, ExpandableRowVector::ReDim(), sec_half_thread_angle, ExpandableRowVector::Set(), tg_pitch, and tg_pitch2.

386  {
387  doublereal dsh_fc = radius * (-sec_half_thread_angle * (1 + tg_pitch2) ) /
388  std::pow(f * sec_half_thread_angle * tg_pitch - 1., 2.);
389  dShc.ReDim(1);
390  dShc.Set(dsh_fc, 1);
391  dShc.Link(1, &dfc);
392  };
const doublereal tg_pitch2
Definition: friction.h:347
void Set(doublereal xx, integer i, integer iidx)
Definition: JacSubMatrix.cc:95
GradientExpression< BinaryExpr< FuncPow, LhsExpr, RhsExpr > > pow(const GradientExpression< LhsExpr > &u, const GradientExpression< RhsExpr > &v)
Definition: gradient.h:2961
const doublereal radius
Definition: friction.h:342
const doublereal tg_pitch
Definition: friction.h:346
void ReDim(const integer n)
Definition: JacSubMatrix.cc:50
const doublereal sec_half_thread_angle
Definition: friction.h:345
void Link(const integer i, const ExpandableRowVector *const xp, const integer rhs_block=1)
Definition: JacSubMatrix.cc:68
double doublereal
Definition: colamd.c:52

Here is the call graph for this function:

virtual doublereal ScrewJointSh_c::Sh_c ( void  ) const
inlinevirtual

Return last computed shape coefficient

Implements BasicShapeCoefficient.

Definition at line 369 of file friction.h.

References shc.

369 {return shc;};
doublereal shc
Definition: friction.h:340
doublereal ScrewJointSh_c::Sh_c ( const doublereal  f,
const doublereal  F,
const doublereal  v 
)
inlinevirtual

Compute the shape coefficient

Implements BasicShapeCoefficient.

Definition at line 370 of file friction.h.

References radius, sec_half_thread_angle, shc, tg_pitch, and tg_pitch2.

373  {
374 
375  shc = radius * (f * sec_half_thread_angle * (1 + tg_pitch2)) /
376  (f * sec_half_thread_angle * tg_pitch - 1.);
377  return shc;
378  };
const doublereal tg_pitch2
Definition: friction.h:347
doublereal shc
Definition: friction.h:340
const doublereal radius
Definition: friction.h:342
const doublereal tg_pitch
Definition: friction.h:346
const doublereal sec_half_thread_angle
Definition: friction.h:345

Member Data Documentation

const doublereal ScrewJointSh_c::half_thread_angle
private

Definition at line 343 of file friction.h.

Referenced by ComputePitchAngle().

const doublereal ScrewJointSh_c::pitch_angle
private

Definition at line 344 of file friction.h.

Referenced by ComputePitchAngle().

const doublereal ScrewJointSh_c::radius
private

Definition at line 342 of file friction.h.

Referenced by ComputePitchAngle(), dSh_c(), and Sh_c().

const doublereal ScrewJointSh_c::sec_half_thread_angle
private

Definition at line 345 of file friction.h.

Referenced by dSh_c(), and Sh_c().

doublereal ScrewJointSh_c::shc
private

Definition at line 340 of file friction.h.

Referenced by Sh_c().

const doublereal ScrewJointSh_c::tg_pitch
private

Definition at line 346 of file friction.h.

Referenced by ComputePitchAngle(), dSh_c(), and Sh_c().

const doublereal ScrewJointSh_c::tg_pitch2
private

Definition at line 347 of file friction.h.

Referenced by ComputePitchAngle(), dSh_c(), and Sh_c().


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