EPState.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:             DPEPState (the base class for all Elasto-plastic state)   #
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:                                                              #
00018 #                    May 2004, Zhao Cheng spliting the elastic part                             #
00019 #                                                                              #
00020 #                                                                              #
00021 #                                                                              #
00022 #                                                                              #
00023 # SHORT EXPLANATION: This class is used to hold all state parameters and       #
00024 #                    internal variables in an elasto-plastic constitutive      #
00025 #                    model.                                                    #
00026 ################################################################################
00027 */
00028 
00029 #ifndef EPState_H
00030 #define EPState_H
00031 
00032 #include <stresst.h>
00033 #include <straint.h>
00034 #include <BJtensor.h>
00035 
00036 #include <OPS_Globals.h>
00037 
00038 // Constants
00039 #define MaxNScalarVar 4
00040 #define MaxNTensorVar 4
00041 #define FALSE 0
00042 #define TRUE 1
00043 
00044 class EPState
00045 {
00046   public:
00047 //ZC05/2004    // Elastic parameters
00048 //ZC05/2004    double Eo;                    // Young's modulus when p = p_atmosphere  -- [in-plane] in terms of cross-anisotropic material
00049 //ZC05/2004    double E_Young;            // Young's modulus -- [in-plane] in terms of cross-anisotropic material
00050 //ZC05/2004    double nu_Poisson;            // Poisson's ratio -- [in-plane] in terms of cross-anisotropic materi          
00051 //ZC05/2004    double rho_mass_density;      // Mass density               
00052             
00053     // Trial state
00054     stresstensor CurrentStress;   // Current trial stress  --total          
00055     straintensor CurrentStrain;    // Current trial strain  --total       
00056     stresstensor IterativeStress; // Iterative Stress           
00057     straintensor ElasticStrain;    // Current cumulative elastic strain      
00058     straintensor PlasticStrain;    // Current cumulative plastic strain      
00059     straintensor dElasticStrain;  // Current elastic strain increment       
00060     straintensor dPlasticStrain;  // Current plastic strain increment       
00061     tensor       Eep;             // Current Elastic plastic stifness tensor
00062     int NScalarVar;               //Actual Number of internal scalar vars 
00063     int NTensorVar;               //Actual Number of internal tensor vars 
00064     
00065     double       ScalarVar[ MaxNScalarVar ]; // scalar variable array for scalar hardening vars 
00066     //static stresstensor TensorVar[ MaxNTensorVar ]; // tensor variable array for tensor hardening vars 
00067     stresstensor TensorVar[ MaxNTensorVar ]; // tensor variable array for tensor hardening vars 
00068     //straintensor TensorVar[ MaxNTensorVar ]; // tensor variable array for tensor hardening vars 
00069 
00070     // Commited state
00071     stresstensor Stress_commit;   // Commited stress  --total             
00072     straintensor Strain_commit;   // Commited strain  --total             
00073     straintensor ElasticStrain_commit; //GZ Mar2005
00074     //straintensor PlasticStrain
00075 
00076 
00077     double       ScalarVar_commit[ MaxNScalarVar ]; // Commited scalar variable array for scalar hardening vars 
00078     //static stresstensor TensorVar_commit[ MaxNTensorVar ]; // Commited tensor variable array for tensor hardening vars     
00079     stresstensor TensorVar_commit[ MaxNTensorVar ]; // Commited tensor variable array for tensor hardening vars 
00080     tensor       Eep_commit;      // Current Elastic plastic stifness tensor
00081 
00082     //Initial state
00083     stresstensor Stress_init;     // Initial stress  --total
00084     straintensor Strain_init;     // Initial strain  --total
00085     
00086     double       ScalarVar_init[ MaxNScalarVar ]; // initial scalar variable array for scalar hardening vars 
00087     //static stresstensor TensorVar_init[ MaxNTensorVar ]; // initial tensor variable array for tensor hardening vars     
00088     stresstensor TensorVar_init[ MaxNTensorVar ]; // initial tensor variable array for tensor hardening vars 
00089     tensor       Eep_init;             // initial Elastic plastic stifness tensor
00090 
00091     bool Converged;      // Bool to indicate whether this is the converged EPState by current CDriver
00092     
00093     double Delta_lambda; //Guanzhou Mar2005
00094 
00095 //ZC05/2004    // Flag to indicate if elastic portion is pressure dependent isotropic, pressure independent isotropic, pressure 
00096 //ZC05/2004    // independent cross-anisotropic or pressure dependentcross-anisotropic 
00097 //ZC05/2004    // 1 == pressure dependent isotropic (default case, for soil)
00098 //ZC05/2004    // 2 == pressure independent isotropic
00099 //ZC05/2004    // 3 == pressure independent cross-anisotropic
00100 //ZC05/2004    // 4 == pressure dependent cross-anisotropic
00101 //ZC05/2004
00102 //ZC05/2004    int Elasticflag;
00103 //ZC05/2004
00104 //ZC05/2004    //Parameters for elastic cross-anistropic material
00105 //ZC05/2004    double Ev;            // Ev: Young's modulus in a vertical direction -- [out-of-plane]
00106 //ZC05/2004    double nuhv;   // nuhv: Poisson's ratio for strain in the vertical direction due to a horizontal direct stress -- [out-of-plane]
00107 //ZC05/2004    double Ghv;          // Ghv: Modulus of shear deformation in a vertical plane -- [out-of-plane]
00108 //ZC05/2004
00109 //ZC05/2004    double eo;           // Initial void ratio Joey 02-11-03
00110 //ZC05/2004    double ec;           // Void ratio at critical state at po Joey 02-11-03
00111 //ZC05/2004    double Lambda;       // Slope of critical state line  Joey 02-11-03
00112 //ZC05/2004    double po;           // Reference pressure (100 kPa by default)  Joey 02-11-03
00113     double e;            // Void ratio  Joey 02-11-03
00114     double psi;          // State parameter  Joey 02-18-03
00115     int integratorFlag; //Guanzhou Mar2005
00116 //ZC05/2004    double a;            // Exponent in E = Eo (p/p_atm)^a for nonlinear elastic model Joey 02-11-03
00117     
00118   public:
00119     //Normal Constructor--no parameters
00120     EPState();
00121     ~EPState();
00122     
00123 //ZC05/2004     //Normal Constructor1
00124 //ZC05/2004     EPState(double              Eod,
00125 //ZC05/2004             double              Ed,
00126 //ZC05/2004             double              nu,
00127 //ZC05/2004              double              rho,
00128 //ZC05/2004             const stresstensor &stressp,
00129 //ZC05/2004             const straintensor &strainp,
00130 //ZC05/2004             const straintensor &Estrainp,
00131 //ZC05/2004             const straintensor &Pstrainp,
00132 //ZC05/2004             const straintensor &dEstrainp,
00133 //ZC05/2004             const straintensor &dPstrainp,
00134 //ZC05/2004             int                 NScalarp,
00135 //ZC05/2004              const double       *Scalarp,
00136 //ZC05/2004             int                 NTensorp,
00137 //ZC05/2004              const stresstensor *Tensorp,
00138 //ZC05/2004              const tensor       &Eepp,
00139 //ZC05/2004           const stresstensor &Stress_commitp,
00140 //ZC05/2004           const straintensor &Strain_commitp,    
00141 //ZC05/2004           const double       *Scalar_commitp,
00142 //ZC05/2004           const stresstensor *Tensor_commitp, 
00143 //ZC05/2004           const tensor       &Eep_commitp,
00144 //ZC05/2004           const stresstensor &Stress_initp,    
00145 //ZC05/2004           const straintensor &Strain_initp,   
00146 //ZC05/2004           const double       *Scalar_initp,
00147 //ZC05/2004           const stresstensor *Tensor_initp,
00148 //ZC05/2004           const tensor       &Eep_initp, 
00149 //ZC05/2004           bool                Convergedp,
00150 //ZC05/2004       int                 Elasticflagp = 0,
00151 //ZC05/2004       double              Evp   = 0.0,
00152 //ZC05/2004       double              nuhvp = 0.0,
00153 //ZC05/2004       double              Ghvp = 0.0,
00154 //ZC05/2004       double              eop = 0.85, 
00155 //ZC05/2004       double              ecp = 0.80, 
00156 //ZC05/2004       double              Lam = 0.025, 
00157 //ZC05/2004       double              pop = 100.0,
00158 //ZC05/2004       double              ep  = 0.85, 
00159 //ZC05/2004       double              psip = 0.05, 
00160 //ZC05/2004       double              ap  = 0.5
00161 //ZC05/2004       );
00162 //ZC05/2004 
00163 //ZC05/2004 
00164 //ZC05/2004     //Normal Constructor11
00165 //ZC05/2004     EPState(double              Eod,
00166 //ZC05/2004             double              Ed,
00167 //ZC05/2004             double              nu,
00168 //ZC05/2004             double              rho,
00169 //ZC05/2004             const stresstensor  stressp,       
00170 //ZC05/2004             const straintensor  strainp, 
00171 //ZC05/2004             const straintensor  Estrainp,
00172 //ZC05/2004             const straintensor  Pstrainp,
00173 //ZC05/2004       int                 NScalarp,
00174 //ZC05/2004       const double       *Scalarp,
00175 //ZC05/2004       int                 NTensorp,
00176 //ZC05/2004       const stresstensor *Tensorp, 
00177 //ZC05/2004       int                 Elasticflagp = 0,
00178 //ZC05/2004       double     Evp   = 0.0,
00179 //ZC05/2004       double              nuhvp = 0.0,
00180 //ZC05/2004       double              Ghvp = 0.0,
00181 //ZC05/2004       double              eop = 0.85,
00182 //ZC05/2004       double              ecp = 0.80,
00183 //ZC05/2004       double              Lam = 0.025, 
00184 //ZC05/2004       double              pop = 100.0,
00185 //ZC05/2004       double              ap = 0.5
00186 //ZC05/2004       );
00187 //ZC05/2004 
00188 //ZC05/2004     //Normal Constructor2
00189 //ZC05/2004     EPState(double              Eod,    
00190 //ZC05/2004             double              Ed,
00191 //ZC05/2004             double              nu,
00192 //ZC05/2004       double              rho,
00193 //ZC05/2004             int                 NScalarp,
00194 //ZC05/2004       const double       *Scalarp,
00195 //ZC05/2004       int                 NTensorp,
00196 //ZC05/2004       const stresstensor *Tensorp,
00197 //ZC05/2004       int                 Elasticflagp = 0,
00198 //ZC05/2004       double     Evp   = 0.0,
00199 //ZC05/2004       double              nuhvp = 0.0,
00200 //ZC05/2004       double              Ghvp = 0.0,
00201 //ZC05/2004       double              eop = 0.85,
00202 //ZC05/2004       double              ecp = 0.80,
00203 //ZC05/2004       double              Lam = 0.025, 
00204 //ZC05/2004       double              pop = 100.0,
00205 //ZC05/2004       double              ap = 0.5
00206 //ZC05/2004       );
00207 
00208     //Normal Constructor1
00209     EPState(const stresstensor &stressp,
00210             const straintensor &strainp,
00211             const straintensor &Estrainp,
00212             const straintensor &Pstrainp,
00213             const straintensor &dEstrainp,
00214             const straintensor &dPstrainp,
00215             int                 NScalarp,
00216             const double       *Scalarp,
00217             int                 NTensorp,
00218             const stresstensor *Tensorp,
00219             const tensor       &Eepp,
00220             const stresstensor &Stress_commitp,
00221             const straintensor &Strain_commitp,    
00222             const straintensor & ElasticStrain_commitp,
00223             const double       *Scalar_commitp,
00224             const stresstensor *Tensor_commitp, 
00225             const tensor       &Eep_commitp,
00226             const stresstensor &Stress_initp,    
00227             const straintensor &Strain_initp,   
00228             const double       *Scalar_initp,
00229             const stresstensor *Tensor_initp,
00230             const tensor       &Eep_initp, 
00231             bool                Convergedp, 
00232             double              ep  = 0.85,
00233             double              psip = 0.05,
00234             int flag = 0 );
00235 
00236     //Normal Constructor11
00237     EPState(const stresstensor  stressp,       
00238             const straintensor  strainp, 
00239             const straintensor  Estrainp,
00240             const straintensor  Pstrainp,
00241             int                 NScalarp,
00242             const double       *Scalarp,
00243             int                 NTensorp,
00244             const stresstensor *Tensorp, 
00245             double              ep = 0.85,
00246             double              psip = 0.05, 
00247             int flag = 0); //Guanzhou
00248 
00249     //Normal Constructor2
00250     EPState(int                 NScalarp,
00251             const double       *Scalarp,
00252             int                 NTensorp,
00253             const stresstensor *Tensorp );
00254 
00255     EPState *newObj();                 //create a clone of itself
00256     EPState( const EPState &rhs );     // Copy constructor    
00257     const EPState &operator=(const EPState &rhs );  //Overloading assignment
00258 
00259 //ZC05/2004    int getElasticflag() const;
00260 
00261 //ZC05/2004    double getE() const;
00262 //ZC05/2004    double getEo() const;
00263 //ZC05/2004    double getEv() const;
00264 //ZC05/2004    double getnu() const;
00265 //ZC05/2004    double getnuhv() const;
00266 //ZC05/2004    double getGhv() const;
00267 //ZC05/2004    double getrho() const;
00268 
00269     int getNScalarVar() const;
00270     int getNTensorVar() const;
00271     bool getConverged() const;
00272 
00273 //ZC05/2004    // Added Joey 02-12-03
00274 //ZC05/2004    double geteo() const;
00275 //ZC05/2004    double getec() const;
00276 //ZC05/2004    double getLam() const;
00277     double gete() const;
00278     double getpsi() const; //state parameter
00279     int getIntegratorFlag() const; //Guanzhou Mar 2005
00280 //ZC05/2004    double getpo() const;
00281 //ZC05/2004    double geta() const;
00282 
00283     stresstensor getStress() const;
00284     stresstensor getIterativeStress() const;
00285     straintensor getStrain() const;
00286     straintensor getElasticStrain() const;
00287     straintensor getPlasticStrain() const;
00288     straintensor getdElasticStrain() const;
00289     straintensor getdPlasticStrain() const;
00290     tensor getEep() const;
00291 
00292     //Get commited state vars
00293     stresstensor getStress_commit() const;
00294     straintensor getStrain_commit() const;
00295     straintensor getElasticStrain_commit() const;
00296     double * getScalarVar_commit();
00297     double getScalarVar_commit(int i);
00298     stresstensor * getTensorVar_commit();
00299     stresstensor getTensorVar_commit(int i);
00300     tensor getEep_commit() const;
00301 
00302     //Get initial state vars
00303     stresstensor getStress_init() const;
00304     straintensor getStrain_init() const;
00305     double * getScalarVar_init();
00306     double getScalarVar_init(int i);
00307     stresstensor * getTensorVar_init();
00308     stresstensor getTensorVar_init(int i);
00309     tensor getEep_init() const;
00310 
00311 //ZC05/2004    void setElasticflag( int efd );
00312 //ZC05/2004    void setEo( double Eod );
00313 //ZC05/2004    void setE( double Ey );
00314 //ZC05/2004    void setnu( double nud );
00315 
00316 //ZC05/2004    void setEv( double Evd );
00317 //ZC05/2004    void setGhv( double Ghvd );
00318 //ZC05/2004    void setnuhv( double nud );
00319 
00320     void setStress( const stresstensor &newstress );
00321     void setIterativeStress( const stresstensor &newstress );
00322     void setStrain( const straintensor &newstrain );
00323 
00324     void setStress_commit( const stresstensor &newstress );
00325     void setStrain_commit( const straintensor &newstrain );
00326     void setElasticStrain_commit( const straintensor &newstrain );
00327 
00328     void setStress_init( const stresstensor &newstress );
00329     void setStrain_init( const straintensor &newstrain );
00330 
00331     void setElasticStrain( const straintensor &newstrain );
00332     void setPlasticStrain( const straintensor &newstrain );
00333     void setdElasticStrain( const straintensor &newstrain );
00334     void setdPlasticStrain( const straintensor &newstrain );
00335     void setEep( const tensor &);
00336     void setConverged( bool b);
00337 
00338 //ZC05/2004    // Added Joey 02-12-03
00339 //ZC05/2004    void seteo( double eod );
00340 //ZC05/2004    void setec( double ecd );
00341 //ZC05/2004    void setLam( double Lamd );
00342     void sete( double ed );
00343     void setpsi( double psid );
00344 //ZC05/2004    void setpo( double pod );
00345 //ZC05/2004    void seta( double ad );
00346 
00347     // WhichOne starts from 1 and ends up to  NScalarVar
00348     double getScalarVar( int WhichOne) const;
00349     stresstensor getTensorVar(int WhichOne) const;
00350 
00351     // return the pointers
00352     double *getScalarVar();
00353     stresstensor *getTensorVar();
00354 
00355     // WhichOne starts from 1 and ends up to NTensorVar
00356     void setNScalarVar(int rval);
00357     void setScalarVar(int WhichOne, double rval);
00358     void setScalarVar_commit(int WhichOne, double rval);
00359     void setScalarVar_init(int WhichOne, double rval);
00360 
00361     void setNTensorVar(int rval);
00362     void setTensorVar(int WhichOne, const stresstensor &rval);
00363     void setTensorVar_commit(int WhichOne, const stresstensor &rval);
00364     void setTensorVar_init(int WhichOne, const stresstensor &rval);
00365 
00366     void setScalarVar(double *rval);
00367     void setTensorVar(const stresstensor *rval);
00368     void setInit();
00369 
00370     //added for OpenSees _Zhaohui 02-10-2000
00371     int commitState ();
00372     int revertToLastCommit ();
00373     int revertToStart ();
00374 
00375     void print();
00376 
00377     //================================================================================
00378     // Overloaded Insertion Operator
00379     // prints an EPState's contents 
00380     //================================================================================
00381     friend OPS_Stream & operator<< (OPS_Stream& os, const EPState & EPS);
00382     //friend ostream & operator<< (ostream& os, const EPState & EPS);
00383 
00384 };
00385 
00386 
00387 #endif
00388 

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