xc
ZeroLengthContact.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 //ZeroLengthContact.h
29 
30 #ifndef ZeroLengthContact_h
31 #define ZeroLengthContact_h
32 
33 #include "domain/mesh/element/Element0D.h"
34 #include "utility/matrix/Matrix.h"
35 
36 namespace XC {
37 class Node;
38 class Channel;
39 class Response;
40 
42 //
45  {
46  protected:
47  // contact forces
48  mutable double pressure; // contact pressure at n+1
49  double t1;
50  double t2;
51 
52 
53 
54  // parameters
55  mutable double gap;
56  double gap_n;
57  double Kn;
58  double Kt;
59  double fs;
60 
61  // Normal and Tangental Vectors for Elemental Nodes, (4*1)
62  mutable Vector N;
63 
64  mutable int ContactFlag;
65 
66 
67  public:
68  ZeroLengthContact(int tag= 0,int classTag= 0, int dim= 2);
69  ZeroLengthContact(int tag, int classTag, int dim, int Nd1, int Nd2,double Kn, double Kt, double fRatio);
70 
71  void alive(void);
72 
73  int addLoad(ElementalLoad *theLoad, double loadFactor);
74  int addInertiaLoadToUnbalance(const Vector &);
75 
76  // public methods for element output
77  int sendSelf(Communicator &);
78  int recvSelf(const Communicator &);
79  void Print(std::ostream &os, int flag =0) const;
80  };
81 
82 } // end of XC namespace
83 
84 
85 #endif
86 
87 
88 
89 
90 
91 
92 
93 
94 
95 
96 
Float vector abstraction.
Definition: Vector.h:94
int recvSelf(const Communicator &)
Receive the object.
Definition: ZeroLengthContact.cc:91
Communication parameters between processes.
Definition: Communicator.h:66
int ContactFlag
0: not contact; 1: stick; 2: slide
Definition: ZeroLengthContact.h:64
int sendSelf(Communicator &)
Send the object.
Definition: ZeroLengthContact.cc:85
double Kt
tangential penalty
Definition: ZeroLengthContact.h:58
double t1
friction in local dir1
Definition: ZeroLengthContact.h:49
double Kn
normal penalty
Definition: ZeroLengthContact.h:57
double gap
gap of time n+1 step
Definition: ZeroLengthContact.h:55
void alive(void)
Reactivates the element.
Definition: ZeroLengthContact.cc:58
ZeroLengthContact(int tag=0, int classTag=0, int dim=2)
Default constructor.
Definition: ZeroLengthContact.cc:52
double t2
friction in local dir2
Definition: ZeroLengthContact.h:50
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
void Print(std::ostream &os, int flag=0) const
Print stuff.
Definition: ZeroLengthContact.cc:98
Base class for loads over elements.
Definition: ElementalLoad.h:79
double fs
friction ratio
Definition: ZeroLengthContact.h:59
Zero length contact element.
Definition: ZeroLengthContact.h:44
double gap_n
gap of time n step
Definition: ZeroLengthContact.h:56
Element of dimension 0 (both nodes have the same position).
Definition: Element0D.h:44