www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SymmIsotropicElasticityTensor Class Reference

Defines an Isotropic Elasticity Tensor. More...

#include <SymmIsotropicElasticityTensor.h>

Inheritance diagram for SymmIsotropicElasticityTensor:
[legend]

Public Member Functions

 SymmIsotropicElasticityTensor (const bool constant=true)
 
virtual ~SymmIsotropicElasticityTensor ()
 
void unsetConstants ()
 
void setLambda (const Real lambda)
 Set the first Lame Coefficient. More...
 
void setMu (const Real mu)
 Set the second Lame Coefficient. More...
 
void setYoungsModulus (const Real E)
 Set the Young's Modulus. More...
 
void setPoissonsRatio (const Real nu)
 Set Poissons Ratio. More...
 
void setBulkModulus (const Real k)
 Set the Bulk Modulus. More...
 
void setShearModulus (const Real k)
 Set the shear modulus... More...
 
Real mu () const
 Return Mu. More...
 
Real shearModulus () const
 Return the shear modulus... More...
 
Real youngsModulus () const
 Return the youngs modulus. More...
 
virtual Real stiffness (const unsigned i, const unsigned j, const RealGradient &test, const RealGradient &phi) const
 
virtual void multiply (const SymmTensor &x, SymmTensor &b) const
 
virtual void adjustForCracking (const RealVectorValue &crack_flags)
 
virtual void adjustForCrackingWithShearRetention (const RealVectorValue &crack_flags)
 
void constant (bool c)
 
void copyValues (SymmElasticityTensor &rhs) const
 
void calculate (unsigned int qp)
 Public function that will be called whenever the values for this matrix need to be filled in. More...
 
SymmTensor operator* (const SymmTensor &x) const
 
SymmElasticityTensor operator* (Real x) const
 
virtual Real stiffness (const unsigned int i, const unsigned int j, const RealGradient &test, const RealGradient &phi) const
 
SymmElasticityTensor operator+ (const SymmElasticityTensor &rhs) const
 
void operator+= (const SymmElasticityTensor &rhs)
 
void operator-= (const SymmElasticityTensor &rhs)
 
void operator*= (Real rhs)
 
void operator/= (Real rhs)
 
void zero ()
 
void convertFrom9x9 (const ColumnMajorMatrix &cmm)
 
void convertFrom6x6 (const ColumnMajorMatrix &cmm)
 
ColumnMajorMatrix columnMajorMatrix9x9 () const
 
ColumnMajorMatrix columnMajorMatrix6x6 () const
 
void form9x9Rotation (const ColumnMajorMatrix &R_3x3, ColumnMajorMatrix &R_9x9) const
 
void rotateFromGlobalToLocal (const ColumnMajorMatrix &R)
 
void rotateFromLocalToGlobal (const ColumnMajorMatrix &R)
 
virtual SymmElasticityTensor calculateDerivative (unsigned int qp, unsigned int i)
 
void fillFromInputVector (std::vector< Real > input, bool all)
 
Real sum_3x3 () const
 
RealGradient sum_3x1 () const
 
Real valueAtIndex (int i) const
 

Protected Member Functions

virtual void calculateEntries (unsigned int qp)
 Fill in the matrix. More...
 
void setEntries (Real C11, Real C12, Real C44)
 
void calculateLameCoefficients ()
 Calculates lambda and mu based on what has been set. More...
 

Protected Attributes

bool _lambda_set
 
bool _mu_set
 
bool _E_set
 
bool _nu_set
 
bool _k_set
 
Real _lambda
 
Real _mu
 
Real _E
 
Real _nu
 
Real _k
 
bool _constant
 Whether or not the matrix is constant for all of time and space. More...
 
bool _values_computed
 Whether or not the values have been computed once. More...
 
Real _val [21]
 

Detailed Description

Defines an Isotropic Elasticity Tensor.

The input is any two of the following:

Youngs Modulus Poissons Ration First and Second Lame Coefficients (lambda and mu) Bulk Modulus

Internally this class uses the Lame Coefficients. Everything is is transformed to these coefficients.

Note that by default this tensor is constant... meaning that it never changes after the first time it is computed.

If you want to modify this behavior you can pass in false to the constructor.

Definition at line 31 of file SymmIsotropicElasticityTensor.h.

Constructor & Destructor Documentation

SymmIsotropicElasticityTensor::SymmIsotropicElasticityTensor ( const bool  constant = true)
virtual SymmIsotropicElasticityTensor::~SymmIsotropicElasticityTensor ( )
inlinevirtual

Definition at line 36 of file SymmIsotropicElasticityTensor.h.

36 {}

Member Function Documentation

void SymmIsotropicElasticityTensor::adjustForCracking ( const RealVectorValue &  crack_flags)
virtual

Reimplemented from SymmElasticityTensor.

Definition at line 248 of file SymmIsotropicElasticityTensor.C.

Referenced by adjustForCrackingWithShearRetention(), and unsetConstants().

249 {
250  const RealVectorValue & c(crack_flags);
251  const Real c0(c(0));
252  const Real c0_coupled(c0 < 1 ? 0 : 1);
253  const Real c1(c(1));
254  const Real c1_coupled(c1 < 1 ? 0 : 1);
255  const Real c2(c(2));
256  const Real c2_coupled(c2 < 1 ? 0 : 1);
257 
258  const Real c01(c0_coupled * c1_coupled);
259  const Real c02(c0_coupled * c2_coupled);
260  const Real c12(c1_coupled * c2_coupled);
261  const Real c012(c0_coupled * c12);
262 
263  const Real ym = _mu * (3 * _lambda + 2 * _mu) / (_lambda + _mu);
264 
265  // Assume Poisson's ratio goes to zero for the cracked direction.
266 
267  _val[0] = (c0 < 1 ? c0 * ym : _val[0]);
268  _val[1] *= c01;
269  _val[2] *= c02;
270  _val[3] *= c01;
271  _val[4] *= c012;
272  _val[5] *= c02;
273 
274  _val[6] = (c1 < 1 ? c1 * ym : _val[6]);
275  _val[7] *= c12;
276  _val[8] *= c01;
277  _val[9] *= c12;
278  _val[10] *= c012;
279 
280  _val[11] = (c2 < 1 ? c2 * ym : _val[11]);
281  _val[12] *= c012;
282  _val[13] *= c12;
283  _val[14] *= c02;
284 }
void SymmIsotropicElasticityTensor::adjustForCrackingWithShearRetention ( const RealVectorValue &  crack_flags)
virtual

Reimplemented from SymmElasticityTensor.

Definition at line 287 of file SymmIsotropicElasticityTensor.C.

Referenced by unsetConstants().

289 {
290  const RealVectorValue & c = crack_flags;
291  const Real c0 = c(0);
292  const Real c0_coupled = (c0 < 1 ? 0 : 1);
293  const Real c1 = c(1);
294  const Real c1_coupled = (c1 < 1 ? 0 : 1);
295  const Real c2 = c(2);
296  const Real c2_coupled = (c2 < 1 ? 0 : 1);
297  const Real c01 = c0_coupled * c1_coupled;
298  const Real c02 = c0_coupled * c2_coupled;
299  const Real c12 = c1_coupled * c2_coupled;
300  const Real c012 = c0_coupled * c12;
301  adjustForCracking(crack_flags);
302  _val[15] *= c01;
303  _val[16] *= c012;
304  _val[17] *= c012;
305  _val[18] *= c12;
306  _val[19] *= c012;
307  _val[20] *= c02;
308 }
virtual void adjustForCracking(const RealVectorValue &crack_flags)
void SymmElasticityTensor::calculate ( unsigned int  qp)
inherited

Public function that will be called whenever the values for this matrix need to be filled in.

Definition at line 38 of file SymmElasticityTensor.C.

Referenced by SolidModel::computeElasticityTensor(), LinearIsotropicMaterial::computeProperties(), SymmElasticityTensor::copyValues(), and SolidModel::createElasticityTensor().

39 {
40  if (!_constant || !_values_computed)
41  {
42  calculateEntries(qp);
43  _values_computed = true;
44  }
45 }
bool _constant
Whether or not the matrix is constant for all of time and space.
virtual void calculateEntries(unsigned int qp)
Virtual (must be overriden by derived class).
bool _values_computed
Whether or not the values have been computed once.
SymmElasticityTensor SymmElasticityTensor::calculateDerivative ( unsigned int  qp,
unsigned int  i 
)
virtualinherited

Definition at line 325 of file SymmElasticityTensor.C.

Referenced by SymmElasticityTensor::zero().

326 {
327  return SymmElasticityTensor();
328 }
SymmElasticityTensor(const bool constant=false)
Default constructor...
void SymmIsotropicElasticityTensor::calculateEntries ( unsigned int  qp)
protectedvirtual

Fill in the matrix.

Reimplemented from SymmElasticityTensor.

Definition at line 128 of file SymmIsotropicElasticityTensor.C.

129 {
131 
132  const Real C12(_lambda);
133  const Real C44(_mu);
134  const Real C11(2 * C44 + C12);
135 
136  setEntries(C11, C12, C44);
137 }
void setEntries(Real C11, Real C12, Real C44)
void calculateLameCoefficients()
Calculates lambda and mu based on what has been set.
void SymmIsotropicElasticityTensor::calculateLameCoefficients ( )
protected

Calculates lambda and mu based on what has been set.

These are based on Michael Tonks's's notes

Definition at line 91 of file SymmIsotropicElasticityTensor.C.

Referenced by calculateEntries().

92 {
93  if (_lambda_set && _mu_set) // First and second Lame
94  return;
95  else if (_lambda_set && _nu_set)
96  _mu = (_lambda * (1.0 - 2.0 * _nu)) / (2.0 * _nu);
97  else if (_lambda_set && _k_set)
98  _mu = (3.0 * (_k - _lambda)) / 2.0;
99  else if (_lambda_set && _E_set)
100  _mu = ((_E - 3.0 * _lambda) / 4.0) +
101  (std::sqrt((_E - 3.0 * _lambda) * (_E - 3.0 * _lambda) + 8.0 * _lambda * _E) / 4.0);
102  else if (_mu_set && _nu_set)
103  _lambda = (2.0 * _mu * _nu) / (1.0 - 2.0 * _nu);
104  else if (_mu_set && _k_set)
105  _lambda = (3.0 * _k - 2.0 * _mu) / 3.0;
106  else if (_mu_set && _E_set)
107  _lambda = ((2.0 * _mu - _E) * _mu) / (_E - 3.0 * _mu);
108  else if (_nu_set && _k_set)
109  {
110  _lambda = (3.0 * _k * _nu) / (1.0 + _nu);
111  _mu = (3.0 * _k * (1.0 - 2.0 * _nu)) / (2.0 * (1.0 + _nu));
112  }
113  else if (_E_set && _nu_set) // Young's Modulus and Poisson's Ratio
114  {
115  _lambda = (_nu * _E) / ((1.0 + _nu) * (1 - 2.0 * _nu));
116  _mu = _E / (2.0 * (1.0 + _nu));
117  }
118  else if (_E_set && _k_set)
119  {
120  _lambda = (3.0 * _k * (3.0 * _k - _E)) / (9.0 * _k - _E);
121  _mu = (3.0 * _E * _k) / (9.0 * _k - _E);
122  }
123  _lambda_set = true;
124  _mu_set = true;
125 }
ColumnMajorMatrix SymmElasticityTensor::columnMajorMatrix6x6 ( ) const
inherited

Definition at line 227 of file SymmElasticityTensor.C.

Referenced by SymmAnisotropicElasticityTensor::form_transformed_material_dt_matrix(), and SymmElasticityTensor::zero().

228 {
229  ColumnMajorMatrix cmm(6, 6);
230  unsigned count(0);
231  for (unsigned i(0); i < 6; ++i)
232  {
233  for (unsigned j(i); j < 6; ++j)
234  {
235  cmm(i, j) = cmm(j, i) = _val[count++];
236  }
237  }
238  return cmm;
239 }
ColumnMajorMatrix SymmElasticityTensor::columnMajorMatrix9x9 ( ) const
inherited

Definition at line 242 of file SymmElasticityTensor.C.

Referenced by SymmAnisotropicElasticityTensor::form_transformed_material_dmat_matrix(), SymmElasticityTensor::rotateFromGlobalToLocal(), SymmElasticityTensor::rotateFromLocalToGlobal(), and SymmElasticityTensor::zero().

243 {
244  ColumnMajorMatrix cmm(9, 9);
245  cmm(0, 0) = _val[0];
246  cmm(0, 1) = cmm(1, 0) = _val[3];
247  cmm(0, 2) = cmm(2, 0) = _val[5];
248  cmm(0, 3) = cmm(3, 0) = _val[3];
249  cmm(0, 4) = cmm(4, 0) = _val[1];
250  cmm(0, 5) = cmm(5, 0) = _val[4];
251  cmm(0, 6) = cmm(6, 0) = _val[5];
252  cmm(0, 7) = cmm(7, 0) = _val[4];
253  cmm(0, 8) = cmm(8, 0) = _val[2];
254 
255  cmm(1, 1) = _val[15];
256  cmm(1, 2) = cmm(2, 1) = _val[17];
257  cmm(1, 3) = cmm(3, 1) = _val[15];
258  cmm(1, 4) = cmm(4, 1) = _val[8];
259  cmm(1, 5) = cmm(5, 1) = _val[16];
260  cmm(1, 6) = cmm(6, 1) = _val[17];
261  cmm(1, 7) = cmm(7, 1) = _val[16];
262  cmm(1, 8) = cmm(8, 1) = _val[12];
263 
264  cmm(2, 2) = _val[20];
265  cmm(2, 3) = cmm(3, 2) = _val[17];
266  cmm(2, 4) = cmm(4, 2) = _val[10];
267  cmm(2, 5) = cmm(5, 2) = _val[19];
268  cmm(2, 6) = cmm(6, 2) = _val[20];
269  cmm(2, 7) = cmm(7, 2) = _val[19];
270  cmm(2, 8) = cmm(8, 2) = _val[14];
271 
272  cmm(3, 3) = _val[15];
273  cmm(3, 4) = cmm(4, 3) = _val[8];
274  cmm(3, 5) = cmm(5, 3) = _val[16];
275  cmm(3, 6) = cmm(6, 3) = _val[17];
276  cmm(3, 7) = cmm(7, 3) = _val[16];
277  cmm(3, 8) = cmm(8, 3) = _val[12];
278 
279  cmm(4, 4) = _val[6];
280  cmm(4, 5) = cmm(5, 4) = _val[9];
281  cmm(4, 6) = cmm(6, 4) = _val[10];
282  cmm(4, 7) = cmm(7, 4) = _val[9];
283  cmm(4, 8) = cmm(8, 4) = _val[7];
284 
285  cmm(5, 5) = _val[18];
286  cmm(5, 6) = cmm(6, 5) = _val[19];
287  cmm(5, 7) = cmm(7, 5) = _val[18];
288  cmm(5, 8) = cmm(8, 5) = _val[13];
289 
290  cmm(6, 6) = _val[20];
291  cmm(6, 7) = cmm(7, 6) = _val[19];
292  cmm(6, 8) = cmm(8, 6) = _val[14];
293 
294  cmm(7, 7) = _val[18];
295  cmm(7, 8) = cmm(8, 7) = _val[13];
296 
297  cmm(8, 8) = _val[11];
298 
299  return cmm;
300 }
void SymmElasticityTensor::constant ( bool  c)
inlineinherited

Definition at line 64 of file SymmElasticityTensor.h.

64 { _constant = c; }
bool _constant
Whether or not the matrix is constant for all of time and space.
void SymmElasticityTensor::convertFrom6x6 ( const ColumnMajorMatrix &  cmm)
inherited

Definition at line 191 of file SymmElasticityTensor.C.

Referenced by SymmElasticityTensor::zero().

192 {
193  if (input.numEntries() != 36)
194  {
195  mooseError("Cannot convert from ColumnMajorMatrix (wrong size)");
196  }
197 
198  _val[0] = input(0, 0);
199  _val[1] = input(0, 1);
200  _val[2] = input(0, 2);
201  _val[3] = input(0, 3);
202  _val[4] = input(0, 4);
203  _val[5] = input(0, 5);
204 
205  _val[6] = input(1, 1);
206  _val[7] = input(1, 2);
207  _val[8] = input(1, 3);
208  _val[9] = input(1, 4);
209  _val[10] = input(1, 5);
210 
211  _val[11] = input(2, 2);
212  _val[12] = input(2, 3);
213  _val[13] = input(2, 4);
214  _val[14] = input(2, 5);
215 
216  _val[15] = input(3, 3);
217  _val[16] = input(3, 4);
218  _val[17] = input(3, 5);
219 
220  _val[18] = input(4, 4);
221  _val[19] = input(4, 5);
222 
223  _val[20] = input(5, 5);
224 }
void SymmElasticityTensor::convertFrom9x9 ( const ColumnMajorMatrix &  cmm)
inherited

Definition at line 155 of file SymmElasticityTensor.C.

Referenced by SymmAnisotropicElasticityTensor::form_transformed_material_dt_matrix(), SymmElasticityTensor::rotateFromGlobalToLocal(), SymmElasticityTensor::rotateFromLocalToGlobal(), and SymmElasticityTensor::zero().

156 {
157  if (input.numEntries() != 81)
158  {
159  mooseError("Cannot convert from ColumnMajorMatrix (wrong size)");
160  }
161 
162  _val[0] = input(0, 0);
163  _val[1] = input(0, 4);
164  _val[2] = input(0, 8);
165  _val[3] = input(0, 1);
166  _val[4] = input(0, 5);
167  _val[5] = input(0, 2);
168 
169  _val[6] = input(4, 4);
170  _val[7] = input(4, 8);
171  _val[8] = input(4, 3);
172  _val[9] = input(4, 5);
173  _val[10] = input(4, 6);
174 
175  _val[11] = input(8, 8);
176  _val[12] = input(8, 3);
177  _val[13] = input(8, 5);
178  _val[14] = input(8, 6);
179 
180  _val[15] = input(1, 1);
181  _val[16] = input(1, 5);
182  _val[17] = input(1, 2);
183 
184  _val[18] = input(5, 5);
185  _val[19] = input(5, 6);
186 
187  _val[20] = input(2, 2);
188 }
void SymmElasticityTensor::copyValues ( SymmElasticityTensor rhs) const
inlineinherited

Definition at line 68 of file SymmElasticityTensor.h.

Referenced by SymmAnisotropicElasticityTensor::form_transformed_material_dmat_matrix().

69  {
70  for (unsigned i(0); i < 21; ++i)
71  {
72  rhs._val[i] = _val[i];
73  }
74  }
void SymmElasticityTensor::fillFromInputVector ( std::vector< Real >  input,
bool  all 
)
inherited

Definition at line 381 of file SymmElasticityTensor.C.

Referenced by LinearGeneralAnisotropicMaterial::LinearGeneralAnisotropicMaterial(), MacroElastic::updateElasticityTensor(), and SymmElasticityTensor::zero().

382 {
383  if ((all == true && input.size() != 21) || (all == false && input.size() != 9))
384  mooseError("Please check the number of entries in the stiffness input vector.");
385 
386  if (all == true)
387  {
388  for (int i = 0; i < 21; i++)
389  _val[i] = input[i];
390  }
391  else
392  {
393  _val[0] = input[0]; // C1111
394  _val[1] = input[1]; // C1122
395  _val[2] = input[2]; // C1133
396  _val[6] = input[3]; // C2222
397  _val[7] = input[4]; // C2233
398  _val[11] = input[5]; // C3333
399  _val[15] = input[6]; // C2323
400  _val[18] = input[7]; // C1313
401  _val[20] = input[8]; // C1212
402  }
403 }
void SymmElasticityTensor::form9x9Rotation ( const ColumnMajorMatrix &  R_3x3,
ColumnMajorMatrix &  R_9x9 
) const
inherited

Definition at line 338 of file SymmElasticityTensor.C.

Referenced by SolidModel::crackingStrainDirections(), and SymmElasticityTensor::zero().

340 {
341  for (int i = 0; i < 3; ++i)
342  {
343  for (int j = 0; j < 3; ++j)
344  {
345  for (int k = 0; k < 3; ++k)
346  {
347  for (int l = 0; l < 3; ++l)
348  {
349  R_9x9(((i * 3) + k), ((j * 3) + l)) = R_3x3(i, j) * R_3x3(k, l);
350  }
351  }
352  }
353  }
354 }
Real SymmIsotropicElasticityTensor::mu ( ) const

Return Mu.

Definition at line 81 of file SymmIsotropicElasticityTensor.C.

Referenced by setMu(), shearModulus(), and unsetConstants().

82 {
83  if (!_mu_set)
84  {
85  mooseError("mu not set");
86  }
87  return _mu;
88 }
void SymmIsotropicElasticityTensor::multiply ( const SymmTensor x,
SymmTensor b 
) const
virtual

Reimplemented from SymmElasticityTensor.

Definition at line 221 of file SymmIsotropicElasticityTensor.C.

Referenced by unsetConstants().

222 {
223  const Real xx = x.xx();
224  const Real yy = x.yy();
225  const Real zz = x.zz();
226  const Real xy = x.xy();
227  const Real yz = x.yz();
228  const Real zx = x.zx();
229 
230  b.xx() = _val[0] * xx + _val[1] * yy + _val[2] * zz;
231  b.yy() = _val[1] * xx + _val[6] * yy + _val[7] * zz;
232  b.zz() = _val[2] * xx + _val[7] * yy + _val[11] * zz;
233  b.xy() = 2 * _val[15] * xy;
234  b.yz() = 2 * _val[18] * yz;
235  b.zx() = 2 * _val[20] * zx;
236 
237  b.xx() += 2 * (_val[3] * xy + _val[4] * yz + _val[5] * zx);
238  b.yy() += 2 * (_val[8] * xy + _val[9] * yz + _val[10] * zx);
239  b.zz() += 2 * (_val[12] * xy + _val[13] * yz + _val[14] * zx);
240  b.xy() += _val[3] * xx + _val[8] * yy + _val[12] * zz;
241  b.yz() += _val[4] * xx + _val[9] * yy + _val[13] * zz;
242  b.zx() += _val[5] * xx + _val[10] * yy + _val[14] * zz;
243  b.yz() += 2 * _val[16] * xy;
244  b.zx() += 2 * _val[17] * xy + 2 * _val[19] * yz;
245 }
Real yy() const
Definition: SymmTensor.h:130
Real xx() const
Definition: SymmTensor.h:129
Real zz() const
Definition: SymmTensor.h:131
Real xy() const
Definition: SymmTensor.h:132
Real yz() const
Definition: SymmTensor.h:133
Real zx() const
Definition: SymmTensor.h:134
SymmTensor SymmElasticityTensor::operator* ( const SymmTensor x) const
inherited

Definition at line 76 of file SymmElasticityTensor.C.

Referenced by SymmElasticityTensor::copyValues().

77 {
78  SymmTensor b;
79  multiply(x, b);
80  return b;
81 }
virtual void multiply(const SymmTensor &x, SymmTensor &b) const
SymmElasticityTensor SymmElasticityTensor::operator* ( Real  x) const
inherited

Definition at line 330 of file SymmElasticityTensor.C.

331 {
332  SymmElasticityTensor fred(*this);
333  fred *= x;
334  return fred;
335 }
This class defines a basic set of capabilities any elasticity tensor should have. ...
void SymmElasticityTensor::operator*= ( Real  rhs)
inlineinherited

Definition at line 116 of file SymmElasticityTensor.h.

117  {
118  for (unsigned i(0); i < 21; ++i)
119  {
120  _val[i] *= rhs;
121  }
122  }
SymmElasticityTensor SymmElasticityTensor::operator+ ( const SymmElasticityTensor rhs) const
inlineinherited

Definition at line 91 of file SymmElasticityTensor.h.

92  {
93  SymmElasticityTensor t = *this;
94 
95  t += rhs;
96 
97  return t;
98  }
This class defines a basic set of capabilities any elasticity tensor should have. ...
void SymmElasticityTensor::operator+= ( const SymmElasticityTensor rhs)
inlineinherited

Definition at line 100 of file SymmElasticityTensor.h.

101  {
102  for (unsigned i(0); i < 21; ++i)
103  {
104  _val[i] += rhs._val[i];
105  }
106  }
void SymmElasticityTensor::operator-= ( const SymmElasticityTensor rhs)
inlineinherited

Definition at line 108 of file SymmElasticityTensor.h.

109  {
110  for (unsigned i(0); i < 21; ++i)
111  {
112  _val[i] -= rhs._val[i];
113  }
114  }
void SymmElasticityTensor::operator/= ( Real  rhs)
inlineinherited

Definition at line 124 of file SymmElasticityTensor.h.

125  {
126  for (unsigned i(0); i < 21; ++i)
127  {
128  _val[i] /= rhs;
129  }
130  }
void SymmElasticityTensor::rotateFromGlobalToLocal ( const ColumnMajorMatrix &  R)
inherited

Definition at line 363 of file SymmElasticityTensor.C.

Referenced by SymmElasticityTensor::zero().

364 {
365  convertFrom9x9(R.transpose() * (columnMajorMatrix9x9() * R));
366 }
void convertFrom9x9(const ColumnMajorMatrix &cmm)
ColumnMajorMatrix columnMajorMatrix9x9() const
void SymmElasticityTensor::rotateFromLocalToGlobal ( const ColumnMajorMatrix &  R)
inherited

Definition at line 357 of file SymmElasticityTensor.C.

Referenced by SolidModel::crackingStrainDirections(), and SymmElasticityTensor::zero().

358 {
359  convertFrom9x9((R * columnMajorMatrix9x9()) * R.transpose());
360 }
void convertFrom9x9(const ColumnMajorMatrix &cmm)
ColumnMajorMatrix columnMajorMatrix9x9() const
void SymmIsotropicElasticityTensor::setBulkModulus ( const Real  k)

Set the Bulk Modulus.

Definition at line 53 of file SymmIsotropicElasticityTensor.C.

Referenced by unsetConstants().

void SymmIsotropicElasticityTensor::setEntries ( Real  C11,
Real  C12,
Real  C44 
)
protected

Definition at line 140 of file SymmIsotropicElasticityTensor.C.

Referenced by calculateEntries().

141 {
142  _val[0] = _val[6] = _val[11] = C11;
143  _val[1] = _val[2] = _val[7] = C12;
144  _val[15] = _val[18] = _val[20] = C44;
145  _val[3] = _val[4] = _val[5] = 0;
146  _val[8] = _val[9] = _val[10] = 0;
147  _val[12] = _val[13] = _val[14] = 0;
148  _val[16] = _val[17] = 0;
149  _val[19] = 0;
150 }
void SymmIsotropicElasticityTensor::setLambda ( const Real  lambda)

Set the first Lame Coefficient.

Definition at line 25 of file SymmIsotropicElasticityTensor.C.

Referenced by unsetConstants().

void SymmIsotropicElasticityTensor::setMu ( const Real  mu)

Set the second Lame Coefficient.

Definition at line 32 of file SymmIsotropicElasticityTensor.C.

Referenced by setShearModulus(), and unsetConstants().

void SymmIsotropicElasticityTensor::setPoissonsRatio ( const Real  nu)
void SymmIsotropicElasticityTensor::setShearModulus ( const Real  k)

Set the shear modulus...

same thing as Mu

Definition at line 60 of file SymmIsotropicElasticityTensor.C.

Referenced by unsetConstants().

61 {
62  setMu(k);
63 }
void setMu(const Real mu)
Set the second Lame Coefficient.
void SymmIsotropicElasticityTensor::setYoungsModulus ( const Real  E)
Real SymmIsotropicElasticityTensor::shearModulus ( ) const
Real SymmIsotropicElasticityTensor::stiffness ( const unsigned  i,
const unsigned  j,
const RealGradient &  test,
const RealGradient &  phi 
) const
virtual

Definition at line 153 of file SymmIsotropicElasticityTensor.C.

Referenced by unsetConstants().

157 {
158  RealGradient b;
159  if (0 == i && 0 == j)
160  {
161  b(0) = _val[0] * phi(0);
162  b(1) = _val[15] * phi(1);
163  b(2) = _val[20] * phi(2);
164  }
165  else if (1 == i && 1 == j)
166  {
167  b(0) = _val[15] * phi(0);
168  b(1) = _val[6] * phi(1);
169  b(2) = _val[18] * phi(2);
170  }
171  else if (2 == i && 2 == j)
172  {
173  b(0) = _val[20] * phi(0);
174  b(1) = _val[18] * phi(1);
175  b(2) = _val[11] * phi(2);
176  }
177  else if (0 == i && 1 == j)
178  {
179  b(0) = _val[1] * phi(1);
180  b(1) = _val[15] * phi(0);
181  b(2) = 0;
182  }
183  else if (1 == i && 0 == j)
184  {
185  b(0) = _val[15] * phi(1);
186  b(1) = _val[1] * phi(0);
187  b(2) = 0;
188  }
189  else if (1 == i && 2 == j)
190  {
191  b(0) = 0;
192  b(1) = _val[7] * phi(2);
193  b(2) = _val[18] * phi(1);
194  }
195  else if (2 == i && 1 == j)
196  {
197  b(0) = 0;
198  b(1) = _val[18] * phi(2);
199  b(2) = _val[7] * phi(1);
200  }
201  else if (0 == i && 2 == j)
202  {
203  b(0) = _val[2] * phi(2);
204  b(1) = 0;
205  b(2) = _val[20] * phi(0);
206  }
207  else if (2 == i && 0 == j)
208  {
209  b(0) = _val[20] * phi(2);
210  b(1) = 0;
211  b(2) = _val[2] * phi(0);
212  }
213  else
214  {
215  mooseError("Wrong index in stiffness calculation");
216  }
217  return test * b;
218 }
Real SymmElasticityTensor::stiffness ( const unsigned int  i,
const unsigned int  j,
const RealGradient &  test,
const RealGradient &  phi 
) const
virtualinherited

Definition at line 84 of file SymmElasticityTensor.C.

Referenced by SymmElasticityTensor::copyValues().

88 {
89  RealGradient b;
90  if (0 == i && 0 == j)
91  {
92  b(0) = _val[0] * phi(0) + _val[3] * phi(1) + _val[5] * phi(2);
93  b(1) = _val[3] * phi(0) + _val[15] * phi(1) + _val[17] * phi(2);
94  b(2) = _val[5] * phi(0) + _val[17] * phi(1) + _val[20] * phi(2);
95  }
96  else if (1 == i && 1 == j)
97  {
98  b(0) = _val[15] * phi(0) + _val[8] * phi(1) + _val[16] * phi(2);
99  b(1) = _val[8] * phi(0) + _val[6] * phi(1) + _val[9] * phi(2);
100  b(2) = _val[16] * phi(0) + _val[9] * phi(1) + _val[18] * phi(2);
101  }
102  else if (2 == i && 2 == j)
103  {
104  b(0) = _val[20] * phi(0) + _val[19] * phi(1) + _val[14] * phi(2);
105  b(1) = _val[19] * phi(0) + _val[18] * phi(1) + _val[13] * phi(2);
106  b(2) = _val[14] * phi(0) + _val[13] * phi(1) + _val[11] * phi(2);
107  }
108  else if (0 == i && 1 == j)
109  {
110  b(0) = _val[3] * phi(0) + _val[1] * phi(1) + _val[4] * phi(2);
111  b(1) = _val[15] * phi(0) + _val[8] * phi(1) + _val[16] * phi(2);
112  b(2) = _val[17] * phi(0) + _val[10] * phi(1) + _val[19] * phi(2);
113  }
114  else if (1 == i && 0 == j)
115  {
116  b(0) = _val[3] * phi(0) + _val[15] * phi(1) + _val[17] * phi(2);
117  b(1) = _val[1] * phi(0) + _val[8] * phi(1) + _val[10] * phi(2);
118  b(2) = _val[4] * phi(0) + _val[16] * phi(1) + _val[19] * phi(2);
119  }
120  else if (1 == i && 2 == j)
121  {
122  b(0) = _val[17] * phi(0) + _val[16] * phi(1) + _val[12] * phi(2);
123  b(1) = _val[10] * phi(0) + _val[9] * phi(1) + _val[7] * phi(2);
124  b(2) = _val[19] * phi(0) + _val[18] * phi(1) + _val[13] * phi(2);
125  }
126  else if (2 == i && 1 == j)
127  {
128  b(0) = _val[17] * phi(0) + _val[10] * phi(1) + _val[19] * phi(2);
129  b(1) = _val[16] * phi(0) + _val[9] * phi(1) + _val[18] * phi(2);
130  b(2) = _val[12] * phi(0) + _val[7] * phi(1) + _val[13] * phi(2);
131  }
132  else if (0 == i && 2 == j)
133  {
134  b(0) = _val[5] * phi(0) + _val[4] * phi(1) + _val[2] * phi(2);
135  b(1) = _val[17] * phi(0) + _val[16] * phi(1) + _val[12] * phi(2);
136  b(2) = _val[20] * phi(0) + _val[19] * phi(1) + _val[14] * phi(2);
137  }
138  else if (2 == i && 0 == j)
139  {
140  b(0) = _val[5] * phi(0) + _val[17] * phi(1) + _val[20] * phi(2);
141  b(1) = _val[4] * phi(0) + _val[16] * phi(1) + _val[19] * phi(2);
142  b(2) = _val[2] * phi(0) + _val[12] * phi(1) + _val[14] * phi(2);
143  }
144  else
145  {
146  std::stringstream s;
147  s << "Wrong index in stiffness calculation: ";
148  s << i << " " << j;
149  mooseError(s.str());
150  }
151  return test * b;
152 }
RealGradient SymmElasticityTensor::sum_3x1 ( ) const
inherited

Definition at line 419 of file SymmElasticityTensor.C.

Referenced by SymmElasticityTensor::zero().

420 {
421  // used for volumetric locking correction
422  RealGradient a(3);
423  a(0) = _val[0] + _val[1] + _val[2]; // C00 + C01 + C02
424  a(1) = _val[1] + _val[6] + _val[7]; // C10 + C11 + C12
425  a(2) = _val[2] + _val[7] + _val[11]; // C20 + C21 + C22
426  return a;
427 }
Real SymmElasticityTensor::sum_3x3 ( ) const
inherited

Definition at line 412 of file SymmElasticityTensor.C.

Referenced by SymmElasticityTensor::zero().

413 {
414  // summation of Cij for i and j ranging from 0 to 2 - used in the volumetric locking correction
415  return _val[0] + 2 * (_val[1] + _val[2] + _val[7]) + _val[6] + _val[11];
416 }
void SymmIsotropicElasticityTensor::unsetConstants ( )
inline
Real SymmElasticityTensor::valueAtIndex ( int  i) const
inherited

Definition at line 406 of file SymmElasticityTensor.C.

Referenced by RateDepSmearCrackModel::computeStress(), and SymmElasticityTensor::zero().

407 {
408  return _val[i];
409 }
Real SymmIsotropicElasticityTensor::youngsModulus ( ) const

Return the youngs modulus.

Definition at line 72 of file SymmIsotropicElasticityTensor.C.

Referenced by IsotropicPowerLawHardening::computeStressInitialize(), and unsetConstants().

73 {
74  if (!_E_set)
75  mooseError("Youngs modulus not set");
76 
77  return _E;
78 }
void SymmElasticityTensor::zero ( )
inlineinherited

Definition at line 132 of file SymmElasticityTensor.h.

Referenced by SymmAnisotropicElasticityTensor::calculateEntries().

133  {
134  for (unsigned i(0); i < 21; ++i)
135  {
136  _val[i] = 0;
137  }
138  }

Member Data Documentation

bool SymmElasticityTensor::_constant
protectedinherited

Whether or not the matrix is constant for all of time and space.

Definition at line 171 of file SymmElasticityTensor.h.

Referenced by SymmElasticityTensor::calculate(), and SymmElasticityTensor::constant().

Real SymmIsotropicElasticityTensor::_E
protected
bool SymmIsotropicElasticityTensor::_E_set
protected
Real SymmIsotropicElasticityTensor::_k
protected

Definition at line 98 of file SymmIsotropicElasticityTensor.h.

Referenced by calculateLameCoefficients(), and setBulkModulus().

bool SymmIsotropicElasticityTensor::_k_set
protected
Real SymmIsotropicElasticityTensor::_lambda
protected
bool SymmIsotropicElasticityTensor::_lambda_set
protected
Real SymmIsotropicElasticityTensor::_mu
protected
bool SymmIsotropicElasticityTensor::_mu_set
protected
Real SymmIsotropicElasticityTensor::_nu
protected

Definition at line 98 of file SymmIsotropicElasticityTensor.h.

Referenced by calculateLameCoefficients(), and setPoissonsRatio().

bool SymmIsotropicElasticityTensor::_nu_set
protected
Real SymmElasticityTensor::_val[21]
protectedinherited
bool SymmElasticityTensor::_values_computed
protectedinherited

Whether or not the values have been computed once.

Definition at line 176 of file SymmElasticityTensor.h.

Referenced by SymmElasticityTensor::calculate().


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