OGS
MathLib::KelvinVector::Invariants< KelvinVectorSize > Struct Template Referencefinal

Detailed Description

template<int KelvinVectorSize>
struct MathLib::KelvinVector::Invariants< KelvinVectorSize >

Invariants used in mechanics, based on Kelvin representation of the vectors and matrices. The invariants are computed at process creation time.

Definition at line 93 of file KelvinVector.h.

#include <KelvinVector.h>

Public Member Functions

double determinant (Eigen::Matrix< double, 6, 1 > const &v)
 
double determinant (Eigen::Matrix< double, 4, 1 > const &v)
 

Static Public Member Functions

static double determinant (Eigen::Matrix< double, KelvinVectorSize, 1 > const &v)
 Determinant of a matrix in Kelvin vector representation.
 
static double equivalentStress (Eigen::Matrix< double, KelvinVectorSize, 1 > const &deviatoric_v)
 
static double FrobeniusNorm (Eigen::Matrix< double, KelvinVectorSize, 1 > const &deviatoric_v)
 Get the norm of the deviatoric stress.
 
static double J2 (Eigen::Matrix< double, KelvinVectorSize, 1 > const &deviatoric_v)
 
static double J3 (Eigen::Matrix< double, KelvinVectorSize, 1 > const &deviatoric_v)
 
static double trace (Eigen::Matrix< double, KelvinVectorSize, 1 > const &v)
 Trace of the corresponding tensor.
 
static Eigen::Vector3d diagonal (Eigen::Matrix< double, KelvinVectorSize, 1 > const &v)
 

Static Public Attributes

static Eigen::Matrix< double, KelvinVectorSize, KelvinVectorSize > const deviatoric_projection
 
static Eigen::Matrix< double, KelvinVectorSize, KelvinVectorSize > const spherical_projection
 
static Eigen::Matrix< double, KelvinVectorSize, 1 > const identity2
 Kelvin mapping of 2nd order identity tensor.
 

Member Function Documentation

◆ determinant() [1/3]

double MathLib::KelvinVector::Invariants< 4 >::determinant ( Eigen::Matrix< double, 4, 1 > const & v)

Definition at line 28 of file KelvinVector.cpp.

29{
30 return v(2) * (v(0) * v(1) - v(3) * v(3) / 2.);
31}
static const double v

References MathLib::v.

◆ determinant() [2/3]

double MathLib::KelvinVector::Invariants< 6 >::determinant ( Eigen::Matrix< double, 6, 1 > const & v)

Definition at line 20 of file KelvinVector.cpp.

21{
22 return v(0) * v(1) * v(2) + v(3) * v(4) * v(5) / std::sqrt(2.) -
23 v(3) * v(3) * v(2) / 2. - v(4) * v(4) * v(0) / 2. -
24 v(5) * v(5) * v(1) / 2.;
25}

References MathLib::v.

◆ determinant() [3/3]

template<int KelvinVectorSize>
static double MathLib::KelvinVector::Invariants< KelvinVectorSize >::determinant ( Eigen::Matrix< double, KelvinVectorSize, 1 > const & v)
static

Determinant of a matrix in Kelvin vector representation.

Referenced by MathLib::KelvinVector::inverse(), and MathLib::KelvinVector::inverse().

◆ diagonal()

template<int KelvinVectorSize>
Eigen::Vector3d MathLib::KelvinVector::Invariants< KelvinVectorSize >::diagonal ( Eigen::Matrix< double, KelvinVectorSize, 1 > const & v)
static

Diagonal of the corresponding tensor which is always of length 3 in 2D and 3D cases.

Definition at line 54 of file KelvinVector-impl.h.

56{
57 return v.template topLeftCorner<3, 1>();
58}

References MathLib::v.

◆ equivalentStress()

template<int KelvinVectorSize>
double MathLib::KelvinVector::Invariants< KelvinVectorSize >::equivalentStress ( Eigen::Matrix< double, KelvinVectorSize, 1 > const & deviatoric_v)
static

The von Mises equivalent stress.

Note
The input vector must have trace equal zero.

Definition at line 18 of file KelvinVector-impl.h.

20{
21 assert(std::abs(trace(deviatoric_v)) <=
22 4e-12 * diagonal(deviatoric_v).norm());
23 return std::sqrt(3 * J2(deviatoric_v));
24}
double norm(MatrixOrVector const &x, MathLib::VecNormType type)
Definition LinAlg.h:94
static Eigen::Vector3d diagonal(Eigen::Matrix< double, KelvinVectorSize, 1 > const &v)
static double trace(Eigen::Matrix< double, KelvinVectorSize, 1 > const &v)
Trace of the corresponding tensor.
static double J2(Eigen::Matrix< double, KelvinVectorSize, 1 > const &deviatoric_v)

◆ FrobeniusNorm()

template<int KelvinVectorSize>
double MathLib::KelvinVector::Invariants< KelvinVectorSize >::FrobeniusNorm ( Eigen::Matrix< double, KelvinVectorSize, 1 > const & deviatoric_v)
static

Get the norm of the deviatoric stress.

Definition at line 27 of file KelvinVector-impl.h.

29{
30 return std::sqrt(deviatoric_v.transpose() * deviatoric_v);
31}

◆ J2()

template<int KelvinVectorSize>
double MathLib::KelvinVector::Invariants< KelvinVectorSize >::J2 ( Eigen::Matrix< double, KelvinVectorSize, 1 > const & deviatoric_v)
static

Second invariant of deviatoric tensor.

Note
The input vector must have trace equal zero.

Definition at line 34 of file KelvinVector-impl.h.

36{
37 assert(std::abs(trace(deviatoric_v)) <=
38 4e-12 * diagonal(deviatoric_v).norm());
39 return 0.5 * deviatoric_v.transpose() * deviatoric_v;
40}

◆ J3()

template<int KelvinVectorSize>
double MathLib::KelvinVector::Invariants< KelvinVectorSize >::J3 ( Eigen::Matrix< double, KelvinVectorSize, 1 > const & deviatoric_v)
static

Third invariant, equal to determinant of a deviatoric tensor.

Note
The input vector must have trace equal zero.

Definition at line 45 of file KelvinVector-impl.h.

47{
48 assert(std::abs(trace(deviatoric_v)) <=
49 4e-12 * diagonal(deviatoric_v).norm());
50 return determinant(deviatoric_v);
51}
static double determinant(Eigen::Matrix< double, KelvinVectorSize, 1 > const &v)
Determinant of a matrix in Kelvin vector representation.

◆ trace()

template<int KelvinVectorSize>
double MathLib::KelvinVector::Invariants< KelvinVectorSize >::trace ( Eigen::Matrix< double, KelvinVectorSize, 1 > const & v)
static

Trace of the corresponding tensor.

Definition at line 62 of file KelvinVector-impl.h.

64{
65 return diagonal(v).sum();
66}

References MathLib::v.

Member Data Documentation

◆ deviatoric_projection

template<int KelvinVectorSize>
const Eigen::Matrix< double, KelvinVectorSize, KelvinVectorSize > MathLib::KelvinVector::Invariants< KelvinVectorSize >::deviatoric_projection
static
Initial value:
=
KelvinVector_detail::initDeviatoricProjection<KelvinVectorSize>()

Kelvin mapping of deviatoric projection tensor. \(A_{\rm dev} = P_{\rm dev}:A\) for \(A\) being a second order tensor.

Definition at line 101 of file KelvinVector.h.

◆ identity2

template<int KelvinVectorSize>
const Eigen::Matrix< double, KelvinVectorSize, 1 > MathLib::KelvinVector::Invariants< KelvinVectorSize >::identity2
static
Initial value:
=
KelvinVector_detail::initIdentity2<KelvinVectorSize>()

Kelvin mapping of 2nd order identity tensor.

Definition at line 107 of file KelvinVector.h.

Referenced by ProcessLib::ThermoMechanicalPhaseField::IntegrationPointData< BMatricesType, ShapeMatrixType, DisplacementDim >::updateConstitutiveRelation().

◆ spherical_projection

template<int KelvinVectorSize>
Eigen::Matrix< double, KelvinVectorSize, KelvinVectorSize > const MathLib::KelvinVector::Invariants< KelvinVectorSize >::spherical_projection
static
Initial value:
=
KelvinVector_detail::initSphericalProjection<KelvinVectorSize>()

Kelvin mapping of spherical projection tensor. \(A_{\rm sph} = P_{\rm sph}:A\) for \(A\) being a second order tensor.

Definition at line 105 of file KelvinVector.h.


The documentation for this struct was generated from the following files: