MultiaxialCyclicPlasticity3D.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 ** ****************************************************************** */
00015                                                                         
00016  
00017 /*----+----+----+----+----+----+----+----+----+----+----+----+----+----+----*
00018  |                                                                          | 
00019  |              MultiaxialCyclicPlasticity  NDMaterial                      |
00020  +                                                                          +
00021  |--------------------------------------------------------------------------|
00022  |                                                                          |
00023  +             Authors: Gang Wang  AND  Professor Nicholas Sitar            +
00024  |                                                                          |
00025  |                         Department of Civil and Environmental Engineering            |
00026  +                         Univeristy of California, Berkeley, CA 94720, USA            +
00027  |                                                                          |
00028  |             Email: wang@ce.berkeley.edu (G.W.)                           |
00029  |                                                                          | 
00030  +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----*/
00031 
00032 
00033 #include <MultiaxialCyclicPlasticity3D.h>
00034 #include <Channel.h>
00035 #include <FEM_ObjectBroker.h>
00036 
00037 //static vectors and matrices
00038 Vector MultiaxialCyclicPlasticity3D :: strain_vec(6) ;
00039 Vector MultiaxialCyclicPlasticity3D :: stress_vec(6) ;
00040 Matrix MultiaxialCyclicPlasticity3D :: tangent_matrix(6,6) ;
00041 
00042 
00043 //null constructor
00044 MultiaxialCyclicPlasticity3D ::  MultiaxialCyclicPlasticity3D( ) : 
00045 MultiaxialCyclicPlasticity( ) 
00046 {  }
00047 
00048 
00049 //full constructor
00050 MultiaxialCyclicPlasticity3D :: 
00051 MultiaxialCyclicPlasticity3D(   int    tag,
00052                                 double rho,
00053                                 double K,
00054                                 double G,
00055                                 double Su,
00056                                 double Ho_kin,
00057                                 double Parameter_h,
00058                                 double Parameter_m,
00059                                 double Parameter_beta,
00060                                 double Kcoeff,
00061                                 double viscosity ) :
00062 MultiaxialCyclicPlasticity( tag, ND_TAG_MultiaxialCyclicPlasticity3D, rho, K, G, 
00063                 Su, Ho_kin, Parameter_h, Parameter_m, Parameter_beta, Kcoeff, viscosity)
00064 { 
00065 
00066 }
00067 
00068 
00069 //elastic constructor
00070 MultiaxialCyclicPlasticity3D :: 
00071 MultiaxialCyclicPlasticity3D(   int    tag, 
00072                                  double rho,
00073                  double K, 
00074                  double G ) :
00075 MultiaxialCyclicPlasticity( tag, ND_TAG_MultiaxialCyclicPlasticity3D, rho, K, G )
00076 { 
00077 
00078 }
00079 
00080 
00081 
00082 //destructor
00083 MultiaxialCyclicPlasticity3D :: ~MultiaxialCyclicPlasticity3D( ) 
00084 { } 
00085 
00086 
00087 //make a clone of this material
00088 NDMaterial* MultiaxialCyclicPlasticity3D :: getCopy( ) 
00089 { 
00090   MultiaxialCyclicPlasticity3D  *clone;
00091   clone = new MultiaxialCyclicPlasticity3D( ) ;   //new instance of this class
00092   *clone = *this ;          //asignment to make copy
00093   return clone ;
00094 }
00095 
00096 
00097 //send back type of material
00098 const char* MultiaxialCyclicPlasticity3D :: getType( ) const 
00099 {
00100   return "ThreeDimensional" ;
00101 }
00102 
00103 
00104 //send back order of strain in vector form
00105 int MultiaxialCyclicPlasticity3D :: getOrder( ) const 
00106 { 
00107   return 6 ; 
00108 } 
00109 
00110 
00111 //get the strain and integrate plasticity equations
00112 int MultiaxialCyclicPlasticity3D :: setTrialStrain( const Vector &strain_from_element) 
00113 {
00114   strain.Zero( ) ;
00115 
00116   strain(0,0) =        strain_from_element(0) ;
00117   strain(1,1) =        strain_from_element(1) ;
00118   strain(2,2) =        strain_from_element(2) ;
00119 
00120   strain(0,1) = 0.50 * strain_from_element(3) ;
00121   strain(1,0) =        strain(0,1) ;
00122 
00123   strain(1,2) = 0.50 * strain_from_element(4) ;
00124   strain(2,1) =        strain(1,2) ;
00125   
00126   strain(2,0) = 0.50 * strain_from_element(5) ;
00127   strain(0,2) =        strain(2,0) ;
00128 
00129   
00130   //opserr<<"DP:setTrialStrain:MaterialStageID= "<<this->MaterialStageID<<endln;
00131 
00132   if (this->MaterialStageID ==1) { 
00133           //opserr<<"DP:setTrialStrain:elastic K0"<<endln;
00134           this->elastic_integrator( ) ;
00135   } else if (this->MaterialStageID ==2) {         
00136           //opserr<<"DP:setTrialStrain:plastic"<<endln;
00137           // initialize history variables here in first call???
00138           
00139           this->plastic_integrator( ) ;
00140   }
00141   
00142 
00143 
00144   return 0 ;
00145 }
00146 
00147 
00148 //unused trial strain functions
00149 int MultiaxialCyclicPlasticity3D :: setTrialStrain( const Vector &v, const Vector &r )
00150 { 
00151    return this->setTrialStrain( v ) ;
00152 } 
00153 
00154 int MultiaxialCyclicPlasticity3D :: setTrialStrainIncr( const Vector &v ) 
00155 {
00156   static Vector newStrain(6);
00157   newStrain(0) = strain(0,0) + v(0);
00158   newStrain(1) = strain(1,1) + v(1);
00159   newStrain(2) = strain(2,2) + v(2);
00160   newStrain(3) = 2.0*strain(0,1) + v(3);
00161   newStrain(4) = 2.0*strain(1,2) + v(4);
00162   newStrain(5) = 2.0*strain(2,0) + v(5);
00163   
00164   return this->setTrialStrain(newStrain);
00165 }
00166 
00167 int MultiaxialCyclicPlasticity3D :: setTrialStrainIncr( const Vector &v, const Vector &r ) 
00168 {
00169   return this->setTrialStrainIncr(v);
00170 }
00171 
00172 
00173 
00174 //send back the strain
00175 const Vector& MultiaxialCyclicPlasticity3D :: getStrain( ) 
00176 {
00177   strain_vec(0) =       strain(0,0) ;
00178   strain_vec(1) =       strain(1,1) ;
00179   strain_vec(2) =       strain(2,2) ;
00180 
00181   strain_vec(3) = 2.0 * strain(0,1) ;
00182 
00183   strain_vec(4) = 2.0 * strain(1,2) ;
00184 
00185   strain_vec(5) = 2.0 * strain(2,0) ;
00186 
00187   return strain_vec ;
00188 } 
00189 
00190 
00191 //send back the stress 
00192 const Vector& MultiaxialCyclicPlasticity3D :: getStress( ) 
00193 {
00194   stress_vec(0) = stress(0,0) ;
00195   stress_vec(1) = stress(1,1) ;
00196   stress_vec(2) = stress(2,2) ;
00197 
00198   stress_vec(3) = stress(0,1) ;
00199 
00200   stress_vec(4) = stress(1,2) ;
00201   
00202   stress_vec(5) = stress(2,0) ;
00203 
00204   return stress_vec ;
00205 }
00206 
00207 //send back the tangent 
00208 const Matrix& MultiaxialCyclicPlasticity3D :: getTangent( ) 
00209 {
00210   // matrix to tensor mapping
00211   //  Matrix      Tensor
00212   // -------     -------
00213   //   0           0 0
00214   //   1           1 1
00215   //   2           2 2   
00216   //   3           0 1  ( or 1 0 )
00217   //   4           1 2  ( or 2 1 )
00218   //   5           2 0  ( or 0 2 ) 
00219     
00220   int ii, jj ;
00221   int i, j, k, l ;
00222 
00223   for ( ii = 0; ii < 6; ii++ ) {
00224     for ( jj = 0; jj < 6; jj++ ) {
00225 
00226       index_map( ii, i, j ) ;
00227       index_map( jj, k, l ) ;
00228 
00229       tangent_matrix(ii,jj) = tangent[i][j][k][l] ;
00230 
00231     } //end for j
00232   } //end for i
00233 
00234   return tangent_matrix ;
00235 } 
00236 
00237 //send back the tangent 
00238 const Matrix& MultiaxialCyclicPlasticity3D :: getInitialTangent( ) 
00239 {
00240   // matrix to tensor mapping
00241   //  Matrix      Tensor
00242   // -------     -------
00243   //   0           0 0
00244   //   1           1 1
00245   //   2           2 2   
00246   //   3           0 1  ( or 1 0 )
00247   //   4           1 2  ( or 2 1 )
00248   //   5           2 0  ( or 0 2 ) 
00249     
00250   int ii, jj ;
00251   int i, j, k, l ;
00252 
00253   this->doInitialTangent();
00254 
00255   for ( ii = 0; ii < 6; ii++ ) {
00256     for ( jj = 0; jj < 6; jj++ ) {
00257 
00258       index_map( ii, i, j ) ;
00259       index_map( jj, k, l ) ;
00260 
00261       tangent_matrix(ii,jj) = initialTangent[i][j][k][l] ;
00262 
00263     } //end for j
00264   } //end for i
00265 
00266   return tangent_matrix ;
00267 } 
00268 
00269 //this is mike's problem
00270 int MultiaxialCyclicPlasticity3D :: setTrialStrain(const Tensor &v) 
00271 {
00272   return -1 ;
00273 }
00274 
00275 int MultiaxialCyclicPlasticity3D :: setTrialStrain(const Tensor &v, const Tensor &r)     
00276 {
00277   return -1 ;
00278 }
00279 
00280 int MultiaxialCyclicPlasticity3D :: setTrialStrainIncr(const Tensor &v) 
00281 {
00282   return -1 ;
00283 }
00284 
00285 int MultiaxialCyclicPlasticity3D :: setTrialStrainIncr(const Tensor &v, const Tensor &r) 
00286 {
00287   return -1 ;
00288 }
00289 
00290 const Tensor& MultiaxialCyclicPlasticity3D :: getTangentTensor( ) 
00291 {
00292   return rank4 ;
00293 }
00294 
00295 //jeremic@ucdavis.edu 22jan2001const Tensor& J2ThreeDimensional :: getStressTensor( ) 
00296 //jeremic@ucdavis.edu 22jan2001{
00297 //jeremic@ucdavis.edu 22jan2001  return rank2 ;
00298 //jeremic@ucdavis.edu 22jan2001}
00299 //jeremic@ucdavis.edu 22jan2001
00300 //jeremic@ucdavis.edu 22jan2001const Tensor& J2ThreeDimensional :: getStrainTensor( ) 
00301 //jeremic@ucdavis.edu 22jan2001{
00302 //jeremic@ucdavis.edu 22jan2001  return rank2 ;
00303 //jeremic@ucdavis.edu 22jan2001}
00304 
00305 
00306 
00307 
00308 
00309 
00310 

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