MarmotStressMeasures.h
Go to the documentation of this file.
1 /* ---------------------------------------------------------------------
2  * _
3  * _ __ ___ __ _ _ __ _ __ ___ ___ | |_
4  * | '_ ` _ \ / _` | '__| '_ ` _ \ / _ \| __|
5  * | | | | | | (_| | | | | | | | | (_) | |_
6  * |_| |_| |_|\__,_|_| |_| |_| |_|\___/ \__|
7  *
8  * Unit of Strength of Materials and Structural Analysis
9  * University of Innsbruck,
10  * 2020 - today
11  *
12  * festigkeitslehre@uibk.ac.at
13  *
14  * Alexander Dummer alexander.dummer@uibk.ac.at
15  *
16  * This file is part of the MAteRialMOdellingToolbox (marmot).
17  *
18  * This library is free software; you can redistribute it and/or
19  * modify it under the terms of the GNU Lesser General Public
20  * License as published by the Free Software Foundation; either
21  * version 2.1 of the License, or (at your option) any later version.
22  *
23  * The full text of the license can be found in the file LICENSE.md at
24  * the top level directory of marmot.
25  * ---------------------------------------------------------------------
26  */
27 
28 #pragma once
29 
31 #include <Fastor/tensor/Tensor.h>
32 
34 
35  namespace StressMeasures {
36 
37  using namespace FastorIndices;
38  using namespace FastorStandardTensors;
39 
40  template < typename T >
42  {
43  // tau = F * PK2 * F^T = F_iI * S_IJ * F_Jj
44  const Tensor33t< T > tau = einsum< iI, IJ, jJ, to_ij >( F, PK2, F );
45 
46  return tau;
47  }
48 
49  namespace FirstOrderDerived {
50 
51  template < typename T >
53  const Tensor33t< T >& PK2,
54  const Tensor33t< T >& F )
55  {
56  const auto& I = Spatial3D::I;
57  const Tensor33t< T > tau = einsum< iI, IJ, jJ, to_ij >( F, PK2, F );
58  /* const Tensor3333t< T > dTau_dPK2 = einsum< iK, jL, to_ijKL >( einsum< iI, IK >( F, I ), */
59  /* transpose( einsum< JL, jJ >( I, F ) ) ); */
60  const Tensor3333t< T > dTau_dPK2 = einsum< iI, jJ, to_ijIJ >( F, F );
61  /* const Tensor3333t< T > dTau_dF = einsum< iK, IL, IJ, jJ, to_ijKL >( I, I, PK2, F ) + */
62  /* einsum< iI, IJ, jK, JL, to_ijKL >( F, PK2, I, I ); */
63 
64  const Tensor33t< T > S_F = einsum< KJ, jJ >( PK2, F );
65  const Tensor3333t< T > dTau_dF = einsum< ik, jK, to_ijkK >( I, transpose( S_F ) ) +
66  einsum< Ki, jk, to_ijkK >( S_F, I );
67 
68  return { tau, dTau_dPK2, dTau_dF };
69  }
70  } // namespace FirstOrderDerived
71 
72  } // namespace StressMeasures
73 
74 } // namespace Marmot::ContinuumMechanics
MarmotFastorTensorBasics.h
Marmot::FastorStandardTensors::Tensor3333t
Fastor::Tensor< T, 3, 3, 3, 3 > Tensor3333t
Definition: MarmotFastorTensorBasics.h:49
Marmot::ContinuumMechanics::StressMeasures::KirchhoffStressFromPK2
Tensor33t< T > KirchhoffStressFromPK2(const Tensor33t< T > &PK2, const Tensor33t< T > &F)
Definition: MarmotStressMeasures.h:41
Marmot::FastorStandardTensors::Spatial3D::I
const Tensor33d I
Definition: MarmotFastorTensorBasics.h:57
Marmot::ContinuumMechanics
Definition: MarmotDeformationMeasures.h:31
Marmot::FiniteElement::EAS::F
Eigen::MatrixXd F(const Eigen::MatrixXd &J)
Marmot::FastorStandardTensors::Tensor33t
Fastor::Tensor< T, 3, 3 > Tensor33t
Definition: MarmotFastorTensorBasics.h:45