|
FEBio
1.5.0
|
00001 #pragma once 00002 #include "FEElasticMaterial.h" 00003 00004 //----------------------------------------------------------------------------- 00005 // This material is a first attempt to include damage in hyper-elastic materials. 00006 // It assumes the simple damage model as defined in Simo, CMAME 60 (1987), 153-173 00007 00008 //----------------------------------------------------------------------------- 00009 // We first define a material point that stores the damage variable. 00010 class FEDamageMaterialPoint : public FEMaterialPoint 00011 { 00012 public: 00013 FEDamageMaterialPoint(FEMaterialPoint *pt) : FEMaterialPoint(pt) {} 00014 00015 FEMaterialPoint* Copy() 00016 { 00017 FEDamageMaterialPoint* pt = new FEDamageMaterialPoint(*this); 00018 if (m_pt) pt->m_pt = m_pt->Copy(); 00019 return pt; 00020 } 00021 00022 void Init(bool bflag) 00023 { 00024 FEElasticMaterialPoint& pt = *m_pt->ExtractData<FEElasticMaterialPoint>(); 00025 if (bflag) 00026 { 00027 // intialize data to zero 00028 m_Emax = 0; 00029 m_Etrial = 0; 00030 m_D = 1; 00031 } 00032 else 00033 { 00034 m_Emax = max(m_Emax, m_Etrial); 00035 } 00036 00037 // don't forget to intialize the nested data 00038 if (m_pt) m_pt->Init(bflag); 00039 } 00040 00041 void Serialize(DumpFile& ar) 00042 { 00043 if (ar.IsSaving()) 00044 { 00045 ar << m_Emax; 00046 } 00047 else 00048 { 00049 ar >> m_Emax; 00050 } 00051 } 00052 00053 public: 00054 double m_Etrial; 00055 double m_Emax; 00056 double m_D; 00057 }; 00058 00059 //----------------------------------------------------------------------------- 00060 class FEDamageNeoHookean : public FEElasticMaterial 00061 { 00062 public: 00063 FEDamageNeoHookean(void); 00064 00065 public: 00066 double m_E; 00067 double m_v; 00068 00069 double m_alpha; 00070 double m_beta; 00071 00072 protected: 00073 double m_lam; 00074 double m_mu; 00075 00076 public: 00078 virtual mat3ds Stress(FEMaterialPoint& pt); 00079 00081 virtual tens4ds Tangent(FEMaterialPoint& pt); 00082 00084 void Init(); 00085 00087 double BulkModulus() { return m_E/(3.0*(1.0 - 2.0*m_v));} 00088 00089 // returns a pointer to a new material point object 00090 virtual FEMaterialPoint* CreateMaterialPointData() 00091 { 00092 return new FEDamageMaterialPoint(new FEElasticMaterialPoint); 00093 } 00094 00095 // calculate damage reduction factor 00096 double Damage(FEMaterialPoint& pt); 00097 00098 // declare as registered 00099 DECLARE_REGISTERED(FEDamageNeoHookean); 00100 00101 // declare the parameter list 00102 DECLARE_PARAMETER_LIST(); 00103 };
1.7.5.1