|
FEBio
1.5.0
|
00001 // FESlidingInterface.h: interface for the FESlidingInterface class. 00002 // 00004 00005 #if !defined(AFX_FESLIDINGINTERFACE_H__742CFDED_B4BF_47AF_B673_1D26FE03F934__INCLUDED_) 00006 #define AFX_FESLIDINGINTERFACE_H__742CFDED_B4BF_47AF_B673_1D26FE03F934__INCLUDED_ 00007 00008 #if _MSC_VER > 1000 00009 #pragma once 00010 #endif // _MSC_VER > 1000 00011 00012 #include "FEContactInterface.h" 00013 #include "FEContactSurface.h" 00014 00015 //----------------------------------------------------------------------------- 00016 class FESlidingSurface : public FEContactSurface 00017 { 00018 public: 00020 FESlidingSurface(FEMesh* pm=0) : FEContactSurface(pm) { m_NQ.Attach(this); } 00021 00023 bool Init(); 00024 00026 void ShallowCopy(FESlidingSurface& s) 00027 { 00028 Lm = s.Lm; 00029 gap = s.gap; 00030 zero(m_pme); 00031 Lt = s.Lt; 00032 m_Ln = s.m_Ln; 00033 } 00034 00036 void Update() {} 00037 00039 FEElement* FindMasterSegment(vec3d& x, vec3d& q, vec2d& r, bool& binit_nq, double tol); 00040 00042 vec3d traction(int inode); 00043 00044 void UpdateNormals(); 00045 00046 void Serialize(DumpFile& ar); 00047 00048 public: 00049 vector<double> gap; 00050 vector<vec3d> nu; 00051 vector<FESurfaceElement*> m_pme; 00052 vector<vec2d> rs; 00053 vector<vec2d> rsp; 00054 vector<double> Lm; 00055 vector<mat2d> M; 00056 vector<vec2d> Lt; 00057 vector<double> off; 00058 vector<double> eps; 00059 vector<double> m_Ln; 00060 00061 FENNQuery m_NQ; 00062 }; 00063 00064 //----------------------------------------------------------------------------- 00066 00070 00071 class FESlidingInterface : public FEContactInterface 00072 { 00073 public: 00075 FESlidingInterface(FEModel* pfem); 00076 00078 virtual ~FESlidingInterface(){} 00079 00081 bool Init(); 00082 00084 void Update(); 00085 00087 void ProjectSurface(FESlidingSurface& ss, FESlidingSurface& ms, bool bupseg, bool bmove = false); 00088 00090 void ShallowCopy(FEContactInterface& ci) 00091 { 00092 FESlidingInterface& si = dynamic_cast<FESlidingInterface&>(ci); 00093 m_ss.ShallowCopy(si.m_ss); 00094 m_ms.ShallowCopy(si.m_ms); 00095 } 00096 00098 double Penalty() { return (m_pplc?m_eps*m_pplc->Value():m_eps);} 00099 00101 virtual void ContactForces(vector<double>& F); 00102 00104 virtual void ContactStiffness(); 00105 00107 virtual bool Augment(int naug); 00108 00110 void Serialize(DumpFile& ar); 00111 00113 void UpdateContactPressures(); 00114 00115 protected: 00117 void CalcAutoPenalty(FESlidingSurface& s); 00118 00120 void ContactNodalForce(int m, FESlidingSurface& ss, FESurfaceElement& mel, vector<double>& fe); 00121 00123 void ContactNodalStiffness(int m, FESlidingSurface& ss, FESurfaceElement& mel, matrix& ke); 00124 00126 void MapFrictionData(int inode, FESlidingSurface& ss, FESlidingSurface& ms, FESurfaceElement& sn, FESurfaceElement& so, vec3d& q); 00127 00128 private: 00130 FESlidingInterface(FESlidingInterface& si){} 00131 00132 public: 00133 FESlidingSurface m_ss; 00134 FESlidingSurface m_ms; 00135 00136 bool m_btwo_pass; 00137 00138 int m_naugmax; 00139 int m_naugmin; 00140 double m_gtol; 00141 double m_atol; 00142 double m_ktmult; 00143 double m_knmult; 00144 00145 double m_stol; 00146 00147 int m_nautopen; 00148 double m_eps; 00149 00150 bool m_breloc; 00151 00152 double m_mu; 00153 double m_epsf; 00154 00155 int m_nsegup; 00156 int m_nplc; 00157 FELoadCurve* m_pplc; 00158 00159 DECLARE_PARAMETER_LIST(); 00160 }; 00161 00162 #endif // !defined(AFX_FESLIDINGINTERFACE_H__742CFDED_B4BF_47AF_B673_1D26FE03F934__INCLUDED_)
1.7.5.1