Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

J2AxiSymm.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 // $Revision: 1.2 $
00017 // $Date: 2001/01/23 08:46:28 $
00018 // $Source: /usr/local/cvs/OpenSees/SRC/material/nD/J2AxiSymm.cpp,v $
00019 
00020 // Written: Ed "C++" Love
00021 //
00022 // J2AxiSymmetric isotropic hardening material class
00023 // 
00024 //  Elastic Model
00025 //  sigma = K*trace(epsilion_elastic) + (2*G)*dev(epsilon_elastic)
00026 //
00027 //  Yield Function
00028 //  phi(sigma,q) = || dev(sigma) ||  - sqrt(2/3)*q(xi) 
00029 //
00030 //  Saturation Isotropic Hardening with linear term
00031 //  q(xi) = simga_0 + (sigma_infty - sigma_0)*exp(-delta*xi) + H*xi 
00032 //
00033 //  Flow Rules
00034 //  \dot{epsilon_p} =  gamma * d_phi/d_sigma
00035 //  \dot{xi}        = -gamma * d_phi/d_q 
00036 //
00037 //  Linear Viscosity 
00038 //  gamma = phi / eta  ( if phi > 0 ) 
00039 //
00040 //  Backward Euler Integration Routine 
00041 //  Yield condition enforced at time n+1 
00042 //
00043 //  Send strains in following format :
00044 // 
00045 //     strain_vec = {   eps_00
00046 //                      eps_11
00047 //                 eps_22         
00048 //                    2 eps_01   }   <--- note the 2
00049 // 
00050 //  set eta := 0 for rate independent case
00051 //
00052 
00053 #include <J2AxiSymm.h>
00054 
00055 //static vectors and matrices
00056 Vector J2AxiSymm :: strain_vec(4) ;
00057 Vector J2AxiSymm :: stress_vec(4) ;
00058 Matrix J2AxiSymm :: tangent_matrix(4,4) ;
00059 
00060 
00061 //null constructor
00062 J2AxiSymm ::  J2AxiSymm( ) : 
00063 J2Plasticity( ) 
00064 {  }
00065 
00066 
00067 //full constructor
00068 
00069 J2AxiSymm :: J2AxiSymm(   int    tag, 
00070                  double K,
00071                  double G,
00072                  double yield0,
00073                  double yield_infty,
00074                  double d,
00075                  double H,
00076                  double viscosity ) : 
00077 J2Plasticity( tag, ND_TAG_J2AxiSymm, 
00078              K, G, yield0, yield_infty, d, H, viscosity )
00079 { }
00080 
00081 
00082 //elastic constructor
00083 
00084 J2AxiSymm :: J2AxiSymm(   int    tag, 
00085                  double K, 
00086                  double G ) :
00087 J2Plasticity( tag, ND_TAG_J2AxiSymm, K, G )
00088 { }
00089 
00090 
00091 
00092 //destructor
00093 J2AxiSymm :: ~J2AxiSymm( ) 
00094 { } 
00095 
00096 
00097 //make a clone of this material
00098 NDMaterial* J2AxiSymm :: getCopy( ) 
00099 { 
00100   J2AxiSymm  *clone;
00101   clone = new J2AxiSymm() ;   //new instance of this class
00102   *clone = *this ;          //asignment to make copy
00103   return clone ;
00104 }
00105 
00106 
00107 //send back type of material
00108 const char* J2AxiSymm :: getType( ) const 
00109 {
00110   return "AxiSymmetric2D" ;
00111 }
00112 
00113 
00114 //send back order of strain in vector form
00115 int J2AxiSymm :: getOrder( ) const 
00116 { 
00117   return 4 ; 
00118 } 
00119 
00120 
00121 //get the strain and integrate plasticity equations
00122 int J2AxiSymm :: setTrialStrain( const Vector &strain_from_element) 
00123 {
00124   strain.Zero( ) ;
00125 
00126   strain(0,0) =        strain_from_element(0) ;
00127   strain(1,1) =        strain_from_element(1) ;
00128   strain(2,2) =        strain_from_element(2) ;
00129 
00130   strain(0,1) = 0.50 * strain_from_element(3) ;
00131   strain(1,0) =        strain(0,1) ;
00132 
00133   this->plastic_integrator( ) ;
00134 
00135   return 0 ;
00136 }
00137 
00138 
00139 //unused trial strain functions
00140 int J2AxiSymm :: setTrialStrain( const Vector &v, const Vector &r )
00141 { 
00142    return this->setTrialStrain( v ) ;
00143 } 
00144 
00145 int J2AxiSymm :: setTrialStrainIncr( const Vector &v ) 
00146 {
00147     return -1 ;
00148 }
00149 
00150 int J2AxiSymm :: setTrialStrainIncr( const Vector &v, const Vector &r ) 
00151 {
00152     return -1 ;
00153 }
00154 
00155 
00156 
00157 //send back the strain
00158 const Vector& J2AxiSymm :: getStrain( ) 
00159 {
00160   strain_vec(0) =       strain(0,0) ;
00161   strain_vec(1) =       strain(1,1) ;
00162   strain_vec(2) =       strain(2,2) ;
00163 
00164   strain_vec(3) = 2.0 * strain(0,1) ;
00165 
00166   return strain_vec ;
00167 } 
00168 
00169 
00170 //send back the stress 
00171 const Vector& J2AxiSymm :: getStress( ) 
00172 {
00173   stress_vec(0) = stress(0,0) ;
00174   stress_vec(1) = stress(1,1) ;
00175   stress_vec(2) = stress(2,2) ;
00176 
00177   stress_vec(3) = stress(0,1) ;
00178 
00179   return stress_vec ;
00180 }
00181 
00182 //send back the tangent 
00183 const Matrix& J2AxiSymm :: getTangent( ) 
00184 {
00185   // matrix to tensor mapping
00186   //  Matrix      Tensor
00187   // -------     -------
00188   //   0           0 0
00189   //   1           1 1
00190   //   2           2 2   
00191   //   3           0 1  ( or 1 0 )
00192   
00193   int ii, jj ;
00194   int i, j, k, l ;
00195 
00196   for ( ii = 0; ii < 4; ii++ ) {
00197     for ( jj = 0; jj < 4; jj++ ) {
00198 
00199       index_map( ii, i, j ) ;
00200       index_map( jj, k, l ) ;
00201 
00202       tangent_matrix(ii,jj) = tangent[i][j][k][l] ;
00203 
00204     } //end for j
00205   } //end for i
00206 
00207   return tangent_matrix ;
00208 } 
00209 
00210 //this is mike's problem
00211 int J2AxiSymm :: setTrialStrain(const Tensor &v) 
00212 {
00213   return -1 ;
00214 }
00215 
00216 int J2AxiSymm :: setTrialStrain(const Tensor &v, const Tensor &r)     
00217 {
00218   return -1 ;
00219 }
00220 
00221 int J2AxiSymm :: setTrialStrainIncr(const Tensor &v) 
00222 {
00223   return -1 ;
00224 }
00225 
00226 int J2AxiSymm :: setTrialStrainIncr(const Tensor &v, const Tensor &r) 
00227 {
00228   return -1 ;
00229 }
00230 
00231 const Tensor& J2AxiSymm :: getTangentTensor( ) 
00232 {
00233   return rank4 ;
00234 }
00235 
00236 //jeremic@ucdavis.edu 22jan2001const Tensor& J2AxiSymm :: getStressTensor( ) 
00237 //jeremic@ucdavis.edu 22jan2001{
00238 //jeremic@ucdavis.edu 22jan2001  return rank2 ;
00239 //jeremic@ucdavis.edu 22jan2001}
00240 //jeremic@ucdavis.edu 22jan2001
00241 //jeremic@ucdavis.edu 22jan2001const Tensor& J2AxiSymm :: getStrainTensor( ) 
00242 //jeremic@ucdavis.edu 22jan2001{
00243 //jeremic@ucdavis.edu 22jan2001  return rank2 ;
00244 //jeremic@ucdavis.edu 22jan2001}
00245 
00246 
00247 //this is frank's problem
00248 int J2AxiSymm :: sendSelf(int commitTag, Channel &theChannel)
00249 {
00250   return -1 ;
00251 }
00252 
00253 int J2AxiSymm :: recvSelf(int commitTag, Channel &theChannel, 
00254                        FEM_ObjectBroker &theBroker)
00255 {
00256   return -1 ;
00257 }
00258 
00259 
00260 
00261 
Copyright Contact Us