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.
damage_model.hpp
Go to the documentation of this file.
1 //
2 // Project Name: KratosConstitutiveModelsApplication $
3 // Created by: $Author: JMCarbonell $
4 // Last modified by: $Co-Author: $
5 // Date: $Date: April 2017 $
6 // Revision: $Revision: 0.0 $
7 //
8 //
9 
10 #if !defined(KRATOS_DAMAGE_MODEL_H_INCLUDED )
11 #define KRATOS_DAMAGE_MODEL_H_INCLUDED
12 
13 
14 // System includes
15 
16 // External includes
17 
18 // Project includes
20 
21 namespace Kratos
22 {
25 
28 
32 
36 
40 
44 
46 
48  template<class TElasticityModel, class TYieldSurface>
49  class DamageModel : public PlasticityModel<TElasticityModel,TYieldSurface>
50  {
51  public:
52 
55 
56  //elasticity model
57  typedef TElasticityModel ElasticityModelType;
58 
59  //yield surface
60  typedef TYieldSurface YieldSurfaceType;
61 
62  //base type
64 
65  //common types
66  typedef typename BaseType::Pointer BaseTypePointer;
67  typedef typename BaseType::SizeType SizeType;
69  typedef typename BaseType::VectorType VectorType;
70  typedef typename BaseType::MatrixType MatrixType;
75 
78 
79 
82 
86 
89 
91  DamageModel(DamageModel const& rOther) :BaseType(rOther), mInternal(rOther.mInternal) {}
92 
95  {
96  BaseType::operator=(rOther);
97  mInternal = rOther.mInternal;
98  return *this;
99  }
100 
102  ConstitutiveModel::Pointer Clone() const override
103  {
104  return Kratos::make_shared<DamageModel>(*this);
105  }
106 
108  ~DamageModel() override {}
109 
110 
114 
115 
119 
123  void InitializeMaterial(const Properties& rProperties) override
124  {
125  KRATOS_TRY
126 
127  double& rDamageThreshold = mInternal.Variables[0];
128 
129  //damage threshold properties
130  rDamageThreshold = rProperties[DAMAGE_THRESHOLD];
131 
132  KRATOS_CATCH(" ")
133  }
134 
135 
139  void InitializeModel(ModelDataType& rValues) override
140  {
141  KRATOS_TRY
142 
143  BaseType::InitializeModel(rValues);
144 
145  KRATOS_CATCH(" ")
146  }
147 
148 
153  void CalculateStressTensor(ModelDataType& rValues, MatrixType& rStressMatrix) override
154  {
155  KRATOS_TRY
156 
157  PlasticDataType Variables;
158  this->InitializeVariables(rValues,Variables);
159 
160  // calculate elastic stress
161  this->mElasticityModel.CalculateStressTensor(rValues,rStressMatrix);
162 
163  rValues.StressMatrix = rStressMatrix; //store stress to ModelData StressMatrix
164 
165  // calculate damaged stress
166  this->CalculateAndAddStressTensor(Variables,rStressMatrix);
167 
168  // set internal variables to output print
169  this->SetInternalVariables(rValues,Variables);
170 
171  if( rValues.State.Is(ConstitutiveModelData::UPDATE_INTERNAL_VARIABLES ) )
172  this->UpdateInternalVariables(rValues, Variables, rStressMatrix);
173 
174  KRATOS_CATCH(" ")
175  }
176 
177 
181  void CalculateConstitutiveTensor(ModelDataType& rValues, Matrix& rConstitutiveMatrix) override
182  {
183  KRATOS_TRY
184 
185  //Initialize ConstitutiveMatrix
186  rConstitutiveMatrix.clear();
187 
188  PlasticDataType Variables;
189  this->InitializeVariables(rValues,Variables);
190 
191  //Calculate Stress Matrix
192 
193  MatrixType StressMatrix;
194  // calculate elastic stress
195  this->mElasticityModel.CalculateStressTensor(rValues,StressMatrix);
196 
197  rValues.StressMatrix = StressMatrix; //store stress to ModelData StressMatrix
198 
199  // calculate damaged stress
200  this->CalculateAndAddStressTensor(Variables,StressMatrix);
201 
202 
203  //Calculate Constitutive Matrix
204 
205  // calculate elastic constitutive tensor
206  this->mElasticityModel.CalculateConstitutiveTensor(rValues,rConstitutiveMatrix);
207 
208  // calculate plastic constitutive tensor
209  if( Variables.State().Is(ConstitutiveModelData::PLASTIC_REGION) )
210  this->CalculateAndAddPlasticConstitutiveTensor(Variables,rConstitutiveMatrix);
211 
212  Variables.State().Set(ConstitutiveModelData::CONSTITUTIVE_MATRIX_COMPUTED,true);
213 
214  KRATOS_CATCH(" ")
215  }
216 
220  void CalculateStressAndConstitutiveTensors(ModelDataType& rValues, MatrixType& rStressMatrix, Matrix& rConstitutiveMatrix) override
221  {
222  KRATOS_TRY
223 
224  PlasticDataType Variables;
225  this->InitializeVariables(rValues,Variables);
226 
227  //Calculate Stress Matrix
228 
229  // calculate elastic stress
230  this->mElasticityModel.CalculateStressTensor(rValues,rStressMatrix);
231 
232  rValues.StressMatrix = rStressMatrix; //store stress to ModelData StressMatrix
233 
234  // calculate damaged stress
235  this->CalculateAndAddStressTensor(Variables,rStressMatrix);
236 
237 
238  //Calculate Constitutive Matrix
239 
240  // calculate elastic constitutive tensor
241  this->mElasticityModel.CalculateConstitutiveTensor(rValues,rConstitutiveMatrix);
242 
243  // calculate plastic constitutive tensor
244  if( Variables.State().Is(ConstitutiveModelData::PLASTIC_REGION) ){
245  this->CalculateAndAddPlasticConstitutiveTensor(Variables,rConstitutiveMatrix);
246  }
247 
248  // set internal variables to output print
249  this->SetInternalVariables(rValues,Variables);
250 
251  Variables.State().Set(ConstitutiveModelData::CONSTITUTIVE_MATRIX_COMPUTED,true);
252 
253  if( rValues.State.Is(ConstitutiveModelData::UPDATE_INTERNAL_VARIABLES ) )
254  this->UpdateInternalVariables(rValues, Variables, rStressMatrix);
255 
256  KRATOS_CATCH(" ")
257  }
258 
262 
266  bool Has(const Variable<double>& rThisVariable) override {return false;}
267 
271  void SetValue(const Variable<double>& rVariable,
272  const double& rValue,
273  const ProcessInfo& rCurrentProcessInfo) override {}
277  double& GetValue(const Variable<double>& rThisVariable, double& rValue) override { rValue=0; return rValue;}
278 
279 
283 
284 
288 
290  std::string Info() const override
291  {
292  std::stringstream buffer;
293  buffer << "DamageModel" ;
294  return buffer.str();
295  }
296 
298  void PrintInfo(std::ostream& rOStream) const override
299  {
300  rOStream << "DamageModel";
301  }
302 
304  void PrintData(std::ostream& rOStream) const override
305  {
306  rOStream << "DamageModel Data";
307  }
308 
312 
313 
315 
316  protected:
319 
320 
324 
325  // internal variables:
327 
331 
332 
336 
340  virtual void CalculateAndAddStressTensor(PlasticDataType& rVariables, MatrixType& rStressMatrix)
341  {
342  KRATOS_TRY
343 
344  double& rDamageThreshold = rVariables.Internal.Variables[0];
345 
346  //1.- Stress norm and Strengh factor for damage (StressNorm and RateFactor variables used)
347  this->CalculateStressNorm(rVariables,rStressMatrix);
348 
349  //2.-Check yield condition
350  rVariables.TrialStateFunction = this->mYieldSurface.CalculateYieldCondition(rVariables, rVariables.TrialStateFunction);
351 
352  if( rVariables.TrialStateFunction < rDamageThreshold )
353  {
354  rVariables.State().Set(ConstitutiveModelData::PLASTIC_REGION,false);
355  }
356  else
357  {
358 
359  //3.- Calculate the radial return
360  bool converged = this->CalculateReturnMapping(rVariables,rStressMatrix);
361 
362  if(!converged)
363  std::cout<<" ConstitutiveLaw did not converge "<<std::endl;
364 
365  //4.- Update back stress, plastic strain and stress
366  this->UpdateStressConfiguration(rVariables,rStressMatrix);
367 
368 
369  rVariables.State().Set(ConstitutiveModelData::PLASTIC_REGION,true);
370  }
371 
372 
373  rVariables.State().Set(ConstitutiveModelData::RETURN_MAPPING_COMPUTED,true);
374 
375  KRATOS_CATCH(" ")
376  }
377 
381  virtual void CalculateAndAddPlasticConstitutiveTensor(PlasticDataType& rVariables, Matrix& rConstitutiveMatrix)
382  {
383  KRATOS_TRY
384 
385  //Compute radial return check
386  if( rVariables.State().IsNot(ConstitutiveModelData::RETURN_MAPPING_COMPUTED) )
387  KRATOS_ERROR << "ReturnMapping has to be computed to perform the calculation" << std::endl;
388 
389  const SizeType& VoigtSize = rVariables.GetModelData().GetVoigtSize();
390 
391  //double& rDamage = rVariables.Internal.Variables[1];
392  //alternative way, compute damage if not computed
393  //double rDamage = 0;
394  //rDamage = this->mYieldSurface.CalculateStateFunction( rVariables, rDamage );
395 
396  double DeltaStateFunction = 0;
397  DeltaStateFunction = this->mYieldSurface.CalculateDeltaStateFunction( rVariables, DeltaStateFunction );
398 
399  //tangent OPTION 1:
400 
401  // double& rDamageThreshold = rVariables.Internal.Variables[0];
402  // const MatrixType& rStrainMatrix = rVariables.GetStrainMatrix();
403 
404  // VectorType StrainVector;
405  // ConstitutiveModelUtilities::StrainTensorToVector(rStrainMatrix, StrainVector);
406 
407  // VectorType EffectiveStressVector;
408  // noalias(EffectiveStressVector) = prod(rConstitutiveMatrix,StrainVector);
409 
410 
411  // rConstitutiveMatrix *= (1-rDamage);
412  // rConstitutiveMatrix += DeltaStateFunction * rDamageThreshold * outer_prod(EffectiveStressVector,EffectiveStressVector);
413 
414  //alternative tangent OPTION 2:
415 
416  const ModelDataType& rModelData = rVariables.GetModelData();
417  const MatrixType& rStressMatrix = rModelData.GetStressMatrix();
418 
419  Vector EffectiveStressVector(VoigtSize);
420  EffectiveStressVector = ConstitutiveModelUtilities::StressTensorToVector(rStressMatrix, EffectiveStressVector);
421 
422  Vector EquivalentStrainVector(VoigtSize);
423  EquivalentStrainVector = this->CalculateEquivalentStrainDerivative(rVariables, rConstitutiveMatrix, EquivalentStrainVector);
424 
425  rVariables.State().Set(ConstitutiveModelData::CONSTITUTIVE_MATRIX_COMPUTED,true);
426 
427  KRATOS_CATCH(" ")
428  }
429 
430 
431 
432  // calculate ratial return
433 
434  virtual bool CalculateReturnMapping(PlasticDataType& rVariables, MatrixType& rStressMatrix)
435  {
436  KRATOS_TRY
437 
438  double& rDamageThreshold = rVariables.Internal.Variables[0];
439  double& rDamage = rVariables.Internal.Variables[1];
440 
441  double StateFunction = rVariables.TrialStateFunction;
442 
443  if ( StateFunction >= rDamageThreshold )
444  {
445  rDamageThreshold = StateFunction;
446 
447  //Calculate State Function: (damage)
448  StateFunction = this->mYieldSurface.CalculateStateFunction( rVariables, StateFunction );
449 
450  rDamage = StateFunction;
451 
452  return true;
453 
454  }
455 
456  return false;
457 
458  KRATOS_CATCH(" ")
459  }
460 
461 
462  // auxiliar methods
463 
464  virtual void InitializeVariables(ModelDataType& rValues, PlasticDataType& rVariables)
465  {
466  KRATOS_TRY
467 
468  //set model data pointer
469  rVariables.SetModelData(rValues);
470 
471  rValues.State.Set(ConstitutiveModelData::PLASTIC_REGION,false);
472 
473  rVariables.SetState(rValues.State);
474 
475  // RateFactor
476  rVariables.RateFactor = 0;
477 
478  // Damage threshold variable [0] and damage variable [1]
479  rVariables.Internal = mInternal;
480 
481  // Flow Rule local variables
482  rVariables.TrialStateFunction = 0;
483  rVariables.StressNorm = 0;
484 
485  // Set Strain
486  rVariables.StrainMatrix = rValues.StrainMatrix;
487 
488  KRATOS_CATCH(" ")
489  }
490 
491  virtual void UpdateStressConfiguration(PlasticDataType& rVariables, MatrixType& rStressMatrix)
492  {
493  KRATOS_TRY
494 
495  double& rDamage = rVariables.Internal.Variables[1];
496 
497  //Stress Update:
498  rStressMatrix *= (1.0-rDamage);
499 
500  KRATOS_CATCH(" ")
501  }
502 
503  virtual void UpdateInternalVariables(ModelDataType& rValues, PlasticDataType& rVariables, const MatrixType& rStressMatrix)
504  {
505  KRATOS_TRY
506 
507  //update mechanical variables
508  mInternal = rVariables.Internal;
509 
510  KRATOS_CATCH(" ")
511  }
512 
513  // calculate stress norm
514 
515  void CalculateStressNorm(PlasticDataType& rVariables, MatrixType& rStressMatrix)
516  {
517  KRATOS_TRY
518 
519  // Compute strenght type parameter
520  rVariables.RateFactor = 0.0;
521 
522  const SizeType& VoigtSize = rVariables.GetModelData().GetVoigtSize();
523 
525  if( VoigtSize == 3 ){
526  PrincipalStresses.resize(2);
527  PrincipalStresses[0] = 0.5*(rStressMatrix(0,0)+rStressMatrix(1,1)) +
528  sqrt(0.25*(rStressMatrix(0,0)-rStressMatrix(1,1))*(rStressMatrix(0,0)-rStressMatrix(1,1)) +
529  rStressMatrix(0,1)*rStressMatrix(0,1));
530  PrincipalStresses[1] = 0.5*(rStressMatrix(0,0)+rStressMatrix(1,1)) -
531  sqrt(0.25*(rStressMatrix(0,0)-rStressMatrix(1,1))*(rStressMatrix(0,0)-rStressMatrix(1,1)) +
532  rStressMatrix(0,1)*rStressMatrix(0,1));
533  }
534  else{
535  PrincipalStresses.resize(3);
537  }
538 
539  double Macaulay_PrincipalStress = 0.0;
540  double Absolute_PrincipalStress = 0.0;
541 
542  for(unsigned int i=0; i< PrincipalStresses.size(); i++)
543  {
544  if(PrincipalStresses[i] > 0.0)
545  {
546  Macaulay_PrincipalStress += PrincipalStresses[i];
547  Absolute_PrincipalStress += PrincipalStresses[i];
548  }
549  else
550  {
551  Absolute_PrincipalStress -= PrincipalStresses[i];
552  }
553  }
554 
555  if(Absolute_PrincipalStress > 1.0e-20)
556  {
557  rVariables.RateFactor = Macaulay_PrincipalStress/Absolute_PrincipalStress;
558  }
559  else
560  {
561  rVariables.RateFactor = 0.5;
562  }
563 
564  // Compute Equivalent Strain (rYieldCondition)
565  const Matrix& rStrainMatrix = rVariables.GetStrainMatrix();
566  MatrixType Auxiliar;
567  noalias(Auxiliar) = prod(rStrainMatrix,rStressMatrix);
568 
569  rVariables.StressNorm = 0.0;
570 
571  for(unsigned int i=0; i<3; i++)
572  {
573  rVariables.StressNorm += Auxiliar(i,i);
574  }
575 
576 
577  KRATOS_CATCH(" ")
578 
579  }
580 
581 
582  // calculate equivalent strain derivative
583 
584  Vector& CalculateEquivalentStrainDerivative(PlasticDataType& rVariables, const Matrix& rConstitutiveMatrix, Vector& rEquivalentStrainDerivative)
585  {
586  KRATOS_TRY
587 
588  //The derivative of the equivalent strain with respect to the strain vector is obtained through the perturbation method
589 
590  const SizeType& VoigtSize = rVariables.GetModelData().GetVoigtSize();
591 
592  Vector StressVector(VoigtSize);
593  MatrixType StressMatrix;
594  double EquivalentStrainForward = 0.0;
595  double EquivalentStrainBackward = 0.0;
596 
597  //Compute the strains perturbations in each direction of the vector
598  const MatrixType& rStrainMatrix = rVariables.GetStrainMatrix();
599  Vector StrainVector(VoigtSize);
600  StrainVector = ConstitutiveModelUtilities::StrainTensorToVector(rStrainMatrix, StrainVector);
601  Vector PerturbatedStrainVector;
602  ConstitutiveModelUtilities::ComputePerturbationVector(PerturbatedStrainVector,StrainVector);
603 
604  for(unsigned int i = 0; i < VoigtSize; i++)
605  {
606  //Forward perturbed equivalent strain
607  StrainVector[i] += PerturbatedStrainVector[i];
608 
609  rVariables.StrainMatrix = ConstitutiveModelUtilities::StrainVectorToTensor(StrainVector,rVariables.StrainMatrix);
610  noalias(StressVector) = prod(rConstitutiveMatrix, StrainVector);
611  StressMatrix = ConstitutiveModelUtilities::StressVectorToTensor(StressVector,StressMatrix);
612 
613  this->CalculateStressNorm(rVariables,StressMatrix);
614  EquivalentStrainForward = this->mYieldSurface.CalculateYieldCondition(rVariables, EquivalentStrainForward);
615 
616  StrainVector[i] -= PerturbatedStrainVector[i];
617 
618  //Backward perturbed equivalent strain
619  StrainVector[i] -= PerturbatedStrainVector[i];
620 
621  rVariables.StrainMatrix = ConstitutiveModelUtilities::StrainVectorToTensor(StrainVector,rVariables.StrainMatrix);
622  noalias(StressVector) = prod(rConstitutiveMatrix, StrainVector);
623  StressMatrix = ConstitutiveModelUtilities::StressVectorToTensor(StressVector,StressMatrix);
624 
625  this->CalculateStressNorm(rVariables,StressMatrix);
626  EquivalentStrainBackward = this->mYieldSurface.CalculateYieldCondition(rVariables, EquivalentStrainBackward);
627 
628  StrainVector[i] += PerturbatedStrainVector[i];
629 
630  rEquivalentStrainDerivative[i] = (EquivalentStrainForward - EquivalentStrainBackward) / (2.0 * PerturbatedStrainVector[i]);
631  }
632 
633  return rEquivalentStrainDerivative;
634 
635  KRATOS_CATCH(" ")
636  }
637 
638  //set internal variables for output print
639 
640  void SetInternalVariables(ModelDataType& rValues, PlasticDataType& rVariables) override
641  {
642  KRATOS_TRY
643 
644  //supply internal variable
645  rValues.InternalVariable.SetValue(DAMAGE_VARIABLE, rVariables.Internal.Variables[1]);
646 
647  KRATOS_CATCH(" ")
648  }
649 
653 
654 
658 
659 
663 
664 
666 
667  private:
670 
671 
675 
676 
680 
681 
685 
686 
690 
691 
695  friend class Serializer;
696 
697  void save(Serializer& rSerializer) const override
698  {
700  rSerializer.save("InternalVariables",mInternal);
701  }
702 
703  void load(Serializer& rSerializer) override
704  {
706  rSerializer.load("InternalVariables",mInternal);
707  }
708 
712 
713 
717 
719 
720  }; // Class DamageModel
721 
723 
726 
730 
732 
734 
735 } // namespace Kratos.
736 
737 #endif // KRATOS_DAMAGE_MODEL_H_INCLUDED defined
StressMeasureType
Definition: constitutive_model_data.hpp:83
StrainMeasureType
Definition: constitutive_model_data.hpp:75
ConstitutiveModelData::SizeType SizeType
Definition: constitutive_model.hpp:66
static Vector EigenValuesDirectMethod(const Matrix &A)
Definition: constitutive_model_utilities.hpp:983
static void ComputePerturbationVector(Vector &rPerturbationVector, const Vector &InputVector)
Definition: constitutive_model_utilities.hpp:926
static void StrainTensorToVector(const MatrixType &rMatrix, array_1d< double, 6 > &rVector)
Definition: constitutive_model_utilities.hpp:646
static Vector & StressTensorToVector(const MatrixType &rStressTensor, Vector &rStressVector)
Definition: constitutive_model_utilities.hpp:843
static MatrixType & StressVectorToTensor(const Vector &rStressVector, MatrixType &rStressTensor)
Definition: constitutive_model_utilities.hpp:779
static MatrixType & StrainVectorToTensor(const array_1d< double, 6 > &rVector, MatrixType &rMatrix)
Definition: constitutive_model_utilities.hpp:619
Short class definition.
Definition: damage_model.hpp:50
bool Has(const Variable< double > &rThisVariable) override
Definition: damage_model.hpp:266
PlasticityModel< ElasticityModelType, YieldSurfaceType > BaseType
Definition: damage_model.hpp:63
~DamageModel() override
Destructor.
Definition: damage_model.hpp:108
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: damage_model.hpp:298
KRATOS_CLASS_POINTER_DEFINITION(DamageModel)
Pointer definition of DamageModel.
BaseType::Pointer BaseTypePointer
Definition: damage_model.hpp:66
void SetInternalVariables(ModelDataType &rValues, PlasticDataType &rVariables) override
Definition: damage_model.hpp:640
void InitializeModel(ModelDataType &rValues) override
Definition: damage_model.hpp:139
void CalculateConstitutiveTensor(ModelDataType &rValues, Matrix &rConstitutiveMatrix) override
Definition: damage_model.hpp:181
void SetValue(const Variable< double > &rVariable, const double &rValue, const ProcessInfo &rCurrentProcessInfo) override
Definition: damage_model.hpp:271
Vector & CalculateEquivalentStrainDerivative(PlasticDataType &rVariables, const Matrix &rConstitutiveMatrix, Vector &rEquivalentStrainDerivative)
Definition: damage_model.hpp:584
virtual bool CalculateReturnMapping(PlasticDataType &rVariables, MatrixType &rStressMatrix)
Definition: damage_model.hpp:434
BaseType::VectorType VectorType
Definition: damage_model.hpp:69
void CalculateStressTensor(ModelDataType &rValues, MatrixType &rStressMatrix) override
Definition: damage_model.hpp:153
InternalVariablesType mInternal
Definition: damage_model.hpp:326
std::string Info() const override
Turn back information as a string.
Definition: damage_model.hpp:290
BaseType::ModelDataType ModelDataType
Definition: damage_model.hpp:71
DamageModel & operator=(DamageModel const &rOther)
Assignment operator.
Definition: damage_model.hpp:94
BaseType::MaterialDataType MaterialDataType
Definition: damage_model.hpp:72
BaseType::PlasticDataType PlasticDataType
Definition: damage_model.hpp:73
BaseType::InternalVariablesType InternalVariablesType
Definition: damage_model.hpp:74
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: damage_model.hpp:304
TElasticityModel ElasticityModelType
Definition: damage_model.hpp:57
BaseType::SizeType SizeType
Definition: damage_model.hpp:67
virtual void CalculateAndAddStressTensor(PlasticDataType &rVariables, MatrixType &rStressMatrix)
Definition: damage_model.hpp:340
double & GetValue(const Variable< double > &rThisVariable, double &rValue) override
Definition: damage_model.hpp:277
DamageModel()
Default constructor.
Definition: damage_model.hpp:88
virtual void UpdateInternalVariables(ModelDataType &rValues, PlasticDataType &rVariables, const MatrixType &rStressMatrix)
Definition: damage_model.hpp:503
ConstitutiveModel::Pointer Clone() const override
Clone.
Definition: damage_model.hpp:102
void CalculateStressNorm(PlasticDataType &rVariables, MatrixType &rStressMatrix)
Definition: damage_model.hpp:515
BaseType::VoigtIndexType VoigtIndexType
Definition: damage_model.hpp:68
ConstitutiveModelData::StrainMeasureType StrainMeasureType
Definition: damage_model.hpp:76
TYieldSurface YieldSurfaceType
Definition: damage_model.hpp:60
void InitializeMaterial(const Properties &rProperties) override
Definition: damage_model.hpp:123
virtual void UpdateStressConfiguration(PlasticDataType &rVariables, MatrixType &rStressMatrix)
Definition: damage_model.hpp:491
virtual void CalculateAndAddPlasticConstitutiveTensor(PlasticDataType &rVariables, Matrix &rConstitutiveMatrix)
Definition: damage_model.hpp:381
DamageModel(DamageModel const &rOther)
Copy constructor.
Definition: damage_model.hpp:91
void CalculateStressAndConstitutiveTensors(ModelDataType &rValues, MatrixType &rStressMatrix, Matrix &rConstitutiveMatrix) override
Definition: damage_model.hpp:220
BaseType::MatrixType MatrixType
Definition: damage_model.hpp:70
virtual void InitializeVariables(ModelDataType &rValues, PlasticDataType &rVariables)
Definition: damage_model.hpp:464
ConstitutiveModelData::StressMeasureType StressMeasureType
Definition: damage_model.hpp:77
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
Short class definition.
Definition: plasticity_model.hpp:50
YieldSurfaceType mYieldSurface
Definition: plasticity_model.hpp:336
ElasticityModelType mElasticityModel
Definition: plasticity_model.hpp:335
TYieldSurface::InternalVariablesType InternalVariablesType
Definition: plasticity_model.hpp:69
ConstitutiveModelData::SizeType SizeType
Definition: plasticity_model.hpp:63
ConstitutiveModelData::VoigtIndexType VoigtIndexType
Definition: plasticity_model.hpp:64
void InitializeModel(ModelDataType &rValues) override
Definition: plasticity_model.hpp:127
PlasticityModel & operator=(PlasticityModel const &rOther)
Assignment operator.
Definition: plasticity_model.hpp:85
TYieldSurface::PlasticDataType PlasticDataType
Definition: plasticity_model.hpp:68
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
Properties encapsulates data shared by different Elements or Conditions. It can store any type of dat...
Definition: properties.h:69
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
#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
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
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
PrincipalStresses
Definition: isotropic_damage_automatic_differentiation.py:221
def load(f)
Definition: ode_solve.py:307
integer i
Definition: TensorModule.f:17
Definition: constitutive_model_data.hpp:92
Definition: constitutive_model_data.hpp:383
VariableValueData InternalVariable
Definition: constitutive_model_data.hpp:405
MatrixType StressMatrix
Definition: constitutive_model_data.hpp:401
Flags State
Definition: constitutive_model_data.hpp:399
MatrixType StrainMatrix
Definition: constitutive_model_data.hpp:402
const MatrixType & GetStressMatrix() const
Definition: constitutive_model_data.hpp:461
void SetValue(const Variable< int > &rVariable, int &rValue)
Definition: constitutive_model_data.hpp:313