8 #ifndef TPZPorousElasticResponse_h 9 #define TPZPorousElasticResponse_h 75 const char *
Name()
const ;
77 void Print(std::ostream & out)
const ;
102 if (m_is_G_constant_Q) {
103 T trace = T(epsilon.
I1());
104 STATE lambda,
K, dK_desp_vol;
105 this->
K(epsilon, K, dK_desp_vol);
106 lambda = K - (2.0/3.0)*
m_mu;
109 sigma.
Add(epsilon, 2. * m_mu);
111 T trace = T(epsilon.
I1());
112 REAL lambda,
G, dG_desp_vol;
113 this->
G(epsilon,G,dG_desp_vol);
114 lambda = T((2.0*G*m_nu)/(1.0-2.0*m_nu));
117 sigma.
Add(epsilon, 2. * G);
127 REAL p, p_star, r, j;
129 int n_iterations = 20;
130 bool stop_criterion =
false;
131 REAL res_tol = 1.0e-5;
133 for(
int i = 0; i < n_iterations; i++){
134 p_star = - m_pt_el +
exp(-eps_v*(1.0+m_e_0)/m_kappa)*(m_p_0 +
m_pt_el);
136 stop_criterion =
fabs(r) < res_tol;
140 j = -(
exp(-eps_v*(1.0+m_e_0)/m_kappa)*(1.0+
m_e_0)*(m_p_0 + m_pt_el))/(m_kappa);
145 epsilon.
XX() = eps_v/3.0;
146 epsilon.
YY() = eps_v/3.0;
147 epsilon.
ZZ() = eps_v/3.0;
151 stop_criterion =
false;
153 REAL corr_tol = 1.0e-8;
159 REAL corr_norm = 1.0;
161 for (i = 0; i < n_iterations; i++) {
164 delta_sigma = sigma - sigma_i;
165 delta_sigma.
CopyTo(res_sigma);
166 res_norm =
Norm(res_sigma);
167 stop_criterion = res_norm < res_tol && corr_norm < corr_tol;
168 if (stop_criterion) {
173 this->
De(epsilon,
De);
175 De.DeterminantInverse(det, De_inv);
177 std::cout <<
"TPZPorousElasticResponse:: De matrix does not have an inverse." << std::endl;
181 De_inv.
Multiply(res_sigma, delta_eps);
182 corr_norm =
Norm(delta_eps);
186 if ( i == n_iterations) {
187 std::cout <<
"TPZPorousElasticResponse:: Inversion process does not converge." << std::endl;
188 std::cout <<
"TPZPorousElasticResponse:: Residual norm = " << res_norm << std::endl;
189 std::cout <<
"TPZPorousElasticResponse:: Correction norm = " << corr_norm << std::endl;
bool m_is_G_constant_Q
Directive for define constant shear modulus calculations (false means constant Poisson ratio) ...
expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ fabs
void CopyTo(TPZTensor< T1 > &target) const
void ComputeStress(const TPZTensor< T > &epsilon, TPZTensor< T > &sigma) const
void Add(const TPZTensor< T1 > &tensor, const T2 &constant)
void CopyFrom(const TPZFMatrix< T > &source)
void Multiply(const T1 &multipl, const T2 &constant)
bool IsZero(long double a)
Returns if the value a is close Zero as the allowable tolerance.
bool m_plane_stress_Q
Directive for define Plain stress state or plane strain state.
TPZElasticResponse LinearizedElasticResponse(const TPZTensor< STATE > &epsilon_ref, const TPZTensor< STATE > &epsilon) const
Computes a linear elastic response from the linearization around a reference state eps_ref...
void Print(std::ostream &out) const
void SetShearModulusConstant(STATE G)
STATE m_mu
Second lamé parameter.
const char * Name() const
STATE m_p_0
Initial equivalent pressure stress.
void SetPoissonRatioConstant(STATE nu)
STATE m_kappa
Logarithmic bulk modulus.
void Poisson_linearized(const TPZTensor< STATE > &epsilon_ref, const TPZTensor< STATE > &epsilon, STATE &nu) const
TPZPorousElasticResponse & operator=(const TPZPorousElasticResponse &other)
void SetPorousElasticity(STATE kappa, STATE pt_el, STATE e_0, STATE p_0)
TVar Norm(const TPZFMatrix< TVar > &A)
Returns the norm of the matrix A.
#define DebugStop()
Returns a message to user put a breakpoint in.
STATE m_pt_el
Elastic tensile strengh.
void De(const TPZTensor< STATE > &epsilon, TPZFMatrix< STATE > &De) const
TPZPorousElasticResponse()
int ClassId() const override
void De_G_constant(const TPZTensor< STATE > &epsilon, TPZFMatrix< STATE > &De) const
void Read(TPZStream &buf, void *context) override
void De_Poisson_constant(const TPZTensor< STATE > &epsilon, TPZFMatrix< STATE > &De) const
virtual void Multiply(const TPZFMatrix< TVar > &A, TPZFMatrix< TVar > &res, int opt=0) const
It mutiplies itself by TPZMatrix<TVar>A putting the result in res.
STATE m_e_0
Initial void ratio.
expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ exp
Defines the interface for saving and reading data. Persistency.
Contains the declaration of TPZFlopCounter class and TPZCounter struct.
void ComputeStrain(const TPZTensor< T > &sigma, TPZTensor< T > &epsilon) const
void Write(TPZStream &buf, int withclassid) const override
TPZElasticResponse EvaluateElasticResponse(const TPZTensor< STATE > &epsilon) const
Computes a linear elastic response from function evaluation of non linear expressions.