21 virtual int ClassId()
const override;
29 void Print(std::ostream & out)
const override 107 sigmaTensor.
XX() = sigma[0];
108 sigmaTensor.
YY() = sigma[1];
109 sigmaTensor.
ZZ() = sigma[2];
110 Compute(sigmaTensor, kprev, yield, 0);
152 for(i=0; i<6; i++) gRefTension.
fData[i] = state(i,0);
161 this->gRefTension.
dJ2(grad);
166 tangent(0,i) = grad.
fData[i];
173 this->gRefTension.
dJ3(grad);
178 tangent(0,i) = grad.
fData[i];
190 tangent(0,i) = grad.
fData[i];
203 tangent(0,i) = grad.
fData[i];
216 tangent(0,i) = grad[0].fData[i];
230 res(0,0) = gRefTension.
J2();
233 res(0,0) = gRefTension.
J3();
246 this->
Compute(gRefTension,yield,phi,0);
263 T theta =
asin(inverseangle)*(1./3.);
264 result[0] =
sqrt(sigma.
J2())*
cos(theta)*2.-A;
270 #ifdef LOG4CXX_PLASTICITY 271 LoggerPtr logger(Logger::getLogger(
"plasticity.yctresca"));
284 #ifdef LOG4CXX_PLASTICITY 286 std::stringstream sout;
287 sout <<
"A " << A <<
" N: sigma " << sigma;
291 GradTheta<T> (sigma,theta,gradtheta);
292 #ifdef LOG4CXX_PLASTICITY 294 std::stringstream sout;
295 sout <<
"N: theta " << theta;
296 sout <<
"gradtheta " << gradtheta;
301 T sqj2 =
sqrt(sigma.J2());
310 result.
Add(resultdj2,1.);
311 #ifdef LOG4CXX_PLASTICITY 313 std::stringstream sout;
314 sout <<
"sqj2 " << sqj2;
315 sout <<
" theta" << theta;
316 T coco =
sin (theta);
317 sout <<
" sintheta " << coco;
318 sout <<
"dj2" << dj2;
319 sout <<
"N: resultdtheta " << theta;
323 std::stringstream sout;
324 sout << __PRETTY_FUNCTION__ << std::endl;
325 sout <<
"gradtheta " << gradtheta << std::endl;
326 sout <<
"Result " << result;
336 T j2 = deviatoric.
J2();
337 T j3 = deviatoric.
J3();
339 return j3/j2/
sqrt(j2)*(-3.*
sqrt(3.)/2.);
363 #ifdef LOG4CXX_PLASTICITY 364 LoggerPtr logger(Logger::getLogger(
"plasticity.yctresca"));
371 theta = (1./3.)*
asin(invangle);
373 T derivasin = 1./
sqrt(1.-invangle*invangle);
374 gradtheta.
Multiply(derivasin,1./3.);
377 #endif //TPZYCTRESCA_H Contains declaration of the TPZSavable class which defines the interface to save and restore objects ...
void Add(const TPZTensor< T1 > &tensor, const T2 &constant)
void Multiply(const T1 &multipl, const T2 &constant)
void Read(TPZStream &buf, void *context) override
read objects from the stream
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 YieldFunction(const TPZVec< STATE > &sigma, STATE kprev, TPZVec< STATE > &yield) const override
static TPZTensor< REAL > gRefTension
std::underlying_type< Enumeration >::type as_integer(const Enumeration value)
void AlphaMultiplier(const T &A, T &multiplier) const
clarg::argBool h("-h", "help message", false)
This class implements a simple vector storage scheme for a templated class T. Utility.
void ComputeTangent(TPZFMatrix< REAL > &tangent, TPZVec< REAL > &coefs, int icase)
void N(const TPZTensor< T > &sigma, const T &A, TPZVec< TPZTensor< T > > &Ndir, int checkForcedYield=0) const
virtual int ClassId() const override
Define the class id associated with the class.
void Print(std::ostream &out) const override
int NumCases()
number of types of residuals
#define LOGPZ_DEBUG(A, B)
Define log for debug info.
void SetYieldStatusMode(const TPZTensor< REAL > &sigma, const REAL &A)
void dJ3(TPZTensor< T > &deriv) const
void dJ2(TPZTensor< T > &Tangent) const
void Residual(TPZFMatrix< REAL > &res, int icase)
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
void Write(TPZStream &buf, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
int Redim(const int64_t newRows, const int64_t newCols) override
Redimension a matrix and ZERO your elements.
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
const char * Name() const
virtual int GetNYield() const override
void H(const TPZTensor< T > &sigma, const T &A, TPZVec< T > &h, int checkForcedYield=0) const
Defines the interface for saving and reading data. Persistency.
void LoadState(TPZFMatrix< REAL > &state)
LoadState will keep a given state as static variable of the class.
void SetForceYield(const int forceYield)
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.