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 34 of file SymmIsotropicElasticityTensor.h.

Constructor & Destructor Documentation

◆ SymmIsotropicElasticityTensor()

SymmIsotropicElasticityTensor::SymmIsotropicElasticityTensor ( const bool  constant = true)

◆ ~SymmIsotropicElasticityTensor()

virtual SymmIsotropicElasticityTensor::~SymmIsotropicElasticityTensor ( )
inlinevirtual

Definition at line 39 of file SymmIsotropicElasticityTensor.h.

39 {}

Member Function Documentation

◆ adjustForCracking()

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

Reimplemented from SymmElasticityTensor.

Definition at line 251 of file SymmIsotropicElasticityTensor.C.

Referenced by adjustForCrackingWithShearRetention().

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

◆ adjustForCrackingWithShearRetention()

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

Reimplemented from SymmElasticityTensor.

Definition at line 290 of file SymmIsotropicElasticityTensor.C.

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

◆ calculate()

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 41 of file SymmElasticityTensor.C.

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

42 {
43  if (!_constant || !_values_computed)
44  {
45  calculateEntries(qp);
46  _values_computed = true;
47  }
48 }
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.

◆ calculateDerivative()

SymmElasticityTensor SymmElasticityTensor::calculateDerivative ( unsigned int  qp,
unsigned int  i 
)
virtualinherited

Definition at line 328 of file SymmElasticityTensor.C.

329 {
330  return SymmElasticityTensor();
331 }
SymmElasticityTensor(const bool constant=false)
Default constructor...

◆ calculateEntries()

void SymmIsotropicElasticityTensor::calculateEntries ( unsigned int  qp)
protectedvirtual

Fill in the matrix.

Reimplemented from SymmElasticityTensor.

Definition at line 131 of file SymmIsotropicElasticityTensor.C.

132 {
134 
135  const Real C12(_lambda);
136  const Real C44(_mu);
137  const Real C11(2 * C44 + C12);
138 
139  setEntries(C11, C12, C44);
140 }
void setEntries(Real C11, Real C12, Real C44)
void calculateLameCoefficients()
Calculates lambda and mu based on what has been set.

◆ calculateLameCoefficients()

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 94 of file SymmIsotropicElasticityTensor.C.

Referenced by calculateEntries().

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

◆ columnMajorMatrix6x6()

ColumnMajorMatrix SymmElasticityTensor::columnMajorMatrix6x6 ( ) const
inherited

Definition at line 230 of file SymmElasticityTensor.C.

Referenced by SymmAnisotropicElasticityTensor::form_transformed_material_dt_matrix().

231 {
232  ColumnMajorMatrix cmm(6, 6);
233  unsigned count(0);
234  for (unsigned i(0); i < 6; ++i)
235  {
236  for (unsigned j(i); j < 6; ++j)
237  {
238  cmm(i, j) = cmm(j, i) = _val[count++];
239  }
240  }
241  return cmm;
242 }

◆ columnMajorMatrix9x9()

ColumnMajorMatrix SymmElasticityTensor::columnMajorMatrix9x9 ( ) const
inherited

Definition at line 245 of file SymmElasticityTensor.C.

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

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

◆ constant()

void SymmElasticityTensor::constant ( bool  c)
inlineinherited

Definition at line 67 of file SymmElasticityTensor.h.

67 { _constant = c; }
bool _constant
Whether or not the matrix is constant for all of time and space.

◆ convertFrom6x6()

void SymmElasticityTensor::convertFrom6x6 ( const ColumnMajorMatrix &  cmm)
inherited

Definition at line 194 of file SymmElasticityTensor.C.

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

◆ convertFrom9x9()

void SymmElasticityTensor::convertFrom9x9 ( const ColumnMajorMatrix &  cmm)
inherited

Definition at line 158 of file SymmElasticityTensor.C.

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

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

◆ copyValues()

void SymmElasticityTensor::copyValues ( SymmElasticityTensor rhs) const
inlineinherited

Definition at line 71 of file SymmElasticityTensor.h.

Referenced by SymmAnisotropicElasticityTensor::form_transformed_material_dmat_matrix().

72  {
73  for (unsigned i(0); i < 21; ++i)
74  {
75  rhs._val[i] = _val[i];
76  }
77  }

◆ fillFromInputVector()

void SymmElasticityTensor::fillFromInputVector ( std::vector< Real >  input,
bool  all 
)
inherited

Definition at line 384 of file SymmElasticityTensor.C.

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

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

◆ form9x9Rotation()

void SymmElasticityTensor::form9x9Rotation ( const ColumnMajorMatrix &  R_3x3,
ColumnMajorMatrix &  R_9x9 
) const
inherited

Definition at line 341 of file SymmElasticityTensor.C.

Referenced by SolidModel::crackingStrainDirections().

343 {
344  for (int i = 0; i < 3; ++i)
345  {
346  for (int j = 0; j < 3; ++j)
347  {
348  for (int k = 0; k < 3; ++k)
349  {
350  for (int l = 0; l < 3; ++l)
351  {
352  R_9x9(((i * 3) + k), ((j * 3) + l)) = R_3x3(i, j) * R_3x3(k, l);
353  }
354  }
355  }
356  }
357 }

◆ mu()

Real SymmIsotropicElasticityTensor::mu ( ) const

Return Mu.

Definition at line 84 of file SymmIsotropicElasticityTensor.C.

Referenced by setMu(), and shearModulus().

85 {
86  if (!_mu_set)
87  {
88  mooseError("mu not set");
89  }
90  return _mu;
91 }

◆ multiply()

void SymmIsotropicElasticityTensor::multiply ( const SymmTensor x,
SymmTensor b 
) const
virtual

Reimplemented from SymmElasticityTensor.

Definition at line 224 of file SymmIsotropicElasticityTensor.C.

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

◆ operator*() [1/2]

SymmTensor SymmElasticityTensor::operator* ( const SymmTensor x) const
inherited

Definition at line 79 of file SymmElasticityTensor.C.

80 {
81  SymmTensor b;
82  multiply(x, b);
83  return b;
84 }
virtual void multiply(const SymmTensor &x, SymmTensor &b) const

◆ operator*() [2/2]

SymmElasticityTensor SymmElasticityTensor::operator* ( Real  x) const
inherited

Definition at line 333 of file SymmElasticityTensor.C.

334 {
335  SymmElasticityTensor fred(*this);
336  fred *= x;
337  return fred;
338 }
This class defines a basic set of capabilities any elasticity tensor should have. ...

◆ operator*=()

void SymmElasticityTensor::operator*= ( Real  rhs)
inlineinherited

Definition at line 119 of file SymmElasticityTensor.h.

120  {
121  for (unsigned i(0); i < 21; ++i)
122  {
123  _val[i] *= rhs;
124  }
125  }

◆ operator+()

SymmElasticityTensor SymmElasticityTensor::operator+ ( const SymmElasticityTensor rhs) const
inlineinherited

Definition at line 94 of file SymmElasticityTensor.h.

95  {
96  SymmElasticityTensor t = *this;
97 
98  t += rhs;
99 
100  return t;
101  }
This class defines a basic set of capabilities any elasticity tensor should have. ...

◆ operator+=()

void SymmElasticityTensor::operator+= ( const SymmElasticityTensor rhs)
inlineinherited

Definition at line 103 of file SymmElasticityTensor.h.

104  {
105  for (unsigned i(0); i < 21; ++i)
106  {
107  _val[i] += rhs._val[i];
108  }
109  }

◆ operator-=()

void SymmElasticityTensor::operator-= ( const SymmElasticityTensor rhs)
inlineinherited

Definition at line 111 of file SymmElasticityTensor.h.

112  {
113  for (unsigned i(0); i < 21; ++i)
114  {
115  _val[i] -= rhs._val[i];
116  }
117  }

◆ operator/=()

void SymmElasticityTensor::operator/= ( Real  rhs)
inlineinherited

Definition at line 127 of file SymmElasticityTensor.h.

128  {
129  for (unsigned i(0); i < 21; ++i)
130  {
131  _val[i] /= rhs;
132  }
133  }

◆ rotateFromGlobalToLocal()

void SymmElasticityTensor::rotateFromGlobalToLocal ( const ColumnMajorMatrix &  R)
inherited

Definition at line 366 of file SymmElasticityTensor.C.

367 {
368  convertFrom9x9(R.transpose() * (columnMajorMatrix9x9() * R));
369 }
ColumnMajorMatrix columnMajorMatrix9x9() const
void convertFrom9x9(const ColumnMajorMatrix &cmm)

◆ rotateFromLocalToGlobal()

void SymmElasticityTensor::rotateFromLocalToGlobal ( const ColumnMajorMatrix &  R)
inherited

Definition at line 360 of file SymmElasticityTensor.C.

Referenced by SolidModel::crackingStrainDirections().

361 {
362  convertFrom9x9((R * columnMajorMatrix9x9()) * R.transpose());
363 }
ColumnMajorMatrix columnMajorMatrix9x9() const
void convertFrom9x9(const ColumnMajorMatrix &cmm)

◆ setBulkModulus()

void SymmIsotropicElasticityTensor::setBulkModulus ( const Real  k)

Set the Bulk Modulus.

Definition at line 56 of file SymmIsotropicElasticityTensor.C.

◆ setEntries()

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

Definition at line 143 of file SymmIsotropicElasticityTensor.C.

Referenced by calculateEntries().

144 {
145  _val[0] = _val[6] = _val[11] = C11;
146  _val[1] = _val[2] = _val[7] = C12;
147  _val[15] = _val[18] = _val[20] = C44;
148  _val[3] = _val[4] = _val[5] = 0;
149  _val[8] = _val[9] = _val[10] = 0;
150  _val[12] = _val[13] = _val[14] = 0;
151  _val[16] = _val[17] = 0;
152  _val[19] = 0;
153 }

◆ setLambda()

void SymmIsotropicElasticityTensor::setLambda ( const Real  lambda)

Set the first Lame Coefficient.

Definition at line 28 of file SymmIsotropicElasticityTensor.C.

◆ setMu()

void SymmIsotropicElasticityTensor::setMu ( const Real  mu)

Set the second Lame Coefficient.

Definition at line 35 of file SymmIsotropicElasticityTensor.C.

Referenced by setShearModulus().

◆ setPoissonsRatio()

void SymmIsotropicElasticityTensor::setPoissonsRatio ( const Real  nu)

◆ setShearModulus()

void SymmIsotropicElasticityTensor::setShearModulus ( const Real  k)

Set the shear modulus...

same thing as Mu

Definition at line 63 of file SymmIsotropicElasticityTensor.C.

64 {
65  setMu(k);
66 }
void setMu(const Real mu)
Set the second Lame Coefficient.

◆ setYoungsModulus()

void SymmIsotropicElasticityTensor::setYoungsModulus ( const Real  E)

◆ shearModulus()

Real SymmIsotropicElasticityTensor::shearModulus ( ) const

◆ stiffness() [1/2]

Real SymmIsotropicElasticityTensor::stiffness ( const unsigned  i,
const unsigned  j,
const RealGradient &  test,
const RealGradient &  phi 
) const
virtual

Definition at line 156 of file SymmIsotropicElasticityTensor.C.

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

◆ stiffness() [2/2]

Real SymmElasticityTensor::stiffness ( const unsigned int  i,
const unsigned int  j,
const RealGradient &  test,
const RealGradient &  phi 
) const
virtualinherited

Definition at line 87 of file SymmElasticityTensor.C.

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

◆ sum_3x1()

RealGradient SymmElasticityTensor::sum_3x1 ( ) const
inherited

Definition at line 422 of file SymmElasticityTensor.C.

423 {
424  // used for volumetric locking correction
425  RealGradient a(3);
426  a(0) = _val[0] + _val[1] + _val[2]; // C00 + C01 + C02
427  a(1) = _val[1] + _val[6] + _val[7]; // C10 + C11 + C12
428  a(2) = _val[2] + _val[7] + _val[11]; // C20 + C21 + C22
429  return a;
430 }

◆ sum_3x3()

Real SymmElasticityTensor::sum_3x3 ( ) const
inherited

Definition at line 415 of file SymmElasticityTensor.C.

416 {
417  // summation of Cij for i and j ranging from 0 to 2 - used in the volumetric locking correction
418  return _val[0] + 2 * (_val[1] + _val[2] + _val[7]) + _val[6] + _val[11];
419 }

◆ unsetConstants()

void SymmIsotropicElasticityTensor::unsetConstants ( )
inline

◆ valueAtIndex()

Real SymmElasticityTensor::valueAtIndex ( int  i) const
inherited

Definition at line 409 of file SymmElasticityTensor.C.

Referenced by RateDepSmearCrackModel::computeStress().

410 {
411  return _val[i];
412 }

◆ youngsModulus()

Real SymmIsotropicElasticityTensor::youngsModulus ( ) const

Return the youngs modulus.

Definition at line 75 of file SymmIsotropicElasticityTensor.C.

Referenced by IsotropicPowerLawHardening::computeStressInitialize().

76 {
77  if (!_E_set)
78  mooseError("Youngs modulus not set");
79 
80  return _E;
81 }

◆ zero()

void SymmElasticityTensor::zero ( )
inlineinherited

Definition at line 135 of file SymmElasticityTensor.h.

Referenced by SymmAnisotropicElasticityTensor::calculateEntries().

136  {
137  for (unsigned i(0); i < 21; ++i)
138  {
139  _val[i] = 0;
140  }
141  }

Member Data Documentation

◆ _constant

bool SymmElasticityTensor::_constant
protectedinherited

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

Definition at line 174 of file SymmElasticityTensor.h.

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

◆ _E

Real SymmIsotropicElasticityTensor::_E
protected

◆ _E_set

bool SymmIsotropicElasticityTensor::_E_set
protected

◆ _k

Real SymmIsotropicElasticityTensor::_k
protected

Definition at line 101 of file SymmIsotropicElasticityTensor.h.

Referenced by calculateLameCoefficients(), and setBulkModulus().

◆ _k_set

bool SymmIsotropicElasticityTensor::_k_set
protected

◆ _lambda

Real SymmIsotropicElasticityTensor::_lambda
protected

◆ _lambda_set

bool SymmIsotropicElasticityTensor::_lambda_set
protected

◆ _mu

Real SymmIsotropicElasticityTensor::_mu
protected

◆ _mu_set

bool SymmIsotropicElasticityTensor::_mu_set
protected

◆ _nu

Real SymmIsotropicElasticityTensor::_nu
protected

Definition at line 101 of file SymmIsotropicElasticityTensor.h.

Referenced by calculateLameCoefficients(), and setPoissonsRatio().

◆ _nu_set

bool SymmIsotropicElasticityTensor::_nu_set
protected

◆ _val

Real SymmElasticityTensor::_val[21]
protectedinherited

◆ _values_computed

bool SymmElasticityTensor::_values_computed
protectedinherited

Whether or not the values have been computed once.

Definition at line 179 of file SymmElasticityTensor.h.

Referenced by SymmElasticityTensor::calculate().


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