xc
ZeroLengthContact3D.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 /* ****************************************************************** **
29 ** OpenSees - Open System for Earthquake Engineering Simulation **
30 ** Pacific Earthquake Engineering Research Center **
31 ** **
32 ** **
33 ** (C) Copyright 1999, The Regents of the University of California **
34 ** All Rights Reserved. **
35 ** **
36 ** Commercial use of this program without express permission of the **
37 ** University of California, Berkeley, is strictly prohibited. See **
38 ** file 'COPYRIGHT' in main directory for information on usage and **
39 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
40 ** **
41 ** Developed by: **
42 ** Frank McKenna (fmckenna@ce.berkeley.edu) **
43 ** Gregory L. Fenves (fenves@ce.berkeley.edu) **
44 ** Filip C. Filippou (filippou@ce.berkeley.edu) **
45 ** **
46 ** ****************************************************************** */
47 
48 
49 
50 // $Source: /usr/local/cvs/OpenSees/SRC/element/zeroLength/ZeroLengthContact3D.h,v $
51 // $Revision: 1.2 $
52 // $Date: 2007/11/28 00:08:58 $
53 
54 #ifndef ZeroLengthContact3D_h
55 #define ZeroLengthContact3D_h
56 
57 // Written: Gang Wang (wang@ce.berkeley.edu)
58 // Prof. Nicholas Sitar (nsitar@ce.berkeley.edu)
59 //
60 // Created: 27/08/2003
61 //
62 
63 
64 /*----+----+----+----+----+----+----+----+----+----+----+----+----+----+----*
65  | |
66  | ZeroLengthContact2D element |
67  + +
68  |--------------------------------------------------------------------------|
69  | |
70  + Authors: Gang Wang AND Professor Nicholas Sitar +
71  | |
72  | Department of Civil and Environmental Engineering |
73  + University of California, Berkeley, CA 94720, USA +
74  | |
75  | Email: wang@ce.berkeley.edu (G.W.) |
76  + +
77  | Disclaimers: |
78  | (1) Frame of this code is based on zeroLength element |
79  + (2) Questions regarding this code should be directed to Gang Wang +
80  | (3) Documentation could be found at |
81  | www.ce.berkeley.edu/~wang/OpenSees.html |
82  + +
83  | Development History: |
84  | Created -- Aug/27/2003 |
85  + Final Release -- June 2004 +
86  | |
87  | |
88  +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----*/
89 
90 /* command
91 
92  element zeroLengthContact3D $eleID $sNdID $mNdID $Kn $Kt $fs $c $dir
93 
94  where:
95  $eleID: element ID of this contact element
96  $sNdID: constrained node ID
97  $mNdID: retained node ID
98  $Kn : penalty in normal directions
99  $Kt: : penalty in tangential directions
100  $c : cohesion
101  $dir : direction of the contact (0,1,2,3)
102  0: circular contact (constrained node is inside)
103  1: out normal of primary plane pointing to +X direction
104  2: out normal of primary plane pointing to +Y direction
105  3: out normal of primary plane pointing to +Z direction
106 
107  Description: This file contains the class definition for ZeroLengthContact3D.
108  (1) A ZeroLengthContact3D element is defined by two nodes with the same coordinate
109  in R^3
110  (2) Normal to the contact plane through these contact nodes is preset by the user
111  to be either circular or any of x,y,z axis.
112  (3) Penalty (Kn,Kt) is used to enforce the constraints, i.e.
113  No (in fact, very small) penetration in the normal direction, and
114  Coulomb frictional law in the tangential direction.
115  (4) Backward Euler return mapping scheme is used for implicit formulation of
116  residual and consistent tangent modulus.
117  (5) This element is a modified version of continuum-based implicit formulation
118  (Laursen and Simo,1993) for small deformation. Contact detection is simplified
119  to be only related to these two nodes, and contributions of geometric
120  nonlinearities to consistent tangent moudulus are neglected.
121 
122  References:
123  Laursen,T.A. and Simo, J.C. "A Continuum-based Finite Element Formulation for the
124  Implicit Solution of Multibody, Large Deformation Frictional Contact Problems".
125  Int. J. Numer. Methods Eng. , 36, 3451-3485 (1993)
126 
127  Armero, F. and Petocz, E. "A New Dissipative Time-Stepping Algorithm for Frictional
128  Contact Problems: Fromulation and Analysis", Comp. Methods Appl. Mech. Eng., 179,
129  151-178 (1999)
130 */
131 
132 
133 #include "ZeroLengthContact.h"
134 
135 namespace XC {
136 class Node;
137 class Channel;
138 class Response;
139 
141 //
144  {
145  private:
146  int directionID;
147  // parameters
148  double cohesion; // cohesion
149 
150  //contact point and contact plane stuffs
151  Vector stickPt; // (keci_1, keci_2)
152  mutable Vector xi;
153  Vector origin; // (x0,y0) for circular impact
154  //Tangental Vectors for Elemental Nodes, (6*1)
155  mutable Vector T1;
156  mutable Vector T2;
157 
158 
159  int contactDetect(void) const; // detect the contact and set flag
160  void formResidAndTangent(int tang_flag) const;//form residual and tangent
161 
162 
163  Matrix *Ki; // pointer to objects matrix (a class Matrix)
164 
165  //static variables for 3D contact
166  static Matrix stiff; // for stiff matrix
167  static Vector resid; // for force residual vector
168  static Matrix zeroMatrix;
169  public:
170  ZeroLengthContact3D(int tag= 0);
171  ZeroLengthContact3D(int tag,int Nd1, int Nd2,int direction, double Kn, double Kt, double fRatio, double c, double originX, double originY);
172  Element *getCopy(void) const;
173 
174  void setDomain(Domain *theDomain);
175 
176  // public methods to set the state of the element
177  int commitState(void);
178  int revertToLastCommit(void);
179  int revertToStart(void);
180  //int update(void);
181 
182  // public methods to obtain stiffness, mass, damping and residual information
183  const Matrix &getTangentStiff(void) const;
184  const Matrix &getInitialStiff(void) const;
185  const Matrix &getDamp(void) const;
186  const Matrix &getMass(void) const;
187 
188  const Vector &getResistingForce(void) const;
189  const Vector &getResistingForceIncInertia(void) const;
190 
191  // public methods for element output
192  int sendSelf(Communicator &);
193  int recvSelf(const Communicator &);
194  void Print(std::ostream &s, int flag =0) const;
195 
196  Response *setResponse(const std::vector<std::string> &argv, Information &eleInformation);
197  int getResponse(int responseID, Information &eleInformation);
198  };
199 } // end of XC namespace
200 
201 #endif
void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: ZeroLengthContact3D.cpp:265
Float vector abstraction.
Definition: Vector.h:94
int sendSelf(Communicator &)
Send the object.
Definition: ZeroLengthContact3D.cpp:252
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 & getResistingForceIncInertia(void) const
Returns the resisting force vector including inertia forces.
Definition: ZeroLengthContact3D.cpp:241
Element * getCopy(void) const
Virtual constructor.
Definition: ZeroLengthContact3D.cpp:105
double Kt
tangential penalty
Definition: ZeroLengthContact.h:58
int commitState(void)
Commit the current element state.
Definition: ZeroLengthContact3D.cpp:157
Base class for the finite elements.
Definition: Element.h:112
double Kn
normal penalty
Definition: ZeroLengthContact.h:57
ZeroLengthContact3D(int tag=0)
Default constructor.
Definition: ZeroLengthContact3D.cpp:99
const Matrix & getTangentStiff(void) const
Return the tangent stiffness matrix.
Definition: ZeroLengthContact3D.cpp:194
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
void setDomain(Domain *theDomain)
method: setDomain() to set a link to the enclosing Domain and to set the node pointers.
Definition: ZeroLengthContact3D.cpp:112
const Matrix & getDamp(void) const
Returns the damping matrix.
Definition: ZeroLengthContact3D.cpp:216
Response * setResponse(const std::vector< std::string > &argv, Information &eleInformation)
setResponse() is a method invoked to determine if the element will respond to a request for a certain...
Definition: ZeroLengthContact3D.cpp:277
int getResponse(int responseID, Information &eleInformation)
Obtain information from an analysis.
Definition: ZeroLengthContact3D.cpp:288
Matrix of floats.
Definition: Matrix.h:111
int recvSelf(const Communicator &)
Receive the object.
Definition: ZeroLengthContact3D.cpp:258
int revertToLastCommit(void)
Revert to the last committed state.
Definition: ZeroLengthContact3D.cpp:167
Zero length element for 3D problems.
Definition: ZeroLengthContact3D.h:143
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:117
const Vector & getResistingForce(void) const
Returns the resisting force vector for the element.
Definition: ZeroLengthContact3D.cpp:231
Zero length contact element.
Definition: ZeroLengthContact.h:44
int revertToStart(void)
Reverts the element to its initial state.
Definition: ZeroLengthContact3D.cpp:179
const Matrix & getMass(void) const
Returns the mass matrix.
Definition: ZeroLengthContact3D.cpp:224