XC Open source finite element analysis program
ConstantPressureVolumeQuad.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.10 $
48 // $Date: 2003/02/14 23:01:10 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/element/fourNodeQuad/ConstantPressureVolumeQuad.h,v $
50 
51 // Ed "C++" Love
52 //
53 // Constant Presssure/Volume Four Node Quadrilateral
54 // Plane Strain (NOT PLANE STRESS)
55 
56 #include "domain/mesh/element/plane/QuadBase4N.h"
57 #include "domain/mesh/element/utils/physical_properties/NDMaterialPhysicalProperties.h"
58 
59 namespace XC{
61 //
63 class ConstantPressureVolumeQuad: public QuadBase4N<NDMaterialPhysicalProperties>
64  {
65  private:
66  double xl[2][4];
67 
68  //static data
69  static double matrixData[64]; // array data for matrix
70  static Matrix stiff ;
71  static Vector resid ;
72  static Matrix mass ;
73  static Matrix damping ;
74 
75  //volume-pressure constants
76  static double one3 ;
77  static double two3 ;
78  static double four3 ;
79  static double one9 ;
80 
81  //quadrature data
82  static double sg[4] ;
83  static double tg[4] ;
84  static double wg[4] ;
85 
86 
87  //form residual and tangent
88  void formResidAndTangent(int tang_flag) const;
89  //inertia terms
90  void formInertiaTerms(int tangFlag) const;
91 
92  //shape function routine for four node quads
93  static void shape2d( double ss, double tt,
94  const double x[2][4],
95  double shp[3][4],
96  double &xsj,
97  Matrix &sx ) ;
98 
99  protected:
100  int sendData(CommParameters &);
101  int recvData(const CommParameters &);
102  public :
104  ConstantPressureVolumeQuad(int tag, int node1,int node2,int node3,int node4, NDMaterial &theMaterial);
105  Element *getCopy(void) const;
106 
107  int getNumDOF(void) const;
108  void setDomain(Domain *theDomain ) ;
109 
110  // public methods to set the state of the element
111  int update(void);
112 
113  // public methods to obtain stiffness, mass, damping and residual information
114  const Matrix &getTangentStiff(void) const;
115  const Matrix &getInitialStiff(void) const;
116  const Matrix &getMass(void) const;
117 
118  // public methods for updating ele load information
119  int addLoad(ElementalLoad *theLoad, double loadFactor);
120  int addInertiaLoadToUnbalance(const Vector &accel);
121 
122  const Vector &getResistingForce(void) const;
123  const Vector &getResistingForceIncInertia(void) const;
124 
125  virtual int sendSelf(CommParameters &);
126  virtual int recvSelf(const CommParameters &);
127 
128  void Print( std::ostream &s, int flag ) ;
129  };
130 } // end of XC namespace
??.
Definition: ConstantPressureVolumeQuad.h:63
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:98
Base class for 2D and 3D materials.
Definition: NDMaterial.h:91
Definition: Vector.h:82
virtual int recvSelf(const CommParameters &)
Receives object through the channel being passed as parameter.
Definition: ConstantPressureVolumeQuad.cpp:1184
Base calass for the finite elements.
Definition: Element.h:104
Base class for loads over elements.
Definition: ElementalLoad.h:73
const Vector & getResistingForceIncInertia(void) const
get residual with inertia terms
Definition: ConstantPressureVolumeQuad.cpp:612
virtual int sendSelf(CommParameters &)
Sends object through the channel being passed as parameter.
Definition: ConstantPressureVolumeQuad.cpp:1170
Element * getCopy(void) const
Virtual constructor.
Definition: ConstantPressureVolumeQuad.cpp:106
int sendData(CommParameters &)
Send object members through the channel being passed as parameter.
Definition: ConstantPressureVolumeQuad.cpp:1152
Base class for 4 node quads.
Definition: QuadBase4N.h:45
Definition: Matrix.h:82
ConstantPressureVolumeQuad(void)
null constructor
Definition: ConstantPressureVolumeQuad.cpp:98
const Matrix & getMass(void) const
Returns the mass matrix.
Definition: ConstantPressureVolumeQuad.cpp:543
const Vector & getResistingForce(void) const
get residual
Definition: ConstantPressureVolumeQuad.cpp:597
void setDomain(Domain *theDomain)
Sets the domain for the element.
Definition: ConstantPressureVolumeQuad.cpp:110
Communication parameters between processes.
Definition: CommParameters.h:65
================================================================================
Definition: ContinuaReprComponent.h:34
int recvData(const CommParameters &)
Receives object members through the channel being passed as parameter.
Definition: ConstantPressureVolumeQuad.cpp:1161
int getNumDOF(void) const
return number of dofs
Definition: ConstantPressureVolumeQuad.cpp:126
void Print(std::ostream &s, int flag)
Imprime el objeto.
Definition: ConstantPressureVolumeQuad.cpp:278
int update(void)
Actualiza el estado of the element.
Definition: ConstantPressureVolumeQuad.cpp:130