Reference documentation for deal.II version GIT 35969cdc9b 2023-12-09 01:10:02+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
standard_tensors.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2016 - 2023 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii_elasticity_standard_tensors_h
17 #define dealii_elasticity_standard_tensors_h
18 
19 
20 #include <deal.II/base/config.h>
21 
22 #include <deal.II/base/numbers.h>
24 #include <deal.II/base/tensor.h>
25 
27 
28 namespace Physics
29 {
30  namespace Elasticity
31  {
44  template <int dim>
46  {
47  public:
71 #ifndef DEAL_II_CXX14_CONSTEXPR_BUG
72  = unit_symmetric_tensor<dim>()
73 #endif
74  ;
75 
104 #ifndef DEAL_II_CXX14_CONSTEXPR_BUG
105  = identity_tensor<dim>()
106 #endif
107  ;
108 
120 #ifndef DEAL_II_CXX14_CONSTEXPR_BUG
121  = outer_product(unit_symmetric_tensor<dim>(),
122  unit_symmetric_tensor<dim>())
123 #endif
124  ;
125 
170 #ifndef DEAL_II_CXX14_CONSTEXPR_BUG
171  = deviator_tensor<dim>()
172 #endif
173  ;
174 
233  template <typename Number>
236 
248  template <typename Number>
251 
275  template <typename Number>
278 
300  template <typename Number>
303 
305  };
306 
307  } // namespace Elasticity
308 } // namespace Physics
309 
310 
311 
312 #ifndef DOXYGEN
313 
314 // --------------------- inline functions and constants -------------------
315 
316 
317 template <int dim>
318 template <typename Number>
321  const Tensor<2, dim, Number> &F)
322 {
323  // Make things work with AD types
324  using std::pow;
325  const Number det_F = determinant(F);
327  ExcMessage("Deformation gradient has a negative determinant."));
328  const Tensor<2, dim, Number> C_ns = transpose(F) * F;
331 
332  // See Wriggers p46 equ 3.125 (but transpose indices)
334  outer_product(C, C_inv); // Dev_P = C_x_C_inv
335  Dev_P /= -dim; // Dev_P = -[1/dim]C_x_C_inv
336  Dev_P += SymmetricTensor<4, dim, Number>(S); // Dev_P = S - [1/dim]C_x_C_inv
337  Dev_P *= pow(det_F, -2.0 / dim); // Dev_P = J^{-2/dim} [S - [1/dim]C_x_C_inv]
338 
339  return Dev_P;
340 }
341 
342 
343 
344 template <int dim>
345 template <typename Number>
348  const Tensor<2, dim, Number> &F)
349 {
350  // Make things work with AD types
351  using std::pow;
352  const Number det_F = determinant(F);
354  ExcMessage("Deformation gradient has a negative determinant."));
355  const Tensor<2, dim, Number> C_ns = transpose(F) * F;
358 
359  // See Wriggers p46 equ 3.125 (not transposed)
361  outer_product(C_inv, C); // Dev_P = C_inv_x_C
362  Dev_P_T /= -dim; // Dev_P = -[1/dim]C_inv_x_C
363  Dev_P_T += SymmetricTensor<4, dim, Number>(S); // Dev_P = S - [1/dim]C_inv_x_C
364  Dev_P_T *=
365  pow(det_F, -2.0 / dim); // Dev_P = J^{-2/dim} [S - [1/dim]C_inv_x_C]
366 
367  return Dev_P_T;
368 }
369 
370 
371 
372 template <int dim>
373 template <typename Number>
376  const Tensor<2, dim, Number> &F)
377 {
380 }
381 
382 
383 
384 template <int dim>
385 template <typename Number>
388  const Tensor<2, dim, Number> &F)
389 {
390  const SymmetricTensor<2, dim, Number> C_inv =
392 
394  for (unsigned int A = 0; A < dim; ++A)
395  for (unsigned int B = A; B < dim; ++B)
396  for (unsigned int C = 0; C < dim; ++C)
397  for (unsigned int D = C; D < dim; ++D)
398  dC_inv_dC[A][B][C][D] -=
399  0.5 * (C_inv[A][C] * C_inv[B][D] + C_inv[A][D] * C_inv[B][C]);
400 
401  return dC_inv_dC;
402 }
403 
404 #endif // DOXYGEN
405 
407 
408 #endif
DerivativeForm< 1, spacedim, dim, Number > transpose(const DerivativeForm< 1, dim, spacedim, Number > &DF)
static constexpr const SymmetricTensor< 4, dim > dev_P
static constexpr DEAL_II_HOST SymmetricTensor< 4, dim, Number > dC_inv_dC(const Tensor< 2, dim, Number > &F)
static constexpr const SymmetricTensor< 2, dim > I
static constexpr const SymmetricTensor< 4, dim > S
static constexpr DEAL_II_HOST SymmetricTensor< 2, dim, Number > ddet_F_dC(const Tensor< 2, dim, Number > &F)
static constexpr DEAL_II_HOST SymmetricTensor< 4, dim, Number > Dev_P(const Tensor< 2, dim, Number > &F)
static constexpr DEAL_II_HOST SymmetricTensor< 4, dim, Number > Dev_P_T(const Tensor< 2, dim, Number > &F)
static constexpr const SymmetricTensor< 4, dim > IxI
constexpr DEAL_II_HOST SymmetricTensor< 4, dim, Number > outer_product(const SymmetricTensor< 2, dim, Number > &t1, const SymmetricTensor< 2, dim, Number > &t2)
constexpr DEAL_II_HOST SymmetricTensor< 2, dim, Number > symmetrize(const Tensor< 2, dim, Number > &t)
constexpr DEAL_II_HOST Number determinant(const SymmetricTensor< 2, dim, Number > &)
constexpr DEAL_II_HOST SymmetricTensor< 2, dim, Number > invert(const SymmetricTensor< 2, dim, Number > &t)
VectorizedArray< Number, width > pow(const ::VectorizedArray< Number, width > &x, const Number p)
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:477
#define DEAL_II_CONSTEXPR
Definition: config.h:207
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:478
#define Assert(cond, exc)
Definition: exceptions.h:1631
static ::ExceptionBase & ExcMessage(std::string arg1)
static const char A
SymmetricTensor< 2, dim, Number > C(const Tensor< 2, dim, Number > &F)
Tensor< 2, dim, Number > F(const Tensor< 2, dim, Number > &Grad_u)
bool value_is_greater_than(const Number1 &value_1, const Number2 &value_2)
Definition: numbers.h:962
#define DEAL_II_HOST
Definition: numbers.h:46
::VectorizedArray< Number, width > pow(const ::VectorizedArray< Number, width > &, const Number p)
static constexpr DEAL_II_HOST_DEVICE_ALWAYS_INLINE const T & value(const T &t)
Definition: numbers.h:703
constexpr DEAL_II_HOST SymmetricTensor< 4, dim, Number > outer_product(const SymmetricTensor< 2, dim, Number > &t1, const SymmetricTensor< 2, dim, Number > &t2)