NewTemplate3Dep.h

Go to the documentation of this file.
00001 
00002 //   COPYLEFT (C): Woody's viral GPL-like 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 //
00012 // COPYRIGHT (C):     :-))
00013 // PROJECT:           Object Oriented Finite Element Program
00014 // FILE:              
00015 // CLASS:             
00016 // MEMBER FUNCTIONS:
00017 //
00018 // MEMBER VARIABLES
00019 //
00020 // PURPOSE:           
00021 //
00022 // RETURN:
00023 // VERSION:
00024 // LANGUAGE:          C++
00025 // TARGET OS:         
00026 // DESIGNER:          Zhao Cheng, Boris Jeremic
00027 // PROGRAMMER:        Zhao Cheng, 
00028 // DATE:              Fall 2005
00029 // UPDATE HISTORY:    06/2006, add functions for matrix based elements, CZ
00030 //
00032 //
00033 
00034 #ifndef NewTemplate3Dep_H
00035 #define NewTemplate3Dep_H
00036 
00037 #include <stresst.h>
00038 #include <straint.h>
00039 #include <BJtensor.h>
00040 #include <Matrix.h>
00041 #include <Vector.h>
00042 
00043 
00044 #include <NDMaterial.h>
00045 
00046 #include "MaterialParameter.h"
00047 #include "ElasticState.h"
00048 #include "YieldFunction.h"
00049 #include "PlasticFlow.h"
00050 #include "ScalarEvolution.h"
00051 #include "TensorEvolution.h"
00052 
00053 #include <Channel.h>
00054 #include <G3Globals.h>
00055 
00056 class NewTemplate3Dep : public NDMaterial
00057 {
00058 public:
00059     NewTemplate3Dep( int tag,
00060                   MaterialParameter *pointer_material_parameter_in,
00061                   ElasticState      *pointer_elastic_state_in,
00062                   YieldFunction     *pointer_yield_function_in,        
00063                   PlasticFlow       *pointer_plastic_flow_in,
00064                   ScalarEvolution   **pointer_scalar_evolution_in = NULL,
00065                   TensorEvolution   **pointer_tensor_evolution_in = NULL,
00066                   int caseIndex_in = 0);
00067     
00068      NewTemplate3Dep( int tag,
00069                   MaterialParameter *pointer_material_parameter_in,
00070                   ElasticState      *pointer_elastic_state_in,
00071                   YieldFunction     *pointer_yield_function_in,        
00072                   PlasticFlow       *pointer_plastic_flow_in,
00073                   TensorEvolution   **pointer_tensor_evolution_in,
00074                   int caseIndex_in = 0);
00075     
00076     NewTemplate3Dep(void);
00077     
00078     ~NewTemplate3Dep(void);
00079 
00080     const char *getClassType(void) const {return "NewTemplate3Dep";};
00081 
00082     // methods to set and retrieve state using the Matrix class, added 06/2006
00083     int setTrialStrain (const Vector &v);
00084     int setTrialStrain (const Vector &v, const Vector &r);
00085     int setTrialStrainIncr (const Vector &v);
00086     int setTrialStrainIncr (const Vector &v, const Vector &r);
00087     const Matrix &getTangent (void);
00088     const Vector &getStress (void);
00089     const Vector &getStrain (void);
00090 
00091 
00092     // methods to set and retrieve state using the Tensor class    
00093     int setTrialStrain(const Tensor& v);
00094     int setTrialStrain(const Tensor& v, const Tensor& r);    
00095     int setTrialStrainIncr(const Tensor& v);
00096     int setTrialStrainIncr(const Tensor& v, const Tensor& r);
00097     const BJtensor& getTangentTensor(void);
00098     const stresstensor& getStressTensor(void);
00099     const straintensor& getStrainTensor(void);
00100     const straintensor& getPlasticStrainTensor(void);
00101     
00102     double getRho();
00103 
00104     int commitState(void);
00105     int revertToLastCommit(void);
00106     int revertToStart(void);
00107     
00108     NDMaterial* getCopy(void);
00109     NDMaterial* getCopy(const char *code);
00110 
00111     const char *getType(void) const;
00112 
00113     int sendSelf(int commitTag, Channel &theChannel);  
00114     int recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker);    
00115 
00116     void Print(OPS_Stream& s, int flag =0);
00117   
00118 private:
00119 
00120     int ForwardEuler(const straintensor& strain_incr);
00121     int SemiImplicit(const straintensor& strain_incr);
00122     int BackwardEuler(const straintensor& strain_incr);
00123 
00124     int PredictorEPState(const straintensor& strain_incr);
00125     stresstensor yield_surface_cross(const stresstensor& start_stress, 
00126                                      const stresstensor& end_stress,
00127                                      double a);
00128     double zbrentstress(const stresstensor& start_stress,
00129                         const stresstensor& end_stress,
00130                         double x1, double x2, double tol) const;
00131     double func( const stresstensor& start_stress,
00132                  const stresstensor& end_stress,
00133                  const MaterialParameter& pointer_material_parameter, 
00134                  double alfa ) const;
00135  
00136 private:
00137    
00138     straintensor TrialStrain;
00139     stresstensor TrialStress;
00140     straintensor TrialPlastic_Strain;
00141     
00142     stresstensor CommitStress;
00143     straintensor CommitStrain; 
00144     straintensor CommitPlastic_Strain;
00145     
00146     BJtensor Stiffness;
00147                 
00148     MaterialParameter *pointer_material_parameter;
00149     ElasticState      *pointer_elastic_state;           
00150     YieldFunction     *pointer_yield_function;
00151     PlasticFlow       *pointer_plastic_flow;
00152     ScalarEvolution   **pointer_scalar_evolution;
00153     TensorEvolution   **pointer_tensor_evolution;
00154     
00155     int caseIndex;
00156     
00157     static const  straintensor ZeroStrain;
00158     static const  stresstensor ZeroStress;
00159     static const  BJtensor ZeroI4;
00160     static const int ISMAX;
00161     static const int ITMAX;
00162     static const double TOL;
00163     static const double FTOL;
00164 
00165     // For Matrix based elements
00166     static Vector sigma; 
00167     static Matrix D;
00168     static Vector epsilon;
00169 };
00170 
00171 #endif

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