www.mooseframework.org
IsotropicElasticityTensor.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  : ElasticityTensor(constant),
11  _lambda_set(false),
12  _mu_set(false),
13  _nu_set(false),
14  _k_set(false),
15  _lambda(0),
16  _mu(0),
17  _nu(0),
18  _k(0)
19 {
20 }
21 
22 void
24 {
25  _lambda = lambda;
26  _lambda_set = true;
27 }
28 
29 void
31 {
32  _mu = mu;
33  _mu_set = true;
34 }
35 
36 void
38 {
39  _E = E;
40  _E_set = true;
41 }
42 
43 void
45 {
46  _nu = nu;
47  _nu_set = true;
48 }
49 
50 void
52 {
53  _k = k;
54  _k_set = true;
55 }
56 
57 void
59 {
60  setMu(k);
61 }
62 
63 void
65 {
66  if (_lambda_set && _mu_set) // First and second Lame
67  return;
68  else if (_lambda_set && _nu_set)
69  _mu = (_lambda * (1.0 - 2.0 * _nu)) / (2.0 * _nu);
70  else if (_lambda_set && _k_set)
71  _mu = (3.0 * (_k - _lambda)) / 2.0;
72  else if (_lambda_set && _E_set)
73  _mu = ((_E - 3.0 * _lambda) / 4.0) +
74  (std::sqrt((_E - 3.0 * _lambda) * (_E - 3.0 * _lambda) + 8.0 * _lambda * _E) / 4.0);
75  else if (_mu_set && _nu_set)
76  _lambda = (2.0 * _mu * _nu) / (1.0 - 2.0 * _nu);
77  else if (_mu_set && _k_set)
78  _lambda = (3.0 * _k - 2.0 * _mu) / 3.0;
79  else if (_mu_set && _E_set)
80  _lambda = ((2.0 * _mu - _E) * _mu) / (_E - 3.0 * _mu);
81  else if (_nu_set && _k_set)
82  {
83  _lambda = (3.0 * _k * _nu) / (1.0 + _nu);
84  _mu = (3.0 * _k * (1.0 - 2.0 * _nu)) / (2.0 * (1.0 + _nu));
85  }
86  else if (_E_set && _nu_set) // Young's Modulus and Poisson's Ratio
87  {
88  _lambda = (_nu * _E) / ((1.0 + _nu) * (1 - 2.0 * _nu));
89  _mu = _E / (2.0 * (1.0 + _nu));
90  }
91  else if (_E_set && _k_set)
92  {
93  _lambda = (3.0 * _k * (3.0 * _k - _E)) / (9.0 * _k - _E);
94  _mu = (3.0 * _E * _k) / (9.0 * _k - _E);
95  }
96  _lambda_set = true;
97  _mu_set = true;
98 }
99 
100 Real
102  const unsigned j,
103  const unsigned k,
104  const unsigned l)
105 {
106  return _lambda * (i == j) * (k == l) + _mu * ((i == k) * (j == l) + (i == l) * (j == k));
107 }
108 
109 void
111 {
113 
114  unsigned int i, j, k, l;
115  i = j = k = l = 0;
116 
117  // Walk down the columns of the 9x9 matrix
118  for (unsigned int q = 0; q < 81; ++q)
119  {
120  // This algorithm was developed by Derek Gaston and Cody Permann
121  // it's based on page 29 of Michael Tonk's notes
122  j += i / 3;
123  k += j / 3;
124  l += k / 3;
125 
126  i %= 3;
127  j %= 3;
128  k %= 3;
129  l %= 3;
130 
131  _values[q] = isotropicEntry(i, j, k, l);
132 
133  ++i;
134  }
135 }
void setPoissonsRatio(const Real nu)
Set Poissons Ratio.
void setBulkModulus(const Real k)
Set the Bulk Modulus.
This class defines a basic set of capabilities any elasticity tensor should have. ...
IsotropicElasticityTensor(const bool constant=true)
void setLambda(const Real lambda)
Set the first Lame Coefficient.
virtual void calculateEntries(unsigned int qp)
Fill in the matrix.
void calculateLameCoefficients()
Calculates lambda and mu based on what has been set.
Real isotropicEntry(const unsigned int i, const unsigned j, const unsigned k, const unsigned l)
Computes a single entry of C_ijkl.
void setShearModulus(const Real k)
Set the shear modulus...
void setYoungsModulus(const Real E)
Set the Young&#39;s Modulus.
void setMu(const Real mu)
Set the second Lame Coefficient.