EL_LEeq.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_L_Eeq (on plastic equivalent 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-02-2000                                                  #
00018 # UPDATE HISTORY:                                                                #
00019 #                                                                                #
00020 #                                                                                #
00021 #                                                                                #
00022 # SHORT EXPLANATION: This is a linear evolution law for the evoltion of a        #
00023 #                    scalar variable k which depends on plastic equi. strain     #
00024 #                    i.e. dk = a*de_eq_p                                         #
00025 //================================================================================
00026 */
00027 
00028 #ifndef EL_LEeq_CPP
00029 #define EL_LEeq_CPP
00030 
00031 #include "EL_LEeq.h"
00032 #include <basics.h>
00033     
00034 //================================================================================
00035 // Default constructor
00036 //================================================================================
00037 EvolutionLaw_L_Eeq::EvolutionLaw_L_Eeq( double ad ) 
00038 :a(ad)
00039 {}     
00040 
00041 //================================================================================
00042 // Copy constructor
00043 //================================================================================
00044 
00045 EvolutionLaw_L_Eeq::EvolutionLaw_L_Eeq(const EvolutionLaw_L_Eeq &LE ) 
00046 {
00047     this->a = LE.geta();
00048 }
00049 
00050 
00051 //================================================================================
00052 //  Create a clone of itself 
00053 //================================================================================
00054 // Alpha machine has problem on this
00055 //EvolutionLaw_L_Eeq * EvolutionLaw_L_Eeq::newObj() {
00056 EvolutionLaw_S * EvolutionLaw_L_Eeq::newObj() 
00057 {    
00058     EvolutionLaw_S *newEL = new EvolutionLaw_L_Eeq( *this );
00059     
00060     return newEL;
00061 }
00062 
00067 //
00068 //void EvolutionLaw_L_Eeq::InitVars(EPState  *EPS) {
00069 //
00070 //    // set initial E_Young corresponding to current stress state
00071 //    //double p_atm = 100.0; //Kpa atmospheric pressure
00072 //    //double p = EPS->getStress().p_hydrostatic();
00073 //    //double E = EPS->getEo() * pow( (p/p_atm), geta());
00074 //    EPS->setE( EPS->getEo() );
00075 //      
00076 //}   
00077 
00078 
00079 //================================================================================
00080 //  Set initial value of D once the current stress hit the yield surface        
00081 //  for MD model only                                                           
00082 //================================================================================
00083 //
00084 //void EvolutionLaw_L_Eeq::setInitD(EPState  *EPS) {
00085 //
00086 //}   
00087                   
00088  
00089 //================================================================================
00090 // Evaluating h_s = a * pow( 2.0*Rij_dev * Rij_dev/3.0, 0.5) (For the evaluation of Kp)
00091 //================================================================================
00092 
00093 double EvolutionLaw_L_Eeq::h_s( EPState *EPS, PotentialSurface *PS){
00094 
00095     //=========================================================================
00096     // Getting de_eq / dLambda
00097     stresstensor dQods = PS->dQods( EPS );
00098     //dQods.reportshort("dQods");
00099 
00100     //Evaluate the norm of the deviator of dQods
00101     //temp1 =  dQods("ij")*dQods("ij");
00102     tensor dQods_dev = dQods.deviator();
00103     tensor temp1 =  dQods_dev("ij")*dQods_dev("ij");
00104     double norm_dQods_dev =  pow( temp1.trace(), 0.5 );
00105     
00106     double de_eqodL = pow( 2.0 / 3.0, 0.5 ) * norm_dQods_dev;
00107 
00108     //Evaluating dSodeeq
00109     double dSodeeq = geta();
00110 
00111     double h = dSodeeq * de_eqodL;
00112 
00113     return h;
00114 
00115 }
00116 
00117 
00118 //================================================================================
00119 //  Print vars defined in Linear Evolution Law
00120 //================================================================================
00121 void EvolutionLaw_L_Eeq::print()
00122 {
00123     opserr << (*this);
00124 }
00125 
00126 
00127 //================================================================================
00128 double EvolutionLaw_L_Eeq::geta() const
00129 {       
00130     return a;
00131 }
00132 
00133 //================================================================================
00134 OPS_Stream& operator<< (OPS_Stream& os, const EvolutionLaw_L_Eeq & LEL)
00135 {
00136   //    os.unsetf( ios::scientific );
00137     os.precision(5);
00138 
00139     os.width(10);       
00140     os << endln << "Linear Scalar Evolution Law's parameters:" << endln;
00141     os << "a = " << LEL.geta() << "; " << endln;
00142            
00143     return os;
00144 }  
00145 
00146 #endif
00147 

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