v0.13.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 /* This file is part of MoFEM.
8  * MoFEM is free software: you can redistribute it and/or modify it under
9  * the terms of the GNU Lesser General Public License as published by the
10  * Free Software Foundation, either version 3 of the License, or (at your
11  * option) any later version.
12  *
13  * MoFEM is distributed in the hope that it will be useful, but WITHOUT
14  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
16  * License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with MoFEM. If not, see <http://www.gnu.org/licenses/>. */
20 
21 #ifndef __NEOHOOKEAN_HPP__
22 #define __NEOHOOKEAN_HPP__
23 
24 /** \brief NeoHookan equation
25  * \ingroup nonlinear_elastic_elem
26  */
27 template <typename TYPE>
28 struct NeoHookean
30  TYPE> {
31 
34 
38 
41  MatrixBoundedArray<TYPE, 9> invC;
43 
47 
48  /** \brief calculate second Piola Kirchhoff
49  *
50  * \f$\mathbf{S} =
51  \mu(\mathbf{I}-\mathbf{C}^{-1})+\lambda(\ln{J})\mathbf{C}^{-1}\f$
52 
53  For details look to: <br>
54  NONLINEAR CONTINUUM MECHANICS FOR FINITE ELEMENT ANALYSIS, Javier Bonet,
55  Richard D. Wood
56 
57  */
60 
61  detC = determinantTensor3by3(this->C);
62  CHKERR invertTensor3by3(this->C, detC, invC);
63  this->J = determinantTensor3by3(this->F);
64 
65  logJ = log(sqrt(this->J * this->J));
66  constexpr auto t_kd = FTensor::Kronecker_Delta<double>();
67 
68  this->t_S(i, j) = this->mu * (t_kd(i, j) - t_invC(i, j)) +
69  (this->lambda * logJ) * t_invC(i, j);
70 
72  }
73 
75  const NonlinearElasticElement::BlockData block_data,
76  boost::shared_ptr<const NumeredEntFiniteElement> fe_ptr) {
78 
79  this->lambda = LAMBDA(block_data.E, block_data.PoissonRatio);
80  this->mu = MU(block_data.E, block_data.PoissonRatio);
83 
84  this->t_P(i, j) = this->t_F(i, k) * this->t_S(k, j);
85 
87  }
88 
89  /** \brief calculate elastic energy density
90  *
91 
92  For details look to: <br>
93  NONLINEAR CONTINUUM MECHANICS FOR FINITE ELEMENT ANALYSIS, Javier Bonet,
94  Richard D. Wood
95 
96  */
99  this->eNergy = this->t_C(i, i);
100  this->eNergy = 0.5 * this->mu * (this->eNergy - 3);
101  logJ = log(sqrt(this->J * this->J));
102  this->eNergy += -this->mu * logJ + 0.5 * this->lambda * pow(logJ, 2);
104  }
105 
107  const NonlinearElasticElement::BlockData block_data,
108  boost::shared_ptr<const NumeredEntFiniteElement> fe_ptr) {
110 
111  this->lambda = LAMBDA(block_data.E, block_data.PoissonRatio);
112  this->mu = MU(block_data.E, block_data.PoissonRatio);
114  this->J = determinantTensor3by3(this->F);
116 
118  }
119 };
120 
121 #endif
Kronecker Delta class.
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:460
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
#define CHKERR
Inline error check.
Definition: definitions.h:548
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:453
#define MU(E, NU)
Definition: fem_tools.h:33
#define LAMBDA(E, NU)
Definition: fem_tools.h:32
constexpr auto t_kd
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:67
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:1172
static auto determinantTensor3by3(T &t)
Calculate the determinant of a 3x3 matrix or a tensor of rank 2.
Definition: Templates.hpp:1161
NeoHookan equation.
Definition: NeoHookean.hpp:30
MoFEMErrorCode NeoHooke_PiolaKirchhoffII()
calculate second Piola Kirchhoff
Definition: NeoHookean.hpp:58
MoFEMErrorCode NeoHookean_ElasticEnergy()
calculate elastic energy density
Definition: NeoHookean.hpp:97
MoFEMErrorCode calculateElasticEnergy(const NonlinearElasticElement::BlockData block_data, boost::shared_ptr< const NumeredEntFiniteElement > fe_ptr)
Calculate elastic energy density.
Definition: NeoHookean.hpp:106
FTensor::Index< 'i', 3 > i
Definition: NeoHookean.hpp:44
MatrixBoundedArray< TYPE, 9 > invC
Definition: NeoHookean.hpp:41
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:74
FTensor::Index< 'j', 3 > j
Definition: NeoHookean.hpp:45
FTensor::Index< 'k', 3 > k
Definition: NeoHookean.hpp:46
FTensor::Tensor2< FTensor::PackPtr< TYPE *, 0 >, 3, 3 > t_invC
Definition: NeoHookean.hpp:42
data for calculation heat conductivity and heat capacity elements
Implementation of elastic (non-linear) St. Kirchhoff equation.
FTensor::Tensor2< FTensor::PackPtr< TYPE *, 0 >, 3, 3 > t_C
FTensor::Tensor2< FTensor::PackPtr< TYPE *, 0 >, 3, 3 > t_F
FTensor::Tensor2< FTensor::PackPtr< TYPE *, 0 >, 3, 3 > t_P
FTensor::Tensor2< FTensor::PackPtr< TYPE *, 0 >, 3, 3 > t_S
static auto resizeAndSet(MatrixBoundedArray< TYPE, 9 > &m)
structure grouping operators and data used for calculation of nonlinear elastic element
@ TYPE
Definition: inflate.h:32