v0.14.0
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
OpCalculatePiolaIncompressibleNH< DIM_0, DIM_1 > Struct Template Reference
Inheritance diagram for OpCalculatePiolaIncompressibleNH< DIM_0, DIM_1 >:
[legend]
Collaboration diagram for OpCalculatePiolaIncompressibleNH< DIM_0, DIM_1 >:
[legend]

Public Member Functions

 OpCalculatePiolaIncompressibleNH (double shear_modulus, double bulk_modulus, double m_u, double lambda_lamme, boost::shared_ptr< MatrixDouble > first_piola_ptr, boost::shared_ptr< MatrixDouble > def_grad_ptr, boost::shared_ptr< MatrixDouble > inv_def_grad_ptr, boost::shared_ptr< VectorDouble > det)
 
MoFEMErrorCode doWork (int side, EntityType type, DataForcesAndSourcesCore::EntData &data)
 

Private Attributes

double shearModulus
 
double bulkModulus
 
double mU
 
double lammeLambda
 
boost::shared_ptr< MatrixDouble > firstPiolaPtr
 
boost::shared_ptr< MatrixDouble > defGradPtr
 
boost::shared_ptr< MatrixDouble > invDefGradPtr
 
boost::shared_ptr< VectorDouble > dEt
 

Detailed Description

template<int DIM_0, int DIM_1>
struct OpCalculatePiolaIncompressibleNH< DIM_0, DIM_1 >
Examples
dynamic_first_order_con_law.cpp.

Definition at line 267 of file dynamic_first_order_con_law.cpp.

Constructor & Destructor Documentation

◆ OpCalculatePiolaIncompressibleNH()

template<int DIM_0, int DIM_1>
OpCalculatePiolaIncompressibleNH< DIM_0, DIM_1 >::OpCalculatePiolaIncompressibleNH ( double  shear_modulus,
double  bulk_modulus,
double  m_u,
double  lambda_lamme,
boost::shared_ptr< MatrixDouble >  first_piola_ptr,
boost::shared_ptr< MatrixDouble >  def_grad_ptr,
boost::shared_ptr< MatrixDouble >  inv_def_grad_ptr,
boost::shared_ptr< VectorDouble >  det 
)
inline

Definition at line 269 of file dynamic_first_order_con_law.cpp.

275 : ForcesAndSourcesCore::UserDataOperator(NOSPACE, OPLAST),
276 shearModulus(shear_modulus), bulkModulus(bulk_modulus), mU(m_u),
277 lammeLambda(lambda_lamme), firstPiolaPtr(first_piola_ptr),
278 defGradPtr(def_grad_ptr), invDefGradPtr(inv_def_grad_ptr), dEt(det) {}
@ NOSPACE
Definition: definitions.h:83
boost::shared_ptr< VectorDouble > dEt
boost::shared_ptr< MatrixDouble > invDefGradPtr
boost::shared_ptr< MatrixDouble > defGradPtr
boost::shared_ptr< MatrixDouble > firstPiolaPtr

Member Function Documentation

◆ doWork()

template<int DIM_0, int DIM_1>
MoFEMErrorCode OpCalculatePiolaIncompressibleNH< DIM_0, DIM_1 >::doWork ( int  side,
EntityType  type,
DataForcesAndSourcesCore::EntData &  data 
)
inline
Examples
dynamic_first_order_con_law.cpp.

Definition at line 280 of file dynamic_first_order_con_law.cpp.

281 {
283 // Define Indicies
288
289 // Define Kronecker Delta
290 constexpr auto t_kd = FTensor::Kronecker_Delta<double>();
291
292 // Number of Gauss points
293 const size_t nb_gauss_pts = getGaussPts().size2();
294
295 // Resize Piola
296 firstPiolaPtr->resize(DIM_0 * DIM_1, nb_gauss_pts, false); // ignatios check
297 firstPiolaPtr->clear();
298
299 // Extract matrix from data matrix
300 auto t_P = getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(*firstPiolaPtr);
301 auto t_F = getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(*defGradPtr);
302 auto t_inv_F = getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(*invDefGradPtr);
303 auto t_det = getFTensor0FromVec<1>(*dEt);
304 const double two_o_three = 2. / 3.;
305 const double one_o_three = 1. / 3.;
306 const double bulk_mod = bulkModulus;
307 const double shear_mod = shearModulus;
308 for (auto gg = 0; gg != nb_gauss_pts; ++gg) {
309
310 // Nearly incompressible NH
311 // volumetric part
312 t_P(i, j) = bulk_mod * (t_det - 1.) * t_det * t_inv_F(j, i);
313 // deviatoric part
314 t_P(i, j) +=
315 shear_mod * pow(t_det, two_o_three) *
316 (t_F(i, j) - one_o_three * (t_F(l, k) * t_F(l, k)) * t_inv_F(j, i));
317
318 ++t_F;
319 ++t_P;
320 ++t_inv_F;
321 ++t_det;
322 }
323
325 }
Kronecker Delta class.
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
constexpr auto t_kd
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'l', 3 > l
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k

Member Data Documentation

◆ bulkModulus

template<int DIM_0, int DIM_1>
double OpCalculatePiolaIncompressibleNH< DIM_0, DIM_1 >::bulkModulus
private

◆ defGradPtr

template<int DIM_0, int DIM_1>
boost::shared_ptr<MatrixDouble> OpCalculatePiolaIncompressibleNH< DIM_0, DIM_1 >::defGradPtr
private

◆ dEt

template<int DIM_0, int DIM_1>
boost::shared_ptr<VectorDouble> OpCalculatePiolaIncompressibleNH< DIM_0, DIM_1 >::dEt
private

◆ firstPiolaPtr

template<int DIM_0, int DIM_1>
boost::shared_ptr<MatrixDouble> OpCalculatePiolaIncompressibleNH< DIM_0, DIM_1 >::firstPiolaPtr
private

◆ invDefGradPtr

template<int DIM_0, int DIM_1>
boost::shared_ptr<MatrixDouble> OpCalculatePiolaIncompressibleNH< DIM_0, DIM_1 >::invDefGradPtr
private

◆ lammeLambda

template<int DIM_0, int DIM_1>
double OpCalculatePiolaIncompressibleNH< DIM_0, DIM_1 >::lammeLambda
private

◆ mU

template<int DIM_0, int DIM_1>
double OpCalculatePiolaIncompressibleNH< DIM_0, DIM_1 >::mU
private

◆ shearModulus

template<int DIM_0, int DIM_1>
double OpCalculatePiolaIncompressibleNH< DIM_0, DIM_1 >::shearModulus
private

The documentation for this struct was generated from the following file: