ln_space
Public Member Functions | Public Attributes | Private Attributes | List of all members
ln_space< dim > Class Template Reference

#include <ln_space.h>

Public Member Functions

 ln_space ()
 
void pre_ln (Tensor< 2, 3 > &F)
 
void post_ln (SymmetricTensor< 2, 3 > &stress_measure_T_sym, SymmetricTensor< 4, 3 > &elasto_plastic_tangent)
 
SymmetricTensor< 2, 3 > post_transform (SymmetricTensor< 2, 3 > &ln_tensor)
 
SymmetricTensor< 2, 3 > plastic_right_cauchy_green_AS (SymmetricTensor< 2, dim > plastic_hencky_strain)
 
template<>
void post_ln (SymmetricTensor< 2, 3 > &stress_measure_T_sym, SymmetricTensor< 4, 3 > &elasto_plastic_tangent)
 
template<>
void post_ln (SymmetricTensor< 2, 3 > &stress_measure_T_sym, SymmetricTensor< 4, 3 > &elasto_plastic_tangent)
 

Public Attributes

SymmetricTensor< 2, dim > hencky_strain
 
SymmetricTensor< 2, 3 > hencky_strain_3D
 
SymmetricTensor< 2, dim > second_piola_stress_S
 
SymmetricTensor< 4, dim > C
 
SymmetricTensor< 4, 3 > C_3D
 

Private Attributes

Vector< double > eigenvalues
 
std::vector< Tensor< 1, 3 > > eigenvector
 
std::vector< SymmetricTensor< 2, 3 > > eigenbasis
 
Vector< double > ea
 
Vector< double > da
 
Vector< double > fa
 
SymmetricTensor< 4, 3 > projection_tensor_P_sym
 
const double comp_tolerance = 1e-8
 

Constructor & Destructor Documentation

template<int dim>
ln_space< dim >::ln_space ( )
70 :
71 eigenvalues(3),
72 eigenvector(3),
73 eigenbasis(3),
74 ea(3),
75 da(3),
76 fa(3)
77 {
78 }
std::vector< Tensor< 1, 3 > > eigenvector
Definition: ln_space.h:56
std::vector< SymmetricTensor< 2, 3 > > eigenbasis
Definition: ln_space.h:57
Vector< double > eigenvalues
Definition: ln_space.h:55
Vector< double > da
Definition: ln_space.h:59
Vector< double > fa
Definition: ln_space.h:60
Vector< double > ea
Definition: ln_space.h:58

Member Function Documentation

template<int dim>
SymmetricTensor< 2, 3 > ln_space< dim >::plastic_right_cauchy_green_AS ( SymmetricTensor< 2, dim >  plastic_hencky_strain)

References ln_space< dim >::ea, ln_space< dim >::eigenvector, and outer_product_sym().

516 {
517  AssertThrow( false, ExcMessage("plastic_right_cauchy_green_AS<< Sorry. Even though the algorithm "
518  "to compute the plastic RCG tensor was tested, the implementation into this "
519  "ln-space class has not been tested at all. So either you have enough faith to "
520  "simply remove this AssertThrow in the code or you do some testing to validate the function yourself."));
521 
522  // Compute the eigenvalues and eigenvectors of the plastic hencky strain
523  Vector<double> eigenvalues_pl(3);
524  std::vector< Tensor<1,3> > eigenvector_pl(3);
525  for (unsigned int i = 0; i < 3; ++i)
526  {
527  eigenvalues_pl[i] = eigenvectors(plastic_hencky_strain)[i].first;
528  eigenvector_pl[i] = eigenvectors(plastic_hencky_strain)[i].second;
529  }
530 
531  // Check if the found eigenvectors are perpendicular to each other
532  // @todo Change the \a false to a criterion detecting whether the code is run in debug or release mode
533  if ( false /*no debugging*/)
534  {
535  if ((fabs(eigenvalues_pl(0) - 1) > 1e-10)
536  && (fabs(eigenvalues_pl(1) - 1) > 1e-10)
537  && (fabs(eigenvalues_pl(2) - 1) > 1e-10))
538  for (unsigned int i = 0; i < 3; ++i)
539  for (unsigned int j = i + 1; j < 3; ++j)
540  Assert( (fabs(eigenvector[i] * eigenvector[j]) < 1e-12),
541  ExcMessage("Eigenvectors are not perpendicular to each other") );
542  }
543 
544  // Compute eigenbasis
545  std::vector< SymmetricTensor<2,3> > eigenbasis_pl(3);
546  for (unsigned int i = 0; i < 3; ++i)
547  eigenbasis_pl[i] = outer_product_sym( eigenvector_pl[i] );
548 
549  // Compute the values of \a ea
550  Vector<double> ea(3);
551  for (unsigned int i = 0; i < 3; ++i)
552  ea(i) = exp(2.0* eigenvalues_pl(i)); // diagonal
553 
554  // Finally compute the plastic right Cauchy-Green tensor
555  SymmetricTensor<2,3> plastic_right_cauchy_green;
556  for (unsigned int a = 0; a < 3; ++a)
557  plastic_right_cauchy_green += ea(a) * eigenbasis_pl[a];
558 
559  return plastic_right_cauchy_green;
560 }
std::vector< Tensor< 1, 3 > > eigenvector
Definition: ln_space.h:56
SymmetricTensor< 4, dim > outer_product_sym(const SymmetricTensor< 2, dim > &A, const SymmetricTensor< 2, dim > &B)
Definition: functions.h:110
Vector< double > ea
Definition: ln_space.h:58
template<int dim>
void ln_space< dim >::post_ln ( SymmetricTensor< 2, 3 > &  stress_measure_T_sym,
SymmetricTensor< 4, 3 > &  elasto_plastic_tangent 
)
template<>
void ln_space< 3 >::post_ln ( SymmetricTensor< 2, 3 > &  stress_measure_T_sym,
SymmetricTensor< 4, 3 > &  elasto_plastic_tangent 
)

References ln_space< dim >::C, ln_space< dim >::C_3D, ln_space< dim >::comp_tolerance, ln_space< dim >::da, ln_space< dim >::ea, ln_space< dim >::eigenbasis, ln_space< dim >::eigenvalues, ln_space< dim >::fa, get_tensor_operator_F_left(), get_tensor_operator_F_right(), get_tensor_operator_G(), outer_product_sym(), ln_space< dim >::projection_tensor_P_sym, ln_space< dim >::second_piola_stress_S, symmetrize(), and symmetry_check().

177 {
178  /*
179  * 3. Set up coefficients \a theta, \a xi and \a eta
180  */
181 
182  // Compute the coefficients based on the eigenvalues, eigenvectors and ea,da,fa
183  Tensor<2,3> theta;
184  Tensor<2,3> xi;
185  double eta = 999999999.0;
186 
187  // For three different eigenvalues \f$ \lambda_a \neq \lambda_b \neq \lambda_c \f$
188  if (
189  ( !(std::fabs(eigenvalues(0) - eigenvalues(1)) < comp_tolerance) )
190  &&
191  ( !(std::fabs(eigenvalues(0) - eigenvalues(2)) < comp_tolerance) )
192  &&
193  ( !(std::fabs(eigenvalues(1) - eigenvalues(2)) < comp_tolerance) )
194  )
195  {
196  eta = 0.0;
197  for (unsigned int a = 0; a < 3; ++a)
198  for (unsigned int b = 0; b < 3; ++b)
199  if (a != b)
200  {
201  theta[a][b] = (ea(a) - ea(b))
202  / (eigenvalues(a) - eigenvalues(b));
203  xi[a][b] = (theta[a][b] - 0.5 * da(b))
204  / (eigenvalues(a) - eigenvalues(b));
205 
206  for (unsigned int c = 0; c < 3; ++c)
207  if ((c != a) && (c != b))
208  {
209  eta +=
210  ea(a)
211  / (2.0
212  * (eigenvalues(a)
213  - eigenvalues(b))
214  * (eigenvalues(a)
215  - eigenvalues(c)));
216  }
217  }
218  }
219  // For three equal eigenvalues \f$ \lambda_a = \lambda_b = \lambda_c \f$
220  else if ( (std::fabs(eigenvalues(0) - eigenvalues(1)) < comp_tolerance)
221  &&
222  (std::fabs(eigenvalues(1) - eigenvalues(2)) < comp_tolerance) )
223  {
224  eta = 0.0;
225  for (unsigned int a = 0; a < 3; ++a)
226  {
227  for (unsigned int b = 0; b < 3; ++b)
228  if (a != b)
229  {
230  theta[a][b] = 0.5 * da(0);
231  xi[a][b] = (1.0 / 8.0) * fa(0);
232  }
233  }
234  eta = (1.0 / 8.0) * fa(0);
235  }
236 
237  // For two equal eigenvalues a and b: \f$ \lambda_a = \lambda_b \neq \lambda_c \f$
238  else if ( (std::fabs(eigenvalues(0) - eigenvalues(1)) < comp_tolerance)
239  &&
240  ( !(std::fabs(eigenvalues(1) - eigenvalues(2)) < comp_tolerance) ) )
241  {
242  eta = 0.0;
243  for (unsigned int a = 0; a < 3; ++a)
244  for (unsigned int b = 0; b < 3; ++b)
245  if ((a != b) && ((a == 2) || (b == 2)))
246  {
247  theta[a][b] = (ea(a) - ea(b))
248  / (eigenvalues(a) - eigenvalues(b));
249  xi[a][b] = (theta[a][b] - 0.5 * da(b))
250  / (eigenvalues(a) - eigenvalues(b));
251  }
252 
253  theta[0][1] = 0.5 * da(0);
254  theta[1][0] = theta[0][1];
255  xi[0][1] = (1.0 / 8.0) * fa(0);
256  xi[1][0] = xi[0][1];
257  eta = xi[2][0];
258  }
259  // For two equal eigenvalues a and c: \f$ \lambda_a = \lambda_c \neq \lambda_b \f$
260  else if ( (std::fabs(eigenvalues(0) - eigenvalues(2)) < comp_tolerance)
261  &&
262  (!(std::fabs(eigenvalues(1) - eigenvalues(2)) < comp_tolerance)) )
263  {
264  eta = 0.0;
265  for (unsigned int a = 0; a < 3; ++a)
266  for (unsigned int b = 0; b < 3; ++b)
267  if ( (a != b) && ((a == 1) || (b == 1)) )
268  {
269  theta[a][b] = (ea(a) - ea(b))
270  / (eigenvalues(a) - eigenvalues(b));
271  xi[a][b] = (theta[a][b] - 0.5 * da(b))
272  / (eigenvalues(a) - eigenvalues(b));
273  }
274 
275  theta[0][2] = 0.5 * da(0);
276  theta[2][0] = theta[0][2];
277  xi[0][2] = (1.0 / 8.0) * fa(0);
278  xi[2][0] = xi[0][2];
279  eta = xi[1][0];
280  }
281  // For two equal eigenvalues b and c: \f$ \lambda_b = \lambda_c \neq \lambda_a \f$
282  else if ( (std::fabs(eigenvalues(1) - eigenvalues(2)) < comp_tolerance)
283  &&
284  (!(std::fabs(eigenvalues(0) - eigenvalues(1)) < comp_tolerance)) )
285  {
286  eta = 0.0;
287  for (unsigned int a = 0; a < 3; ++a)
288  for (unsigned int b = 0; b < 3; ++b)
289  if ( (a != b) && ((a == 0) || (b == 0)) )
290  {
291  theta[a][b] = (ea(a) - ea(b))
292  / (eigenvalues(a) - eigenvalues(b));
293  xi[a][b] = (theta[a][b] - 0.5 * da(b))
294  / (eigenvalues(a) - eigenvalues(b));
295  }
296 
297  theta[1][2] = 0.5 * da(1);
298  theta[2][1] = theta[1][2];
299  xi[1][2] = (1.0 / 8.0) * fa(1);
300  xi[2][1] = xi[1][2];
301  eta = xi[0][1];
302  }
303  else
304  {
305  deallog << "ln-space<< eigenvalues:0: " << eigenvalues[0] << std::endl;
306  deallog << "ln-space<< eigenvalues:1: " << eigenvalues[1] << std::endl;
307  deallog << "ln-space<< eigenvalues:2: " << eigenvalues[2] << std::endl;
308  AssertThrow( false,
309  ExcMessage("ln-space<< Eigenvalue case not possible, check update_qph!") );
310  }
311 
312  // Ensure that \a eta was initialised in one of the cases
313  //AssertThrow( (eta < 9999999), ExcMessage("Eta in update_qph not initialised") );
314 
315 
316  /*
317  * 4. Lagrangian stresses and elasticity moduli
318  */
319 
320  std::vector< SymmetricTensor<4,3> > Ma_x_Ma (3);
321  // Compute projection tensor P
322  Tensor<4,3> projection_tensor_P;
323  for (unsigned int a = 0; a < 3; ++a)
324  {
325  Ma_x_Ma[a] = outer_product_sym(eigenbasis[a]);
326  projection_tensor_P += da(a) * (Tensor<4,3> ) Ma_x_Ma[a];
327  for (unsigned int b = 0; b < 3; ++b)
328  if (b != a)
329  projection_tensor_P += theta[a][b] * get_tensor_operator_G(eigenbasis[a],eigenbasis[b]);
330  }
331 
332  // Check whether the projecton tensor is symmetric and store it into a \a SymmetricTensor
333  Assert( symmetry_check(projection_tensor_P), ExcMessage( "ln-space<< Projection tensor P is not symmetric") );
334  projection_tensor_P_sym = symmetrize(projection_tensor_P);
335 
336  // Compute the double contraction of T and L
337  Tensor<4,3> projection_tensor_T_doublecon_L;
338  for (unsigned int a = 0; a < 3; ++a)
339  {
340  projection_tensor_T_doublecon_L += fa(a)
341  * (stress_measure_T_sym * eigenbasis[a])
342  * (Tensor<4,3> ) Ma_x_Ma[a];
343  for (unsigned int b = 0; b < 3; ++b)
344  if (b != a)
345  {
346  projection_tensor_T_doublecon_L += 2.0 * xi[a][b]
347  * (
348  get_tensor_operator_F_right( eigenbasis[a], eigenbasis[b], eigenbasis[b], stress_measure_T_sym )
349  + get_tensor_operator_F_left( eigenbasis[a], eigenbasis[b], eigenbasis[b], stress_measure_T_sym )
350  + get_tensor_operator_F_right( eigenbasis[b], eigenbasis[b], eigenbasis[a], stress_measure_T_sym )
351  + get_tensor_operator_F_left( eigenbasis[b], eigenbasis[b], eigenbasis[a], stress_measure_T_sym )
352  + get_tensor_operator_F_right( eigenbasis[b], eigenbasis[a], eigenbasis[b], stress_measure_T_sym )
353  + get_tensor_operator_F_left( eigenbasis[b], eigenbasis[a], eigenbasis[b], stress_measure_T_sym )
354  );
355 
356  for (unsigned int c = 0; c < 3; ++c)
357  if ( (c != a) && (c != b) )
358  {
359  projection_tensor_T_doublecon_L += 2.0 * eta
360  * (
361  get_tensor_operator_F_right( eigenbasis[a], eigenbasis[b], eigenbasis[c], stress_measure_T_sym )
362  + get_tensor_operator_F_left( eigenbasis[b], eigenbasis[c], eigenbasis[a], stress_measure_T_sym )
363  );
364  }
365  }
366  }
367 
368  // Check whether the tensor is symmetric and store it into a \a SymmetricTensor
369  Assert( symmetry_check(projection_tensor_T_doublecon_L),
370  ExcMessage("ln-space<< Projection tensor T:L is not symmetric") );
371  SymmetricTensor<4,3> projection_tensor_T_doublecon_L_sym = symmetrize(projection_tensor_T_doublecon_L);
372 
373  // Compute the retransformed values
374  second_piola_stress_S = stress_measure_T_sym * projection_tensor_P_sym;
375 
376  C = projection_tensor_P_sym * elasto_plastic_tangent * projection_tensor_P_sym
377  + projection_tensor_T_doublecon_L_sym;
378  C_3D = C;
379 }
bool symmetry_check(Tensor< 2, dim > &tensor)
Definition: functions.h:163
SymmetricTensor< 2, dim > second_piola_stress_S
Definition: ln_space.h:40
std::vector< SymmetricTensor< 2, 3 > > eigenbasis
Definition: ln_space.h:57
const double comp_tolerance
Definition: ln_space.h:64
Vector< double > eigenvalues
Definition: ln_space.h:55
SymmetricTensor< 4, dim > C
Definition: ln_space.h:41
SymmetricTensor< 4, 3 > C_3D
Definition: ln_space.h:42
Tensor< 4, dim > get_tensor_operator_F_right(const SymmetricTensor< 2, dim > &Ma, const SymmetricTensor< 2, dim > &Mb, const SymmetricTensor< 2, dim > &Mc, const SymmetricTensor< 2, dim > &T)
Definition: functions.h:53
Vector< double > da
Definition: ln_space.h:59
SymmetricTensor< 4, dim > outer_product_sym(const SymmetricTensor< 2, dim > &A, const SymmetricTensor< 2, dim > &B)
Definition: functions.h:110
SymmetricTensor< 4, 3 > projection_tensor_P_sym
Definition: ln_space.h:62
Tensor< 4, dim > get_tensor_operator_G(const SymmetricTensor< 2, dim > &Ma, const SymmetricTensor< 2, dim > &Mb)
Definition: functions.h:33
Vector< double > fa
Definition: ln_space.h:60
Tensor< 4, dim > get_tensor_operator_F_left(const SymmetricTensor< 2, dim > &Ma, const SymmetricTensor< 2, dim > &Mb, const SymmetricTensor< 2, dim > &Mc, const SymmetricTensor< 2, dim > &T)
Definition: functions.h:79
Vector< double > ea
Definition: ln_space.h:58
SymmetricTensor< 4, dim > symmetrize(const Tensor< 4, dim > &tensor)
Definition: functions.h:209
template<>
void ln_space< 2 >::post_ln ( SymmetricTensor< 2, 3 > &  stress_measure_T_sym,
SymmetricTensor< 4, 3 > &  elasto_plastic_tangent 
)

References ln_space< dim >::C, ln_space< dim >::C_3D, ln_space< dim >::comp_tolerance, ln_space< dim >::da, ln_space< dim >::ea, ln_space< dim >::eigenbasis, ln_space< dim >::eigenvalues, ln_space< dim >::fa, outer_product_sym(), ln_space< dim >::projection_tensor_P_sym, ln_space< dim >::second_piola_stress_S, symmetrize(), and symmetry_check().

393 {
394  /*
395  * 3. Set up coefficients \a theta, \a xi and \a eta
396  */
397 
398  // Compute the coefficients based on the eigenvalues, eigenvectors and ea,da,fa
399  Vector<double> gamma (3);
400  Vector<double> kappa (2);
401  double beta = 999999999.0;
402 
403  // For two different eigenvalues \f$ \lambda_a \neq \lambda_b \f$
404  if (std::fabs(eigenvalues(0) - eigenvalues(1)) > comp_tolerance)
405  {
406  beta = 2. * (ea[0]-ea[1]) / (eigenvalues(0) - eigenvalues(1));
407  for (unsigned int a = 0; a < 3; ++a)
408  gamma[a] = da[a] - beta;
409  for (unsigned int alpha = 0; alpha < 2; ++alpha)
410  kappa[alpha] = 2. * gamma[alpha] / (eigenvalues(0) - eigenvalues(1));
411  }
412  // For two equal eigenvalues a and b: \f$ \lambda_a = \lambda_b \f$
413  else if (std::fabs(eigenvalues(0) - eigenvalues(1)) <= comp_tolerance)
414  {
415  beta = da[0];
416  for (unsigned int a = 0; a < 3; ++a)
417  gamma[a] = da[a] - da[0];
418  for (unsigned int alpha = 0; alpha < 2; ++alpha)
419  kappa[alpha] = (1.5 - (alpha+1)) * fa[0]; // index alpha starts at 0, hence (alpha+1)
420  }
421  else
422  {
423  deallog << "ln-space<< eigenvalues:0: " << eigenvalues[0] << std::endl;
424  deallog << "ln-space<< eigenvalues:1: " << eigenvalues[1] << std::endl;
425  deallog << "ln-space<< eigenvalues:2: " << eigenvalues[2] << std::endl;
426  AssertThrow( false,
427  ExcMessage("ln-space<< Eigenvalue case not possible, check update_qph!") );
428  }
429 
430  // Ensure that \a eta was initialised in one of the cases
431  Assert( (beta < 9999999), ExcMessage("Beta in update_qph not initialised") );
432 
433 
434  /*
435  * 4. Lagrangian stresses and elasticity moduli
436  */
437 
438  // zeta_a = T : M_a
439  Vector<double> zeta_a (3);
440  for ( unsigned int a=0; a<3; ++a )
441  zeta_a(a) = stress_measure_T_sym * eigenbasis[a];
442 
443  // Compute projection tensor P
444  Tensor<4,3> projection_tensor_P = beta * Tensor<4,3> (StandardTensors::II<3>());
445 
446  std::vector< SymmetricTensor<4,3> > Ma_x_Ma (3);
447  // ToDo-optimize: check whether storing (M_a x M_a) saves some computation time, because we need it three times
448  for (unsigned int a = 0; a < 3; ++a)
449  {
450  Ma_x_Ma[a] = outer_product_sym(eigenbasis[a]);
451  projection_tensor_P += gamma[a] * (Tensor<4,3>) Ma_x_Ma[a];
452  }
453 
454  projection_tensor_P_sym = symmetrize(projection_tensor_P);
455 
456  // Compute the double contraction of T and L
457  // ToDo-optimize: merge the for-loops
458  Tensor<4,3> projection_tensor_T_doublecon_L;
459  for (unsigned int a = 0; a < 3; ++a)
460  {
461  projection_tensor_T_doublecon_L += fa(a)
462  * zeta_a[a]
463  * (Tensor<4,3>) Ma_x_Ma[a];
464  }
465  for (unsigned int alpha = 0; alpha < 2; ++alpha)
466  {
467  projection_tensor_T_doublecon_L += std::pow(-1, (alpha+1)+1)
468  * kappa[alpha]
469  * (
470  zeta_a[alpha] * Tensor<4,3> (StandardTensors::II<3>())
471  + outer_product_sym(stress_measure_T_sym,eigenbasis[alpha])
472  );
473  }
474  for (unsigned int a = 0; a < 3; ++a)
475  for (unsigned int alpha = 0; alpha < 2; ++alpha)
476  {
477  projection_tensor_T_doublecon_L
478  += std::pow(-1,alpha+1) * kappa[alpha]
479  * (
480  zeta_a[alpha] * Tensor<4,3> (Ma_x_Ma[a])
481  + zeta_a[a] * outer_product_sym(eigenbasis[alpha],eigenbasis[a])
482  );
483  }
484 
485  // Check whether the tensor is symmetric and store it into a \a SymmetricTensor
486  Assert( symmetry_check(projection_tensor_T_doublecon_L),
487  ExcMessage("ln-space<< Projection tensor T:L is not symmetric") );
488  SymmetricTensor<4,3> projection_tensor_T_doublecon_L_sym = symmetrize(projection_tensor_T_doublecon_L);
489 
490  // Compute the retransformed values
491  {
492  SymmetricTensor<2,3> stress_S_3D = stress_measure_T_sym * projection_tensor_P_sym;
493  second_piola_stress_S = extract_dim<2> ( stress_S_3D );
494  }
495  {
496  C_3D = projection_tensor_P_sym * elasto_plastic_tangent * projection_tensor_P_sym
497  + projection_tensor_T_doublecon_L_sym;
498 
499  C = extract_dim<2> ( C_3D );
500  }
501 }
bool symmetry_check(Tensor< 2, dim > &tensor)
Definition: functions.h:163
SymmetricTensor< 2, dim > second_piola_stress_S
Definition: ln_space.h:40
std::vector< SymmetricTensor< 2, 3 > > eigenbasis
Definition: ln_space.h:57
const double comp_tolerance
Definition: ln_space.h:64
Vector< double > eigenvalues
Definition: ln_space.h:55
SymmetricTensor< 4, dim > C
Definition: ln_space.h:41
SymmetricTensor< 4, 3 > C_3D
Definition: ln_space.h:42
Vector< double > da
Definition: ln_space.h:59
SymmetricTensor< 4, dim > outer_product_sym(const SymmetricTensor< 2, dim > &A, const SymmetricTensor< 2, dim > &B)
Definition: functions.h:110
SymmetricTensor< 4, 3 > projection_tensor_P_sym
Definition: ln_space.h:62
Vector< double > fa
Definition: ln_space.h:60
Vector< double > ea
Definition: ln_space.h:58
SymmetricTensor< 4, dim > symmetrize(const Tensor< 4, dim > &tensor)
Definition: functions.h:209
template<int dim>
SymmetricTensor< 2, 3 > ln_space< dim >::post_transform ( SymmetricTensor< 2, 3 > &  ln_tensor)

References ln_space< dim >::projection_tensor_P_sym.

509 {
510  return ln_tensor * projection_tensor_P_sym;
511 }
SymmetricTensor< 4, 3 > projection_tensor_P_sym
Definition: ln_space.h:62
template<int dim>
void ln_space< dim >::pre_ln ( Tensor< 2, 3 > &  F)

References ln_space< dim >::comp_tolerance, ln_space< dim >::da, ln_space< dim >::ea, ln_space< dim >::eigenbasis, ln_space< dim >::eigenvalues, ln_space< dim >::eigenvector, ln_space< dim >::fa, ln_space< dim >::hencky_strain, ln_space< dim >::hencky_strain_3D, outer_product_sym(), and symmetrize().

89 {
90  // Following
91  // "Algorithms for computation of stresses and elasticity moduli in terms of Seth–Hill’s family of generalized strain tensors"
92  // by Miehe&Lambrecht \n
93  // Table I. Algorithm A
94  /*
95  * 1. Eigenvalues, eigenvalue bases and diagonal functions:
96  */
97 
98  // Get the symmetric right cauchy green tensor
99  SymmetricTensor<2,3> right_cauchy_green_sym = symmetrize( transpose(F) * F);//Physics::Elasticity::Kinematics::C(F);
100 
101  // Compute Eigenvalues, Eigenvectors and Eigenbasis
102  {
103  // Get Eigenvalues and Eigenvectors from the deal.ii function \a eigenvectors(*)
104  for (unsigned int i = 0; i < 3; ++i) {
105  eigenvalues[i] = eigenvectors(right_cauchy_green_sym)[i].first;
106  eigenvector[i] = eigenvectors(right_cauchy_green_sym)[i].second;
107  }
108 
109  // The deal.ii function \a eigenvectors return the EWe in descending order, but in Miehe et al. the C33 EW
110  // shall belong to lambda_3, hence we search for the EW that equals C33
111  // and move this to the end of the list of eigenvalues and eigenvectors
112  // ToDo-optimize: if we find the EW at i=2, we can leave it there, hence the loop could be limited to (i<2)
113  // @todo-optimize: Check the use of the std::swap function
114  if ( dim==2 )
115  for (unsigned int i = 0; i < 3; ++i)
116  if ( std::abs(eigenvalues[i]-right_cauchy_green_sym[2][2]) < comp_tolerance )
117  {
118  double tmp_EW = eigenvalues[2];
119  eigenvalues[2] = eigenvalues[i]; // truely lambda_3
120  eigenvalues[i] = tmp_EW;
121 
122  Tensor<1,3> tmp_EV = eigenvector[2];
123  eigenvector[2] = eigenvector[i];
124  eigenvector[i] = tmp_EV;
125  }
126 
127  // Check if the found eigenvectors are perpendicular to each other
128 // if ((std::fabs(eigenvalues(0) - 1) > 1e-10)
129 // && (std::fabs(eigenvalues(1) - 1) > 1e-10)
130 // && (std::fabs(eigenvalues(2) - 1) > 1e-10)) {
131 // for (unsigned int i = 0; i < 3; ++i) {
132 // for (unsigned int j = i + 1; j < 3; ++j) {
133 // Assert( (std::fabs(eigenvector[i] * eigenvector[j]) < 1e-12),
134 // ExcMessage("ln-space<< Eigenvectors are not perpendicular to each other.") );
135 // }
136 // }
137 // }
138 
139  // Compute eigenbasis Ma: eigenbasis = eigenvector \otimes eigenvector
140  for (unsigned int i = 0; i < 3; ++i)
141  {
143  Assert( eigenvalues(i) >= 0.0,
144  ExcMessage("ln-space<< Eigenvalue is negativ. Check update_qph.") );
145  }
146  }
147 
148  // Compute diagonal function \a ea and its first and second derivate \a da and \a fa \n
149  for (unsigned int i = 0; i < 3; ++i)
150  {
151  ea(i) = 0.5 * std::log( std::abs(eigenvalues(i)) ); // diagonal function
152  da(i) = std::pow(eigenvalues(i), -1.0); // first derivative of diagonal function ea
153  fa(i) = -2.0 * std::pow(eigenvalues(i), -2.0); // second derivative of diagonal function ea
154  Assert( ea(i) == ea(i),
155  ExcMessage( "ln-space<< Ea is nan due to logarithm of negativ eigenvalue. Check update_qph.") );
156  Assert( da(i) > 0.0,
157  ExcMessage( "ln-space<< First derivative da of diagonal function is "+std::to_string(da(i))+" < 0.0 ."
158  "Check update_qph.") );
159  }
160 
161  // Compute the Hencky strain
162  for (unsigned int a = 0; a < 3; ++a)
163  hencky_strain_3D += ea(a) * eigenbasis[a];
164 
165  hencky_strain = extract_dim<dim> (hencky_strain_3D);
166 
167  // Output-> SymmetricTensor<2, dim> hencky_strain, Vector<double> ea, da, fa,
168  // std::vector<Tensor<1, dim>> eigenvector, Vector<double> eigenvalues,
169  // std::vector< SymmetricTensor<2, dim> > eigenbasis
170 }
std::vector< Tensor< 1, 3 > > eigenvector
Definition: ln_space.h:56
std::vector< SymmetricTensor< 2, 3 > > eigenbasis
Definition: ln_space.h:57
const double comp_tolerance
Definition: ln_space.h:64
Vector< double > eigenvalues
Definition: ln_space.h:55
SymmetricTensor< 2, 3 > hencky_strain_3D
Definition: ln_space.h:37
Vector< double > da
Definition: ln_space.h:59
SymmetricTensor< 4, dim > outer_product_sym(const SymmetricTensor< 2, dim > &A, const SymmetricTensor< 2, dim > &B)
Definition: functions.h:110
SymmetricTensor< 2, dim > hencky_strain
Definition: ln_space.h:36
Vector< double > fa
Definition: ln_space.h:60
Vector< double > ea
Definition: ln_space.h:58
SymmetricTensor< 4, dim > symmetrize(const Tensor< 4, dim > &tensor)
Definition: functions.h:209

Member Data Documentation

template<int dim>
SymmetricTensor<4,dim> ln_space< dim >::C
template<int dim>
SymmetricTensor<4,3> ln_space< dim >::C_3D
template<int dim>
const double ln_space< dim >::comp_tolerance = 1e-8
private
template<int dim>
Vector<double> ln_space< dim >::da
private
template<int dim>
Vector<double> ln_space< dim >::ea
private
template<int dim>
std::vector< SymmetricTensor<2,3> > ln_space< dim >::eigenbasis
private
template<int dim>
Vector<double> ln_space< dim >::eigenvalues
private
template<int dim>
std::vector< Tensor<1,3> > ln_space< dim >::eigenvector
private
template<int dim>
Vector<double> ln_space< dim >::fa
private
template<int dim>
SymmetricTensor<2,dim> ln_space< dim >::hencky_strain

Referenced by ln_space< dim >::pre_ln().

template<int dim>
SymmetricTensor<2,3> ln_space< dim >::hencky_strain_3D

Referenced by ln_space< dim >::pre_ln().

template<int dim>
SymmetricTensor<4,3> ln_space< dim >::projection_tensor_P_sym
private
template<int dim>
SymmetricTensor<2,dim> ln_space< dim >::second_piola_stress_S

The documentation for this class was generated from the following file: