EL_NLEij.cpp

Go to the documentation of this file.
00001 /*
00002 //================================================================================
00003 # COPYRIGHT (C):     :-))                                                        #
00004 # PROJECT:           Object Oriented Finite Element Program                      #
00005 # PURPOSE:           General platform for elaso-plastic constitutive model       #
00006 #                    implementation                                              #
00007 #                                                                                #
00008 # CLASS:             EvolutionLaw_NL_Eij (on plastic strain)                     #
00009 #                                                                                #
00010 # VERSION:                                                                       #
00011 # LANGUAGE:          C++.ver >= 2.0 ( Borland C++ ver=3.00, SUN C++ ver=2.1 )    #
00012 # TARGET OS:         DOS || UNIX || . . .                                        #
00013 # DESIGNER(S):       Boris Jeremic, Zhaohui Yang                                 #
00014 # PROGRAMMER(S):     Boris Jeremic, Zhaohui Yang                                 #
00015 #                                                                                #
00016 #                                                                                #
00017 # DATE:              09-13-2000                                                  #
00018 # UPDATE HISTORY:    18May2004 Zhao fixed equation                               #
00019 #                    tensor h = dQods * (2.0/3.0) * ha - alpha * Cr * temp2;     #
00020 #                    so it is consistent with tensor multiplication (revised)    #
00021 #                                                                                #
00022 #                                                                                #
00023 # SHORT EXPLANATION: This is a nonlinear evolution law for the evoltion of a     #
00024 #                    tensorial variable alpha which depends on plastic strain    #
00025 #                    i.e. dalpha_ij = 2/3*ha*dE_ij -Cr*de_eq*alpha_ij( Amstrong- #
00026 //                   Frederick Model)                                            #
00027 #                                                                                #
00028 #                                                                                #
00029 #                                                                                #
00030 //================================================================================
00031 */
00032 
00033 #ifndef EL_NLEij_CPP
00034 #define EL_NLEij_CPP
00035 
00036 #include "EL_NLEij.h"
00037 #include <basics.h>
00038     
00039 
00040 //================================================================================
00041 // Copy constructor
00042 //================================================================================
00043 
00044 EvolutionLaw_NL_Eij::EvolutionLaw_NL_Eij(const EvolutionLaw_NL_Eij &LE ) {
00045 
00046     this->ha = LE.getha();
00047     this->Cr = LE.getCr();
00048 }
00049 
00050 
00051 //================================================================================
00052 //  Create a clone of itself 
00053 //================================================================================
00054 EvolutionLaw_T * EvolutionLaw_NL_Eij::newObj() {
00055     
00056     EvolutionLaw_T *newEL = new EvolutionLaw_NL_Eij( *this );
00057     
00058     return newEL;
00059 
00060 }
00061 
00066 //
00067 //void EvolutionLaw_L_Eij::InitVars(EPState  *EPS) {
00068 //
00069 //    // set initial E_Young corresponding to current stress state
00070 //    //double p_atm = 100.0; //Kpa atmospheric pressure
00071 //    //double p = EPS->getStress().p_hydrostatic();
00072 //    //double E = EPS->getEo() * pow( (p/p_atm), geta());
00073 //    EPS->setE( EPS->getEo() );
00074 //      
00075 //}   
00076 
00077 
00078 //================================================================================
00079 //  Set initial value of D once the current stress hit the yield surface       
00080 //  for L model only                         
00081 //                                 
00082 //                                       
00083 //================================================================================
00084 //
00085 //void EvolutionLaw_L_Eij::setInitD(EPState  *EPS) {
00086 //
00087 //}   
00088 
00092 //
00093 //void EvolutionLaw_L_Eij::UpdateVar( EPState *EPS, int WhichOne) {
00094 //   
00095 //    //=========================================================================
00096 //    // Updating alfa1 by dalfa1 = a* de_eq
00097 //    
00098 //    // Calculate  e_eq = sqrt( 2.0 * epsilon_ij * epsilon_ij / 3.0)
00099 //    straintensor pstrain =  EPS->getdPlasticStrain(); 
00100 //    double e_eq  = pstrain.equivalent();
00101 //    //cout << "e_eq = " << e_eq << endlnn;
00102 //
00103 //    double dS =  e_eq * geta();
00104 //    double S  = EPS->getScalarVar( WhichOne );
00105 //
00106 //    EPS->setScalarVar(WhichOne, S + dS);
00107 //
00108 //}
00109 
00110 
00111  
00112 //================================================================================
00113 // Evaluating h_s = 2*ha*Rij/3 - Cr*pow( 2.0*Rij_dev * Rij_dev/3.0, 0.5) (For the evaluation of Kp)
00114 //================================================================================
00115 
00116 tensor EvolutionLaw_NL_Eij::h_t( EPState *EPS, PotentialSurface *PS){
00117 
00118     //=========================================================================
00119     // Getting de_ij / dLambda
00120     
00121     stresstensor dQods = PS->dQods( EPS );
00122     //dQods.reportshort("dQods");
00123 
00124     tensor dQods_dev = dQods.deviator();
00125     tensor temp1 =  dQods_dev("ij")*dQods_dev("ij");
00126     double norm_dQods_dev =  pow( temp1.trace(), 0.5 );
00127     double temp2 = pow( 2.0 / 3.0, 0.5 ) * norm_dQods_dev;
00128     
00129     double ha = getha();
00130     double Cr = getCr();
00131     tensor alpha = EPS->getTensorVar(1);
00132              
00133     tensor h = dQods * (2.0/3.0) * ha - alpha * Cr * temp2;
00134 
00135     return h;
00136 
00137 }
00138 
00139 
00140 //================================================================================
00141 //  Print vars defined in Linear Evolution Law
00142 //================================================================================
00143 void EvolutionLaw_NL_Eij::print()
00144 {
00145     opserr << (*this);
00146 }
00147 
00148 
00149 //================================================================================
00150 double EvolutionLaw_NL_Eij::getha() const
00151 {       
00152     return ha;
00153 }
00154 
00155 //================================================================================
00156 double EvolutionLaw_NL_Eij::getCr() const
00157 {       
00158     return Cr;
00159 }
00160 
00161 //================================================================================
00162 OPS_Stream& operator<< (OPS_Stream& os, const EvolutionLaw_NL_Eij & LEL)
00163 {
00164   //    os.unsetf( ios::scientific );
00165     os.precision(5);
00166 
00167     os.width(10);       
00168     os << endln << "NonLinear Tensorial Evolution Law(A-F model)'s parameters:" << endln;
00169     os << "ha = " << LEL.getha() << "; ";
00170     os << "Cr = " << LEL.getCr() << endln;
00171            
00172     return os;
00173 }  
00174 
00175 #endif
00176 

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