84 boost::shared_ptr<CommonData> common_data_ptr);
93 boost::shared_ptr<CommonData> common_data_ptr,
94 boost::shared_ptr<MatrixDouble> mat_d_ptr);
104 boost::shared_ptr<CommonData> common_data_ptr);
105 MoFEMErrorCode
iNtegrate(EntitiesFieldData::EntData &data);
113 boost::shared_ptr<CommonData> common_data_ptr);
114 MoFEMErrorCode
iNtegrate(EntitiesFieldData::EntData &data);
120template <
bool LOGSTRAIN>
123 const std::string row_field_name,
const std::string col_field_name,
124 boost::shared_ptr<CommonData> common_data_ptr,
125 boost::shared_ptr<MatrixDouble> mat_D_ptr);
133template <
bool LOGSTRAIN>
136 const std::string col_field_name,
137 boost::shared_ptr<CommonData> common_data_ptr);
146 const std::string col_field_name,
147 boost::shared_ptr<CommonData> common_data_ptr);
156 const std::string col_field_name,
157 boost::shared_ptr<CommonData> common_data_ptr);
166 const std::string col_field_name,
167 boost::shared_ptr<CommonData> common_data_ptr);
174template <
bool LOGSTRAIN>
177 const std::string col_field_name,
178 boost::shared_ptr<CommonData> common_data_ptr);
187 const std::string col_field_name,
188 boost::shared_ptr<CommonData> common_data_ptr);
197 const std::string col_field_name,
198 boost::shared_ptr<CommonData> common_data_ptr);
207 moab::Interface &post_proc_mesh,
208 std::vector<EntityHandle> &map_gauss_pts,
209 boost::shared_ptr<CommonData> common_data_ptr);
221 Ddg<double, 3, 3> t_diff;
222 constexpr auto t_kd = Kronecker_Delta_symmetric<int>();
258template <
typename T1>
259inline auto deviator(Tensor2_symmetric<T1, 3> &t_stress) {
260 Tensor2_symmetric<double, 3> t_dev;
262 constexpr double third = boost::math::constants::third<double>();
263 const double trace = t_stress(
i,
i);
265 t_dev(
i,
j) = t_stress(
i,
j);
273 Ddg<double, 3, 3> t_diff_deviator;
274 t_diff_deviator(
I,
J,
K,
L) = 0;
275 for (
int ii = 0; ii != 3; ++ii)
276 for (
int jj = ii; jj != 3; ++jj)
277 for (
int kk = 0; kk != 3; ++kk)
278 for (
int ll = kk; ll != 3; ++ll)
279 t_diff_deviator(ii, jj, kk, ll) = t_diff_stress(ii, jj, kk, ll);
281 constexpr double third = boost::math::constants::third<double>();
283 t_diff_deviator(0, 0, 0, 0) = 1. -
third;
284 t_diff_deviator(0, 0, 1, 1) = -
third;
285 t_diff_deviator(0, 0, 2, 2) = -
third;
287 t_diff_deviator(1, 1, 0, 0) = -
third;
288 t_diff_deviator(1, 1, 1, 1) = 1. -
third;
289 t_diff_deviator(1, 1, 2, 2) = -
third;
291 t_diff_deviator(2, 2, 0, 0) = -
third;
292 t_diff_deviator(2, 2, 1, 1) = -
third;
293 t_diff_deviator(2, 2, 2, 2) = 1. -
third;
295 return t_diff_deviator;
300 Tensor2_symmetric<T, 3> &t_plastic_strain) {
302 Tensor2_symmetric<double, 3> stress_tmp;
305 t_stress(
i,
j) - 1.5 * (*cache).C1_k * t_plastic_strain(
i,
j);
312 return (*cache).H * tau + (*cache).Q_inf * (1. - exp(-(*cache).b_iso * tau)) +
318 (*cache).Q_inf * (*cache).b_iso * exp(-(*cache).b_iso * tau);
345 return std::sqrt(1.5 * t_stress_deviator(
I,
J) * t_stress_deviator(
I,
J)) +
346 std::numeric_limits<double>::epsilon();
350 Tensor2_symmetric<double, 3> &&t_dev_stress,
351 Ddg<double, 3, 3> &t_diff_deviator) {
352 Tensor2_symmetric<double, 3> t_diff_f;
354 ((1.5) * (t_dev_stress(
I,
J)) * t_diff_deviator(
I,
J,
k,
l)) / f;
364 Tensor2_symmetric<T, 3> &t_flow,
365 Ddg<double, 3, 3> &t_diff_deviator) {
366 Ddg<double, 3, 3> t_diff_flow;
367 t_diff_flow(
i,
j,
k,
l) =
368 ((1.5) * (t_diff_deviator(
M,
N,
i,
j) * t_diff_deviator(
M,
N,
k,
l) -
369 2. / 3. * t_flow(
i,
j) * t_flow(
k,
l))) /
378 Ddg<double, 3, 3> &&t_diff_plastic_flow_dstress) {
379 Ddg<double, 3, 3> t_diff_flow;
380 t_diff_flow(
i,
j,
k,
l) =
381 t_diff_plastic_flow_dstress(
i,
j,
m,
n) * t_D(
m,
n,
k,
l);
388 Ddg<T, 3, 3> &t_D, Ddg<double, 3, 3> &&t_diff_plastic_flow_dstress) {
389 Ddg<double, 3, 3> t_diff_flow_kin_hard;
390 t_diff_flow_kin_hard(
i,
j,
k,
l) =
391 t_diff_plastic_flow_dstress(
i,
j,
m,
n) * t_D(
m,
n,
k,
l) +
392 1.5 * (*cache).C1_k * t_diff_plastic_flow_dstress(
i,
j,
k,
l);
394 return t_diff_flow_kin_hard;
408inline double w(
long double tau_dot,
long double f,
long double hardening) {
409 auto &cn = (*cache).cn_pl;
410 auto &
sigmaY = (*cache).sigmaY;
416 auto &cn = (*cache).cn_pl;
417 auto &
visH = (*cache).visH;
418 auto &
sigmaY = (*cache).sigmaY;
419 return visH * tau_dot +
426 auto &cn = (*cache).cn_pl;
427 auto &
visH = (*cache).visH;
428 auto &
sigmaY = (*cache).sigmaY;
445 Tensor2_symmetric<T, 3> &t_plastic_flow) {
446 Tensor2_symmetric<double, 3> t_diff_constrain_dstress;
448 return t_diff_constrain_dstress;
451template <
typename T1,
typename T2>
454 Tensor2_symmetric<T2, 3> &&t_diff_constrain_dstress) {
455 Tensor2_symmetric<double, 3> t_diff_constrain_dstrain;
456 t_diff_constrain_dstrain(
k,
l) =
457 t_diff_constrain_dstress(
i,
j) * t_D(
i,
j,
k,
l);
458 return t_diff_constrain_dstrain;
461template <
typename T1,
typename T2>
463 Ddg<T1, 3, 3> &t_D, Tensor2_symmetric<T2, 3> &&t_diff_constrain_dstress) {
464 Tensor2_symmetric<double, 3> t_diff_constrain_kin_hard_dstrain;
465 t_diff_constrain_kin_hard_dstrain(
k,
l) =
466 t_diff_constrain_dstress(
i,
j) * t_D(
i,
j,
k,
l) +
467 1.5 * (*cache).C1_k * t_diff_constrain_dstress(
k,
l);
468 return t_diff_constrain_kin_hard_dstrain;
474 boost::shared_ptr<CommonData> common_data_ptr)
485 auto t_tau = getFTensor0FromVec(*(
commonDataPtr->plasticTauPtr));
486 auto t_tau_dot = getFTensor0FromVec(*(
commonDataPtr->plasticTauDotPtr));
518 UnknownInterface **iface)
const {
532 boost::shared_ptr<BaseFunctionCtx> ctx_ptr) {
535 cTx = ctx_ptr->getInterface<EntPolynomialBaseCtx>();
537 int nb_gauss_pts = pts.size2();
542 if (pts.size1() < 3) {
544 "Wrong dimension of pts, should be at least 3 rows with "
548 switch (
cTx->sPace) {
560 EntPolynomialBaseCtx *
cTx;
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
@ L2
field with C-1 continuity
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_DATA_INCONSISTENCY
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
double trace(FTensor::Tensor2< T, 2, 2 > &t_stress)
FTensor::Index< 'n', SPACE_DIM > n
FTensor::Index< 'm', SPACE_DIM > m
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'l', 3 > l
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
constexpr IntegrationType I
double visH
Viscous hardening.
double sigmaY
Yield stress.
constexpr auto field_name
std::array< bool, MBMAXTYPE > doEntities
If true operator is executed for entity.
Data on single entity (This is passed as argument to DataOperator::doWork)
@ OPROW
operator doWork function is executed on FE rows
std::vector< EntityHandle > & mapGaussPts
MoFEMErrorCode doWork(int side, EntityType type, EntData &data)
[Postprocessing]
moab::Interface & postProcMesh
boost::shared_ptr< CommonData > commonDataPtr