Caluclate face material force and normal pressure at gauss points.
Reconstruct the full gradient \(U=\nabla u\) on a surface from the symmetric part and the surface gradient.
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\).
3661 {
3663
3676
3677 const auto nb_gauss_pts = getGaussPts().size2();
3679 dataAtPts->faceMaterialForceAtPts, nb_gauss_pts);
3680 dataAtPts->normalPressureAtPts.resize(nb_gauss_pts,
false);
3681 if (getNinTheLoop() == 0) {
3682 dataAtPts->faceMaterialForceAtPts.clear();
3684 }
3685 auto loop_size = getLoopSize();
3686 if (loop_size == 1) {
3687 auto numebered_fe_ptr = getSidePtrFE()->numeredEntFiniteElementPtr;
3688 auto pstatus = numebered_fe_ptr->getPStatus();
3689 if (pstatus & (PSTATUS_SHARED | PSTATUS_MULTISHARED)) {
3690 loop_size = 2;
3691 }
3692 }
3693
3695
3696 auto t_normal = getFTensor1NormalsAtGaussPts();
3697 auto t_T =
dataAtPts->getFTensorFaceMaterialForce(
3698 nb_gauss_pts);
3699 auto t_p =
3701 auto t_P =
dataAtPts->getFTensorApproxP(nb_gauss_pts);
3702 auto t_u_gamma =
dataAtPts->getFTensorSmallHybridDisp(nb_gauss_pts);
3703 auto t_grad_u_gamma =
dataAtPts->getFTensorGradHybridDisp(nb_gauss_pts);
3704 auto t_strain =
dataAtPts->getFTensorLogStretch(nb_gauss_pts);
3705 auto t_omega =
dataAtPts->getFTensorRotAxis(nb_gauss_pts);
3706
3712
3713 auto next = [&]() {
3714 ++t_normal;
3715 ++t_P;
3716
3717 ++t_omega;
3718 ++t_u_gamma;
3719 ++t_grad_u_gamma;
3720 ++t_strain;
3721 ++t_T;
3722 ++t_p;
3723 };
3724
3727 for (auto gg = 0; gg != getGaussPts().size2(); ++gg) {
3728 t_N(
I) = t_normal(
I);
3730
3733 t_grad_u(
i,
j) = t_R(
i,
j) + t_strain(
i,
j);
3734
3735 t_T(
I) += t_N(
J) * (t_grad_u(
i,
I) * t_P(
i,
J)) / loop_size;
3736
3737
3738 t_T(
I) -= t_N(
I) * ((t_strain(
i,
K) * t_P(
i,
K)) / 2.) / loop_size;
3739
3741 (t_N(
J) * ((
t_kd(
i,
I) + t_grad_u_gamma(
i,
I)) * t_P(
i,
J))) /
3742 loop_size;
3743
3744 next();
3745 }
3746 break;
3748 for (auto gg = 0; gg != getGaussPts().size2(); ++gg) {
3749
3750
3751 t_N(
I) = t_normal(
I);
3753
3754
3756 t_strain(
i,
j) - 0.5 * (t_grad_u_gamma(
i,
j) + t_grad_u_gamma(
j,
i));
3757
3758
3760 t_grad_u_gamma(
i,
J) +
3761 (2 * t_R(
i,
K) * t_N(
K) - (t_R(
k,
L) * t_N(
k) * t_N(
L)) * t_N(
i)) *
3763
3764 t_T(
I) += t_N(
J) * (t_grad_u(
i,
I) * t_P(
i,
J)) / loop_size;
3765
3766
3767 t_T(
I) -= t_N(
I) * ((t_strain(
i,
K) * t_P(
i,
K)) / 2.) / loop_size;
3768
3769
3771 (t_N(
J) * ((
t_kd(
i,
I) + t_grad_u_gamma(
i,
I)) * t_P(
i,
J))) /
3772 loop_size;
3773
3774 next();
3775 }
3776 break;
3777
3778 default:
3780 "Grffith energy release "
3781 "selector not implemented");
3782 };
3783
3784#ifndef NDEBUG
3785 auto side_fe_ptr = getSidePtrFE();
3786 auto side_fe_mi_ptr = side_fe_ptr->numeredEntFiniteElementPtr;
3787 auto pstatus = side_fe_mi_ptr->getPStatus();
3788 if (pstatus) {
3789 auto owner = side_fe_mi_ptr->getOwnerProc();
3791 << "OpFaceSideMaterialForce: owner proc is not 0, owner proc: " << owner
3792 << " " << getPtrFE()->mField.get_comm_rank() << " n in the loop "
3793 << getNinTheLoop() << " loop size " << getLoopSize();
3794 }
3795#endif
3796
3798}
#define FTENSOR_INDEX(DIM, I)
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 ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#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
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
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
static enum EnergyReleaseSelector energyReleaseSelector