XC Open source finite element analysis program
BeamWithHinges2d.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 /* ****************************************************************** **
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 // $Revision: 1.11 $
48 // $Date: 2003/02/25 23:32:47 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/element/beamWithHinges/BeamWithHinges2d.h,v $
50 
51 #ifndef BeamWithHinges2d_h
52 #define BeamWithHinges2d_h
53 
54 #include <domain/mesh/element/truss_beam_column/BeamColumnWithSectionFDTrf2d.h>
55 #include "material/section/repres/CrossSectionProperties2d.h"
56 #include "domain/mesh/element/utils/fvectors/FVectorBeamColumn2d.h"
57 #include <utility/matrix/Matrix.h>
58 #include <utility/matrix/Vector.h>
59 
60 namespace XC {
61 class Channel;
62 class FEM_ObjectBroker;
63 
64 class SeccionBarraPrismatica;
65 
66 class CrdTransf2d;
67 class Response;
68 class Renderer;
69 
71 //
74  {
75  private:
76  CrossSectionProperties2d ctes_scc; //Section mechanical properties E,A,Iy,...
77  double beta1, beta2;
78  double rho;
79 
80  Matrix fs[2];
81  Vector sr[2];
82  Vector e[2];
83 
84  Matrix kb;
85  Vector q;
86 
87  Matrix kbCommit;
88  Vector qCommit;
89  Vector eCommit[2];
90 
91  int initialFlag;
92 
93  int maxIter;
94  double tolerance;
95 
96  Matrix *sp; // Applied section forces due to element loads, 3 x nSections
99 
100  static Matrix theMatrix;
101  static Vector theVector;
102  static double workArea[];
103 
104  void setHinges(void);
105 
106  void getForceInterpMatrix(Matrix &b, double x, const ID &c);
107  void getDistrLoadInterpMatrix(Matrix &bp, double x, const ID &c);
108  protected:
109  int sendData(CommParameters &);
110  int recvData(const CommParameters &);
111  public:
112  BeamWithHinges2d(int tag, int nodeI, int nodeJ,
113  double E, double A, double I,
114  SeccionBarraPrismatica &sectionRefI, double hingeIlen,
115  SeccionBarraPrismatica &sectionRefJ, double hingeJlen,
116  CrdTransf2d &coordTrans, double massDensPerUnitLength = 0.0,
117  int max = 1, double tol = 1.0e-16);
118  BeamWithHinges2d(int tag= 0);
119  BeamWithHinges2d(int tag,const Material *theSection,const CrdTransf *coordTransf);
120  Element *getCopy(void) const;
121  ~BeamWithHinges2d(void);
122 
123  double getRho(void) const
124  { return rho; }
125  void setRho(const double &r)
126  { rho= r; }
127 
128  inline CrossSectionProperties2d getSectionProperties(void) const
129  { return ctes_scc; }
130  void setSectionProperties(const CrossSectionProperties2d &ctes)
131  { ctes_scc= ctes; }
132 
133  int getNumDOF(void) const;
134  void setDomain(Domain *theDomain);
135 
136  int commitState(void);
137  int revertToLastCommit(void);
138  int revertToStart(void);
139 
140  int update(void);
141  const Matrix &getTangentStiff(void) const;
142  const Matrix &getInitialStiff(void) const;
143  const Matrix &getMass(void) const;
144 
145  void zeroLoad(void);
146  int addLoad(ElementalLoad *theLoad, double loadFactor);
147  int addInertiaLoadToUnbalance(const Vector &accel);
148  const Vector &getResistingForce(void) const;
149  const Vector &getResistingForceIncInertia(void) const;
150 
151  int sendSelf(CommParameters &);
152  int recvSelf(const CommParameters &);
153 
154  Response *setResponse(const std::vector<std::string> &argv, Information &info);
155  int getResponse(int responseID, Information &info);
156 
157  int setParameter(const std::vector<std::string> &argv, Parameter &param);
158  int updateParameter(int parameterID, Information &info);
159 
160  void Print(std::ostream &s, int flag = 0);
161  };
162 } // end of XC namespace
163 
164 #endif
CrdTransf provides the abstraction of a frame coordinate transformation. It is an abstract base class...
Definition: CrdTransf.h:87
2D beam element with SectionForceDeformation type material.
Definition: BeamColumnWithSectionFDTrf2d.h:43
Base class for materials.
Definition: Material.h:85
void zeroLoad(void)
Zeroes loads on element.
Definition: BeamWithHinges2d.cpp:423
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:98
int recvData(const CommParameters &)
Receives members through the channel being passed as parameter.
Definition: BeamWithHinges2d.cpp:578
Definition: Vector.h:82
int sendData(CommParameters &)
Send members through the channel being passed as parameter.
Definition: BeamWithHinges2d.cpp:552
const Matrix & getMass(void) const
Returns the mass matrix.
Definition: BeamWithHinges2d.cpp:409
void Print(std::ostream &s, int flag=0)
Imprime el objeto.
Definition: BeamWithHinges2d.cpp:636
int commitState(void)
Consuma el estado of the element.
Definition: BeamWithHinges2d.cpp:159
int update(void)
Actualiza el estado of the element.
Definition: BeamWithHinges2d.cpp:672
Information about an element.
Definition: Information.h:80
Element * getCopy(void) const
Virtual constructor.
Definition: BeamWithHinges2d.cpp:126
int addLoad(ElementalLoad *theLoad, double loadFactor)
Effect of the load over the element.
Definition: BeamWithHinges2d.cpp:433
Base calass for the finite elements.
Definition: Element.h:104
Base class for loads over elements.
Definition: ElementalLoad.h:73
Base class for beam-column cross sections. Constitutive equations of the section. ...
Definition: SeccionBarraPrismatica.h:50
2D beam with hinges in both ends.
Definition: BeamWithHinges2d.h:73
void setDomain(Domain *theDomain)
Sets the domain for the element.
Definition: BeamWithHinges2d.cpp:137
Definition: ID.h:77
const Vector & getResistingForceIncInertia(void) const
Returns the action of the element over its attached nodes. Computes damping matrix.
Definition: BeamWithHinges2d.cpp:507
Definition: Matrix.h:82
int recvSelf(const CommParameters &)
Receives object through the channel being passed as parameter.
Definition: BeamWithHinges2d.cpp:618
int sendSelf(CommParameters &)
Sends object through the channel being passed as parameter.
Definition: BeamWithHinges2d.cpp:604
Internal forces for a beam-column 2D element.
Definition: FVectorBeamColumn2d.h:40
Mechanical properties of a cross section (area, moments of inertia,...) for a bi-dimensional problem ...
Definition: CrossSectionProperties2d.h:52
Definition: Parameter.h:65
Communication parameters between processes.
Definition: CommParameters.h:65
Base class for 2D coordinate transformation.
Definition: CrdTransf2d.h:77
================================================================================
Definition: ContinuaReprComponent.h:34
Definition: Response.h:71