v0.14.0
Public Member Functions | Public Attributes | List of all members
Hooke< TYPE > Struct Template Reference

Hook equation. More...

#include <users_modules/basic_finite_elements/nonlinear_elastic_materials/src/Hooke.hpp>

Inheritance diagram for Hooke< TYPE >:
[legend]
Collaboration diagram for Hooke< TYPE >:
[legend]

Public Member Functions

 Hooke ()
 
virtual MoFEMErrorCode calculateP_PiolaKirchhoffI (const NonlinearElasticElement::BlockData block_data, boost::shared_ptr< const NumeredEntFiniteElement > fe_ptr)
 Hooke equation. More...
 
virtual MoFEMErrorCode calculateElasticEnergy (const NonlinearElasticElement::BlockData block_data, boost::shared_ptr< const NumeredEntFiniteElement > fe_ptr)
 calculate density of strain energy More...
 
- Public Member Functions inherited from NonlinearElasticElement::FunctionsToCalculatePiolaKirchhoffI< TYPE >
 FunctionsToCalculatePiolaKirchhoffI ()
 
virtual ~FunctionsToCalculatePiolaKirchhoffI ()=default
 
MoFEMErrorCode calculateC_CauchyDeformationTensor ()
 
MoFEMErrorCode calculateE_GreenStrain ()
 
MoFEMErrorCode calculateS_PiolaKirchhoffII ()
 
virtual MoFEMErrorCode calculateCauchyStress (const BlockData block_data, boost::shared_ptr< const NumeredEntFiniteElement > fe_ptr)
 Function overload to implement user material. More...
 
virtual MoFEMErrorCode setUserActiveVariables (int &nb_active_variables)
 add additional active variables More...
 
virtual MoFEMErrorCode setUserActiveVariables (VectorDouble &activeVariables)
 Add additional independent variables More complex physical models depend on gradient of defamation and some additional variables. For example can depend on temperature. This function adds additional independent variables to the model. More...
 
virtual MoFEMErrorCode calculatesIGma_EshelbyStress (const BlockData block_data, boost::shared_ptr< const NumeredEntFiniteElement > fe_ptr)
 Calculate Eshelby stress. More...
 
virtual MoFEMErrorCode getDataOnPostProcessor (std::map< std::string, std::vector< VectorDouble >> &field_map, std::map< std::string, std::vector< MatrixDouble >> &grad_map)
 Do operations when pre-process. More...
 

Public Attributes

ublas::matrix< TYPE > ePs
 
TYPE tR
 
- Public Attributes inherited from NonlinearElasticElement::FunctionsToCalculatePiolaKirchhoffI< TYPE >
FTensor::Index< 'i', 3 > i
 
FTensor::Index< 'j', 3 > j
 
FTensor::Index< 'k', 3 > k
 
double lambda
 
double mu
 
MatrixBoundedArray< TYPE, 9 > F
 
MatrixBoundedArray< TYPE, 9 > C
 
MatrixBoundedArray< TYPE, 9 > E
 
MatrixBoundedArray< TYPE, 9 > S
 
MatrixBoundedArray< TYPE, 9 > invF
 
MatrixBoundedArray< TYPE, 9 > P
 
MatrixBoundedArray< TYPE, 9 > sIGma
 
MatrixBoundedArray< TYPE, 9 > h
 
MatrixBoundedArray< TYPE, 9 > H
 
MatrixBoundedArray< TYPE, 9 > invH
 
MatrixBoundedArray< TYPE, 9 > sigmaCauchy
 
FTensor::Tensor2< FTensor::PackPtr< TYPE *, 0 >, 3, 3 > t_F
 
FTensor::Tensor2< FTensor::PackPtr< TYPE *, 0 >, 3, 3 > t_C
 
FTensor::Tensor2< FTensor::PackPtr< TYPE *, 0 >, 3, 3 > t_E
 
FTensor::Tensor2< FTensor::PackPtr< TYPE *, 0 >, 3, 3 > t_S
 
FTensor::Tensor2< FTensor::PackPtr< TYPE *, 0 >, 3, 3 > t_invF
 
FTensor::Tensor2< FTensor::PackPtr< TYPE *, 0 >, 3, 3 > t_P
 
FTensor::Tensor2< FTensor::PackPtr< TYPE *, 0 >, 3, 3 > t_sIGma
 
FTensor::Tensor2< FTensor::PackPtr< TYPE *, 0 >, 3, 3 > t_h
 
FTensor::Tensor2< FTensor::PackPtr< TYPE *, 0 >, 3, 3 > t_H
 
FTensor::Tensor2< FTensor::PackPtr< TYPE *, 0 >, 3, 3 > t_invH
 
FTensor::Tensor2< FTensor::PackPtr< TYPE *, 0 >, 3, 3 > t_sigmaCauchy
 
TYPE J
 
TYPE eNergy
 
TYPE detH
 
TYPE detF
 
int gG
 Gauss point number. More...
 
CommonDatacommonDataPtr
 
MoFEM::VolumeElementForcesAndSourcesCore::UserDataOperatoropPtr
 pointer to finite element tetrahedral operator More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from NonlinearElasticElement::FunctionsToCalculatePiolaKirchhoffI< TYPE >
static auto resizeAndSet (MatrixBoundedArray< TYPE, 9 > &m)
 

Detailed Description

template<typename TYPE>
struct Hooke< TYPE >

Hook equation.

Examples
cell_forces.cpp, and simple_contact.cpp.

Definition at line 19 of file Hooke.hpp.

Constructor & Destructor Documentation

◆ Hooke()

template<typename TYPE >
Hooke< TYPE >::Hooke ( )
inline

Member Function Documentation

◆ calculateElasticEnergy()

template<typename TYPE >
virtual MoFEMErrorCode Hooke< TYPE >::calculateElasticEnergy ( const NonlinearElasticElement::BlockData  block_data,
boost::shared_ptr< const NumeredEntFiniteElement >  fe_ptr 
)
inlinevirtual

calculate density of strain energy

\(\Psi = \frac{1}{2}\lambda(\textrm{tr}[\varepsilon])^2+\mu\varepsilon:\varepsilon\)

Reimplemented from NonlinearElasticElement::FunctionsToCalculatePiolaKirchhoffI< TYPE >.

Definition at line 65 of file Hooke.hpp.

67  {
69  this->lambda = LAMBDA(block_data.E, block_data.PoissonRatio);
70  this->mu = MU(block_data.E, block_data.PoissonRatio);
71  ePs.resize(3, 3);
72  noalias(ePs) = this->F;
73  for (int dd = 0; dd < 3; dd++) {
74  ePs(dd, dd) -= 1;
75  }
76  ePs += trans(ePs);
77  ePs *= 0.5;
78  this->eNergy = 0;
79  tR = 0;
80  for (int dd = 0; dd < 3; dd++) {
81  tR += ePs(dd, dd);
82  for (int jj = 0; jj < 3; jj++) {
83  this->eNergy += this->mu * ePs(dd, jj) * ePs(dd, jj);
84  }
85  }
86  this->eNergy += 0.5 * this->lambda * tR * tR;
88  }

◆ calculateP_PiolaKirchhoffI()

template<typename TYPE >
virtual MoFEMErrorCode Hooke< TYPE >::calculateP_PiolaKirchhoffI ( const NonlinearElasticElement::BlockData  block_data,
boost::shared_ptr< const NumeredEntFiniteElement >  fe_ptr 
)
inlinevirtual

Hooke equation.

\(\sigma = \lambda\textrm{tr}[\varepsilon]+2\mu\varepsilon\)

Reimplemented from NonlinearElasticElement::FunctionsToCalculatePiolaKirchhoffI< TYPE >.

Definition at line 34 of file Hooke.hpp.

36  {
38  this->lambda = LAMBDA(block_data.E, block_data.PoissonRatio);
39  this->mu = MU(block_data.E, block_data.PoissonRatio);
40  ePs.resize(3, 3, false);
41  noalias(ePs) = this->F;
42  for (int dd = 0; dd < 3; dd++) {
43  ePs(dd, dd) -= 1;
44  }
45  ePs += trans(ePs);
46  ePs *= 0.5;
47  this->P.resize(3, 3, false);
48  noalias(this->P) = 2 * this->mu * ePs;
49  tR = 0;
50  for (int dd = 0; dd < 3; dd++) {
51  tR += ePs(dd, dd);
52  }
53  for (int dd = 0; dd < 3; dd++) {
54  this->P(dd, dd) += this->lambda * tR;
55  }
57  }

Member Data Documentation

◆ ePs

template<typename TYPE >
ublas::matrix<TYPE> Hooke< TYPE >::ePs

Definition at line 26 of file Hooke.hpp.

◆ tR

template<typename TYPE >
TYPE Hooke< TYPE >::tR

Definition at line 27 of file Hooke.hpp.


The documentation for this struct was generated from the following file:
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:460
NonlinearElasticElement::FunctionsToCalculatePiolaKirchhoffI::eNergy
TYPE eNergy
Definition: NonLinearElasticElement.hpp:152
NonlinearElasticElement::FunctionsToCalculatePiolaKirchhoffI
Implementation of elastic (non-linear) St. Kirchhoff equation.
Definition: NonLinearElasticElement.hpp:79
Hooke::tR
TYPE tR
Definition: Hooke.hpp:27
LAMBDA
#define LAMBDA(E, NU)
Definition: fem_tools.h:22
NonlinearElasticElement::FunctionsToCalculatePiolaKirchhoffI::F
MatrixBoundedArray< TYPE, 9 > F
Definition: NonLinearElasticElement.hpp:147
NonlinearElasticElement::BlockData::E
double E
Definition: HookeElement.hpp:34
NonlinearElasticElement::BlockData::PoissonRatio
double PoissonRatio
Definition: HookeElement.hpp:35
FTensor::dd
const Tensor2_symmetric_Expr< const ddTensor0< T, Dim, i, j >, typename promote< T, double >::V, Dim, i, j > dd(const Tensor0< T * > &a, const Index< i, Dim > index1, const Index< j, Dim > index2, const Tensor1< int, Dim > &d_ijk, const Tensor1< double, Dim > &d_xyz)
Definition: ddTensor0.hpp:33
NonlinearElasticElement::FunctionsToCalculatePiolaKirchhoffI::mu
double mu
Definition: NonLinearElasticElement.hpp:146
Hooke::ePs
ublas::matrix< TYPE > ePs
Definition: Hooke.hpp:26
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
NonlinearElasticElement::FunctionsToCalculatePiolaKirchhoffI::P
MatrixBoundedArray< TYPE, 9 > P
Definition: NonLinearElasticElement.hpp:147
MU
#define MU(E, NU)
Definition: fem_tools.h:23