Concrete04.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: 2006/08/04 17:34:58 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/material/uniaxial/Concrete04.cpp,v $
00024                                                                         
00025 // Written: N.Mitra (nmitra@u.washington.edu) 
00026 // Created: 09/04
00027 // Revision: A
00028 //
00029 // Description: This file contains the class implementation for 
00030 // Concrete04 based on Popovics pre and post compression curve 
00031 // for concrete. 
00032 //
00033 // What: "@(#) Concrete04.C, revA"
00034 // Revision 1. Adding in exponential tensile envelope for concrete
00035 // Dt. 05-16-05
00036 
00037 
00038 #include <Concrete04.h>
00039 #include <Vector.h>
00040 #include <Matrix.h>
00041 #include <Channel.h>
00042 #include <Information.h>
00043 #include <math.h>
00044 #include <float.h>
00045 
00046 
00047 Concrete04::Concrete04
00048 (int tag, double FPC, double EPSC0, double EPSCU, double EC0, double FCT, double ETU)
00049   :UniaxialMaterial(tag, MAT_TAG_Concrete04),
00050    fpc(FPC), epsc0(EPSC0), epscu(EPSCU), Ec0(EC0), fct(FCT), etu(ETU), beta(0.1),
00051    CminStrain(0.0), CendStrain(0.0), CcompStrain(0.0), CUtenStress(FCT),
00052    Cstrain(0.0), Cstress(0.0), CmaxStrain(0.0) 
00053 {
00054   // Make all concrete parameters negative
00055   if (fpc > 0.0 || epsc0 > 0.0 || epscu > 0.0) {
00056     opserr << "error: negative values required for concrete stress-strain model" << endln;
00057   }
00058   
00059   if (fct < 0.0) {
00060     fct = 0.0;
00061     opserr << "warning: fct less than 0.0 so the tensile response part is being set to 0" << endln;
00062   }
00063   
00064   Ctangent = Ec0;
00065   CunloadSlope = Ec0;
00066   CUtenSlope = Ec0;
00067   
00068   // Set trial values
00069   this->revertToLastCommit();
00070 }
00071 
00072 Concrete04::Concrete04
00073 (int tag, double FPC, double EPSC0, double EPSCU, double EC0, double FCT, double ETU, double BETA)
00074   :UniaxialMaterial(tag, MAT_TAG_Concrete04),
00075    fpc(FPC), epsc0(EPSC0), epscu(EPSCU), Ec0(EC0), fct(FCT), etu(ETU), beta(BETA),
00076    CminStrain(0.0), CendStrain(0.0), CcompStrain(0.0), CUtenStress(FCT),
00077    Cstrain(0.0), Cstress(0.0), CmaxStrain(0.0) 
00078 {
00079   // Make all concrete parameters negative
00080   if (fpc > 0.0 || epsc0 > 0.0 || epscu > 0.0) {
00081     opserr << "error: negative values required for concrete stress-strain model" << endln;
00082   }
00083   
00084   if (fct < 0.0) {
00085     fct = 0.0;
00086     opserr << "warning: fct less than 0.0 so the tensile response part is being set to 0" << endln;
00087   }
00088   
00089   Ctangent = Ec0;
00090   CunloadSlope = Ec0;
00091   CUtenSlope = Ec0;
00092   
00093   // Set trial values
00094   this->revertToLastCommit();
00095 }
00096 
00097 
00098 Concrete04::Concrete04
00099 (int tag, double FPC, double EPSC0, double EPSCU, double EC0)
00100   :UniaxialMaterial(tag, MAT_TAG_Concrete04),
00101    fpc(FPC), epsc0(EPSC0), epscu(EPSCU), Ec0(EC0), fct(0.0), etu(0.0), beta(0.0),
00102    CminStrain(0.0), CendStrain(0.0), CcompStrain(0.0), CUtenStress(0.0),
00103    Cstrain(0.0), Cstress(0.0), CmaxStrain(0.0) 
00104 {
00105   // Make all concrete parameters negative
00106   if (fpc > 0.0 || epsc0 > 0.0 || epscu > 0.0) {
00107     opserr << "error: negative values required for concrete stress-strain model" << endln;
00108   }
00109   
00110   Ctangent = Ec0;
00111   CunloadSlope = Ec0;
00112   CUtenSlope = 0.0;
00113   
00114   // Set trial values
00115   this->revertToLastCommit();
00116   
00117 }
00118 
00119 Concrete04::Concrete04():UniaxialMaterial(0, MAT_TAG_Concrete04),
00120                          fpc(0.0), epsc0(0.0), epscu(0.0), Ec0(0.0), fct(0.0), etu(0.0), beta(0.0),
00121                          CminStrain(0.0), CunloadSlope(0.0), CendStrain(0.0), CcompStrain(0.0), CUtenStress(0.0),
00122                          CUtenSlope(0.0), Cstrain(0.0), Cstress(0.0), CmaxStrain(0.0)
00123 {
00124   // Set trial values
00125   this->revertToLastCommit();
00126   
00127 }
00128 
00129 Concrete04::~Concrete04()
00130 {
00131   // Does nothing
00132 }
00133 
00134 int Concrete04::setTrialStrain (double strain, double strainRate)
00135 {
00136 
00137   /*// Reset trial history variables to last committed state*/
00138   TminStrain = CminStrain;   
00139   TmaxStrain = CmaxStrain;   
00140   TendStrain = CendStrain;   
00141   TunloadSlope = CunloadSlope;   
00142   TUtenSlope = CUtenSlope;
00143   Tstrain = Cstrain;   
00144   Tstress = Cstress;   
00145   Ttangent = Ctangent;
00146 
00147   /* // Set trial strain*/  
00148   if (fct == 0.0 && strain > 0.0) {    
00149     Tstrain = strain;
00150     Tstress = 0.0;    
00151     Ttangent = 0.0;    
00152     TUtenSlope = 0.0;    
00153     return 0;  
00154   }
00155 
00156   /*// Determine change in strain from last converged state*/  
00157   double dStrain = strain - Cstrain;
00158 
00159   if (fabs(dStrain) < DBL_EPSILON)       
00160     return 0;
00161 
00162   Tstrain = strain;  
00163 
00164   /*// Calculate the trial state given the change in strain  // determineTrialState (dStrain);*/
00165   TunloadSlope = CunloadSlope;  
00166   TUtenSlope = CUtenSlope;
00167   if (dStrain <= 0.0) {   /*// Material can be either in Compression-Reloading    // or Tension-Unloading state.*/
00168     if (Tstrain > 0.0) {         
00169       /*// Material is in Tension-Unloading State*/               
00170       Ttangent = TUtenSlope;              
00171       Tstress = Tstrain * TUtenSlope;     
00172     } else {
00173       /*// Material is in Compression-Reloading State*/      
00174       TminStrain = CminStrain;      
00175       TendStrain = CendStrain;      
00176       TunloadSlope = CunloadSlope;      
00177       CompReload();
00178     }
00179   } else {
00180     /*// Material can be either in Compression-Unloading          // or Tension-Reloading State.*/
00181     if (Tstrain >= 0.0) {    /*// Material is in Tension-Reloading State*/      
00182       TmaxStrain = CmaxStrain;                  
00183       if (Tstrain < TmaxStrain) {        
00184         Tstress = Tstrain * CUtenSlope;        
00185         Ttangent = CUtenSlope;        
00186         TUtenSlope = CUtenSlope;      
00187       } else {        
00188         TmaxStrain = Tstrain;        
00189         TensEnvelope();        
00190         setTenUnload();      
00191       }        
00192     } else {
00193       if (Tstrain <= TendStrain) {          
00194         Ttangent = TunloadSlope;          
00195         Tstress = Ttangent * (Tstrain - TendStrain);        
00196       } else {          
00197         Tstress = 0.0;          
00198         Ttangent = 0.0;        
00199       }        
00200     }  
00201   }    
00202   return 0;
00203 }
00204 
00205 void Concrete04::CompReload()
00206 {
00207   if (Tstrain <= TminStrain) {
00208     
00209     TminStrain = Tstrain;
00210     
00211     /*// Determine point on envelope*/
00212     CompEnvelope ();
00213     setCompUnloadEnv ();
00214     
00215   }
00216   else if (Tstrain < TendStrain) {
00217     Ttangent = TunloadSlope;
00218     Tstress = Ttangent*(Tstrain-TendStrain);
00219   }
00220   else if (Tstrain <= 0.0) {
00221     Tstress = 0.0;
00222     Ttangent = 0.0;
00223   }
00224 }
00225 
00226 void Concrete04::CompEnvelope()
00227 {
00228   if (Tstrain >= epscu) {
00229     double Esec = fpc/epsc0;
00230     double r = 0.0;
00231     if (Esec >= Ec0) {
00232       r = 400.0;
00233     } else {
00234       r = Ec0/(Ec0-Esec);
00235     }
00236     double eta = Tstrain/epsc0;
00237     Tstress = fpc*eta*r/(r-1+pow(eta,r));
00238     Ttangent = fpc*r*(r-1)*(1-pow(eta,r))/(pow((r-1+pow(eta,r)),2)*epsc0);
00239   } else {
00240     Tstress = 0.0;
00241     Ttangent = 0.0;
00242   }
00243   
00244 }
00245 
00246 void Concrete04::setCompUnloadEnv()     {
00247   double tempStrain = TminStrain;
00248   
00249   if (tempStrain < epscu)
00250     tempStrain = epscu;
00251   
00252   double eta = tempStrain/epsc0;
00253   
00254   double ratio = 0.707*(eta-2.0) + 0.834; // unloading parameter as per Karsan-Jirsa
00255   
00256   if (eta < 2.0)
00257     ratio = 0.145*eta*eta + 0.13*eta;
00258   
00259   TendStrain = ratio*epsc0;
00260   
00261   double temp1 = TminStrain - TendStrain;
00262   
00263   double temp2 = Tstress/Ec0;
00264   
00265   if (temp1 > -DBL_EPSILON) {   // temp1 should always be negative
00266     TunloadSlope = Ec0;
00267   }
00268   else if (temp1 <= temp2) {
00269     TendStrain = TminStrain - temp1;
00270     TunloadSlope = Tstress/temp1;
00271   }
00272   else {
00273     TendStrain = TminStrain - temp2;
00274     TunloadSlope = Ec0;
00275   }
00276   
00277   
00278   if (Tstrain >= 0.0) {
00279     /*opserr << "actually made it in here" << endln;*/
00280     /*TunloadSlope = Ec0;*/
00281   }
00282   
00283 }
00284 
00285 void Concrete04::TensReload()
00286 {  TensEnvelope();  setTenUnload();}
00287 
00288 void Concrete04::TensEnvelope()
00289 {  double ect = fct / Ec0;    
00290   if (Tstrain <= ect) {    
00291     Tstress = Tstrain * Ec0;    
00292     Ttangent = Ec0;
00293   } else if (Tstrain > etu) {    
00294     Tstress = 0.0;    
00295     Ttangent = 0.0;  
00296   } else {    
00297     Tstress = fct * pow(beta, (Tstrain - ect) / (etu - ect));    
00298     Ttangent = fct * pow(beta, (Tstrain - ect) / (etu - ect)) * log(beta) / (etu - ect);  
00299   }
00300 }
00301 
00302 void Concrete04::setTenUnload(){
00303   TUtenStress = Tstress;
00304   TUtenSlope = Tstress / Tstrain;
00305 }
00306 double Concrete04::getStress ()
00307 {     return Tstress;}
00308 
00309 double Concrete04::getStrain (){   return Tstrain;}
00310 
00311 double Concrete04::getTangent ()
00312 {   return Ttangent;}
00313 
00314 int Concrete04::commitState ()
00315 {
00316   /*// History variables*/   
00317   CminStrain = TminStrain;   
00318   CmaxStrain = TmaxStrain;   
00319   CunloadSlope = TunloadSlope;   
00320   CendStrain = TendStrain;   
00321   CUtenSlope = TUtenSlope;
00322   
00323   /*// State variables*/   
00324   Cstrain = Tstrain;   
00325   Cstress = Tstress;   
00326   Ctangent = Ttangent;      
00327   return 0;
00328 }
00329 
00330 int Concrete04::revertToLastCommit ()
00331 {
00332   /*// Reset trial history variables to last committed state*/
00333   TminStrain = CminStrain;   
00334   TmaxStrain = CmaxStrain;   
00335   TendStrain = CendStrain;   
00336   TunloadSlope = CunloadSlope;   
00337   TUtenSlope = CUtenSlope;
00338   
00339   /*// Recompute trial stress and tangent*/   
00340   Tstrain = Cstrain;   
00341   Tstress = Cstress;   
00342   Ttangent = Ctangent;
00343   return 0;
00344 }
00345 
00346 int Concrete04::revertToStart ()
00347 {
00348   
00349   /*// History variables*/
00350   CminStrain = 0.0;   CmaxStrain = 0.0;   CunloadSlope = Ec0;   CendStrain = 0.0;   CUtenSlope = Ec0;
00351   /*// State variables*/
00352   Cstrain = 0.0;   Cstress = 0.0;   Ctangent = Ec0;
00353   /*// Reset trial variables and state*/   this->revertToLastCommit();      return 0;
00354 }
00355 
00356 UniaxialMaterial* Concrete04::getCopy ()
00357 {
00358   Concrete04* theCopy = new Concrete04(this->getTag(),
00359                                        fpc, epsc0, epscu, Ec0, fct, etu, beta);
00360   
00361   /*// Converged history variables*/
00362   theCopy->CminStrain = CminStrain;   theCopy->CmaxStrain = CmaxStrain;   theCopy->CunloadSlope = CunloadSlope;   theCopy->CendStrain = CendStrain;   theCopy->CUtenSlope = CUtenSlope;
00363   
00364   /*// Converged state variables*/   theCopy->Cstrain = Cstrain;   theCopy->Cstress = Cstress;   theCopy->Ctangent = Ctangent;
00365   
00366   return theCopy;
00367 }
00368 
00369 int Concrete04::sendSelf (int commitTag, Channel& theChannel)
00370 {   int res = 0;   static Vector data(13);   data(0) = this->getTag();
00371   
00372   /* Material properties*/   data(1) = fpc;   data(2) = epsc0;   data(3) = epscu;   data(4) = Ec0;   data(5) = fct;
00373   /*// History variables from last converged state*/
00374   data(6) = CminStrain;   data(7) = CunloadSlope;   data(8) = CendStrain;   data(9) = CUtenSlope;   data(10) = CmaxStrain;
00375   
00376   /*// State variables from last converged state*/   data(11) = Cstrain;   data(12) = Cstress;   data(13) = Ctangent;   
00377   /*// Data is only sent after convergence, so no trial variables   // need to be sent through data vector*/
00378   
00379   res = theChannel.sendVector(this->getDbTag(), commitTag, data);   if (res < 0)       opserr << "Concrete04::sendSelf() - failed to send data\n";
00380   return res;
00381 }
00382 
00383 int Concrete04::recvSelf (int commitTag, Channel& theChannel,
00384                           FEM_ObjectBroker& theBroker)
00385 {
00386   int res = 0;
00387   static Vector data(13);
00388   res = theChannel.recvVector(this->getDbTag(), commitTag, data);
00389   
00390   if (res < 0) {
00391     opserr << "Concrete04::recvSelf() - failed to receive data\n";
00392     this->setTag(0);      
00393   }
00394   else {
00395     this->setTag(int(data(0)));
00396     
00397     /*// Material properties */
00398     fpc = data(1);
00399     epsc0 = data(2);
00400     epscu = data(3);
00401     Ec0 = data(4);
00402     fct = data(5);
00403     
00404     /*// History variables from last converged state*/
00405     CminStrain = data(6);      CunloadSlope = data(7);      CendStrain = data(8);      CcompStrain = data(9);      CmaxStrain = data(10); 
00406     
00407     /*// State variables from last converged state*/      Cstrain = data(11);      Cstress = data(12);      Ctangent = data(13);
00408     
00409     /*// Set trial state variables*/      this->revertToLastCommit();
00410     /*Tstrain = Cstrain;      Tstress = Cstress;      Ttangent = Ctangent;*/
00411   }
00412   
00413   return res;
00414 }
00415 
00416 void Concrete04::Print (OPS_Stream& s, int flag)
00417 {
00418   s << "Concrete04, tag: " << this->getTag() << endln;
00419   s << "  fpc: " << fpc << endln;
00420   s << "  epsc0: " << epsc0 << endln;
00421   s << "  fct: " << fct << endln;
00422   s << "  epscu: " << epscu << endln;
00423   s << "  Ec0:  " << Ec0 << endln;
00424   s << "  etu:  " << etu << endln;
00425   s << "  beta: " << beta << endln;
00426 }
00427 
00428 /*// LOWES: add functions for variable hinge-length model*/
00429 int
00430 Concrete04::getMaterialType()
00431 {
00432         return 0;
00433 }
00434 /*// LOWES: end*/

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