xc
FDdecoupledElastic3D.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: Finite Deformation Hyper-Elastic classes
40 //# CLASS:
41 //#
42 //# VERSION: 0.6_(1803398874989) (golden section)
43 //# LANGUAGE: C++
44 //# TARGET OS: all...
45 //# DESIGN: Zhao Cheng, Boris Jeremic (jeremic@ucdavis.edu)
46 //# PROGRAMMER(S): Zhao Cheng, Boris Jeremic
47 //#
48 //#
49 //# DATE: July 2004
50 //# UPDATE HISTORY:
51 //#
52 //===============================================================================
53 
54 #ifndef FDdecoupledElastic3D_H
55 #define FDdecoupledElastic3D_H
56 
57 #include "material/nD/FiniteDeformation/FiniteDeformationElastic3D.h"
58 #include "utility/matrix/nDarray/stresst.h"
59 #include "utility/matrix/nDarray/straint.h"
60 
61 
62 
63 namespace XC {
64  class WEnergy;
65 
67 //
71  {
72  protected:
73  WEnergy *W;
74 
75  straintensor F;
76  straintensor C;
77  double J;
78  straintensor Cinv;
79  double lambda1, lambda2, lambda3;
80  double lambda_wave1, lambda_wave2, lambda_wave3;
81  int caseIndex;
82  int FromForC;
83 
84  Tensor Stiffness;
85  straintensor thisGreenStrain;
86  stresstensor thisPK2Stress;
87 
88  void free_mem(void);
89  void alloc(const WEnergy *);
90  protected:
91  int sendData(Communicator &);
92  int recvData(const Communicator &);
93  private:
94  const WEnergy *getWEnergy(void) const;
95 
96  const double getJ(void) const;
97  const Vector getlambda(void) const;
98  const Vector getlambda_wave(void) const;
99 
100  const Vector wa(void);
101  const Tensor Yab(void);
102  const Tensor FDisoStiffness(void);
103  const Tensor FDvolStiffness(void);
104 
105 
106 // int setInitialTangentTensor(void);
107  int ComputeTrials(void);
108  int getCaseIndex(void) const;
109  public:
110  FDdecoupledElastic3D(int tag, int classTag, WEnergy * , double );
111  FDdecoupledElastic3D(int tag, WEnergy * , double );
112  FDdecoupledElastic3D(int tag, WEnergy * );
113  FDdecoupledElastic3D(int tag= 0);
115 
116  virtual ~FDdecoupledElastic3D();
117 
118  int setTrialF(const straintensor &f);
119  int setTrialFIncr(const straintensor &df);
120  int setTrialC(const straintensor &c);
121  int setTrialCIncr(const straintensor &dc);
122 
123  const Tensor &getTangentTensor(void) const; // Default Lagrangian Tangent Tensor
124  const Tensor &getInitialTangentTensor(void) const;
125 
126  const straintensor &getStrainTensor(void) const; // Default Green Lagrangian Strain
127  const stresstensor &getStressTensor(void) const; // Default 2nd Piola Kirchhoff Stress
128  const straintensor &getF(void) const;
129  const straintensor &getC(void) const;
130 
131 // virtual const Vector &getStress(void) const;
132 // virtual const Vector &getStrain(void) const;
133 
134 // virtual const stresstensor getCommittedStress(void);
135 // virtual const straintensor getCommittedStrain(void);
136 
137 // virtual const straintensor getPlasticStrainTensor(void);
138 
139  int commitState(void) ;
140  int revertToLastCommit(void) ;
141  int revertToStart(void) ;
142 
143  NDMaterial *getCopy(void) const;
144  NDMaterial *getCopy(const std::string &) const;
145 
146  const std::string &getType(void) const;
147  int getOrder (void) const;
148 
149  int sendSelf(Communicator &);
150  int recvSelf(const Communicator &);
151 
152  void Print(std::ostream &s, int flag = 0) const;
153 
154 // int setParameter(const std::vector<std::string> &argv, Parameter &param);
155 // int updateParameter(int parameterID, Information &info);
156 
157  const stresstensor getPK1StressTensor(void) const;
158  const stresstensor getCauchyStressTensor(void) const;
159  };
160 } // end of XC namespace
161 
162 #endif
163 
int recvSelf(const Communicator &)
Receives object through the communicator argument.
Definition: FDdecoupledElastic3D.cpp:526
NDMaterial * getCopy(void) const
Virtual constructor.
Definition: FDdecoupledElastic3D.cpp:460
Float vector abstraction.
Definition: Vector.h:94
int revertToStart(void)
Revert the material to its initial state.
Definition: FDdecoupledElastic3D.cpp:433
Base class for finite deformation elastic materials.
Definition: FiniteDeformationElastic3D.h:64
Stress tensor.
Definition: stresst.h:70
Communication parameters between processes.
Definition: Communicator.h:66
int recvData(const Communicator &)
Receives object members through the communicator argument.
Definition: FDdecoupledElastic3D.cpp:494
Hyper-elasto-plastic elastic material for three-dimensional problems.
Definition: FDdecoupledElastic3D.h:70
const Tensor & getInitialTangentTensor(void) const
Return the material initial stiffness.
Definition: FDdecoupledElastic3D.cpp:369
virtual ~FDdecoupledElastic3D()
Destructor.
Definition: FDdecoupledElastic3D.cpp:108
int sendData(Communicator &)
Send object members through the communicator argument.
Definition: FDdecoupledElastic3D.cpp:477
Base class for 2D and 3D materials.
Definition: NDMaterial.h:101
void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: FDdecoupledElastic3D.cpp:545
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
FDdecoupledElastic3D(int tag, int classTag, WEnergy *, double)
Constructor.
Definition: FDdecoupledElastic3D.cpp:81
int sendSelf(Communicator &)
Sends object through the communicator argument.
Definition: FDdecoupledElastic3D.cpp:511
Base class for strain energy density function based materials.
Definition: WEnergy.h:65
Strain tensor.
Definition: straint.h:68
const Tensor & getTangentTensor(void) const
Return the material tangent stiffness.
Definition: FDdecoupledElastic3D.cpp:365