XC Open source finite element analysis program
Template3Dep.h
1 //----------------------------------------------------------------------------
2 // XC program; finite element analysis code
3 // for structural analysis and design.
4 //
5 // Copyright (C) Luis Claudio Pérez Tato
6 //
7 // This program derives from OpenSees <http://opensees.berkeley.edu>
8 // developed by the «Pacific earthquake engineering research center».
9 //
10 // Except for the restrictions that may arise from the copyright
11 // of the original program (see copyright_opensees.txt)
12 // XC is free software: you can redistribute it and/or modify
13 // it under the terms of the GNU General Public License as published by
14 // the Free Software Foundation, either version 3 of the License, or
15 // (at your option) any later version.
16 //
17 // This software is distributed in the hope that it will be useful, but
18 // WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this program.
25 // If not, see <http://www.gnu.org/licenses/>.
26 //----------------------------------------------------------------------------
27 /*
28 ################################################################################
29 # COPYRIGHT (C): :-)) #
30 # PROJECT: Object Oriented Finite Element Program #
31 # PURPOSE: General platform for elaso-plastic constitutive model #
32 # implementation #
33 # CLASS: Template3Dep (the base class for all material point) #
34 # #
35 # VERSION: #
36 # LANGUAGE: C++.ver >= 2.0 ( Borland C++ ver=3.00, SUN C++ ver=2.1 ) #
37 # TARGET OS: DOS || UNIX || . . . #
38 # DESIGNER(S): Boris Jeremic, Zhaohui Yang #
39 # PROGRAMMER(S): Boris Jeremic, Zhaohui Yang #
40 # #
41 # #
42 # DATE: 08-03-2000 #
43 # UPDATE HISTORY: 09-12-2000 #
44 # May 2004, Zhao Cheng spliting the elastic part #
45 # #
46 # #
47 # SHORT EXPLANATION: The Template3Dep class is used to hold specific #
48 # yield surface, potential surface, Evolution law(s) #
49 # and EPState of a 3D elasto-plastic material model for one #
50 # gauss point!! It is worthwhile noting that one model may #
51 # have multiple evolution law. Each evlotuion law is #
52 # used to evolve one internal var. #
53 # #
54 # #
55 ################################################################################
56 */
57 
58 #ifndef Template3Dep_H
59 #define Template3Dep_H
60 
61 #include <material/nD/NDMaterial.h>
62 
63 namespace XC {
64 class YieldSurface;
65 class PotentialSurface;
66 class EvolutionLaw_S;
67 class EvolutionLaw_T;
68 class EPState;
69 
71 //
73 //
75 //
82 class Template3Dep : public NDMaterial
83  {
84  private:
85 
86  NDMaterial *theElasticMat;
87 
88  YieldSurface *YS;
89 
90  PotentialSurface *PS;
91 
92  EPState *EPS;
93 
94  //Scalar variable evolution laws (currently at most 4 allowed)
95  EvolutionLaw_S *ELS1;
96  EvolutionLaw_S *ELS2;
97  EvolutionLaw_S *ELS3;
98  EvolutionLaw_S *ELS4;
99 
100  //Tensorial variable evolution laws (currently at most 4 allowed)
101  EvolutionLaw_T *ELT1;
102  EvolutionLaw_T *ELT2;
103  EvolutionLaw_T *ELT3;
104  EvolutionLaw_T *ELT4;
105 
106  public:
107  // constructor
108  Template3Dep( int tag ,
109  NDMaterial &theElMat,
110  YieldSurface *YS_ ,
111  PotentialSurface *PS_ ,
112  EPState *EPS_,
113  EvolutionLaw_S *ELS1_ ,
114  EvolutionLaw_S *ELS2_ ,
115  EvolutionLaw_S *ELS3_ ,
116  EvolutionLaw_S *ELS4_ ,
117  EvolutionLaw_T *ELT1_ ,
118  EvolutionLaw_T *ELT2_ ,
119  EvolutionLaw_T *ELT3_ ,
120  EvolutionLaw_T *ELT4_ );
121 
122  // Constructor0
123  // If no evolution law is provided, then there will be no hardening or softening!
124  Template3Dep( int tag ,
125  NDMaterial &theElMat,
126  YieldSurface *YS_ ,
127  PotentialSurface *PS_ ,
128  EPState *EPS_);
129 
130  // Constructor1
131  // Only one scalar evolution law is provided!
132  Template3Dep( int tag ,
133  NDMaterial &theElMat,
134  YieldSurface *YS_ ,
135  PotentialSurface *PS_ ,
136  EPState *EPS_,
137  EvolutionLaw_S *ELS1_ );
138 
139  // Constructor2
140  // Only one tensorial evolution law is provided!
141  Template3Dep( int tag ,
142  NDMaterial &theElMat,
143  YieldSurface *YS_ ,
144  PotentialSurface *PS_ ,
145  EPState *EPS_,
146  EvolutionLaw_T *ELT1_ );
147 
148  // Constructor 3
149  // One scalar evolution law and one tensorial evolution law are provided!
150  Template3Dep( int tag ,
151  NDMaterial &theElMat,
152  YieldSurface *YS_ ,
153  PotentialSurface *PS_ ,
154  EPState *EPS_,
155  EvolutionLaw_S *ELS1_,
156  EvolutionLaw_T *ELT1_ );
157 
158  // Constructor 4
159  // Two scalar evolution laws and one tensorial evolution law are provided!
160  Template3Dep( int tag ,
161  NDMaterial &theElMat,
162  YieldSurface *YS_ ,
163  PotentialSurface *PS_ ,
164  EPState *EPS_,
165  EvolutionLaw_S *ELS1_,
166  EvolutionLaw_S *ELS2_,
167  EvolutionLaw_T *ELT1_ );
168 
169  // Constructor 5
170  // Two scalar evolution laws and two tensorial evolution laws are provided!
171  Template3Dep( int tag ,
172  NDMaterial &theElMat,
173  YieldSurface *YS_ ,
174  PotentialSurface *PS_ ,
175  EPState *EPS_,
176  EvolutionLaw_S *ELS1_,
177  EvolutionLaw_S *ELS2_,
178  EvolutionLaw_T *ELT1_,
179  EvolutionLaw_T *ELT2_ );
180 
181  Template3Dep(int tag);
182  // For parallel processing
183  Template3Dep(void);
184  virtual ~Template3Dep(void);
185 
186  // methods to set state and retrieve state using Matrix and Vector classes
187  int setTrialStrain(const Vector &v);
188  int setTrialStrain(const Vector &v, const Vector &r);
189  int setTrialStrainIncr(const Vector &v) ;
190  int setTrialStrainIncr(const Vector &v, const Vector &r) ;
191  const Matrix &getTangent(void) const;
192  const Matrix &getInitialTangent(void) const;
193 
194  const Vector &getStress(void) const;
195  const Vector &getStrain(void) const;
196 
197  // methods to set and retrieve state using the Tensor class
198  int setTrialStrain(const Tensor &v) ;
199  int setTrialStrain(const Tensor &v, const Tensor &r) ;
200  int setTrialStrainIncr(const Tensor &v) ;
201  int setTrialStrainIncr(const Tensor &v, const Tensor &r) ;
202  const Tensor &getTangentTensor(void) const;
203  const stresstensor &getStressTensor(void) const;
204  const straintensor &getStrainTensor(void) const;
205  const straintensor &getPlasticStrainTensor(void) const; //Added Joey Aug. 13, 2001
206  double getpsi(void); //Added Joey 02-18-03
207 
208  EPState * getEPS() const;
209  void setEPS( EPState &eps);
210 
211  int commitState(void);
212  int revertToLastCommit(void);
213  int revertToStart(void);
214 
215  NDMaterial *getCopy(void) const;
216  NDMaterial *getCopy(const std::string &) const;
217 
218  const std::string &getType(void) const ;
219  int getOrder(void) const ;
220 
221  int sendSelf(CommParameters &);
222  int recvSelf(const CommParameters &);
223 
224  void Print(std::ostream &s, int flag =0);
225 
226  //Private Utility method
227  //private:
228 
229  //These are from formerly CDriver
230  EPState ForwardEulerEPState( const straintensor &strain_increment);
231 
232  EPState SemiBackwardEulerEPState( const straintensor &strain_increment);
233 
234  EPState FESubIncrementation( const straintensor &strain_increment,
235  int number_of_subincrements);
236 
237  EPState BackwardEulerEPState( const straintensor &strain_increment);
238 
239  EPState BESubIncrementation( const straintensor & strain_increment,
240  int number_of_subincrements);
241  private:
242 
243  //================================================================================
244  // this one is intended to shell the previous three and to decide
245  // ( according to the data stored in Material_Model object )
246  // which constitutive tensor to return ( forward ( non-constistent
247  // or backward ( consistent ) or . . .
248 
249  //virtual tensor ConstitutiveTensor(stresstensor & final_stress,
250  // stresstensor & start_stress,
251  // straintensor & strain_increment,
252  // Material_Model & Criterion,
253  // double just_this_PP );
254 
255 
256  //================================================================================
257  // trying to find intersection point
258  // according to M. Crisfield's book
259  // "Non-linear Finite Element Analysis of Solids and Structures "
260  // chapter 6.6.1 page 168.
261  //================================================================================
262  EPState PredictorEPState(straintensor & strain_increment);
263 
264  stresstensor yield_surface_cross(const stresstensor & start_stress,
265  const stresstensor & end_stress);
266 
267  double zbrentstress(const stresstensor & start_stress,
268  const stresstensor & end_stress,
269  double x1, double x2, double tol);
270 
271  double func( const stresstensor &start_stress,
272  const stresstensor &end_stress,
273  double alfa );
274 
275  public:
276  BJtensor ElasticComplianceTensor(void) const;
277  BJtensor ElasticStiffnessTensor(void) const;
278 
279  private:
280  NDMaterial * getElMat() const;
281  YieldSurface * getYS() const;
282  PotentialSurface * getPS() const;
283 
284  //EPState &getEPS(void);
285 
286  //get scalar evolution laws
287  EvolutionLaw_S * getELS1() const;
288  EvolutionLaw_S * getELS2() const;
289  EvolutionLaw_S * getELS3() const;
290  EvolutionLaw_S * getELS4() const;
291 
292  //get tensorial evolution laws
293  EvolutionLaw_T * getELT1() const;
294  EvolutionLaw_T * getELT2() const;
295  EvolutionLaw_T * getELT3() const;
296  EvolutionLaw_T * getELT4() const;
297 
298 
299  friend std::ostream& operator<< (std::ostream& os, const Template3Dep & MP);
300  };
301 } // end of XC namespace
302 
303 
304 #endif
305 
const Matrix & getTangent(void) const
Return the tangent stiffness matrix.
Definition: Template3Dep.cpp:1073
EPState BackwardEulerEPState(const straintensor &strain_increment)
Definition: Template3Dep.cpp:2261
int setTrialStrainIncr(const Vector &v)
Asigna el valor del incremento de la trial strain.
Definition: Template3Dep.cpp:1058
Definition: BJtensor.h:110
??.
Definition: EL_S.h:71
Base class for 2D and 3D materials.
Definition: NDMaterial.h:91
Definition: Vector.h:82
??.
Definition: EL_T.h:69
The goal is to create a platform for efficient and easy implemetation of any elasto-plastic constitut...
Definition: YS.h:70
const Vector & getStrain(void) const
Returns strain.
Definition: Template3Dep.cpp:1093
3
Definition: Template3Dep.h:82
Definition: stresst.h:68
NDMaterial * getCopy(void) const
Virtual constructor.
Definition: Template3Dep.cpp:1274
Strain tensor.
Definition: straint.h:67
const Vector & getStress(void) const
Returns stress.
Definition: Template3Dep.cpp:1085
Definition: Matrix.h:82
3
Definition: EPState.h:73
int setTrialStrain(const Vector &v)
Asigna el trial strain value.
Definition: Template3Dep.cpp:1044
void Print(std::ostream &s, int flag=0)
Imprime el objeto.
Definition: Template3Dep.cpp:1317
Communication parameters between processes.
Definition: CommParameters.h:65
The goal is to create a platform for efficient and easy implemetation of any elasto-plastic constitut...
Definition: PS.h:71
================================================================================
Definition: ContinuaReprComponent.h:34