fdYieldDP.cpp

Go to the documentation of this file.
00001 //===============================================================================
00002 //# COPYRIGHT (C): Woody's license (by BJ):
00003 //                 ``This    source  code is Copyrighted in
00004 //                 U.S.,  for  an  indefinite  period,  and anybody
00005 //                 caught  using it without our permission, will be
00006 //                 mighty good friends of ourn, cause we don't give
00007 //                 a  darn.  Hack it. Compile it. Debug it. Run it.
00008 //                 Yodel  it.  Enjoy it. We wrote it, that's all we
00009 //                 wanted to do.''
00010 //
00011 //# PROJECT:           Object Oriented Finite Element Program
00012 //# PURPOSE:           Finite Deformation Hyper-Elastic classes
00013 //# CLASS:
00014 //#
00015 //# VERSION:           0.6_(1803398874989) (golden section)
00016 //# LANGUAGE:          C++
00017 //# TARGET OS:         all...
00018 //# DESIGN:            Zhao Cheng, Boris Jeremic (jeremic@ucdavis.edu)
00019 //# PROGRAMMER(S):     Zhao Cheng, Boris Jeremic
00020 //#
00021 //#
00022 //# DATE:              July 2004
00023 //# UPDATE HISTORY:    change the input parameter from friction angle and cohesion
00024 //#                    to alpha and k, and it is now no cone case index.
00025 //#
00026 //===============================================================================
00027 
00028 #ifndef fdYieldDP_CPP
00029 #define fdYieldDP_CPP
00030 
00031 #include "fdYieldDP.h"
00032 
00033 //--------------------------------------------------------------------
00034 fdYieldDP::fdYieldDP(double alpha_in, double k_in)
00035  : alpha(alpha_in), k(k_in)
00036 {   
00037 
00038 }
00039 
00040 //--------------------------------------------------------------------
00041 fdYield * fdYieldDP::newObj()
00042 {
00043     fdYield *newfdyd = new fdYieldDP(alpha, k);
00044     
00045     return newfdyd;
00046 }
00047 
00048 int fdYieldDP::getNumRank()
00049 {
00050     return 1;
00051 }
00052 
00053 double fdYieldDP::getTolerance()
00054 {
00055     double tol = 1.0e-6 * k;
00056     
00057     return (tol*tol) > 1.0e-7?  (tol*tol) : 1.0e-7;
00058 }
00059 
00060 //--------------------------------------------------------------------------------------------
00061 // Yd =  alpha*I1 + sqrt(0.5*Sij*Sij) - (k+q) = 0, 
00062 // Note here NumRank = 1: No Kinematic hardening
00063 //--------------------------------------------------------------------------------------------
00064 
00065 double fdYieldDP::Yd(const stresstensor &sts, const FDEPState &fdepstate ) const
00066 {    
00067     // NumRank=1, No Ki Hardeing
00068 
00069     stresstensor dev = sts.deviator();
00070     double I1 = sts.Iinvariant1();
00071     tensor st = dev("ij")*dev("ij");
00072       st.null_indices();
00073     double x = st.trace();
00074     
00075     return alpha*I1 + sqrt(0.5*x) - k;
00076 }
00077 
00078 //--------------------------------------------------------------------
00079 stresstensor fdYieldDP::dYods(const stresstensor &sts, const FDEPState &fdepstate ) const
00080 {   
00081     // NumRank=1, No Ki Hardening
00082     
00083     double y = 0.0;
00084 
00085     tensor tI2("I", 2, def_dim_2);
00086     stresstensor dev = sts.deviator();
00087     tensor st = dev("ij")*dev("ij");  
00088       st.null_indices();
00089     double x = st.trace();
00090 
00091     if (fabs(x) > 1.0e-6)
00092       y = 1.0/sqrt(2.0*x);
00093     
00094     return tI2 * alpha + dev * y;
00095 }                                             
00096 
00097 //--------------------------------------------------------------------
00098 double fdYieldDP::dYodq(const stresstensor &sts, const FDEPState &fdepstate ) const
00099 {      
00100     // NumRank=1, No Ki Hardening
00101     
00102     return -1.0;
00103 }
00104 
00106 //stresstensor fdYieldDP::dYoda(const stresstensor &sts, const FDEPState &fdepstate ) const
00107 //{
00108 //}
00109         
00110 //--------------------------------------------------------------------
00111 OPS_Stream& operator<<(OPS_Stream& os, const fdYieldDP &fdydDP)
00112 {
00113     os << "fdYieldDP Parameters: " << "\n";
00114     os << "alpha: " << fdydDP.alpha << "\n";
00115     os << "k: " << fdydDP.k << "\n";
00116     
00117     return os;
00118 }
00119 
00120 
00121 #endif
00122 

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