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

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