xc
BeamWithHinges2d.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 // $Revision: 1.11 $
49 // $Date: 2003/02/25 23:32:47 $
50 // $Source: /usr/local/cvs/OpenSees/SRC/element/beamWithHinges/BeamWithHinges2d.h,v $
51 
52 #ifndef BeamWithHinges2d_h
53 #define BeamWithHinges2d_h
54 
55 #include <domain/mesh/element/truss_beam_column/BeamColumnWithSectionFDTrf2d.h>
56 #include "material/section/repres/CrossSectionProperties2d.h"
57 #include "domain/mesh/element/utils/fvectors/FVectorBeamColumn2d.h"
58 #include <utility/matrix/Matrix.h>
59 #include <utility/matrix/Vector.h>
60 
61 namespace XC {
62 class Channel;
63 class FEM_ObjectBroker;
64 
65 class PrismaticBarCrossSection;
66 
67 class CrdTransf2d;
68 class Response;
69 class Renderer;
70 
72 //
81  {
82  private:
83  CrossSectionProperties2d ctes_scc;
84  double beta1, beta2;
85 
86  Matrix fs[2];
87  Vector sr[2];
88  Vector e[2];
89 
90  Matrix kb;
91  Vector q;
92 
93  Matrix kbCommit;
94  Vector qCommit;
95  Vector eCommit[2];
96 
97  int initialFlag;
98 
99  int maxIter;
100  double tolerance;
101 
102  Matrix sp;
105 
106  static Matrix theMatrix;
107  static Vector theVector;
108  static double workArea[];
109 
110  void setHinges(void);
111 
112  void getForceInterpMatrix(Matrix &b, double x, const ID &c);
113  void getDistrLoadInterpMatrix(Matrix &bp, double x, const ID &c);
114  protected:
115  int sendData(Communicator &);
116  int recvData(const Communicator &);
117  public:
118  BeamWithHinges2d(int tag, int nodeI, int nodeJ,
119  double E, double A, double I,
120  PrismaticBarCrossSection &sectionRefI, double hingeIlen,
121  PrismaticBarCrossSection &sectionRefJ, double hingeJlen,
122  CrdTransf2d &coordTrans, double massDensPerUnitLength = 0.0,
123  int max = 1, double tol = 1.0e-16);
124  BeamWithHinges2d(int tag= 0);
125  BeamWithHinges2d(int tag,const Material *theSection,const CrdTransf *coordTransf);
126  Element *getCopy(void) const;
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 *, double loadFactor);
147  int addInertiaLoadToUnbalance(const Vector &accel);
148  const Vector &getResistingForce(void) const;
149  const Vector &getResistingForceIncInertia(void) const;
150 
151  int sendSelf(Communicator &);
152  int recvSelf(const Communicator &);
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) const;
161  };
162 } // end of XC namespace
163 
164 #endif
const Matrix & getTangentStiff(void) const
Computes the element flexibility matrix, then returns its inverse.
Definition: BeamWithHinges2d.cpp:335
int revertToStart(void)
Invokes revertToStart() on each section and returns the sum of the result of these invocations...
Definition: BeamWithHinges2d.cpp:235
Float vector abstraction.
Definition: Vector.h:94
void zeroLoad(void)
Zero the element load contributions to the residual.
Definition: BeamWithHinges2d.cpp:537
2D beam element with SectionForceDeformation type material.
Definition: BeamColumnWithSectionFDTrf2d.h:44
Information about an element.
Definition: Information.h:81
Communication parameters between processes.
Definition: Communicator.h:66
Base class response objects.
Definition: Response.h:81
CrdTransf provides the abstraction of a frame coordinate transformation.
Definition: CrdTransf.h:88
int recvData(const Communicator &)
Receives members through the communicator argument.
Definition: BeamWithHinges2d.cpp:721
int addLoad(ElementalLoad *, double loadFactor)
Effect of the load over the element.
Definition: BeamWithHinges2d.cpp:547
const Vector & getResistingForce(void) const
Returns the element resisting force vector.
Definition: BeamWithHinges2d.cpp:627
Base class for beam-column cross sections.
Definition: PrismaticBarCrossSection.h:50
Base class for materials.
Definition: Material.h:93
Vector of integers.
Definition: ID.h:95
void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: BeamWithHinges2d.cpp:782
int sendData(Communicator &)
Send members through the communicator argument.
Definition: BeamWithHinges2d.cpp:695
const Vector & getResistingForceIncInertia(void) const
Returns the element resisting force vector.
Definition: BeamWithHinges2d.cpp:649
int getNumDOF(void) const
Returns 6, the number of degrees of freedom for this element.
Definition: BeamWithHinges2d.cpp:147
Base class for the finite elements.
Definition: Element.h:112
Base class for 2D coordinate transformation.
Definition: CrdTransf2d.h:78
int updateParameter(int parameterID, Information &info)
Updates the parameter identified by parameterID with info.
Definition: BeamWithHinges2d.cpp:1314
BeamWithHinges2d(int tag, int nodeI, int nodeJ, double E, double A, double I, PrismaticBarCrossSection &sectionRefI, double hingeIlen, PrismaticBarCrossSection &sectionRefJ, double hingeJlen, CrdTransf2d &coordTrans, double massDensPerUnitLength=0.0, int max=1, double tol=1.0e-16)
Constructor.
Definition: BeamWithHinges2d.cpp:116
int update(void)
Updates the element state.
Definition: BeamWithHinges2d.cpp:818
Mechanical (E, G) and mass properties of a section (area, moments of inertia,...) for a bi-dimensiona...
Definition: CrossSectionProperties2d.h:55
int recvSelf(const Communicator &)
Receives object through the communicator argument.
Definition: BeamWithHinges2d.cpp:762
int commitState(void)
Invokes commitState() on each section and returns the sum of the result of these invocations.
Definition: BeamWithHinges2d.cpp:171
int setParameter(const std::vector< std::string > &argv, Parameter &param)
Sets the value param to the parameter argv.
Definition: BeamWithHinges2d.cpp:1275
int getResponse(int responseID, Information &info)
Obtain information from an analysis.
Definition: BeamWithHinges2d.cpp:1227
2D beam with hinges in both ends.
Definition: BeamWithHinges2d.h:80
Element * getCopy(void) const
Virtual constructor.
Definition: BeamWithHinges2d.cpp:142
int revertToLastCommit(void)
Invokes revertToLastCommit() on each section and returns the sum of the result of these invocations...
Definition: BeamWithHinges2d.cpp:203
Internal forces for a beam-column 2D element.
Definition: FVectorBeamColumn2d.h:41
void setDomain(Domain *theDomain)
Sets the domain for the element.
Definition: BeamWithHinges2d.cpp:150
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Matrix of floats.
Definition: Matrix.h:111
const Matrix & getMass(void) const
Return the element lumped mass matrix.
Definition: BeamWithHinges2d.cpp:521
int sendSelf(Communicator &)
Sends object through the communicator argument.
Definition: BeamWithHinges2d.cpp:747
Parameter.
Definition: Parameter.h:68
Base class for loads over elements.
Definition: ElementalLoad.h:79
Response * setResponse(const std::vector< std::string > &argv, Information &info)
setResponse() is a method invoked to determine if the element will respond to a request for a certain...
Definition: BeamWithHinges2d.cpp:1191
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:117