xc
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 PrismaticBarCrossSection;
65 
66 class CrdTransf2d;
67 class Response;
68 class Renderer;
69 
71 //
80  {
81  private:
82  CrossSectionProperties2d ctes_scc;
83  double beta1, beta2;
84  double rho;
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(CommParameters &);
116  int recvData(const CommParameters &);
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  double getRho(void) const
129  { return rho; }
130  void setRho(const double &r)
131  { rho= r; }
132 
133  inline CrossSectionProperties2d getSectionProperties(void) const
134  { return ctes_scc; }
135  void setSectionProperties(const CrossSectionProperties2d &ctes)
136  { ctes_scc= ctes; }
137 
138  int getNumDOF(void) const;
139  void setDomain(Domain *theDomain);
140 
141  int commitState(void);
142  int revertToLastCommit(void);
143  int revertToStart(void);
144 
145  int update(void);
146  const Matrix &getTangentStiff(void) const;
147  const Matrix &getInitialStiff(void) const;
148  const Matrix &getMass(void) const;
149 
150  void zeroLoad(void);
151  int addLoad(ElementalLoad *theLoad, double loadFactor);
152  int addInertiaLoadToUnbalance(const Vector &accel);
153  const Vector &getResistingForce(void) const;
154  const Vector &getResistingForceIncInertia(void) const;
155 
156  int sendSelf(CommParameters &);
157  int recvSelf(const CommParameters &);
158 
159  Response *setResponse(const std::vector<std::string> &argv, Information &info);
160  int getResponse(int responseID, Information &info);
161 
162  int setParameter(const std::vector<std::string> &argv, Parameter &param);
163  int updateParameter(int parameterID, Information &info);
164 
165  void Print(std::ostream &s, int flag = 0);
166  };
167 } // end of XC namespace
168 
169 #endif
int sendSelf(CommParameters &)
Sends object through the channel being passed as parameter.
Definition: BeamWithHinges2d.cpp:747
const Matrix & getTangentStiff(void) const
Computes the element flexibility matrix, then returns its inverse.
Definition: BeamWithHinges2d.cpp:340
int revertToStart(void)
Invokes revertToStart() on each section and returns the sum of the result of these invocations...
Definition: BeamWithHinges2d.cpp:241
Float vector abstraction.
Definition: Vector.h:93
void zeroLoad(void)
Zero the element load contributions to the residual.
Definition: BeamWithHinges2d.cpp:539
2D beam element with SectionForceDeformation type material.
Definition: BeamColumnWithSectionFDTrf2d.h:43
Information about an element.
Definition: Information.h:80
Definition: Response.h:71
int recvData(const CommParameters &)
Receives members through the channel being passed as parameter.
Definition: BeamWithHinges2d.cpp:721
CrdTransf provides the abstraction of a frame coordinate transformation.
Definition: CrdTransf.h:87
const Vector & getResistingForce(void) const
Returns the element resisting force vector.
Definition: BeamWithHinges2d.cpp:628
Base class for beam-column cross sections.
Definition: PrismaticBarCrossSection.h:50
Base class for materials.
Definition: Material.h:91
Vector of integers.
Definition: ID.h:93
int recvSelf(const CommParameters &)
Receives object through the channel being passed as parameter.
Definition: BeamWithHinges2d.cpp:762
const Vector & getResistingForceIncInertia(void) const
Returns the element resisting force vector.
Definition: BeamWithHinges2d.cpp:650
int getNumDOF(void) const
Returns 6, the number of degrees of freedom for this element.
Definition: BeamWithHinges2d.cpp:149
Base class for the finite elements.
Definition: Element.h:109
int addLoad(ElementalLoad *theLoad, double loadFactor)
Effect of the load over the element.
Definition: BeamWithHinges2d.cpp:549
Base class for 2D coordinate transformation.
Definition: CrdTransf2d.h:77
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:118
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:52
int commitState(void)
Invokes commitState() on each section and returns the sum of the result of these invocations.
Definition: BeamWithHinges2d.cpp:177
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:79
Element * getCopy(void) const
Virtual constructor.
Definition: BeamWithHinges2d.cpp:144
int sendData(CommParameters &)
Send members through the channel being passed as parameter.
Definition: BeamWithHinges2d.cpp:695
int revertToLastCommit(void)
Invokes revertToLastCommit() on each section and returns the sum of the result of these invocations...
Definition: BeamWithHinges2d.cpp:209
void Print(std::ostream &s, int flag=0)
Print stuff.
Definition: BeamWithHinges2d.cpp:782
Internal forces for a beam-column 2D element.
Definition: FVectorBeamColumn2d.h:40
void setDomain(Domain *theDomain)
Sets the domain for the element.
Definition: BeamWithHinges2d.cpp:152
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
Communication parameters between processes.
Definition: CommParameters.h:65
Matrix of floats.
Definition: Matrix.h:108
const Matrix & getMass(void) const
Return the element lumped mass matrix.
Definition: BeamWithHinges2d.cpp:524
Definition: Parameter.h:65
Base class for loads over elements.
Definition: ElementalLoad.h:77
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:116