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