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.
constitutive_law_utilities.h
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ \.
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics FemDem Application
6 //
7 // License: BSD License
8 // Kratos default license: kratos/license.txt
9 //
10 // Main authors: Alejandro Cornejo Velazquez
11 // Vicente Mataix Ferrandiz
12 //
13 
14 #if !defined(KRATOS_CONSTITUTIVE_LAW_UTILITIES)
15 #define KRATOS_CONSTITUTIVE_LAW_UTILITIES
16 
17 // System includes
18 
19 // External includes
20 
21 // Project includes
23 #include "includes/node.h"
24 #include "geometries/geometry.h"
27 
28 namespace Kratos
29 {
32 
36 
38 typedef std::size_t SizeType;
39 
40 
44 
48 
52 
61 template <SizeType TVoigtSize = 6>
62 class KRATOS_API(FEM_TO_DEM_APPLICATION) ConstitutiveLawUtilities
63 {
64  public:
67 
69  typedef std::size_t IndexType;
70 
72  static constexpr SizeType Dimension = TVoigtSize == 6 ? 3 : 2;
73 
75  static constexpr SizeType VoigtSize = TVoigtSize;
76 
78  typedef Matrix MatrixType;
79 
81  typedef Vector VectorType;
82 
85 
88 
90  typedef Node NodeType;
91 
94 
96  static constexpr double tolerance = std::numeric_limits<double>::epsilon();
97 
101 
105 
109 
113  static void CalculateElasticMatrix(
114  Matrix &rConstitutiveMatrix,
115  const double E,
116  const double nu);
117 
124  static void CalculateDeviatoricStrainVector(
125  const Vector &rStrainVector,
126  const Vector &rVolumetricStrainVector,
127  Vector &rDeviatoricStrainVector);
128 
134  static void CalculateVolumetricStrainVector(
135  const Vector &rStrainVector,
136  Vector &rVolumetricStrainVector);
137 
138 
144  BoundedVectorType& rIdentityVector
145  )
146  {
147  if (rIdentityVector.size() != VoigtSize) {
148  rIdentityVector.resize(VoigtSize);
149  noalias(rIdentityVector) = ZeroVector(VoigtSize);
150  }
151 
152  for (IndexType i = 0; i < Dimension; ++i)
153  rIdentityVector[i] = 1.0;
154  }
155 
160  static double CalculateBulkModulus(
161  const double YoungModulus,
162  const double PoissonRatio);
163 
168  static double CalculateShearModulus(
169  const double YoungModulus,
170  const double PoissonRatio);
171 
177  static void CalculateI1Invariant(
178  const BoundedVectorType& rStressVector,
179  double& rI1
180  );
181 
188  static void CalculateI2Invariant(
189  const BoundedVectorType& rStressVector,
190  double& rI2
191  );
192 
199  static void CalculateI3Invariant(
200  const BoundedVectorType& rStressVector,
201  double& rI3
202  );
203 
211  static void CalculateJ2Invariant(
212  const BoundedVectorType& rStressVector,
213  const double I1,
214  BoundedVectorType& rDeviator,
215  double& rJ2
216  );
217 
223  static void CalculateJ3Invariant(
224  const BoundedVectorType& rDeviator,
225  double& rJ3
226  );
227 
232  static void CalculateFirstVector(BoundedVectorType& rFirstVector);
233 
241  const BoundedVectorType& rDeviator,
242  const double J2,
243  BoundedVectorType& rSecondVector
244  );
245 
253  static void CalculateThirdVector(
254  const BoundedVectorType& rDeviator,
255  const double J2,
256  BoundedVectorType& rThirdVector
257  );
258 
265  static void CalculateLodeAngle(
266  const double J2,
267  const double J3,
268  double& rLodeAngle
269  );
270 
279  array_1d<double, Dimension>& rPrincipalStressVector,
280  const BoundedVectorType& rStressVector
281  );
282 
290  static void CalculatePrincipalStressesWithCardano(
291  array_1d<double, Dimension>& rPrincipalStressVector,
292  const BoundedVectorType& rStressVector
293  );
294 
302  const BoundedVectorType& rPredictiveStressVector,
303  const Vector& rStrainVector,
304  double& rEquivalentStress,
306  {
307  double I1, J2;
308  array_1d<double, VoigtSize> deviator = ZeroVector(VoigtSize);
310  ConstitutiveLawUtilities<VoigtSize>::CalculateJ2Invariant(rPredictiveStressVector, I1, deviator, J2);
311  rEquivalentStress = std::sqrt(3.0 * J2);
312  }
313 
321  const BoundedVectorType& rPredictiveStressVector,
322  const Vector& rStrainVector,
323  double& rEquivalentStress,
325  {
326  const Properties& r_material_properties = rValues.GetMaterialProperties();
327  const double yield_compression = r_material_properties[YIELD_STRESS_C];
328  const double yield_tension = r_material_properties[YIELD_STRESS_T];
329  double friction_angle = r_material_properties[INTERNAL_FRICTION_ANGLE] * Globals::Pi / 180.0; // In radians!
330 
331  // Check input variables
332  if (friction_angle < tolerance) {
333  friction_angle = 32.0 * Globals::Pi / 180.0;
334  KRATOS_WARNING("ModifiedMohrCoulombYieldSurface") << "Friction Angle not defined, assumed equal to 32 deg " << std::endl;
335  }
336 
337  double theta;
338  const double R = std::abs(yield_compression / yield_tension);
339  const double Rmorh = std::pow(std::tan((Globals::Pi / 4.0) + friction_angle / 2.0), 2);
340  const double alpha_r = R / Rmorh;
341  const double sin_phi = std::sin(friction_angle);
342 
343  double I1, J2, J3;
344  array_1d<double, TVoigtSize> deviator = ZeroVector(TVoigtSize);
346  ConstitutiveLawUtilities<TVoigtSize>::CalculateJ2Invariant(rPredictiveStressVector, I1, deviator, J2);
348 
349  const double K1 = 0.5 * (1.0 + alpha_r) - 0.5 * (1.0 - alpha_r) * sin_phi;
350  const double K2 = 0.5 * (1.0 + alpha_r) - 0.5 * (1.0 - alpha_r) / sin_phi;
351  const double K3 = 0.5 * (1.0 + alpha_r) * sin_phi - 0.5 * (1.0 - alpha_r);
352 
353  // Check Modified Mohr-Coulomb criterion
354  if (std::abs(I1) < tolerance) {
355  rEquivalentStress = 0.0;
356  } else {
358  rEquivalentStress = (2.0 * std::tan(Globals::Pi * 0.25 + friction_angle * 0.5) / std::cos(friction_angle)) * ((I1 * K3 / 3.0) +
359  std::sqrt(J2) * (K1 * std::cos(theta) - K2 * std::sin(theta) * sin_phi / std::sqrt(3.0)));
360  }
361  }
362 
370  const BoundedVectorType& rPredictiveStressVector,
371  const Vector& rStrainVector,
372  double& rEquivalentStress,
374  {
375  double I1, J2, J3, lode_angle;
376  array_1d<double, TVoigtSize> deviator = ZeroVector(TVoigtSize);
377 
379  ConstitutiveLawUtilities<TVoigtSize>::CalculateJ2Invariant(rPredictiveStressVector, I1, deviator, J2);
382 
383  const Properties& r_material_properties = rValues.GetMaterialProperties();
384  const double friction_angle = r_material_properties[INTERNAL_FRICTION_ANGLE] * Globals::Pi / 180.0;
385 
386  rEquivalentStress = (std::cos(lode_angle) - std::sin(lode_angle) * std::sin(friction_angle) / std::sqrt(3.0)) * std::sqrt(J2) +
387  I1 * std::sin(friction_angle) / 3.0;
388  }
389 
397  const BoundedVectorType& rPredictiveStressVector,
398  const Vector& rStrainVector,
399  double& rEquivalentStress,
401  {
402  array_1d<double, Dimension> principal_stress_vector = ZeroVector(Dimension);
403  ConstitutiveLawUtilities<TVoigtSize>::CalculatePrincipalStresses(principal_stress_vector, rPredictiveStressVector);
404  // The rEquivalentStress is the maximum principal stress
405  if (Dimension == 3)
406  rEquivalentStress = std::max(std::max(principal_stress_vector[0], principal_stress_vector[1]), principal_stress_vector[2]);
407  else // 2D
408  rEquivalentStress = std::max(principal_stress_vector[0], principal_stress_vector[1]);
409  }
410 
418  const BoundedVectorType& rPredictiveStressVector,
419  const Vector& rStrainVector,
420  double& rEquivalentStress,
422  {
423  double I1, J2, J3, lode_angle;
424  array_1d<double, TVoigtSize> deviator = ZeroVector(TVoigtSize);
426  ConstitutiveLawUtilities<TVoigtSize>::CalculateJ2Invariant(rPredictiveStressVector, I1, deviator, J2);
429  rEquivalentStress = 2.0 * std::cos(lode_angle) * std::sqrt(J2);
430  }
431 
439  const BoundedVectorType& rPredictiveStressVector,
440  const Vector& rStrainVector,
441  double& rEquivalentStress,
443  {
444  const Properties& r_material_properties = rValues.GetMaterialProperties();
445  // It compares with fc / sqrt(E)
446  array_1d<double, Dimension> principal_stress_vector;
447  ConstitutiveLawUtilities<VoigtSize>::CalculatePrincipalStresses(principal_stress_vector, rPredictiveStressVector);
448  const double yield_compression = r_material_properties[YIELD_STRESS_C];
449  const double yield_tension = r_material_properties[YIELD_STRESS_T];
450  const double n = std::abs(yield_compression / yield_tension);
451 
452  double sum_a = 0.0, sum_b = 0.0, sum_c = 0.0, ere0, ere1;
453  for (std::size_t cont = 0; cont < 2; ++cont) {
454  sum_a += std::abs(principal_stress_vector[cont]);
455  sum_b += 0.5 * (principal_stress_vector[cont] + std::abs(principal_stress_vector[cont]));
456  sum_c += 0.5 * (-principal_stress_vector[cont] + std::abs(principal_stress_vector[cont]));
457  }
458  ere0 = sum_b / sum_a;
459  ere1 = sum_c / sum_a;
460 
461  double auxf = 0.0;
462  for (std::size_t cont = 0; cont < VoigtSize; ++cont) {
463  auxf += rStrainVector[cont] * rPredictiveStressVector[cont]; // E:S
464  }
465  rEquivalentStress = std::sqrt(auxf);
466  rEquivalentStress *= (ere0 * n + ere1);
467  }
468 
476  const BoundedVectorType& rPredictiveStressVector,
477  const Vector& rStrainVector,
478  double& rEquivalentStress,
480  {
481  const Properties& r_material_properties = rValues.GetMaterialProperties();
482 
483  double friction_angle = r_material_properties[INTERNAL_FRICTION_ANGLE] * Globals::Pi / 180.0; // In radians!
484  const double sin_phi = std::sin(friction_angle);
485  const double root_3 = std::sqrt(3.0);
486 
487  // Check input variables
488  if (friction_angle < tolerance) {
489  friction_angle = 32.0 * Globals::Pi / 180.0;
490  KRATOS_WARNING("DruckerPragerYieldSurface") << "Friction Angle not defined, assumed equal to 32 " << std::endl;
491  }
492 
493  double I1, J2;
495  array_1d<double, TVoigtSize> deviator = ZeroVector(TVoigtSize);
496  ConstitutiveLawUtilities<TVoigtSize>::CalculateJ2Invariant(rPredictiveStressVector, I1, deviator, J2);
497 
498  if (std::abs(I1) < tolerance) {
499  rEquivalentStress = 0.0;
500  } else {
501  const double CFL = -root_3 * (3.0 - sin_phi) / (3.0 * sin_phi - 3.0);
502  const double TEN0 = 2.0 * I1 * sin_phi / (root_3 * (3.0 - sin_phi)) + std::sqrt(J2);
503  rEquivalentStress = std::abs(CFL * TEN0);
504  }
505  }
506 
515  double& rThreshold)
516  {
517  const Properties& r_material_properties = rValues.GetMaterialProperties();
518  const double yield_tension = r_material_properties[YIELD_STRESS_T];
519  rThreshold = std::abs(yield_tension);
520  }
521 
530  double& rThreshold)
531  {
532  const Properties& r_material_properties = rValues.GetMaterialProperties();
533  const double yield_compression = r_material_properties[YIELD_STRESS_C];
534  rThreshold = std::abs(yield_compression);
535  }
536 
545  double& rThreshold)
546  {
547  const Properties& r_material_properties = rValues.GetMaterialProperties();
548  const double cohesion = r_material_properties[COHESION_MC];
549  const double friction_angle = r_material_properties[INTERNAL_FRICTION_ANGLE] * Globals::Pi / 180.0;
550  rThreshold = cohesion * std::cos(friction_angle);
551  }
552 
561  double& rThreshold)
562  {
563  GetInitialUniaxialThresholdHuberVonMises(rValues, rThreshold);
564  }
565 
574  double& rThreshold)
575  {
576  GetInitialUniaxialThresholdHuberVonMises(rValues, rThreshold);
577  }
578 
587  double& rThreshold)
588  {
589  const Properties& r_material_properties = rValues.GetMaterialProperties();
590  const double yield_compression = r_material_properties[YIELD_STRESS_C];
591  rThreshold = std::abs(yield_compression / std::sqrt(r_material_properties[YOUNG_MODULUS]));
592  }
593 
602  double& rThreshold)
603  {
604  const Properties& r_material_properties = rValues.GetMaterialProperties();
605  const double yield_tension = r_material_properties[YIELD_STRESS_T];
606  const double friction_angle = r_material_properties[INTERNAL_FRICTION_ANGLE] * Globals::Pi / 180.0; // In radians!
607  const double sin_phi = std::sin(friction_angle);
608  rThreshold = std::abs(yield_tension * (3.0 + sin_phi) / (3.0 * sin_phi - 3.0));
609  }
610 
619  double& rAParameter,
620  const double CharacteristicLength)
621  {
622  const Properties& r_material_properties = rValues.GetMaterialProperties();
623  const double fracture_energy = r_material_properties[FRAC_ENERGY_T];
624  const double young_modulus = r_material_properties[YOUNG_MODULUS];
625  const double yield_tension = r_material_properties[YIELD_STRESS_T];
626  rAParameter = 1.00 / (fracture_energy * young_modulus / (CharacteristicLength * std::pow(yield_tension, 2)) - 0.5);
627  KRATOS_ERROR_IF(rAParameter < 0.0) << "Fracture energy is too low, increase FRACTURE_ENERGY..." << std::endl;
628  }
629 
638  double& rAParameter,
639  const double CharacteristicLength)
640  {
641  const Properties& r_material_properties = rValues.GetMaterialProperties();
642  const double fracture_energy = r_material_properties[FRAC_ENERGY_T];
643  const double young_modulus = r_material_properties[YOUNG_MODULUS];
644  const double yield_compression = r_material_properties[YIELD_STRESS_C];
645  const double yield_tension = r_material_properties[YIELD_STRESS_T];
646  const double n = yield_compression / yield_tension;
647  rAParameter = 1.00 / (fracture_energy * n * n * young_modulus / (CharacteristicLength * std::pow(yield_compression, 2)) - 0.5);
648  KRATOS_ERROR_IF(rAParameter < 0.0) << "Fracture energy is too low, increase FRACTURE_ENERGY..." << std::endl;
649  }
650 
659  double& rAParameter,
660  const double CharacteristicLength)
661  {
662  const Properties& r_material_properties = rValues.GetMaterialProperties();
663  const double fracture_energy = r_material_properties[FRAC_ENERGY_T];
664  const double young_modulus = r_material_properties[YOUNG_MODULUS];
665  const double cohesion = r_material_properties[COHESION_MC];
666  rAParameter = 1.00 / (fracture_energy * young_modulus / (CharacteristicLength * std::pow(cohesion, 2)) - 0.5);
667  KRATOS_ERROR_IF(rAParameter < 0.0) << "Fracture energy is too low, increase FRACTURE_ENERGY..." << std::endl;
668  }
669 
678  double& rAParameter,
679  const double CharacteristicLength)
680  {
681  CalculateDamageParameterHuberVonMises(rValues, rAParameter, CharacteristicLength);
682  }
683 
692  double& rAParameter,
693  const double CharacteristicLength)
694  {
695  CalculateDamageParameterHuberVonMises(rValues, rAParameter, CharacteristicLength);
696  }
697 
706  double& rAParameter,
707  const double CharacteristicLength)
708  {
709  const Properties& r_material_properties = rValues.GetMaterialProperties();
710  const double fracture_energy = r_material_properties[FRAC_ENERGY_T];
711  const double yield_compression = r_material_properties[YIELD_STRESS_C];
712  const double yield_tension = r_material_properties[YIELD_STRESS_T];
713  const double n = yield_compression / yield_tension;
714  rAParameter = 1.0 / (fracture_energy * n * n / (CharacteristicLength * std::pow(yield_compression, 2)) - 0.5);
715  KRATOS_ERROR_IF(rAParameter < 0.0) << "Fracture energy is too low, increase FRACTURE_ENERGY..." << std::endl;
716  }
717 
726  double& rAParameter,
727  const double CharacteristicLength)
728  {
729  CalculateDamageParameterModifiedMohrCoulomb(rValues, rAParameter, CharacteristicLength);
730  }
731 
736  static double GetMaxValue(const Vector& rValues)
737  {
738  double aux = 0.0;
739  for (IndexType i = 0; i < rValues.size(); ++i) {
740  if (aux < rValues[i]) aux = rValues[i];
741  }
742  return aux;
743  }
744 
749  static double GetMaxAbsValue(const Vector& rArrayValues)
750  {
751  const SizeType dimension = rArrayValues.size();
752 
753  IndexType counter = 0;
754  double aux = 0.0;
755  for (IndexType i = 0; i < dimension; ++i) {
756  if (std::abs(rArrayValues[i]) > aux) {
757  aux = std::abs(rArrayValues[i]);
758  ++counter;
759  }
760  }
761  return aux;
762  }
763 
768  static double GetMinAbsValue(const Vector& rArrayValues)
769  {
770  const SizeType dimension = rArrayValues.size();
771  IndexType counter = 0;
772  double aux = std::numeric_limits<double>::max();
773  for (IndexType i = 0; i < dimension; ++i) {
774  if (std::abs(rArrayValues[i]) < aux) {
775  aux = std::abs(rArrayValues[i]);
776  ++counter;
777  }
778  }
779  return aux;
780  }
781 
786  static void Get2MaxValues(
787  Vector& rMaxValues,
788  const double a,
789  const double b,
790  const double c
791  )
792  {
793  rMaxValues.resize(2);
794  Vector V;
795  V.resize(3);
796  V[0] = a;
797  V[1] = b;
798  V[2] = c;
799  const int n = 3;
800 
801  for (int i = 0; i < n; i++) {
802  for (int j = 0; j < n - 1; j++) {
803  if (V[j] > V[j + 1]) {
804  double aux = V[j];
805  V[j] = V[j + 1];
806  V[j + 1] = aux;
807  }
808  }
809  }
810  rMaxValues[0] = V[2];
811  rMaxValues[1] = V[1];
812  }
813 
820  static void CalculateHenckyStrain(
821  const MatrixType& rCauchyTensor,
822  VectorType& rStrainVector);
823 
830  static void CalculateBiotStrain(
831  const MatrixType& rCauchyTensor,
832  VectorType& rStrainVector);
833 
840  static void CalculateAlmansiStrain(
841  const MatrixType& rLeftCauchyTensor,
842  VectorType& rStrainVector);
843 
850  static void CalculateGreenLagrangianStrain(
851  const MatrixType& rCauchyTensor,
852  VectorType& rStrainVector);
853  private:
854 
855 }; // class ConstitutiveLawUtilities
856 } // namespace Kratos
857 #endif /* KRATOS_CONSTITUTIVE_LAW_UTILITIES defined */
This class includes several utilities necessaries for the computation of the constitutive law.
Definition: constitutive_law_utilities.h:63
static void CalculateDamageParameterHuberVonMises(ConstitutiveLaw::Parameters &rValues, double &rAParameter, const double CharacteristicLength)
This method returns the damage parameter needed in the exp/linear expressions of damage.
Definition: constitutive_law_utilities.h:617
Geometry< NodeType > GeometryType
Geometry definitions.
Definition: constitutive_law_utilities.h:93
static void CalculateDamageParameterMohrCoulomb(ConstitutiveLaw::Parameters &rValues, double &rAParameter, const double CharacteristicLength)
This method returns the damage parameter needed in the exp/linear expressions of damage.
Definition: constitutive_law_utilities.h:657
static void CalculateDamageParameterSimoJu(ConstitutiveLaw::Parameters &rValues, double &rAParameter, const double CharacteristicLength)
This method returns the damage parameter needed in the exp/linear expressions of damage.
Definition: constitutive_law_utilities.h:704
static void CalculateEquivalentStressModifiedMohrCoulomb(const BoundedVectorType &rPredictiveStressVector, const Vector &rStrainVector, double &rEquivalentStress, ConstitutiveLaw::Parameters &rValues)
This method the uniaxial equivalent stress of ModifiedMohrCoulomb.
Definition: constitutive_law_utilities.h:320
static void Get2MaxValues(Vector &rMaxValues, const double a, const double b, const double c)
This method returns the 2 max values of a vector.
Definition: constitutive_law_utilities.h:786
Vector VectorType
the vector type definition
Definition: constitutive_law_utilities.h:81
static void CalculateFirstVector(BoundedVectorType &rFirstVector)
This method computes the first vector.
static void GetInitialUniaxialThresholdMohrCoulomb(ConstitutiveLaw::Parameters &rValues, double &rThreshold)
This method returns the initial uniaxial stress threshold for MohrCoulomb.
Definition: constitutive_law_utilities.h:543
static void CalculateEquivalentStressMohrCoulomb(const BoundedVectorType &rPredictiveStressVector, const Vector &rStrainVector, double &rEquivalentStress, ConstitutiveLaw::Parameters &rValues)
This method the uniaxial equivalent stress of MohrCoulomb.
Definition: constitutive_law_utilities.h:369
static void CalculateEquivalentStressSimoJu(const BoundedVectorType &rPredictiveStressVector, const Vector &rStrainVector, double &rEquivalentStress, ConstitutiveLaw::Parameters &rValues)
This method the uniaxial equivalent stress of SimoJu.
Definition: constitutive_law_utilities.h:438
static void CalculateEquivalentStressHuberVonMises(const BoundedVectorType &rPredictiveStressVector, const Vector &rStrainVector, double &rEquivalentStress, ConstitutiveLaw::Parameters &rValues)
This method the uniaxial equivalent stress of Huber-VonMises.
Definition: constitutive_law_utilities.h:301
Matrix MatrixType
The matrix type definition.
Definition: constitutive_law_utilities.h:78
static void GetInitialUniaxialThresholdRankine(ConstitutiveLaw::Parameters &rValues, double &rThreshold)
This method returns the initial uniaxial stress threshold for Rankine.
Definition: constitutive_law_utilities.h:559
static void CalculateDamageParameterDruckerPrager(ConstitutiveLaw::Parameters &rValues, double &rAParameter, const double CharacteristicLength)
This method returns the damage parameter needed in the exp/linear expressions of damage.
Definition: constitutive_law_utilities.h:724
static void GetInitialUniaxialThresholdDruckerPrager(ConstitutiveLaw::Parameters &rValues, double &rThreshold)
This method returns the initial uniaxial stress threshold for SimoJu.
Definition: constitutive_law_utilities.h:600
static void GetInitialUniaxialThresholdModifiedMohrCoulomb(ConstitutiveLaw::Parameters &rValues, double &rThreshold)
This method returns the initial uniaxial stress threshold for ModifiedMohrCoulomb.
Definition: constitutive_law_utilities.h:528
static void CalculateJ2Invariant(const BoundedVectorType &rStressVector, const double I1, BoundedVectorType &rDeviator, double &rJ2)
This method computes the second invariant of J.
static void CalculateLodeAngle(const double J2, const double J3, double &rLodeAngle)
This method computes the lode angle.
Definition: constitutive_law_utilities.cpp:389
static double GetMaxValue(const Vector &rValues)
This method returns max value over a vector.
Definition: constitutive_law_utilities.h:736
std::size_t IndexType
The index type definition.
Definition: constitutive_law_utilities.h:69
static double GetMinAbsValue(const Vector &rArrayValues)
This method returns min abs value over a vector.
Definition: constitutive_law_utilities.h:768
static void CalculateI3Invariant(const BoundedVectorType &rStressVector, double &rI3)
This method computes the third invariant from a given stress vector.
static double GetMaxAbsValue(const Vector &rArrayValues)
This method returns max abs value over a vector.
Definition: constitutive_law_utilities.h:749
static void CalculateDamageParameterModifiedMohrCoulomb(ConstitutiveLaw::Parameters &rValues, double &rAParameter, const double CharacteristicLength)
This method returns the damage parameter needed in the exp/linear expressions of damage.
Definition: constitutive_law_utilities.h:636
array_1d< double, VoigtSize > BoundedVectorType
The definition of the bounded vector type.
Definition: constitutive_law_utilities.h:84
static void GetInitialUniaxialThresholdHuberVonMises(ConstitutiveLaw::Parameters &rValues, double &rThreshold)
This method returns the initial uniaxial stress threshold for VonMises.
Definition: constitutive_law_utilities.h:513
Node NodeType
Node type definition.
Definition: constitutive_law_utilities.h:90
static void CalculateEquivalentStressDruckerPrager(const BoundedVectorType &rPredictiveStressVector, const Vector &rStrainVector, double &rEquivalentStress, ConstitutiveLaw::Parameters &rValues)
This method the uniaxial equivalent stress of Drucker-Prager.
Definition: constitutive_law_utilities.h:475
static void CalculateI2Invariant(const BoundedVectorType &rStressVector, double &rI2)
This method computes the second invariant from a given stress vector.
static void CalculateJ3Invariant(const BoundedVectorType &rDeviator, double &rJ3)
This method computes the third invariant of J.
static void GetInitialUniaxialThresholdTresca(ConstitutiveLaw::Parameters &rValues, double &rThreshold)
This method returns the initial uniaxial stress threshold for Tresca.
Definition: constitutive_law_utilities.h:572
static void CalculateIdentityVector(BoundedVectorType &rIdentityVector)
This method creates an identity vector.
Definition: constitutive_law_utilities.h:143
static void CalculateThirdVector(const BoundedVectorType &rDeviator, const double J2, BoundedVectorType &rThirdVector)
This method computes the third vector.
static void CalculateSecondVector(const BoundedVectorType &rDeviator, const double J2, BoundedVectorType &rSecondVector)
This method computes the second vector.
static void CalculateEquivalentStressTresca(const BoundedVectorType &rPredictiveStressVector, const Vector &rStrainVector, double &rEquivalentStress, ConstitutiveLaw::Parameters &rValues)
This method the uniaxial equivalent stress of Tresca.
Definition: constitutive_law_utilities.h:417
static void CalculateI1Invariant(const BoundedVectorType &rStressVector, double &rI1)
This method computes the first invariant from a given stress vector.
Definition: constitutive_law_utilities.cpp:148
static void CalculateDamageParameterRankine(ConstitutiveLaw::Parameters &rValues, double &rAParameter, const double CharacteristicLength)
This method returns the damage parameter needed in the exp/linear expressions of damage.
Definition: constitutive_law_utilities.h:676
BoundedMatrix< double, Dimension, Dimension > BoundedMatrixType
The definition of the bounded matrix type.
Definition: constitutive_law_utilities.h:87
static void CalculateEquivalentStressRankine(const BoundedVectorType &rPredictiveStressVector, const Vector &rStrainVector, double &rEquivalentStress, ConstitutiveLaw::Parameters &rValues)
This method the uniaxial equivalent stress of Rankine.
Definition: constitutive_law_utilities.h:396
static void CalculatePrincipalStresses(array_1d< double, Dimension > &rPrincipalStressVector, const BoundedVectorType &rStressVector)
This method computes the principal stresses vector.
static void CalculateDamageParameterTresca(ConstitutiveLaw::Parameters &rValues, double &rAParameter, const double CharacteristicLength)
This method returns the damage parameter needed in the exp/linear expressions of damage.
Definition: constitutive_law_utilities.h:690
static void GetInitialUniaxialThresholdSimoJu(ConstitutiveLaw::Parameters &rValues, double &rThreshold)
This method returns the initial uniaxial stress threshold for SimoJu.
Definition: constitutive_law_utilities.h:585
Geometry base class.
Definition: geometry.h:71
void resize(std::size_t NewSize1, std::size_t NewSize2, bool preserve=0)
Definition: amatrix_interface.h:224
This class defines the node.
Definition: node.h:65
Properties encapsulates data shared by different Elements or Conditions. It can store any type of dat...
Definition: properties.h:69
BOOST_UBLAS_INLINE void resize(size_type array_size, bool preserve=true)
Definition: array_1d.h:242
BOOST_UBLAS_INLINE size_type size() const
Definition: array_1d.h:370
#define KRATOS_ERROR_IF(conditional)
Definition: exception.h:162
#define KRATOS_WARNING(label)
Definition: logger.h:265
Matrix MatrixType
Definition: geometrical_transformation_utilities.h:55
static double max(double a, double b)
Definition: GeometryFunctions.h:79
constexpr double Pi
Definition: global_variables.h:25
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
std::size_t SizeType
The definition of the size type.
Definition: mortar_classes.h:43
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
V
Definition: generate_droplet_dynamics.py:256
E
Definition: generate_hyper_elastic_simo_taylor_neo_hookean.py:26
a
Definition: generate_stokes_twofluid_element.py:77
b
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:31
c
Definition: generate_weakly_compressible_navier_stokes_element.py:108
float J2
Definition: isotropic_damage_automatic_differentiation.py:133
float K2
Definition: isotropic_damage_automatic_differentiation.py:178
int dimension
Definition: isotropic_damage_automatic_differentiation.py:123
float K3
Definition: isotropic_damage_automatic_differentiation.py:179
I1
Definition: isotropic_damage_automatic_differentiation.py:230
tuple alpha_r
Definition: isotropic_damage_automatic_differentiation.py:174
nu
Definition: isotropic_damage_automatic_differentiation.py:135
R
Definition: isotropic_damage_automatic_differentiation.py:172
CFL
Definition: isotropic_damage_automatic_differentiation.py:156
root_3
Definition: isotropic_damage_automatic_differentiation.py:155
def J3
Definition: isotropic_damage_automatic_differentiation.py:176
float TEN0
Definition: isotropic_damage_automatic_differentiation.py:157
sin_phi
Definition: isotropic_damage_automatic_differentiation.py:153
float K1
Definition: isotropic_damage_automatic_differentiation.py:177
int n
manufactured solution and derivatives (u=0 at z=0 dudz=0 at z=domain_height)
Definition: ode_solve.py:402
int j
Definition: quadrature.py:648
int counter
Definition: script_THERMAL_CORRECT.py:218
integer i
Definition: TensorModule.f:17
Definition: constitutive_law.h:189
const Properties & GetMaterialProperties()
Definition: constitutive_law.h:457