xc
ContactMaterialBase.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 ** OpenSees - Open System for Earthquake Engineering Simulation **
29 ** Pacific Earthquake Engineering Research Center **
30 ** **
31 ** **
32 ** (C) Copyright 1999, The Regents of the University of California **
33 ** All Rights Reserved. **
34 ** **
35 ** Commercial use of this program without express permission of the **
36 ** University of California, Berkeley, is strictly prohibited. See **
37 ** file 'COPYRIGHT' in main directory for information on usage and **
38 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
39 ** **
40 ** Developed by: **
41 ** Frank McKenna (fmckenna@ce.berkeley.edu) **
42 ** Gregory L. Fenves (fenves@ce.berkeley.edu) **
43 ** Filip C. Filippou (filippou@ce.berkeley.edu) **
44 ** **
45 ** ****************************************************************** */
46 
47 #ifndef ContactMaterialBase_h
48 #define ContactMaterialBase_h
49 
50 #include <material/nD/NDMaterial.h>
51 #include <utility/matrix/Vector.h>
52 #include <utility/matrix/Matrix.h>
53 #include <utility/matrix/ID.h>
54 
55 namespace XC {
56 
60  {
61  protected:
62 
63  //material parameters
64  double frictionCoeff; // friction coefficient tan(phi)
65  double stiffness; // shear stiffness of the interface
66  double cohesion; // interface cohesion (force)
67  double tensileStrength; // tensile strength
68 
69  // functions
70  int UpdateFrictionalState(void);
71 
72  // variables for update of friction coefficient
73  bool mFrictFlag;
74  int mFlag;
75  double mMu;
76  double mCo;
77  double mTen;
78 
79  int sendData(Communicator &);
80  int recvData(const Communicator &);
81 
82  // state variables
83 
84  bool inSlip; // sliding indicator
85 
86  // static vectors and matrices
87  Vector strain_vec; // generalized strain state
88  // strain_vec(0) -> gap ... current gap distance
89  // strain_vec(1) -> slip ... incremental slip
90  // strain_vec(2) -> lambda ... lagrangean multiplier -> t_n
91 
92  Vector stress_vec; // generalized stress state
93  // stress_vec(0) -> t_n ... normal contact force
94  // stress_vec(1) -> t_s ... tangential contact force
95  // stress_vec(2) -> gap ... current gap
96 
97  mutable Matrix tangent_matrix; // material tangent
98  public:
99  // Null constructor
100  ContactMaterialBase(int tag, int classTag, int dim);
101  // Full constructor
102  ContactMaterialBase(int tag, int classTag, int dim, double mu, double G, double c, double t);
103 
104 
105  // Calculates current tangent stiffness.
106  const Matrix &getInitialTangent(void) const;
107 
108  // Calculates the corresponding stress increment (rate),
109  // for a given strain increment.
110  const Vector &getStress(void) const;
111  const Vector &getStrain(void) const;
112 
113  bool getFrictionFlag(void) const
114  { return this->mFrictFlag; }
115  void setFrictionFlag(const bool &b)
116  { this->mFrictFlag= b; }
117  double getFrictionCoeff(void) const
118  { return this->frictionCoeff; }
119  void setFrictionCoeff(const double &fc)
120  { this->frictionCoeff= fc; }
121  double getStiffness(void) const
122  { return this->stiffness; }
123  void setStiffness(const double &s)
124  { this->stiffness= s; }
125  //Get cohesion function for use in contact element
126  double getcohesion(void) const;
127  void setcohesion(const double &s)
128  { this->cohesion= s; }
129  void ScaleCohesion(const double len);
130 
131  //Get tensile strength function for use in contact element
132  double getTensileStrength(void) const;
133  void setTensileStrength(const double &ts)
134  { this->tensileStrength= ts; }
135  void ScaleTensileStrength(const double len);
136 
137  bool getContactState(void) const
138  {return inSlip;}
139 
140  // Revert the stress/strain states to the last committed states.
141  // Return 0 on success.
142  int revertToLastCommit ();
143 
144  // public methods for material stage update
145  int setParameter(const std::vector<std::string> &, Parameter &);
146  int updateParameter(int responseID, Information &eleInformation);
147  };
148 } // end XC namespace
149 
150 #endif
151 
const Vector & getStrain(void) const
Returns strain.
Definition: ContactMaterialBase.cc:85
Float vector abstraction.
Definition: Vector.h:94
Base class for ND contact materials.
Definition: ContactMaterialBase.h:59
Information about an element.
Definition: Information.h:81
Communication parameters between processes.
Definition: Communicator.h:66
int updateParameter(int responseID, Information &eleInformation)
Updates the parameter identified by parameterID with info.
Definition: ContactMaterialBase.cc:135
int sendData(Communicator &)
Send material.
Definition: ContactMaterialBase.cc:153
int recvData(const Communicator &)
Receive material.
Definition: ContactMaterialBase.cc:167
const Vector & getStress(void) const
Returns the material stress vector at the current trial strain.
Definition: ContactMaterialBase.cc:79
Base class for 2D and 3D materials.
Definition: NDMaterial.h:101
int setParameter(const std::vector< std::string > &, Parameter &)
Sets the value param to the parameter argv.
Definition: ContactMaterialBase.cc:147
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Matrix of floats.
Definition: Matrix.h:111
Parameter.
Definition: Parameter.h:68