9 #if !defined(KRATOS_STRESS_INVARIANTS_UTILITIES)
10 #define KRATOS_STRESS_INVARIANTS_UTILITIES
11 #define PI 3.1415926535898
27 #include "boost/smart_ptr.hpp"
42 class KRATOS_API(PFEM_SOLID_MECHANICS_APPLICATION) StressInvariantsUtilities
60 for (
unsigned int i = 0;
i < 3; ++
i)
65 for (
unsigned int i = 0;
i < 3;
i++)
66 J2 += pow( rStress(
i) -
I1, 2.0);
68 for (
unsigned int i = 3;
i < 6;
i++)
69 J2 += 2.0*pow( rStress(
i), 2.0);
71 J2 = pow(
J2 /2.0, 1.0/2.0);
77 CalculateStressInvariants( rStress,
I1,
J2);
80 for (
unsigned int i = 0;
i < 3; ++
i)
81 StressTensor(
i,
i) -=
I1;
84 Lode = 3.0 * sqrt(3.0) / 2.0 * Lode / pow(
J2, 3.0);
87 if ( fabs( Lode ) > 1.0-epsi) {
88 Lode = -30.0*
PI / 180.0 * Lode / fabs(Lode);
90 else if (
J2 < 10.0*epsi) {
91 Lode = 30.0*
PI / 180.0;
94 Lode = std::asin( -Lode) / 3.0;
104 for (
unsigned int i = 0;
i < 3;
i++)
108 CalculateStressInvariants( rStress,
I1,
J2);
112 for (
unsigned int i = 0;
i < 3;
i++)
113 C2(
i) = rStress(
i) -
I1;
115 for (
unsigned int i = 3;
i < 6;
i++)
116 C2(
i) = 2.0*rStress(
i);
134 for (
unsigned int i = 0;
i < 3;
i++)
138 CalculateStressInvariants( rStress,
I1,
J2);
142 for (
unsigned int i = 0;
i < 3;
i++)
143 C2(
i) = rStress(
i) -
I1;
145 for (
unsigned int i = 3;
i < 6;
i++)
146 C2(
i) = 2.0*rStress(
i);
159 Vector ShearStress = rStress;
160 for (
int i = 0;
i < 3;
i++)
161 ShearStress(
i) -=
I1;
163 C3(0) = ShearStress(1)*ShearStress(2) - pow( ShearStress(4), 2.0);
164 C3(1) = ShearStress(2)*ShearStress(0) - pow( ShearStress(5), 2.0);
165 C3(2) = ShearStress(0)*ShearStress(1) - pow( ShearStress(3), 2.0);
167 C3(3) = 2.0 * ( ShearStress(4)*ShearStress(5) - ShearStress(2)*ShearStress(3));
168 C3(4) = 2.0 * ( ShearStress(5)*ShearStress(3) - ShearStress(0)*ShearStress(4));
169 C3(5) = 2.0 * ( ShearStress(3)*ShearStress(4) - ShearStress(1)*ShearStress(5));
171 for (
unsigned int i = 0;
i < 3; ++
i)
172 C3(
i) += pow(
J2, 2.0) / 3.0;
176 Aux =
prod( ShearStressM, ShearStressM);
178 for (
unsigned int i = 0;
i < 3;
i++)
179 Aux(
i,
i) -= 1.0/3.0 * 2.0*pow(
J2 , 2.0);
#define PI
Definition: stress_invariants_utilities.hpp:11
static TMatrixType StressVectorToTensor(const TVector &rStressVector)
Transforms a stess vector into a matrix. Stresses are assumed to be stored in the following way: for...
Definition: math_utils.h:1174
static Vector StrainTensorToVector(const TMatrixType &rStrainTensor, SizeType rSize=0)
Transforms a given symmetric Strain Tensor to Voigt Notation:
Definition: math_utils.h:1344
static double Det(const TMatrixType &rA)
Calculates the determinant of a matrix of a square matrix of any size (no check performed on release ...
Definition: math_utils.h:597
unsigned int IndexType
Definition: stress_invariants_utilities.hpp:51
unsigned int SizeType
Definition: stress_invariants_utilities.hpp:53
static void CalculateStressInvariants(const Vector &rStress, double &I1, double &J2)
Definition: stress_invariants_utilities.hpp:56
static void CalculateStressInvariants(const Vector &rStress, double &I1, double &J2, double &Lode)
Definition: stress_invariants_utilities.hpp:75
Vector VectorType
Definition: stress_invariants_utilities.hpp:49
static void CalculateDerivativeVectors(const Vector rStress, Vector &C1, Vector &C2)
Definition: stress_invariants_utilities.hpp:100
static void CalculateDerivativeVectors(const Vector rStress, Vector &C1, Vector &C2, Vector &C3)
Definition: stress_invariants_utilities.hpp:130
Matrix MatrixType
Definition: stress_invariants_utilities.hpp:47
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
AMatrix::MatrixProductExpression< TExpression1Type, TExpression2Type > prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:568
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
integer i
Definition: TensorModule.f:17