xc
PressureDependMultiYield02.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 // XC is free software: you can redistribute it and/or modify
14 // it under the terms of the GNU General Public License as 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 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU General Public License for more details.
22 //
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with this program.
26 // If not, see <http://www.gnu.org/licenses/>.
27 //----------------------------------------------------------------------------
28 //<<<<<<< PressureDependMultiYield.h
29 // $Revision: 1.5 $
30 // $Date: 2005/04/01 20:21:29 $
31 //=======
32 // $Revision: 1.5 $
33 // $Date: 2005/04/01 20:21:29 $
34 //>>>>>>> 1.7
35 // $Source: /usr/local/cvs/OpenSees/SRC/material/nD/soil/PressureDependMultiYield02.h,v $
36 
37 // Written: ZHY
38 // Created: May 2004
39 
40 
41 // Description: This file contains the class prototype for PressureDependMultiYield02.
42 //
43 // What: "@(#) PressureDependMultiYield02.h, revA"
44 
45 #ifndef PressureDependMultiYield02_h
46 #define PressureDependMultiYield02_h
47 
48 #include "material/nD/soil/PressureDependMultiYieldBase.h"
49 
50 
51 namespace XC {
52  class MultiYieldSurface;
53 
55 //
58  {
59  private:
60  // user supplied
61  static std::vector<double> contractParam2x;
62  static std::vector<double> contractParam3x;
63  static std::vector<double> dilateParam3x;
64 
65  mutable double damage;
66  mutable double check;
67  mutable T2Vector updatedTrialStress;
68 
69  mutable Vector PivotStrainRate;
70  Vector PivotStrainRateCommitted;
71 
72  // Called by constructor
73  void setUpSurfaces(const std::vector<double> &);
74  void initStrainUpdate(void);
75  void setupLocalMembers(int nd,
76  double rho,
77  double refShearModul,
78  double refBulkModul,
79  double frictionAng,
80  double peakShearStra,
81  double refPress,
82  double pressDependCoe,
83  double phaseTransformAngle,
84  double contractionParam1,
85  double contractionParam3,
86  double dilationParam1,
87  double dilationParam3,
88  int numberOfYieldSurf,
89  const std::vector<double> &gredu,
90  double contractionParam2,
91  double dilationParam2,
92  double liquefactionParam1,
93  double liquefactionParam2,
94  double e,
95  double volLimit1,
96  double volLimit2,
97  double volLimit3,
98  double atm,
99  double cohesi,
100  double hv,
101  double pv);
102 
103  // Return num_strain_subincre
104  int isCriticalState(const T2Vector & stress) const;
105  void updatePPZ(const T2Vector & stress) const;
106  void PPZTranslation(const T2Vector & contactStress) const;
107  double getPPZLimits(int which, const T2Vector &) const;
108  double getPlasticPotential(const T2Vector &,const T2Vector &) const;
109  //return 1 if stress locked; o/w return 0.
110  int stressCorrection(int crossedSurface) const;
111  protected:
112  int sendData(Communicator &);
113  int recvData(const Communicator &);
114  public:
115  // Initialization constructor
117  int nd,
118  double rho,
119  double refShearModul,
120  double refBulkModul,
121  double frictionAng,
122  double peakShearStra,
123  double refPress,
124  double pressDependCoe,
125  double phaseTransformAngle,
126  double contractionParam1,
127  double contractionParam3,
128  double dilationParam1,
129  double dilationParam3,
130  int numberOfYieldSurf = 20,
131  const std::vector<double> &gredu= std::vector<double>(),
132  double contractionParam2 = 5.,
133  double dilationParam2 = 3.,
134  double liquefactionParam1 = 1. ,
135  double liquefactionParam2 = 0. ,
136  double e = 0.6,
137  double volLimit1 = 0.9,
138  double volLimit2 = 0.02,
139  double volLimit3 = 0.7,
140  double atm = 101.,
141  double cohesi = 0.1,
142  double hv = 0.,
143  double pv = 1.);
144 
146  // Default constructor
148 
149  // Copy constructor
151 
152  void setup(int nd,
153  double rho,
154  double refShearModul,
155  double refBulkModul,
156  double frictionAng,
157  double peakShearStra,
158  double refPress,
159  double pressDependCoe,
160  double phaseTransformAngle,
161  double contractionParam1,
162  double contractionParam3,
163  double dilationParam1,
164  double dilationParam3,
165  int numberOfYieldSurf,
166  const std::vector<double> &gredu,
167  double contractionParam2,
168  double dilationParam2,
169  double liquefactionParam1,
170  double liquefactionParam2,
171  double e,
172  double volLimit1,
173  double volLimit2,
174  double volLimit3,
175  double atm,
176  double cohesi,
177  double hv,
178  double pv);
179 
180  void setupPy(const boost::python::dict &);
181 
182  // Calculates current tangent stiffness.
183  const Matrix &getTangent(void) const;
184 
185  // Calculates the corresponding stress increment (rate), for a given strain increment.
186  const Vector &getStress(void) const;
187  const Vector &getCommittedStress(void);
188 
189  int setTrialStrain(const Tensor &v) {return 0;}
190  int setTrialStrain(const Tensor &v, const Tensor &r) {return 0;}
191  int setTrialStrainIncr(const Tensor &v) {return 0;}
192  int setTrialStrainIncr(const Tensor &v, const Tensor &r) {return 0;}
193 
194  // Return an exact copy of itself.
195  NDMaterial *getCopy(void) const;
196 
197  // Return a copy of itself if "code"="PressureDependMultiYield02", otherwise return null.
198  NDMaterial *getCopy(const std::string &) const;
199 
200  // Return the string "PressureDependMultiYield02".
201  const std::string &getType(void) const ;
202 
203  int sendSelf(Communicator &);
204  int recvSelf(const Communicator &);
205  void Print(std::ostream &s, int flag =0) const;
206  //void setCurrentStress(const Vector stress) { currentStress=T2Vector(stress); }
207 
208  // RWB; PyLiq1 & TzLiq1 need to see the excess pore pressure and initial stresses.
209  friend class PyLiq1;
210  friend class TzLiq1;
211  };
212 } // end of XC namespace
213 
214 #endif
void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: PressureDependMultiYield02.cpp:597
Float vector abstraction.
Definition: Vector.h:94
Definition: setup.py:1
const Vector & getStress(void) const
Returns the material stress vector at the current trial strain.
Definition: PressureDependMultiYield02.cpp:420
int recvData(const Communicator &)
Receives object members through the communicator argument.
Definition: PressureDependMultiYield02.cpp:555
Communication parameters between processes.
Definition: Communicator.h:66
NDMaterial * getCopy(void) const
Virtual constructor.
Definition: PressureDependMultiYield02.cpp:524
int sendSelf(Communicator &)
Send the object.
Definition: PressureDependMultiYield02.cpp:565
int setTrialStrain(const Tensor &v, const Tensor &r)
Set trial strain value.
Definition: PressureDependMultiYield02.h:190
Uniaxial p-y material that incorporates liquefaction effects.
Definition: PyLiq1.h:61
int sendData(Communicator &)
Send object members through the communicator argument.
Definition: PressureDependMultiYield02.cpp:544
int recvSelf(const Communicator &)
Receive the object.
Definition: PressureDependMultiYield02.cpp:579
int setTrialStrain(const Tensor &v)
Set trial strain value.
Definition: PressureDependMultiYield02.h:189
Uniaxial t-z material that incorporates liquefaction effects.
Definition: TzLiq1.h:61
void setupPy(const boost::python::dict &)
Python version of the setup method.
Definition: PressureDependMultiYield02.cpp:226
??.
Definition: PressureDependMultiYieldBase.h:44
Base class for 2D and 3D materials.
Definition: NDMaterial.h:101
const Matrix & getTangent(void) const
Return the material tangent stiffness.
Definition: PressureDependMultiYield02.cpp:297
int setTrialStrainIncr(const Tensor &v, const Tensor &r)
Set trial strain increment.
Definition: PressureDependMultiYield02.h:192
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Matrix of floats.
Definition: Matrix.h:111
Second order tensor vector class.
Definition: T2Vector.h:65
int setTrialStrainIncr(const Tensor &v)
Set trial strain increment.
Definition: PressureDependMultiYield02.h:191
const Vector & getCommittedStress(void)
Returns committed stresses.
Definition: PressureDependMultiYield02.cpp:603
PressureDependMultiYield materials are elastic-plastic materials for simulating the essential respons...
Definition: PressureDependMultiYield02.h:57