material.h

Go to the documentation of this file.
00001 /*
00002 %M This module contains the material class and data structure definitions
00003 %a Joao Luiz Elias Campos.
00004 %d September 2nd, 1998.
00005 %r $Id: material.h,v 1.1 2004/06/22 05:29:59 joaoluiz Exp $
00006 %w (C) COPYRIGHT 1995-1996, Eduardo Nobre Lages.
00007    (C) COPYRIGHT 1997-1998, Joao Luiz Elias Campos.
00008    All Rights Reserved
00009    Duplication of this program or any part thereof without the express
00010    written consent of the author is prohibited.
00011 *
00012 *
00013 *  Modified:  Agosto-06  André Luis Muller
00014 *    Criada a variável para material, Lambda
00015 */
00016 
00017 
00018 #ifndef _MATERIAL_H
00019 #define _MATERIAL_H
00020 
00021 /*
00022 %T Material type definition
00023 */
00024 typedef enum _mattype
00025 {
00026  MOHR_COULOMB_CUTOFF,      /* Mohr coulomb material with traction cutoff   */
00027  MOHR_COULOMB,             /* Mohr coulomb material                        */
00028  MOHR_COULOMB_NAC,         /* Mohr coulomb nonassociated constant material */
00029  MOHR_COULOMB_NAV,         /* Mohr coulomb nonassociated variable material */
00030  ISOTROPIC,                /* Isotropic material                           */
00031  ISOTROPIC_FAIL,           /* Isotropic fail material                      */
00032  ORTHOTROPIC,              /* Orthotropic material                         */
00033  HIPERBOLIC,               /* Hiperbolic material                          */
00034  MISES,                    /* Von Mises material                           */
00035  INTERFACE_MAT,            /* Interface material                           */
00036  ITF_MOHR_COULOMB,         /* Mohr coulomb iterface material               */
00037  KELVIN,                   /* Kelvin vico-elastic material                 */
00038  MAXWELL,                  /* Maxwell vico-elastic material                */
00039  NumMatTypes
00040 } eMatType;
00041 
00042 /*
00043 %T Material data structure definition
00044 */
00045 typedef struct _material
00046 {
00047  eMatType  type;              /* The material type       */
00048  int       label;             /* Material label (number) */
00049  double    Gamma;             /* Material density        */
00050  double    Rhof;              /* Fluid density           */
00051  void     *data;              /* Material data           */
00052  double    Lambda;            /* Poro pressure parameter        */
00053 } sMaterial;
00054 
00055 /*
00056 %T Material class definition
00057 */
00058 typedef struct _matclass
00059 {
00060  void   (*init)     ( void );
00061  void   (*new)      ( int, sMaterial ** );
00062  void   (*free)     ( sMaterial * );
00063  void   (*read)     ( sMaterial * );
00064  void   (*epar)     ( sMaterial *, double * );
00065  void   (*nupar)    ( sMaterial *, double * );
00066  void   (*cmatrix)  ( sMaterial *, double [6][6] );
00067  void   (*cpsmatrix)( sMaterial *, double [6][6] ); 
00068  void   (*updatestr)( sMaterial *, double, double *, double *, double *,
00069                                    double * );
00070  void   (*updatepar)( sMaterial *, double );
00071  void   (*timestep) ( sMaterial *, double * );
00072  void   (*density)  ( sMaterial *, double * );
00073  void   (*vstrain)  ( sMaterial *, double, sTensor *, sTensor * );
00074  void   (*rf)( sMaterial *, double , double , double * );
00075  
00076 } sMatClass;
00077 
00078 /* Material class
00079  */
00080 extern sMatClass MatClass[NumMatTypes];
00081 
00082 /* Material list
00083  */
00084 extern sMaterial **MatList;
00085 
00086 /* Number of material in the model
00087  */
00088 extern int NumMaterials;
00089 
00090 /*
00091 ** ------------------------------------------------------------------------
00092 ** Macro definitions:
00093 */
00094 
00095 #define MatInit(type)                           \
00096         if(MatClass[type].init != 0L)           \
00097          (*MatClass[type].init)( )
00098 
00099 #define MatNew(type,label,mat)                  \
00100         if(MatClass[type].new != 0L)            \
00101          (*MatClass[type].new)( label, mat )
00102 
00103 #define MatFree(mat)                            \
00104         if(MatClass[mat->type].free != 0L)      \
00105          (*MatClass[mat->type].free)( mat )
00106 
00107 #define MatRead(mat)                            \
00108         if(MatClass[mat->type].read != 0L )     \
00109          (*MatClass[mat->type].read)( mat )
00110 
00111 #define MatEParameter(mat,e)                    \
00112         if(MatClass[mat->type].epar != 0L )     \
00113          (*MatClass[mat->type].epar)( mat, e )
00114 
00115 #define MatNuParameter(mat,nu)                  \
00116         if(MatClass[mat->type].nupar != 0L )    \
00117          (*MatClass[mat->type].nupar)( mat, nu )
00118 
00119 #define MatConstitutiveMatrix(mat,cm)           \
00120         if(MatClass[mat->type].cmatrix != 0L )  \
00121          (*MatClass[mat->type].cmatrix)( mat, cm )
00122          
00123 #define MatPSMatrix(mat,cm)                             \
00124         if(MatClass[(mat)->type].cpsmatrix != NULL )    \
00125          (*MatClass[(mat)->type].cpsmatrix)( (mat), (cm) )       
00126 
00127 #define MatUpdateStress(mat,dt,y,effd,str,def)  \
00128         if(MatClass[mat->type].updatestr != 0L )\
00129          (*MatClass[mat->type].updatestr)( mat, dt, y, effd, str, def )
00130 
00131 #define MatUpdateParameter(mat,str)             \
00132         if(MatClass[mat->type].updatepar != 0L )\
00133          (*MatClass[mat->type].updatepar)( mat, str )
00134 
00135 #define MatTimeStep(mat,dt)                     \
00136         if(MatClass[mat->type].timestep != 0L ) \
00137          (*MatClass[mat->type].timestep)( mat, dt )
00138 
00139 #define MatDensity(mat,gamma)                   \
00140         if(MatClass[mat->type].density != 0L )  \
00141          (*MatClass[mat->type].density)( mat, gamma )
00142 
00143 #define MatViscoStrain(mat,ts,str,strv)         \
00144         if(MatClass[mat->type].vstrain != 0L )  \
00145          (*MatClass[mat->type].vstrain)( mat, ts, str, strv )
00146          
00147 #define MatRF(mat,sig1,sig3, rfv)       \
00148         if(MatClass[mat->type].rf != 0L )\
00149          (*MatClass[mat->type].rf)( mat, sig1, sig3, rfv )       
00150           
00151 
00152 /* Public functions
00153 */
00154 void MaterialInit   ( void );
00155 void MaterialFree   ( void );
00156 int  MaterialIsVisco( sMaterial * );
00157 
00158 #endif
00159 

Generated on Tue Oct 23 11:23:29 2007 for Relax by  doxygen 1.5.3