KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
non_associative_plasticity_model.hpp
Go to the documentation of this file.
1 //
2 // Project Name: KratosConstitutiveModelsApplication $
3 // Created by: $Author: LMonforte $
4 // Last modified by: $Co-Author: $
5 // Date: $Date: April 2017 $
6 // Revision: $Revision: 0.0 $
7 //
8 //
9 
10 #if !defined(KRATOS_NON_ASSOCIATIVE_PLASTICITY_MODEL_H_INCLUDED)
11 #define KRATOS_NON_ASSOCIATIVE_PLASTICITY_MODEL_H_INCLUDED
12 
13 // System includes
14 
15 // External includes
16 
17 // Project includes
19 #include "custom_utilities/stress_invariants_utilities.hpp"
20 
21 
22 
23 // OBS. Variables are defined as:
24 //double & rPlasticMultiplier = rVariables.Internal.Variables[0];
25 //double & rPlasticVolDef = rVariables.Internal.Variables[1];
26 //double & rPlasticDevDef = rVariables.Internal.Variables[2];
27 //double & rPreconsolidationStress = rVariables.Interal.Variables[3]
28 //double & rNonlocalPlasticVolDef = rVariables.Internal.Variables[4]
29 
30 
31 
32 
33 
34 namespace Kratos
35 {
38 
41 
45 
49 
53 
57 
59 
61  template<class TElasticityModel, class TYieldSurface>
62  class KRATOS_API(CONSTITUTIVE_MODELS_APPLICATION) NonAssociativePlasticityModel : public PlasticityModel<TElasticityModel,TYieldSurface>
63  {
64  public:
65 
68 
69  //elasticity model
70  typedef TElasticityModel ElasticityModelType;
71 
72  //yield surface
73  typedef TYieldSurface YieldSurfaceType;
74 
75  //base type
77 
78  //common types
79  typedef typename BaseType::Pointer BaseTypePointer;
80  typedef typename BaseType::SizeType SizeType;
82  typedef typename BaseType::MatrixType MatrixType;
83  typedef typename BaseType::VectorType VectorType;
88 
91 
92 
98 
101 
103  NonAssociativePlasticityModel(NonAssociativePlasticityModel const& rOther) :BaseType(rOther), mInternal(rOther.mInternal), mPreviousInternal(rOther.mPreviousInternal),
104  mStressMatrix(rOther.mStressMatrix) {}
105 
108  {
109  BaseType::operator=(rOther);
110  mInternal = rOther.mInternal;
111  mPreviousInternal = rOther.mPreviousInternal;
112  mStressMatrix = rOther.mStressMatrix;
113  return *this;
114  }
115 
117  ConstitutiveModel::Pointer Clone() const override
118  {
119  return Kratos::make_shared<NonAssociativePlasticityModel>(*this);
120  }
121 
124 
125 
129 
130 
134 
135 
139  virtual double& GetValue(const Variable<double>& rThisVariable, double& rValue) override
140  {
141  KRATOS_TRY
142 
143  // do somehting
144  if ( rThisVariable == STRESS_INV_P)
145  {
146  double J2;
148  }
149  else if ( rThisVariable == STRESS_INV_J2)
150  {
151  double p;
153  }
154  else if ( rThisVariable == STRESS_INV_THETA)
155  {
156  double p, J2;
158  rValue *= -180.0/Globals::Pi;
159  }
160  else if ( rThisVariable == PLASTIC_VOL_DEF) {
161  rValue = mInternal.Variables[1];
162  }
163  else if ( rThisVariable == NONLOCAL_PLASTIC_VOL_DEF) {
164  rValue = mInternal.Variables[4];
165  }
166  return rValue;
167 
168 
169  KRATOS_CATCH("")
170  }
171 
175  void SetValue(const Variable<Vector>& rVariable,
176  const Vector& rValue,
177  const ProcessInfo& rCurrentProcessInfo) override
178  {
179  KRATOS_TRY
180 
181  this->mElasticityModel.SetValue( rVariable, rValue, rCurrentProcessInfo);
182 
183  KRATOS_CATCH("")
184  }
189  void CalculateStressTensor(ModelDataType& rValues, MatrixType& rStressMatrix) override
190  {
191  KRATOS_TRY
192 
193 
194  Matrix ConstitutiveMatrix(6,6);
195  noalias(ConstitutiveMatrix) = ZeroMatrix(6,6);
196  this->CalculateStressAndConstitutiveTensors( rValues, rStressMatrix, ConstitutiveMatrix);
197  rValues.StressMatrix = rStressMatrix;
198 
199  KRATOS_CATCH(" ")
200 
201  }
202 
206  void CalculateConstitutiveTensor(ModelDataType& rValues, Matrix& rConstitutiveMatrix) override
207  {
208  KRATOS_TRY
209 
210  //Initialize ConstitutiveMatrix
211  rConstitutiveMatrix.clear();
212 
213  MatrixType StressMatrix;
214  this->CalculateStressAndConstitutiveTensors( rValues, StressMatrix, rConstitutiveMatrix);
215 
216  KRATOS_CATCH(" ")
217  }
218 
219  //*******************************************************************************
220  //*******************************************************************************
221  // Calculate Stress and constitutive tensor
222  void CalculateStressAndConstitutiveTensors(ModelDataType& rValues, MatrixType& rStressMatrix, Matrix& rConstitutiveMatrix) override
223  {
224  KRATOS_TRY
225 
226  double Tolerance = 1e-6;
227 
228  PlasticDataType Variables;
229  this->InitializeVariables( rValues, Variables);
230 
231  //Calculate trial stress Matrix
232  this->mElasticityModel.CalculateStressTensor(rValues,rStressMatrix);
233 
234  Variables.TrialStateFunction = this->mYieldSurface.CalculateYieldCondition( Variables, Variables.TrialStateFunction);
235 
236  Matrix ConstitutiveMatrix(6,6);
237  noalias( ConstitutiveMatrix ) = ZeroMatrix(6,6);
238 
239  if ( Variables.State().Is(ConstitutiveModelData::IMPLEX_ACTIVE) )
240  {
241  const MatrixType & rDeltaDeformationMatrix = rValues.GetDeltaDeformationMatrix();
242  RecoverPreviousElasticLeftCauchyGreen( rDeltaDeformationMatrix, rValues.StrainMatrix );
243  // Calculate with implex
244  this->CalculateImplexPlasticStep(rValues, Variables, rStressMatrix, rDeltaDeformationMatrix);
245 
246  rConstitutiveMatrix.clear();
247  this->mElasticityModel.CalculateConstitutiveTensor(rValues, ConstitutiveMatrix);
248  rConstitutiveMatrix = SetConstitutiveMatrixToTheApropiateSize( rConstitutiveMatrix, ConstitutiveMatrix, rStressMatrix);
249 
250  }
251  else if ( Variables.TrialStateFunction < Tolerance) {
252 
253  // elastic loading step
254  rConstitutiveMatrix.clear();
255  this->mElasticityModel.CalculateConstitutiveTensor(rValues, ConstitutiveMatrix);
256  rConstitutiveMatrix = SetConstitutiveMatrixToTheApropiateSize( rConstitutiveMatrix, ConstitutiveMatrix, rStressMatrix);
257 
258  } else {
259 
260  // elasto-plastic step. Recover Initial be
261  const MatrixType & rDeltaDeformationMatrix = rValues.GetDeltaDeformationMatrix();
262  RecoverPreviousElasticLeftCauchyGreen( rDeltaDeformationMatrix, rValues.StrainMatrix );
263 
264  double InitialYieldFunction;
265  this->mElasticityModel.CalculateStressTensor(rValues,rStressMatrix);
266  InitialYieldFunction = this->mYieldSurface.CalculateYieldCondition( Variables, InitialYieldFunction);
267 
268  if ( InitialYieldFunction > 10.0*Tolerance) {
269  // correct the initial drift (nonlocal, transfer...)
270  this->ReturnStressToYieldSurface( rValues, Variables);
271  }
272 
273  if ( (InitialYieldFunction < -Tolerance) && (Variables.TrialStateFunction > Tolerance) )
274  {
275  // compute solution with change
276  ComputeSolutionWithChange( rValues, Variables, rDeltaDeformationMatrix);
277  } else {
278  bool UnloadingCondition = false;
279 
280  UnloadingCondition = EvaluateUnloadingCondition( rValues, Variables, rDeltaDeformationMatrix);
281  if (UnloadingCondition) {
282  // compute solution with change
283  ComputeSolutionWithChange( rValues, Variables, rDeltaDeformationMatrix);
284  } else {
285  // compute plastic problem
286  // compute unloading condition
287  ComputeSubsteppingElastoPlasticProblem( rValues, Variables, rDeltaDeformationMatrix);
288  }
289  }
290 
291  this->ReturnStressToYieldSurface( rValues, Variables);
292 
293  noalias( rStressMatrix) = rValues.StressMatrix;
294 
295  this->mElasticityModel.CalculateConstitutiveTensor(rValues, ConstitutiveMatrix);
296  this->ComputeElastoPlasticTangentMatrix( rValues, Variables, ConstitutiveMatrix);
297  rConstitutiveMatrix = SetConstitutiveMatrixToTheApropiateSize( rConstitutiveMatrix, ConstitutiveMatrix, rStressMatrix );
298  }
299 
300 
301  if ( rValues.State.Is(ConstitutiveModelData::UPDATE_INTERNAL_VARIABLES) ) {
302  this->UpdateInternalVariables( rValues, Variables, rStressMatrix );
303  mStressMatrix = rStressMatrix / rValues.GetTotalDeformationDet();
304  }
305 
306  KRATOS_CATCH(" ")
307  }
308 
312 
313 
317 
318 
322 
324  std::string Info() const override
325  {
326  std::stringstream buffer;
327  buffer << "NonAssociativePlasticityModel" ;
328  return buffer.str();
329  }
330 
332  void PrintInfo(std::ostream& rOStream) const override
333  {
334  rOStream << "NonAssociativePlasticityModel";
335  }
336 
338  void PrintData(std::ostream& rOStream) const override
339  {
340  rOStream << "NonAssociativePlasticityModel Data";
341  }
342 
346 
347 
349 
350  protected:
353 
354 
358 
359  // internal variables:
363 
367 
368 
372 
373 
374  //***************************************************************************************
375  //***************************************************************************************
376  // function to compress the tensor my way
377  int AuxiliarCompressTensor( const unsigned int & rI, const unsigned int & rJ , double & rVoigtNumber)
378  {
379 
380  unsigned int index;
381  if ( rI == rJ) {
382  index = rI;
383  } else if ( rI > rJ) {
384  index = AuxiliarCompressTensor( rJ, rI, rVoigtNumber);
385  } else {
386  rVoigtNumber *= 0.5;
387  if ( rI == 0) {
388  if ( rJ == 1) {
389  index =3;
390  } else {
391  index = 5;
392  }
393  } else {
394  index = 4;
395  }
396  }
397  return index;
398 
399  }
400 
401  //***************************************************************************************
402  //***************************************************************************************
403  // Correct Yield Surface Drift According to
404  Matrix & SetConstitutiveMatrixToTheApropiateSize( Matrix & rConstitutiveMatrix, Matrix & rConstMatrixBig, const MatrixType & rStressMatrix)
405  {
406 
407  KRATOS_TRY
408 
409  // 1. Add what I think it is a missing term
410  Matrix ExtraMatrix(6,6);
411  noalias(ExtraMatrix)= ZeroMatrix(6,6);
412  MatrixType Identity;
413  noalias(Identity) = identity_matrix<double>(3);
414 
415  unsigned int indexi, indexj;
416  for (unsigned int i = 0; i < 3; i++) {
417  for (unsigned int j = 0; j < 3; j++) {
418  for (unsigned int k = 0; k < 3; k++) {
419  for (unsigned int l = 0; l < 3; l++) {
420  double voigtNumber = 1.0;
421  indexi = AuxiliarCompressTensor( i, j, voigtNumber);
422  indexj = AuxiliarCompressTensor( k, l, voigtNumber);
423  ExtraMatrix(indexi, indexj) -= voigtNumber * (Identity(i,k)*rStressMatrix(j,l) + Identity(j,k) * rStressMatrix(i,l) );
424  }
425  }
426  }
427  }
428  rConstMatrixBig += ExtraMatrix;
429 
430 
431 
432 
433  // 2. Set the matrix to the appropiate size
434 
435  if ( rConstitutiveMatrix.size1() == 6) {
436  noalias( rConstitutiveMatrix ) = rConstMatrixBig;
437  } else if ( rConstitutiveMatrix.size1() == 3 ) {
438  rConstitutiveMatrix(0,0) = rConstMatrixBig(0,0);
439  rConstitutiveMatrix(0,1) = rConstMatrixBig(0,1);
440  rConstitutiveMatrix(0,2) = rConstMatrixBig(0,3);
441 
442  rConstitutiveMatrix(1,0) = rConstMatrixBig(1,0);
443  rConstitutiveMatrix(1,1) = rConstMatrixBig(1,1);
444  rConstitutiveMatrix(1,2) = rConstMatrixBig(1,3);
445 
446  rConstitutiveMatrix(2,0) = rConstMatrixBig(3,0);
447  rConstitutiveMatrix(2,1) = rConstMatrixBig(3,1);
448  rConstitutiveMatrix(2,2) = rConstMatrixBig(3,3);
449 
450  } else if ( rConstitutiveMatrix.size1() == 4 ) {
451  for (unsigned int i = 0; i < 4; i++) {
452  for (unsigned int j = 0; j < 4; j++) {
453  rConstitutiveMatrix(i,j) = rConstMatrixBig(i,j);
454  }
455  }
456  }
457 
458  return rConstitutiveMatrix;
459 
460  KRATOS_CATCH("")
461  }
462 
463  //***************************************************************************************
464  //***************************************************************************************
465  // Correct Yield Surface Drift According to
466  virtual void ReturnStressToYieldSurface( ModelDataType & rValues, PlasticDataType & rVariables)
467  {
468  KRATOS_TRY
469 
470  double Tolerance = 1e-6;
471 
472  double YieldSurface = this->mYieldSurface.CalculateYieldCondition( rVariables, YieldSurface);
473 
474  if ( fabs(YieldSurface) < Tolerance)
475  return;
476 
477  for (unsigned int i = 0; i < 150; i++) {
478 
479  Matrix ElasticMatrix(6,6);
480  noalias(ElasticMatrix) = ZeroMatrix(6,6);
481  this->mElasticityModel.CalculateConstitutiveTensor( rValues, ElasticMatrix);
482 
483  VectorType DeltaStressYieldCondition = this->mYieldSurface.CalculateDeltaStressYieldCondition( rVariables, DeltaStressYieldCondition);
484  VectorType PlasticPotentialDerivative;
485  PlasticPotentialDerivative = DeltaStressYieldCondition; // LMV
486 
487  double H = this->mYieldSurface.GetHardeningRule().CalculateDeltaHardening( rVariables, H);
488 
489  double DeltaGamma = YieldSurface;
490  DeltaGamma /= ( H + MathUtils<double>::Dot( DeltaStressYieldCondition, prod(ElasticMatrix, PlasticPotentialDerivative) ) );
491 
492  MatrixType UpdateMatrix;
493  ConvertHenckyVectorToCauchyGreenTensor( -DeltaGamma * PlasticPotentialDerivative / 2.0, UpdateMatrix);
494 
495  rValues.StrainMatrix = prod( UpdateMatrix, rValues.StrainMatrix);
496  rValues.StrainMatrix = prod( rValues.StrainMatrix, trans(UpdateMatrix));
497 
498  MatrixType StressMatrix;
499  this->mElasticityModel.CalculateStressTensor( rValues, StressMatrix);
500 
501  double & rPlasticVolDef = rVariables.Internal.Variables[1];
502  for (unsigned int i = 0; i < 3; i++)
503  rPlasticVolDef += DeltaGamma * DeltaStressYieldCondition(i);
504 
505  YieldSurface = this->mYieldSurface.CalculateYieldCondition( rVariables, YieldSurface);
506 
507  if ( fabs( YieldSurface) < Tolerance) {
508  return;
509  }
510  }
511 
512  KRATOS_CATCH("")
513  }
514 
515  //***************************************************************************************
516  //***************************************************************************************
517  // Compute Elasto Plastic Matrix
518  virtual void ComputeElastoPlasticTangentMatrix( ModelDataType & rValues, PlasticDataType & rVariables, Matrix & rEPMatrix)
519  {
520  KRATOS_TRY
521 
522  // evaluate constitutive matrix and plastic flow
523  Matrix ElasticMatrix(6,6);
524  noalias(ElasticMatrix) = ZeroMatrix(6,6);
525  this->mElasticityModel.CalculateConstitutiveTensor( rValues, ElasticMatrix);
526 
527  VectorType DeltaStressYieldCondition = this->mYieldSurface.CalculateDeltaStressYieldCondition( rVariables, DeltaStressYieldCondition);
528  VectorType PlasticPotentialDerivative;
529  PlasticPotentialDerivative = DeltaStressYieldCondition; // LMV
530 
531  double H = this->mYieldSurface.GetHardeningRule().CalculateDeltaHardening( rVariables, H);
532 
533  VectorType AuxF = prod( trans(DeltaStressYieldCondition), rEPMatrix);
534  VectorType AuxG = prod( rEPMatrix, PlasticPotentialDerivative);
535 
536  Matrix PlasticUpdateMatrix(6,6);
537  noalias(PlasticUpdateMatrix) = ZeroMatrix(6,6);
538  double denom = 0;
539  for (unsigned int i = 0; i < 6; i++) {
540  denom += AuxF(i)*PlasticPotentialDerivative(i);
541  for (unsigned int j = 0; j < 6; j++) {
542  PlasticUpdateMatrix(i,j) = AuxF(i) * AuxG(j);
543  }
544  }
545 
546  rEPMatrix -= PlasticUpdateMatrix / ( H + denom);
547 
548  KRATOS_CATCH("")
549  }
550 
551  //***************************************************************************************
552  //***************************************************************************************
553  // Advance the solution first in elastic regime and then in elastoplastic
554  void ComputeSolutionWithChange( ModelDataType& rValues, PlasticDataType & rVariables, const MatrixType& rDeltaDeformationMatrix)
555  {
556  KRATOS_TRY
557 
558  double Tolerance = 1e-6;
559 
560  double InitialTime = 0; double EndTime = 1; double HalfTime;
561  double InitialStateFunction(-1), EndStateFunction(1), HalfTimeStateFunction;
562 
563  MatrixType HalfTimeDeformationGradient;
564  MatrixType StressMatrix;
565  MatrixType InitialLeftCauchyGreen = rValues.StrainMatrix;
566  for (unsigned int i = 0; i < 150; i++)
567  {
568  HalfTime = 0.5*(InitialTime + EndTime);
569 
570  ComputeSubstepIncrementalDeformationGradient( rDeltaDeformationMatrix, 0, HalfTime, HalfTimeDeformationGradient);
571  MatrixType AuxMatrix;
572  AuxMatrix = prod( InitialLeftCauchyGreen, trans(HalfTimeDeformationGradient));
573  AuxMatrix = prod( HalfTimeDeformationGradient, AuxMatrix);
574  rValues.StrainMatrix = AuxMatrix;
575 
576  this->mElasticityModel.CalculateStressTensor(rValues,StressMatrix);
577  HalfTimeStateFunction = this->mYieldSurface.CalculateYieldCondition( rVariables, HalfTimeStateFunction);
578 
579  if ( HalfTimeStateFunction < 0.0) {
580  InitialStateFunction = HalfTimeStateFunction;
581  InitialTime = HalfTime;
582  } else {
583  EndStateFunction = HalfTimeStateFunction;
584  EndTime = HalfTime;
585  }
586 
587  double ErrorMeasure1 = fabs( InitialStateFunction - EndStateFunction);
588  double ErrorMeasure2 = fabs( InitialTime-EndTime);
589 
590  if ( (ErrorMeasure1 < Tolerance) && (ErrorMeasure2 < Tolerance) )
591  break;
592  }
593 
594 
595  // continue with plasticity
596  MatrixType RemainingDeformationGradient;
597  ComputeSubstepIncrementalDeformationGradient( rDeltaDeformationMatrix, HalfTime, 1,RemainingDeformationGradient);
598 
599  ComputeSubsteppingElastoPlasticProblem( rValues, rVariables, RemainingDeformationGradient);
600 
601  KRATOS_CATCH("")
602  }
603 
604 
605  //***********************************************************************************
606  //***********************************************************************************
607  // Evaluate the elastic unloading condition (Sloan et al, 2001)
608  bool EvaluateUnloadingCondition( ModelDataType & rValues, PlasticDataType & rVariables, const MatrixType & rDeltaDeformationMatrix)
609  {
610  KRATOS_TRY
611 
612  VectorType DeltaStressYieldCondition = this->mYieldSurface.CalculateDeltaStressYieldCondition( rVariables, DeltaStressYieldCondition);
613  VectorType PlasticPotentialDerivative;
614 
615  MatrixType DeltaStrainMatrix;
616  noalias(DeltaStrainMatrix) = prod( rDeltaDeformationMatrix, trans( rDeltaDeformationMatrix) );
617  VectorType DeltaStrain;
618  ConvertCauchyGreenTensorToHenckyVector( DeltaStrainMatrix, DeltaStrain);
619 
620  Matrix ElasticMatrix(6,6);
621  noalias(ElasticMatrix) = ZeroMatrix(6,6);
622  this->mElasticityModel.CalculateConstitutiveTensor( rValues, ElasticMatrix);
623 
624  VectorType DeltaStress = prod( ElasticMatrix, DeltaStrain);
625 
626 
627  double Norm1 = MathUtils<double>::Norm(DeltaStress);
628  double Norm2 = MathUtils<double>::Norm(DeltaStressYieldCondition);
629 
630  Norm1 = Norm1*Norm2;
631  if ( Norm1 < 1e-5)
632  return false;
633 
634  Norm2 = MathUtils<double>::Dot( DeltaStressYieldCondition, DeltaStress);
635 
636  if (Norm2 > 0) {
637  return false;
638  } else {
639  return true;
640  }
641 
642  KRATOS_CATCH("")
643  }
644 
645  //***********************************************************************************
646  //***********************************************************************************
647  // Compute the elasto-plastic problem
648  void ComputeSubsteppingElastoPlasticProblem( ModelDataType & rValues, PlasticDataType & rVariables, const MatrixType & rDeltaDeformationMatrix)
649  {
650  KRATOS_TRY
651 
652  double Tolerance = 1.0E-5;
653  double TimeStep = 0.25;
654  double MinTimeStep = 1.0e-4;
655  double DoneTimeStep = 0.0;
656  double MaxTimeStep = 0.5;
657 
658  MatrixType SubstepDeformationGradient;
659 
660  double ErrorMeasure;
661 
662  while (DoneTimeStep < 1.0) {
663 
664  MatrixType InitialStress = rValues.StrainMatrix;
665  InternalVariablesType InitialInternalVariables = rVariables.Internal;
666 
667  if ( DoneTimeStep + TimeStep >= 1.0) {
668  TimeStep = 1.0 - DoneTimeStep;
669  }
670 
671  ComputeSubstepIncrementalDeformationGradient( rDeltaDeformationMatrix, DoneTimeStep, DoneTimeStep + TimeStep, SubstepDeformationGradient);
672 
673 
674  ErrorMeasure = ComputeElastoPlasticProblem( rValues, rVariables, SubstepDeformationGradient);
675  if ( ErrorMeasure < Tolerance) {
676  DoneTimeStep += TimeStep;
677  } else if ( TimeStep <= MinTimeStep) {
678  if ( ErrorMeasure > 50*Tolerance) {
679  std::cout << " ExplicitStressIntegrationDidNotConvege: StressError: " << ErrorMeasure << std::endl;
680  }
681  DoneTimeStep += TimeStep;
682  } else {
683  rValues.StrainMatrix = InitialStress;
684  rVariables.Internal = InitialInternalVariables;
685  }
686 
687  TimeStep *= pow( Tolerance / ( ErrorMeasure + 1e-8), 0.5);
688  TimeStep = std::max(TimeStep, MinTimeStep);
689  TimeStep = std::min(TimeStep, MaxTimeStep);
690 
691  }
692 
693 
694  KRATOS_CATCH("")
695  }
696 
697 
698  //***********************************************************************************
699  //***********************************************************************************
700  // Compute one elasto-plastic problem with two discretizations and then compute some
701  // sort of error measure
702  double ComputeElastoPlasticProblem( ModelDataType & rValues, PlasticDataType & rVariables, const MatrixType & rSubstepDeformationGradient)
703  {
704  KRATOS_TRY
705 
706  MatrixType InitialStrain = rValues.StrainMatrix;
707  MatrixType Stress1;
708  MatrixType Stress2;
709  InternalVariablesType InitialInternalVariables = rVariables.Internal;
710 
711  // 1. Compute with one discretization
712  this->mElasticityModel.CalculateStressTensor( rValues, Stress1);
713  this->ComputeOneStepElastoPlasticProblem( rValues, rVariables, rSubstepDeformationGradient);
714  Stress1 = rValues.StressMatrix;
715 
716  // 2. Compute with nSteps steps
717  unsigned int nSteps = 3;
718  rValues.StrainMatrix = InitialStrain;
719  rVariables.Internal = InitialInternalVariables;
720  this->mElasticityModel.CalculateStressTensor( rValues, Stress2);
721 
722 
723  MatrixType IncrementalDefGradient;
724 
725  for (unsigned int i = 0; i < nSteps; i++) {
726  double tBegin = double(i)/double(nSteps);
727  double tEnd = double(i+1)/double(nSteps);
728  ComputeSubstepIncrementalDeformationGradient( rSubstepDeformationGradient, tBegin, tEnd, IncrementalDefGradient);
729  this->ComputeOneStepElastoPlasticProblem( rValues, rVariables, IncrementalDefGradient);
730  }
731 
732  double ErrorMeasure = 0;
733  double Denom = 0;
734  for (unsigned int i = 0; i < 3; i++) {
735  for (unsigned int j = 0; j < 3; j++) {
736  ErrorMeasure += pow( Stress1(i,j) - rValues.StressMatrix(i,j) , 2);
737  Denom += pow( rValues.StressMatrix(i,j), 2);
738  }
739  }
740 
741  if ( fabs(Denom) > 1.0E-5)
742  ErrorMeasure /= Denom;
743  ErrorMeasure = sqrt(ErrorMeasure);
744 
745 
746  return ErrorMeasure;
747 
748  KRATOS_CATCH("")
749  }
750 
751 
752  //***********************************************************************************
753  //***********************************************************************************
754  // Compute one step of the elasto-plastic problem
755  virtual void ComputeOneStepElastoPlasticProblem( ModelDataType & rValues, PlasticDataType & rVariables, const MatrixType & rDeltaDeformationMatrix)
756  {
757  KRATOS_TRY
758 
759  MatrixType StressMatrix;
760  // evaluate constitutive matrix and plastic flow
761  double & rPlasticVolDef = rVariables.Internal.Variables[1];
762  double & rPlasticMultiplier = rVariables.Internal.Variables[0];
763  double & rPlasticDevDef = rVariables.Internal.Variables[2];
764 
765  Matrix ElasticMatrix(6,6);
766  noalias(ElasticMatrix) = ZeroMatrix(6,6);
767  this->mElasticityModel.CalculateConstitutiveTensor( rValues, ElasticMatrix);
768 
769  VectorType DeltaStressYieldCondition = this->mYieldSurface.CalculateDeltaStressYieldCondition( rVariables, DeltaStressYieldCondition);
770  VectorType PlasticPotentialDerivative;
771  PlasticPotentialDerivative = DeltaStressYieldCondition; // LMV
772 
773  double H = this->mYieldSurface.GetHardeningRule().CalculateDeltaHardening( rVariables, H);
774 
775  MatrixType StrainMatrix = prod( rDeltaDeformationMatrix, trans( rDeltaDeformationMatrix) );
776  VectorType StrainVector;
777  ConvertCauchyGreenTensorToHenckyVector( StrainMatrix, StrainVector);
778 
779  VectorType AuxVector;
780  AuxVector = prod( ElasticMatrix, StrainVector);
781  double DeltaGamma;
782  DeltaGamma = MathUtils<double>::Dot( AuxVector, DeltaStressYieldCondition);
783 
784  double Denominador = H + MathUtils<double>::Dot( DeltaStressYieldCondition, prod(ElasticMatrix, PlasticPotentialDerivative) );
785 
786  DeltaGamma /= Denominador;
787 
788  if ( DeltaGamma < 0)
789  DeltaGamma = 0;
790 
791  MatrixType UpdateMatrix;
792  ConvertHenckyVectorToCauchyGreenTensor( -DeltaGamma * PlasticPotentialDerivative / 2.0, UpdateMatrix);
793  UpdateMatrix = prod( rDeltaDeformationMatrix, UpdateMatrix);
794 
795 
796  rValues.StrainMatrix = prod( UpdateMatrix, rValues.StrainMatrix);
797  rValues.StrainMatrix = prod( rValues.StrainMatrix, trans(UpdateMatrix));
798 
799  this->mElasticityModel.CalculateStressTensor( rValues, StressMatrix);
800 
801  rPlasticMultiplier += DeltaGamma;
802  for (unsigned int i = 0; i < 3; i++)
803  rPlasticVolDef += DeltaGamma * DeltaStressYieldCondition(i);
804 
805  double update = 0.0;
806  for (unsigned int i = 0; i < 3; i++)
807  update += pow( DeltaGamma * ( DeltaStressYieldCondition(i) - rPlasticVolDef/3.0) , 2.0);
808  for (unsigned int i = 3; i < 6; i++)
809  update += 2.0 * pow( DeltaGamma * DeltaStressYieldCondition(i) /2.0 , 2.0);
810  rPlasticDevDef += sqrt(update);
811 
812 
813  KRATOS_CATCH("")
814  }
815 
816 
817  //**************************************************************************************
818  //**************************************************************************************
819  // Convert epsilon (vector) to b
820  void ConvertHenckyVectorToCauchyGreenTensor(const VectorType& rHenckyVector, MatrixType & rStrainMatrix)
821  {
822  KRATOS_TRY
823 
824  MatrixType HenckyTensor;
825  HenckyTensor.clear();
826 
827  ConstitutiveModelUtilities::StrainVectorToTensor( rHenckyVector, HenckyTensor);
828  ConvertHenckyTensorToCauchyGreenTensor( HenckyTensor, rStrainMatrix);
829 
830 
831  KRATOS_CATCH("")
832  }
833  //**************************************************************************************
834  //**************************************************************************************
835  // Convert epsilon (matrix) to b
836  void ConvertHenckyTensorToCauchyGreenTensor(const MatrixType& rHenckyTensor, MatrixType & rStrainMatrix)
837  {
838  KRATOS_TRY
839 
840  MatrixType EigenVectors;
841  EigenVectors.clear();
842 
843  rStrainMatrix.clear();
844  MathUtils<double>::GaussSeidelEigenSystem<MatrixType, MatrixType>(rHenckyTensor, EigenVectors, rStrainMatrix);
845 
846  for (unsigned int i = 0; i < 3; i++)
847  rStrainMatrix(i,i) = std::exp( 2.0* rStrainMatrix(i,i));
848 
849  rStrainMatrix = prod(EigenVectors, MatrixType(prod(rStrainMatrix, trans(EigenVectors))));
850 
851  KRATOS_CATCH("")
852  }
853  //**************************************************************************************
854  //**************************************************************************************
855  // Convert b to epsilon (Vector) // vale, m'he equivocat i no el necessito, pfpfpf
856  void ConvertCauchyGreenTensorToHenckyTensor(const MatrixType& rStrainMatrix, MatrixType & rHenckyStrain)
857  {
858  KRATOS_TRY
859 
860  MatrixType EigenVectors;
861  EigenVectors.clear();
862 
863  rHenckyStrain.clear();
864  MathUtils<double>::GaussSeidelEigenSystem<MatrixType, MatrixType>(rStrainMatrix, EigenVectors, rHenckyStrain);
865 
866  for (unsigned int i = 0; i < 3; i++)
867  rHenckyStrain(i,i) = std::log( rHenckyStrain(i,i))/2.0;
868 
869  rHenckyStrain = prod(EigenVectors, MatrixType(prod(rHenckyStrain, trans(EigenVectors))));
870 
871  KRATOS_CATCH("")
872  }
873 
874  //**************************************************************************************
875  //**************************************************************************************
876  // Convert b to epsilon (Vector)
877  void ConvertCauchyGreenTensorToHenckyVector(const MatrixType& rStrainMatrix, VectorType & rStrainVector)
878  {
879  KRATOS_TRY
880 
881  MatrixType HenckyStrain;
882  ConvertCauchyGreenTensorToHenckyTensor( rStrainMatrix, HenckyStrain);
883  ConstitutiveModelUtilities::StrainTensorToVector( HenckyStrain, rStrainVector);
884 
885  KRATOS_CATCH("")
886  }
887 
888  //**************************************************************************************
889  //**************************************************************************************
890  // divide the deformation gradient in smaller steps
891  void ComputeSubstepIncrementalDeformationGradient( const MatrixType & rDeltaDeformationMatrix, const double & rReferenceConfiguration, const double & rFinalConfiguration, MatrixType & rSubstepDeformationGradient)
892  {
893  KRATOS_TRY
894 
895  MatrixType DeformationGradientReference;
896  MatrixType DeformationGradientFinal;
897  MatrixType Identity = IdentityMatrix(3);
898 
899  DeformationGradientReference = rReferenceConfiguration * rDeltaDeformationMatrix + (1.0 - rReferenceConfiguration) * Identity;
900  DeformationGradientFinal = rFinalConfiguration * rDeltaDeformationMatrix + (1.0 - rFinalConfiguration) * Identity;
901 
902  double det;
903  rSubstepDeformationGradient.clear();
904  ConstitutiveModelUtilities::InvertMatrix3( DeformationGradientReference, rSubstepDeformationGradient, det);
905  rSubstepDeformationGradient = prod( DeformationGradientFinal, rSubstepDeformationGradient);
906 
907  KRATOS_CATCH("")
908  }
909 
910  //***************************************************************************************
911  //***************************************************************************************
912  // recalculate the elastic left cauchy n
913  void RecoverPreviousElasticLeftCauchyGreen( const MatrixType & rDeltaDeformationMatrix, MatrixType & rInitialLeftCauchyGreen)
914  {
915  KRATOS_TRY
916 
917  MatrixType InverseMatrix; double detMatrix;
918  InverseMatrix.clear();
919  ConstitutiveModelUtilities::InvertMatrix3( rDeltaDeformationMatrix, InverseMatrix, detMatrix);
920  rInitialLeftCauchyGreen = prod( InverseMatrix, rInitialLeftCauchyGreen);
921  rInitialLeftCauchyGreen = prod( rInitialLeftCauchyGreen, trans(InverseMatrix));
922 
923  KRATOS_CATCH("")
924  }
925 
926 
930  virtual void SetWorkingMeasures(PlasticDataType& rVariables, MatrixType& rStressMatrix)
931  {
932  KRATOS_TRY
933 
934  const ModelDataType& rModelData = rVariables.GetModelData();
935 
936  //working stress is Kirchhoff by default : transform stresses is working stress is PK2
937  const StressMeasureType& rStressMeasure = rModelData.GetStressMeasure();
938  const StrainMeasureType& rStrainMeasure = rModelData.GetStrainMeasure();
939 
941  KRATOS_ERROR << "calling initialize PlasticityModel .. StrainMeasure provided is inconsistent" << std::endl;
942  }
944 
946  rVariables.StrainMatrix = IdentityMatrix(3);
947  }
948  else{
949  KRATOS_ERROR << "calling initialize PlasticityModel .. StrainMeasure provided is inconsistent" << std::endl;
950  }
951 
952  }
953  else{
954  KRATOS_ERROR << "calling initialize PlasticityModel .. StressMeasure provided is inconsistent" << std::endl;
955  }
956 
957 
958  KRATOS_CATCH(" ")
959  }
960 
961  //********************************************************************
962  //********************************************************************
963  // Initialize Plastic Variables ( a copy from elsewhere:'P)
964  virtual void InitializeVariables(ModelDataType& rValues, PlasticDataType& rVariables)
965  {
966  KRATOS_TRY
967 
968  //set model data pointer
969  rVariables.SetModelData(rValues);
970 
971  rValues.State.Set(ConstitutiveModelData::PLASTIC_REGION,false);
972 
973  rValues.State.Set(ConstitutiveModelData::IMPLEX_ACTIVE,false);
974  if( rValues.GetProcessInfo()[IMPLEX] == 1 ) {
975  rValues.State.Set(ConstitutiveModelData::IMPLEX_ACTIVE,true);
976  }
977 
978  rVariables.SetState(rValues.State);
979 
980  // RateFactor
981  rVariables.RateFactor = 0;
982 
983  // EquivalentPlasticStrain
984  rVariables.Internal = mInternal;
985 
986  // DeltaGamma / DeltaPlasticStrain (asociative plasticity)
987  rVariables.DeltaInternal.Variables.clear();
988 
989  // Flow Rule local variables
990  rVariables.TrialStateFunction = 0;
991  rVariables.StressNorm = 0;
992 
993  KRATOS_CATCH(" ")
994  }
995 
996  //********************************************************************
997  //********************************************************************
998  // UpdateInternalVariables
999  virtual void UpdateInternalVariables(ModelDataType& rValues, PlasticDataType& rVariables, const MatrixType& rStressMatrix)
1000  {
1001  KRATOS_TRY
1002 
1003  double Precon = 0;
1004  Precon = (this->mYieldSurface).GetHardeningRule().CalculateHardening( rVariables, Precon);
1005  rVariables.Internal.Variables[3] = Precon;
1006 
1007  for (unsigned int i = 0; i < 5; i++) {
1008  double & rCurrentPlasticVariable = rVariables.Internal.Variables[i];
1009  double & rPreviousPlasticVariable = mInternal.Variables[i];
1010 
1011  mPreviousInternal.Variables[i] = rPreviousPlasticVariable;
1012  rPreviousPlasticVariable = rCurrentPlasticVariable;
1013  }
1014 
1015  KRATOS_CATCH("")
1016  }
1017 
1018  // ****************************************************************************
1019  // compute the stress state by using implex
1020  void CalculateImplexPlasticStep(ModelDataType& rValues, PlasticDataType& rVariables, MatrixType& rStressMatrix, const MatrixType & rDeltaDeformationMatrix)
1021  {
1022  KRATOS_TRY
1023 
1024  // evaluate constitutive matrix and plastic flow
1025  double & rPlasticVolDef = rVariables.Internal.Variables[1];
1026  double & rPlasticDevDef = rVariables.Internal.Variables[2];
1027 
1028  const double & rPlasticMultiplierOld = mPreviousInternal.Variables[0];
1029  double & rPlasticMultiplier = rVariables.Internal.Variables[0];
1030  double DeltaPlasticMultiplier = (rPlasticMultiplier - rPlasticMultiplierOld);
1031 
1032  if ( DeltaPlasticMultiplier < 0)
1033  DeltaPlasticMultiplier = 0;
1034 
1035 
1036  this->mElasticityModel.CalculateStressTensor(rValues,rStressMatrix);
1037 
1038  VectorType DeltaStressYieldCondition = this->mYieldSurface.CalculateDeltaStressYieldCondition( rVariables, DeltaStressYieldCondition);
1039  VectorType PlasticPotentialDerivative;
1040  PlasticPotentialDerivative = DeltaStressYieldCondition; // LMV
1041 
1042 
1043  MatrixType UpdateMatrix;
1044  ConvertHenckyVectorToCauchyGreenTensor( -DeltaPlasticMultiplier * PlasticPotentialDerivative / 2.0, UpdateMatrix);
1045  UpdateMatrix = prod( rDeltaDeformationMatrix, UpdateMatrix);
1046 
1047 
1048  rValues.StrainMatrix = prod( UpdateMatrix, rValues.StrainMatrix);
1049  rValues.StrainMatrix = prod( rValues.StrainMatrix, trans(UpdateMatrix));
1050 
1051  this->mElasticityModel.CalculateStressTensor( rValues, rStressMatrix);
1052 
1053  rPlasticMultiplier += DeltaPlasticMultiplier;
1054  for (unsigned int i = 0; i < 3; i++)
1055  rPlasticVolDef += DeltaPlasticMultiplier * DeltaStressYieldCondition(i);
1056 
1057  double update = 0.0;
1058  for (unsigned int i = 0; i < 3; i++)
1059  update += pow( DeltaPlasticMultiplier * ( DeltaStressYieldCondition(i) - rPlasticVolDef/3.0) , 2.0);
1060  for (unsigned int i = 3; i < 6; i++)
1061  update += 2.0 * pow( DeltaPlasticMultiplier * DeltaStressYieldCondition(i) /2.0 , 2.0);
1062  rPlasticDevDef += sqrt(update);
1063 
1064  KRATOS_CATCH("")
1065  }
1069 
1070 
1074 
1075 
1079 
1080 
1082 
1083  private:
1086 
1087 
1091 
1092 
1096 
1097 
1101 
1102 
1106 
1107 
1111  friend class Serializer;
1112 
1113  void save(Serializer& rSerializer) const override
1114  {
1116  rSerializer.save("InternalVariables",mInternal);
1117  rSerializer.save("PreviousInternalVariables",mPreviousInternal);
1118  }
1119 
1120  void load(Serializer& rSerializer) override
1121  {
1122  KRATOS_SERIALIZE_LOAD_BASE_CLASS( rSerializer, BaseType )
1123  rSerializer.load("InternalVariables",mInternal);
1124  rSerializer.load("PreviousInternalVariables",mPreviousInternal);
1125  }
1126 
1130 
1131 
1135 
1137 
1138  }; // Class NonAssociativePlasticityModel
1139 
1141 
1144 
1148 
1150 
1152 
1153 
1154 } // namespace Kratos
1155 
1156 #endif // KRATOS_NON_ASSOCIATIVE_PLASTICITY_MODEL_H_INCLUDED
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
StressMeasureType
Definition: constitutive_model_data.hpp:83
StrainMeasureType
Definition: constitutive_model_data.hpp:75
static void StrainTensorToVector(const MatrixType &rMatrix, array_1d< double, 6 > &rVector)
Definition: constitutive_model_utilities.hpp:646
static void InvertMatrix3(const MatrixType &InputMatrix, MatrixType &InvertedMatrix, double &InputMatrixDet)
Definition: constitutive_model_utilities.hpp:1043
static MatrixType & StrainVectorToTensor(const array_1d< double, 6 > &rVector, MatrixType &rMatrix)
Definition: constitutive_model_utilities.hpp:619
void Set(const Flags ThisFlag)
Definition: flags.cpp:33
bool Is(Flags const &rOther) const
Definition: flags.h:274
Definition: amatrix_interface.h:41
void clear()
Definition: amatrix_interface.h:284
Various mathematical utilitiy functions.
Definition: math_utils.h:62
static double Norm(const Vector &a)
Calculates the norm of vector "a".
Definition: math_utils.h:703
static double Dot(const Vector &rFirstVector, const Vector &rSecondVector)
Performs the dot product of two vectors of arbitrary size.
Definition: math_utils.h:669
Short class definition.
Definition: non_associative_plasticity_model.hpp:63
void CalculateStressAndConstitutiveTensors(ModelDataType &rValues, MatrixType &rStressMatrix, Matrix &rConstitutiveMatrix) override
Definition: non_associative_plasticity_model.hpp:222
void CalculateConstitutiveTensor(ModelDataType &rValues, Matrix &rConstitutiveMatrix) override
Definition: non_associative_plasticity_model.hpp:206
BaseType::VectorType VectorType
Definition: non_associative_plasticity_model.hpp:83
virtual void ReturnStressToYieldSurface(ModelDataType &rValues, PlasticDataType &rVariables)
Definition: non_associative_plasticity_model.hpp:466
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: non_associative_plasticity_model.hpp:338
void ConvertHenckyTensorToCauchyGreenTensor(const MatrixType &rHenckyTensor, MatrixType &rStrainMatrix)
Definition: non_associative_plasticity_model.hpp:836
BaseType::Pointer BaseTypePointer
Definition: non_associative_plasticity_model.hpp:79
BaseType::ModelDataType ModelDataType
Definition: non_associative_plasticity_model.hpp:84
KRATOS_CLASS_POINTER_DEFINITION(NonAssociativePlasticityModel)
Pointer definition of NonAssociativePlasticityModel.
NonAssociativePlasticityModel & operator=(NonAssociativePlasticityModel const &rOther)
Assignment operator.
Definition: non_associative_plasticity_model.hpp:107
BaseType::MaterialDataType MaterialDataType
Definition: non_associative_plasticity_model.hpp:85
NonAssociativePlasticityModel(NonAssociativePlasticityModel const &rOther)
Copy constructor.
Definition: non_associative_plasticity_model.hpp:103
virtual void SetWorkingMeasures(PlasticDataType &rVariables, MatrixType &rStressMatrix)
Definition: non_associative_plasticity_model.hpp:930
MatrixType mStressMatrix
Definition: non_associative_plasticity_model.hpp:362
ConstitutiveModel::Pointer Clone() const override
Clone.
Definition: non_associative_plasticity_model.hpp:117
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: non_associative_plasticity_model.hpp:332
BaseType::InternalVariablesType InternalVariablesType
Definition: non_associative_plasticity_model.hpp:87
BaseType::VoigtIndexType VoigtIndexType
Definition: non_associative_plasticity_model.hpp:81
void ConvertCauchyGreenTensorToHenckyTensor(const MatrixType &rStrainMatrix, MatrixType &rHenckyStrain)
Definition: non_associative_plasticity_model.hpp:856
BaseType::MatrixType MatrixType
Definition: non_associative_plasticity_model.hpp:82
void CalculateStressTensor(ModelDataType &rValues, MatrixType &rStressMatrix) override
Definition: non_associative_plasticity_model.hpp:189
int AuxiliarCompressTensor(const unsigned int &rI, const unsigned int &rJ, double &rVoigtNumber)
Definition: non_associative_plasticity_model.hpp:377
void ComputeSubsteppingElastoPlasticProblem(ModelDataType &rValues, PlasticDataType &rVariables, const MatrixType &rDeltaDeformationMatrix)
Definition: non_associative_plasticity_model.hpp:648
Matrix & SetConstitutiveMatrixToTheApropiateSize(Matrix &rConstitutiveMatrix, Matrix &rConstMatrixBig, const MatrixType &rStressMatrix)
Definition: non_associative_plasticity_model.hpp:404
bool EvaluateUnloadingCondition(ModelDataType &rValues, PlasticDataType &rVariables, const MatrixType &rDeltaDeformationMatrix)
Definition: non_associative_plasticity_model.hpp:608
PlasticityModel< ElasticityModelType, YieldSurfaceType > BaseType
Definition: non_associative_plasticity_model.hpp:76
virtual double & GetValue(const Variable< double > &rThisVariable, double &rValue) override
Definition: non_associative_plasticity_model.hpp:139
InternalVariablesType mPreviousInternal
Definition: non_associative_plasticity_model.hpp:361
virtual void InitializeVariables(ModelDataType &rValues, PlasticDataType &rVariables)
Definition: non_associative_plasticity_model.hpp:964
ConstitutiveModelData::StressMeasureType StressMeasureType
Definition: non_associative_plasticity_model.hpp:90
BaseType::SizeType SizeType
Definition: non_associative_plasticity_model.hpp:80
virtual void ComputeElastoPlasticTangentMatrix(ModelDataType &rValues, PlasticDataType &rVariables, Matrix &rEPMatrix)
Definition: non_associative_plasticity_model.hpp:518
void ComputeSubstepIncrementalDeformationGradient(const MatrixType &rDeltaDeformationMatrix, const double &rReferenceConfiguration, const double &rFinalConfiguration, MatrixType &rSubstepDeformationGradient)
Definition: non_associative_plasticity_model.hpp:891
void RecoverPreviousElasticLeftCauchyGreen(const MatrixType &rDeltaDeformationMatrix, MatrixType &rInitialLeftCauchyGreen)
Definition: non_associative_plasticity_model.hpp:913
NonAssociativePlasticityModel()
Default constructor.
Definition: non_associative_plasticity_model.hpp:100
std::string Info() const override
Turn back information as a string.
Definition: non_associative_plasticity_model.hpp:324
BaseType::PlasticDataType PlasticDataType
Definition: non_associative_plasticity_model.hpp:86
TYieldSurface YieldSurfaceType
Definition: non_associative_plasticity_model.hpp:73
InternalVariablesType mInternal
Definition: non_associative_plasticity_model.hpp:360
virtual void ComputeOneStepElastoPlasticProblem(ModelDataType &rValues, PlasticDataType &rVariables, const MatrixType &rDeltaDeformationMatrix)
Definition: non_associative_plasticity_model.hpp:755
void ConvertCauchyGreenTensorToHenckyVector(const MatrixType &rStrainMatrix, VectorType &rStrainVector)
Definition: non_associative_plasticity_model.hpp:877
void ComputeSolutionWithChange(ModelDataType &rValues, PlasticDataType &rVariables, const MatrixType &rDeltaDeformationMatrix)
Definition: non_associative_plasticity_model.hpp:554
TElasticityModel ElasticityModelType
Definition: non_associative_plasticity_model.hpp:70
ConstitutiveModelData::StrainMeasureType StrainMeasureType
Definition: non_associative_plasticity_model.hpp:89
virtual void UpdateInternalVariables(ModelDataType &rValues, PlasticDataType &rVariables, const MatrixType &rStressMatrix)
Definition: non_associative_plasticity_model.hpp:999
double ComputeElastoPlasticProblem(ModelDataType &rValues, PlasticDataType &rVariables, const MatrixType &rSubstepDeformationGradient)
Definition: non_associative_plasticity_model.hpp:702
void ConvertHenckyVectorToCauchyGreenTensor(const VectorType &rHenckyVector, MatrixType &rStrainMatrix)
Definition: non_associative_plasticity_model.hpp:820
~NonAssociativePlasticityModel() override
Destructor.
Definition: non_associative_plasticity_model.hpp:123
void CalculateImplexPlasticStep(ModelDataType &rValues, PlasticDataType &rVariables, MatrixType &rStressMatrix, const MatrixType &rDeltaDeformationMatrix)
Definition: non_associative_plasticity_model.hpp:1020
void SetValue(const Variable< Vector > &rVariable, const Vector &rValue, const ProcessInfo &rCurrentProcessInfo) override
Definition: non_associative_plasticity_model.hpp:175
Short class definition.
Definition: plasticity_model.hpp:50
TYieldSurface::InternalVariablesType InternalVariablesType
Definition: plasticity_model.hpp:69
ConstitutiveModelData::SizeType SizeType
Definition: plasticity_model.hpp:63
ConstitutiveModelData::VoigtIndexType VoigtIndexType
Definition: plasticity_model.hpp:64
TYieldSurface::PlasticDataType PlasticDataType
Definition: plasticity_model.hpp:68
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
void load(std::string const &rTag, TDataType &rObject)
Definition: serializer.h:207
void save(std::string const &rTag, std::array< TDataType, TDataSize > const &rObject)
Definition: serializer.h:545
static void CalculateStressInvariants(const MatrixType &rStressMatrix, double &rI1, double &rJ2)
Definition: stress_invariants_utilities.hpp:45
Short class definition.
Definition: yield_surface.hpp:50
virtual double & CalculateYieldCondition(const PlasticDataType &rVariables, double &rYieldCondition)
Definition: yield_surface.hpp:108
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
#define KRATOS_ERROR
Definition: exception.h:161
void InitializeVariables(TContainerType &rContainer, const Variable< TDataType > &rOutputVariable, const Variable< TDataType > &rReferenceVariable)
Definition: temporal_method_utilities.h:36
Matrix MatrixType
Definition: geometrical_transformation_utilities.h:55
static double max(double a, double b)
Definition: GeometryFunctions.h:79
static double min(double a, double b)
Definition: GeometryFunctions.h:71
constexpr double Pi
Definition: global_variables.h:25
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
AMatrix::IdentityMatrix< double > IdentityMatrix
Definition: amatrix_interface.h:564
KratosZeroMatrix< double > ZeroMatrix
Definition: amatrix_interface.h:559
AMatrix::MatrixProductExpression< TExpression1Type, TExpression2Type > prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:568
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
AMatrix::TransposeMatrix< const T > trans(const T &TheMatrix)
Definition: amatrix_interface.h:486
TABLE_NUMBER_ANGULAR_VELOCITY TABLE_NUMBER_MOMENT I33 BEAM_INERTIA_ROT_UNIT_LENGHT_Y KRATOS_DEFINE_APPLICATION_VARIABLE(DEM_APPLICATION, double, BEAM_INERTIA_ROT_UNIT_LENGHT_Z) typedef std double
Definition: DEM_application_variables.h:182
H
Definition: generate_droplet_dynamics.py:257
float J2
Definition: isotropic_damage_automatic_differentiation.py:133
def load(f)
Definition: ode_solve.py:307
int k
Definition: quadrature.py:595
int j
Definition: quadrature.py:648
p
Definition: sensitivityMatrix.py:52
integer i
Definition: TensorModule.f:17
integer l
Definition: TensorModule.f:17
e
Definition: run_cpp_mpi_tests.py:31
def Norm2(_X)
Definition: custom_math.py:107
Definition: constitutive_model_data.hpp:92
Definition: constitutive_model_data.hpp:383
const MatrixType & GetDeltaDeformationMatrix() const
Definition: constitutive_model_data.hpp:455
const ProcessInfo & GetProcessInfo() const
Definition: constitutive_model_data.hpp:435
const StressMeasureType & GetStressMeasure() const
Definition: constitutive_model_data.hpp:452
const double & GetTotalDeformationDet() const
Definition: constitutive_model_data.hpp:449
MatrixType StressMatrix
Definition: constitutive_model_data.hpp:401
Flags State
Definition: constitutive_model_data.hpp:399
MatrixType StrainMatrix
Definition: constitutive_model_data.hpp:402