Reference documentation for deal.II version 8.5.1
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/symmetric_tensor.h>
21 #include <deal.II/base/tensor.h>
22 
23 DEAL_II_NAMESPACE_OPEN
24 
25 namespace Physics
26 {
27 
28  namespace Elasticity
29  {
30 
45  template <int dim>
47  {
48  public:
49 
54 
72  static const SymmetricTensor<2, dim> I;
73 
97  static const SymmetricTensor<4, dim> S;
98 
109 
111 
116 
150 
206  template <typename Number>
208  Dev_P (const Tensor<2, dim, Number> &F);
209 
220  template <typename Number>
222  Dev_P_T (const Tensor<2, dim, Number> &F);
223 
225 
247  template <typename Number>
250 
252 
257 
271  template <typename Number>
274 
276  };
277 
278  }
279 }
280 
281 
282 
283 #ifndef DOXYGEN
284 
285 // ------------------------- inline functions ------------------------
286 
287 
288 template <int dim>
289 template <typename Number>
290 inline
293 {
294  const Number det_F = determinant(F);
295  Assert(det_F > Number(0.0),
296  ExcMessage("Deformation gradient has a negative determinant."));
297  const Tensor<2,dim,Number> C_ns = transpose(F)*F;
299  const SymmetricTensor<2,dim,Number> C_inv = symmetrize(invert(C_ns));
300 
301  // See Wriggers p46 equ 3.125 (but transpose indices)
302  SymmetricTensor<4,dim,Number> Dev_P = outer_product(C,C_inv); // Dev_P = C_x_C_inv
303  Dev_P /= -dim; // Dev_P = -[1/dim]C_x_C_inv
304  Dev_P += SymmetricTensor<4,dim,Number>(S); // Dev_P = S - [1/dim]C_x_C_inv
305  Dev_P *= std::pow(det_F, -2.0/dim); // Dev_P = J^{-2/dim} [S - [1/dim]C_x_C_inv]
306 
307  return Dev_P;
308 }
309 
310 
311 
312 template <int dim>
313 template <typename Number>
314 inline
317 {
318  const Number det_F = determinant(F);
319  Assert(det_F > Number(0.0),
320  ExcMessage("Deformation gradient has a negative determinant."));
321  const Tensor<2,dim,Number> C_ns = transpose(F)*F;
323  const SymmetricTensor<2,dim,Number> C_inv = symmetrize(invert(C_ns));
324 
325  // See Wriggers p46 equ 3.125 (not transposed)
326  SymmetricTensor<4,dim,Number> Dev_P_T = outer_product(C_inv,C); // Dev_P = C_inv_x_C
327  Dev_P_T /= -dim; // Dev_P = -[1/dim]C_inv_x_C
328  Dev_P_T += SymmetricTensor<4,dim,Number>(S); // Dev_P = S - [1/dim]C_inv_x_C
329  Dev_P_T *= std::pow(det_F, -2.0/dim); // Dev_P = J^{-2/dim} [S - [1/dim]C_inv_x_C]
330 
331  return Dev_P_T;
332 }
333 
334 
335 
336 template <int dim>
337 template <typename Number>
338 inline
341 {
342  return Number(0.5)*determinant(F)*symmetrize(invert(transpose(F)*F));
343 }
344 
345 
346 
347 template <int dim>
348 template <typename Number>
349 inline
352 {
354 
356  for (unsigned int A=0; A<dim; ++A)
357  for (unsigned int B=A; B<dim; ++B)
358  for (unsigned int C=0; C<dim; ++C)
359  for (unsigned int D=C; D<dim; ++D)
360  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] );
361 
362  return dC_inv_dC;
363 }
364 
365 #endif // DOXYGEN
366 
367 DEAL_II_NAMESPACE_CLOSE
368 
369 #endif
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:313
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)
Definition: mpi.h:41
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)
SymmetricTensor< 2, dim, Number > invert(const SymmetricTensor< 2, dim, Number > &)
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)