5 #ifndef TPZYCTRESCAREGULARIZED_H 6 #define TPZYCTRESCAREGULARIZED_H 27 return "TPZYCTrescaRegularized";
30 void Print(std::ostream & out)
const override 89 for(i=0; i<6; i++) gRefTension.
fData[i] = state(i,0);
104 for(i=0; i<6; i++) tangent(0,i) = gradtheta.
fData[i];
107 N(gRefTension,A,ndir,0);
109 for(i=0; i<6; i++) tangent(0,i) = ndir[0].fData[i];
126 Compute(gRefTension,A,phivec,0);
128 res(0,0) = phivec[0];
144 #ifdef LOG4CXX_PLASTICITY 145 LoggerPtr logger(Logger::getLogger(
"plasticity.yctresca"));
151 const REAL
tol = 1.e-4;
155 REAL aux = (1. -
tol);
158 #ifdef LOG4CXX_PLASTICITY 159 std::stringstream sout;
160 sout << __PRETTY_FUNCTION__ <<
" O angulo nao corresponde " << invangle;
167 REAL asineps =
asin(1. - tol);
169 invangle = (tayext + T(asineps)) / 3.;
171 #ifdef LOG4CXX_PLASTICITY 172 std::stringstream sout;
173 T small =
cos(invangle)*2.-T(
sqrt(3.));
175 sout << __PRETTY_FUNCTION__ <<
"2.*cos(invangle)-sqrt(3.) " << small;
176 sout <<
" invangle " << invangle;
179 result[0] =
sqrt(sigma.
J2())*
cos(invangle)*2. - A;
187 #ifdef LOG4CXX_PLASTICITY 188 LoggerPtr logger(Logger::getLogger(
"plasticity.yctresca"));
191 const REAL
tol = 1.e-4;
203 #ifdef LOG4CXX_PLASTICITY 205 std::stringstream sout;
206 sout <<
"calling GradTheta from father... invangle " << invangle;
212 #ifdef LOG4CXX_PLASTICITY 214 std::stringstream sout;
215 sout <<
"sigma " << sigma << std::endl;
216 sout <<
"theta " << theta << std::endl;
217 sout <<
"gratheta " << gradtheta << std::endl;
234 REAL asineps =
asin(1. - tol);
236 theta = (tayext + T(asineps)) * T(alpha / 3.);
238 REAL derivasin = 1./
sqrt(1.-(1. - tol)*(1. - tol));
239 gradtheta.
Multiply(T(derivasin),T(1./3.));
258 #ifdef LOG4CXX_PLASTICITY 259 LoggerPtr logger(Logger::getLogger(
"plasticity.yctresca"));
284 GradTheta<T> (sigma,theta,gradtheta);
293 T sqj2 =
sqrt(sigma.J2());
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
const char * Name() const
void Multiply(const T1 &multipl, const T2 &constant)
int NumCases()
Number of types of residuals.
void Compute(const TPZTensor< T > &sigma, const T &A, TPZVec< T > &result, int checkForcedYield=0) const
Contains definitions to LOGPZ_DEBUG, LOGPZ_INFO, LOGPZ_WARN, LOGPZ_ERROR and LOGPZ_FATAL, and the implementation of the inline InitializePZLOG(string) function using log4cxx library or not. It must to be called out of "#ifdef LOG4CXX" scope.
TPZManVector< T, 6 > fData
void Residual(TPZFMatrix< REAL > &res, int icase)
std::underlying_type< Enumeration >::type as_integer(const Enumeration value)
void GradTheta(const TPZTensor< T > &sigma, T &theta, TPZTensor< T > &gradasin) const
Compute the inverse angle of the tresca yield criterium formula and the related data.
This class implements a simple vector storage scheme for a templated class T. Utility.
void LoadState(TPZFMatrix< REAL > &state)
LoadState will keep a given state as static variable of the class.
void Read(TPZStream &buf, void *context) override
read objects from the stream
static TPZTensor< REAL > gRefTension
void Print(std::ostream &out) const override
void Compute(const TPZTensor< T > &sigma, const T &A, TPZVec< T > &result, int checkForcedYield=0) const
Calculo do criterio de plastificacao.
#define LOGPZ_DEBUG(A, B)
Define log for debug info.
void dJ2(TPZTensor< T > &Tangent) const
T InverseAngle(const TPZTensor< T > &deviatoric) const
Computes the inverse angle of the tresca yield criterium formula.
expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ sqrt
virtual int GetNYield() const override
int Redim(const int64_t newRows, const int64_t newCols) override
Redimension a matrix and ZERO your elements.
This class implements a tresca yield criteria whrere the gradient of the inverse angle is regularized...
void Write(TPZStream &buf, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
void N(const TPZTensor< T > &sigma, const T &A, TPZVec< TPZTensor< T > > &Ndir, int checkForcedYield=0) const
Derivada da funcao de plastificacao.
void GradTheta(const TPZTensor< T > &sigma, T &theta, TPZTensor< T > &gradtheta) const
Compute the inverse angle of the tresca yield criterium formula and the related data.
expr_ expr_ expr_ expr_ expr_ expr_ asin
Defines the interface for saving and reading data. Persistency.
void ComputeTangent(TPZFMatrix< REAL > &tangent, TPZVec< REAL > &, int icase)
void GradInverseAngle(const TPZTensor< T > &sigma, TPZTensor< T > &grad) const
Computes the derivative of the inverse angle of the tresca yield criterium formula.
TPZFlopCounter cos(const TPZFlopCounter &orig)
Returns the cosine in radians and increments the counter of the Cosine.
void S(TPZTensor< T > &s) const
int ClassId() const override
Define the class id associated with the class.