xc
PressureIndependMultiYield.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 // $Revision: 1.15 $
29 // $Date: 2004/06/15 18:58:01 $
30 // $Source: /usr/local/cvs/OpenSees/SRC/material/nD/soil/PressureIndependMultiYield.h,v $
31 
32 // Written: ZHY
33 // Created: August 2000
34 
35 // Description: This file contains the class prototype for PressureIndependMultiYield.
36 //
37 // What: "@(#) PressureIndependMultiYield.h, revA"
38 
39 #ifndef PressureIndependMultiYield_h
40 #define PressureIndependMultiYield_h
41 
42 #include "PressureMultiYieldBase.h"
43 #include "T2Vector.h"
44 
45 namespace XC {
46 
48 //
51  {
52  private:
53  // internal
54  mutable double refShearModulus;
55  mutable double refBulkModulus;
56 
57  void setupLocalMembers(int nd, double r, double refShearModul, double refBulkModul, double cohesi, double peakShearStra, double frictionAng, double refPress, double pressDependCoe, int numberOfYieldSurf, const std::vector<double> &gredu);
58 
59  void elast2Plast(void) const;
60  // Called by constructor
61  void setUpSurfaces(const std::vector<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(Communicator &);
90  int recvData(const Communicator &);
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  const std::vector<double> &gredu= std::vector<double>());
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, const std::vector<double> &gredu);
109  void setupPy(const boost::python::dict &);
110 
111  inline double getRefShearModulus(void) const
112  { return refShearModulus; }
113  inline void setRefShearModulus(const double &d)
114  { refShearModulus= d; }
115 
116  inline double getRefBulkModulus(void) const
117  { return refBulkModulus; }
118  inline void setRefBulkModulus(const double &d)
119  { refBulkModulus= d; }
120 
121  // Sets the values of the trial strain tensor.
122  int setTrialStrain(const Vector &strain);
123 
124  // Sets the values of the trial strain and strain rate tensors.
125  int setTrialStrain(const Vector &v, const Vector &r);
126 
127  int setTrialStrainIncr(const Vector &v);
128  int setTrialStrainIncr(const Vector &v, const Vector &r);
129 
130  // Calculates current tangent stiffness.
131  const Matrix &getTangent(void) const;
132  const Matrix &getInitialTangent(void) const;
133 
134  void getBackbone(Matrix &);
135 
136  // Calculates the corresponding stress increment(rate), for a given strain increment.
137  const Vector &getStress(void) const;
138  const Vector &getStrain(void) const;
139  const Vector &getCommittedStress(void) const;
140  const Vector &getCommittedStrain(void) const;
141 
142  // Accepts the current trial strain values as being on the solution path, and updates
143  // all model parameters related to stress/strain states. Return 0 on success.
144  int commitState(void);
145 
146  // Revert the stress/strain states to the last committed states. Return 0 on success.
147  int revertToLastCommit(void);
148 
149  int revertToStart(void) {return 0;}
150 
151  // Return an exact copy of itself.
152  NDMaterial *getCopy(void) const;
153 
154  // Return a copy of itself if "code"="PressureIndependMultiYield", otherwise return null.
155  NDMaterial *getCopy(const std::string &) const;
156 
157  // Return the string "PressureIndependMultiYield".
158  const std::string &getType(void) const ;
159 
160  // Return ndm.
161  int getOrder(void) const ;
162 
163  int sendSelf(Communicator &);
164  int recvSelf(const Communicator &);
165 
166  Response *setResponse(const std::vector<std::string> &argv, Information &matInfo);
167  int getResponse(int responseID, Information &matInformation);
168  void Print(std::ostream &s, int flag =0) const;
169 
170  //void setCurrentStress(const Vector stress) { currentStress=T2Vector(stress); }
171  int updateParameter(int responseID, Information &eleInformation);
172 
173  // RWB; PyLiq1 & TzLiq1 need to see the excess pore pressure and initial stresses.
174  friend class PyLiq1;
175  friend class TzLiq1;
176  };
177 } // end of XC namespace
178 
179 #endif
180 
181 
182 
Float vector abstraction.
Definition: Vector.h:94
Definition: setup.py:1
Information about an element.
Definition: Information.h:81
Communication parameters between processes.
Definition: Communicator.h:66
Base class response objects.
Definition: Response.h:81
const Vector & getStrain(void) const
Returns strain.
Definition: PressureIndependMultiYield.cpp:395
const Vector & getStress(void) const
Returns the material stress vector at the current trial strain.
Definition: PressureIndependMultiYield.cpp:337
NDMaterial * getCopy(void) const
Virtual constructor.
Definition: PressureIndependMultiYield.cpp:430
void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: PressureIndependMultiYield.cpp:635
Uniaxial p-y material that incorporates liquefaction effects.
Definition: PyLiq1.h:61
int setTrialStrainIncr(const Vector &v)
Set trial strain increment.
Definition: PressureIndependMultiYield.cpp:205
??.
Definition: PressureIndependMultiYield.h:50
void setupPy(const boost::python::dict &)
Python version of the setup method.
Definition: PressureIndependMultiYield.cpp:100
Uniaxial t-z material that incorporates liquefaction effects.
Definition: TzLiq1.h:61
int updateParameter(int responseID, Information &eleInformation)
Updates the parameter identified by parameterID with info.
Definition: PressureIndependMultiYield.cpp:458
int sendData(Communicator &)
Send object members through the communicator argument.
Definition: PressureIndependMultiYield.cpp:490
int recvSelf(const Communicator &)
Receives object through the communicator argument.
Definition: PressureIndependMultiYield.cpp:521
int sendSelf(Communicator &)
Sends object through the communicator argument.
Definition: PressureIndependMultiYield.cpp:506
Base class for 2D and 3D materials.
Definition: NDMaterial.h:101
int recvData(const Communicator &)
Receives object members through the communicator argument.
Definition: PressureIndependMultiYield.cpp:498
const Matrix & getTangent(void) const
Return the material tangent stiffness.
Definition: PressureIndependMultiYield.cpp:236
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
int getResponse(int responseID, Information &matInformation)
Returns material response.
Definition: PressureIndependMultiYield.cpp:564
Matrix of floats.
Definition: Matrix.h:111
Second order tensor vector class.
Definition: T2Vector.h:65
const Matrix & getInitialTangent(void) const
Return the material initial stiffness.
Definition: PressureIndependMultiYield.cpp:307
int setTrialStrain(const Vector &strain)
Sets the value of the trial strain vector, that value used by {getStress()} and getTangent(), to be strain.
Definition: PressureIndependMultiYield.cpp:168
??.
Definition: PressureMultiYieldBase.h:44
int commitState(void)
Commit the state of the material.
Definition: PressureIndependMultiYield.cpp:400
int revertToStart(void)
Revert the material to its initial state.
Definition: PressureIndependMultiYield.h:149