ElasticIsotropicPlaneStress2D.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.5 $
00022 // $Date: 2002/12/05 22:49:10 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/material/nD/ElasticIsotropicPlaneStress2D.cpp,v $
00024                                                                         
00025                                                                         
00026 
00027 #include <ElasticIsotropicPlaneStress2D.h>           
00028 #include <Channel.h>
00029 #include <Tensor.h>
00030 
00031 Vector ElasticIsotropicPlaneStress2D::sigma(3);
00032 Matrix ElasticIsotropicPlaneStress2D::D(3,3);
00033 
00034 ElasticIsotropicPlaneStress2D::ElasticIsotropicPlaneStress2D
00035 (int tag, double E, double nu, double rho) :
00036  ElasticIsotropicMaterial (tag, ND_TAG_ElasticIsotropicPlaneStress2d, E, nu, rho),
00037  epsilon(3)
00038 {
00039 
00040 }
00041 
00042 ElasticIsotropicPlaneStress2D::ElasticIsotropicPlaneStress2D():
00043  ElasticIsotropicMaterial (0, ND_TAG_ElasticIsotropicPlaneStress2d, 0.0, 0.0),
00044  epsilon(3)
00045 {
00046 
00047 }
00048 
00049 ElasticIsotropicPlaneStress2D::~ElasticIsotropicPlaneStress2D ()
00050 {
00051 
00052 }
00053 
00054 int
00055 ElasticIsotropicPlaneStress2D::setTrialStrain (const Vector &strain)
00056 {
00057   epsilon = strain;
00058   return 0;
00059 }
00060 
00061 int
00062 ElasticIsotropicPlaneStress2D::setTrialStrain (const Vector &strain, const Vector &rate)
00063 {
00064   epsilon = strain;
00065   return 0;
00066 }
00067 
00068 int
00069 ElasticIsotropicPlaneStress2D::setTrialStrainIncr (const Vector &strain)
00070 {
00071   epsilon += strain;
00072   return 0;
00073 }
00074 
00075 int
00076 ElasticIsotropicPlaneStress2D::setTrialStrainIncr (const Vector &strain, const Vector &rate)
00077 {
00078   epsilon += strain;
00079   return 0;
00080 }
00081 
00082 const Matrix&
00083 ElasticIsotropicPlaneStress2D::getTangent (void)
00084 {
00085     double d00 = E/(1.0-v*v);
00086     double d01 = v*d00;
00087     double d22 = 0.5*(d00-d01);
00088 
00089     D(0,0) = D(1,1) = d00;
00090     D(1,0) = D(0,1) = d01;
00091     D(2,2) = d22;
00092 
00093     return D;
00094 }
00095 
00096 const Matrix&
00097 ElasticIsotropicPlaneStress2D::getInitialTangent (void)
00098 {
00099     double d00 = E/(1.0-v*v);
00100     double d01 = v*d00;
00101     double d22 = 0.5*(d00-d01);
00102 
00103     D(0,0) = D(1,1) = d00;
00104     D(1,0) = D(0,1) = d01;
00105     D(2,2) = d22;
00106 
00107     return D;
00108 }
00109 
00110 const Vector&
00111 ElasticIsotropicPlaneStress2D::getStress (void)
00112 {
00113     double d00 = E/(1.0-v*v);
00114     double d01 = v*d00;
00115     double d22 = 0.5*(d00-d01);
00116 
00117     double eps0 = epsilon(0);
00118     double eps1 = epsilon(1);
00119 
00120     //sigma = D*epsilon;
00121     sigma(0) = d00*eps0 + d01*eps1;
00122     sigma(1) = d01*eps0 + d00*eps1;
00123     sigma(2) = d22*epsilon(2);
00124         
00125     return sigma;
00126 }
00127 
00128 const Vector&
00129 ElasticIsotropicPlaneStress2D::getStrain (void)
00130 {
00131   return epsilon;
00132 }
00133 
00134 int
00135 ElasticIsotropicPlaneStress2D::commitState (void)
00136 {
00137   return 0;
00138 }
00139 
00140 int
00141 ElasticIsotropicPlaneStress2D::revertToLastCommit (void)
00142 {
00143   return 0;
00144 }
00145 
00146 int
00147 ElasticIsotropicPlaneStress2D::revertToStart (void)
00148 {
00149   epsilon.Zero();
00150   return 0;
00151 }
00152 
00153 NDMaterial*
00154 ElasticIsotropicPlaneStress2D::getCopy (void)
00155 {
00156         ElasticIsotropicPlaneStress2D *theCopy =
00157                 new ElasticIsotropicPlaneStress2D (this->getTag(), E, v, rho);
00158 
00159         theCopy->epsilon = epsilon;
00160 
00161         return theCopy;
00162 }
00163 
00164 const char*
00165 ElasticIsotropicPlaneStress2D::getType (void) const
00166 {
00167         return "PlaneStress";
00168 }
00169 
00170 int
00171 ElasticIsotropicPlaneStress2D::getOrder (void) const
00172 {
00173         return 3;
00174 }
00175 

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