ElasticCrossAnisotropic.cpp

Go to the documentation of this file.
00001 //===============================================================================
00002 //# COPYRIGHT (C): Woody's license (by BJ):
00003 //                 ``This    source  code is Copyrighted in
00004 //                 U.S.,  for  an  indefinite  period,  and anybody
00005 //                 caught  using it without our permission, will be
00006 //                 mighty good friends of ourn, cause we don't give
00007 //                 a  darn.  Hack it. Compile it. Debug it. Run it.
00008 //                 Yodel  it.  Enjoy it. We wrote it, that's all we
00009 //                 wanted to do.''
00010 //
00011 //# PROJECT:           Object Oriented Finite Element Program
00012 //# PURPOSE:           Elastic Cross Anisotropic Material implementation:
00013 //# CLASS:             ElasticIsotropic3D
00014 //#
00015 //# VERSION:           0.61803398874989 (golden section)
00016 //# LANGUAGE:          C++
00017 //# TARGET OS:         all...
00018 //# DESIGN:            Zhaohui Yang, Boris Jeremic (jeremic@ucdavis.edu)
00019 //# PROGRAMMER(S):     Zhaohui Yang, Yi Bian, Boris Jeremic
00020 //#
00021 //#
00022 //# DATE:              10Oct2002 Yi Bian
00023 //# UPDATE HISTORY:    March 20, 2003 Revised by Joey Yang & Boris Jeremic, UC Davis
00024 //#                    Aug2006   Z.Cheng
00025 //#
00026 //===============================================================================
00027 //
00028 
00029 
00030 #include <ElasticCrossAnisotropic.h>
00031 
00032 Tensor ElasticCrossAnisotropic::Dt(4, def_dim_4, 0.0 );
00033 stresstensor ElasticCrossAnisotropic::Stress;
00034 
00035 
00037 ElasticCrossAnisotropic::ElasticCrossAnisotropic(int tag, 
00038                                                  double Ehp, 
00039                                                  double Evp, 
00040                                                  double nuhvp, 
00041                                                  double nuhhp, 
00042                                                  double Ghvp, 
00043                                                  double rhop):
00044 NDMaterial(tag, ND_TAG_ElasticCrossAnisotropic3D),
00045 Eh(Ehp), 
00046 Ev(Evp), 
00047 nuhv(nuhvp),
00048 nuhh(nuhhp),
00049 Ghv(Ghvp),
00050 rho(rhop)
00051 {
00052 
00053 }
00054 
00056 ElasticCrossAnisotropic::ElasticCrossAnisotropic()
00057 {
00058 
00059 }
00060 
00062 ElasticCrossAnisotropic::~ElasticCrossAnisotropic ()
00063 {
00064 
00065 }
00066 
00068 double ElasticCrossAnisotropic::getrho()
00069 {
00070         return rho;
00071 }
00072 
00074 double  ElasticCrossAnisotropic::getMatParameter(int MatParameterID)
00075 {
00076         switch (MatParameterID) {
00077             case (1):
00078                     return Eh;
00079             case (2):
00080                     return Ev;
00081             case (3):
00082                     return nuhv;
00083             case (4):
00084                     return nuhh;
00085             case (5):
00086                 return Ghv;
00087             case (6):
00088                     return rho;
00089             default: {
00090                     opserr << "Warning! ElasticIsotropic3D:: incorrect Materal parameter ID" << "\n";
00091                     return 0.0;
00092         }
00093     }
00094 }
00095 
00097 NDMaterial* ElasticCrossAnisotropic::getCopy (const char *type)
00098 {
00099     if (strcmp(type,"ThreeDimensional") == 0) {
00100                 ElasticCrossAnisotropic *theModel;
00101                 theModel = new ElasticCrossAnisotropic (this->getTag(), Eh, Ev, nuhv, nuhh, Ghv, rho);
00102                 return theModel;
00103     }
00104 
00105     else {
00106                 opserr <<"ElasticCrossAnisotropic::getModel failed to get model " << type << "\n";
00107                 return 0;
00108     }
00109 }
00110 
00111 int
00112 ElasticCrossAnisotropic::setTrialStrain (const Tensor &v)
00113 {
00114     Strain = v;
00115     return 0;
00116 }
00117 
00118 int
00119 ElasticCrossAnisotropic::setTrialStrain (const Tensor &v, const Tensor &r)
00120 {
00121     Strain = v;
00122     return 0;
00123 }
00124 
00125 int
00126 ElasticCrossAnisotropic::setTrialStrainIncr (const Tensor &v)
00127 {
00128     Strain += v;
00129     return 0;
00130 }
00131 
00132 int
00133 ElasticCrossAnisotropic::setTrialStrainIncr (const Tensor &v, const Tensor &r)
00134 {
00135     Strain += v;
00136     return 0;
00137 }
00138 
00139 const Tensor&
00140 ElasticCrossAnisotropic::getTangentTensor (void)
00141 {
00142    //Old codes from Yi Bian
00143    //double A = 1/((1 + nuhv) * (1 - 2 * nuhv));
00144    //D(0, 0) = A * (1 - nuhv) * Ev;
00145    //D(1, 1) = D(2, 2) = A * (1 - nuhv) * Eh;
00146    //D(0, 1) = D(0, 2) = D(1, 0) = D(2, 0) = A * Eh * nuhh;
00147    //D(3, 3) = Eh/(1 + nuhv);
00148    //D(4, 4) = D(5, 5) = 2 * Ghv;
00149 
00150    //  Compliance matrix C Refer to Thor C. Heimdahl and Andrew Drescher
00151    //  "Elastic Anisotropy of Tire Shreds", {ASCE} Journal of Geotechnical
00152    //  and Geoenvironmental Engineering, 1999, pp. 383-389
00153    //  |Sxx|    | 1/Eh     -nuhh/Eh -nuhv/Ev     0       0     0    |
00154    //  |Syy|    |-nuhh/Eh    1/Eh   -nuhv/Ev     0       0     0    |
00155    //  |Szz|    |-nuhv/Ev  -nuhv/Ev   1/Ev       0       0     0    |
00156    //  |Sxy| C= |   0         0       0  2(1+nuhh)/Eh     0     0    |
00157    //  |Sxz|    |   0         0       0         0     1/(Ghv)   0    |
00158    //  |Syz|    |   0         0       0         0         0   1/(Ghv)|
00159    
00160    // Form compliance matrix D
00161    Matrix D(6,6);
00162    double A = 1.0/Eh;
00163    double B = 1.0/Ev;
00164    D(0,0) = D(1,1) = A;
00165    D(2,2) = B;
00166    D(0,1) = D(1,0) = -nuhh*A;
00167    D(0,2) = D(2,0) = D(1,2) = D(2,1) = -nuhv*B;
00168    D(3,3) = 2*(1.0+nuhh)*A;
00169    D(4,4) = D(5,5) = 1.0/Ghv;
00170 
00171    D.Invert( D );
00172 
00173    Dt.val(1,1,1,1) = D(0,0); 
00174    Dt.val(1,1,2,2) = D(0,1); 
00175    Dt.val(1,1,3,3) = D(0,2); // --> Sigma_xx
00176 
00177    Dt.val(1,2,1,2) = D(3,3); 
00178    Dt.val(1,2,2,1) = D(3,3); // --> Sigma_xy
00179 
00180    Dt.val(1,3,1,3) = D(4,4); 
00181    Dt.val(1,3,3,1) = D(4,4); // --> Sigma_xz
00182 
00183    Dt.val(2,1,1,2) = D(3,3); 
00184    Dt.val(2,1,2,1) = D(3,3); // --> Sigma_yx
00185 
00186    Dt.val(2,2,1,1) = D(1,0); 
00187    Dt.val(2,2,2,2) = D(1,1); 
00188    Dt.val(2,2,3,3) = D(1,2); // --> Sigma_yy
00189 
00190    Dt.val(2,3,2,3) = D(5,5); 
00191    Dt.val(2,3,3,2) = D(5,5); // --> Sigma_yz
00192 
00193    Dt.val(3,1,1,3) = D(4,4); 
00194    Dt.val(3,1,3,1) = D(4,4); // --> Sigma_zx
00195 
00196    Dt.val(3,2,2,3) = D(5,5); 
00197    Dt.val(3,2,3,2) = D(5,5); // --> Sigma_zy
00198 
00199    Dt.val(3,3,1,1) = D(2,0); 
00200    Dt.val(3,3,2,2) = D(2,1); 
00201    Dt.val(3,3,3,3) = D(2,2); // --> Sigma_zz
00202    
00203    return Dt;
00204 }
00205 
00206 const stresstensor& ElasticCrossAnisotropic::getStressTensor (void)
00207 {
00208     Tensor Dt0 = getTangentTensor();
00209     Stress = Dt0("ijkl") * Strain("kl");
00210     
00211     return Stress;
00212 }
00213 
00214 const straintensor& ElasticCrossAnisotropic::getStrainTensor (void)
00215 {
00216         return Strain;
00217 }
00218 
00219 int
00220 ElasticCrossAnisotropic::commitState (void)
00221 {
00222         return 0;
00223 }
00224 
00225 int
00226 ElasticCrossAnisotropic::revertToLastCommit (void)
00227 {
00228         return 0;
00229 }
00230 
00231 int
00232 ElasticCrossAnisotropic::revertToStart (void)
00233 {
00234         Strain = Strain*0.0;
00235         return 0;
00236 }
00237 
00238 NDMaterial*
00239 ElasticCrossAnisotropic::getCopy (void)
00240 {
00241         ElasticCrossAnisotropic *theCopy =
00242           new ElasticCrossAnisotropic (this->getTag(), Eh, Ev, nuhv, nuhh, Ghv, rho);
00243         
00244     return theCopy;
00245 }
00246 
00247 const char*
00248 ElasticCrossAnisotropic::getType (void) const
00249 {
00250         return "ThreeDimensional";
00251 }
00252 
00253 int
00254 ElasticCrossAnisotropic::sendSelf(int commitTag, Channel &theChannel)
00255 {
00256         // Need work here.
00257         return 0;
00258 }
00259 
00260 int
00261 ElasticCrossAnisotropic::recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker)
00262 {
00263         // Need work here.
00264         return 0;
00265 }
00266 
00267 void
00268 ElasticCrossAnisotropic::Print (OPS_Stream &s, int flag)
00269 {
00270         s << "Elastic Cross-Anisotropic Material Model\n";
00271         s << "\tEh:  " << Eh << "\tEv:  " << Ev << "\n";
00272         s << "\tnuhv:  " << nuhv << "\tnuhh:  " << nuhh << "\n";
00273         s << "\tGhv:  " << Ghv << "\trho:  " << rho << "\n";
00274         
00275         return;
00276 }
00277 

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