deal.II version 9.7.0
\(\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// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2016 - 2025 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Part of the source code is dual licensed under Apache-2.0 WITH
9// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10// governing the source code and code contributions can be found in
11// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12//
13// ------------------------------------------------------------------------
14
15#ifndef dealii_elasticity_standard_tensors_h
16#define dealii_elasticity_standard_tensors_h
17
18
19#include <deal.II/base/config.h>
20
23#include <deal.II/base/tensor.h>
24
26
27namespace Physics
28{
29 namespace Elasticity
30 {
43 template <int dim>
45 {
46 public:
51
70#ifndef DEAL_II_CXX14_CONSTEXPR_BUG
72#endif
73 ;
74
103#ifndef DEAL_II_CXX14_CONSTEXPR_BUG
105#endif
106 ;
107
119#ifndef DEAL_II_CXX14_CONSTEXPR_BUG
122#endif
123 ;
124
126
131
198#ifndef DEAL_II_CXX14_CONSTEXPR_BUG
200#endif
201 ;
202
261 template <typename Number>
264
276 template <typename Number>
279
281
303 template <typename Number>
306
308
313
328 template <typename Number>
331
333 };
334
335 } // namespace Elasticity
336} // namespace Physics
337
338
339
340#ifndef DOXYGEN
341
342// --------------------- inline functions and constants -------------------
343
344
345template <int dim>
346template <typename Number>
349 const Tensor<2, dim, Number> &F)
350{
351 // Make things work with AD types
352 using std::pow;
353 const Number det_F = determinant(F);
355 ExcMessage("Deformation gradient has a negative determinant."));
356 const Tensor<2, dim, Number> C_ns = transpose(F) * F;
359
360 // See Wriggers p46 equ 3.125 (but transpose indices)
362 outer_product(C, C_inv); // Dev_P = C_x_C_inv
363 Dev_P /= -dim; // Dev_P = -[1/dim]C_x_C_inv
364 Dev_P += SymmetricTensor<4, dim, Number>(S); // Dev_P = S - [1/dim]C_x_C_inv
365 Dev_P *= pow(det_F, -2.0 / dim); // Dev_P = J^{-2/dim} [S - [1/dim]C_x_C_inv]
366
367 return Dev_P;
368}
369
370
371
372template <int dim>
373template <typename Number>
376 const Tensor<2, dim, Number> &F)
377{
378 // Make things work with AD types
379 using std::pow;
380 const Number det_F = determinant(F);
382 ExcMessage("Deformation gradient has a negative determinant."));
383 const Tensor<2, dim, Number> C_ns = transpose(F) * F;
386
387 // See Wriggers p46 equ 3.125 (not transposed)
389 outer_product(C_inv, C); // Dev_P = C_inv_x_C
390 Dev_P_T /= -dim; // Dev_P = -[1/dim]C_inv_x_C
391 Dev_P_T += SymmetricTensor<4, dim, Number>(S); // Dev_P = S - [1/dim]C_inv_x_C
392 Dev_P_T *=
393 pow(det_F, -2.0 / dim); // Dev_P = J^{-2/dim} [S - [1/dim]C_inv_x_C]
394
395 return Dev_P_T;
396}
397
398
399
400template <int dim>
401template <typename Number>
404 const Tensor<2, dim, Number> &F)
405{
407 symmetrize(invert(transpose(F) * F));
408}
409
410
411
412template <int dim>
413template <typename Number>
416 const Tensor<2, dim, Number> &F)
417{
419 symmetrize(invert(transpose(F) * F));
420
422 for (unsigned int A = 0; A < dim; ++A)
423 for (unsigned int B = A; B < dim; ++B)
424 for (unsigned int C = 0; C < dim; ++C)
425 for (unsigned int D = C; D < dim; ++D)
426 dC_inv_dC[A][B][C][D] -=
427 0.5 * (C_inv[A][C] * C_inv[B][D] + C_inv[A][D] * C_inv[B][C]);
428
429 return dC_inv_dC;
430}
431
432#endif // DOXYGEN
433
435
436#endif
static DEAL_II_HOST constexpr SymmetricTensor< 4, dim, Number > Dev_P_T(const Tensor< 2, dim, Number > &F)
static DEAL_II_HOST constexpr SymmetricTensor< 4, dim, Number > Dev_P(const Tensor< 2, dim, Number > &F)
static constexpr const SymmetricTensor< 4, dim > dev_P
static DEAL_II_HOST constexpr SymmetricTensor< 4, dim, Number > dC_inv_dC(const Tensor< 2, dim, Number > &F)
static DEAL_II_HOST constexpr SymmetricTensor< 2, dim, Number > ddet_F_dC(const Tensor< 2, dim, Number > &F)
static constexpr const SymmetricTensor< 2, dim > I
static constexpr const SymmetricTensor< 4, dim > S
static constexpr const SymmetricTensor< 4, dim > IxI
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:40
#define DEAL_II_CONSTEXPR
Definition config.h:274
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:41
#define DEAL_II_HOST
Definition config.h:182
DerivativeForm< 1, spacedim, dim, Number > transpose(const DerivativeForm< 1, dim, spacedim, Number > &DF)
#define Assert(cond, exc)
static ::ExceptionBase & ExcMessage(std::string arg1)
constexpr 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:906
::VectorizedArray< Number, width > pow(const ::VectorizedArray< Number, width > &, const Number p)
static constexpr const T & value(const T &t)
Definition numbers.h:668
DEAL_II_HOST constexpr Number determinant(const SymmetricTensor< 2, dim, Number > &)
DEAL_II_HOST constexpr SymmetricTensor< 2, dim, Number > symmetrize(const Tensor< 2, dim, Number > &t)
DEAL_II_HOST constexpr SymmetricTensor< 2, dim, Number > invert(const SymmetricTensor< 2, dim, Number > &)
DEAL_II_HOST constexpr SymmetricTensor< 4, dim, Number > outer_product(const SymmetricTensor< 2, dim, Number > &t1, const SymmetricTensor< 2, dim, Number > &t2)
DEAL_II_HOST constexpr SymmetricTensor< 4, dim, Number > deviator_tensor()
DEAL_II_HOST constexpr SymmetricTensor< 4, dim, Number > identity_tensor()
DEAL_II_HOST constexpr SymmetricTensor< 2, dim, Number > unit_symmetric_tensor()