v0.16.3
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes | List of all members
OpFaceSideMaterialForce Struct Reference

#include "users_modules/eshelbian_plasticity/src/EshelbianOperators.hpp"

Inheritance diagram for OpFaceSideMaterialForce:
[legend]
Collaboration diagram for OpFaceSideMaterialForce:
[legend]

Public Types

using OP = VolumeElementForcesAndSourcesCoreOnSide::UserDataOperator
 

Public Member Functions

 OpFaceSideMaterialForce (boost::shared_ptr< DataAtIntegrationPts > data_ptr)
 
MoFEMErrorCode doWork (int side, EntityType type, EntData &data)
 Caluclate face material force and normal pressure at gauss points.
 

Private Attributes

boost::shared_ptr< DataAtIntegrationPts > dataAtPts
 data at integration pts
 

Detailed Description

Definition at line 1004 of file EshelbianOperators.hpp.

Member Typedef Documentation

◆ OP

using OpFaceSideMaterialForce::OP = VolumeElementForcesAndSourcesCoreOnSide::UserDataOperator

Definition at line 1008 of file EshelbianOperators.hpp.

Constructor & Destructor Documentation

◆ OpFaceSideMaterialForce()

OpFaceSideMaterialForce::OpFaceSideMaterialForce ( boost::shared_ptr< DataAtIntegrationPts >  data_ptr)
inline

Definition at line 1010 of file EshelbianOperators.hpp.

1011 : OP(NOSPACE, OPSPACE), dataAtPts(data_ptr) {}
@ NOSPACE
Definition definitions.h:83
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts
VolumeElementForcesAndSourcesCoreOnSide::UserDataOperator OP

Member Function Documentation

◆ doWork()

MoFEMErrorCode OpFaceSideMaterialForce::doWork ( int  side,
EntityType  type,
EntData &  data 
)

Caluclate face material force and normal pressure at gauss points.

Parameters
side
type
data
Returns
MoFEMErrorCode

Reconstruct the full gradient \(U=\nabla u\) on a surface from the symmetric part and the surface gradient.

Inputs:

  • t_strain : \(\varepsilon=\tfrac12(U+U^\top)\) (symmetric strain on S),
  • t_grad_u_gamma : \(u^\Gamma = U P\) (right-projected/surface gradient), with \(P=I-\mathbf N\otimes\mathbf N\),
  • t_normal : (possibly non‑unit) surface normal.

Procedure (pointwise on S): 1) Normalize the normal \(\mathbf n=\mathbf N/\|\mathbf N\|\). 2) Form the residual \(R=\varepsilon-\operatorname{sym}(u^\Gamma)\), where \(\operatorname{sym}(A)=\tfrac12(A+A^\top)\). 3) Recover the normal directional derivative (a vector) \(\mathbf v=\partial_{\mathbf n}u=2R\mathbf n-(\mathbf n^\top R\,\mathbf n)\,\mathbf n\). 4) Assemble the full gradient \(U = u^\Gamma + \mathbf v\otimes \mathbf n\).

Properties (sanity checks):

  • \(\tfrac12(U+U^\top)=\varepsilon\) (matches the given symmetric part),
  • \(U P = u^\Gamma\) (tangential/right-projected columns unchanged),
  • Only the normal column is updated via \(\mathbf v\otimes\mathbf n\).

Mapping to variables in this snippet:

  • \(\varepsilon \leftrightarrow\) t_strain,
  • \(u^\Gamma \leftrightarrow\) t_grad_u_gamma,
  • \(\mathbf N \leftrightarrow\) t_normal (normalized into t_N),
  • \(R \leftrightarrow\) t_R,
  • \(U \leftrightarrow\) t_grad_u.
Precondition
t_normal is nonzero; t_strain is symmetric.
Note
All indices use Einstein summation; computation is local to the surface point.
Examples
/home/lk58p/mofem_install/vanilla_dev_release/mofem-cephas/mofem/users_modules/eshelbian_plasticity/src/impl/EshelbianOperators.cpp.

Definition at line 4413 of file EshelbianOperators.cpp.

4414 {
4416
4429
4430 const auto nb_gauss_pts = getGaussPts().size2();
4432 dataAtPts->faceMaterialForceAtPts, nb_gauss_pts);
4433 dataAtPts->normalPressureAtPts.resize(nb_gauss_pts, false);
4434 if (getNinTheLoop() == 0) {
4435 dataAtPts->faceMaterialForceAtPts.clear();
4436 dataAtPts->normalPressureAtPts.clear();
4437 }
4438 auto loop_size = getLoopSize();
4439 if (loop_size == 1) {
4440 auto numebered_fe_ptr = getSidePtrFE()->numeredEntFiniteElementPtr;
4441 auto pstatus = numebered_fe_ptr->getPStatus();
4442 if (pstatus & (PSTATUS_SHARED | PSTATUS_MULTISHARED)) {
4443 loop_size = 2;
4444 }
4445 }
4446
4448
4449 auto t_normal = getFTensor1NormalsAtGaussPts();
4450 auto t_T = dataAtPts->getFTensorFaceMaterialForce(
4451 nb_gauss_pts); //< face material force
4452 auto t_p =
4453 getFTensor0FromVec(dataAtPts->normalPressureAtPts); //< normal pressure
4454 auto t_P = dataAtPts->getFTensorApproxP(nb_gauss_pts);
4455 auto t_u_gamma = dataAtPts->getFTensorSmallHybridDisp(nb_gauss_pts);
4456 auto t_grad_u_gamma = dataAtPts->getFTensorGradHybridDisp(nb_gauss_pts);
4457 auto t_strain = dataAtPts->getFTensorLogStretch(nb_gauss_pts);
4458 auto t_omega = dataAtPts->getFTensorRotAxis(nb_gauss_pts);
4459
4465
4466 auto next = [&]() {
4467 ++t_normal;
4468 ++t_P;
4469 // ++t_grad_P;
4470 ++t_omega;
4471 ++t_u_gamma;
4472 ++t_grad_u_gamma;
4473 ++t_strain;
4474 ++t_T;
4475 ++t_p;
4476 };
4477
4479 case GRIFFITH_FORCE:
4480 for (auto gg = 0; gg != getGaussPts().size2(); ++gg) {
4481 t_N(I) = t_normal(I);
4482 t_N.normalize();
4483
4484 t_A(i, j) = levi_civita(i, j, k) * t_omega(k);
4485 t_R(i, k) = t_kd(i, k) + t_A(i, k);
4486 t_grad_u(i, j) = t_R(i, j) + t_strain(i, j);
4487
4488 t_T(I) += t_N(J) * (t_grad_u(i, I) * t_P(i, J)) / loop_size;
4489 // note that works only for Hooke material, for nonlinear material we need
4490 // strain energy expressed by stress
4491 t_T(I) -= t_N(I) * ((t_strain(i, K) * t_P(i, K)) / 2.) / loop_size;
4492
4493 t_p += t_N(I) *
4494 (t_N(J) * ((t_kd(i, I) + t_grad_u_gamma(i, I)) * t_P(i, J))) /
4495 loop_size;
4496
4497 next();
4498 }
4499 break;
4500 case GRIFFITH_SKELETON:
4501 for (auto gg = 0; gg != getGaussPts().size2(); ++gg) {
4502
4503 // Normalize the normal
4504 t_N(I) = t_normal(I);
4505 t_N.normalize();
4506
4507 // R = ε − sym(u^Γ)
4508 t_R(i, j) =
4509 t_strain(i, j) - 0.5 * (t_grad_u_gamma(i, j) + t_grad_u_gamma(j, i));
4510
4511 // U = u^Γ + [2 R N − (Nᵀ R N) N] ⊗ N
4512 t_grad_u(i, J) =
4513 t_grad_u_gamma(i, J) +
4514 (2 * t_R(i, K) * t_N(K) - (t_R(k, L) * t_N(k) * t_N(L)) * t_N(i)) *
4515 t_N(J);
4516
4517 t_T(I) += t_N(J) * (t_grad_u(i, I) * t_P(i, J)) / loop_size;
4518 // note that works only for Hooke material, for nonlinear material we need
4519 // strain energy expressed by stress
4520 t_T(I) -= t_N(I) * ((t_strain(i, K) * t_P(i, K)) / 2.) / loop_size;
4521
4522 // calculate nominal face pressure
4523 t_p += t_N(I) *
4524 (t_N(J) * ((t_kd(i, I) + t_grad_u_gamma(i, I)) * t_P(i, J))) /
4525 loop_size;
4526
4527 next();
4528 }
4529 break;
4530
4531 default:
4532 SETERRQ(PETSC_COMM_WORLD, MOFEM_NOT_IMPLEMENTED,
4533 "Grffith energy release "
4534 "selector not implemented");
4535 };
4536
4537#ifndef NDEBUG
4538 auto side_fe_ptr = getSidePtrFE();
4539 auto side_fe_mi_ptr = side_fe_ptr->numeredEntFiniteElementPtr;
4540 auto pstatus = side_fe_mi_ptr->getPStatus();
4541 if (pstatus) {
4542 auto owner = side_fe_mi_ptr->getOwnerProc();
4543 MOFEM_LOG("SELF", Sev::noisy)
4544 << "OpFaceSideMaterialForce: owner proc is not 0, owner proc: " << owner
4545 << " " << getPtrFE()->mField.get_comm_rank() << " n in the loop "
4546 << getNinTheLoop() << " loop size " << getLoopSize();
4547 }
4548#endif // NDEBUG
4549
4551}
PetscInt size
#define FTENSOR_INDEX(DIM, I)
constexpr int SPACE_DIM
Kronecker Delta class symmetric.
Tensor1< T, Tensor_Dim > normalize()
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_NOT_IMPLEMENTED
Definition definitions.h:32
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
constexpr auto t_kd
#define MOFEM_LOG(channel, severity)
Log.
FTensor::Index< 'i', SPACE_DIM > i
const double n
refractive index of diffusive medium
FTensor::Index< 'J', DIM1 > J
Definition level_set.cpp:30
FTensor::Index< 'l', 3 > l
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
constexpr std::enable_if<(Dim0<=2 &&Dim1<=2), Tensor2_Expr< Levi_Civita< T >, T, Dim0, Dim1, i, j > >::type levi_civita(const Index< i, Dim0 > &, const Index< j, Dim1 > &)
levi_civita functions to make for easy adhoc use
DataLayoutTraits< DataLayout::GaussByCoeffs > DL
Definition MatHuHu.hpp:33
decltype(GetFTensor1FromMatImpl< Tensor_Dim, S, DL, M >::get(std::declval< M & >(), 0, 0)) GetFTensor1FromMatType
static auto getFTensor0FromVec(V &data)
Get tensor rank 0 (scalar) form data vector.
constexpr IntegrationType I
FTensor::Index< 'm', 3 > m
const int N
Definition speed_test.cpp:3
static enum EnergyReleaseSelector energyReleaseSelector

Member Data Documentation

◆ dataAtPts

boost::shared_ptr<DataAtIntegrationPts> OpFaceSideMaterialForce::dataAtPts
private

data at integration pts

Definition at line 1017 of file EshelbianOperators.hpp.


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