v0.14.0
Loading...
Searching...
No Matches
Classes | Functions | Variables
OpPlasticTools Namespace Reference

Classes

struct  BubbleTauPolynomialBase
 
struct  CommonData
 [Common data] More...
 
struct  OpCalculateConstraintLhs_dEP
 
struct  OpCalculateConstraintLhs_dTAU
 
struct  OpCalculateConstraintLhs_dU
 
struct  OpCalculateConstraintRhs
 
struct  OpCalculatePlasticFlowLhs_dEP
 
struct  OpCalculatePlasticFlowLhs_dTAU
 
struct  OpCalculatePlasticFlowLhs_dU
 
struct  OpCalculatePlasticFlowRhs
 
struct  OpCalculatePlasticInternalForceLhs_dEP
 
struct  OpCalculatePlasticInternalForceLhs_dTAU
 
struct  OpCalculatePlasticSurfaceAndFlow
 
struct  OpGetGaussPtsPlasticState
 
struct  OpPlasticStress
 
struct  OpPostProcPlastic
 

Functions

auto diff_tensor ()
 [Operators definitions] More...
 
auto symm_L_tensor ()
 
auto diff_symmetrize ()
 
template<typename T1 >
auto deviator (Tensor2_symmetric< T1, 3 > &t_stress)
 
auto diff_deviator (Ddg< double, 3, 3 > &&t_diff_stress)
 
template<typename T >
auto get_effective_stress (Tensor2_symmetric< T, 3 > &t_stress, Tensor2_symmetric< T, 3 > &t_plastic_strain)
 
auto hardening (long double tau)
 
auto hardening_dtau (long double tau)
 
auto plastic_surface (Tensor2_symmetric< double, 3 > &&t_stress_deviator)
 
auto plastic_flow (long double f, Tensor2_symmetric< double, 3 > &&t_dev_stress, Ddg< double, 3, 3 > &t_diff_deviator)
 
template<typename T >
auto diff_plastic_flow_dstress (long double f, Tensor2_symmetric< T, 3 > &t_flow, Ddg< double, 3, 3 > &t_diff_deviator)
 
template<typename T >
auto diff_plastic_flow_dstrain (Ddg< T, 3, 3 > &t_D, Ddg< double, 3, 3 > &&t_diff_plastic_flow_dstress)
 
template<typename T >
auto diff_plastic_flow_kin_hard_dstrain (Ddg< T, 3, 3 > &t_D, Ddg< double, 3, 3 > &&t_diff_plastic_flow_dstress)
 
double constrain_abs (long double x)
 
double constraint_sign (long double x)
 
double w (long double tau_dot, long double f, long double hardening)
 
double constraint (long double tau_dot, long double f, long double hardening)
 
double diff_constrain_dtau_dot (long double tau_dot, long double f, long double hardening)
 
auto diff_constrain_df (long double tau_dot, long double f, long double hardening)
 
auto diff_constrain_dsigma_y (long double tau_dot, long double f, long double hardening)
 
template<typename T >
auto diff_constrain_dstress (long double &&diff_constrain_df, Tensor2_symmetric< T, 3 > &t_plastic_flow)
 
template<typename T1 , typename T2 >
auto diff_constrain_dstrain (Ddg< T1, 3, 3 > &t_D, Tensor2_symmetric< T2, 3 > &&t_diff_constrain_dstress)
 
template<typename T1 , typename T2 >
auto diff_constrain_kin_hard_dstrain (Ddg< T1, 3, 3 > &t_D, Tensor2_symmetric< T2, 3 > &&t_diff_constrain_dstress)
 

Variables

constexpr double sqrt2by3 = 0.816496580927726
 

Function Documentation

◆ constrain_abs()

double OpPlasticTools::constrain_abs ( long double  x)
inline

Definition at line 397 of file PlasticOperators.hpp.

397{ return std::abs(x); };

◆ constraint()

double OpPlasticTools::constraint ( long double  tau_dot,
long double  f,
long double  hardening 
)
inline

Definition at line 414 of file PlasticOperators.hpp.

415 {
416 auto &cn = (*cache).cn_pl;
417 auto &visH = (*cache).visH;
418 auto &sigmaY = (*cache).sigmaY;
419 return visH * tau_dot +
420 (sigmaY / 2) * ((cn * tau_dot - (f - hardening) / sigmaY) -
421 constrain_abs(w(tau_dot, f, hardening)));
422};
double constrain_abs(long double x)
double visH
Viscous hardening.
Definition: plastic.cpp:176
double sigmaY
Yield stress.
Definition: plastic.cpp:174

◆ constraint_sign()

double OpPlasticTools::constraint_sign ( long double  x)
inline

Definition at line 399 of file PlasticOperators.hpp.

399 {
400 if (x > 0)
401 return 1;
402 else if (x < 0)
403 return -1;
404 else
405 return 0;
406};

◆ deviator()

template<typename T1 >
auto OpPlasticTools::deviator ( Tensor2_symmetric< T1, 3 > &  t_stress)
inline

Definition at line 259 of file PlasticOperators.hpp.

259 {
260 Tensor2_symmetric<double, 3> t_dev;
261 t_dev(I, J) = 0;
262 constexpr double third = boost::math::constants::third<double>();
263 const double trace = t_stress(i, i);
264
265 t_dev(i, j) = t_stress(i, j);
266 t_dev(0, 0) -= trace * third;
267 t_dev(1, 1) -= trace * third;
268 t_dev(2, 2) -= trace * third;
269 return t_dev;
270};
static Index< 'J', 3 > J
constexpr double third
double trace(FTensor::Tensor2< T, 2, 2 > &t_stress)
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
constexpr IntegrationType I

◆ diff_constrain_df()

auto OpPlasticTools::diff_constrain_df ( long double  tau_dot,
long double  f,
long double  hardening 
)
inline

Definition at line 433 of file PlasticOperators.hpp.

434 {
435 return (-1 - constraint_sign(w(tau_dot, f, hardening))) / 2;
436};
double constraint_sign(long double x)

◆ diff_constrain_dsigma_y()

auto OpPlasticTools::diff_constrain_dsigma_y ( long double  tau_dot,
long double  f,
long double  hardening 
)
inline

Definition at line 438 of file PlasticOperators.hpp.

439 {
440 return (1 + constraint_sign(w(tau_dot, f, hardening))) / 2;
441}

◆ diff_constrain_dstrain()

template<typename T1 , typename T2 >
auto OpPlasticTools::diff_constrain_dstrain ( Ddg< T1, 3, 3 > &  t_D,
Tensor2_symmetric< T2, 3 > &&  t_diff_constrain_dstress 
)
inline

Definition at line 453 of file PlasticOperators.hpp.

454 {
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;
459};
FTensor::Index< 'l', 3 > l
FTensor::Index< 'k', 3 > k

◆ diff_constrain_dstress()

template<typename T >
auto OpPlasticTools::diff_constrain_dstress ( long double &&  diff_constrain_df,
Tensor2_symmetric< T, 3 > &  t_plastic_flow 
)
inline

Definition at line 444 of file PlasticOperators.hpp.

445 {
446 Tensor2_symmetric<double, 3> t_diff_constrain_dstress;
447 t_diff_constrain_dstress(i, j) = diff_constrain_df * t_plastic_flow(i, j);
448 return t_diff_constrain_dstress;
449};
auto diff_constrain_df(long double tau_dot, long double f, long double hardening)

◆ diff_constrain_dtau_dot()

double OpPlasticTools::diff_constrain_dtau_dot ( long double  tau_dot,
long double  f,
long double  hardening 
)
inline

Definition at line 424 of file PlasticOperators.hpp.

425 {
426 auto &cn = (*cache).cn_pl;
427 auto &visH = (*cache).visH;
428 auto &sigmaY = (*cache).sigmaY;
429 return visH +
430 (sigmaY / 2) * (cn - cn * constraint_sign(w(tau_dot, f, hardening)));
431};

◆ diff_constrain_kin_hard_dstrain()

template<typename T1 , typename T2 >
auto OpPlasticTools::diff_constrain_kin_hard_dstrain ( Ddg< T1, 3, 3 > &  t_D,
Tensor2_symmetric< T2, 3 > &&  t_diff_constrain_dstress 
)
inline

Definition at line 462 of file PlasticOperators.hpp.

463 {
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;
469};

◆ diff_deviator()

auto OpPlasticTools::diff_deviator ( Ddg< double, 3, 3 > &&  t_diff_stress)
inline

Definition at line 272 of file PlasticOperators.hpp.

272 {
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);
280
281 constexpr double third = boost::math::constants::third<double>();
282
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;
286
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;
290
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;
294
295 return t_diff_deviator;
296};
static Index< 'L', 3 > L
static Index< 'K', 3 > K

◆ diff_plastic_flow_dstrain()

template<typename T >
auto OpPlasticTools::diff_plastic_flow_dstrain ( Ddg< T, 3, 3 > &  t_D,
Ddg< double, 3, 3 > &&  t_diff_plastic_flow_dstress 
)
inline

Definition at line 377 of file PlasticOperators.hpp.

378 {
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);
382
383 return t_diff_flow;
384};
FTensor::Index< 'n', SPACE_DIM > n
FTensor::Index< 'm', SPACE_DIM > m

◆ diff_plastic_flow_dstress()

template<typename T >
auto OpPlasticTools::diff_plastic_flow_dstress ( long double  f,
Tensor2_symmetric< T, 3 > &  t_flow,
Ddg< double, 3, 3 > &  t_diff_deviator 
)
inline

Definition at line 363 of file PlasticOperators.hpp.

365 {
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))) /
370 f;
371
372 return t_diff_flow;
373};
static Index< 'M', 3 > M
const int N
Definition: speed_test.cpp:3

◆ diff_plastic_flow_kin_hard_dstrain()

template<typename T >
auto OpPlasticTools::diff_plastic_flow_kin_hard_dstrain ( Ddg< T, 3, 3 > &  t_D,
Ddg< double, 3, 3 > &&  t_diff_plastic_flow_dstress 
)
inline

Definition at line 387 of file PlasticOperators.hpp.

388 {
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);
393
394 return t_diff_flow_kin_hard;
395};

◆ diff_symmetrize()

auto OpPlasticTools::diff_symmetrize ( )
inline

Definition at line 256 of file PlasticOperators.hpp.

256{ return (*cache).Is; };

◆ diff_tensor()

auto OpPlasticTools::diff_tensor ( )
inline

[Operators definitions]

[Lambda functions]

Definition at line 220 of file PlasticOperators.hpp.

220 {
221 Ddg<double, 3, 3> t_diff;
222 constexpr auto t_kd = Kronecker_Delta_symmetric<int>();
223 t_diff(i, j, k, l) = (t_kd(i, k) ^ t_kd(j, l)) / 4.;
224 return t_diff;
225};
constexpr auto t_kd

◆ get_effective_stress()

template<typename T >
auto OpPlasticTools::get_effective_stress ( Tensor2_symmetric< T, 3 > &  t_stress,
Tensor2_symmetric< T, 3 > &  t_plastic_strain 
)
inline

Definition at line 299 of file PlasticOperators.hpp.

300 {
301
302 Tensor2_symmetric<double, 3> stress_tmp;
303
304 stress_tmp(i, j) =
305 t_stress(i, j) - 1.5 * (*cache).C1_k * t_plastic_strain(i, j);
306
307 return stress_tmp;
308};

◆ hardening()

auto OpPlasticTools::hardening ( long double  tau)
inline

Definition at line 311 of file PlasticOperators.hpp.

311 {
312 return (*cache).H * tau + (*cache).Q_inf * (1. - exp(-(*cache).b_iso * tau)) +
313 (*cache).sigmaY;
314}

◆ hardening_dtau()

auto OpPlasticTools::hardening_dtau ( long double  tau)
inline

Definition at line 316 of file PlasticOperators.hpp.

316 {
317 return (*cache).H +
318 (*cache).Q_inf * (*cache).b_iso * exp(-(*cache).b_iso * tau);
319}

◆ plastic_flow()

auto OpPlasticTools::plastic_flow ( long double  f,
Tensor2_symmetric< double, 3 > &&  t_dev_stress,
Ddg< double, 3, 3 > &  t_diff_deviator 
)
inline

Definition at line 349 of file PlasticOperators.hpp.

351 {
352 Tensor2_symmetric<double, 3> t_diff_f;
353 t_diff_f(k, l) =
354 ((1.5) * (t_dev_stress(I, J)) * t_diff_deviator(I, J, k, l)) / f;
355
356 return t_diff_f;
357};

◆ plastic_surface()

auto OpPlasticTools::plastic_surface ( Tensor2_symmetric< double, 3 > &&  t_stress_deviator)
inline

\[ \begin{split} f&=\sqrt{s_{ij}s_{ij}}\\ A_{ij}&=\frac{\partial f}{\partial \sigma_{ij}}= \frac{1}{f} s_{kl} \frac{\partial s_{kl}}{\partial \sigma_{ij}}\\ \frac{\partial A_{ij}}{\partial \sigma_{kl}}&= \frac{\partial^2 f}{\partial \sigma_{ij}\partial\sigma_{mn}}= \frac{1}{f} \left( \frac{\partial s_{kl}}{\partial \sigma_{mn}}\frac{\partial s_{kl}}{\partial \sigma_{ij}} -A_{mn}A_{ij} \right)\\ \frac{\partial f}{\partial \varepsilon_{ij}}&=A_{mn}D_{mnij} \\ \frac{\partial A_{ij}}{\partial \varepsilon_{kl}}&= \frac{\partial A_{ij}}{\partial \sigma_{mn}} \frac{\partial \sigma_{mn}}{\partial \varepsilon_{kl}}= \frac{\partial A_{ij}}{\partial \sigma_{mn}} D_{mnkl} \end{split} \]

Definition at line 344 of file PlasticOperators.hpp.

344 {
345 return std::sqrt(1.5 * t_stress_deviator(I, J) * t_stress_deviator(I, J)) +
346 std::numeric_limits<double>::epsilon();
347};

◆ symm_L_tensor()

auto OpPlasticTools::symm_L_tensor ( )
inline

Definition at line 227 of file PlasticOperators.hpp.

227 {
228 Dg<double, 3, 6> L;
229 Index<'L', 6> Li;
230 // dg(T 000, T 001, T 002, T 010, T 011, T 012, T 020, T 021, T 022,
231 // T 110, T 111, T 112, T 120, T 121, T 122, T 220, T 221, T 222);
232
233 // Tensor2_symmetric_constructor(T data[(3 * 4) / 2], T d00, T d01, T d02, T
234 // d11,
235 // T d12, T d22);
236 // Tensor2<double, 3, 3> test_tensor{1., 2., 3., 2., 5., 6., 3., 6., 9.};
237 // Tensor1<double, 6> test_vec;
238
239 L(i, j, Li) = 0;
240 L(0, 0, 0) = 1;
241 L(0, 1, 1) = 1;
242 L(0, 2, 2) = 1;
243 L(1, 0, 1) = 1;
244 L(1, 1, 3) = 1;
245 L(1, 2, 4) = 1;
246 L(2, 0, 2) = 1;
247 L(2, 1, 4) = 1;
248 L(2, 2, 5) = 1;
249
250 // test_vec(Li) = test_tensor(i, j) * L(i, j, Li);
251
252 // (00, 01, 02, 11, 12, 22)
253 return L;
254}
Definition: single.cpp:4

◆ w()

double OpPlasticTools::w ( long double  tau_dot,
long double  f,
long double  hardening 
)
inline

Definition at line 408 of file PlasticOperators.hpp.

408 {
409 auto &cn = (*cache).cn_pl;
410 auto &sigmaY = (*cache).sigmaY;
411 return (f - hardening) / sigmaY + cn * tau_dot;
412};

Variable Documentation

◆ sqrt2by3

constexpr double OpPlasticTools::sqrt2by3 = 0.816496580927726
constexpr

Definition at line 310 of file PlasticOperators.hpp.