10 #if !defined(KRATOS_STRESS_INVARIANTS_UTILITIES)
11 #define KRATOS_STRESS_INVARIANTS_UTILITIES
20 #include "boost/smart_ptr.hpp"
56 for (
unsigned int i = 0;
i < 3; ++
i)
61 for (
unsigned int i = 0;
i < 3;
i++)
62 J2 += pow( rStress(
i) -
I1, 2);
64 for (
unsigned int i = 3;
i < 6;
i++)
65 J2 += 2.0*pow( rStress(
i), 2);
67 J2 = sqrt( 0.5 *
J2 );
82 for (
unsigned int i = 0;
i < 3; ++
i)
83 StressTensor(
i,
i) -=
I1;
86 Lode = 3.0 * sqrt(3.0) / 2.0 * Lode / pow(
J2, 3);
89 if ( fabs( Lode ) > 1.0-epsi) {
90 Lode = -30.0*
Globals::Pi / 180.0 * Lode / fabs(Lode);
92 else if (
J2 < 10.0*epsi) {
96 Lode = std::asin( -Lode) / 3.0;
112 for (
unsigned int i = 0;
i < 3;
i++)
120 for (
unsigned int i = 0;
i < 3;
i++)
121 C2(
i) = rStress(
i) -
I1;
123 for (
unsigned int i = 3;
i < 6;
i++)
124 C2(
i) = 2.0*rStress(
i);
139 for (
unsigned int i = 0;
i < 3;
i++)
147 for (
unsigned int i = 0;
i < 3;
i++)
148 C2(
i) = rStress(
i) -
I1;
150 for (
unsigned int i = 3;
i < 6;
i++)
151 C2(
i) = 2.0*rStress(
i);
164 Vector ShearStress = rStress;
165 for (
int i = 0;
i < 3;
i++)
166 ShearStress(
i) -=
I1;
168 C3(0) = ShearStress(1)*ShearStress(2) - pow( ShearStress(4), 2);
169 C3(1) = ShearStress(2)*ShearStress(0) - pow( ShearStress(5), 2);
170 C3(2) = ShearStress(0)*ShearStress(1) - pow( ShearStress(3), 2);
172 C3(3) = 2.0 * ( ShearStress(4)*ShearStress(5) - ShearStress(2)*ShearStress(3));
173 C3(4) = 2.0 * ( ShearStress(5)*ShearStress(3) - ShearStress(0)*ShearStress(4));
174 C3(5) = 2.0 * ( ShearStress(3)*ShearStress(4) - ShearStress(1)*ShearStress(5));
176 for (
unsigned int i = 0;
i < 3; ++
i)
177 C3(
i) += pow(
J2, 2) / 3.0;
181 Aux =
prod( ShearStressM, ShearStressM);
183 for (
unsigned int i = 0;
i < 3;
i++)
184 Aux(
i,
i) -= 1.0/3.0 * 2.0 * pow(
J2 , 2);
static Vector & StressTensorToVector(const MatrixType &rStressTensor, Vector &rStressVector)
Definition: constitutive_model_utilities.hpp:843
Definition: amatrix_interface.h:41
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
Definition: stress_invariants_utilities.hpp:33
static void CalculateStressInvariants(const MatrixType &rStressMatrix, double &rI1, double &rJ2, double &rLode)
Definition: stress_invariants_utilities.hpp:71
unsigned int IndexType
Definition: stress_invariants_utilities.hpp:41
static void CalculateDerivativeVectors(const Vector &rStress, VectorType &C1, VectorType &C2)
Definition: stress_invariants_utilities.hpp:108
unsigned int SizeType
Definition: stress_invariants_utilities.hpp:43
static void CalculateStressInvariants(const MatrixType &rStressMatrix, double &rI1, double &rJ2)
Definition: stress_invariants_utilities.hpp:45
static void CalculateStressInvariants(const Vector &rStress, double &I1, double &J2)
Definition: stress_invariants_utilities.hpp:52
static void CalculateStressInvariants(const Vector &rStress, double &I1, double &J2, double &Lode)
Definition: stress_invariants_utilities.hpp:77
static void CalculateDerivativeVectors(const MatrixType &rStressMatrix, VectorType &C1, VectorType &C2)
Definition: stress_invariants_utilities.hpp:101
BoundedMatrix< double, 3, 3 > MatrixType
Definition: stress_invariants_utilities.hpp:37
array_1d< double, 6 > VectorType
Definition: stress_invariants_utilities.hpp:39
static void CalculateDerivativeVectors(const Vector rStress, Vector &C1, Vector &C2, Vector &C3)
Definition: stress_invariants_utilities.hpp:135
BOOST_UBLAS_INLINE void clear()
Definition: array_1d.h:325
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
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