Steel03.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.4 $
00022 // $Date: 2006/05/24 21:44:31 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/material/uniaxial/Steel03.cpp,v $
00024                                                                         
00025 // Written: mackie
00026 // Created: 06/2005
00027 // Revision: A
00028 //
00029 // Description: This file contains the class implementation for 
00030 // Steel03. Steel03 is Steel01 verbatim but with added Giuffre-Menegotto-Pinto 
00031 // transitions on the loading and unloading loops.  
00032 // references:
00033 // 1.)  Menegotto, M., and Pinto, P.E. (1973). Method of analysis of cyclically loaded 
00034 //      RC plane frames including changes in geometry and non-elastic behavior of 
00035 //      elements under normal force and bending. Preliminary Report IABSE, vol 13. 
00036 // 2.)  Dhakal, R.J., and Maekawa, K. (2002). Path-dependent cyclic stress-strain relationship
00037 //      of reinforcing bar including buckling. Engineering Structures, 24(11): 1383-96.
00038 // 3.)  Gomes, A., and Appleton, J. (1997). Nonlinear cyclic stress-strain relationship of 
00039 //      reinforcing bars including buckling. Engineering Structures, 19(10): 822-6.
00040 //
00041 // What: "@(#) Steel03.C, revA"
00042 
00043 
00044 #include <Steel03.h>
00045 #include <Vector.h>
00046 #include <Matrix.h>
00047 #include <Channel.h>
00048 #include <Information.h>
00049 #include <math.h>
00050 #include <float.h>
00051 
00052 //uniaxialMaterial Steel02 $matTag $Fy $E $b $R0 $cR1 $cR2 $a1 $a2 $a3 $a4
00053 
00054 Steel03::Steel03
00055 (int tag, double FY, double E, double B, double R, double R1, double R2, 
00056  double A1, double A2, double A3, double A4):
00057    UniaxialMaterial(tag,MAT_TAG_Steel03),
00058    fy(FY), E0(E), b(B), r(R), cR1(R1), cR2(R2), a1(A1), a2(A2), a3(A3), a4(A4)
00059 {
00060    // Sets all history and state variables to initial values
00061    // History variables
00062    CminStrain = 0.0;
00063    CmaxStrain = 0.0;
00064    CshiftP = 1.0;
00065    CshiftN = 1.0;
00066    Cloading = 0;
00067    CbStrain = 0.0;
00068    CbStress = 0.0;
00069    CrStrain = 0.0;
00070    CrStress = 0.0;
00071    Cplastic = 0.0;
00072 
00073    TminStrain = 0.0;
00074    TmaxStrain = 0.0;
00075    TshiftP = 1.0;
00076    TshiftN = 1.0;
00077    Tloading = 0;
00078    TbStrain = 0.0;
00079    TbStress = 0.0;
00080    TrStrain = 0.0;
00081    TrStress = 0.0;
00082    Tplastic = 0.0;
00083 
00084    // State variables
00085    Cstrain = 0.0;
00086    Cstress = 0.0;
00087    Ctangent = E0;
00088    CcurR = getR(0);
00089 
00090    Tstrain = 0.0;
00091    Tstress = 0.0;
00092    Ttangent = E0;
00093    TcurR = getR(0);
00094 }
00095 
00096 Steel03::Steel03():UniaxialMaterial(0,MAT_TAG_Steel03),
00097  fy(0.0), E0(0.0), b(0.0), r(0.0), cR1(0.0), cR2(0.0), a1(0.0), a2(0.0), a3(0.0), a4(0.0)
00098 {
00099 
00100 }
00101 
00102 Steel03::~Steel03 ()
00103 {
00104 
00105 }
00106 
00107 int Steel03::setTrialStrain (double strain, double strainRate)
00108 {
00109    // Reset history variables to last converged state
00110    TminStrain = CminStrain;
00111    TmaxStrain = CmaxStrain;
00112    TshiftP = CshiftP;
00113    TshiftN = CshiftN;
00114    Tloading = Cloading;
00115    TbStrain = CbStrain;
00116    TbStress = CbStress;
00117    TrStrain = CrStrain;
00118    TrStress = CrStress;
00119    Tplastic = Cplastic;
00120    TcurR = CcurR;
00121 
00122    // Determine change in strain from last converged state
00123    double dStrain = strain - Cstrain;
00124 
00125    if (fabs(dStrain) > DBL_EPSILON) {
00126      // Set trial strain
00127      Tstrain = strain;
00128 
00129      // Calculate the trial state given the trial strain
00130      determineTrialState (dStrain);
00131    }
00132 
00133    return 0;
00134 }
00135 
00136 int Steel03::setTrial (double strain, double &stress, double &tangent, double strainRate)
00137 {
00138    // Reset history variables to last converged state
00139    TminStrain = CminStrain;
00140    TmaxStrain = CmaxStrain;
00141    TshiftP = CshiftP;
00142    TshiftN = CshiftN;
00143    Tloading = Cloading;
00144    TbStrain = CbStrain;
00145    TbStress = CbStress;
00146    TrStrain = CrStrain;
00147    TrStress = CrStress;
00148    Tplastic = Cplastic;
00149    TcurR = CcurR;
00150 
00151    // Determine change in strain from last converged state
00152    double dStrain = strain - Cstrain;
00153 
00154    if (fabs(dStrain) > DBL_EPSILON) {
00155      // Set trial strain
00156      Tstrain = strain;
00157 
00158      // Calculate the trial state given the trial strain
00159      determineTrialState (dStrain);
00160    }
00161 
00162    stress = Tstress;
00163    tangent = Ttangent;
00164 
00165    return 0;
00166 }
00167 
00168 double Steel03::getR (double x_in)
00169 {
00170     // maybe modify this later, but it gives us better degradation at smaller strains
00171     x_in = fabs(x_in);
00172     double temp_r = r;
00173     
00174     // new input parameters are supposed to match Steel02 which look like 
00175     // Dhakal and Maekawa values: cr1 = 0.925, cr2 = 0.15
00176     // where 0.925 comes from 18.5/20.0 where R0=20 and 18.5 is the old coefficient provided
00177     //
00178     // so for old Dhakal and Maekawa R0 = 20, cr1 = 18.5/R0 = 0.925, cr2 = 0.15
00179     // so for old Gomes and Appleton R0 = 20, cr1 = 19.0/R0 = 0.95, cR2 = 0.3
00180     // so for my old model, now just use R0 = 20, cR1 = 0, cR2 = 0
00181     if (cR1 < 0.1 && cR2 < 0.1) {
00182         // Mackie, rough trilinear fit to the tangent to the x_in-r first 
00183         // quadrant circle.  Try using with values of R0 like 20 to 30
00184         temp_r = r*2.0/20.0;
00185         double t1 = -x_in/7+15/7*temp_r;
00186         double t2 = -4*x_in+6*temp_r;
00187         if (t1 > temp_r)
00188             temp_r = t1;
00189         if (t2 > temp_r)
00190             temp_r = t2;
00191         //opserr << "xin = " << x_in << " rout = " << temp_r << endln;
00192     } else {
00193         temp_r = r * (1.0 - cR1*x_in/(cR2+x_in));
00194         if (temp_r < 0)
00195             temp_r = 1.0e-8;
00196     }
00197     
00198     return temp_r;
00199 }
00200 
00201 void Steel03::determineTrialState (double dStrain)
00202 {
00203       double fyOneMinusB = fy * (1.0 - b);
00204 
00205       double Esh = b*E0;
00206       double epsy = fy/E0;
00207       
00208       double c1 = Esh*Tstrain;
00209       double c2 = TshiftN*fyOneMinusB;
00210       double c3 = TshiftP*fyOneMinusB;
00211       double c = Cstress + E0*dStrain;
00212       
00213       //
00214       // Determine if a load reversal has occurred due to the trial strain
00215       //
00216 
00217       // Determine initial loading condition
00218       if (Tloading == 0 && dStrain != 0.0) {
00219           TmaxStrain = epsy;
00220           TminStrain = -epsy;
00221           if (dStrain > 0.0) {
00222             Tloading = 1;
00223             TbStrain = TmaxStrain;
00224             TbStress = fy;
00225             Tplastic = TmaxStrain;
00226           }
00227           else {
00228             Tloading = -1;
00229             TbStrain = TminStrain;
00230             TbStress = -fy;
00231             Tplastic = TminStrain;
00232           }
00233 
00234           double intval = 1+pow(fabs(Tstrain/epsy),TcurR);
00235           Tstress = c1+(1-b)*E0*Tstrain/pow(intval,1/TcurR);
00236           Ttangent = Esh+E0*(1-b)/pow(intval,1+1/TcurR);
00237       }
00238           
00239       // Transition from loading to unloading, i.e. positive strain increment
00240       // to negative strain increment
00241       if (Tloading == 1 && dStrain < 0.0) {
00242           Tloading = -1;
00243           if (Cstrain > TmaxStrain)
00244             TmaxStrain = Cstrain;
00245           Tplastic = TminStrain;
00246           TshiftN = 1 + a1*pow((TmaxStrain-TminStrain)/(2.0*a2*epsy),0.8);
00247           TrStrain = Cstrain;
00248           TrStress = Cstress;
00249           TbStrain = (c2+c)/E0/(b-1)+Tstrain/(1-b);
00250           TbStress = 1/(b-1)*(b*c2+b*c-c1)-c2;
00251           TcurR = getR((TbStrain-TminStrain)/epsy);
00252       }
00253 
00254       // Transition from unloading to loading, i.e. negative strain increment
00255       // to positive strain increment
00256       if (Tloading == -1 && dStrain > 0.0) {
00257           Tloading = 1;
00258           if (Cstrain < TminStrain)
00259             TminStrain = Cstrain;
00260           Tplastic = TmaxStrain;
00261           TshiftP = 1 + a3*pow((TmaxStrain-TminStrain)/(2.0*a4*epsy),0.8);
00262           TrStrain = Cstrain;
00263           TrStress = Cstress;
00264           TbStrain = (c3-c)/E0/(1-b)+Tstrain/(1-b);
00265           TbStress = 1/(1-b)*(b*c3-b*c+c1)+c3;
00266           TcurR = getR((TmaxStrain-TbStrain)/epsy);
00267       }
00268       
00269       if (Cloading != 0) {
00270           double c4 = TbStrain - TrStrain;
00271           double c5 = TbStress - TrStress;
00272           double c6 = Tstrain - TrStrain;
00273           double c4c5 = c5/c4;
00274           double intval = 1+pow(fabs(c6/c4),TcurR);
00275           
00276           Tstress = TrStress+b*c4c5*c6+(1-b)*c4c5*c6/pow(intval,1/TcurR);
00277           Ttangent = c4c5*b+c4c5*(1-b)/pow(intval,1+1/TcurR);
00278       }
00279 }
00280 
00281 double Steel03::getStrain ()
00282 {
00283    return Tstrain;
00284 }
00285 
00286 double Steel03::getStress ()
00287 {
00288    return Tstress;
00289 }
00290 
00291 double Steel03::getTangent ()
00292 {
00293    return Ttangent;
00294 }
00295 
00296 int Steel03::commitState ()
00297 {
00298    // History variables
00299    CminStrain = TminStrain;
00300    CmaxStrain = TmaxStrain;
00301    CshiftP = TshiftP;
00302    CshiftN = TshiftN;
00303    Cloading = Tloading;
00304    CbStrain = TbStrain;
00305    CbStress = TbStress;
00306    CrStrain = TrStrain;
00307    CrStress = TrStress;
00308    Cplastic = Tplastic;
00309    CcurR = TcurR;
00310 
00311    // State variables
00312    Cstrain = Tstrain;
00313    Cstress = Tstress;
00314    Ctangent = Ttangent;
00315 
00316    return 0;
00317 }
00318 
00319 int Steel03::revertToLastCommit ()
00320 {
00321    // Reset trial history variables to last committed state
00322    TminStrain = CminStrain;
00323    TmaxStrain = CmaxStrain;
00324    TshiftP = CshiftP;
00325    TshiftN = CshiftN;
00326    Tloading = Cloading;
00327    TbStrain = CbStrain;
00328    TbStress = CbStress;
00329    TrStrain = CrStrain;
00330    TrStress = CrStress;
00331    Tplastic = Cplastic;
00332 
00333    // Reset trial state variables to last committed state
00334    Tstrain = Cstrain;
00335    Tstress = Cstress;
00336    Ttangent = Ctangent;
00337    TcurR = CcurR;
00338 
00339    return 0;
00340 }
00341 
00342 int Steel03::revertToStart ()
00343 {
00344    // History variables
00345    CminStrain = 0.0;
00346    CmaxStrain = 0.0;
00347    CshiftP = 1.0;
00348    CshiftN = 1.0;
00349    Cloading = 0;
00350    CbStrain = 0.0;
00351    CbStress = 0.0;
00352    CrStrain = 0.0;
00353    CrStress = 0.0;
00354    Cplastic = 0.0;
00355 
00356    TminStrain = 0.0;
00357    TmaxStrain = 0.0;
00358    TshiftP = 1.0;
00359    TshiftN = 1.0;
00360    Tloading = 0;
00361    TbStrain = 0.0;
00362    TbStress = 0.0;
00363    TrStrain = 0.0;
00364    TrStress = 0.0;
00365    Tplastic = 0.0;
00366 
00367    // State variables
00368    Cstrain = 0.0;
00369    Cstress = 0.0;
00370    Ctangent = E0;
00371    CcurR = getR(0);
00372 
00373    Tstrain = 0.0;
00374    Tstress = 0.0;
00375    Ttangent = E0;
00376    TcurR = getR(0);
00377 
00378    return 0;
00379 }
00380 
00381 UniaxialMaterial* Steel03::getCopy ()
00382 {
00383    Steel03* theCopy = new Steel03(this->getTag(), fy, E0, b, r, cR1, cR2, 
00384                                   a1, a2, a3, a4);
00385 
00386    // Converged history variables
00387    theCopy->CminStrain = CminStrain;
00388    theCopy->CmaxStrain = CmaxStrain;
00389    theCopy->CshiftP = CshiftP;
00390    theCopy->CshiftN = CshiftN;
00391    theCopy->Cloading = Cloading;
00392    theCopy->CbStrain = CbStrain;
00393    theCopy->CbStress = CbStress;
00394    theCopy->CrStrain = CrStrain;
00395    theCopy->CrStress = CrStress;
00396    theCopy->Cplastic = Cplastic;
00397 
00398    // Trial history variables
00399    theCopy->TminStrain = TminStrain;
00400    theCopy->TmaxStrain = TmaxStrain;
00401    theCopy->TshiftP = TshiftP;
00402    theCopy->TshiftN = TshiftN;
00403    theCopy->Tloading = Tloading;
00404    theCopy->TbStrain = TbStrain;
00405    theCopy->TbStress = TbStress;
00406    theCopy->TrStrain = TrStrain;
00407    theCopy->TrStress = TrStress;
00408    theCopy->Tplastic = Tplastic;
00409 
00410    // Converged state variables
00411    theCopy->Cstrain = Cstrain;
00412    theCopy->Cstress = Cstress;
00413    theCopy->Ctangent = Ctangent;
00414    theCopy->CcurR = CcurR;
00415 
00416    // Trial state variables
00417    theCopy->Tstrain = Tstrain;
00418    theCopy->Tstress = Tstress;
00419    theCopy->Ttangent = Ttangent;
00420    theCopy->TcurR = TcurR;
00421 
00422    return theCopy;
00423 }
00424 
00425 int Steel03::sendSelf (int commitTag, Channel& theChannel)
00426 {
00427    int res = 0;
00428    static Vector data(25);
00429    data(0) = this->getTag();
00430 
00431    // Material properties
00432    data(1) = fy;
00433    data(2) = E0;
00434    data(3) = b;
00435    data(4) = r;
00436    data(5) = cR1;
00437    data(6) = cR2;
00438    data(7) = a1;
00439    data(8) = a2;
00440    data(9) = a3;
00441    data(10) = a4;
00442 
00443    // History variables from last converged state
00444    data(11) = CminStrain;
00445    data(12) = CmaxStrain;
00446    data(13) = CshiftP;
00447    data(14) = CshiftN;
00448    data(15) = Cloading;
00449    data(16) = CbStrain;
00450    data(17) = CbStress;
00451    data(18) = CrStrain;
00452    data(19) = CrStress;
00453    data(20) = Cplastic;
00454 
00455    // State variables from last converged state
00456    data(21) = Cstrain;
00457    data(22) = Cstress;
00458    data(23) = Ctangent;
00459    data(24) = CcurR;
00460 
00461    // Data is only sent after convergence, so no trial variables
00462    // need to be sent through data vector
00463 
00464    res = theChannel.sendVector(this->getDbTag(), commitTag, data);
00465    if (res < 0) 
00466       opserr << "Steel03::sendSelf() - failed to send data\n";
00467 
00468    return res;
00469 }
00470 
00471 int Steel03::recvSelf (int commitTag, Channel& theChannel,
00472                                 FEM_ObjectBroker& theBroker)
00473 {
00474    int res = 0;
00475    static Vector data(25);
00476    res = theChannel.recvVector(this->getDbTag(), commitTag, data);
00477   
00478    if (res < 0) {
00479       opserr << "Steel03::recvSelf() - failed to receive data\n";
00480       this->setTag(0);      
00481    }
00482    else {
00483       this->setTag(int(data(0)));
00484 
00485       // Material properties
00486       fy = data(1);
00487       E0 = data(2);
00488       b = data(3);
00489       r = data(4);
00490       cR1 = data(5);
00491       cR2 = data(6);
00492       a1 = data(7);
00493       a2 = data(8);
00494       a3 = data(9);
00495       a4 = data(10);
00496 
00497       // History variables from last converged state
00498       CminStrain = data(11);
00499       CmaxStrain = data(12);
00500       CshiftP = data(13);
00501       CshiftN = data(14);
00502       Cloading = int(data(15));
00503       CbStrain = data(16);
00504       CbStress = data(17);
00505       CrStrain = data(18);
00506       CrStress = data(19);
00507       Cplastic = data(20);
00508 
00509       // Copy converged history values into trial values since data is only
00510       // sent (received) after convergence
00511       TminStrain = CminStrain;
00512       TmaxStrain = CmaxStrain;
00513       TshiftP = CshiftP;
00514       TshiftN = CshiftN;
00515       Tloading = Cloading;
00516       TbStrain = CbStrain;
00517       TbStress = CbStress;
00518       TrStrain = CrStrain;
00519       TrStress = CrStress;
00520       Tplastic = Cplastic;
00521 
00522       // State variables from last converged state
00523       Cstrain = data(21);
00524       Cstress = data(22);
00525       Ctangent = data(23);
00526       CcurR = data(24);
00527 
00528       // Copy converged state values into trial values
00529       Tstrain = Cstrain;
00530       Tstress = Cstress;
00531       Ttangent = Ctangent;
00532       TcurR = CcurR;
00533    }
00534     
00535    return res;
00536 }
00537 
00538 void Steel03::Print (OPS_Stream& s, int flag)
00539 {
00540    s << "Steel03 tag: " << this->getTag() << endln;
00541    s << " fy: " << fy << " ";
00542    s << "  E0: " << E0 << " ";
00543    s << "  b: " << b << " ";
00544    s << "  r:  " << r << " cR1: " << cR1 << " cR2: " << cR2 << endln;
00545    s << "  a1: " << a1 << " ";
00546    s << "  a2: " << a2 << " ";
00547    s << "  a3: " << a3 << " ";
00548    s << "  a4: " << a4 << " ";
00549 }
00550 

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