3 #ifndef TPZYCSANDLERDIMAGGIOL_H 4 #define TPZYCSANDLERDIMAGGIOL_H 19 static LoggerPtr loggerSML(Logger::getLogger(
"material.plasticity.SML"));
58 return "TPZYCSandlerDimaggioL";
61 void Print(std::ostream & out)
const override 63 out <<
"\n" << this->
Name();
189 #ifdef LOG4CXX_PLASTICITY 191 LoggerPtr logger(Logger::getLogger(
"plasticity.SandlerDimaggioL"));
192 std::stringstream sout;
193 sout <<
">>> TPZYCSandlerDimaggio::Compute *** - Plastic Potential / Yield - associative";
216 res[0] =
sqrt(J2) - FI1;
229 #ifdef LOG4CXX_PLASTICITY 231 LoggerPtr logger(Logger::getLogger(
"plasticity.SandlerDimaggio"));
232 std::stringstream sout;
233 sout <<
"*** TPZYCSandlerDimaggio::ComputePlasticPotential ***";
234 sout <<
"\nDivision by F=" <<
TPZExtractVal::val(L) <<
" at f2 - ellipsoidal hardening/softening cap";
240 T Temp1( (L - I1)/(FL * T(
fR) ) );
242 T Temp2 = J2 / FL /
FL;
244 res[1] = Temp1 + Temp2 - T(1.);
254 res[1] =
sqrt(J2) - FI1;
259 std::stringstream sout;
266 sout <<
"Computing the distance from cap entry I1 " << I1 <<
" sqJ2 " << sqj2 <<
" lmax " << lmax <<
" F(lmax) " << FI1;
289 #ifdef LOG4CXX_PLASTICITY 291 LoggerPtr logger(Logger::getLogger(
"plasticity.SandlerDimaggioL"));
292 std::stringstream sout;
293 sout <<
">>> TPZYCSandlerDimaggio::N *** - Plastification direction - associative";
314 SQRTJ2 =
sqrt(T(1.e-6)+J2);
325 Temp1 =
exp( Temp1 ) * T (
fB *
fC);
329 #ifdef LOG4CXX_PLASTICITY 331 LoggerPtr logger(Logger::getLogger(
"plasticity.SandlerDimaggio"));
332 std::stringstream sout;
333 sout <<
"*** TPZYCSandlerDimaggio::N *** - SQRT(J2) = " <<
TPZExtractVal::val(SQRTJ2) <<
" < 1.e-6 causes error in 0-th yield function. Imposing J2 = 1.e-6 instead";
337 SQRTJ2 = T(1.e-6)+SQRTJ2;
340 Temp1 = Temp1 - I1 / SQRTJ2 / T(6.);
341 T Temp2 = T(1.) / SQRTJ2;
342 T Temp3 = Temp2 / T(2.);
344 Ndir[0].XX() = Temp1 + sigma.
XX() * Temp3;
345 Ndir[0].YY() = Temp1 + sigma.
YY() * Temp3;
346 Ndir[0].ZZ() = Temp1 + sigma.
ZZ() * Temp3;
350 Ndir[0].YZ() = sigma.
YZ() * Temp3;
351 Ndir[0].XZ() = sigma.
XZ() * Temp3;
352 Ndir[0].XY() = sigma.
XY() * Temp3;
355 std::stringstream sout;
393 T Temp = (I1-L)/ T(
fR *
fR) - I1 / T(6.);
394 Temp = Temp / FL2 * T(2.);
396 #ifdef LOG4CXX_PLASTICITY 398 LoggerPtr logger(Logger::getLogger(
"plasticity.SandlerDimaggio"));
399 std::stringstream sout;
400 sout <<
"*** TPZYCSandlerDimaggio::N *** X = " << X
401 <<
"\n L = " << L <<
" L_REAL = " << L_REAL
403 <<
"\n Temp = " << Temp
404 <<
"\n 3 Temp + I1/FL2 " << T(3.)*Temp+I1/FL2;
410 Ndir[1].XX() = Temp + sigma.
XX() / FL2;
411 Ndir[1].YY() = Temp + sigma.
YY() / FL2;
412 Ndir[1].ZZ() = Temp + sigma.
ZZ() / FL2;
413 Ndir[1].YZ() = sigma.
YZ() / FL3;
414 Ndir[1].XZ() = sigma.
XZ() / FL3;
415 Ndir[1].XY() = sigma.
XY() / FL3;
420 Ndir[1] = Deviatoric;
425 LoggerPtr logger(Logger::getLogger(
"pz.plasticity.SandlerDimaggio.main"));
426 std::stringstream sout;
427 sout <<
"<< TPZYCSandlerDimaggio::N *** \n sigma = \n" << sigma
430 <<
"\nSQRTJ2 = " << SQRTJ2
431 <<
"\nNdir = \n" << Ndir;
462 #ifdef LOG4CXX_PLASTICITY 464 LoggerPtr logger(Logger::getLogger(
"plasticity.SandlerDimaggio"));
465 std::stringstream sout;
466 sout <<
">>> TPZYCSandlerDimaggio::H *** - Hardening modulus";
483 h[0] =
exp (I1 * T(
fB) ) * T(3. *
fB *
fC) ;
496 h[1] = (I1 - L) / FL2 * T ( 6. /
fR /
fR);
534 REAL I1 = sigtrial.
I1();
537 sigtrialIJ[1] = sqJ2;
538 sigtrialIJkeep = sigtrialIJ;
539 Compute(sigtrial, L, yield, 0);
540 int surfaceprojected = -1;
543 std::stringstream sout;
544 sout <<
"Value of fIsonCap " <<
fIsonCap;
545 if (fIsonCap ==
true) {
546 sout <<
"\nI should stop";
553 if (yield[1] <= 0.) {
554 sigtrialIJF1 = sigtrialIJ;
558 sigtrial.
Adjust(sigtrialIJF1, sigproj);
559 surfaceprojected = 0;
568 if(loggerSML->isDebugEnabled())
570 std::stringstream sout;
573 sout <<
"ELASTIC YIELD\n";
575 sout <<
"Deformation elastic yield = " << yield;
576 sout <<
"delgamma condition " << (delgamma[0] > 0.) <<
" " << (delgamma[1] > 0.) << std::endl;
583 if (sigtrialIJF1[0] <=
LMax())
586 sigtrialIJ = sigtrialIJF1;
591 sigtrialIJ[0] =
LMax();
599 sigtrialIJ[1] = sqJ2;
601 sigtrial.
Adjust(sigtrialIJ, sigproj);
606 std::stringstream sout;
607 sout <<
"Projecting on the cap after projection on F1 : sigtrialIJ " << sigtrialIJ <<
" L " << L <<
" Lproj " << Lproj;
614 surfaceprojected = 1;
617 sigtrial.
Adjust(sigtrialIJ, sigproj);
618 if(sigtrialIJ[0] >
LMax())
621 sigtrialIJ[0] =
LMax();
629 sigtrialIJ[1] = sqJ2;
631 sigtrial.
Adjust(sigtrialIJ, sigproj);
636 std::stringstream sout;
637 sout <<
"Projecting on the cap after projection on F2 : sigtrialIJ " << sigtrialIJ <<
" L " << L <<
" Lproj " << Lproj;
730 this->
N(sigproj, Lproj, Ndir, 1);
732 sigPlast.
Add(sigproj, -1.);
734 sigPlastIJ[0] = sigPlast.I1();
735 sigPlastIJ[1] =
sqrt(sigPlast.J2());
738 epsplastIJ[0] = epsPlast.
I1();
739 epsplastIJ[1] =
sqrt(epsPlast.
J2());
740 REAL I1err = sigPlastIJ[0]-epsplastIJ[0]*3.*ER.
K();
741 REAL J2err = sigPlastIJ[1]-epsplastIJ[1]*2.*ER.
G();
742 if (
fabs(I1err) > 1.e-10 ||
fabs(J2err) > 1.e-10) {
747 if (surfaceprojected != 0 && surfaceprojected != 1) {
750 REAL i1Ndir = Ndir[surfaceprojected].I1();
751 REAL sqj2Ndir =
sqrt(Ndir[surfaceprojected].J2());
752 REAL theta1 =
atan2(sqj2Ndir,i1Ndir);
753 REAL theta2 =
atan2(epsplastIJ[1],epsplastIJ[0]);
754 REAL difftheta = theta1-theta2;
755 REAL sigplnorm = sigPlast.Norm();
756 if (
fabs(difftheta) > 1.e-4 && sigplnorm > 1.e-9) {
757 std::cout <<
"difftheta " << difftheta <<
" theta1 " << theta1 <<
" theta2 " << theta2 << std::endl;
760 if (surfaceprojected == 1) {
763 REAL cst = i1Ndir*(FL*
fR)/6.;
764 REAL sst = sqj2Ndir*
FL;
765 REAL check = 1.-cst*cst-sst*sst;
766 if (
fabs(check) > 1.e-6) {
767 std::cout <<
"check = " << check <<
" cst " << cst <<
" sst " << sst << std::endl;
769 theta =
atan2(sst,cst);
771 REAL xdist = sigtrialIJ[0]-Lproj;
772 REAL ydist = sigtrialIJ[1];
773 REAL theta3 =
atan2(ydist, xdist/
fR);
775 REAL thetadiff = theta-theta3;
776 if (
fabs(thetadiff) > 1.e-6) {
777 std::cout <<
" thetadiff " << thetadiff <<
" theta " << theta <<
" theta3 " << theta3 << std::endl;
780 REAL verify =
FuncTheta2L(ER, theta, Lproj, sigtrialIJkeep);
781 if (
fabs(verify) > 1.e-9) {
782 std::cout <<
"Validity of functheta " << verify << std::endl;
786 REAL scale = epsPlast.
Norm()/Ndir[surfaceprojected].Norm();
787 for (
int i=0; i<6; i++) {
788 REAL diff =
fabs(scale*Ndir[surfaceprojected][i]-epsPlast[i]);
795 delgamma[surfaceprojected] = scale;
802 REAL i1Ndir = Ndir[0].I1();
803 REAL sqj2Ndir =
sqrt(Ndir[1].J2());
804 REAL i1epsplast = epsPlast.
I1();
805 REAL sqj2epsplast =
sqrt(epsPlast.
J2());
807 delgamma[0] = i1epsplast/i1Ndir;
815 delgamma[1] = sqj2epsplast/sqj2Ndir;
822 Compute(sigproj, Lproj, yield, 0);
824 if(loggerSM->isDebugEnabled())
826 std::stringstream sout;
827 sout <<
"After projecting the point yield = " << yield;
828 sout <<
"\ndelgamma = " << delgamma;
832 if (yield[0] > 1.e-8 &&
fIsonCap ==
true) {
835 if (yield[1] > 1.e-6) {
846 REAL I1 = sigtrialIJ[0];
847 REAL
res = 3.*ER.
K()*depspdl*(L-Lextern)-(I1-L);
848 while (
fabs(res) > 1.e-10) {
852 dres = 3.*ER.
K()*depspdl + 1 + 3.*ER.
K()*(L-Lextern)*d2epspdl2;
855 res = 3.*ER.
K()*depspdl*(L-Lextern)-(I1-L);
866 #endif //TPZYCSANDLERDIMAGGIO_H void N(const TPZTensor< T > &sigma, const T &A, TPZVec< TPZTensor< T > > &Ndir, int checkForcedYield) const
TPZYCSandlerDimaggioL & operator=(const TPZYCSandlerDimaggioL &source)
TPZFlopCounter atan2(const TPZFlopCounter &val1, const TPZFlopCounter &val2)
Returns the arc tangent in radians and increments the counter of the Arc Tangent. ATAN2 returns the ...
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 Add(const TPZTensor< T1 > &tensor, const T2 &constant)
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.
Implements a vector class which allows to use external storage provided by the user. Utility.
void ComputeX(const T &A, T &X) const
void DEpspDL(const T &L, T &depspdL) const
int ClassId() const override
Define the class id associated with the class.
std::underlying_type< Enumeration >::type as_integer(const Enumeration value)
clarg::argBool h("-h", "help message", false)
This class implements a simple vector storage scheme for a templated class T. Utility.
#define LOGPZ_WARN(A, B)
Define log for warnings.
void H(const TPZTensor< T > &sigma, const T &A, TPZVec< T > &h, int checkForcedYield) const
void ComputeLatIntersectionRight(const TPZElasticResponse &ER, REAL &L, TPZVec< REAL > &sigtrialIJ) const
void AlphaMultiplier(const T &A, T &multiplier) const
virtual int GetNYield() const override
virtual ~TPZYCSandlerDimaggioL()
void ComputeF(const T &L, T &F) const
void D2EpspDL2(const T &L, T &d2epspdL2) const
void LoadState(TPZFMatrix< REAL > &state)
#define LOGPZ_INFO(A, B)
Define log for informations.
void ComputeStrain(const TPZTensor< T > &sigma, TPZTensor< T > &epsilon) const
#define DebugStop()
Returns a message to user put a breakpoint in.
#define LOGPZ_DEBUG(A, B)
Define log for debug info.
TPZYCSandlerDimaggio & operator=(const TPZYCSandlerDimaggio &source)
expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ sqrt
TPZYCSandlerDimaggioL(const TPZYCSandlerDimaggioL &source)
void Adjust(TPZVec< T > &sigIJ, TPZTensor< T > &result) const
adjust the tensor to the given values of I1 and sqj2
void Print(std::ostream &out) const override
void Residual(TPZFMatrix< REAL > &res, int icase)
static TPZTensor< REAL > gRefTension
void ComputeTangent(TPZFMatrix< REAL > &tangent, TPZVec< REAL > &, int icase)
void InitialGuess(const TPZElasticResponse &ER, REAL L, TPZTensor< REAL > &sigtrial, REAL &epspproj, TPZVec< REAL > &delgamma, TPZTensor< REAL > &sigproj)
void NewtonF2L(const TPZElasticResponse &ER, REAL &L, TPZVec< REAL > &sigtrialIJ)
void Print(std::ostream &out) const override
#define FL(A)
Function for dynamic cast of the material based on map A (second data)
void ComputeLatIntersectionLeft(const TPZElasticResponse &ER, REAL &L, TPZVec< REAL > &sigtrialIJ) const
void NewtonF2(const TPZElasticResponse &ER, REAL &L, TPZVec< REAL > &sigtrialIJ)
void Fill(const T ©, const int64_t from=0, const int64_t numelem=-1)
Will fill the elements of the vector with a copy object.
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
void NewtonF1(const TPZElasticResponse &ER, REAL &L, TPZVec< REAL > &sigtrialIJ)
Projeto o ponto sobre a superficie F1, atualiza o L.
void Compute(const TPZTensor< T > &sigma, const T &A, TPZVec< T > &res, int checkForcedYield) const
Calculo do criterio de plastificacao.
Contains the implementation of the CheckConvergence function.
const char * Name() const
static void McCormicRanchSand(TPZYCSandlerDimaggio &material)
void SolveL(const T &X, T &L, REAL relTol=1.e-10) const
REAL FuncTheta2L(const TPZElasticResponse &ER, REAL theta, REAL L, TPZVec< REAL > &sigtrialIJ) const
void S(TPZTensor< T > &s) const