xc
BeamWithHinges3d.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/BeamWithHinges3d.h,v $
51 
52 #ifndef BeamWithHinges3d_h
53 #define BeamWithHinges3d_h
54 
55 #include <domain/mesh/element/truss_beam_column/BeamColumnWithSectionFDTrf3d.h>
56 #include <utility/matrix/Matrix.h>
57 #include <utility/matrix/Vector.h>
58 #include "material/section/repres/CrossSectionProperties3d.h"
59 #include "domain/mesh/element/utils/fvectors/FVectorBeamColumn3d.h"
60 
61 namespace XC {
62 class Node;
63 class Channel;
64 class FEM_ObjectBroker;
65 
66 class PrismaticBarCrossSection;
67 
68 class Response;
69 class Renderer;
70 
72 //
75  {
76  private:
77  CrossSectionProperties3d ctes_scc;
78  double beta1, beta2;
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 *applied_sf; // Applied section forces due to element loads, 5 x nSections
97  FVectorBeamColumn3d p0; // Reactions in the basic system due to element loads
98  FVectorBeamColumn3d v0; // Basic deformations due to element loads on the interior
99 
100  static Matrix theMatrix;
101  static Vector theVector;
102  static double workArea[];
103 
104  void checkNodePtrs(Domain *theDomain);
105  void setHinges(void);
106 
107  void getForceInterpMatrix(Matrix &b, double x, const ID &c);
108  void getDistrLoadInterpMatrix(Matrix &bp, double x, const ID &c);
109 
110 
111  protected:
112  int sendData(Communicator &);
113  int recvData(const Communicator &);
114  public:
115  BeamWithHinges3d(int tag, int nodeI, int nodeJ,
116  double E, double A, double Iz, double Iy, double G, double J,
117  PrismaticBarCrossSection &sectionRefI, double hingeIlen,
118  PrismaticBarCrossSection &sectionRefJ, double hingeJlen,
119  CrdTransf3d &coordTrans, double massDensPerUnitLength = 0.0,
120  int max = 1, double tol = 1.0e-16);
121  BeamWithHinges3d(int tag= 0);
122  BeamWithHinges3d(int tag,const Material *theSection,const CrdTransf *coordTransf);
124  //BeamWithHinges3d &operator=(const BeamWithHinges3d &);
125  Element *getCopy(void) const;
126  ~BeamWithHinges3d(void);
127 
128  inline CrossSectionProperties3d getSectionProperties(void) const
129  { return ctes_scc; }
130  void setSectionProperties(const CrossSectionProperties3d &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 &);
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
int getResponse(int responseID, Information &info)
Obtain information from an analysis.
Definition: BeamWithHinges3d.cpp:1237
int revertToStart(void)
Revert the state of element to initial.
Definition: BeamWithHinges3d.cpp:220
Mechanical (E, G) and mass properties of a section (area, moments of inertia,...) in a three-dimensio...
Definition: CrossSectionProperties3d.h:42
Float vector abstraction.
Definition: Vector.h:94
Information about an element.
Definition: Information.h:81
Communication parameters between processes.
Definition: Communicator.h:66
int setParameter(const std::vector< std::string > &argv, Parameter &param)
Sets the value param to the parameter argv.
Definition: BeamWithHinges3d.cpp:1306
~BeamWithHinges3d(void)
Destructor.
Definition: BeamWithHinges3d.cpp:136
Base class response objects.
Definition: Response.h:81
int getNumDOF(void) const
Return the number of element DOFs.
Definition: BeamWithHinges3d.cpp:142
Internal forces for a beam column 3D element.
Definition: FVectorBeamColumn3d.h:41
CrdTransf provides the abstraction of a frame coordinate transformation.
Definition: CrdTransf.h:88
3D beam with hinges in both ends.
Definition: BeamWithHinges3d.h:74
Base class for beam-column cross sections.
Definition: PrismaticBarCrossSection.h:50
const Vector & getResistingForceIncInertia(void) const
Returns the resisting force vector including inertia forces.
Definition: BeamWithHinges3d.cpp:553
Base class for materials.
Definition: Material.h:93
Vector of integers.
Definition: ID.h:95
int addLoad(ElementalLoad *, double loadFactor)
Effect of the load on the element.
Definition: BeamWithHinges3d.cpp:480
int update(void)
Updates the element state.
Definition: BeamWithHinges3d.cpp:739
Base class for the finite elements.
Definition: Element.h:112
int commitState(void)
Commit the current element state.
Definition: BeamWithHinges3d.cpp:169
int updateParameter(int parameterID, Information &info)
Updates the parameter identified by parameterID with info.
Definition: BeamWithHinges3d.cpp:1344
3D beam colun element with PrismaticBarCrossSection material type.
Definition: BeamColumnWithSectionFDTrf3d.h:66
int revertToLastCommit(void)
Revert the state of element to its last commit.
Definition: BeamWithHinges3d.cpp:192
const Matrix & getMass(void) const
Returns the mass matrix.
Definition: BeamWithHinges3d.cpp:455
void zeroLoad(void)
Zeroes loads on element.
Definition: BeamWithHinges3d.cpp:470
int recvData(const Communicator &)
Receives members through the communicator argument.
Definition: BeamWithHinges3d.cpp:623
Element * getCopy(void) const
Virtual constructor.
Definition: BeamWithHinges3d.cpp:132
int sendData(Communicator &)
Send members through the communicator argument.
Definition: BeamWithHinges3d.cpp:597
int sendSelf(Communicator &)
Sends object through the communicator argument.
Definition: BeamWithHinges3d.cpp:649
void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: BeamWithHinges3d.cpp:684
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
const Matrix & getTangentStiff(void) const
Return the tangent stiffness matrix.
Definition: BeamWithHinges3d.cpp:246
Response * setResponse(const std::vector< std::string > &argv, Information &)
setResponse() is a method invoked to determine if the element will respond to a request for a certain...
Definition: BeamWithHinges3d.cpp:1206
Matrix of floats.
Definition: Matrix.h:111
Parameter.
Definition: Parameter.h:68
int recvSelf(const Communicator &)
Receives object through the communicator argument.
Definition: BeamWithHinges3d.cpp:664
Base class for loads over elements.
Definition: ElementalLoad.h:79
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: BeamWithHinges3d.cpp:543
void setDomain(Domain *theDomain)
Establece el domain of the element.
Definition: BeamWithHinges3d.cpp:146
Base class for 3D coordinate transformation.
Definition: CrdTransf3d.h:81