xc
J2Plasticity.h
1 // -*-c++-*-
2 //----------------------------------------------------------------------------
3 // XC program; finite element analysis code
4 // for structural analysis and design.
5 //
6 // Copyright (C) Luis C. Pérez Tato
7 //
8 // This program derives from OpenSees <http://opensees.berkeley.edu>
9 // developed by the «Pacific earthquake engineering research center».
10 //
11 // Except for the restrictions that may arise from the copyright
12 // of the original program (see copyright_opensees.txt)
13 // software es libre: usted puede redistribuirlo y/o modificarlo
14 // under the terms of the GNU General Public License published by
15 // the Free Software Foundation, either version 3 of the License, or
16 // (at your option) any later version.
17 //
18 // This software is distributed in the hope that it will be useful, but
19 // WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCANTIL o de APTITUD PARA UN PROPÓSITO DETERMINADO.
21 // GNU General Public License for more details.
22 //
23 // You should have received a copy of the GNU General Public License
24 // junto a este programa.
25 // If not, see <http://www.gnu.org/licenses/>.
26 //----------------------------------------------------------------------------
27 /* ****************************************************************** **
28 ** OpenSees - Open System for Earthquake Engineering Simulation **
29 ** Pacific Earthquake Engineering Research Center **
30 ** **
31 ** **
32 ** (C) Copyright 1999, The Regents of the University of California **
33 ** All Rights Reserved. **
34 ** **
35 ** Commercial use of this program without express permission of the **
36 ** University of California, Berkeley, is strictly prohibited. See **
37 ** file 'COPYRIGHT' in main directory for information on usage and **
38 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
39 ** **
40 ** ****************************************************************** */
41 
42 // $Revision: 1.4 $
43 // $Date: 2003/02/14 23:01:25 $
44 // $Source: /usr/local/cvs/OpenSees/SRC/material/nD/J2Plasticity.h,v $
45 
46 #ifndef J2Plasticity_h
47 #define J2Plasticity_h
48 
49 // Written: Ed "C++" Love
50 //
51 // J2 isotropic hardening material class
52 //
53 // Elastic Model
54 // sigma = K*trace(epsilion_elastic) + (2*G)*dev(epsilon_elastic)
55 //
56 // Yield Function
57 // phi(sigma,q) = || dev(sigma) || - sqrt(2/3)*q(xi)
58 //
59 // Saturation Isotropic Hardening with linear term
60 // q(xi) = sigma_0 + (sigma_infty - sigma_0)*exp(-delta*xi) + H*xi
61 //
62 // Flow Rules
63 // \dot{epsilon_p} = gamma * d_phi/d_sigma
64 // \dot{xi} = -gamma * d_phi/d_q
65 //
66 // Linear Viscosity
67 // gamma = phi / eta ( if phi > 0 )
68 //
69 // Backward Euler Integration Routine
70 // Yield condition enforced at time n+1
71 //
72 // set eta := 0 for rate independent case
73 //
74 
75 
76 #include "utility/matrix/Vector.h"
77 #include "utility/matrix/Matrix.h"
78 #include "material/nD/NDMaterial.h"
79 
80 
81 namespace XC{
82 
84 // ===== Group documentation begins. =====
89 // ===== Group documentation ends. =====
90 //
97 class J2Plasticity: public NDMaterial
98  {
99  protected :
100  //material parameters
101  double bulk;
102  double shear;
103  double sigma_0;
104  double sigma_infty;
105  double delta;
106  double Hard;
107  double eta;
108 
109  //internal variables
112  double xi_n;
113  double xi_nplus1;
114 
115  //material response
117  static constexpr int tDim= 3;
118  double tangent[tDim][tDim][tDim][tDim];
119  static double initialTangent[tDim][tDim][tDim][tDim];
120  static double IIdev[tDim][tDim][tDim][tDim];
121  static double IbunI[tDim][tDim][tDim][tDim];
122 
123  //material input
125 
126  //parameters
127  static constexpr double one3= (1/3);
128  static constexpr double two3= (2/3);
129  static constexpr double four3= (4/3);
130  static const double root23;
131 
132 
133  void zero( );//zero internal variables
134  void plastic_integrator( );//plasticity integration routine
135  void doInitialTangent(void) const;
136 
137  double q( double xi );//hardening function
138  double qprime( double xi );//hardening function derivative
139 
140  //matrix index to tensor index mapping
141  virtual void index_map( int matrix_index, int &i, int &j ) const;
142 
143  int sendData(Communicator &);
144  int recvData(const Communicator &);
145  public:
146  //null constructor
147  J2Plasticity();
148  //full constructor
149  J2Plasticity(int tag, int classTag,
150  double K,
151  double G,
152  double yield0,
153  double yield_infty,
154  double d,
155  double H,
156  double viscosity = 0 );
157  J2Plasticity(int tag, int classTag);
158  //elastic constructor
159  J2Plasticity( int tag, int classTag, double K, double G );
160 
161  virtual NDMaterial* getCopy(const std::string &) const;
162 
163  void setup(const double &K= 0.0, const double &G= 0.0, const double &yield0= 0.0, const double &yield_infty= 0.0, const double &d= 0.0, const double &H= 0.0, const double &viscosity= 0.0);
164  //swap history variables
165  virtual int commitState(void);
166  //revert to last saved state
167  virtual int revertToLastCommit(void);
168  //revert to start
169  virtual int revertToStart(void);
170 
171  //sending and receiving
172  virtual int sendSelf(Communicator &);
173  virtual int recvSelf(const Communicator &);
174 
175  //print out material data
176  void Print(std::ostream &s, int flag = 0) const;
177 
178  virtual NDMaterial *getCopy(void) const;
179  virtual const std::string &getType(void) const;
180  virtual int getOrder(void) const;
181  };
182 
183 } //end of XC namespace
184 
185 #endif
virtual int commitState(void)
Commit material state.
Definition: J2Plasticity.cpp:544
virtual int revertToStart(void)
Revert to start.
Definition: J2Plasticity.cpp:556
double sigma_0
initial yield stress
Definition: J2Plasticity.h:103
Base class for J2 isotropic hardening materials.The von Mises theory is often called “J2 plasticityâ€...
Definition: J2Plasticity.h:97
virtual int recvSelf(const Communicator &)
Receives object through the communicator argument.
Definition: J2Plasticity.cpp:616
Communication parameters between processes.
Definition: Communicator.h:66
Matrix epsilon_p_nplus1
plastic strain time n+1
Definition: J2Plasticity.h:111
void doInitialTangent(void) const
Set up for initial elastic.
Definition: J2Plasticity.cpp:429
double delta
exponential hardening parameter
Definition: J2Plasticity.h:105
Matrix strain
strain tensor
Definition: J2Plasticity.h:124
J2Plasticity()
Default constructor.
Definition: J2Plasticity.cpp:171
virtual int sendSelf(Communicator &)
Sends object through the communicator argument.
Definition: J2Plasticity.cpp:601
void zero()
Zero internal variables.
Definition: J2Plasticity.cpp:92
double Hard
linear hardening parameter
Definition: J2Plasticity.h:106
Matrix epsilon_p_n
plastic strain time n
Definition: J2Plasticity.h:110
double q(double xi)
Hardening function.
Definition: J2Plasticity.cpp:457
double xi_nplus1
xi time n+1
Definition: J2Plasticity.h:113
double qprime(double xi)
Hardening function derivative.
Definition: J2Plasticity.cpp:465
static double initialTangent[tDim][tDim][tDim][tDim]
material tangent
Definition: J2Plasticity.h:119
double bulk
bulk modulus: ratio between pressure increase and the resulting decrease in a material&#39;s volume...
Definition: J2Plasticity.h:101
double eta
viscosity
Definition: J2Plasticity.h:107
virtual NDMaterial * getCopy(void) const
Virtual constructor.
Definition: J2Plasticity.cpp:518
Base class for 2D and 3D materials.
Definition: NDMaterial.h:101
int sendData(Communicator &)
Send object members through the communicator argument.
Definition: J2Plasticity.cpp:564
int recvData(const Communicator &)
Receives object members through the communicator argument.
Definition: J2Plasticity.cpp:582
Matrix stress
stress tensor
Definition: J2Plasticity.h:116
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
double tangent[tDim][tDim][tDim][tDim]
tensor dimension
Definition: J2Plasticity.h:118
virtual int revertToLastCommit(void)
Revert to the last committed state.
Definition: J2Plasticity.cpp:552
double xi_n
xi time n
Definition: J2Plasticity.h:112
Matrix of floats.
Definition: Matrix.h:111
static double IIdev[tDim][tDim][tDim][tDim]
rank 4 deviatoric
Definition: J2Plasticity.h:120
static double IbunI[tDim][tDim][tDim][tDim]
rank 4 I bun I
Definition: J2Plasticity.h:121
double shear
shear modulus
Definition: J2Plasticity.h:102
void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: J2Plasticity.cpp:238
double sigma_infty
final saturation yield stress (often comparable to the ultimate tensile strength).
Definition: J2Plasticity.h:104
void plastic_integrator()
Plasticity integration routine.
Definition: J2Plasticity.cpp:257
void setup(const double &K=0.0, const double &G=0.0, const double &yield0=0.0, const double &yield_infty=0.0, const double &d=0.0, const double &H=0.0, const double &viscosity=0.0)
Setup internal variables.
Definition: J2Plasticity.cpp:106