XC Open source finite element analysis program
PressureDependMultiYieldBase.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 //PressureDependMultiYieldBase.h
28 
29 #ifndef PressureDependMultiYieldBase_h
30 #define PressureDependMultiYieldBase_h
31 
32 #include "PressureMultiYieldBase.h"
33 #include "T2Vector.h"
34 
35 
36 namespace XC {
37 
38 class MultiYieldSurface;
39 
41 //
44  {
45  protected:
46  // user supplied
47  static double* refShearModulusx;
48  static double* refBulkModulusx;
49  static double* phaseTransfAnglex;
50  static double* contractParam1x;
51  static double* dilateParam1x;
52  static double* dilateParam2x;
53  static double* einitx; //initial void ratio
54  static double* liquefyParam1x;
55  static double* liquefyParam2x;
56  static double* volLimit1x;
57  static double* volLimit2x;
58  static double* volLimit3x;
59  static double pAtm;
60  static double* Hvx;
61  static double* Pvx;
62 
63  // internal
64 
65  mutable double modulusFactor;
66  mutable double initPress;
67 
68  mutable double pressureD;
69  double pressureDCommitted;
70  mutable int onPPZ; //=-1 never reach PPZ before; =0 below PPZ; =1 on PPZ; =2 above PPZ
71  int onPPZCommitted;
72  double strainPTOcta;
73  mutable double PPZSize;
74  double PPZSizeCommitted;
75  mutable double cumuDilateStrainOcta;
76  mutable double maxCumuDilateStrainOcta;
77  mutable double cumuTranslateStrainOcta;
78  mutable double prePPZStrainOcta;
79  mutable double oppoPrePPZStrainOcta;
80  static T2Vector trialStrain;
81  mutable T2Vector PPZPivot;
82  mutable T2Vector PPZCenter;
83 
84  double cumuDilateStrainOctaCommitted;
85  double maxCumuDilateStrainOctaCommitted;
86  double cumuTranslateStrainOctaCommitted;
87  double prePPZStrainOctaCommitted;
88  double oppoPrePPZStrainOctaCommitted;
89  T2Vector PPZPivotCommitted;
90  T2Vector PPZCenterCommitted;
91 
92  static Vector workV6;
93  static T2Vector workT2V;
94  double maxPress;
95 
96  void elast2Plast(void) const;
97  // Called by constructor
98  double yieldFunc(const T2Vector & stress,const std::vector<MultiYieldSurface> &surfaces, int surface_num) const;
99  void deviatorScaling(T2Vector & stress,const std::vector<MultiYieldSurface> &surfaces, int surfaceNum) const;
100  void initSurfaceUpdate(void) const;
101 
102  // Return num_strain_subincre
103  int setSubStrainRate(void) const;
104  int isLoadReversal(const T2Vector &) const;
105  void getContactStress(T2Vector &contactStress) const;
106  void getSurfaceNormal(const T2Vector & stress, T2Vector &normal) const;
107  double getModulusFactor(const T2Vector &stress) const;
108  void setTrialStress(const T2Vector &stress) const;
109  double getLoadingFunc(const T2Vector & contact, const T2Vector & surfaceNormal,
110  double plasticPotential,int crossedSurface) const;
111  //return 1 if stress locked; o/w return 0.
112  void updateActiveSurface(void) const;
113  void updateInnerSurface(void) const;
114 
115  // Return 1 if crossing the active surface; return 0 o/w
116  int isCrossingNextSurface(void) const;
117  protected:
118  int sendData(CommParameters &);
119  int recvData(const CommParameters &);
120  public:
121  // Initialization constructor
122  PressureDependMultiYieldBase (int tag, int classTag,
123  int nd,
124  double rho,
125  double refShearModul,
126  double refBulkModul,
127  double frictionAng,
128  double peakShearStra,
129  double refPress,
130  double pressDependCoe,
131  double phaseTransformAngle,
132  double contractionParam1,
133  double dilationParam1,
134  double dilationParam2,
135  double liquefactionParam1,
136  double liquefactionParam2,
137  double liquefactionParam4,
138  int numberOfYieldSurf = 20,
139  double * gredu = 0,
140  double e = 0.6,
141  double volLimit1 = 0.9,
142  double volLimit2 = 0.02,
143  double volLimit3 = 0.7,
144  double atm = 101.,
145  double cohesi = 0.1,
146  double hv = 0.,
147  double pv = 1.);
148 
149  PressureDependMultiYieldBase(int tag, int classTag);
150 
151  // Copy constructor
153 
154  double getRho(void) const
155  {return rhox[matN];} ;
156 
157  // Sets the values of the trial strain tensor.
158  int setTrialStrain(const Vector &strain);
159 
160  // Sets the values of the trial strain and strain rate tensors.
161  int setTrialStrain(const Vector &v, const Vector &r);
162 
163  int setTrialStrainIncr(const Vector &v);
164  int setTrialStrainIncr(const Vector &v, const Vector &r);
165 
166  // Calculates current tangent stiffness.
167  const Matrix &getInitialTangent(void);
168 
169  void getBackbone(Matrix &);
170 
171  // Calculates the corresponding stress increment (rate), for a given strain increment.
172  const Vector &getStrain (void);
173  const Vector &getCommittedStress (void);
174  const Vector &getCommittedStrain (void);
175 
176  int setTrialStrain(const Tensor &v) {return 0;}
177  int setTrialStrain(const Tensor &v, const Tensor &r) {return 0;}
178  int setTrialStrainIncr(const Tensor &v) {return 0;}
179  int setTrialStrainIncr(const Tensor &v, const Tensor &r) {return 0;}
180 
181  // Accepts the current trial strain values as being on the solution path, and updates
182  // all model parameters related to stress/strain states. Return 0 on success.
183  int commitState(void);
184 
185  // Revert the stress/strain states to the last committed states. Return 0 on success.
186  int revertToLastCommit (void);
187 
188  int revertToStart(void) {return 0;}
189 
190  // Return ndm.
191  int getOrder(void) const;
192 
193  int sendSelf(CommParameters &);
194  int recvSelf(const CommParameters &);
195  Response *setResponse(const std::vector<std::string> &argv, Information &matInfo);
196  int getResponse (int responseID, Information &matInformation);
197  void Print(std::ostream &s, int flag =0);
198  //void setCurrentStress(const Vector stress) { currentStress=T2Vector(stress); }
199  int updateParameter(int responseID, Information &eleInformation);
200  };
201 } // end of XC namespace
202 
203 #endif
int setTrialStrainIncr(const Vector &v)
Asigna el valor del incremento de la trial strain.
Definition: PressureDependMultiYieldBase.cc:298
const Vector & getCommittedStress(void)
Returns commited stresses.
Definition: PressureDependMultiYieldBase.cc:621
Tensor de segundo orden.
Definition: T2Vector.h:67
Definition: Vector.h:82
Information about an element.
Definition: Information.h:80
int setTrialStrain(const Tensor &v)
Asigna el trial strain value.
Definition: PressureDependMultiYieldBase.h:176
int setTrialStrain(const Vector &strain)
Asigna el trial strain value.
Definition: PressureDependMultiYieldBase.cc:264
const Vector & getCommittedStrain(void)
Returns commited strains.
Definition: PressureDependMultiYieldBase.cc:663
void Print(std::ostream &s, int flag=0)
Imprime el objeto.
Definition: PressureDependMultiYieldBase.cc:615
??.
Definition: PressureDependMultiYieldBase.h:43
Definition: Matrix.h:82
??.
Definition: PressureMultiYieldBase.h:43
int sendSelf(CommParameters &)
Sends object through the channel being passed as parameter.
Definition: PressureDependMultiYieldBase.cc:489
int getResponse(int responseID, Information &matInformation)
Returns material response.
Definition: PressureDependMultiYieldBase.cc:588
int recvSelf(const CommParameters &)
Receives object through the channel being passed as parameter.
Definition: PressureDependMultiYieldBase.cc:504
int recvData(const CommParameters &)
Receives object members through the channel being passed as parameter.
Definition: PressureDependMultiYieldBase.cc:470
Communication parameters between processes.
Definition: CommParameters.h:65
int setTrialStrainIncr(const Tensor &v)
Asigna el valor del incremento de la trial strain.
Definition: PressureDependMultiYieldBase.h:178
================================================================================
Definition: ContinuaReprComponent.h:34
Definition: Response.h:71
int sendData(CommParameters &)
Send object members through the channel being passed as parameter.
Definition: PressureDependMultiYieldBase.cc:451