Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

rdContactForce.h

00001 // rdContactForce.h
00002 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00003 // Copyright 2002, 2003 Realistic Dynamics, Inc.
00004 // All rights reserved.
00005 //
00006 // Please do not read, copy, distribute, or use without permission.
00007 // Contact: Frank C. Anderson, fca@RealisticDynamics.com
00008 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00009 #include "rdModel.h"
00010 #include "rdForce.h"
00011 //============================================================================
00012 #ifndef __rdContactForce_h__
00013 #define __rdContactForce_h__
00014 
00015 
00016 
00017 
00018 //=============================================================================
00019 //=============================================================================
00029 class RDSIMULATION_API rdContactForce : public rdForce
00030 {
00031 
00032 //=============================================================================
00033 // DATA
00034 //=============================================================================
00035 public:
00036    static const char PROP_NORMAL_A[];
00037    static const char PROP_NORMAL_B[];
00038 
00039 protected:
00041    double _nB[3];
00043    double _nA[3];
00045    double _rnA[3];
00047    double _rn;
00050    double _vnA[3];
00052    double _vn;
00054    double _tA[3];
00056    double _rtA[3];
00058    double _rt;
00061    double _vtA[3];
00063    double _ktp;
00065    double _ktv;
00067    double _knp;
00069    double _knv;
00070    // FORCE GEOMETRY
00072    double _fnMag;
00075    double _fnp[3];
00078    double _fnv[3];
00080    double _fn[3];
00083    double _ftMag;
00086    double _ftp[3];
00089    double _ftv[3];
00093    double _ft[3];
00097    double _dfFric[3];
00098 
00099 
00100 //=============================================================================
00101 // METHODS
00102 //=============================================================================
00103    //--------------------------------------------------------------------------
00104    // CONSTRUCTION
00105    //--------------------------------------------------------------------------
00106 public:
00107    rdContactForce(int aBodyA=0,int aBodyB=0,int aNYP=0);
00108    rdContactForce(IDOM_Element *aElement,int aNYP=0);
00109    rdContactForce(const rdContactForce &aForce);
00110    virtual ~rdContactForce();
00111 private:
00112    void setNull();
00113 
00114    //--------------------------------------------------------------------------
00115    // OPERATORS
00116    //--------------------------------------------------------------------------
00117 public:
00118    rdContactForce& operator=(const rdContactForce &aContact);
00119 
00120    //--------------------------------------------------------------------------
00121    // GET AND SET
00122    //--------------------------------------------------------------------------
00123 public:
00124    // NORMAL ON BODY A
00125    void setNormalA(const double aNormal[3]);
00126    void getNormalA(double rNormal[3]) const;
00127    // NORMAL ON BODY B
00128    void setNormalB(const double aNormal[3]);
00129    void getNormalB(double rNormal[3]) const;
00130    // NORMAL DISPLACEMENT VECTOR
00131    void getNormalDisplacement(double rDisplacement[3]) const;
00132    // NORMAL DISTANCE
00133    double getNormalDistance() const;
00134    // NORMAL VELOCITY
00135    void getNormalVelocity(double rVelocity[3]) const;
00136    // NORMAL SPEED
00137    double getNormalSpeed() const;
00138    // TANGENT ON BODY A
00139    void getTangent(double rTangent[3]) const;
00140    // TANGENTIAL DISPLACEMENT VECTOR
00141    void getTangentialDisplacement(double rDisplacement[3]) const;
00142    // TANGENTIAL DISTANCE
00143    double getTangentialDistance() const;
00144    // TANGENTIAL VELOCITY
00145    void getTangentialVelocity(double rVelocity[3]) const;
00146    // FORCE
00147    void getNormalForce(double rFP[3],double rFV[3],double rF[3]) const;
00148    void getTangentialForce(double rFP[3],double rFV[3],double rF[3]) const;
00149    // STIFFNESS
00150    double getInstantaneousTangentialStiffness() const;
00151    double getInstantaneousNormalStiffness() const;
00152    // VISCOSITY
00153    double getInstantaneousTangentialViscosity() const;
00154    double getInstantaneousNormalViscosity() const;
00155    // FRICTION CORRECTION
00156    void getFrictionCorrection(double rDF[3]) const;
00157 
00158 
00159    //--------------------------------------------------------------------------
00160    // COMPUTATIONS
00161    //--------------------------------------------------------------------------
00162    virtual void updatePseudoStates() = 0;
00163    virtual void computeDisplacements();
00164    virtual void computeVelocities();
00165 
00166    //--------------------------------------------------------------------------
00167    // APPLICATION
00168    //--------------------------------------------------------------------------
00169 
00170    //--------------------------------------------------------------------------
00171    // CHECK
00172    //--------------------------------------------------------------------------
00173    virtual bool check() const;
00174 
00175    //--------------------------------------------------------------------------
00176    // UTILITY
00177    //--------------------------------------------------------------------------
00178    virtual void
00179       computeLineOfActionComponents(double rNormal[3],
00180       double rTangential[3]) const;
00181 
00182    //--------------------------------------------------------------------------
00183    // XML
00184    //--------------------------------------------------------------------------
00185    virtual void updateObject(bool aDeep=true);
00186    virtual void updateNode(bool aDeep=true);
00187    virtual void generateNode(IDOM_Element *aParent);
00188    void updateData();   
00189 
00190 //=============================================================================
00191 }; // END of class rdContactForce
00192 //=============================================================================
00193 //=============================================================================
00194 
00195 #endif // __rdContactForce_h__
00196 
00197 

Generated on Wed Aug 20 02:17:05 2003 for Simulation Software by doxygen1.3