/Users/jack/Code/basso_dev/inc/MatElastic.h

Go to the documentation of this file.
00001 
00012 #ifndef _MAT_ELASTIC_BASSO_H_
00013 #define _MAT_ELASTIC_BASSO_H_
00014 
00015 // std includes
00016 
00017 // Basso includes
00018 #include "basso.h"
00019 #include "Material.h"
00020 
00021 namespace basso {
00022 
00023 
00028 class MatElastic : public Material  
00029 {
00030 
00031 public:
00032         
00033         // PUBLIC DEFS
00034         
00035         // CONSTRUCTORS 
00036         MatElastic( Numeric E, Numeric nu, Numeric rho=1.0, Numeric alpha=0.0, Numeric diff=0.0 ) : Material(), C(6,6)
00037                 { 
00038                         fE=E; fNu=nu; fRho=rho; 
00039                         fThermalExpansion=alpha; 
00040                         fDiffusivity=diff;
00041                         FormC(); 
00042                 }
00043         
00044         virtual ~MatElastic( ) { }
00045         
00046         // ACCESSORS
00047         
00048         // MEMBER FUNCTIONS
00049         
00051         virtual Numeric Density(  const MaterialState sv=MaterialState() ) const { return fRho; }
00052         
00053         virtual Numeric ThermalExpansion( ) const       { return fThermalExpansion; }
00054                 
00055         virtual Numeric Diffusivity( ) const    { return fDiffusivity; }
00056         
00061         virtual void ComputeStress( nArray &stress, const StressState *ssptr, const nArray &strain  ) 
00062                 {
00063 //                      this->CheckVoigtInput(stress);
00064 //                      mult( C, strain, stress );  
00065                 }
00066                 
00067         virtual void ComputeStress( nArray &stress, const StressState *ssptr, const MaterialState &sv  ) 
00068                 {
00069                         // ComputeStress( stress, sv.Strain() ); 
00070                 }
00071 
00072         virtual void ComputeStress( nMatrix &stress, const StressState *ssptr, const MaterialState &sv ) 
00073                 {   
00074 //                      this->CheckInput(stress);
00075 /*                      nArray vstress( 6 );
00076                         ComputeStress( vstress, sv.Strain() );
00077                         voigt2tensor( vstress, stress ); 
00078 */
00079                 }
00080         
00081         
00086         virtual void ComputeTangentStiffness( nMatrix &cmat, const StressState *ssptr, const MaterialState sv=MaterialState() ) const
00087                 { 
00088                         ssptr->Convert( C, cmat );
00089 //                      this->CheckVoigtInput(cmat);
00090 //                      copy( C, cmat ); 
00091                 }
00092         
00093 protected:
00094         void SetProperties( Numeric E, Numeric nu, Numeric rho=1.0 ) { fE=E; fNu=nu; fRho=rho; FormC(); }
00095         void FormC();
00096         
00097 protected:
00098         Numeric fE, fNu, fRho, fDiffusivity, fThermalExpansion;
00099         nMatrix C;
00100 };
00101 
00102 void MatElastic::FormC()  
00103 {
00104         Numeric Cv=fE*(1.0-fNu)/(1.0+fNu)/(1.0-2*fNu), 
00105                 Cp=Cv*fNu/(1.0-fNu), 
00106                 Cs=fE/(1+fNu)/2.0;
00107         C(0,0)=Cv; C(0,1)=Cp; C(0,2)=Cp; C(0,3)=0.; C(0,4)=0.; C(0,5)=0.;                               
00108         C(1,0)=Cp; C(1,1)=Cv; C(1,2)=Cp; C(0,3)=0.; C(0,4)=0.; C(0,5)=0.;
00109         C(2,0)=Cp; C(2,1)=Cp; C(2,2)=Cv; C(0,3)=0.; C(0,4)=0.; C(0,5)=0.;
00110         C(3,0)=0.; C(3,1)=0.; C(3,2)=0.; C(3,3)=Cs; C(3,4)=0.; C(3,5)=0.; 
00111         C(4,0)=0.; C(4,1)=0.; C(4,2)=0.; C(4,3)=0.; C(4,4)=Cs; C(4,5)=0.;
00112         C(5,0)=0.; C(5,1)=0.; C(5,2)=0.; C(5,3)=0.; C(5,4)=0.; C(5,5)=Cs; 
00113         
00114 }
00115 
00116 } // end namespace
00117 
00118 
00119 #endif
00120 
00121 

Generated on Sat Jan 19 09:03:57 2008 for Basso by  doxygen 1.5.2