www.mooseframework.org
IsotropicElasticityTensorRZ.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
8 
10  : IsotropicElasticityTensor(constant)
11 {
12 }
13 
14 void
16 {
18 
19  mooseAssert(_lambda_set && _mu_set, "Both lambda and mu must be set");
20 
21  // Calculate lambda, the shear modulus, and Young's modulus
22  if (!_nu_set)
23  {
24  _nu = _lambda / (2 * (_lambda + _mu));
25  }
26  if (!_E_set)
27  {
28  _E = _mu * (3 * _lambda + 2 * _mu) / (_lambda + _mu);
29  }
30 
31  _nu_set = true;
32  _E_set = true;
33 }
34 
35 void
37 {
38 
40 
41  for (unsigned int q = 0; q < 81; ++q)
42  {
43  _values[q] = 0;
44  }
45 
46  const Real C0 = _E * (1 - _nu) / ((1 + _nu) * (1 - 2 * _nu));
47  const Real C1 = 1;
48  const Real C2 = _nu / (1 - _nu);
49  const Real C3 = (1 - 2 * _nu) / (2 * (1 - _nu));
50 
51  const int row(9);
52 
53  _values[0 * row + 0] = C0 * C1;
54  _values[0 * row + 4] = C0 * C2;
55  _values[0 * row + 8] = C0 * C2;
56 
57  _values[1 * row + 1] = C0 * C3;
58  _values[1 * row + 3] = C0 * C3;
59 
60  _values[3 * row + 1] = C0 * C3;
61  _values[3 * row + 3] = C0 * C3;
62 
63  _values[4 * row + 0] = C0 * C2;
64  _values[4 * row + 4] = C0 * C1;
65  _values[4 * row + 8] = C0 * C2;
66 
67  _values[8 * row + 0] = C0 * C2;
68  _values[8 * row + 4] = C0 * C2;
69  _values[8 * row + 8] = C0 * C1;
70 }
void calculateLameCoefficients()
Calculates lambda and mu based on what has been set.
Defines an Isotropic Elasticity Tensor.
virtual void calculateEntries(unsigned int qp)
Fill in the matrix.
void calculateLameCoefficients()
Calculates lambda and mu based on what has been set.
IsotropicElasticityTensorRZ(const bool constant=true)