xc
FourNodeQuad.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.10 $
49 // $Date: 2003/10/07 21:18:50 $
50 // $Source: /usr/local/cvs/OpenSees/SRC/element/fourNodeQuad/FourNodeQuad.h,v $
51 
52 // Written: MHS
53 // Created: Feb 2000
54 // Revised: Dec 2000 for efficiency
55 //
56 // Description: This file contains the class definition for FourNodeQuad.
57 
58 #ifndef FourNodeQuad_h
59 #define FourNodeQuad_h
60 
61 #include "domain/mesh/element/plane/SolidMech4N.h"
62 #include "domain/mesh/element/utils/physical_properties/SolidMech2D.h"
63 #include "domain/mesh/element/utils/body_forces/BodyForces2D.h"
64 #include "domain/mesh/element/utils/fvectors/FVectorQuad.h"
65 
66 namespace XC {
67 class NDMaterial;
68 class Material;
69 class Response;
70 class GaussPoint;
71 class ParticlePos2d;
72 
74 //
77  {
78  private:
79  BodyForces2D bf;
80  Vector pressureLoad;
81 
82  double pressure;
83  FVectorQuad p0;
84  mutable std::vector<Vector> eps;
85  std::vector<Vector> persistentInitialDeformation;
86 
87  static double matrixData[64];
88  static Matrix K;
89  static Matrix mass;
90  static Vector P;
91  static double shp[3][4];
92 
93  // private member functions - only objects of this class can call these
94  double shapeFunction(const GaussPoint &gp) const;
95  void setPressureLoadAtNodes(void);
96 
97  //inertia terms
98  void formInertiaTerms(int tangFlag) const;
99 
100  protected:
101  int sendData(Communicator &);
102  int recvData(const Communicator &);
103  public:
104  FourNodeQuad(int tag= 0,const NDMaterial *ptr_mat= nullptr);
105  FourNodeQuad(int tag, int nd1, int nd2, int nd3, int nd4, NDMaterial &m, const std::string &type, double t, double pressure = 0.0, const BodyForces2D &bForces= BodyForces2D());
106  Element *getCopy(void) const;
107  virtual ~FourNodeQuad(void);
108 
109  // Element birth and death stuff.
110  const std::vector<Vector> &getPersistentInitialDeformation(void) const;
112 
113  int getNumDOF(void) const;
114  void setDomain(Domain *theDomain);
115 
116  // public methods to set the state of the element
117  int update(void);
118 
119  // public methods to obtain stiffness, mass, damping and residual information
120  const Matrix &getTangentStiff(void) const;
121  const Matrix &getInitialStiff(void) const;
122  const Matrix &getMass(void) const;
123 
124  const GaussModel &getGaussModel(void) const;
125 
126  void alive(void);
127  void zeroLoad(void);
128  int addLoad(ElementalLoad *theLoad, double loadFactor);
129  int addInertiaLoadToUnbalance(const Vector &accel);
130 
131  const Vector &getResistingForce(void) const;
132  const Vector &getResistingForceIncInertia(void) const;
133  virtual void createInertiaLoad(const Vector &);
134 
135  Pos2d getCartesianCoordinates(const ParticlePos2d &, bool initialGeometry= true) const;
136 
137  // public methods for element output
138  int sendSelf(Communicator &);
139  int recvSelf(const Communicator &);
140  void Print(std::ostream &s, int flag =0) const;
141 
142  int setParameter(const std::vector<std::string> &argv, Parameter &param);
143  int updateParameter(int parameterID, Information &info);
144 
145  // RWB; PyLiq1 & TzLiq1 need to see the excess pore pressure and initial stresses.
146  friend class PyLiq1;
147  friend class TzLiq1;
148 
149  double detJ(const double &,const double &) const;
150 
151  };
152 } // end of XC namespace
153 
154 #endif
155 
int addLoad(ElementalLoad *theLoad, double loadFactor)
Adds a load over element.
Definition: FourNodeQuad.cpp:353
void alive(void)
Reactivates the element.
Definition: FourNodeQuad.cpp:331
Body forces over an element.
Definition: BodyForces2D.h:40
Float vector abstraction.
Definition: Vector.h:94
Information about an element.
Definition: Information.h:81
const Matrix & getTangentStiff(void) const
Return the tangent stiffness matrix.
Definition: FourNodeQuad.cpp:196
Communication parameters between processes.
Definition: Communicator.h:66
Element * getCopy(void) const
Virtual constructor.
Definition: FourNodeQuad.cpp:105
int getNumDOF(void) const
Return the number of element DOFs.
Definition: FourNodeQuad.cpp:131
int updateParameter(int parameterID, Information &info)
Updates the parameter identified by parameterID with info.
Definition: FourNodeQuad.cpp:737
const std::vector< Vector > & getPersistentInitialDeformation(void) const
Returns the value of the persistent (does not get wiped out by zeroLoad) initial deformation of the e...
Definition: FourNodeQuad.cpp:114
void incrementPersistentInitialDeformationWithCurrentDeformation(void)
Increments the persistent (does not get wiped out by zeroLoad) initial deformation of the section...
Definition: FourNodeQuad.cpp:121
Posición en dos dimensiones.
Definition: Pos2d.h:41
virtual ~FourNodeQuad(void)
Destructor.
Definition: FourNodeQuad.cpp:109
int setParameter(const std::vector< std::string > &argv, Parameter &param)
Sets the value param to the parameter argv.
Definition: FourNodeQuad.cpp:710
Uniaxial p-y material that incorporates liquefaction effects.
Definition: PyLiq1.h:61
3D position of Gauss points.
Definition: GaussPoint.h:38
FourNodeQuad(int tag=0, const NDMaterial *ptr_mat=nullptr)
Constructor.
Definition: FourNodeQuad.cpp:79
Base class for the finite elements.
Definition: Element.h:112
Ingernal forces for a quad element.
Definition: FVectorQuad.h:41
const GaussModel & getGaussModel(void) const
Return the Gauss points of the element.
Definition: FourNodeQuad.cpp:327
void setDomain(Domain *theDomain)
Sets domain pointer and computes the consistent load vector due to pressure.
Definition: FourNodeQuad.cpp:135
int addInertiaLoadToUnbalance(const Vector &accel)
Adds inertia loads.
Definition: FourNodeQuad.cpp:388
Uniaxial t-z material that incorporates liquefaction effects.
Definition: TzLiq1.h:61
Natural coordinates of an element&#39;s particle.
Definition: ParticlePos2d.h:40
Base class for Gauss integration models.
Definition: GaussModel.h:41
void Print(std::ostream &s, int flag=0) const
Prints element information.
Definition: FourNodeQuad.cpp:663
Base class for 2D and 3D materials.
Definition: NDMaterial.h:101
const Vector & getResistingForce(void) const
Return the element resisting force.
Definition: FourNodeQuad.cpp:430
const Vector & getResistingForceIncInertia(void) const
Return the resisting force of the element including inertia.
Definition: FourNodeQuad.cpp:484
const Matrix & getMass(void) const
Return the mass matrix.
Definition: FourNodeQuad.cpp:317
int update(void)
Update the values of the state variables.
Definition: FourNodeQuad.cpp:147
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Matrix of floats.
Definition: Matrix.h:111
Four node quadrilateral element for two-dimensional problems.
Definition: SolidMech4N.h:76
Four node quadrilateral element for two-dimensional problems.
Definition: FourNodeQuad.h:76
int recvSelf(const Communicator &)
Receives object through the communicator argument.
Definition: FourNodeQuad.cpp:643
Parameter.
Definition: Parameter.h:68
int sendData(Communicator &)
Send object members through the communicator argument.
Definition: FourNodeQuad.cpp:608
Base class for loads over elements.
Definition: ElementalLoad.h:79
Pos2d getCartesianCoordinates(const ParticlePos2d &, bool initialGeometry=true) const
Return the cartesian coordinates corresponding to the given natural coordinates.
Definition: FourNodeQuad.cpp:842
int sendSelf(Communicator &)
Sends object through the communicator argument.
Definition: FourNodeQuad.cpp:628
void zeroLoad(void)
Sets loads to zero.
Definition: FourNodeQuad.cpp:343
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:117
const Matrix & getInitialStiff(void) const
Return the initial tangent stiffness matrix.
Definition: FourNodeQuad.cpp:259
int recvData(const Communicator &)
Receives object members through the communicator argument.
Definition: FourNodeQuad.cpp:618
virtual void createInertiaLoad(const Vector &)
Creates the inertia load that corresponds to the acceleration argument.
Definition: FourNodeQuad.cpp:573