v0.9.1
Classes | Functions | Variables
OpPlasticTools Namespace Reference

Classes

struct  CommonData
 [Common data] More...
 
struct  Monitor
 
struct  OpCalculateContrainsLhs_dEP
 
struct  OpCalculateContrainsLhs_dTAU
 
struct  OpCalculateContrainsLhs_dU
 
struct  OpCalculateContrainsRhs
 
struct  OpCalculatePlasticFlowLhs_dEP
 
struct  OpCalculatePlasticFlowLhs_dTAU
 
struct  OpCalculatePlasticFlowLhs_dU
 
struct  OpCalculatePlasticFlowRhs
 
struct  OpCalculatePlasticInternalForceLhs_dEP
 
struct  OpCalculatePlasticSurface
 [Operators definitions] More...
 
struct  OpPlasticStress
 
struct  OpPostProcPlastic
 

Functions

auto diff_tensor ()
 [Operators definitions] More...
 
auto diff_symmetrize ()
 
template<typename T >
double trace (FTensor::Tensor2_symmetric< T, 2 > &t_stress)
 
template<typename T >
auto deviator (FTensor::Tensor2_symmetric< T, 2 > &t_stress, double trace)
 
auto diff_deviator (FTensor::Ddg< double, 2, 2 > &&t_diff_stress)
 
auto hardening (double tau)
 
auto hardening_dtau ()
 
double platsic_surface (FTensor::Tensor2_symmetric< double, 3 > &&t_stress_deviator)
 
auto plastic_flow (double f, FTensor::Tensor2_symmetric< double, 3 > &&t_dev_stress, FTensor::Ddg< double, 3, 2 > &&t_diff_deviator)
 
template<typename T >
auto diff_plastic_flow_dstress (double f, FTensor::Tensor2_symmetric< T, 2 > &t_flow, FTensor::Ddg< double, 3, 2 > &&t_diff_deviator)
 
template<typename T >
auto diff_plastic_flow_dstrain (FTensor::Ddg< T, 2, 2 > &t_D, FTensor::Ddg< double, 2, 2 > &&t_diff_plastic_flow_dstress)
 
double contrains (double tau, double f)
 
double sign (double x)
 
double diff_constrain_dtau (double tau, double f)
 
auto diff_constrain_df (double tau, double f)
 
template<typename T >
auto diff_constrain_dstress (double &&diff_constrain_df, FTensor::Tensor2_symmetric< T, 2 > &t_plastic_flow)
 
template<typename T >
auto diff_constrain_dstrain (FTensor::Ddg< T, 2, 2 > &t_D, FTensor::Tensor2_symmetric< T, 2 > &&t_diff_constrain_dstress)
 

Variables

FTensor::Index< 'i', 2 > i
 [Common data] More...
 
FTensor::Index< 'j', 2 > j
 
FTensor::Index< 'k', 2 > k
 
FTensor::Index< 'l', 2 > l
 
FTensor::Index< 'm', 2 > m
 
FTensor::Index< 'n', 2 > n
 
FTensor::Index< 'I', 3 > I
 
FTensor::Index< 'J', 3 > J
 
FTensor::Index< 'M', 3 > M
 
FTensor::Index< 'N', 3 > N
 

Function Documentation

◆ contrains()

double OpPlasticTools::contrains ( double  tau,
double  f 
)

\[ \dot{\tau} - \frac{1}{2}\left\{\dot{\tau} + (f(\pmb\sigma) - \sigma_y) + \| \dot{\tau} + (f(\pmb\sigma) - \sigma_y) \|\right\} = 0 \]

Definition at line 359 of file PlasticOps.hpp.

359  {
360  if ((f + cn * tau) >= 0)
361  return -f;
362  else
363  return cn * tau;
364 };
constexpr double cn

◆ deviator()

template<typename T >
auto OpPlasticTools::deviator ( FTensor::Tensor2_symmetric< T, 2 > &  t_stress,
double  trace 
)

Definition at line 246 of file PlasticOps.hpp.

246  {
248  t_dev(I, J) = 0;
249  for (int ii = 0; ii != 2; ++ii)
250  for (int jj = ii; jj != 2; ++jj)
251  t_dev(ii, jj) = t_stress(ii, jj);
252  t_dev(0, 0) -= trace;
253  t_dev(1, 1) -= trace;
254  t_dev(2, 2) -= trace;
255  return t_dev;
256 };
FTensor::Index< 'I', 3 > I
Definition: PlasticOps.hpp:70
FTensor::Index< 'J', 3 > J
Definition: PlasticOps.hpp:71
double trace(FTensor::Tensor2_symmetric< T, 2 > &t_stress)
Definition: PlasticOps.hpp:240

◆ diff_constrain_df()

auto OpPlasticTools::diff_constrain_df ( double  tau,
double  f 
)

Definition at line 379 of file PlasticOps.hpp.

379  {
380  return (-1 - sign(f + cn * tau)) / 2.;
381 };
double sign(double x)
Definition: PlasticOps.hpp:366
constexpr double cn

◆ diff_constrain_dstrain()

template<typename T >
auto OpPlasticTools::diff_constrain_dstrain ( FTensor::Ddg< T, 2, 2 > &  t_D,
FTensor::Tensor2_symmetric< T, 2 > &&  t_diff_constrain_dstress 
)

Definition at line 393 of file PlasticOps.hpp.

395  {
396  FTensor::Tensor2_symmetric<double, 2> t_diff_constrain_dstrain;
397  t_diff_constrain_dstrain(k, l) =
398  t_diff_constrain_dstress(i, j) * t_D(i, j, k, l);
399  return t_diff_constrain_dstrain;
400 };
FTensor::Index< 'k', 2 > k
Definition: PlasticOps.hpp:65
FTensor::Index< 'j', 2 > j
Definition: PlasticOps.hpp:64
FTensor::Index< 'l', 2 > l
Definition: PlasticOps.hpp:66
FTensor::Index< 'i', 2 > i
[Common data]
Definition: PlasticOps.hpp:63

◆ diff_constrain_dstress()

template<typename T >
auto OpPlasticTools::diff_constrain_dstress ( double &&  diff_constrain_df,
FTensor::Tensor2_symmetric< T, 2 > &  t_plastic_flow 
)

Definition at line 385 of file PlasticOps.hpp.

386  {
387  FTensor::Tensor2_symmetric<double, 2> t_diff_constrain_dstress;
388  t_diff_constrain_dstress(i, j) = diff_constrain_df * t_plastic_flow(i, j);
389  return t_diff_constrain_dstress;
390 };
FTensor::Index< 'j', 2 > j
Definition: PlasticOps.hpp:64
FTensor::Index< 'i', 2 > i
[Common data]
Definition: PlasticOps.hpp:63
auto diff_constrain_df(double tau, double f)
Definition: PlasticOps.hpp:379

◆ diff_constrain_dtau()

double OpPlasticTools::diff_constrain_dtau ( double  tau,
double  f 
)

Definition at line 375 of file PlasticOps.hpp.

375  {
376  return (cn - cn * sign(f + cn * tau)) / 2.;
377 };
double sign(double x)
Definition: PlasticOps.hpp:366
constexpr double cn

◆ diff_deviator()

auto OpPlasticTools::diff_deviator ( FTensor::Ddg< double, 2, 2 > &&  t_diff_stress)

Definition at line 258 of file PlasticOps.hpp.

258  {
259  FTensor::Ddg<double, 3, 2> t_diff_deviator;
260  t_diff_deviator(I, J, k, l) = 0;
261  for (int ii = 0; ii != 2; ++ii)
262  for (int jj = ii; jj != 2; ++jj)
263  for (int kk = 0; kk != 2; ++kk)
264  for (int ll = kk; ll != 2; ++ll)
265  t_diff_deviator(ii, jj, kk, ll) = t_diff_stress(ii, jj, kk, ll);
266 
267  constexpr double third = boost::math::constants::third<double>();
268 
269  t_diff_deviator(0, 0, 0, 0) -= third;
270  t_diff_deviator(0, 0, 1, 1) -= third;
271 
272  t_diff_deviator(1, 1, 0, 0) -= third;
273  t_diff_deviator(1, 1, 1, 1) -= third;
274 
275  t_diff_deviator(2, 2, 0, 0) -= third;
276  t_diff_deviator(2, 2, 1, 1) -= third;
277 
278  return t_diff_deviator;
279 };
FTensor::Index< 'k', 2 > k
Definition: PlasticOps.hpp:65
FTensor::Index< 'l', 2 > l
Definition: PlasticOps.hpp:66
FTensor::Index< 'I', 3 > I
Definition: PlasticOps.hpp:70
FTensor::Index< 'J', 3 > J
Definition: PlasticOps.hpp:71
constexpr double third

◆ diff_plastic_flow_dstrain()

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

Definition at line 341 of file PlasticOps.hpp.

343  {
344  FTensor::Ddg<double, 2, 2> t_diff_flow;
345  t_diff_flow(i, j, k, l) =
346  t_diff_plastic_flow_dstress(i, j, m, n) * t_D(m, n, k, l);
347 
348  return t_diff_flow;
349 };
FTensor::Index< 'k', 2 > k
Definition: PlasticOps.hpp:65
FTensor::Index< 'j', 2 > j
Definition: PlasticOps.hpp:64
FTensor::Index< 'l', 2 > l
Definition: PlasticOps.hpp:66
FTensor::Index< 'n', 2 > n
Definition: PlasticOps.hpp:68
FTensor::Index< 'm', 2 > m
Definition: PlasticOps.hpp:67
FTensor::Index< 'i', 2 > i
[Common data]
Definition: PlasticOps.hpp:63

◆ diff_plastic_flow_dstress()

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

Definition at line 327 of file PlasticOps.hpp.

328  {
329  FTensor::Ddg<double, 2, 2> t_diff_flow;
330  if (std::abs(f) > std::numeric_limits<double>::epsilon())
331  t_diff_flow(i, j, k, l) =
332  (1.5 / f) * (t_diff_deviator(M, N, i, j) * t_diff_deviator(M, N, k, l) -
333  2. / 3. * t_flow(i, j) * t_flow(k, l));
334  else
335  t_diff_flow(i, j, k, l) = 0;
336 
337  return t_diff_flow;
338 };
FTensor::Index< 'k', 2 > k
Definition: PlasticOps.hpp:65
FTensor::Index< 'j', 2 > j
Definition: PlasticOps.hpp:64
FTensor::Index< 'l', 2 > l
Definition: PlasticOps.hpp:66
FTensor::Index< 'M', 3 > M
Definition: PlasticOps.hpp:72
FTensor::Index< 'i', 2 > i
[Common data]
Definition: PlasticOps.hpp:63
const int N
Definition: speed_test.cpp:3

◆ diff_symmetrize()

auto OpPlasticTools::diff_symmetrize ( )

Definition at line 227 of file PlasticOps.hpp.

227  {
229  t_diff(i, j, k, l) = 0;
230  t_diff(0, 0, 0, 0) = 1;
231  t_diff(1, 1, 1, 1) = 1;
232  t_diff(1, 0, 1, 0) = 0.25;
233  t_diff(0, 1, 1, 0) = 0.25;
234  t_diff(0, 1, 0, 1) = 0.25;
235  t_diff(1, 0, 0, 1) = 0.25;
236  return t_diff;
237 };
FTensor::Index< 'k', 2 > k
Definition: PlasticOps.hpp:65
FTensor::Index< 'j', 2 > j
Definition: PlasticOps.hpp:64
FTensor::Index< 'l', 2 > l
Definition: PlasticOps.hpp:66
FTensor::Index< 'i', 2 > i
[Common data]
Definition: PlasticOps.hpp:63

◆ diff_tensor()

auto OpPlasticTools::diff_tensor ( )

[Operators definitions]

[Lambda functions]

Definition at line 218 of file PlasticOps.hpp.

218  {
220  t_diff(i, j, k, l) = 0;
221  for (size_t ii = 0; ii != 2; ++ii)
222  for (size_t jj = ii; jj != 2; ++jj)
223  t_diff(ii, jj, ii, jj) = 1;
224  return t_diff;
225 };
FTensor::Index< 'k', 2 > k
Definition: PlasticOps.hpp:65
FTensor::Index< 'j', 2 > j
Definition: PlasticOps.hpp:64
FTensor::Index< 'l', 2 > l
Definition: PlasticOps.hpp:66
FTensor::Index< 'i', 2 > i
[Common data]
Definition: PlasticOps.hpp:63

◆ hardening()

auto OpPlasticTools::hardening ( double  tau)

Definition at line 281 of file PlasticOps.hpp.

281 { return H * tau + sigmaY; }
constexpr double H
constexpr double sigmaY

◆ hardening_dtau()

auto OpPlasticTools::hardening_dtau ( )

Definition at line 283 of file PlasticOps.hpp.

283 { return H; }
constexpr double H

◆ plastic_flow()

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

Definition at line 313 of file PlasticOps.hpp.

315  {
317  if (std::abs(f) > std::numeric_limits<double>::epsilon())
318  t_diff_f(k, l) =
319  (1.5 / f) * (t_dev_stress(I, J) * t_diff_deviator(I, J, k, l));
320  else
321  t_diff_f(k, l) = 0;
322  return t_diff_f;
323 };
FTensor::Index< 'k', 2 > k
Definition: PlasticOps.hpp:65
FTensor::Index< 'l', 2 > l
Definition: PlasticOps.hpp:66
FTensor::Index< 'I', 3 > I
Definition: PlasticOps.hpp:70
FTensor::Index< 'J', 3 > J
Definition: PlasticOps.hpp:71

◆ platsic_surface()

double OpPlasticTools::platsic_surface ( FTensor::Tensor2_symmetric< double, 3 > &&  t_stress_deviator)

\[ \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 309 of file PlasticOps.hpp.

309  {
310  return std::sqrt(1.5 * t_stress_deviator(I, J) * t_stress_deviator(I, J));
311 };
FTensor::Index< 'I', 3 > I
Definition: PlasticOps.hpp:70
FTensor::Index< 'J', 3 > J
Definition: PlasticOps.hpp:71

◆ sign()

double OpPlasticTools::sign ( double  x)

Definition at line 366 of file PlasticOps.hpp.

366  {
367  if (x == 0)
368  return 0;
369  else if (x > 0)
370  return 1;
371  else
372  return -1;
373 };

◆ trace()

template<typename T >
double OpPlasticTools::trace ( FTensor::Tensor2_symmetric< T, 2 > &  t_stress)

Definition at line 240 of file PlasticOps.hpp.

240  {
241  constexpr double third = boost::math::constants::third<double>();
242  return (t_stress(0, 0) + t_stress(1, 1)) * third;
243 };
constexpr double third

Variable Documentation

◆ i

FTensor::Index<'i', 2> OpPlasticTools::i

[Common data]

Definition at line 63 of file PlasticOps.hpp.

◆ I

FTensor::Index<'I', 3> OpPlasticTools::I
Examples
Remodeling.cpp, and Remodeling.hpp.

Definition at line 70 of file PlasticOps.hpp.

◆ j

FTensor::Index<'j', 2> OpPlasticTools::j

Definition at line 64 of file PlasticOps.hpp.

◆ J

FTensor::Index<'J', 3> OpPlasticTools::J
Examples
EshelbianOperators.cpp, Remodeling.cpp, and Remodeling.hpp.

Definition at line 71 of file PlasticOps.hpp.

◆ k

FTensor::Index<'k', 2> OpPlasticTools::k

Definition at line 65 of file PlasticOps.hpp.

◆ l

FTensor::Index<'l', 2> OpPlasticTools::l

Definition at line 66 of file PlasticOps.hpp.

◆ m

FTensor::Index<'m', 2> OpPlasticTools::m

◆ M

FTensor::Index<'M', 3> OpPlasticTools::M

◆ n

FTensor::Index<'n', 2> OpPlasticTools::n

◆ N

FTensor::Index<'N', 3> OpPlasticTools::N

Definition at line 73 of file PlasticOps.hpp.