xc
BeamWithHinges3d.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/BeamWithHinges3d.h,v $
50 
51 #ifndef BeamWithHinges3d_h
52 #define BeamWithHinges3d_h
53 
54 #include <domain/mesh/element/truss_beam_column/BeamColumnWithSectionFDTrf3d.h>
55 #include <utility/matrix/Matrix.h>
56 #include <utility/matrix/Vector.h>
57 #include "material/section/repres/CrossSectionProperties3d.h"
58 #include "domain/mesh/element/utils/fvectors/FVectorBeamColumn3d.h"
59 
60 namespace XC {
61 class Node;
62 class Channel;
63 class FEM_ObjectBroker;
64 
65 class PrismaticBarCrossSection;
66 
67 class Response;
68 class Renderer;
69 
71 //
74  {
75  private:
76  CrossSectionProperties3d ctes_scc;
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 *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(CommParameters &);
113  int recvData(const CommParameters &);
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  double getRho(void) const
129  { return rho; }
130  void setRho(const double &r)
131  { rho= r; }
132 
133  inline CrossSectionProperties3d getSectionProperties(void) const
134  { return ctes_scc; }
135  void setSectionProperties(const CrossSectionProperties3d &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 &);
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 getResponse(int responseID, Information &info)
Obtain information from an analysis.
Definition: BeamWithHinges3d.cpp:1234
int revertToStart(void)
Reverts the element to its initial state.
Definition: BeamWithHinges3d.cpp:229
Mechanical (E, G) and mass properties of a section (area, moments of inertia,...) in a three-dimensio...
Definition: CrossSectionProperties3d.h:40
Float vector abstraction.
Definition: Vector.h:93
Information about an element.
Definition: Information.h:80
int setParameter(const std::vector< std::string > &argv, Parameter &param)
Sets the value param to the parameter argv.
Definition: BeamWithHinges3d.cpp:1303
~BeamWithHinges3d(void)
Destructor.
Definition: BeamWithHinges3d.cpp:140
Definition: Response.h:71
int getNumDOF(void) const
Return the number of element DOFs.
Definition: BeamWithHinges3d.cpp:146
Internal forces for a beam column 3D element.
Definition: FVectorBeamColumn3d.h:40
CrdTransf provides the abstraction of a frame coordinate transformation.
Definition: CrdTransf.h:87
3D beam with hinges in both ends.
Definition: BeamWithHinges3d.h:73
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:556
Base class for materials.
Definition: Material.h:91
Vector of integers.
Definition: ID.h:93
int recvData(const CommParameters &)
Receives members through the channel being passed as parameter.
Definition: BeamWithHinges3d.cpp:625
int sendData(CommParameters &)
Send members through the channel being passed as parameter.
Definition: BeamWithHinges3d.cpp:599
int update(void)
Updates the element state.
Definition: BeamWithHinges3d.cpp:737
Base class for the finite elements.
Definition: Element.h:109
int commitState(void)
Commit the current element state.
Definition: BeamWithHinges3d.cpp:178
int addLoad(ElementalLoad *theLoad, double loadFactor)
Effect of the load on the element.
Definition: BeamWithHinges3d.cpp:487
int updateParameter(int parameterID, Information &info)
Updates the parameter identified by parameterID with info.
Definition: BeamWithHinges3d.cpp:1341
3D beam colun element with PrismaticBarCrossSection material type.
Definition: BeamColumnWithSectionFDTrf3d.h:65
int revertToLastCommit(void)
Revert to the last commited state.
Definition: BeamWithHinges3d.cpp:200
const Matrix & getMass(void) const
Returns the mass matrix.
Definition: BeamWithHinges3d.cpp:463
void zeroLoad(void)
Zeroes loads on element.
Definition: BeamWithHinges3d.cpp:477
Element * getCopy(void) const
Virtual constructor.
Definition: BeamWithHinges3d.cpp:136
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
const Matrix & getTangentStiff(void) const
Return the tangent stiffness matrix.
Definition: BeamWithHinges3d.cpp:255
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:1203
Communication parameters between processes.
Definition: CommParameters.h:65
Matrix of floats.
Definition: Matrix.h:108
Definition: Parameter.h:65
Base class for loads over elements.
Definition: ElementalLoad.h:77
void Print(std::ostream &s, int flag=0)
Print stuff.
Definition: BeamWithHinges3d.cpp:683
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:116
int sendSelf(CommParameters &)
Sends object through the channel being passed as parameter.
Definition: BeamWithHinges3d.cpp:651
const Vector & getResistingForce(void) const
Returns the resisting force vector for the element.
Definition: BeamWithHinges3d.cpp:546
void setDomain(Domain *theDomain)
Establece el domain of the element.
Definition: BeamWithHinges3d.cpp:150
int recvSelf(const CommParameters &)
Receives object through the channel being passed as parameter.
Definition: BeamWithHinges3d.cpp:665
Base class for 3D coordinate transformation.
Definition: CrdTransf3d.h:80