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

#include <SymmAnisotropicElasticityTensor.h>

Inheritance diagram for SymmAnisotropicElasticityTensor:
[legend]

Public Member Functions

 SymmAnisotropicElasticityTensor ()
 
 SymmAnisotropicElasticityTensor (std::vector< Real > &init_list, bool all_21)
 
 SymmAnisotropicElasticityTensor (const SymmAnisotropicElasticityTensor &a)
 
virtual ~SymmAnisotropicElasticityTensor ()
 
void setFirstEulerAngle (const Real a1)
 Set the first euler angle. More...
 
void setSecondEulerAngle (const Real a2)
 Set the second euler angle. More...
 
void setThirdEulerAngle (const Real a3)
 Set the third euler angle. More...
 
void setMaterialConstantc11 (const Real c11)
 Set the material constant c11; assumes cubic material. More...
 
void setMaterialConstantc12 (const Real c12)
 Set the material constant c22; assumes cubic material. More...
 
void setMaterialConstantc44 (const Real c44)
 Set the material constant c44; assumes cubic material. More...
 
virtual void rotate (const Real a1, const Real a2, const Real a3)
 Perform rotation around three axes. More...
 
Real firstEulerAngle ()
 
Real secondEulerAngle ()
 
Real thirdEulerAngle ()
 
void show_dt_matrix ()
 
void show_r_matrix ()
 
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...
 
virtual void multiply (const SymmTensor &x, SymmTensor &b) const
 
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 void adjustForCracking (const RealVectorValue &crack_flags)
 
virtual void adjustForCrackingWithShearRetention (const RealVectorValue &crack_flags)
 
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

void form_r_matrix ()
 
void initialize_material_dt_matrix ()
 
void initialize_anisotropic_material_dt_matrix ()
 
void form_rotational_q_matrix ()
 
void form_transformation_t_matrix ()
 
void form_transformed_material_dmat_matrix ()
 
void form_transformed_material_dt_matrix ()
 
void form_rotated_material_qdmat_matrix ()
 
virtual void calculateEntries (unsigned int qp)
 Fill in the matrix. More...
 

Protected Attributes

DenseMatrix< Real > _dmat
 
DenseMatrix< Real > _qdmat
 
DenseMatrix< Real > _dt
 
DenseMatrix< Real > _qdt
 
DenseMatrix< Real > _r
 
DenseMatrix< Real > _q
 
DenseMatrix< Real > _qt
 
std::vector< Real > _euler_angle
 
DenseMatrix< Real > _trans_d6_to_d9
 
DenseMatrix< Real > _trans_d9_to_d6
 
Real _c11
 
Real _c12
 
Real _c44
 
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

Definition at line 15 of file SymmAnisotropicElasticityTensor.h.

Constructor & Destructor Documentation

◆ SymmAnisotropicElasticityTensor() [1/3]

SymmAnisotropicElasticityTensor::SymmAnisotropicElasticityTensor ( )

Definition at line 14 of file SymmAnisotropicElasticityTensor.C.

15  : SymmElasticityTensor(false),
16  _dmat(9, 9),
17  _qdmat(9, 9),
18  _dt(6, 6),
19  _qdt(6, 6),
20  _r(3, 3),
21  _q(9, 9),
22  _qt(9, 9),
23  _euler_angle(3),
24  _trans_d6_to_d9(9, 6),
25  //_transpose_trans_d6_to_d9(6,9),
26  _trans_d9_to_d6(6, 9),
27  //_transpose_trans_d9_to_d6(9,6),
28  _c11(0),
29  _c12(0),
30  _c44(0)
31 {
32  // form_transformation_t_matrix();
33 }
SymmElasticityTensor(const bool constant=false)
Default constructor...

◆ SymmAnisotropicElasticityTensor() [2/3]

SymmAnisotropicElasticityTensor::SymmAnisotropicElasticityTensor ( std::vector< Real > &  init_list,
bool  all_21 
)

Definition at line 35 of file SymmAnisotropicElasticityTensor.C.

37  : SymmElasticityTensor(false),
38  _dmat(9, 9),
39  _qdmat(9, 9),
40  _dt(6, 6),
41  _qdt(6, 6),
42  _r(3, 3),
43  _q(9, 9),
44  _qt(9, 9),
45  _euler_angle(3),
46  _trans_d6_to_d9(9, 6),
47  //_transpose_trans_d6_to_d9(6,9),
48  _trans_d9_to_d6(6, 9),
49  //_transpose_trans_d9_to_d6(9,6),
50  _c11(0),
51  _c12(0),
52  _c44(0)
53 {
54  // test the input vector length to make sure it's correct
55  if ((all_21 == true && init_list.size() != 21) || (all_21 == false && init_list.size() != 9))
56  mooseError("Please correct the number of entries in the stiffness input.");
57 
58  if (all_21 == true)
59  {
60  for (int i = 0; i < 21; i++)
61  _val[i] = init_list[i];
62  }
63  else
64  {
65  _val[0] = init_list[0]; // C1111
66  _val[1] = init_list[1]; // C1122
67  _val[2] = init_list[2]; // C1133
68  _val[6] = init_list[3]; // C2222
69  _val[7] = init_list[4]; // C2233
70  _val[11] = init_list[5]; // C3333
71  _val[15] = init_list[6]; // C2323
72  _val[18] = init_list[7]; // C1313
73  _val[20] = init_list[8]; // C1212
74  }
75 
76  // form_transformation_t_matrix();
77 }
SymmElasticityTensor(const bool constant=false)
Default constructor...

◆ SymmAnisotropicElasticityTensor() [3/3]

SymmAnisotropicElasticityTensor::SymmAnisotropicElasticityTensor ( const SymmAnisotropicElasticityTensor a)

Definition at line 79 of file SymmAnisotropicElasticityTensor.C.

81  : SymmElasticityTensor(false)
82 {
83  *this = a;
84 }
SymmElasticityTensor(const bool constant=false)
Default constructor...

◆ ~SymmAnisotropicElasticityTensor()

virtual SymmAnisotropicElasticityTensor::~SymmAnisotropicElasticityTensor ( )
inlinevirtual

Definition at line 22 of file SymmAnisotropicElasticityTensor.h.

22 {}

Member Function Documentation

◆ adjustForCracking()

void SymmElasticityTensor::adjustForCracking ( const RealVectorValue &  crack_flags)
virtualinherited

Reimplemented in SymmIsotropicElasticityTensor.

Definition at line 372 of file SymmElasticityTensor.C.

Referenced by SolidModel::crackingStrainDirections().

373 {
374  mooseError("adjustForCracking method not defined");
375 }

◆ adjustForCrackingWithShearRetention()

void SymmElasticityTensor::adjustForCrackingWithShearRetention ( const RealVectorValue &  crack_flags)
virtualinherited

Reimplemented in SymmIsotropicElasticityTensor.

Definition at line 378 of file SymmElasticityTensor.C.

Referenced by SolidModel::crackingStrainDirections().

379 {
380  mooseError("adjustForCrackingWithShearRetention method not defined");
381 }

◆ 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 SymmAnisotropicElasticityTensor::calculateEntries ( unsigned int  qp)
protectedvirtual

Fill in the matrix.

Reimplemented from SymmElasticityTensor.

Definition at line 365 of file SymmAnisotropicElasticityTensor.C.

366 {
367 
368  // The following four lines of code force the calculateEntries function to be useful
369  // only for CUBIC ANISOTROPIC materials.
370  zero();
374 
375  form_r_matrix();
376  // initialize_material_anisotropic_dt_matrix();
378  // form_transformation_t_matrix();
382 
383  unsigned count(0);
384 
385  for (int j(0); j < 6; ++j)
386  {
387  for (int i(j); i < 6; ++i)
388  {
389  _val[count++] = _dt(i, j);
390  }
391  }
392 }
void setMaterialConstantc11(const Real c11)
Set the material constant c11; assumes cubic material.
void setMaterialConstantc44(const Real c44)
Set the material constant c44; assumes cubic material.
void setMaterialConstantc12(const Real c12)
Set the material constant c22; assumes cubic material.

◆ columnMajorMatrix6x6()

ColumnMajorMatrix SymmElasticityTensor::columnMajorMatrix6x6 ( ) const
inherited

Definition at line 230 of file SymmElasticityTensor.C.

Referenced by 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 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 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 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 }

◆ firstEulerAngle()

Real SymmAnisotropicElasticityTensor::firstEulerAngle ( )
Returns
the first Euler angle

Definition at line 105 of file SymmAnisotropicElasticityTensor.C.

106 {
107  return _euler_angle[0];
108 }

◆ 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 }

◆ form_r_matrix()

void SymmAnisotropicElasticityTensor::form_r_matrix ( )
protected

Definition at line 171 of file SymmAnisotropicElasticityTensor.C.

Referenced by calculateEntries(), and rotate().

172 {
173  Real phi1 = _euler_angle[0] * (libMesh::pi / 180.0);
174  Real phi = _euler_angle[1] * (libMesh::pi / 180.0);
175  Real phi2 = _euler_angle[2] * (libMesh::pi / 180.0);
176 
177  Real cp1 = std::cos(phi1);
178  Real cp2 = std::cos(phi2);
179  Real cp = std::cos(phi);
180 
181  Real sp1 = std::sin(phi1);
182  Real sp2 = std::sin(phi2);
183  Real sp = std::sin(phi);
184 
185  _r(0, 0) = cp1 * cp2 - sp1 * sp2 * cp;
186  _r(0, 1) = sp1 * cp2 + cp1 * sp2 * cp;
187  _r(0, 2) = sp2 * sp;
188  _r(1, 0) = -cp1 * sp2 - sp1 * cp2 * cp;
189  _r(1, 1) = -sp1 * sp2 + cp1 * cp2 * cp;
190  _r(1, 2) = cp2 * sp;
191  _r(2, 0) = sp1 * sp;
192  _r(2, 1) = -cp1 * sp;
193  _r(2, 2) = cp;
194 }

◆ form_rotated_material_qdmat_matrix()

void SymmAnisotropicElasticityTensor::form_rotated_material_qdmat_matrix ( )
protected

Definition at line 349 of file SymmAnisotropicElasticityTensor.C.

Referenced by calculateEntries(), and rotate().

350 {
351  // The function makes use of Q matrix to rotate
352  // Dmat[9][9] to QDmat[9][9]
353  // QDmat = QT * Dmat * Q
354 
355  DenseMatrix<Real> outputMatrix(9, 9);
356 
357  _q.get_transpose(outputMatrix);
358  outputMatrix.right_multiply(_dmat);
359 
360  _qdmat = outputMatrix;
361  _qdmat.right_multiply(_q);
362 }

◆ form_rotational_q_matrix()

void SymmAnisotropicElasticityTensor::form_rotational_q_matrix ( )
protected

Definition at line 225 of file SymmAnisotropicElasticityTensor.C.

Referenced by calculateEntries(), and rotate().

226 {
227 
228  for (int i = 0; i < 3; ++i)
229  for (int j = 0; j < 3; ++j)
230  for (int k = 0; k < 3; ++k)
231  for (int l = 0; l < 3; ++l)
232  _q(((i * 3) + k), ((j * 3) + l)) = _r(i, j) * _r(k, l);
233 
234  /*for (int p = 0; p < 9; ++p)
235  for (int q = 0; q < 9; ++q)
236  _qt(q,p) = _q(p,q);*/
237 }

◆ form_transformation_t_matrix()

void SymmAnisotropicElasticityTensor::form_transformation_t_matrix ( )
protected

Definition at line 240 of file SymmAnisotropicElasticityTensor.C.

241 {
242  // Forms to two kinds of transformation matrix
243  // TransD6toD9 transfroms Dt[6][6] to Dmat[9][9]
244  // TransD9toD6 transforms Dmat[9][9] to Dt[6][6]
245 
246  // Real sqrt2 = std::sqrt(2.0);
247  // Real a = 1/sqrt2;
248  Real a = 1.0;
249 
250  _trans_d6_to_d9(0, 0) = _trans_d6_to_d9(4, 1) = _trans_d6_to_d9(8, 2) = 1.0;
251  _trans_d6_to_d9(1, 3) = _trans_d6_to_d9(3, 3) = a;
252  _trans_d6_to_d9(5, 4) = _trans_d6_to_d9(7, 4) = a;
253  _trans_d6_to_d9(2, 5) = _trans_d6_to_d9(6, 5) = a;
254 
255  /*for (int i = 0; i < 9; ++i)
256  {
257  for (int j = 0; j < 6; ++j)
258  {
259  _transpose_trans_d6_to_d9(j,i) = _trans_d6_to_d9(i,j);
260  }
261  }*/
262 
263  _trans_d9_to_d6(0, 0) = _trans_d9_to_d6(1, 4) = _trans_d9_to_d6(2, 8) = 1.0;
264  // _trans_d9_to_d6(3,3) = _trans_d9_to_d6(4,7) = _trans_d9_to_d6(5,6) = sqrt2;
265  _trans_d9_to_d6(3, 3) = _trans_d9_to_d6(4, 7) = _trans_d9_to_d6(5, 6) = 1.0;
266 
267  /*for (int i = 0; i < 6; ++i)
268  {
269  for (int j = 0; j < 9; ++j)
270  {
271  _transpose_trans_d9_to_d6(j,i) = _trans_d9_to_d6(i,j);
272  }
273  }*/
274 }

◆ form_transformed_material_dmat_matrix()

void SymmAnisotropicElasticityTensor::form_transformed_material_dmat_matrix ( )
protected

Definition at line 277 of file SymmAnisotropicElasticityTensor.C.

Referenced by calculateEntries(), and rotate().

278 {
279 
280  // THIS TRANSFORMATION IS VALID ONLY WHEN THE INCOMING MATRIX HAS NOT BEEN ROTATED
281 
282  // The function makes use of TransD6toD9 matrix to transfrom
283  // Dt[6][6] to Dmat[9][9]
284  // Dmat = T * Dt * TT
285 
286  // DenseMatrix<Real> outputMatrix(9,6);
287 
288  // outputMatrix = _trans_d6_to_d9;
289  // outputMatrix.right_multiply(_dt);
290 
291  //_dmat = outputMatrix;
292  //_dmat.right_multiply_transpose(_trans_d6_to_d9);
293 
294  // Use the plug-and-chug functions given in SymmElasticityTensor
295  // to take the existing _val[] and put them into the 9x9 _dmat matrix.
296  SymmElasticityTensor temp_dt;
297  copyValues(temp_dt);
298 
299  ColumnMajorMatrix temp_dmat = temp_dt.columnMajorMatrix9x9();
300 
301  for (unsigned j(0); j < 9; ++j)
302  {
303  for (unsigned i(0); i < 9; ++i)
304  {
305  _dmat(i, j) = temp_dmat(i, j);
306  }
307  }
308 }
This class defines a basic set of capabilities any elasticity tensor should have. ...
void copyValues(SymmElasticityTensor &rhs) const
ColumnMajorMatrix columnMajorMatrix9x9() const

◆ form_transformed_material_dt_matrix()

void SymmAnisotropicElasticityTensor::form_transformed_material_dt_matrix ( )
protected

Definition at line 311 of file SymmAnisotropicElasticityTensor.C.

Referenced by calculateEntries(), and rotate().

312 {
313  // The function makes use of TransD6toD9 matrix to transfrom
314  // QDmat[9][9] to Dt[6][6]
315  // Dt = TT * QDmat * T
316 
317  // DenseMatrix<Real> outputMatrix(6,9);
318 
319  // outputMatrix = _trans_d9_to_d6;
320  // outputMatrix.right_multiply(_qdmat);
321  // _dt = outputMatrix;
322  // _dt.right_multiply(_transpose_trans_d9_to_d6);
323 
324  // The transformation below is general and should work whether or not the
325  // incoming tensor has been rotated.
326 
327  ColumnMajorMatrix tmp(9, 9);
328  for (unsigned j(0); j < 9; ++j)
329  {
330  for (unsigned i(0); i < 9; ++i)
331  {
332  tmp(i, j) = _qdmat(i, j);
333  }
334  }
335 
337  fred.convertFrom9x9(tmp);
338  ColumnMajorMatrix wilma = fred.columnMajorMatrix6x6();
339  for (unsigned j(0); j < 6; ++j)
340  {
341  for (unsigned i(0); i < 6; ++i)
342  {
343  _dt(i, j) = wilma(i, j);
344  }
345  }
346 }
This class defines a basic set of capabilities any elasticity tensor should have. ...
void convertFrom9x9(const ColumnMajorMatrix &cmm)
ColumnMajorMatrix columnMajorMatrix6x6() const

◆ initialize_anisotropic_material_dt_matrix()

void SymmAnisotropicElasticityTensor::initialize_anisotropic_material_dt_matrix ( )
protected

Definition at line 210 of file SymmAnisotropicElasticityTensor.C.

211 {
212  // This function initializes the 6 x 6 material Dt matrix for an anisotropic material
213 
214  int k = 0;
215  for (int i = 0; i < 6; i++)
216  {
217  for (int j = i; j < 6; j++)
218  {
219  _dt(i, j) = _dt(j, i) = _val[k++];
220  }
221  }
222 }

◆ initialize_material_dt_matrix()

void SymmAnisotropicElasticityTensor::initialize_material_dt_matrix ( )
protected

Definition at line 198 of file SymmAnisotropicElasticityTensor.C.

199 {
200  // This function initializes the 6 x 6 material Dt matrix for a cubic material
201 
202  _dt(0, 0) = _dt(1, 1) = _dt(2, 2) = _c11;
203  _dt(0, 1) = _dt(0, 2) = _dt(1, 0) = _dt(2, 0) = _dt(1, 2) = _dt(2, 1) = _c12;
204  // beware the factor of two here
205  _dt(3, 3) = _dt(4, 4) = _dt(5, 5) = 2 * _c44;
206 }

◆ multiply()

void SymmElasticityTensor::multiply ( const SymmTensor x,
SymmTensor b 
) const
virtualinherited

Reimplemented in SymmIsotropicElasticityTensor.

Definition at line 56 of file SymmElasticityTensor.C.

Referenced by SymmElasticityTensor::operator*().

57 {
58  const Real xx = x.xx();
59  const Real yy = x.yy();
60  const Real zz = x.zz();
61  const Real xy = x.xy();
62  const Real yz = x.yz();
63  const Real zx = x.zx();
64 
65  b.xx() =
66  _val[0] * xx + _val[1] * yy + _val[2] * zz + 2 * (_val[3] * xy + _val[4] * yz + _val[5] * zx);
67  b.yy() = _val[1] * xx + _val[6] * yy + _val[7] * zz +
68  2 * (_val[8] * xy + _val[9] * yz + _val[10] * zx);
69  b.zz() = _val[2] * xx + _val[7] * yy + _val[11] * zz +
70  2 * (_val[12] * xy + _val[13] * yz + _val[14] * zx);
71  b.xy() = _val[3] * xx + _val[8] * yy + _val[12] * zz +
72  2 * (_val[15] * xy + _val[16] * yz + _val[17] * zx);
73  b.yz() = _val[4] * xx + _val[9] * yy + _val[13] * zz +
74  2 * (_val[16] * xy + _val[18] * yz + _val[19] * zx);
75  b.zx() = _val[5] * xx + _val[10] * yy + _val[14] * zz +
76  2 * (_val[17] * xy + _val[19] * yz + _val[20] * zx);
77 }
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  }

◆ rotate()

void SymmAnisotropicElasticityTensor::rotate ( const Real  a1,
const Real  a2,
const Real  a3 
)
virtual

Perform rotation around three axes.

Definition at line 144 of file SymmAnisotropicElasticityTensor.C.

Referenced by LinearGeneralAnisotropicMaterial::LinearGeneralAnisotropicMaterial().

145 {
146  setFirstEulerAngle(a1);
148  setThirdEulerAngle(a3);
149 
150  // pulled from calculateEntries to sub in the initialize_anisotropic_material_dt_matrix() call
151  // calculateEntries(0);
152 
153  form_r_matrix();
158 
159  unsigned count(0);
160 
161  for (int j(0); j < 6; ++j)
162  {
163  for (int i(j); i < 6; ++i)
164  {
165  _val[count++] = _dt(i, j);
166  }
167  }
168 }
void setThirdEulerAngle(const Real a3)
Set the third euler angle.
void setSecondEulerAngle(const Real a2)
Set the second euler angle.
void setFirstEulerAngle(const Real a1)
Set the first euler angle.

◆ 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)

◆ secondEulerAngle()

Real SymmAnisotropicElasticityTensor::secondEulerAngle ( )
Returns
the first Euler angle

Definition at line 111 of file SymmAnisotropicElasticityTensor.C.

112 {
113  return _euler_angle[1];
114 }

◆ setFirstEulerAngle()

void SymmAnisotropicElasticityTensor::setFirstEulerAngle ( const Real  a1)

Set the first euler angle.

Definition at line 87 of file SymmAnisotropicElasticityTensor.C.

Referenced by LinearAnisotropicMaterial::LinearAnisotropicMaterial(), and rotate().

88 {
89  _euler_angle[0] = a1;
90 }

◆ setMaterialConstantc11()

void SymmAnisotropicElasticityTensor::setMaterialConstantc11 ( const Real  c11)

Set the material constant c11; assumes cubic material.

Definition at line 123 of file SymmAnisotropicElasticityTensor.C.

Referenced by calculateEntries(), and LinearAnisotropicMaterial::LinearAnisotropicMaterial().

124 {
125  _c11 = c11;
126  _val[0] = _val[6] = _val[11] = _c11;
127 }

◆ setMaterialConstantc12()

void SymmAnisotropicElasticityTensor::setMaterialConstantc12 ( const Real  c12)

Set the material constant c22; assumes cubic material.

Definition at line 130 of file SymmAnisotropicElasticityTensor.C.

Referenced by calculateEntries(), and LinearAnisotropicMaterial::LinearAnisotropicMaterial().

131 {
132  _c12 = c12;
133  _val[1] = _val[2] = _val[7] = _c12;
134 }

◆ setMaterialConstantc44()

void SymmAnisotropicElasticityTensor::setMaterialConstantc44 ( const Real  c44)

Set the material constant c44; assumes cubic material.

Definition at line 137 of file SymmAnisotropicElasticityTensor.C.

Referenced by calculateEntries(), and LinearAnisotropicMaterial::LinearAnisotropicMaterial().

138 {
139  _c44 = c44;
140  _val[15] = _val[18] = _val[20] = _c44;
141 }

◆ setSecondEulerAngle()

void SymmAnisotropicElasticityTensor::setSecondEulerAngle ( const Real  a2)

Set the second euler angle.

Definition at line 93 of file SymmAnisotropicElasticityTensor.C.

Referenced by LinearAnisotropicMaterial::LinearAnisotropicMaterial(), and rotate().

94 {
95  _euler_angle[1] = a2;
96 }

◆ setThirdEulerAngle()

void SymmAnisotropicElasticityTensor::setThirdEulerAngle ( const Real  a3)

Set the third euler angle.

Definition at line 99 of file SymmAnisotropicElasticityTensor.C.

Referenced by LinearAnisotropicMaterial::LinearAnisotropicMaterial(), and rotate().

100 {
101  _euler_angle[2] = a3;
102 }

◆ show_dt_matrix()

void SymmAnisotropicElasticityTensor::show_dt_matrix ( )

Definition at line 395 of file SymmAnisotropicElasticityTensor.C.

396 {
397  printf("\nSymmAnisotropicElasticityTensor::show_dt_matrix()\n");
398 
399  for (int j = 0; j < 6; ++j)
400  {
401  printf(" ");
402  for (int i = 0; i < 6; ++i)
403  {
404  printf("%12.4f ", _dt(i, j));
405  }
406  printf("\n");
407  }
408 }

◆ show_r_matrix()

void SymmAnisotropicElasticityTensor::show_r_matrix ( )

Definition at line 411 of file SymmAnisotropicElasticityTensor.C.

412 {
413  printf("\nSymmAnisotropicElasticityTensor::show_r_matrix() Euler angles are (%f, %f, %f)\n",
414  _euler_angle[0],
415  _euler_angle[1],
416  _euler_angle[2]);
417 
418  for (int j = 0; j < 3; ++j)
419  {
420  printf(" ");
421  for (int i = 0; i < 3; ++i)
422  {
423  printf("%8.4f ", _r(i, j));
424  }
425  printf("\n");
426  }
427 }

◆ stiffness()

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 }

◆ thirdEulerAngle()

Real SymmAnisotropicElasticityTensor::thirdEulerAngle ( )
Returns
the first Euler angle

Definition at line 117 of file SymmAnisotropicElasticityTensor.C.

118 {
119  return _euler_angle[2];
120 }

◆ 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 }

◆ zero()

void SymmElasticityTensor::zero ( )
inlineinherited

Definition at line 135 of file SymmElasticityTensor.h.

Referenced by calculateEntries().

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

Member Data Documentation

◆ _c11

Real SymmAnisotropicElasticityTensor::_c11
protected

◆ _c12

Real SymmAnisotropicElasticityTensor::_c12
protected

◆ _c44

Real SymmAnisotropicElasticityTensor::_c44
protected

◆ _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().

◆ _dmat

DenseMatrix<Real> SymmAnisotropicElasticityTensor::_dmat
protected

◆ _dt

DenseMatrix<Real> SymmAnisotropicElasticityTensor::_dt
protected

◆ _euler_angle

std::vector<Real> SymmAnisotropicElasticityTensor::_euler_angle
protected

◆ _q

DenseMatrix<Real> SymmAnisotropicElasticityTensor::_q
protected

◆ _qdmat

DenseMatrix<Real> SymmAnisotropicElasticityTensor::_qdmat
protected

◆ _qdt

DenseMatrix<Real> SymmAnisotropicElasticityTensor::_qdt
protected

Definition at line 92 of file SymmAnisotropicElasticityTensor.h.

◆ _qt

DenseMatrix<Real> SymmAnisotropicElasticityTensor::_qt
protected

Definition at line 95 of file SymmAnisotropicElasticityTensor.h.

◆ _r

DenseMatrix<Real> SymmAnisotropicElasticityTensor::_r
protected

◆ _trans_d6_to_d9

DenseMatrix<Real> SymmAnisotropicElasticityTensor::_trans_d6_to_d9
protected

Definition at line 98 of file SymmAnisotropicElasticityTensor.h.

Referenced by form_transformation_t_matrix().

◆ _trans_d9_to_d6

DenseMatrix<Real> SymmAnisotropicElasticityTensor::_trans_d9_to_d6
protected

Definition at line 101 of file SymmAnisotropicElasticityTensor.h.

Referenced by form_transformation_t_matrix().

◆ _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: