Reference documentation for deal.II version 9.4.1
\(\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\}}\)
Loading...
Searching...
No Matches
standard_tensors.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 2016 - 2021 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
24#include <deal.II/base/tensor.h>
25
27
28namespace 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
318template <int dim>
319template <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
344template <int dim>
345template <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
370template <int dim>
371template <typename Number>
374 const Tensor<2, dim, Number> &F)
375{
377 symmetrize(invert(transpose(F) * F));
378}
379
380
381
382template <int dim>
383template <typename Number>
386 const Tensor<2, dim, Number> &F)
387{
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
static constexpr const SymmetricTensor< 4, dim > dev_P
static constexpr SymmetricTensor< 4, dim, Number > dC_inv_dC(const Tensor< 2, dim, Number > &F)
static constexpr SymmetricTensor< 2, dim, Number > ddet_F_dC(const Tensor< 2, dim, Number > &F)
static constexpr SymmetricTensor< 4, dim, Number > Dev_P(const Tensor< 2, dim, Number > &F)
static constexpr const SymmetricTensor< 2, dim > I
static constexpr const SymmetricTensor< 4, dim > S
static constexpr SymmetricTensor< 4, dim, Number > Dev_P_T(const Tensor< 2, dim, Number > &F)
static constexpr const SymmetricTensor< 4, dim > IxI
Definition: tensor.h:503
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:442
#define DEAL_II_CONSTEXPR
Definition: config.h:177
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:443
DerivativeForm< 1, spacedim, dim, Number > transpose(const DerivativeForm< 1, dim, spacedim, Number > &DF)
#define Assert(cond, exc)
Definition: exceptions.h:1473
static ::ExceptionBase & ExcMessage(std::string arg1)
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:968
::VectorizedArray< Number, width > pow(const ::VectorizedArray< Number, width > &, const Number p)
static constexpr const T & value(const T &t)
Definition: numbers.h:705
constexpr SymmetricTensor< 2, dim, Number > symmetrize(const Tensor< 2, dim, Number > &t)
constexpr Number determinant(const SymmetricTensor< 2, dim, Number > &)
constexpr SymmetricTensor< 2, dim, Number > invert(const SymmetricTensor< 2, dim, Number > &)
constexpr SymmetricTensor< 4, dim, Number > outer_product(const SymmetricTensor< 2, dim, Number > &t1, const SymmetricTensor< 2, dim, Number > &t2)