Reference documentation for deal.II version Git f0d1c24e5f 2021-10-18 08:09:39 -0400
\(\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 - 2020 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  {
45  template <int dim>
47  {
48  public:
53 
72 #ifndef DEAL_II_CXX14_CONSTEXPR_BUG
73  = unit_symmetric_tensor<dim>()
74 #endif
75  ;
76 
105 #ifndef DEAL_II_CXX14_CONSTEXPR_BUG
106  = identity_tensor<dim>()
107 #endif
108  ;
109 
121 #ifndef DEAL_II_CXX14_CONSTEXPR_BUG
122  = outer_product(unit_symmetric_tensor<dim>(),
123  unit_symmetric_tensor<dim>())
124 #endif
125  ;
126 
128 
133 
171 #ifndef DEAL_II_CXX14_CONSTEXPR_BUG
172  = deviator_tensor<dim>()
173 #endif
174  ;
175 
234  template <typename Number>
237 
249  template <typename Number>
252 
254 
276  template <typename Number>
279 
281 
286 
301  template <typename Number>
304 
306  };
307 
308  } // namespace Elasticity
309 } // namespace Physics
310 
311 
312 
313 #ifndef DOXYGEN
314 
315 // --------------------- inline functions and constants -------------------
316 
317 
318 template <int dim>
319 template <typename Number>
322  const Tensor<2, dim, Number> &F)
323 {
324  const Number det_F = determinant(F);
326  ExcMessage("Deformation gradient has a negative determinant."));
327  const Tensor<2, dim, Number> C_ns = transpose(F) * F;
330 
331  // See Wriggers p46 equ 3.125 (but transpose indices)
333  outer_product(C, C_inv); // Dev_P = C_x_C_inv
334  Dev_P /= -dim; // Dev_P = -[1/dim]C_x_C_inv
335  Dev_P += SymmetricTensor<4, dim, Number>(S); // Dev_P = S - [1/dim]C_x_C_inv
336  Dev_P *=
337  std::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  const Number det_F = determinant(F);
352  ExcMessage("Deformation gradient has a negative determinant."));
353  const Tensor<2, dim, Number> C_ns = transpose(F) * F;
356 
357  // See Wriggers p46 equ 3.125 (not transposed)
359  outer_product(C_inv, C); // Dev_P = C_inv_x_C
360  Dev_P_T /= -dim; // Dev_P = -[1/dim]C_inv_x_C
361  Dev_P_T += SymmetricTensor<4, dim, Number>(S); // Dev_P = S - [1/dim]C_inv_x_C
362  Dev_P_T *=
363  std::pow(det_F, -2.0 / dim); // Dev_P = J^{-2/dim} [S - [1/dim]C_inv_x_C]
364 
365  return Dev_P_T;
366 }
367 
368 
369 
370 template <int dim>
371 template <typename Number>
374  const Tensor<2, dim, Number> &F)
375 {
377  symmetrize(invert(transpose(F) * F));
378 }
379 
380 
381 
382 template <int dim>
383 template <typename Number>
386  const Tensor<2, dim, Number> &F)
387 {
388  const SymmetricTensor<2, dim, Number> C_inv =
389  symmetrize(invert(transpose(F) * F));
390 
392  for (unsigned int A = 0; A < dim; ++A)
393  for (unsigned int B = A; B < dim; ++B)
394  for (unsigned int C = 0; C < dim; ++C)
395  for (unsigned int D = C; D < dim; ++D)
396  dC_inv_dC[A][B][C][D] -=
397  0.5 * (C_inv[A][C] * C_inv[B][D] + C_inv[A][D] * C_inv[B][C]);
398 
399  return dC_inv_dC;
400 }
401 
402 #endif // DOXYGEN
403 
405 
406 #endif
constexpr Number determinant(const SymmetricTensor< 2, dim, Number > &)
static constexpr const T & value(const T &t)
Definition: numbers.h:703
constexpr SymmetricTensor< 2, dim, Number > symmetrize(const Tensor< 2, dim, Number > &t)
Tensor< 2, dim, Number > F(const Tensor< 2, dim, Number > &Grad_u)
SymmetricTensor< 2, dim, Number > C(const Tensor< 2, dim, Number > &F)
static constexpr const SymmetricTensor< 4, dim > S
constexpr SymmetricTensor< 4, dim, Number > outer_product(const SymmetricTensor< 2, dim, Number > &t1, const SymmetricTensor< 2, dim, Number > &t2)
static constexpr const SymmetricTensor< 4, dim > dev_P
static ::ExceptionBase & ExcMessage(std::string arg1)
static constexpr const SymmetricTensor< 4, dim > IxI
static constexpr const SymmetricTensor< 2, dim > I
#define Assert(cond, exc)
Definition: exceptions.h:1461
DerivativeForm< 1, spacedim, dim, Number > transpose(const DerivativeForm< 1, dim, spacedim, Number > &DF)
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:401
static constexpr SymmetricTensor< 4, dim, Number > Dev_P(const Tensor< 2, dim, Number > &F)
static constexpr SymmetricTensor< 4, dim, Number > dC_inv_dC(const Tensor< 2, dim, Number > &F)
static const char A
bool value_is_greater_than(const Number1 &value_1, const Number2 &value_2)
Definition: numbers.h:966
Definition: tensor.h:506
static constexpr SymmetricTensor< 2, dim, Number > ddet_F_dC(const Tensor< 2, dim, Number > &F)
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:400
constexpr SymmetricTensor< 2, dim, Number > invert(const SymmetricTensor< 2, dim, Number > &)
static constexpr SymmetricTensor< 4, dim, Number > Dev_P_T(const Tensor< 2, dim, Number > &F)
#define DEAL_II_CONSTEXPR
Definition: config.h:173