XC Open source finite element analysis program
PressureIndependMultiYield.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 // $Revision: 1.15 $
28 // $Date: 2004/06/15 18:58:01 $
29 // $Source: /usr/local/cvs/OpenSees/SRC/material/nD/soil/PressureIndependMultiYield.h,v $
30 
31 // Written: ZHY
32 // Created: August 2000
33 
34 // Description: This file contains the class prototype for PressureIndependMultiYield.
35 //
36 // What: "@(#) PressureIndependMultiYield.h, revA"
37 
38 #ifndef PressureIndependMultiYield_h
39 #define PressureIndependMultiYield_h
40 
41 #include "PressureMultiYieldBase.h"
42 #include "T2Vector.h"
43 
44 namespace XC {
45 
47 //
50  {
51  private:
52 
53  // user supplied
54 
55  // internal
56  mutable double refShearModulus;
57  mutable double refBulkModulus;
58 
59  void elast2Plast(void) const;
60  // Called by constructor
61  void setUpSurfaces(double *);
62 
63  double yieldFunc(const T2Vector & stress, const std::vector<MultiYieldSurface> &,int surface_num) const;
64 
65  void deviatorScaling(T2Vector &,const std::vector<MultiYieldSurface> &,int, int count=0) const;
66 
67  void initSurfaceUpdate(void) const;
68 
69  void paramScaling(void) const;
70 
71  // Return num_strain_subincre
72  int setSubStrainRate(void) const;
73 
74  int isLoadReversal(void) const;
75  void getContactStress(T2Vector &) const;
76  void getSurfaceNormal(const T2Vector &,Vector &) const;
77  void setTrialStress(const T2Vector &stress) const;
78  double getLoadingFunc(const T2Vector & contact, const Vector & surfaceNormal,int crossedSurface) const;
79 
80  void stressCorrection(int crossedSurface) const;
81 
82  void updateActiveSurface(void) const;
83 
84  void updateInnerSurface(void) const;
85 
86  // Return 1 if crossing the active surface; return 0 o/w
87  int isCrossingNextSurface(void) const;
88  protected:
89  int sendData(CommParameters &);
90  int recvData(const CommParameters &);
91  public:
92  // Initialization constructor
94  int nd,
95  double rho,
96  double refShearModul,
97  double refBulkModul,
98  double cohesi,
99  double peakShearStra,
100  double frictionAng = 0.,
101  double refPress = 100,
102  double pressDependCoe = 0.0,
103  int numberOfYieldSurf = 20,
104  double * gredu = 0);
105 
106  PressureIndependMultiYield(int tag= 0);
107 
108  void setup(int nd, double r, double refShearModul, double refBulkModul, double cohesi, double peakShearStra, double frictionAng, double refPress, double pressDependCoe, int numberOfYieldSurf, double * gredu);
109 
110  double getRho(void) const
111  {return rhox[matN];} ;
112  // Sets the values of the trial strain tensor.
113  int setTrialStrain(const Vector &strain);
114 
115  // Sets the values of the trial strain and strain rate tensors.
116  int setTrialStrain(const Vector &v, const Vector &r);
117 
118  int setTrialStrainIncr(const Vector &v);
119  int setTrialStrainIncr(const Vector &v, const Vector &r);
120 
121  // Calculates current tangent stiffness.
122  const Matrix &getTangent(void) const;
123  const Matrix &getInitialTangent(void) const;
124 
125  void getBackbone(Matrix &);
126 
127  // Calculates the corresponding stress increment(rate), for a given strain increment.
128  const Vector &getStress(void) const;
129  const Vector &getStrain(void) const;
130  const Vector &getCommittedStress(void) const;
131  const Vector &getCommittedStrain(void) const;
132 
133  int setTrialStrain(const Tensor &v) {return 0;}
134  int setTrialStrain(const Tensor &v, const Tensor &r) {return 0;}
135  int setTrialStrainIncr(const Tensor &v) {return 0;}
136  int setTrialStrainIncr(const Tensor &v, const Tensor &r) {return 0;}
137 
138  // Accepts the current trial strain values as being on the solution path, and updates
139  // all model parameters related to stress/strain states. Return 0 on success.
140  int commitState(void);
141 
142  // Revert the stress/strain states to the last committed states. Return 0 on success.
143  int revertToLastCommit(void);
144 
145  int revertToStart(void) {return 0;}
146 
147  // Return an exact copy of itself.
148  NDMaterial *getCopy(void) const;
149 
150  // Return a copy of itself if "code"="PressureIndependMultiYield", otherwise return null.
151  NDMaterial *getCopy(const std::string &) const;
152 
153  // Return the string "PressureIndependMultiYield".
154  const std::string &getType(void) const ;
155 
156  // Return ndm.
157  int getOrder(void) const ;
158 
159  int sendSelf(CommParameters &);
160  int recvSelf(const CommParameters &);
161 
162  Response *setResponse(const std::vector<std::string> &argv, Information &matInfo);
163  int getResponse(int responseID, Information &matInformation);
164  void Print(std::ostream &s, int flag =0);
165 
166  //void setCurrentStress(const Vector stress) { currentStress=T2Vector(stress); }
167  int updateParameter(int responseID, Information &eleInformation);
168 
169  // RWB; PyLiq1 & TzLiq1 need to see the excess pore pressure and initial stresses.
170  friend class PyLiq1;
171  friend class TzLiq1;
172  };
173 } // end of XC namespace
174 
175 #endif
176 
177 
178 
int setTrialStrain(const Vector &strain)
Asigna el trial strain value.
Definition: PressureIndependMultiYield.cpp:130
??.
Definition: TzLiq1.h:60
int setTrialStrainIncr(const Tensor &v)
Asigna el valor del incremento de la trial strain.
Definition: PressureIndependMultiYield.h:135
NDMaterial * getCopy(void) const
Virtual constructor.
Definition: PressureIndependMultiYield.cpp:385
Tensor de segundo orden.
Definition: T2Vector.h:67
const Vector & getStress(void) const
Returns stress.
Definition: PressureIndependMultiYield.cpp:293
int sendData(CommParameters &)
Send object members through the channel being passed as parameter.
Definition: PressureIndependMultiYield.cpp:422
Base class for 2D and 3D materials.
Definition: NDMaterial.h:91
Definition: Vector.h:82
int sendSelf(CommParameters &)
Sends object through the channel being passed as parameter.
Definition: PressureIndependMultiYield.cpp:438
int setTrialStrain(const Tensor &v)
Asigna el trial strain value.
Definition: PressureIndependMultiYield.h:133
const Matrix & getTangent(void) const
Return the tangent stiffness matrix.
Definition: PressureIndependMultiYield.cpp:194
void Print(std::ostream &s, int flag=0)
Imprime el objeto.
Definition: PressureIndependMultiYield.cpp:560
Information about an element.
Definition: Information.h:80
const Vector & getStrain(void) const
Returns strain.
Definition: PressureIndependMultiYield.cpp:351
int recvData(const CommParameters &)
Receives object members through the channel being passed as parameter.
Definition: PressureIndependMultiYield.cpp:430
??.
Definition: PressureIndependMultiYield.h:49
int recvSelf(const CommParameters &)
Receives object through the channel being passed as parameter.
Definition: PressureIndependMultiYield.cpp:452
Definition: Matrix.h:82
??.
Definition: PressureMultiYieldBase.h:43
??.
Definition: PyLiq1.h:62
Communication parameters between processes.
Definition: CommParameters.h:65
================================================================================
Definition: ContinuaReprComponent.h:34
int setTrialStrainIncr(const Vector &v)
Asigna el valor del incremento de la trial strain.
Definition: PressureIndependMultiYield.cpp:165
Definition: Response.h:71
int getResponse(int responseID, Information &matInformation)
Returns material response.
Definition: PressureIndependMultiYield.cpp:493