Template3Dep.h

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 # CLASS:             Template3Dep (the base class for all material point)      #
00008 #                                                                              #
00009 # VERSION:                                                                     #
00010 # LANGUAGE:          C++.ver >= 2.0 ( Borland C++ ver=3.00, SUN C++ ver=2.1 )  #
00011 # TARGET OS:         DOS || UNIX || . . .                                      #
00012 # DESIGNER(S):       Boris Jeremic, Zhaohui Yang                               #
00013 # PROGRAMMER(S):     Boris Jeremic, Zhaohui Yang                               #
00014 #                                                                              #
00015 #                                                                              #
00016 # DATE:              08-03-2000                                                #
00017 # UPDATE HISTORY:    09-12-2000                                                #
00018 #       May 2004, Zhao Cheng spliting the elastic part        #
00019 #                                                                              #
00020 #                                                                              #
00021 # SHORT EXPLANATION: The Template3Dep class is used to hold specific           #
00022 #                    yield surface, potential surface, Evolution law(s)        #
00023 #                    and EPState of a 3D elasto-plastic material model for one #
00024 #                    gauss point!! It is worthwhile noting that one model may  #
00025 #                    have multiple evolution law.  Each evlotuion law is       #
00026 #                    used to evolve one internal var.                          #
00027 #                                                                              #
00028 #                                                                              #
00029 ################################################################################
00030 */
00031 
00032 #ifndef Template3Dep_H
00033 #define Template3Dep_H
00034 
00035 #include <NDMaterial.h>
00036 
00037 #include <Matrix.h>
00038 #include <Vector.h>
00039 #include <ID.h>
00040 
00041 #include <stresst.h>
00042 #include <straint.h>
00043 #include <BJtensor.h>
00044 
00045 //#include <MD_YS.h>
00046 //#include <MD_PS.h>
00047 #include <YS.h>
00048 #include <PS.h>
00049 #include <EL_S.h>
00050 #include <EL_T.h>
00051 #include <EPState.h>
00052 
00053 #include <Channel.h>
00054 #include <G3Globals.h>
00055 
00056 //#include <DP_YS.h>
00057 //#include <DP_PS.h>
00058 //#include <EPState.h>
00059 
00060 //** Include the Elastic Material Models here
00061 #include <ElasticIsotropic3D.h>
00062 #include <ElasticCrossAnisotropic.h>
00063 #include <PressureDependentElastic3D.h>
00064 
00065 //#include <CDriver.h>
00066 
00067 //class YieldSurface;
00068 //#define ITMAX 30
00069 //#define MAX_STEP_COUNT 100
00070 //#define NUM_OF_SUB_INCR 30
00071 //#define KK 1000.0  
00072 
00073 class Template3Dep : public NDMaterial
00074 {
00075  public:
00076 
00077   public:
00078     // constructor
00079     Template3Dep( int tag                ,
00080                   NDMaterial    &theElMat,
00081                   YieldSurface     *YS_ ,        
00082                   PotentialSurface *PS_ ,
00083                  EPState          *EPS_,
00084            EvolutionLaw_S   *ELS1_ , 
00085            EvolutionLaw_S   *ELS2_ , 
00086            EvolutionLaw_S   *ELS3_ , 
00087            EvolutionLaw_S   *ELS4_ , 
00088            EvolutionLaw_T   *ELT1_ ,
00089            EvolutionLaw_T   *ELT2_ ,
00090            EvolutionLaw_T   *ELT3_ ,
00091            EvolutionLaw_T   *ELT4_  );
00092     
00093     // Constructor0
00094     // If no evolution law is provided, then there will be no hardening or softening!
00095     Template3Dep(  int tag               ,
00096                    NDMaterial     &theElMat,
00097                    YieldSurface     *YS_ ,        
00098                    PotentialSurface *PS_ ,
00099                   EPState          *EPS_);
00100 
00101     // Constructor1
00102     // Only one scalar evolution law is provided!
00103     Template3Dep(  int tag               ,
00104                    NDMaterial     &theElMat,
00105                    YieldSurface     *YS_ ,        
00106                    PotentialSurface *PS_ ,
00107                   EPState          *EPS_,
00108             EvolutionLaw_S   *ELS1_ );
00109 
00110     // Constructor2
00111     // Only one tensorial evolution law is provided!
00112     Template3Dep(  int tag               ,
00113                    NDMaterial     &theElMat,
00114                    YieldSurface     *YS_ ,        
00115                    PotentialSurface *PS_ ,
00116                   EPState          *EPS_,
00117             EvolutionLaw_T   *ELT1_ );
00118 
00119     // Constructor 3
00120     // One scalar evolution law and one tensorial evolution law are provided!
00121     Template3Dep(  int tag               , 
00122                    NDMaterial     &theElMat,
00123                    YieldSurface     *YS_ ,        
00124                    PotentialSurface *PS_ ,
00125                   EPState          *EPS_,
00126             EvolutionLaw_S   *ELS1_, 
00127             EvolutionLaw_T   *ELT1_ );
00128     
00129     // Constructor 4
00130     // Two scalar evolution laws and one tensorial evolution law are provided!
00131     Template3Dep(  int tag               ,
00132                    NDMaterial     &theElMat,
00133                    YieldSurface     *YS_ ,        
00134                    PotentialSurface *PS_ ,
00135                   EPState          *EPS_,
00136             EvolutionLaw_S   *ELS1_, 
00137             EvolutionLaw_S   *ELS2_, 
00138             EvolutionLaw_T   *ELT1_ );
00139 
00140     // Constructor 5
00141     // Two scalar evolution laws and two tensorial evolution laws are provided!
00142     Template3Dep(  int tag               ,
00143                    NDMaterial     &theElMat,
00144                    YieldSurface     *YS_ ,        
00145                    PotentialSurface *PS_ ,
00146                   EPState          *EPS_,
00147             EvolutionLaw_S   *ELS1_, 
00148             EvolutionLaw_S   *ELS2_, 
00149             EvolutionLaw_T   *ELT1_,
00150             EvolutionLaw_T   *ELT2_ );
00151 
00152     // For parallel processing
00153     Template3Dep(void);
00154     virtual ~Template3Dep(void);
00155 
00156     const char *getClassType(void) const {return "Template3Dep";};
00157 
00158     // methods to set state and retrieve state using Matrix and Vector classes
00159     int setTrialStrain(const Vector &v);
00160     int setTrialStrain(const Vector &v, const Vector &r);
00161     int setTrialStrainIncr(const Vector &v) ;
00162     int setTrialStrainIncr(const Vector &v, const Vector &r) ;
00163     const Matrix &getTangent(void) ;
00164     const Matrix &getInitialTangent(void) ;
00165 
00166     const Vector &getStress(void) ;
00167     const Vector &getStrain(void) ;
00168 
00169     // methods to set and retrieve state using the Tensor class    
00170     int setTrialStrain(const Tensor &v) ;
00171     int setTrialStrain(const Tensor &v, const Tensor &r) ;    
00172     int setTrialStrainIncr(const Tensor &v) ;
00173     int setTrialStrainIncr(const Tensor &v, const Tensor &r) ;
00174     const Tensor &getTangentTensor(void) ;
00175     const stresstensor& getStressTensor(void) ;
00176     const straintensor& getStrainTensor(void) ;
00177     const straintensor& getPlasticStrainTensor(void); //Added Joey Aug. 13, 2001
00178     //double getpsi(void); //Added Joey 02-18-03
00179 
00180     EPState * getEPS() const;
00181     void setEPS( EPState &eps);
00182 
00183     int commitState(void);
00184     int revertToLastCommit(void);
00185     int revertToStart(void);
00186     
00187     NDMaterial *getCopy(void);
00188     NDMaterial *getCopy(const char *code) ;
00189 
00190     //Template3Dep getCopy(void);  //????/
00191     //Template3Dep getCopy(const char *code) ;///???/
00192 
00193     const char *getType(void) const ;
00194     //int getOrder(void) const ;
00195 
00196     int sendSelf(int commitTag, Channel &theChannel);  
00197     int recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker);    
00198 
00199     void Print(OPS_Stream &s, int flag =0);
00200 
00201     //Private Utility method
00202   //private:
00203     
00204      //These are from formerly CDriver
00205      EPState ForwardEulerEPState( const straintensor &strain_increment);
00206      
00207      EPState SemiBackwardEulerEPState( const straintensor &strain_increment);
00208      
00209      EPState FESubIncrementation( const straintensor &strain_increment,
00210                                   int number_of_subincrements);
00211 
00212      EPState BackwardEulerEPState( const straintensor &strain_increment);
00213 
00214      EPState BESubIncrementation( const straintensor & strain_increment,
00215                                   int number_of_subincrements);                                                 
00216   private:
00217                                                         
00218     //================================================================================
00219     // this one is intended to shell the previous three and to decide 
00220     // ( according to the data stored in Material_Model object ) 
00221     // which constitutive tensor to return ( forward ( non-constistent
00222     // or backward ( consistent ) or . . . 
00223     
00224     //virtual tensor ConstitutiveTensor(stresstensor   & final_stress, 
00225     //                                 stresstensor   & start_stress,
00226     //                                 straintensor   & strain_increment,
00227     //                                 Material_Model & Criterion,
00228     //                                 double           just_this_PP );
00229     
00230 
00231     //================================================================================
00232     // trying to find intersection point
00233     // according to M. Crisfield's book
00234     // "Non-linear Finite Element Analysis of Solids and Structures "
00235     // chapter 6.6.1 page 168.
00236     //================================================================================
00237     EPState PredictorEPState(straintensor & strain_increment);
00238 
00239     stresstensor yield_surface_cross(const stresstensor & start_stress,
00240                                      const stresstensor & end_stress);
00241 
00242     double zbrentstress(const stresstensor & start_stress,
00243                         const stresstensor & end_stress,
00244                         double x1, double x2, double tol);
00245 
00246     double func( const stresstensor &start_stress,
00247                  const stresstensor &end_stress,
00248                  double alfa );
00249     
00250    public: 
00251     tensor ElasticComplianceTensor(void) const;
00252     tensor ElasticStiffnessTensor(void) const;
00253 
00254    private:
00255     NDMaterial * getElMat() const;
00256     YieldSurface * getYS() const;
00257     PotentialSurface * getPS() const;
00258 
00259     //EPState &getEPS(void);
00260     
00261     //get scalar evolution laws
00262     EvolutionLaw_S * getELS1() const;
00263     EvolutionLaw_S * getELS2() const;
00264     EvolutionLaw_S * getELS3() const;    
00265     EvolutionLaw_S * getELS4() const;
00266 
00267     //get tensorial evolution laws
00268     EvolutionLaw_T * getELT1() const;
00269     EvolutionLaw_T * getELT2() const;
00270     EvolutionLaw_T * getELT3() const;
00271     EvolutionLaw_T * getELT4() const;
00272     
00273 
00274     // Get n copies of the NDMaterial 
00275     //NDMaterial **getCopy(int n) ;
00276 
00277     //================================================================================
00278     // Overloaded Insertion Operator
00279     //================================================================================
00280     friend OPS_Stream& operator<< (OPS_Stream& os, const Template3Dep & MP);
00281 
00282    private:
00283 
00284     NDMaterial  *theElasticMat;
00285 
00286     YieldSurface *YS;
00287 
00288     PotentialSurface *PS;
00289 
00290     EPState *EPS;
00291                                
00292     //Scalar variable evolution laws (currently at most 4  allowed)
00293     EvolutionLaw_S *ELS1; 
00294     EvolutionLaw_S *ELS2; 
00295     EvolutionLaw_S *ELS3; 
00296     EvolutionLaw_S *ELS4; 
00297     
00298     //Tensorial variable evolution laws (currently at most 4  allowed)
00299     EvolutionLaw_T *ELT1; 
00300     EvolutionLaw_T *ELT2; 
00301     EvolutionLaw_T *ELT3; 
00302     EvolutionLaw_T *ELT4;
00303     
00304     static stresstensor Stress;
00305     static straintensor Strain;     
00306 
00307 };
00308 
00309 
00310 #endif
00311 

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