NeoPZ
TPZElasticResponse.h
Go to the documentation of this file.
1 //
2 // TPZElasticResponse.h
3 // pz
4 //
5 // Created by Erick Slis Raggio Santos on 04/07/2009.
6 //
7 
8 
9 #ifndef TPZElasticResponse_H
10 #define TPZElasticResponse_H
11 
12 #include "TPZTensor.h"
13 #include "pzreal.h"
14 
15 
17 
19  REAL m_lambda;
20 
22  REAL m_mu;
23 
26 
27 public:
28 
34  int ClassId() const override;
35 
40 
45 
50 
57  void Write(TPZStream &buf, int withclassid) const override;
58 
65  void Read(TPZStream &buf, void *context) override;
66 
67 
73  const char * Name() const;
74 
80  void Print(std::ostream & out) const;
81 
88  template<class T>
89  void ComputeStress(const TPZTensor<T> & epsilon, TPZTensor<T> & sigma) const {
90 
91  TPZTensor<T> delta_epsilon;
92  delta_epsilon.XX() = -m_eps_star.XX();
93  delta_epsilon.XY() = -m_eps_star.XY();
94  delta_epsilon.XZ() = -m_eps_star.XZ();
95  delta_epsilon.YY() = -m_eps_star.YY();
96  delta_epsilon.YZ() = -m_eps_star.YZ();
97  delta_epsilon.ZZ() = -m_eps_star.ZZ();
98  delta_epsilon += epsilon; // Substract residual strain
99  T trace = delta_epsilon.I1();
100  sigma.Identity();
101  sigma.Multiply(trace, m_lambda);
102  sigma.Add(delta_epsilon, 2. * m_mu);
103  }
104 
111  template<class T>
112  void ComputeStrain(const TPZTensor<T> & sigma, TPZTensor<T> & epsilon) const {
113  const T fac = T((1 / 3.)*(1. / (3. * m_lambda + 2. * m_mu) - 1. / (2. * m_mu)));
114  REAL trace = sigma.I1();
115  epsilon.Identity();
116  epsilon.Multiply(trace, fac);
117  epsilon.Add(sigma, 1. / (2. * m_mu));
118  epsilon += m_eps_star;// Adding residual strain
119  }
120 
121 
127  void De(TPZFMatrix<REAL> & De);
128 
129 
136  void SetEngineeringData(REAL Eyoung, REAL Poisson);
137 
138 
145  void SetLameData(REAL lambda, REAL mu);
146 
152  REAL Lambda() const;
153 
159  REAL K() const;
160 
166  REAL Mu() const;
167 
173  REAL G() const;
174 
180  REAL E() const;
181 
187  REAL Poisson() const;
188 
195  void SetResidualStrainData(TPZTensor<REAL> & eps_res);
196 
204 };
205 
206 #endif /* TPZElasticResponse_h */
REAL m_lambda
First Lamé parameter.
void Add(const TPZTensor< T1 > &tensor, const T2 &constant)
Definition: TPZTensor.h:757
void Multiply(const T1 &multipl, const T2 &constant)
Definition: TPZTensor.h:766
void Print(std::ostream &out) const
T I1() const
Definition: TPZTensor.h:903
void SetLameData(REAL lambda, REAL mu)
void Read(TPZStream &buf, void *context) override
TPZTensor< REAL > & ResidualStrainData()
T & YY() const
Definition: TPZTensor.h:578
void ComputeStress(const TPZTensor< T > &epsilon, TPZTensor< T > &sigma) const
T & YZ() const
Definition: TPZTensor.h:582
void ComputeStrain(const TPZTensor< T > &sigma, TPZTensor< T > &epsilon) const
void Identity()
Definition: TPZTensor.h:705
TPZTensor< REAL > m_eps_star
Residual strain at zero stress state.
const char * Name() const
void De(TPZFMatrix< REAL > &De)
void SetEngineeringData(REAL Eyoung, REAL Poisson)
T & XX() const
Definition: TPZTensor.h:566
T & XY() const
Definition: TPZTensor.h:570
T & ZZ() const
Definition: TPZTensor.h:586
TPZElasticResponse & operator=(const TPZElasticResponse &other)
Defines the interface for saving and reading data. Persistency.
Definition: TPZStream.h:50
int ClassId() const override
Contains the declaration of TPZFlopCounter class and TPZCounter struct.
T & XZ() const
Definition: TPZTensor.h:574
This class defines the interface to save and restore objects from TPZStream objects. Persistency.
Definition: TPZSavable.h:67
void SetResidualStrainData(TPZTensor< REAL > &eps_res)
void Write(TPZStream &buf, int withclassid) const override
REAL m_mu
Second Lamé parameter.