00001 // ------------------------------------------------------------------------- 00002 // Material.h - This header file contains the definition of material class. 00003 // ------------------------------------------------------------------------- 00004 // Description: The material class implements methods to read data from 00005 // the neutral file and to return material parameters. The 00006 // materials are stored in a double linked list. 00007 // ------------------------------------------------------------------------- 00008 // Main public methods: 00009 // ------------------------------------------------------------------------- 00010 // 00011 // static cMaterial *ReadAll( void ) 00012 // 00013 // Reads all materials contained in the neutral file. 00014 // ------------------------------------------------------------------------- 00015 // 00016 // static void FreeAll( void ) 00017 // 00018 // Frees the material list. 00019 // ------------------------------------------------------------------------- 00020 // 00021 // static cMaterial *GetAddr( int label ) 00022 // 00023 // label - material label ( in ) 00024 // 00025 // Given a label finds the correpondent material. Returns NULL if the 00026 // material does not exists. 00027 // ------------------------------------------------------------------------- 00028 // 00029 // virtual void Read( void ) 00030 // 00031 // Returns the material data. 00032 // ------------------------------------------------------------------------- 00033 // 00034 // virtual void GetElastParam( double *param ) 00035 // 00036 // param - array with elastic parameters ( out ) 00037 // 00038 // Returns the elastic parameters of the orthotropic material. 00039 // ------------------------------------------------------------------------- 00040 // 00041 // virtual void GetParam( double *param ) 00042 // 00043 // param - array with material parameters ( out ) 00044 // 00045 // Returns all parameters of the material. 00046 // ------------------------------------------------------------------------- 00047 // 00048 // double GetDensity( void ) 00049 // 00050 // Returns the specific weight. 00051 // ------------------------------------------------------------------------- 00052 // 00053 // double GetThermExpan( void ) 00054 // 00055 // Returns the thermal expansion coeficient. 00056 // ------------------------------------------------------------------------- 00057 // 00058 // $Author: evandro $ 00059 // $Revision: 1.4 $ 00060 // $Date: 2000/04/04 23:15:12 $ 00061 // $State: Exp $ 00062 // 00063 // ------------------------------------------------------------------------- 00064 00065 #ifndef _MATERIAL_H 00066 #define _MATERIAL_H 00067 00068 #include "gbldefs.h" 00069 00070 // ------------------------------------------------------------------------- 00071 // Material types: 00072 00073 typedef enum _materialtype 00074 { 00075 MATELASTICISO, // Elastic Isotropic Material 00076 MATELASTICORTHO, // Elastic Orthotropic Material 00077 MATELASTICPISO, // Elastic Polar Isotropic Material 00078 MATVONMISES, // Elastic-Plastic von Mises Material 00079 MATPVONMISES, // Elastic-Plastic Polar von Mises Material 00080 MATDRUCKERPRAGER, // Elastic-Plastic Drucker-Prager Material 00081 MATTRESCA, // Elastic-Plastic Tresca Material 00082 MATMOHRCOULOMB, // Elastic-Plastic Mohr-Coulomb Material 00083 MATDAMAGEBL, // Bilinear Damage Material 00084 MATDAMAGENL, // Nonlinear Damage Material 00085 MATWINKLER, // Winkler Foundation Material 00086 MATWINKLER2D, // Winkler Material for 2D problems 00087 MATWINKLERPT, // Non-Linear Winkler Foundation Material 00088 MATWINKLER2DPT // Non-Linear Winkler Material for 2D problems 00089 00090 } eMaterialType; 00091 00092 // ------------------------------------------------------------------------- 00093 // Base Material class: 00094 00095 class cMaterial 00096 { 00097 private: 00098 static int _iNumMeshMat; // total number of materials 00099 static cMaterial *MatHead; 00100 cMaterial *next; 00101 cMaterial *prev; 00102 00103 protected: 00104 eMaterialType _eType; // material type 00105 int _iLabel; // material label (number) 00106 int _iNumElastParam; // number of elastic parameters 00107 int _iNumParam; // number of parameters 00108 double _dDensity; // material density (spec. weight) 00109 double _dThermExpan; // coeficient of thermal expansion 00110 00111 public: 00112 cMaterial ( void ); 00113 virtual ~cMaterial ( void ); 00114 static cMaterial *ReadAll ( void ); 00115 static void FreeAll ( void ); 00116 static cMaterial *GetAddr ( int ); 00117 eMaterialType GetType ( void ){ return _eType; } 00118 int GetLabel ( void ){ return _iLabel; } 00119 int GetNumMat ( void ){ return _iNumMeshMat; } 00120 int GetNumElastParam( void ){ return _iNumElastParam; } 00121 virtual int GetNumParam ( void ){ return _iNumParam; } 00122 virtual double GetDensity ( void ){ return _dDensity; } 00123 virtual double GetThermExpan ( void ){ return _dThermExpan; } 00124 virtual void Read ( void ) = 0; 00125 virtual void GetElastParam ( double * ) = 0; 00126 virtual void GetParam ( double * ) { } 00127 00128 private: 00129 static void ProcessDensity ( void ); 00130 static void ProcessThermExpan ( void ); 00131 static void ProcessElasticIsotropic ( void ); 00132 static void ProcessElasticOrthotropic ( void ); 00133 static void ProcessElasticPolarIsotropic( void ); 00134 static void ProcessVonMises ( void ); 00135 static void ProcessPolarVonMises ( void ); 00136 static void ProcessDruckerPrager ( void ); 00137 static void ProcessTresca ( void ); 00138 static void ProcessMohrCoulomb ( void ); 00139 static void ProcessDamageBilinear ( void ); 00140 static void ProcessDamageNonlinear ( void ); 00141 static void ProcessWinkler ( void ); 00142 static void ProcessWinkler2D ( void ); 00143 static void ProcessWinklerPt ( void ); 00144 static void ProcessWinkler2DPt ( void ); 00145 }; 00146 00147 #endif