Reference documentation for deal.II version 9.0.0
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 at
12 // the top level of the deal.II distribution.
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 
29  namespace Elasticity
30  {
31 
46  template <int dim>
48  {
49  public:
50 
55 
73  static const SymmetricTensor<2, dim> I;
74 
98  static const SymmetricTensor<4, dim> S;
99 
110 
112 
117 
151 
207  template <typename Number>
209  Dev_P (const Tensor<2, dim, Number> &F);
210 
221  template <typename Number>
223  Dev_P_T (const Tensor<2, dim, Number> &F);
224 
226 
248  template <typename Number>
251 
253 
258 
272  template <typename Number>
275 
277  };
278 
279  }
280 }
281 
282 
283 
284 #ifndef DOXYGEN
285 
286 // ------------------------- inline functions ------------------------
287 
288 
289 template <int dim>
290 template <typename Number>
291 inline
294 {
295  const Number det_F = determinant(F);
297  ExcMessage("Deformation gradient has a negative determinant."));
298  const Tensor<2,dim,Number> C_ns = transpose(F)*F;
300  const SymmetricTensor<2,dim,Number> C_inv = symmetrize(invert(C_ns));
301 
302  // See Wriggers p46 equ 3.125 (but transpose indices)
303  SymmetricTensor<4,dim,Number> Dev_P = outer_product(C,C_inv); // Dev_P = C_x_C_inv
304  Dev_P /= -dim; // Dev_P = -[1/dim]C_x_C_inv
305  Dev_P += SymmetricTensor<4,dim,Number>(S); // Dev_P = S - [1/dim]C_x_C_inv
306  Dev_P *= std::pow(det_F, -2.0/dim); // Dev_P = J^{-2/dim} [S - [1/dim]C_x_C_inv]
307 
308  return Dev_P;
309 }
310 
311 
312 
313 template <int dim>
314 template <typename Number>
315 inline
318 {
319  const Number det_F = determinant(F);
321  ExcMessage("Deformation gradient has a negative determinant."));
322  const Tensor<2,dim,Number> C_ns = transpose(F)*F;
324  const SymmetricTensor<2,dim,Number> C_inv = symmetrize(invert(C_ns));
325 
326  // See Wriggers p46 equ 3.125 (not transposed)
327  SymmetricTensor<4,dim,Number> Dev_P_T = outer_product(C_inv,C); // Dev_P = C_inv_x_C
328  Dev_P_T /= -dim; // Dev_P = -[1/dim]C_inv_x_C
329  Dev_P_T += SymmetricTensor<4,dim,Number>(S); // Dev_P = S - [1/dim]C_inv_x_C
330  Dev_P_T *= std::pow(det_F, -2.0/dim); // Dev_P = J^{-2/dim} [S - [1/dim]C_inv_x_C]
331 
332  return Dev_P_T;
333 }
334 
335 
336 
337 template <int dim>
338 template <typename Number>
339 inline
342 {
343  return Number(0.5)*determinant(F)*symmetrize(invert(transpose(F)*F));
344 }
345 
346 
347 
348 template <int dim>
349 template <typename Number>
350 inline
353 {
355 
357  for (unsigned int A=0; A<dim; ++A)
358  for (unsigned int B=A; B<dim; ++B)
359  for (unsigned int C=0; C<dim; ++C)
360  for (unsigned int D=C; D<dim; ++D)
361  dC_inv_dC[A][B][C][D] -= 0.5*(C_inv[A][C] * C_inv[B][D] + C_inv[A][D] * C_inv[B][C] );
362 
363  return dC_inv_dC;
364 }
365 
366 #endif // DOXYGEN
367 
368 DEAL_II_NAMESPACE_CLOSE
369 
370 #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:1142
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:808
Definition: mpi.h:53
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)