fdFlowDP.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:
00024 //#
00025 //===============================================================================
00026 
00027 #ifndef fdFlowDP_CPP
00028 #define fdFlowDP_CPP
00029 
00030 #include "fdFlowDP.h"
00031 
00032 //--------------------------------------------------------------------
00033 fdFlowDP::fdFlowDP(double dilation_in, double k_in)
00034 :dilation(dilation_in), k(k_in)
00035 {
00036 
00037 }
00038 
00039 //--------------------------------------------------------------------
00040 fdFlow * fdFlowDP::newObj()
00041 {
00042      fdFlow *newfdyd = new fdFlowDP(dilation, k);
00043      
00044      return newfdyd;
00045 }
00046 
00047 //-------------------------------------------------------------------
00048 // Q = dilation*I1 + sqrt(0.5*Sij*Sji) = 0, 
00049 // Note here NumRank = 1, No Kinematic Hardening
00050 //-------------------------------------------------------------------
00051 
00052 //--------------------------------------------------------------------
00053 stresstensor fdFlowDP::dFods(const stresstensor &sts, const FDEPState &fdepstate) const
00054 {    
00055     // NumRank=1, No Ki Hardening
00056     
00057     double y = 0.0;
00058 
00059     tensor tI2("I", 2 , def_dim_2);
00060     stresstensor dev = sts.deviator();
00061     tensor st = dev("ij")*dev("ij");  
00062       st.null_indices();
00063     double x = st.trace();
00064 
00065     if (fabs(x) > 1.0e-6)
00066       y = 1.0/sqrt(2.0*x);
00067 
00068     return tI2 *dilation + dev *y;
00069 }
00070 
00071 //--------------------------------------------------------------------
00072 double fdFlowDP::dFodq(const stresstensor &sts, const FDEPState &fdepstate ) const
00073 {  
00074     //NumRank=1, No Ki Hardening
00075     
00076     return -1.0;
00077 }
00078 
00080 //stresstensor fdFlowDP::dFoda(const stresstensor &sts, const FDEPState &fdepstate) const
00081 //{
00082 //}
00083 
00084 //--------------------------------------------------------------------
00085 tensor fdFlowDP::d2Fodsds(const stresstensor &sts, const FDEPState &fdepstate ) const
00086 {  
00087     // NumRank=1, No Ki Hardeing
00088     
00089     tensor z4(4, def_dim_4, 0.0);
00090     
00091     tensor tI2("I", 2, def_dim_2);
00092     stresstensor dev = sts.deviator();
00093     tensor st = dev("ij")*dev("ij")*2.0;  
00094       st.null_indices();
00095     double x = st.trace();
00096     tensor I4 = tI2("ij")*tI2("kl"); 
00097       I4.null_indices();
00098     I4 = I4 - I4*(1.0/3.0);  
00099     tensor st4 = dev("ij")*dev("kl");
00100       st4.null_indices();
00101 
00102     if (fabs(x) > 1.0e-6)
00103       z4 = I4 *(1.0/sqrt(x)) - st4 *(2.0/x/sqrt(x));
00104     
00105     return z4;   
00106 }
00107 
00109 //stresstensor fdFlowDP::d2Fodsdq(const stresstensor &sts, const FDEPState &fdepstate ) const
00110 //{
00111 //}
00112 
00114 //tensor fdFlowDP::d2Fodsda(const stresstensor &sts, const FDEPState &fdepstate ) const
00115 //{
00116 //}
00117     
00119 //double fdFlowDP::d2Fodqdq(const stresstensor &sts, const FDEPState &fdepstate ) const
00120 //{
00121 //}
00122 
00124 //stresstensor fdFlowDP::d2Fodqda(const stresstensor &sts, const FDEPState &fdepstate ) const
00125 //{
00126 //}
00127 
00128 //tensor fdFlowDP::d2Fodada(const stresstensor &sts, const FDEPState &fdepstate ) const
00129 //{
00130 //}
00131 
00132 //--------------------------------------------------------------------
00133 OPS_Stream& operator<<(OPS_Stream& os, const fdFlowDP &fdfdDP)
00134 {
00135     os << "fdFlowDP Parameters: " << "\n";
00136     os << "DilatedAngl: " << fdfdDP.dilation << "\n";
00137     os << "k: " << fdfdDP.k<< "\n";
00138     
00139     return os;
00140 }
00141 
00142 
00143 #endif
00144 

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