XC Open source finite element analysis program
ElasticCrossAnisotropic.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 //# COPYRIGHT (C): Woody's license (by BJ):
29 // ``This source code is Copyrighted in
30 // U.S., for an indefinite period, and anybody
31 // caught using it without our permission, will be
32 // mighty good friends of ourn, cause we don't give
33 // a darn. Hack it. Compile it. Debug it. Run it.
34 // Yodel it. Enjoy it. We wrote it, that's all we
35 // wanted to do.''
36 //
37 //# PROJECT: Object Oriented Finite Element Program
38 //# PURPOSE: Elastic Cross Anisotropic Material implementation:
39 //# CLASS: ElasticIsotropic3D
40 //#
41 //# VERSION: 0.61803398874989 (golden section)
42 //# LANGUAGE: C++
43 //# TARGET OS: all...
44 //# DESIGN: Zhaohui Yang, Boris Jeremic (jeremic@ucdavis.edu)
45 //# PROGRAMMER(S): Zhaohui Yang, Yi Bian, Boris Jeremic
46 //#
47 //#
48 //# DATE: 10Oct2002
49 //# UPDATE HISTORY: March 20, 2003 Re-activated Joey Yang
50 //#
51 //#
52 //===============================================================================
53 
54 #ifndef ElasticCrossAnisotropic_h
55 #define ElasticCrossAnisotropic_h
56 
57 #include <utility/matrix/Vector.h>
58 #include <material/nD/NDMaterial.h>
59 #include <utility/matrix/nDarray/Tensor.h>
60 #include <utility/matrix/nDarray/straint.h>
61 #include <utility/matrix/nDarray/stresst.h>
62 
63 namespace XC {
65 //
68  {
69  private:
70  static Vector sigma;
71  static Matrix D;
72  Vector Tepsilon;
73  Vector Cepsilon;
74 
75  Tensor Dt;
76 //Tensor Dt_commit; //!< last-step Elastic constants tensor
77  mutable stresstensor Stress;
78  mutable straintensor Strain;
79 
80 // all the directions are relative so we call them "horizontal" and "vertical", take that
81 // horizontal is one plane of anisotropy while vertical is the axes perpendicular to that plane.
82  double Eh;
83  double Ev;
84  double nuhv;
85  double nuhh;
86  double Ghv;
87  double rho;
88 
89  void setInitElasticStiffness(void);
90  void convertD2TensorEijkl(void);
91  protected:
92  int sendData(CommParameters &);
93  int recvData(const CommParameters &);
94  public:
95  ElasticCrossAnisotropic(int tag, double Ehp, double Evp, double nuhvp,double nuhhp, double Ghvp, double rhop = 0.0);
96  ElasticCrossAnisotropic(int tag);
98 
99  double getrho();
100  int setTrialStrain(const Vector &v);
101  int setTrialStrain(const Vector &v, const Vector &r);
102  int setTrialStrainIncr(const Vector &v);
103  int setTrialStrainIncr(const Vector &v, const Vector &r);
104 
105  const Matrix &getTangent(void) const;
106  const Vector &getStress(void) const;
107  const Vector &getStrain(void) const;
108 
109  int setTrialStrain(const Tensor &v);
110  int setTrialStrain(const Tensor &v, const Tensor &r);
111  int setTrialStrainIncr(const Tensor &v);
112  int setTrialStrainIncr(const Tensor &v, const Tensor &r);
113 
114  const Tensor &getTangentTensor(void) const;
115  const stresstensor &getStressTensor(void) const;
116  const straintensor &getStrainTensor(void) const;
117  const straintensor &getPlasticStrainTensor(void) const;
118 
119  int commitState (void);
120  int revertToLastCommit (void);
121  int revertToStart (void);
122 
123  NDMaterial *getCopy(void) const;
124  NDMaterial *getCopy(const std::string &) const;
125  const std::string &getType(void) const;
126  int getOrder(void) const;
127 
128  void Print(std::ostream &s, int flag = 0);
129 
130 //int setParameter(const std::vector<std::string> &argv, Parameter &param);
131 //int updateParameter (int parameterID, Information &info);
132 
133  int sendSelf(CommParameters &);
134  int recvSelf(const CommParameters &);
135  };
136 } // end of XC namespace
137 
138 #endif
139 
int setTrialStrain(const Vector &v)
Asigna el trial strain value.
Definition: ElasticCrossAnisotropic.cpp:120
Base class for 2D and 3D materials.
Definition: NDMaterial.h:91
Base class for elastic anisotropic materials.
Definition: ElasticCrossAnisotropic.h:67
Definition: Vector.h:82
int sendData(CommParameters &)
Send object members through the channel being passed as parameter.
Definition: ElasticCrossAnisotropic.cpp:264
Definition: stresst.h:68
int setTrialStrainIncr(const Vector &v)
Asigna el valor del incremento de la trial strain.
Definition: ElasticCrossAnisotropic.cpp:136
const Vector & getStrain(void) const
Returns strain.
Definition: ElasticCrossAnisotropic.cpp:182
int recvSelf(const CommParameters &)
Receives object through the channel being passed as parameter.
Definition: ElasticCrossAnisotropic.cpp:304
Strain tensor.
Definition: straint.h:67
const Matrix & getTangent(void) const
Return the tangent stiffness matrix.
Definition: ElasticCrossAnisotropic.cpp:155
Definition: Matrix.h:82
int sendSelf(CommParameters &)
Sends object through the channel being passed as parameter.
Definition: ElasticCrossAnisotropic.cpp:290
int recvData(const CommParameters &)
Receives object members through the channel being passed as parameter.
Definition: ElasticCrossAnisotropic.cpp:277
const Vector & getStress(void) const
Returns stress.
Definition: ElasticCrossAnisotropic.cpp:162
void Print(std::ostream &s, int flag=0)
Imprime el objeto.
Definition: ElasticCrossAnisotropic.cpp:322
Communication parameters between processes.
Definition: CommParameters.h:65
================================================================================
Definition: ContinuaReprComponent.h:34
NDMaterial * getCopy(void) const
Virtual constructor.
Definition: ElasticCrossAnisotropic.cpp:254