v0.12.1
NeoHookean.hpp
/** \file NeoHookean.hpp
* \ingroup nonlinear_elastic_elem
* \brief Implementation of Neo-Hookean elastic material
* \example NeoHookean.hpp
*/
/* This file is part of MoFEM.
* MoFEM is free software: you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* MoFEM is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
* License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with MoFEM. If not, see <http://www.gnu.org/licenses/>. */
#ifndef __NEOHOOKEAN_HPP__
#define __NEOHOOKEAN_HPP__
/** \brief NeoHookan equation
* \ingroup nonlinear_elastic_elem
*/
template <typename TYPE>
struct NeoHookean
TYPE> {
MatrixBoundedArray<TYPE, 9> invC;
/** \brief calculate second Piola Kirchhoff
*
* \f$\mathbf{S} = \mu(\mathbf{I}-\mathbf{C}^{-1})+\lambda(\ln{J})\mathbf{C}^{-1}\f$
For details look to: <br>
NONLINEAR CONTINUUM MECHANICS FOR FINITE ELEMENT ANALYSIS, Javier Bonet,
Richard D. Wood
*/
CHKERR invertTensor3by3(this->C, detC, invC);
this->J = determinantTensor3by3(this->F);
logJ = log(sqrt(this->J * this->J));
this->t_S(i, j) = this->mu * (t_kd(i, j) - t_invC(i, j)) +
(this->lambda * logJ) * t_invC(i, j);
}
boost::shared_ptr<const NumeredEntFiniteElement> fe_ptr) {
this->lambda = LAMBDA(block_data.E, block_data.PoissonRatio);
this->mu = MU(block_data.E, block_data.PoissonRatio);
this->t_P(i, j) = this->t_F(i, k) * this->t_S(k, j);
}
/** \brief calculate elastic energy density
*
For details look to: <br>
NONLINEAR CONTINUUM MECHANICS FOR FINITE ELEMENT ANALYSIS, Javier Bonet,
Richard D. Wood
*/
this->eNergy = this->t_C(i, i);
this->eNergy = 0.5 * this->mu * (this->eNergy - 3);
logJ = log(sqrt(this->J * this->J));
this->eNergy += -this->mu * logJ + 0.5 * this->lambda * pow(logJ, 2);
}
boost::shared_ptr<const NumeredEntFiniteElement> fe_ptr) {
this->lambda = LAMBDA(block_data.E, block_data.PoissonRatio);
this->mu = MU(block_data.E, block_data.PoissonRatio);
this->J = determinantTensor3by3(this->F);
}
};
#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
@ TYPE
Definition: inflate.h:32
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:1016
static auto determinantTensor3by3(T &t)
Calculate the determinant of a 3x3 matrix or a tensor of rank 2.
Definition: Templates.hpp:1005
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
NonlinearElasticElement::FunctionsToCalculatePiolaKirchhoffI< TYPE > PiolaKirchoffI
Definition: NeoHookean.hpp:33
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)