Reference documentation for deal.II version 9.1.1
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
standard_tensors.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2016 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/numbers.h>
22 #include <deal.II/base/tensor.h>
23 
24 DEAL_II_NAMESPACE_OPEN
25 
26 namespace Physics
27 {
28  namespace Elasticity
29  {
44  template <int dim>
46  {
47  public:
52 
70  static const SymmetricTensor<2, dim> I;
71 
99  static const SymmetricTensor<4, dim> S;
100 
112 
114 
119 
157 
216  template <typename Number>
218  Dev_P(const Tensor<2, dim, Number> &F);
219 
231  template <typename Number>
234 
236 
258  template <typename Number>
261 
263 
268 
283  template <typename Number>
286 
288  };
289 
290  } // namespace Elasticity
291 } // namespace Physics
292 
293 
294 
295 #ifndef DOXYGEN
296 
297 // ------------------------- inline functions ------------------------
298 
299 
300 template <int dim>
301 template <typename Number>
304  const Tensor<2, dim, Number> &F)
305 {
306  const Number det_F = determinant(F);
308  ExcMessage("Deformation gradient has a negative determinant."));
309  const Tensor<2, dim, Number> C_ns = transpose(F) * F;
312 
313  // See Wriggers p46 equ 3.125 (but transpose indices)
315  outer_product(C, C_inv); // Dev_P = C_x_C_inv
316  Dev_P /= -dim; // Dev_P = -[1/dim]C_x_C_inv
317  Dev_P += SymmetricTensor<4, dim, Number>(S); // Dev_P = S - [1/dim]C_x_C_inv
318  Dev_P *=
319  std::pow(det_F, -2.0 / dim); // Dev_P = J^{-2/dim} [S - [1/dim]C_x_C_inv]
320 
321  return Dev_P;
322 }
323 
324 
325 
326 template <int dim>
327 template <typename Number>
330  const Tensor<2, dim, Number> &F)
331 {
332  const Number det_F = determinant(F);
334  ExcMessage("Deformation gradient has a negative determinant."));
335  const Tensor<2, dim, Number> C_ns = transpose(F) * F;
338 
339  // See Wriggers p46 equ 3.125 (not transposed)
341  outer_product(C_inv, C); // Dev_P = C_inv_x_C
342  Dev_P_T /= -dim; // Dev_P = -[1/dim]C_inv_x_C
343  Dev_P_T += SymmetricTensor<4, dim, Number>(S); // Dev_P = S - [1/dim]C_inv_x_C
344  Dev_P_T *=
345  std::pow(det_F, -2.0 / dim); // Dev_P = J^{-2/dim} [S - [1/dim]C_inv_x_C]
346 
347  return Dev_P_T;
348 }
349 
350 
351 
352 template <int dim>
353 template <typename Number>
356  const Tensor<2, dim, Number> &F)
357 {
358  return Number(0.5) * determinant(F) * symmetrize(invert(transpose(F) * F));
359 }
360 
361 
362 
363 template <int dim>
364 template <typename Number>
367  const Tensor<2, dim, Number> &F)
368 {
369  const SymmetricTensor<2, dim, Number> C_inv =
370  symmetrize(invert(transpose(F) * F));
371 
373  for (unsigned int A = 0; A < dim; ++A)
374  for (unsigned int B = A; B < dim; ++B)
375  for (unsigned int C = 0; C < dim; ++C)
376  for (unsigned int D = C; D < dim; ++D)
377  dC_inv_dC[A][B][C][D] -=
378  0.5 * (C_inv[A][C] * C_inv[B][D] + C_inv[A][D] * C_inv[B][C]);
379 
380  return dC_inv_dC;
381 }
382 
383 #endif // DOXYGEN
384 
385 DEAL_II_NAMESPACE_CLOSE
386 
387 #endif
SymmetricTensor< 2, dim, Number > invert(const SymmetricTensor< 2, dim, Number > &t)
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 ::ExceptionBase & ExcMessage(std::string arg1)
static const SymmetricTensor< 4, dim > S
#define Assert(cond, exc)
Definition: exceptions.h:1407
static SymmetricTensor< 2, dim, Number > ddet_F_dC(const Tensor< 2, dim, Number > &F)
static const SymmetricTensor< 2, dim > I
SymmetricTensor< 4, dim, Number > outer_product(const SymmetricTensor< 2, dim, Number > &t1, const SymmetricTensor< 2, dim, Number > &t2)
static const SymmetricTensor< 4, dim > dev_P
static const SymmetricTensor< 4, dim > IxI
Number determinant(const SymmetricTensor< 2, dim, Number > &t)
bool value_is_greater_than(const Number1 &value_1, const Number2 &value_2)
Definition: numbers.h:901
Definition: mpi.h:90
static SymmetricTensor< 4, dim, Number > Dev_P(const Tensor< 2, dim, Number > &F)
static SymmetricTensor< 4, dim, Number > dC_inv_dC(const Tensor< 2, dim, Number > &F)
DerivativeForm< 1, spacedim, dim, Number > transpose(const DerivativeForm< 1, dim, spacedim, Number > &DF)
static SymmetricTensor< 4, dim, Number > Dev_P_T(const Tensor< 2, dim, Number > &F)