58 template <SizeType TVoigtSize = 6>
59 class KRATOS_API(STRUCTURAL_MECHANICS_APPLICATION) ConstitutiveLawUtilities
69 static constexpr
SizeType Dimension = TVoigtSize == 6 ? 3 : 2;
72 static constexpr
SizeType VoigtSize = TVoigtSize;
96 static constexpr
double tolerance = std::numeric_limits<double>::epsilon();
129 static void PolarDecomposition(
145 const Vector& rStrainVector,
155 template<
class TVector>
157 const TVector& rStressVector,
161 rI1 = rStressVector[0];
163 rI1 += rStressVector[
i];
174 template<
class TVector>
176 const TVector& rStressVector,
182 if constexpr (Dimension == 3) {
183 rDeviator = rStressVector;
184 const double p_mean =
I1 / 3.0;
186 rDeviator[
i] -= p_mean;
189 rJ2 += 0.5 * std::pow(rDeviator[
i], 2);
191 rJ2 += std::pow(rDeviator[
i], 2);
193 rDeviator = rStressVector;
194 const double p_mean =
I1 / 3.0;
196 rDeviator[
i] -= p_mean;
197 rJ2 = 0.5 * (std::pow(rDeviator[0], 2.0) + std::pow(rDeviator[1], 2.0) + std::pow(p_mean, 2.0)) + std::pow(rDeviator[2], 2.0);
207 template<
class TVector>
216 return std::sqrt(3.0 *
J2);
225 static void CalculateRotationOperatorVoigt(
226 const BoundedMatrixType &rOldOperator,
227 BoundedMatrixVoigtType &rNewOperator
233 template <
class TVector>
239 if (norm > std::numeric_limits<double>::epsilon()) {
242 KRATOS_ERROR <<
"The norm of one LOCAL_AXIS is null" << std::endl;
252 static void CalculateElasticMatrixPlaneStress(
263 static void CalculateElasticMatrixPlaneStrain(
284 static void CalculateCauchyGreenStrain(
295 static void CalculatePK2StressFromStrain(
298 const double YoungModulus,
299 const double PoissonRatio);
308 static void CalculatePK2StressFromStrainPlaneStress(
311 const double YoungModulus,
312 const double PoissonRatio);
321 static void CalculatePK2StressFromStrainPlaneStrain(
324 const double YoungModulus,
325 const double PoissonRatio);
static void CalculateI1Invariant(const TVector &rStressVector, double &rI1)
This method computes the first invariant from a given stress vector.
Definition: constitutive_law_utilities.h:156
Geometry< NodeType > GeometryType
Geometry definitions.
Definition: constitutive_law_utilities.h:93
BoundedMatrix< double, VoigtSize, VoigtSize > BoundedMatrixVoigtType
The definition of the bounded matrix type.
Definition: constitutive_law_utilities.h:87
Vector VectorType
the vector type definition
Definition: constitutive_law_utilities.h:78
static void CalculateGreenLagrangianStrain(const MatrixType &rCauchyTensor, VectorType &rStrainVector)
Calculation of the Green-Lagrange strain vector.
Matrix MatrixType
The matrix type definition.
Definition: constitutive_law_utilities.h:75
static void CalculateJ2Invariant(const BoundedVectorType &rStressVector, const double I1, BoundedVectorType &rDeviator, double &rJ2)
This method computes the second invariant of J.
std::size_t IndexType
The index type definition.
Definition: constitutive_law_utilities.h:66
static void CalculateProjectionOperator(const Vector &rStrainVector, MatrixType &rProjectionOperator)
This method calculates the projection operator and calculates the Projection Operator.
array_1d< double, VoigtSize > BoundedVectorType
The definition of the bounded vector type.
Definition: constitutive_law_utilities.h:81
Node NodeType
Node type definition.
Definition: constitutive_law_utilities.h:90
static void CheckAndNormalizeVector(TVector &rVector)
This checks if a vector has null norm.
Definition: constitutive_law_utilities.h:234
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
BoundedMatrix< double, Dimension, Dimension > BoundedMatrixType
The definition of the bounded matrix type.
Definition: constitutive_law_utilities.h:84
static void CalculateJ2Invariant(const TVector &rStressVector, const double I1, BoundedVectorType &rDeviator, double &rJ2)
This method computes the second invariant of J.
Definition: constitutive_law_utilities.h:175
static double CalculateVonMisesEquivalentStress(const TVector &rStressVector)
This method the uniaxial equivalent stress for Von Mises.
Definition: constitutive_law_utilities.h:208
static void CalculateElasticMatrix(MatrixType &rC, const double E, const double N)
Geometry base class.
Definition: geometry.h:71
static double Norm3(const TVectorType &a)
Calculates the norm of vector "a" which is assumed to be of size 3.
Definition: math_utils.h:691
This class defines the node.
Definition: node.h:65
#define KRATOS_ERROR
Definition: exception.h:161
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
E
Definition: generate_hyper_elastic_simo_taylor_neo_hookean.py:26
float J2
Definition: isotropic_damage_automatic_differentiation.py:133
I1
Definition: isotropic_damage_automatic_differentiation.py:230
N
Definition: sensitivityMatrix.py:29
integer i
Definition: TensorModule.f:17
Definition: constitutive_law.h:189