ElasticPlateSection.cpp

Go to the documentation of this file.
00001 /* ****************************************************************** **
00002 **    OpenSees - Open System for Earthquake Engineering Simulation    **
00003 **          Pacific Earthquake Engineering Research Center            **
00004 **                                                                    **
00005 **                                                                    **
00006 ** (C) Copyright 1999, The Regents of the University of California    **
00007 ** All Rights Reserved.                                               **
00008 **                                                                    **
00009 ** Commercial use of this program without express permission of the   **
00010 ** University of California, Berkeley, is strictly prohibited.  See   **
00011 ** file 'COPYRIGHT'  in main directory for information on usage and   **
00012 ** redistribution,  and for a DISCLAIMER OF ALL WARRANTIES.           **
00013 **                                                                    **
00014 ** Developed by:                                                      **
00015 **   Frank McKenna (fmckenna@ce.berkeley.edu)                         **
00016 **   Gregory L. Fenves (fenves@ce.berkeley.edu)                       **
00017 **   Filip C. Filippou (filippou@ce.berkeley.edu)                     **
00018 **                                                                    **
00019 ** ****************************************************************** */
00020                                                                         
00021 // $Revision: 1.8 $
00022 // $Date: 2003/02/14 23:01:33 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/material/section/ElasticPlateSection.cpp,v $
00024 
00025 // Ed "C++" Love
00026 //
00027 //  Elastic Plate Section
00028 //
00029 
00030 
00031 #include <ElasticPlateSection.h>
00032 #include <Matrix.h>
00033 #include <Vector.h>
00034 #include <Channel.h>
00035 #include <FEM_ObjectBroker.h>
00036 
00037 //parameters
00038 const double ElasticPlateSection::five6 = 5.0/6.0 ; //shear correction
00039 
00040 //static vector and matrices
00041 Vector ElasticPlateSection::stress(5) ;
00042 Matrix ElasticPlateSection::tangent(5,5) ;
00043 ID     ElasticPlateSection::array(5) ;
00044 
00045 
00046 //null constructor
00047 ElasticPlateSection::ElasticPlateSection( ) : 
00048 SectionForceDeformation( 0, SEC_TAG_ElasticPlateSection ), 
00049 strain(5) 
00050 { }
00051 
00052 
00053 
00054 //full constructor
00055 ElasticPlateSection::ElasticPlateSection(  int    tag, 
00056                                            double young,
00057                                            double poisson,
00058                                            double thickness ) :
00059 SectionForceDeformation( tag, SEC_TAG_ElasticPlateSection ),
00060 strain(5)
00061 {
00062   this->E  = young ;
00063   this->nu = poisson ;
00064   this->h  = thickness ;
00065 }
00066 
00067 
00068 
00069 //destructor
00070 ElasticPlateSection::~ElasticPlateSection( ) 
00071 { } 
00072 
00073 
00074 
00075 //make a clone of this material
00076 SectionForceDeformation* ElasticPlateSection::getCopy( ) 
00077 {
00078   ElasticPlateSection *clone ;   
00079 
00080   clone = new ElasticPlateSection( ) ; //new instance of this class
00081 
00082   *clone = *this ; //assignment to make copy
00083 
00084   return clone ;
00085 }
00086 
00087 
00088 
00089 //send back order of strain in vector form
00090 int ElasticPlateSection::getOrder( ) const
00091 {
00092   return 5 ;
00093 }
00094 
00095 
00096 //send back order of strain in vector form
00097 const ID& ElasticPlateSection::getType( ) 
00098 {
00099   return array ;
00100 }
00101 
00102 
00103 
00104 //swap history variables
00105 int ElasticPlateSection::commitState( ) 
00106 {
00107   return 0 ;
00108 }
00109 
00110 
00111 
00112 //revert to last saved state
00113 int ElasticPlateSection::revertToLastCommit( )
00114 {
00115   return 0 ;
00116 }
00117 
00118 //revert to start
00119 int ElasticPlateSection::revertToStart( )
00120 {
00121   return 0 ;
00122 }
00123 
00124 
00125 //get the strain 
00126 int ElasticPlateSection ::
00127 setTrialSectionDeformation( const Vector &strain_from_element)
00128 {
00129   this->strain = strain_from_element ;
00130 
00131   return 0 ;
00132 }
00133 
00134 
00135 //send back the strain
00136 const Vector& ElasticPlateSection::getSectionDeformation( )
00137 {
00138   return this->strain ;
00139 }
00140 
00141 
00142 //send back the stress 
00143 const Vector& ElasticPlateSection::getStressResultant( )
00144 {
00145   double D  =  E * (h*h*h) / 12.0 / ( 1.0 - nu*nu ) ; //bending modulus
00146 
00147   double G  =  0.5 * E / ( 1.0 + nu ) ; //shear modulus
00148  
00149   G *= five6 ;
00150   G *= h ;
00151 
00152 
00153   stress(0) = -( D*strain(0) + nu*D*strain(1) ) ;
00154  
00155   stress(1) = -( nu*D*strain(0) + D*strain(1) ) ;
00156 
00157   stress(2) = -0.5*D*( 1.0 - nu )*strain(2) ;
00158 
00159   stress(3) = G*strain(3) ;
00160 
00161   stress(4) = G*strain(4) ;
00162 
00163  
00164   return this->stress ;
00165 }
00166 
00167 
00168 //send back the tangent 
00169 const Matrix& ElasticPlateSection::getSectionTangent( )
00170 {
00171 
00172   double D  =  E * (h*h*h) / 12.0 / ( 1.0 - nu*nu ) ;
00173 
00174   double G  =  0.5 * E / ( 1.0 + nu ) ;
00175 
00176 
00177   tangent.Zero() ;
00178 
00179   tangent(0,0) = -D ;
00180   tangent(1,1) = -D ;
00181 
00182   tangent(0,1) = -nu*D ;
00183   tangent(1,0) = tangent(0,1) ;
00184 
00185   tangent(2,2) = -0.5 * D * ( 1.0 - nu ) ;
00186 
00187   tangent(3,3) = five6*G*h ;
00188 
00189   tangent(4,4) = tangent(3,3) ;
00190 
00191 
00192   return this->tangent ;
00193 }
00194 
00195 //send back the initial tangent 
00196 const Matrix& ElasticPlateSection::getInitialTangent( )
00197 {
00198 
00199   double D  =  E * (h*h*h) / 12.0 / ( 1.0 - nu*nu ) ;
00200 
00201   double G  =  0.5 * E / ( 1.0 + nu ) ;
00202 
00203 
00204   tangent.Zero() ;
00205 
00206   tangent(0,0) = -D ;
00207   tangent(1,1) = -D ;
00208 
00209   tangent(0,1) = -nu*D ;
00210   tangent(1,0) = tangent(0,1) ;
00211 
00212   tangent(2,2) = -0.5 * D * ( 1.0 - nu ) ;
00213 
00214   tangent(3,3) = five6*G*h ;
00215 
00216   tangent(4,4) = tangent(3,3) ;
00217 
00218 
00219   return this->tangent ;
00220 }
00221 
00222 //print out data
00223 void  ElasticPlateSection::Print( OPS_Stream &s, int flag )
00224 {
00225   s << "ElasticPlateSection: \n " ;
00226   s <<  "  Young's Modulus E  = "  <<  E  <<  endln ;
00227   s <<  "  Poisson's Ratio nu = " <<  nu <<  endln ;
00228   s <<  "  Thickness h = "        <<  h  <<  endln ;
00229 
00230   return ;
00231 }
00232 
00233 
00234 int 
00235 ElasticPlateSection::sendSelf(int cTag, Channel &theChannel) 
00236 {
00237   int res = 0;
00238   static Vector data(4);
00239   data(0) = this->getTag();
00240   data(1) = E;
00241   data(2) = nu;
00242   data(3) = h;
00243 
00244   res = theChannel.sendVector(this->getDbTag(), cTag, data);
00245   if (res < 0) 
00246     opserr << "ElasticPlateSection::sendSelf() - failed to send data\n";
00247 
00248   return res;
00249 }
00250 
00251 
00252 int 
00253 ElasticPlateSection::recvSelf(int cTag, Channel &theChannel, FEM_ObjectBroker &theBroker)
00254 {
00255   int res = 0;
00256   static Vector data(4);
00257   res = theChannel.recvVector(this->getDbTag(), cTag, data);
00258   if (res < 0) 
00259     opserr << "ElasticPlateSection::recvSelf() - failed to recv data\n";
00260   else {
00261     this->setTag(data(0));
00262     E    = data(1);
00263     nu   = data(2);
00264     h    = data(3);
00265   }
00266 
00267   return res;
00268 }

Generated on Mon Oct 23 15:05:17 2006 for OpenSees by doxygen 1.5.0