43struct CommonData :
public boost::enable_shared_from_this<CommonData> {
44 boost::shared_ptr<MatrixDouble>
mDPtr;
71 return boost::shared_ptr<VectorDouble>(shared_from_this(), &
plasticSurface);
74 return boost::shared_ptr<VectorDouble>(shared_from_this(), &
plasticTau);
77 return boost::shared_ptr<VectorDouble>(shared_from_this(), &
plasticTauDot);
80 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &
plasticStrain);
83 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
87 return boost::shared_ptr<MatrixDouble>(shared_from_this(), &
plasticFlow);
112 boost::shared_ptr<CommonData> common_data_ptr);
121 boost::shared_ptr<CommonData> common_data_ptr,
122 boost::shared_ptr<MatrixDouble> m_D_ptr);
128 boost::shared_ptr<MatrixDouble>
mDPtr;
133 boost::shared_ptr<CommonData> common_data_ptr,
134 boost::shared_ptr<MatrixDouble>
mDPtr,
135 const double scale = 1);
139 boost::shared_ptr<MatrixDouble>
mDPtr;
146 boost::shared_ptr<CommonData> common_data_ptr,
147 boost::shared_ptr<MatrixDouble> m_D_ptr);
148 MoFEMErrorCode
iNtegrate(EntitiesFieldData::EntData &data);
152 boost::shared_ptr<MatrixDouble>
mDPtr;
157 boost::shared_ptr<CommonData> common_data_ptr,
158 boost::shared_ptr<MatrixDouble> m_D_ptr);
159 MoFEMErrorCode
iNtegrate(EntitiesFieldData::EntData &data);
163 boost::shared_ptr<MatrixDouble>
mDPtr;
168 const std::string row_field_name,
const std::string col_field_name,
169 boost::shared_ptr<CommonData> common_data_ptr,
170 boost::shared_ptr<MatrixDouble> m_D_ptr);
171 MoFEMErrorCode
iNtegrate(EntitiesFieldData::EntData &row_data,
172 EntitiesFieldData::EntData &col_data);
176 boost::shared_ptr<MatrixDouble>
mDPtr;
182 const std::string row_field_name,
const std::string col_field_name,
183 boost::shared_ptr<CommonData> common_data_ptr,
184 boost::shared_ptr<HenckyOps::CommonData> common_henky_data_ptr,
185 boost::shared_ptr<MatrixDouble> m_D_ptr);
186 MoFEMErrorCode
iNtegrate(EntitiesFieldData::EntData &row_data,
187 EntitiesFieldData::EntData &col_data);
192 boost::shared_ptr<MatrixDouble>
mDPtr;
199 const std::string col_field_name,
200 boost::shared_ptr<CommonData> common_data_ptr,
201 boost::shared_ptr<MatrixDouble> m_D_ptr);
202 MoFEMErrorCode
iNtegrate(EntitiesFieldData::EntData &row_data,
203 EntitiesFieldData::EntData &col_data);
207 boost::shared_ptr<MatrixDouble>
mDPtr;
212 const std::string row_field_name,
const std::string col_field_name,
213 boost::shared_ptr<CommonData> common_data_ptr,
214 boost::shared_ptr<HenckyOps::CommonData> comman_henky_data_ptr,
215 boost::shared_ptr<MatrixDouble> m_D_ptr);
216 MoFEMErrorCode
iNtegrate(EntitiesFieldData::EntData &row_data,
217 EntitiesFieldData::EntData &col_data);
222 boost::shared_ptr<MatrixDouble>
mDPtr;
228 const std::string col_field_name,
229 boost::shared_ptr<CommonData> common_data_ptr,
230 boost::shared_ptr<MatrixDouble> m_D_ptr);
231 MoFEMErrorCode
iNtegrate(EntitiesFieldData::EntData &row_data,
232 EntitiesFieldData::EntData &col_data);
236 boost::shared_ptr<MatrixDouble>
mDPtr;
241 const std::string col_field_name,
242 boost::shared_ptr<CommonData> common_data_ptr,
243 boost::shared_ptr<MatrixDouble> m_D_ptr);
244 MoFEMErrorCode
iNtegrate(EntitiesFieldData::EntData &row_data,
245 EntitiesFieldData::EntData &col_data);
249 boost::shared_ptr<MatrixDouble>
mDPtr;
254 const std::string col_field_name,
255 boost::shared_ptr<CommonData> common_data_ptr,
256 boost::shared_ptr<MatrixDouble> m_D_ptr);
257 MoFEMErrorCode
iNtegrate(EntitiesFieldData::EntData &row_data,
258 EntitiesFieldData::EntData &col_data);
262 boost::shared_ptr<MatrixDouble>
mDPtr;
267 const std::string row_field_name,
const std::string col_field_name,
268 boost::shared_ptr<CommonData> common_data_ptr,
269 boost::shared_ptr<HenckyOps::CommonData> comman_henky_data_ptr,
270 boost::shared_ptr<MatrixDouble> m_D_ptr);
271 MoFEMErrorCode
iNtegrate(EntitiesFieldData::EntData &row_data,
272 EntitiesFieldData::EntData &col_data);
277 boost::shared_ptr<MatrixDouble>
mDPtr;
283 const std::string col_field_name,
284 boost::shared_ptr<CommonData> common_data_ptr,
285 boost::shared_ptr<MatrixDouble> mat_D_ptr);
286 MoFEMErrorCode
iNtegrate(EntitiesFieldData::EntData &row_data,
287 EntitiesFieldData::EntData &col_data);
291 boost::shared_ptr<MatrixDouble>
mDPtr;
296 const std::string col_field_name,
297 boost::shared_ptr<CommonData> common_data_ptr);
298 MoFEMErrorCode
iNtegrate(EntitiesFieldData::EntData &row_data,
299 EntitiesFieldData::EntData &col_data);
336 t_diff(
i,
j,
k,
l) = 0;
337 t_diff(0, 0, 0, 0) = 1;
338 t_diff(1, 1, 1, 1) = 1;
340 t_diff(1, 0, 1, 0) = 0.5;
341 t_diff(1, 0, 0, 1) = 0.5;
343 t_diff(0, 1, 0, 1) = 0.5;
344 t_diff(0, 1, 1, 0) = 0.5;
347 t_diff(2, 2, 2, 2) = 1;
349 t_diff(2, 0, 2, 0) = 0.5;
350 t_diff(2, 0, 0, 2) = 0.5;
351 t_diff(0, 2, 0, 2) = 0.5;
352 t_diff(0, 2, 2, 0) = 0.5;
354 t_diff(2, 1, 2, 1) = 0.5;
355 t_diff(2, 1, 1, 2) = 0.5;
356 t_diff(1, 2, 1, 2) = 0.5;
357 t_diff(1, 2, 2, 1) = 0.5;
365 constexpr double third = boost::math::constants::third<double>();
367 return (t_stress(0, 0) + t_stress(1, 1)) *
third;
369 return (t_stress(0, 0) + t_stress(1, 1) + t_stress(2, 2)) *
third;
379 t_dev(ii, jj) = t_stress(ii, jj);
380 t_dev(0, 0) -=
trace;
381 t_dev(1, 1) -=
trace;
382 t_dev(2, 2) -=
trace;
389 t_diff_deviator(
I,
J,
k,
l) = 0;
394 t_diff_deviator(ii, jj, kk, ll) = t_diff_stress(ii, jj, kk, ll);
396 constexpr double third = boost::math::constants::third<double>();
398 t_diff_deviator(0, 0, 0, 0) -=
third;
399 t_diff_deviator(0, 0, 1, 1) -=
third;
401 t_diff_deviator(1, 1, 0, 0) -=
third;
402 t_diff_deviator(1, 1, 1, 1) -=
third;
404 t_diff_deviator(2, 2, 0, 0) -=
third;
405 t_diff_deviator(2, 2, 1, 1) -=
third;
408 t_diff_deviator(0, 0, 2, 2) -=
third;
409 t_diff_deviator(1, 1, 2, 2) -=
third;
410 t_diff_deviator(2, 2, 2, 2) -=
third;
413 return t_diff_deviator;
441 return std::sqrt(1.5 * t_stress_deviator(
I,
J) * t_stress_deviator(
I,
J)) +
442 std::numeric_limits<double>::epsilon();
450 (1.5 * (t_dev_stress(
I,
J) * t_diff_deviator(
I,
J,
k,
l))) / f;
459 t_diff_flow(
i,
j,
k,
l) =
460 (1.5 * (t_diff_deviator(
M,
N,
i,
j) * t_diff_deviator(
M,
N,
k,
l) -
461 (2. / 3.) * t_flow(
i,
j) * t_flow(
k,
l))) /
471 t_diff_flow(
i,
j,
k,
l) =
472 t_diff_plastic_flow_dstress(
i,
j,
m,
n) * t_D(
m,
n,
k,
l);
477 const auto y = x /
zeta;
478 if (y > std::numeric_limits<float>::max_exponent10 ||
479 y < std::numeric_limits<float>::min_exponent10) {
482 const auto e = std::exp(y);
483 const auto ep1 = e + 1;
484 return (2 /
zeta) * (e / (ep1 * ep1));
489 const auto y = x /
zeta;
490 if (y > std::numeric_limits<float>::max_exponent10 ||
491 y < std::numeric_limits<float>::min_exponent10) {
497 const auto e = std::exp(y);
498 return (e - 1) / (1 + e);
503 const auto y = -x /
zeta;
504 if (y > std::numeric_limits<float>::max_exponent10 ||
505 y < std::numeric_limits<float>::min_exponent10) {
508 const double e = std::exp(y);
509 return x + 2 *
zeta * std::log1p(e);
513inline double w(
double eqiv,
double dot_tau,
double f,
double sigma_y) {
514 return (f - sigma_y) /
sigmaY +
cn1 * (dot_tau * std::sqrt(eqiv));
528inline double constraint(
double eqiv,
double dot_tau,
double f,
double sigma_y,
530 return visH * dot_tau + (
sigmaY / 2) * ((
cn0 * (dot_tau - eqiv) +
531 cn1 * (std::sqrt(eqiv) * dot_tau) -
542 (-
cn0 +
cn1 * dot_tau * (0.5 / std::sqrt(eqiv)) * (1 - sign));
555 return t_diff_constrain_dstress;
558template <
typename T1,
typename T2>
561 t_diff_constrain_dstrain(
k,
l) =
562 t_diff_constrain_dstress(
i,
j) * t_D(
i,
j,
k,
l);
563 return t_diff_constrain_dstrain;
569 constexpr double A = 2. / 3;
570 return std::sqrt(
A * t_plastic_strain_dot(
i,
j) *
571 t_plastic_strain_dot(
i,
j)) +
572 std::numeric_limits<double>::epsilon();
575template <
typename T1,
typename T2,
typename T3>
577 T3 &t_diff_plastic_strain) {
578 constexpr double A = 2. / 3;
580 t_diff_eqiv(
i,
j) =
A * (t_plastic_strain_dot(
k,
l) / eqiv) *
581 t_diff_plastic_strain(
k,
l,
i,
j);
591 &mat(3 * rr + 0, 0), &mat(3 * rr + 0, 1), &mat(3 * rr + 1, 0),
592 &mat(3 * rr + 1, 1), &mat(3 * rr + 2, 0), &mat(3 * rr + 2, 1)};
598 &mat(6 * rr + 0, 0), &mat(6 * rr + 0, 1), &mat(6 * rr + 0, 2),
599 &mat(6 * rr + 1, 0), &mat(6 * rr + 1, 1), &mat(6 * rr + 1, 2),
600 &mat(6 * rr + 2, 0), &mat(6 * rr + 2, 1), &mat(6 * rr + 2, 2),
601 &mat(6 * rr + 3, 0), &mat(6 * rr + 3, 1), &mat(6 * rr + 3, 2),
602 &mat(6 * rr + 4, 0), &mat(6 * rr + 4, 1), &mat(6 * rr + 4, 2),
603 &mat(6 * rr + 5, 0), &mat(6 * rr + 5, 1), &mat(6 * rr + 5, 2)};
Kronecker Delta class symmetric.
auto diff_constrain_dstress(double diff_constrain_df, FTensor::Tensor2_symmetric< T, SPACE_DIM > &t_plastic_flow)
auto deviator(FTensor::Tensor2_symmetric< T, SPACE_DIM > &t_stress, double trace)
double constrian_sign(double x)
double platsic_surface(FTensor::Tensor2_symmetric< double, 3 > &&t_stress_deviator)
FTensor::Index< 'p', SPACE_DIM > p
FTensor::Index< 'j', SPACE_DIM > j
FTensor::Index< 'M', 3 > M
auto diff_constrain_dstrain(T1 &t_D, T2 &&t_diff_constrain_dstress)
double diff_constrain_eqiv(double sign, double eqiv, double dot_tau)
double constrain_diff_sign(double x)
auto plastic_flow(long double f, FTensor::Tensor2_symmetric< double, 3 > &&t_dev_stress, FTensor::Ddg< double, 3, SPACE_DIM > &&t_diff_deviator)
FTensor::Index< 'O', size_symm > O
FTensor::Index< 'L', size_symm > L
FTensor::Index< 'l', SPACE_DIM > l
FTensor::Index< 'k', SPACE_DIM > k
auto diff_tensor()
[Operators definitions]
auto diff_constrain_df(double sign)
double w(double eqiv, double dot_tau, double f, double sigma_y)
FTensor::Index< 'N', 3 > N
auto diff_constrain_dsigma_y(double sign)
FTensor::Index< 'I', 3 > I
auto diff_deviator(FTensor::Ddg< double, SPACE_DIM, SPACE_DIM > &&t_diff_stress)
FTensor::Index< 'i', SPACE_DIM > i
[Common data]
FTensor::Index< 'o', SPACE_DIM > o
FTensor::Index< 'm', SPACE_DIM > m
double constrain_abs(double x)
FTensor::Index< 'J', 3 > J
auto diff_equivalent_strain_dot(const T1 eqiv, T2 &t_plastic_strain_dot, T3 &t_diff_plastic_strain)
double trace(FTensor::Tensor2_symmetric< T, SPACE_DIM > &t_stress)
auto diff_plastic_flow_dstress(long double f, FTensor::Tensor2_symmetric< T, SPACE_DIM > &t_flow, FTensor::Ddg< double, 3, SPACE_DIM > &&t_diff_deviator)
auto diff_plastic_flow_dstrain(FTensor::Ddg< T, SPACE_DIM, SPACE_DIM > &t_D, FTensor::Ddg< double, SPACE_DIM, SPACE_DIM > &&t_diff_plastic_flow_dstress)
double constraint(double eqiv, double dot_tau, double f, double sigma_y, double abs_w)
double diff_constrain_ddot_tau(double sign, double eqiv)
auto equivalent_strain_dot(FTensor::Tensor2_symmetric< T, SPACE_DIM > &t_plastic_strain_dot)
FTensor::Index< 'n', SPACE_DIM > n
static auto get_mat_tensor_sym_dvector(size_t rr, MatrixDouble &mat, FTensor::Number< 2 >)
[Lambda functions]
constexpr auto field_name
Deprecated interface functions.
Data on single entity (This is passed as argument to DataOperator::doWork)
boost::shared_ptr< MatrixDouble > mStrainPtr
MatrixDouble resFlowDstrainDot
auto getPlasticStrainPtr()
auto getPlasticStrainDotPtr()
boost::shared_ptr< MatrixDouble > mGradPtr
VectorDouble plasticTauDot
boost::shared_ptr< MatrixDouble > mDPtr
VectorDouble plasticSurface
boost::shared_ptr< MatrixDouble > mDPtr_Axiator
auto getPlasticTauDotPtr()
MatrixDouble resCdStrainDot
MatrixDouble plasticStrain
boost::shared_ptr< MatrixDouble > mStressPtr
MatrixDouble plasticStrainDot
MatrixDouble resFlowDstrain
auto getPlasticSurfacePtr()
boost::shared_ptr< MatrixDouble > mDPtr_Deviator
std::array< int, 5 > activityData
MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
boost::shared_ptr< MatrixDouble > mDPtr
boost::shared_ptr< CommonData > commonDataPtr
boost::shared_ptr< HenckyOps::CommonData > commonHenckyDataPtr
MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
boost::shared_ptr< CommonData > commonDataPtr
boost::shared_ptr< MatrixDouble > mDPtr
MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
boost::shared_ptr< CommonData > commonDataPtr
boost::shared_ptr< CommonData > commonDataPtr
boost::shared_ptr< MatrixDouble > mDPtr
MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &data)
boost::shared_ptr< CommonData > commonDataPtr
boost::shared_ptr< MatrixDouble > mDPtr
MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
boost::shared_ptr< MatrixDouble > mDPtr
boost::shared_ptr< HenckyOps::CommonData > commonHenckyDataPtr
boost::shared_ptr< CommonData > commonDataPtr
boost::shared_ptr< MatrixDouble > mDPtr
MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
boost::shared_ptr< CommonData > commonDataPtr
MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
boost::shared_ptr< CommonData > commonDataPtr
boost::shared_ptr< MatrixDouble > mDPtr
MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
boost::shared_ptr< MatrixDouble > mDPtr
boost::shared_ptr< CommonData > commonDataPtr
boost::shared_ptr< MatrixDouble > mDPtr
boost::shared_ptr< CommonData > commonDataPtr
MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &data)
boost::shared_ptr< HenckyOps::CommonData > commonHenckyDataPtr
boost::shared_ptr< CommonData > commonDataPtr
boost::shared_ptr< MatrixDouble > mDPtr
MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
boost::shared_ptr< CommonData > commonDataPtr
boost::shared_ptr< MatrixDouble > mDPtr
MoFEMErrorCode doWork(int side, EntityType type, EntData &data)
Operator for linear form, usually to calculate values on right hand side.
boost::shared_ptr< CommonData > commonDataPtr
MoFEM::Interface & mField
boost::shared_ptr< CommonData > commonDataPtr
boost::shared_ptr< MatrixDouble > mDPtr
MoFEMErrorCode doWork(int side, EntityType type, EntData &data)
Operator for linear form, usually to calculate values on right hand side.
boost::shared_ptr< CommonData > commonDataPtr
MoFEMErrorCode doWork(int side, EntityType type, EntData &data)
[Calculate stress]
boost::shared_ptr< MatrixDouble > mDPtr