v0.14.0
NeoHookean.hpp
Go to the documentation of this file.
1 /** \file NeoHookean.hpp
2  * \ingroup nonlinear_elastic_elem
3  * \brief Implementation of Neo-Hookean elastic material
4  * \example NeoHookean.hpp
5  */
6 
7 
8 
9 #ifndef __NEOHOOKEAN_HPP__
10 #define __NEOHOOKEAN_HPP__
11 
12 /** \brief NeoHookan equation
13  * \ingroup nonlinear_elastic_elem
14  */
15 template <typename TYPE>
16 struct NeoHookean
18  TYPE> {
19 
20  using PiolaKirchoffI =
22 
26 
27  TYPE detC;
28  TYPE logJ;
29  MatrixBoundedArray<TYPE, 9> invC;
31 
35 
36  /** \brief calculate second Piola Kirchhoff
37  *
38  * \f$\mathbf{S} =
39  \mu(\mathbf{I}-\mathbf{C}^{-1})+\lambda(\ln{J})\mathbf{C}^{-1}\f$
40 
41  For details look to: <br>
42  NONLINEAR CONTINUUM MECHANICS FOR FINITE ELEMENT ANALYSIS, Javier Bonet,
43  Richard D. Wood
44 
45  */
48 
49  detC = determinantTensor3by3(this->C);
50  CHKERR invertTensor3by3(this->C, detC, invC);
51  this->J = determinantTensor3by3(this->F);
52 
53  logJ = log(sqrt(this->J * this->J));
54  constexpr auto t_kd = FTensor::Kronecker_Delta<double>();
55 
56  this->t_S(i, j) = this->mu * (t_kd(i, j) - t_invC(i, j)) +
57  (this->lambda * logJ) * t_invC(i, j);
58 
60  }
61 
63  const NonlinearElasticElement::BlockData block_data,
64  boost::shared_ptr<const NumeredEntFiniteElement> fe_ptr) {
66 
67  this->lambda = LAMBDA(block_data.E, block_data.PoissonRatio);
68  this->mu = MU(block_data.E, block_data.PoissonRatio);
71 
72  this->t_P(i, j) = this->t_F(i, k) * this->t_S(k, j);
73 
75  }
76 
77  /** \brief calculate elastic energy density
78  *
79 
80  For details look to: <br>
81  NONLINEAR CONTINUUM MECHANICS FOR FINITE ELEMENT ANALYSIS, Javier Bonet,
82  Richard D. Wood
83 
84  */
87  this->eNergy = this->t_C(i, i);
88  this->eNergy = 0.5 * this->mu * (this->eNergy - 3);
89  logJ = log(sqrt(this->J * this->J));
90  this->eNergy += -this->mu * logJ + 0.5 * this->lambda * pow(logJ, 2);
92  }
93 
95  const NonlinearElasticElement::BlockData block_data,
96  boost::shared_ptr<const NumeredEntFiniteElement> fe_ptr) {
98 
99  this->lambda = LAMBDA(block_data.E, block_data.PoissonRatio);
100  this->mu = MU(block_data.E, block_data.PoissonRatio);
102  this->J = determinantTensor3by3(this->F);
104 
106  }
107 };
108 
109 #endif
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:460
NonlinearElasticElement::FunctionsToCalculatePiolaKirchhoffI::FunctionsToCalculatePiolaKirchhoffI
FunctionsToCalculatePiolaKirchhoffI()
Definition: NonLinearElasticElement.hpp:136
NonlinearElasticElement::FunctionsToCalculatePiolaKirchhoffI::eNergy
TYPE eNergy
Definition: NonLinearElasticElement.hpp:152
NonlinearElasticElement::FunctionsToCalculatePiolaKirchhoffI::t_P
FTensor::Tensor2< FTensor::PackPtr< TYPE *, 0 >, 3, 3 > t_P
Definition: NonLinearElasticElement.hpp:150
NonlinearElasticElement::FunctionsToCalculatePiolaKirchhoffI
Implementation of elastic (non-linear) St. Kirchhoff equation.
Definition: NonLinearElasticElement.hpp:79
NeoHookean::calculateElasticEnergy
MoFEMErrorCode calculateElasticEnergy(const NonlinearElasticElement::BlockData block_data, boost::shared_ptr< const NumeredEntFiniteElement > fe_ptr)
Calculate elastic energy density.
Definition: NeoHookean.hpp:94
NonlinearElasticElement
structure grouping operators and data used for calculation of nonlinear elastic element
Definition: HookeElement.hpp:27
NeoHookean::NeoHooke_PiolaKirchhoffII
MoFEMErrorCode NeoHooke_PiolaKirchhoffII()
calculate second Piola Kirchhoff
Definition: NeoHookean.hpp:46
MoFEM::Exceptions::MoFEMErrorCode
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:56
LAMBDA
#define LAMBDA(E, NU)
Definition: fem_tools.h:22
FTensor::Kronecker_Delta
Kronecker Delta class.
Definition: Kronecker_Delta.hpp:15
NeoHookean::logJ
TYPE logJ
Definition: NeoHookean.hpp:28
FTensor::Tensor2
Definition: Tensor2_value.hpp:16
MoFEM::invertTensor3by3
MoFEMErrorCode invertTensor3by3(ublas::matrix< T, L, A > &jac_data, ublas::vector< T, A > &det_data, ublas::matrix< T, L, A > &inv_jac_data)
Calculate inverse of tensor rank 2 at integration points.
Definition: Templates.hpp:1588
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
NonlinearElasticElement::FunctionsToCalculatePiolaKirchhoffI::F
MatrixBoundedArray< TYPE, 9 > F
Definition: NonLinearElasticElement.hpp:147
NonlinearElasticElement::BlockData::E
double E
Definition: HookeElement.hpp:34
NeoHookean::j
FTensor::Index< 'j', 3 > j
Definition: NeoHookean.hpp:33
NonlinearElasticElement::FunctionsToCalculatePiolaKirchhoffI::t_F
FTensor::Tensor2< FTensor::PackPtr< TYPE *, 0 >, 3, 3 > t_F
Definition: NonLinearElasticElement.hpp:149
NonlinearElasticElement::FunctionsToCalculatePiolaKirchhoffI::t_S
FTensor::Tensor2< FTensor::PackPtr< TYPE *, 0 >, 3, 3 > t_S
Definition: NonLinearElasticElement.hpp:149
NonlinearElasticElement::BlockData
data for calculation heat conductivity and heat capacity elements
Definition: HookeElement.hpp:32
NonlinearElasticElement::FunctionsToCalculatePiolaKirchhoffI::C
MatrixBoundedArray< TYPE, 9 > C
Definition: NonLinearElasticElement.hpp:147
t_kd
constexpr auto t_kd
Definition: free_surface.cpp:137
NonlinearElasticElement::FunctionsToCalculatePiolaKirchhoffI::t_C
FTensor::Tensor2< FTensor::PackPtr< TYPE *, 0 >, 3, 3 > t_C
Definition: NonLinearElasticElement.hpp:149
NeoHookean::t_invC
FTensor::Tensor2< FTensor::PackPtr< TYPE *, 0 >, 3, 3 > t_invC
Definition: NeoHookean.hpp:30
NonlinearElasticElement::BlockData::PoissonRatio
double PoissonRatio
Definition: HookeElement.hpp:35
FTensor::Index< 'i', 3 >
NonlinearElasticElement::FunctionsToCalculatePiolaKirchhoffI::J
TYPE J
Definition: NonLinearElasticElement.hpp:152
MoFEM::determinantTensor3by3
static auto determinantTensor3by3(T &t)
Calculate the determinant of a 3x3 matrix or a tensor of rank 2.
Definition: Templates.hpp:1540
NonlinearElasticElement::FunctionsToCalculatePiolaKirchhoffI::mu
double mu
Definition: NonLinearElasticElement.hpp:146
NeoHookean::NeoHookean_ElasticEnergy
MoFEMErrorCode NeoHookean_ElasticEnergy()
calculate elastic energy density
Definition: NeoHookean.hpp:85
NeoHookean::k
FTensor::Index< 'k', 3 > k
Definition: NeoHookean.hpp:34
NonlinearElasticElement::FunctionsToCalculatePiolaKirchhoffI::resizeAndSet
static auto resizeAndSet(MatrixBoundedArray< TYPE, 9 > &m)
Definition: NonLinearElasticElement.hpp:336
NeoHookean::NeoHookean
NeoHookean()
Definition: NeoHookean.hpp:23
NeoHookean::i
FTensor::Index< 'i', 3 > i
Definition: NeoHookean.hpp:32
NonlinearElasticElement::FunctionsToCalculatePiolaKirchhoffI::calculateC_CauchyDeformationTensor
MoFEMErrorCode calculateC_CauchyDeformationTensor()
Definition: NonLinearElasticElement.hpp:160
NeoHookean
NeoHookan equation.
Definition: NeoHookean.hpp:16
MoFEMFunctionBeginHot
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:453
NonlinearElasticElement::FunctionsToCalculatePiolaKirchhoffI::lambda
double lambda
Definition: NonLinearElasticElement.hpp:146
NeoHookean::calculateP_PiolaKirchhoffI
virtual MoFEMErrorCode calculateP_PiolaKirchhoffI(const NonlinearElasticElement::BlockData block_data, boost::shared_ptr< const NumeredEntFiniteElement > fe_ptr)
Function overload to implement user material.
Definition: NeoHookean.hpp:62
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
NeoHookean::invC
MatrixBoundedArray< TYPE, 9 > invC
Definition: NeoHookean.hpp:29
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359
MU
#define MU(E, NU)
Definition: fem_tools.h:23
NeoHookean::detC
TYPE detC
Definition: NeoHookean.hpp:27