32 double StressNorm = 0.;
33 for(
unsigned int i = 0;
i < LocalStressTensor.size1(); ++
i) {
34 for(
unsigned int j = 0;
j < LocalStressTensor.size2(); ++
j) {
35 StressNorm += LocalStressTensor(
i,
j)*LocalStressTensor(
i,
j);
38 return std::sqrt(StressNorm);
51 for (std::size_t
i=0;
i < LocalStressTensor.size1(); ++
i) {
52 for (std::size_t
j=0;
j < LocalStressTensor.size2(); ++
j) {
53 StressTensor(
i,
j) = LocalStressTensor(
i,
j);
57 double SigmaEquivalent = 0.5*((StressTensor(0,0)-StressTensor(1,1))*(StressTensor(0,0)-StressTensor(1,1))+
58 (StressTensor(1,1)-StressTensor(2,2))*(StressTensor(1,1)-StressTensor(2,2))+
59 (StressTensor(2,2)-StressTensor(0,0))*(StressTensor(2,2)-StressTensor(0,0))+
60 6.0*(StressTensor(0,1)*StressTensor(1,0)+
61 StressTensor(1,2)*StressTensor(2,1)+
62 StressTensor(2,0)*StressTensor(0,2) ));
64 return std::sqrt(
std::max(SigmaEquivalent, 0.));
76 for (std::size_t
i = 0;
i < StressTensor.size1(); ++
i) {
77 trace += StressTensor(
i,
i);
88 return CalculateTrace(StressVector) / (StressVector.size() == 3 ? 2.0 : 3.0);
95 return (2.0/3.0) * CalculateVonMisesStress(StrainVector);
106 Matrix EigenValuesMatrix, EigenVectorsMatrix;
109 for (std::size_t
i = 0;
i < DeformationGradient.size1(); ++
i){
110 EigenValuesMatrix(
i,
i) = 0.5 * std::log(EigenValuesMatrix(
i,
i));
118 if (DeformationGradient.size1()==2 && VoigtSize == 4) {
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 void BDBtProductOperation(TMatrixType1 &rA, const TMatrixType2 &rD, const TMatrixType3 &rB)
Calculates the product operation BDB'.
Definition: math_utils.h:1543
static bool GaussSeidelEigenSystem(const TMatrixType1 &rA, TMatrixType2 &rEigenVectorsMatrix, TMatrixType2 &rEigenValuesMatrix, const double Tolerance=1.0e-18, const SizeType MaxIterations=20)
Calculates the eigenvectors and eigenvalues of given symmetric matrix.
Definition: math_utils.h:1587
Definition: stress_strain_utilities.hpp:24
static double CalculateTrace(const Vector &StressVector)
Definition: stress_strain_utilities.hpp:69
static Vector CalculateHenckyStrain(const Matrix &DeformationGradient, size_t VoigtSize)
Definition: stress_strain_utilities.hpp:99
static double CalculateVonMisesStrain(const Vector &StrainVector)
Definition: stress_strain_utilities.hpp:92
static double CalculateMeanStress(const Vector &StressVector)
Definition: stress_strain_utilities.hpp:85
static double CalculateVonMisesStress(const Vector &StressVector)
Definition: stress_strain_utilities.hpp:43
static double CalculateStressNorm(const Vector &StressVector)
Definition: stress_strain_utilities.hpp:26
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
static double max(double a, double b)
Definition: GeometryFunctions.h:79
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroMatrix< double > ZeroMatrix
Definition: amatrix_interface.h:559
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
AMatrix::TransposeMatrix< const T > trans(const T &TheMatrix)
Definition: amatrix_interface.h:486
@ INDEX_2D_PLANE_STRAIN_XX
Definition: geo_mechanics_application_constants.h:62
@ INDEX_2D_PLANE_STRAIN_ZZ
Definition: geo_mechanics_application_constants.h:64
@ INDEX_2D_PLANE_STRAIN_YY
Definition: geo_mechanics_application_constants.h:63
@ INDEX_2D_PLANE_STRAIN_XY
Definition: geo_mechanics_application_constants.h:65
int C
Definition: generate_hyper_elastic_simo_taylor_neo_hookean.py:27
int j
Definition: quadrature.py:648
integer i
Definition: TensorModule.f:17