5 #ifndef TPZPLASTICSTEP_H 6 #define TPZPLASTICSTEP_H 31 template <
class YC_t,
class TF_t,
class ER_t>
36 virtual int ClassId()
const override;
82 virtual const char *
Name()
const override 84 return "TPZPlasticStep generic class";
87 virtual void Print(std::ostream & out)
const override 89 out <<
"\n" << this->
Name();
96 out <<
"\nTPZPlasticStep Internal members:";
97 out <<
"\n fResTol = " <<
fResTol;
386 template <
class T1,
class T2>
392 int silent = 0)
const;
405 template <
class T1,
class T2>
426 template<
class T1,
class T2,
class TVECTOR>
431 TVECTOR & Sol_TVECTOR,
433 int updateVars = 1)
const;
450 const int nVars = 7 + YC_t::NYield)
const;
515 const REAL &TolEpsPErr);
529 template<
class T1,
class T_VECTOR,
class T_MATRIX>
537 const int precond = 1,
538 const int resetInvalidEqs = 1);
556 const int forceYield);
643 for(i=0; i<6; i++) gRefDeform[i] = state(i,0);
648 #ifdef LOG4CXX_PLASTICITY 649 LoggerPtr logger(Logger::getLogger(
"plasticity.plasticstep"));
662 #ifdef LOG4CXX_PLASTICITY 663 std::stringstream sout;
664 sout <<
"matriz tangent for checkconv " << tangent;
673 #ifdef LOG4CXX_PLASTICITY 674 LoggerPtr logger(Logger::getLogger(
"plasticity.plasticstep"));
688 #ifdef LOG4CXX_PLASTICITY 689 std::stringstream sout;
690 sout <<
"sigma for residual " << sig;
706 template <
class YC_t,
class TF_t,
class ER_t>
708 return Hash(
"TPZPlasticStep") ^
TPZPlasticBase::ClassId() << 1 ^ YC_t().ClassId() << 2 ^ TF_t().ClassId() << 3 ^ ER_t().ClassId() << 4;
711 #endif //TPZPLASTICSTEP_H Classe que efetua avanco de um passo de plastificacao utilizando o metodo de Newton.
virtual void Phi_Internal(const TPZTensor< REAL > &epsTotal, TPZVec< REAL > &phi) const
Return the value of the yield functions for the given strain Internal Method.
virtual void SetUp(const TPZTensor< REAL > &epsTotal)
Overwrite the current total strain only.
virtual void SetMinStepSize(REAL minStepSize)
Sets the minimum loading substep size in the plastic integration.
YC_t fYC
Object which represents the yield criterium.
void ApplyLoad_Internal(const TPZTensor< REAL > &sigma, TPZTensor< REAL > &epsTotal)
Attempts to compute an epsTotal value in order to reach an imposed stress state sigma. This methid should be used only for test purposes because it isn't fully robust. Some materials, specially those perfectly plastic and with softening, may fail when applying the Newton Method on ProcessLoad. Internal Method.
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.
TPZStack< TPZPlasticIntegrMem< REAL, YC_t::NYield > > fPlasticMem
Stores the plastic evolution in the last evaluated PlasticIntegration call, It includes the N-1 data...
void Print(std::ostream &Out, int fadDerivatives=1) const
More complete then Operator << because it allows derivatives supression.
virtual void ProcessStrainNoSubIncrement(const TPZTensor< REAL > &epsTotal, const EElastoPlastic ep=EAuto)
Imposes the specified strain tensor and performs plastic integration when necessary. This function DO NOT calls PlasticIntegrate.
T m_hardening
Plastic volumetric hardeing variable.
TPZPlasticStep & operator=(const TPZPlasticStep &source)
TPZPlasticCriterion & GetYC() override
void InitializePlasticFAD(const TPZPlasticState< REAL > &state, const TPZVec< REAL > &delGamma, TPZPlasticState< T > &state_T, TPZVec< T > &delGamma_T, const int nVars=7+YC_t::NYield) const
This method copies the REAL variables into FAD variables and intializes the derivatives The nVars var...
virtual int ClassId() const override
Define the class id associated with the class.
void ApplyStrain_Internal(const TPZTensor< REAL > &epsTotal)
Imposes the specified strain tensor, evaluating the plastic integration if necessary. Internal Method.
int RemoveInvalidEqs(TPZVec< T > &delGamma_T, TPZVec< T > &res_T, TPZVec< int > &validEqs)
After a complete plasticLoop, plsatic surface equations related to negative plastic multipliers are d...
void ExtractTangent(const TPZVec< T1 > &epsRes_FAD, T_VECTOR &ResVal, REAL &resnorm, T_MATRIX &tangent, TPZVec< int > &validEqs, TPZVec< REAL > &pivots, const int precond=1, const int resetInvalidEqs=1)
Extracts the tangent matrix and residual vector from the FAD variables and according to the precondit...
void ApplyStrainComputeSigma_Internal(const TPZTensor< REAL > &epsTotal, TPZTensor< REAL > &sigma)
Imposes the specified strain tensor and returns the correspondent stress state. Internal Method...
virtual REAL IntegrationOverview(TPZVec< REAL > &plastifLen)
Similar to IntegrationSteps, it returns the plastic parcel of the last loading. 1.0 means that the whole step was plastic, 0.0 means the whole step was elastic.
bool IsStrainElastic(const TPZPlasticState< REAL > &state) const
Verifies if the proposed epsTotalNp1 is still in the elastic range.
virtual void Resize(const int64_t newsize, const T &object)
Resizes the vector object.
int InitializeValidEqs(TPZVec< T > &res_T, TPZVec< int > &validEqs)
Initializes the fValidEqs booleans indication whether to consider the plastic surfaces.
int SignCorrection() const
Indicates whether or not to correct Stress/Strain sign.
void Read(TPZStream &buf, void *context) override
read objects from the stream
void LoadState(TPZFMatrix< REAL > &state)
LoadState will keep a given state as static variable of the class.
ER_t fER
Object representing the elastic response.
void ApplyStrainComputeDep_Internal(const TPZTensor< REAL > &epsTotal, TPZTensor< REAL > &sigma, TPZFMatrix< REAL > &Dep)
Imposes the specified strain tensor and returns the corresp. stress state and tangent stiffness matri...
TPZPlasticState< REAL > fN
Plastic State Variables (EpsT, EpsP, Alpha) at the current time step.
virtual void ApplyStrain(const TPZTensor< REAL > &epsTotal) override
Contains TPZMatrixclass which implements full matrix (using column major representation).
REAL fResTol
Residual tolerance accepted in the plastic loop processes.
void InitialGuess(const TPZPlasticState< REAL > &N, TPZPlasticState< REAL > &Np1, TPZVec< REAL > &delGamma, TPZVec< int > &validEqs)
Proposes an update to the plastic variables and estimates the relative error comitted in this update...
#define LOGPZ_DEBUG(A, B)
Define log for debug info.
void Write(TPZStream &buf, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
int PlasticLoop(const TPZPlasticState< REAL > &N, TPZPlasticState< REAL > &Np1, TPZVec< REAL > &delGamma, REAL &normEpsPErr, REAL &lambda, TPZVec< int > &validEqs)
Proposes an update to the plastic variables and estimates the relative error comitted in this update...
virtual void Phi(const TPZTensor< REAL > &epsTotal, TPZVec< REAL > &phi) const override
Return the value of the yield functions for the given strain.
TF_t fTFA
Object representing the thermodynamical force.
REAL FindPointAtYield(const TPZTensor< REAL > &epsTotalNp1, TPZPlasticState< REAL > &stateAtYield) const
Finds the strain point in the linear path from epsTotalN and towards epsTotalNp1 that matches the yie...
int NumCases()
Number of types of residuals.
int fMaterialTensionSign
The tension sign in the convention used in the implementation of the material.
void PlasticResidualRK(const TPZPlasticState< T1 > &N_T1, TPZPlasticState< T2 > &Np1_T2, const TPZVec< T2 > &delGamma_T2, TPZVec< T2 > &res_T2, REAL &normEpsPErr, int silent=0) const
Evaluates the residual vector for the plasticity problem RK.
REAL UpdatePlasticVars(const TPZPlasticState< T1 > &N_T1, TPZPlasticState< T2 > &Np1_T2, TPZVec< T2 > &delGamma_T2, TPZVec< T2 > &res_T2, TVECTOR &Sol_TVECTOR, TPZVec< int > &validEqs, int updateVars=1) const
Updates the N+1 plastic state variables based on the solution of a Newton's scheme. A very simple line search is performed in order to attempt to guarantee residual drop.
void SetTensionSign(int s)
TPZPlasticStep(const TPZPlasticStep &source)
virtual TPZPlasticState< REAL > GetState() const override
Retrieve the plastic state variables.
static TPZTensor< REAL > gRefDeform
virtual void ProcessStrain(const TPZTensor< REAL > &epsTotal, const EElastoPlastic ep=EAuto)
Imposes the specified strain tensor and performs plastic integration when necessary. This function creates a new plastic integration history epserimenting the proposed epsTotal. It does not update the current plastic state.
void PushPlasticMem(const TPZPlasticState< REAL > &state, const REAL &k, const REAL &lambda, const TPZManVector< REAL, N > &delGamma, const TPZVec< int > &validEqs, const int forceYield)
Stores the whole content of a plastic integration step in order to allow its further reevaluation...
int fMaxNewton
Maximum number of Newton interations allowed in the nonlinear solvers.
void ComputeTangent(TPZFMatrix< REAL > &tangent, TPZVec< REAL > &coefs, int icase)
int Redim(const int64_t newRows, const int64_t newCols) override
Redimension a matrix and ZERO your elements.
void ResetPlasticMem()
Reset the plastic memory.
void PlasticResidual(const TPZPlasticState< T1 > &N_T1, TPZPlasticState< T2 > &Np1_T2, const TPZVec< T2 > &delGamma_T2, TPZVec< T2 > &res_T2, REAL &normEpsPErr, int silent=0) const
virtual void Print(std::ostream &out) const override
int32_t Hash(std::string str)
virtual void ApplyLoad(const TPZTensor< REAL > &sigma, TPZTensor< REAL > &epsTotal) override
virtual void SetIntegrTol(REAL integrTol)
Sets the tolerance allowed in the pde integration.
virtual void SetElasticResponse(TPZElasticResponse &ER) override
modify the elastic response. Needs to be reimplemented for each instantiation
virtual TPZElasticResponse GetElasticResponse() const override
void SetOutFile(string outfile)
virtual const char * Name() const override
int fInterfaceTensionSign
The tension sign in the convention defined by the external user.
virtual void ApplyStrainComputeDep(const TPZTensor< REAL > &epsTotal, TPZTensor< REAL > &sigma, TPZFMatrix< REAL > &Dep) override
TPZPlasticStep(REAL alpha=0.)
This class implements a stack object. Utility.
void ComputePlasticVars(const TPZPlasticState< T > &state_T, TPZTensor< T > &sigma_T, T &A_T) const
Evaluates the sigma stress tensor and the thermoForceA for use in several pieces of this code...
REAL fIntegrTol
Tolerance desired in the Plastic integration processes.
void SetMaterialElasticOrPlastic(int choice=1)
virtual void ApplyStrainComputeSigma(const TPZTensor< REAL > &epsTotal, TPZTensor< REAL > &sigma, TPZFMatrix< REAL > *tangent=NULL) override
Defines the interface for saving and reading data. Persistency.
int64_t NElements() const
Returns the number of elements of the vector.
Contains the declaration of TPZFlopCounter class and TPZCounter struct.
void SetResidualTolerance(STATE tol)
virtual TPZPlasticState< REAL > GetState_Internal() const
Retrieves the plastic state variables - makes no interface sign checks.
int ClassId() const override
Define the class id associated with the class.
REAL fMinStepSize
Minimum fraction of the full load substep proposed accepted in the plastic integration. Too low values may lead to extremely slow integration in some cases while values as high as 1.0 may prevent the plastic integrator error control from adjusting the advisable plastic substeps. Values between 1.e-3 and 1.e-2 are advisable.
virtual void ComputeDep(TPZTensor< REAL > &sigma, TPZFMatrix< REAL > &Dep)
Evaluates the constitutive matrix (DSigma/DEpsT) based on the data from the plastic integration histo...
virtual void SetState(const TPZPlasticState< REAL > &state) override
Update the damage values.
int PlasticIntegrate(const TPZPlasticState< REAL > &N, TPZPlasticState< REAL > &Np1, const REAL &TolEpsPErr)
Proposes an update to the plastic variables respecting an integration with error control. Neither internal variable are used nor changed. In the Np1 variables, EpsT is imposed [input] and the Alpha and EpsP are evaluated.
virtual void SetState_Internal(const TPZPlasticState< REAL > &state)
Updates the damage values - makes no interface sign checks.
virtual void ProcessLoad(const TPZTensor< REAL > &sigma, const EElastoPlastic ep=EAuto)
Imposes the specified stress tensor and performs plastic integration when necessary. This function evaluates a newton's method on ProcessStrain until the stress state matches. It does not update the current plastic state.
REAL fMinLambda
Minimum multiplicaton in the Plastic Loop line search. 1.0 avoids line searching; Very Small values d...
virtual int IntegrationSteps() const override
Return the number of plastic steps in the last load step. Zero indicates elastic loading.
void Residual(TPZFMatrix< REAL > &res, int icase)