XC Open source finite element analysis program
TwentySevenNodeBrick.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 //----------------------------------------------------------------------------
28 //
29 // COPYRIGHT (C): :-))
30 // PROJECT: Object Oriented Finite Element Program
31 // FILE: TwentySevenNodeBrick.h
32 // CLASS: TwentySevenNodeBrick
33 // MEMBER FUNCTIONS:
34 //
35 // MEMBER VARIABLES
36 //
37 // PURPOSE: Finite Element Class
38 // RETURN:
39 // VERSION:
40 // LANGUAGE: C++.ver >= 3.0
41 // TARGET OS: all
42 // DESIGNER: Boris Jeremic, Guanzhou Jie
43 // PROGRAMMER: Guanzhou Jie and Boris Jeremic
44 // DATE: Oct. 2003
45 // UPDATE HISTORY:
46 //
48 //
49 
50 
51 
52 #ifndef TWENTYSEVENNODEBRICK_H
53 #define TWENTYSEVENNODEBRICK_H
54 
55 #include <domain/mesh/element/ElementBase.h>
56 #include "domain/mesh/element/utils/body_forces/BodyForces3D.h"
57 
58 
59 
60 namespace XC {
61 class Node;
62 class MatPoint3D;
63 class BJtensor;
64 class stresstensor;
65 
67 //
70  {
71  private:
72 
73  double determinant_of_Jacobian;
74 
75  NDMaterial *mmodel;
76 
77  int r_integration_order;
78  int s_integration_order;
79  int t_integration_order;
80 
81  // Now I want 3D array of Material points!
82  // MatPoint3D[r_integration_order][s_integration_order][t_integration_order]
83  // 3D array of Material points
84  std::vector<MatPoint3D> matpoint;
85 
86  // this is LM array. This array holds DOFs for this element
87  //int LM[60]; // for 20noded x 3 = 60
88 
89  int numDOF;
90 
91  mutable Matrix *Ki;
92 
93  static Matrix K;
94  static Matrix C;
95  static Matrix M;
96  static Vector P;
97  BodyForces3D bf;
98 
99  // double thickness; // Element thickness
100  double rho;
101  double pressure;
102  int order;
103 
104  //Matrix J; //!< Jacobian of transformation
105  //Matrix L; //!< Inverse of J
106  //Matrix B; //!< Strain interpolation matrix
107  public:
108  TwentySevenNodeBrick(int element_number,
109  int node_numb_1, int node_numb_2, int node_numb_3, int node_numb_4,
110  int node_numb_5, int node_numb_6, int node_numb_7, int node_numb_8,
111  int node_numb_9, int node_numb_10, int node_numb_11, int node_numb_12,
112  int node_numb_13, int node_numb_14, int node_numb_15, int node_numb_16,
113  int node_numb_17, int node_numb_18, int node_numb_19, int node_numb_20,
114  int node_numb_21, int node_numb_22, int node_numb_23, int node_numb_24,
115  int node_numb_25, int node_numb_26, int node_numb_27,
116  NDMaterial * Globalmmodel, const BodyForces3D &,
117  double r, double p);
118  TwentySevenNodeBrick(void);
119  Element *getCopy(void) const;
121 
122  int getNumDOF(void) const;
123  void setDomain(Domain *theDomain);
124 
125  // public methods to set the state of the element
126  int commitState ();
127  int revertToLastCommit ();
128  int revertToStart ();
129 
130  // update, Guanzhou added Apr. 2004 to update incremental strain in the domain
131  int update(void);
132 
133  // public methods to obtain stiffness, mass, damping and residual information
134  // We haven't build the following functions.
135  // All the value of K M Dmp and F are nothing.
136  const Matrix &getTangentStiff(void) const;
137  const Matrix &getInitialStiff(void) const;
138  const Matrix &getMass(void) const;
139 
140  const Matrix &getConsMass(void) const;
141  const Matrix &getLumpedMass(void) const;
142 
143  int addLoad(ElementalLoad *theLoad, double loadFactor);
144  //int addLoad(const Vector &addP);
145  int addInertiaLoadToUnbalance(const Vector &accel);
146  const Vector FormEquiBodyForce(void);
147  const Vector &getResistingForce(void) const;
148  const Vector &getResistingForceIncInertia(void) const;
149 
150  virtual int sendSelf(CommParameters &);
151  virtual int recvSelf(const CommParameters &);
152 
153  void Print(std::ostream &s, int flag =0);
154  // Do nothing with void Print (std::ostream &s, int flag =0);
155  // use Brick3D report. 08/16/00
156  Response *setResponse(const std::vector<std::string> &argv, Information &eleInformation);
157  int getResponse (int responseID, Information &eleInformation);
158 
159  public:
160 
161  void incremental_Update(void);
162  //void iterative_Update(void);
163 
164  static BJtensor H_3D(double r1, double r2, double r3);
165  BJtensor interp_poli_at(double r, double s, double t);
166  static BJtensor dh_drst_at(double r, double s, double t);
167 
168 
169  TwentySevenNodeBrick & operator[](int subscript);
170 
171  BJtensor getStiffnessTensor(void) const;
172 
173  void set_strain_stress_tensor(FILE *fp, double * u);
174  BJtensor getMassTensor(void) const;
175 
176  BJtensor Jacobian_3D(BJtensor dh) const;
177  BJtensor Jacobian_3Dinv(BJtensor dh) const;
178  BJtensor Nodal_Coordinates(void) const;
179 
180  BJtensor incr_disp(void) const;
181  BJtensor total_disp(void) const;
182 
183  BJtensor total_disp(FILE *fp, double * u);
184 
186  BJtensor mass_matrix(const BJtensor & M);
187 
188 
189  int get_global_number_of_node(int local_node_number);
190  int get_Brick_Number(void);
191 
192 
193  //int * get_LM(void);
194  //void set_LM(Node * node); // commented out temporarily 09-27-2000 Zhaohui
195 
196  //these two files are originally in fe.h
197  static double get_Gauss_p_c(short order, short point_numb);
198  static double get_Gauss_p_w(short order, short point_numb);
199 
200  // returns nodal forces for given stress field in an element
201  BJtensor nodal_forces(void) const;
202  // returns nodal forces for ITERATIVE stress field in an element
203  BJtensor iterative_nodal_forces(void) const;
204  // returns nodal forces for given constant stress field in the element
205  BJtensor nodal_forces_from_stress(stresstensor &) const;
206  // returns nodal forces for given incremental strain field in an element
207  // by using the linearized constitutive BJtensor from the begining of the step !
208  BJtensor linearized_nodal_forces(void) const;
209 
210  // updates Material point stresses and strains from given displacements
211  BJtensor update_stress_strain(BJtensor & disp);
212 
213  void report(char *);
214  void reportshort(char *);
215  void reportPAK(char *);
216  void reportpqtheta(int);
217  //void reportLM(char *);
218  void computeGaussPoint(void);
219  void reportCIPIC(char *);
220  void reportTensorF(FILE *);
221  Vector getWeightofGP(void);
222 
223 
224  // Setting initial E according to the initial pressure
225  //void setInitE(void);
226  //void reportStressTensorF(FILE *);
227 
228 };
229 } // end of XC namespace
230 
231 
232 #endif
233 
BJtensor getStiffnessTensor(void) const
Returns the stiffness tensor.
Definition: TwentySevenNodeBrick.cpp:909
BJtensor stiffness_matrix(const BJtensor &K)
Returns the stiffness matrix.
Definition: TwentySevenNodeBrick.cpp:1298
Definition: BJtensor.h:110
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
const Vector & getResistingForceIncInertia(void) const
Returns the action of the element over its attached nodes. Computes damping matrix.
Definition: TwentySevenNodeBrick.cpp:3654
BJtensor mass_matrix(const BJtensor &M)
Returns the mass matrix.
Definition: TwentySevenNodeBrick.cpp:1328
Information about an element.
Definition: Information.h:80
int commitState()
Consuma el estado of the element.
Definition: TwentySevenNodeBrick.cpp:2886
void set_strain_stress_tensor(FILE *fp, double *u)
Asigna el stiffness tensor.
Definition: TwentySevenNodeBrick.cpp:1108
Base calass for the finite elements.
Definition: Element.h:104
Base class for loads over elements.
Definition: ElementalLoad.h:73
Definition: stresst.h:68
Definition: Matrix.h:82
Base class for finite element with pointer to nodes container.
Definition: ElementBase.h:46
Body forces over an element.
Definition: BodyForces3D.h:39
int update(void)
Actualiza el estado of the element.
Definition: TwentySevenNodeBrick.cpp:4931
~TwentySevenNodeBrick()
Destructor.
Definition: TwentySevenNodeBrick.cpp:199
void Print(std::ostream &s, int flag=0)
Imprime el objeto.
Definition: TwentySevenNodeBrick.cpp:3819
TwentySevenNodeBrick(void)
Constructor.
Definition: TwentySevenNodeBrick.cpp:187
Element * getCopy(void) const
Virtual constructor.
Definition: TwentySevenNodeBrick.cpp:195
Twenty seven node hexahedron with lagrangian formulation.
Definition: TwentySevenNodeBrick.h:69
BJtensor getMassTensor(void) const
Returns the tensor de masas.
Definition: TwentySevenNodeBrick.cpp:1197
void setDomain(Domain *theDomain)
Sets the domain for the element.
Definition: TwentySevenNodeBrick.cpp:2879
const Matrix & getMass(void) const
Returns the mass matrix.
Definition: TwentySevenNodeBrick.cpp:3141
Communication parameters between processes.
Definition: CommParameters.h:65
================================================================================
Definition: ContinuaReprComponent.h:34
Definition: Response.h:71
BJtensor Nodal_Coordinates(void) const
Returns the coordinates of the nodes.
Definition: TwentySevenNodeBrick.cpp:1362