Steel02.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.2 $
00022 // $Date: 2006/03/23 23:02:00 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/material/uniaxial/Steel02.cpp,v $
00024                                                                       
00025 // Written: fmk
00026 // Created: 03/06
00027 //
00028 // Description: This file contains the class implementation of Steel02. 
00029 // This Steel02 is based on an f2c of the FEDEAS material
00030 // Steel02.f which is:
00031 //-----------------------------------------------------------------------
00032 // MENEGOTTO-PINTO STEEL MODEL WITH FILIPPOU ISOTROPIC HARDENING
00033 //            written by MOHD YASSIN (1993)
00034 //          adapted to FEDEAS material library
00035 //    by E. Spacone, G. Monti and F.C. Filippou (1994)
00036 //-----------------------------------------------------------------------
00037 
00038 #include <stdlib.h>
00039 #include <Steel02.h>
00040 #include <OPS_Globals.h>
00041 #include <float.h>
00042 #include <Channel.h>
00043 
00044 Steel02::Steel02(int tag,
00045                  double _Fy, double _E0, double _b,
00046                  double _R0, double _cR1, double _cR2,
00047                  double _a1, double _a2, double _a3, double _a4):
00048   UniaxialMaterial(tag, MAT_TAG_Steel02),
00049   Fy(_Fy), E0(_E0), b(_b), R0(_R0), cR1(_cR1), cR2(_cR2), a1(_a1), a2(_a2), a3(_a3), a4(_a4)
00050 {
00051   konP = 0;
00052   kon = 0;
00053   eP = E0;
00054   epsP = 0.0;
00055   sigP = 0.0;
00056   sig = 0.0;
00057   eps = 0.0;
00058   e = E0;
00059 
00060   epsmaxP = Fy/E0;
00061   epsminP = -epsmaxP;
00062   epsplP = 0.0;
00063   epss0P = 0.0;
00064   sigs0P = 0.0;
00065   epssrP = 0.0;
00066   sigsrP = 0.0;
00067 }
00068 
00069 Steel02::Steel02(int tag,
00070                  double _Fy, double _E0, double _b,
00071                  double _R0, double _cR1, double _cR2):
00072   UniaxialMaterial(tag, MAT_TAG_Steel02),
00073   Fy(_Fy), E0(_E0), b(_b), R0(_R0), cR1(_cR1), cR2(_cR2)
00074 {
00075   konP = 0;
00076 
00077   // Default values for no isotropic hardening
00078   a1 = 0.0;
00079   a2 = 1.0;
00080   a3 = 0.0;
00081   a4 = 1.0;
00082 
00083   eP = E0;
00084   epsP = 0.0;
00085   sigP = 0.0;
00086   sig = 0.0;
00087   eps = 0.0;
00088   e = E0;
00089 
00090   epsmaxP = Fy/E0;
00091   epsminP = -epsmaxP;
00092   epsplP = 0.0;
00093   epss0P = 0.0;
00094   sigs0P = 0.0;
00095   epssrP = 0.0;
00096   sigsrP = 0.0;
00097 }
00098 
00099 Steel02::Steel02(int tag, double _Fy, double _E0, double _b):
00100   UniaxialMaterial(tag, MAT_TAG_Steel02),
00101   Fy(_Fy), E0(_E0), b(_b)
00102 {
00103   konP = 0;
00104 
00105   // Default values for elastic to hardening transitions
00106   R0 = 15.0;
00107   cR1 = 0.925;
00108   cR2 = 0.15;
00109 
00110   // Default values for no isotropic hardening
00111   a1 = 0.0;
00112   a2 = 1.0;
00113   a3 = 0.0;
00114   a4 = 1.0;
00115 
00116   eP = E0;
00117   epsP = 0.0;
00118   sigP = 0.0;
00119   sig = 0.0;
00120   eps = 0.0;
00121   e = E0;
00122 
00123   epsmaxP = Fy/E0;
00124   epsminP = -epsmaxP;
00125   epsplP = 0.0;
00126   epss0P = 0.0;
00127   sigs0P = 0.0;
00128   epssrP = 0.0;
00129   sigsrP = 0.0;
00130 }
00131 
00132 Steel02::Steel02(void):
00133   UniaxialMaterial(0, MAT_TAG_Steel02)
00134 {
00135   konP = 0;
00136 }
00137 
00138 Steel02::~Steel02(void)
00139 {
00140   // Does nothing
00141 }
00142 
00143 UniaxialMaterial*
00144 Steel02::getCopy(void)
00145 {
00146   Steel02 *theCopy = new Steel02(this->getTag(), Fy, E0, b, R0, cR1, cR2, a1, a2, a3, a4);
00147   
00148   return theCopy;
00149 }
00150 
00151 double
00152 Steel02::getInitialTangent(void)
00153 {
00154   return E0;
00155 }
00156 
00157 int
00158 Steel02::setTrialStrain(double trialStrain, double strainRate)
00159 {
00160   double Esh = b * E0;
00161   double epsy = Fy / E0;
00162 
00163   eps = trialStrain;
00164   double deps = eps - epsP;
00165 
00166 
00167 
00168   epsmax = epsmaxP;
00169   epsmin = epsminP;
00170   epspl  = epsplP;
00171   epss0  = epss0P;  
00172   sigs0  = sigs0P; 
00173   epsr   = epssrP;  
00174   sigr   = sigsrP;  
00175   kon = konP;
00176 
00177   if (kon == 0) {
00178 
00179     if (fabs(deps) < 10.0*DBL_EPSILON) {
00180 
00181       e = E0;
00182       sig = 0.;
00183       return 0;
00184 
00185     } else {
00186 
00187       epsmax = epsy;
00188       epsmin = -epsy;
00189       if (deps < 0.0) {
00190         kon = 2;
00191         epss0 = epsmin;
00192         sigs0 = -Fy;
00193         epspl = epsmin;
00194       } else {
00195         kon = 1;
00196         epss0 = epsmax;
00197         sigs0 = Fy;
00198         epspl = epsmax;
00199       }
00200     }
00201   }
00202   
00203   // in case of load reversal from negative to positive strain increment, 
00204   // update the minimum previous strain, store the last load reversal 
00205   // point and calculate the stress and strain (sigs0 and epss0) at the 
00206   // new intersection between elastic and strain hardening asymptote 
00207   // To include isotropic strain hardening shift the strain hardening 
00208   // asymptote by sigsft before calculating the intersection point 
00209   // Constants a3 and a4 control this stress shift on the tension side 
00210   
00211   if (kon == 2 && deps > 0.0) {
00212 
00213 
00214     kon = 1;
00215     epsr = epsP;
00216     sigr = sigP;
00217     //epsmin = min(epsP, epsmin);
00218     if (epsP < epsmin)
00219       epsmin = epsP;
00220     double d1 = (epsmax - epsmin) / (2.0*(a4 * epsy));
00221     double shft = 1.0 + a3 * pow(d1, 0.8);
00222     epss0 = (Fy * shft - Esh * epsy * shft - sigr + E0 * epsr) / (E0 - Esh);
00223     sigs0 = Fy * shft + Esh * (epss0 - epsy * shft);
00224     epspl = epsmax;
00225   } else {
00226     
00227     // in case of load reversal from positive to negative strain increment 
00228     // update the maximum previous strain, store the last load reversal 
00229     // point and calculate the stress and strain (sigs0 and epss0) at the 
00230     // new intersection between elastic and strain hardening asymptote 
00231     // To include isotropic strain hardening shift the strain hardening 
00232     // asymptote by sigsft before calculating the intersection point 
00233     // Constants a1 and a2 control this stress shift on compression side 
00234     
00235     if (kon == 1 && deps < 0.0) {
00236 
00237       kon = 2;
00238       epsr = epsP;
00239       sigr = sigP;
00240       //      epsmax = max(epsP, epsmax);
00241       if (epsP > epsmax)
00242         epsmax = epsP;
00243 
00244       double d1 = (epsmax - epsmin) / (2.0*(a2 * epsy));
00245       double shft = 1.0 + a1 * pow(d1, 0.8);
00246       epss0 = (-Fy * shft + Esh * epsy * shft - sigr + E0 * epsr) / (E0 - Esh);
00247       sigs0 = -Fy * shft + Esh * (epss0 + epsy * shft);
00248       epspl = epsmin;
00249     }
00250   }
00251   
00252   // calculate current stress sig and tangent modulus E 
00253 
00254   double xi     = fabs((epspl-epss0)/epsy);
00255   double R      = R0*(1.0 - (cR1*xi)/(cR2+xi));
00256   double epsrat = (eps-epsr)/(epss0-epsr);
00257   double dum1  = 1.0 + pow(fabs(epsrat),R);
00258   double dum2  = pow(dum1,(1/R));
00259 
00260   sig   = b*epsrat +(1.0-b)*epsrat/dum2;
00261   sig   = sig*(sigs0-sigr)+sigr;
00262 
00263   e = b + (1.0-b)/(dum1*dum2);
00264   e = e*(sigs0-sigr)/(epss0-epsr);
00265 
00266   return 0;
00267 }
00268 
00269 
00270 
00271 double 
00272 Steel02::getStrain(void)
00273 {
00274   return eps;
00275 }
00276 
00277 double 
00278 Steel02::getStress(void)
00279 {
00280   return sig;
00281 }
00282 
00283 double 
00284 Steel02::getTangent(void)
00285 {
00286   return e;
00287 }
00288 
00289 int 
00290 Steel02::commitState(void)
00291 {
00292   epsminP = epsmin;
00293   epsmaxP = epsmax;
00294   epsplP = epspl;
00295   epss0P = epss0;
00296   sigs0P = sigs0;
00297   epssrP = epsr;
00298   sigsrP = sigr;
00299   konP = kon;
00300   
00301   eP = e;
00302   sigP = sig;
00303   epsP = eps;
00304 
00305   return 0;
00306 }
00307 
00308 int 
00309 Steel02::revertToLastCommit(void)
00310 {
00311   epsmin = epsminP;
00312   epsmax = epsmaxP;
00313   epspl = epsplP;
00314   epss0 = epss0P;
00315   sigs0 = sigs0P;
00316   epsr = epssrP;
00317   sigr = sigsrP;
00318   kon = konP;
00319   
00320   e = eP;
00321   sig = sigP;
00322   eps = epsP;
00323   return 0;
00324 }
00325 
00326 int 
00327 Steel02::revertToStart(void)
00328 {
00329   eP = E0;
00330   epsP = 0.0;
00331   sigP = 0.0;
00332   sig = 0.0;
00333   eps = 0.0;
00334   e = E0;  
00335 
00336   konP = 0;
00337   epsmaxP = Fy/E0;
00338   epsminP = -epsmaxP;
00339   epsplP = 0.0;
00340   epss0P = 0.0;
00341   sigs0P = 0.0;
00342   epssrP = 0.0;
00343   sigsrP = 0.0;
00344 
00345   return 0;
00346 }
00347 
00348 int 
00349 Steel02::sendSelf(int commitTag, Channel &theChannel)
00350 {
00351   static Vector data(22);
00352   data(0) = Fy;
00353   data(1) = E0;
00354   data(2) = b;
00355   data(3) = R0;
00356   data(4) = cR1;
00357   data(5) = cR2;
00358   data(6) = a1;
00359   data(7) = a2;
00360   data(8) = a3;
00361   data(9) = a4;
00362   data(10) = epsminP;
00363   data(11) = epsmaxP;
00364   data(12) = epsplP;
00365   data(13) = epss0P;
00366   data(14) = sigs0P;
00367   data(15) = epssrP;
00368   data(16) = sigsrP;
00369   data(17) = konP;  
00370   data(18) = epsP;  
00371   data(19) = sigP;  
00372   data(20) = eP;    
00373   data(21) = this->getTag();
00374 
00375   if (theChannel.sendVector(this->getDbTag(), commitTag, data) < 0) {
00376     opserr << "Steel02::sendSelf() - failed to sendSelf\n";
00377     return -1;
00378   }
00379   return 0;
00380 }
00381 
00382 int 
00383 Steel02::recvSelf(int commitTag, Channel &theChannel, 
00384              FEM_ObjectBroker &theBroker)
00385 {
00386 
00387   static Vector data(22);
00388 
00389   if (theChannel.sendVector(this->getDbTag(), commitTag, data) < 0) {
00390     opserr << "Steel02::recvSelf() - failed to recvSelf\n";
00391     return -1;
00392   }
00393 
00394   Fy = data(0);
00395   E0 = data(1);
00396   b = data(2); 
00397   R0 = data(3);
00398   cR1 = data(4);
00399   cR2 = data(5);
00400   a1 = data(6); 
00401   a2 = data(7); 
00402   a3 = data(8); 
00403   a4 = data(9); 
00404   epsminP = data(10);
00405   epsmaxP = data(11);
00406   epsplP = data(12); 
00407   epss0P = data(13); 
00408   sigs0P = data(14); 
00409   epssrP = data(15); 
00410   sigsrP = data(16); 
00411   konP = data(17);   
00412   epsP = data(18);   
00413   sigP = data(19);   
00414   eP   = data(20);   
00415   this->setTag(data(21));
00416 
00417   e = eP;
00418   sig = sigP;
00419   eps = epsP;
00420   
00421   return 0;
00422 }
00423 
00424 void 
00425 Steel02::Print(OPS_Stream &s, int flag)
00426 {
00427   s << "Steel02:(strain, stress, tangent) " << eps << " " << sig << " " << e << endln;
00428 }

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