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 12 of file SymmAnisotropicElasticityTensor.h.

Constructor & Destructor Documentation

SymmAnisotropicElasticityTensor::SymmAnisotropicElasticityTensor ( )

Definition at line 11 of file SymmAnisotropicElasticityTensor.C.

12  : SymmElasticityTensor(false),
13  _dmat(9, 9),
14  _qdmat(9, 9),
15  _dt(6, 6),
16  _qdt(6, 6),
17  _r(3, 3),
18  _q(9, 9),
19  _qt(9, 9),
20  _euler_angle(3),
21  _trans_d6_to_d9(9, 6),
22  //_transpose_trans_d6_to_d9(6,9),
23  _trans_d9_to_d6(6, 9),
24  //_transpose_trans_d9_to_d6(9,6),
25  _c11(0),
26  _c12(0),
27  _c44(0)
28 {
29  // form_transformation_t_matrix();
30 }
SymmElasticityTensor(const bool constant=false)
Default constructor...
SymmAnisotropicElasticityTensor::SymmAnisotropicElasticityTensor ( std::vector< Real > &  init_list,
bool  all_21 
)

Definition at line 32 of file SymmAnisotropicElasticityTensor.C.

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

Definition at line 76 of file SymmAnisotropicElasticityTensor.C.

78  : SymmElasticityTensor(false)
79 {
80  *this = a;
81 }
SymmElasticityTensor(const bool constant=false)
Default constructor...
virtual SymmAnisotropicElasticityTensor::~SymmAnisotropicElasticityTensor ( )
inlinevirtual

Definition at line 19 of file SymmAnisotropicElasticityTensor.h.

19 {}

Member Function Documentation

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

Reimplemented in SymmIsotropicElasticityTensor.

Definition at line 369 of file SymmElasticityTensor.C.

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

370 {
371  mooseError("adjustForCracking method not defined");
372 }
void SymmElasticityTensor::adjustForCrackingWithShearRetention ( const RealVectorValue &  crack_flags)
virtualinherited

Reimplemented in SymmIsotropicElasticityTensor.

Definition at line 375 of file SymmElasticityTensor.C.

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

376 {
377  mooseError("adjustForCrackingWithShearRetention method not defined");
378 }
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 SymmAnisotropicElasticityTensor::calculateEntries ( unsigned int  qp)
protectedvirtual

Fill in the matrix.

Reimplemented from SymmElasticityTensor.

Definition at line 362 of file SymmAnisotropicElasticityTensor.C.

363 {
364 
365  // The following four lines of code force the calculateEntries function to be useful
366  // only for CUBIC ANISOTROPIC materials.
367  zero();
371 
372  form_r_matrix();
373  // initialize_material_anisotropic_dt_matrix();
375  // form_transformation_t_matrix();
379 
380  unsigned count(0);
381 
382  for (int j(0); j < 6; ++j)
383  {
384  for (int i(j); i < 6; ++i)
385  {
386  _val[count++] = _dt(i, j);
387  }
388  }
389 }
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.
ColumnMajorMatrix SymmElasticityTensor::columnMajorMatrix6x6 ( ) const
inherited

Definition at line 227 of file SymmElasticityTensor.C.

Referenced by 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 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 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 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 }
Real SymmAnisotropicElasticityTensor::firstEulerAngle ( )
Returns
the first Euler angle

Definition at line 102 of file SymmAnisotropicElasticityTensor.C.

Referenced by ~SymmAnisotropicElasticityTensor().

103 {
104  return _euler_angle[0];
105 }
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 }
void SymmAnisotropicElasticityTensor::form_r_matrix ( )
protected

Definition at line 168 of file SymmAnisotropicElasticityTensor.C.

Referenced by calculateEntries(), and rotate().

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

Definition at line 346 of file SymmAnisotropicElasticityTensor.C.

Referenced by calculateEntries(), and rotate().

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

Definition at line 222 of file SymmAnisotropicElasticityTensor.C.

Referenced by calculateEntries(), and rotate().

223 {
224 
225  for (int i = 0; i < 3; ++i)
226  for (int j = 0; j < 3; ++j)
227  for (int k = 0; k < 3; ++k)
228  for (int l = 0; l < 3; ++l)
229  _q(((i * 3) + k), ((j * 3) + l)) = _r(i, j) * _r(k, l);
230 
231  /*for (int p = 0; p < 9; ++p)
232  for (int q = 0; q < 9; ++q)
233  _qt(q,p) = _q(p,q);*/
234 }
void SymmAnisotropicElasticityTensor::form_transformation_t_matrix ( )
protected

Definition at line 237 of file SymmAnisotropicElasticityTensor.C.

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

Definition at line 274 of file SymmAnisotropicElasticityTensor.C.

Referenced by calculateEntries(), and rotate().

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

Definition at line 308 of file SymmAnisotropicElasticityTensor.C.

Referenced by calculateEntries(), and rotate().

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

Definition at line 207 of file SymmAnisotropicElasticityTensor.C.

208 {
209  // This function initializes the 6 x 6 material Dt matrix for an anisotropic material
210 
211  int k = 0;
212  for (int i = 0; i < 6; i++)
213  {
214  for (int j = i; j < 6; j++)
215  {
216  _dt(i, j) = _dt(j, i) = _val[k++];
217  }
218  }
219 }
void SymmAnisotropicElasticityTensor::initialize_material_dt_matrix ( )
protected

Definition at line 195 of file SymmAnisotropicElasticityTensor.C.

196 {
197  // This function initializes the 6 x 6 material Dt matrix for a cubic material
198 
199  _dt(0, 0) = _dt(1, 1) = _dt(2, 2) = _c11;
200  _dt(0, 1) = _dt(0, 2) = _dt(1, 0) = _dt(2, 0) = _dt(1, 2) = _dt(2, 1) = _c12;
201  // beware the factor of two here
202  _dt(3, 3) = _dt(4, 4) = _dt(5, 5) = 2 * _c44;
203 }
void SymmElasticityTensor::multiply ( const SymmTensor x,
SymmTensor b 
) const
virtualinherited

Reimplemented in SymmIsotropicElasticityTensor.

Definition at line 53 of file SymmElasticityTensor.C.

Referenced by SymmElasticityTensor::copyValues(), and SymmElasticityTensor::operator*().

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

Perform rotation around three axes.

Definition at line 141 of file SymmAnisotropicElasticityTensor.C.

Referenced by LinearGeneralAnisotropicMaterial::LinearGeneralAnisotropicMaterial(), and ~SymmAnisotropicElasticityTensor().

142 {
143  setFirstEulerAngle(a1);
145  setThirdEulerAngle(a3);
146 
147  // pulled from calculateEntries to sub in the initialize_anisotropic_material_dt_matrix() call
148  // calculateEntries(0);
149 
150  form_r_matrix();
155 
156  unsigned count(0);
157 
158  for (int j(0); j < 6; ++j)
159  {
160  for (int i(j); i < 6; ++i)
161  {
162  _val[count++] = _dt(i, j);
163  }
164  }
165 }
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.
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
Real SymmAnisotropicElasticityTensor::secondEulerAngle ( )
Returns
the first Euler angle

Definition at line 108 of file SymmAnisotropicElasticityTensor.C.

Referenced by ~SymmAnisotropicElasticityTensor().

109 {
110  return _euler_angle[1];
111 }
void SymmAnisotropicElasticityTensor::setFirstEulerAngle ( const Real  a1)

Set the first euler angle.

Definition at line 84 of file SymmAnisotropicElasticityTensor.C.

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

85 {
86  _euler_angle[0] = a1;
87 }
void SymmAnisotropicElasticityTensor::setMaterialConstantc11 ( const Real  c11)

Set the material constant c11; assumes cubic material.

Definition at line 120 of file SymmAnisotropicElasticityTensor.C.

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

121 {
122  _c11 = c11;
123  _val[0] = _val[6] = _val[11] = _c11;
124 }
void SymmAnisotropicElasticityTensor::setMaterialConstantc12 ( const Real  c12)

Set the material constant c22; assumes cubic material.

Definition at line 127 of file SymmAnisotropicElasticityTensor.C.

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

128 {
129  _c12 = c12;
130  _val[1] = _val[2] = _val[7] = _c12;
131 }
void SymmAnisotropicElasticityTensor::setMaterialConstantc44 ( const Real  c44)

Set the material constant c44; assumes cubic material.

Definition at line 134 of file SymmAnisotropicElasticityTensor.C.

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

135 {
136  _c44 = c44;
137  _val[15] = _val[18] = _val[20] = _c44;
138 }
void SymmAnisotropicElasticityTensor::setSecondEulerAngle ( const Real  a2)

Set the second euler angle.

Definition at line 90 of file SymmAnisotropicElasticityTensor.C.

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

91 {
92  _euler_angle[1] = a2;
93 }
void SymmAnisotropicElasticityTensor::setThirdEulerAngle ( const Real  a3)

Set the third euler angle.

Definition at line 96 of file SymmAnisotropicElasticityTensor.C.

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

97 {
98  _euler_angle[2] = a3;
99 }
void SymmAnisotropicElasticityTensor::show_dt_matrix ( )

Definition at line 392 of file SymmAnisotropicElasticityTensor.C.

Referenced by ~SymmAnisotropicElasticityTensor().

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

Definition at line 408 of file SymmAnisotropicElasticityTensor.C.

Referenced by ~SymmAnisotropicElasticityTensor().

409 {
410  printf("\nSymmAnisotropicElasticityTensor::show_r_matrix() Euler angles are (%f, %f, %f)\n",
411  _euler_angle[0],
412  _euler_angle[1],
413  _euler_angle[2]);
414 
415  for (int j = 0; j < 3; ++j)
416  {
417  printf(" ");
418  for (int i = 0; i < 3; ++i)
419  {
420  printf("%8.4f ", _r(i, j));
421  }
422  printf("\n");
423  }
424 }
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 }
Real SymmAnisotropicElasticityTensor::thirdEulerAngle ( )
Returns
the first Euler angle

Definition at line 114 of file SymmAnisotropicElasticityTensor.C.

Referenced by ~SymmAnisotropicElasticityTensor().

115 {
116  return _euler_angle[2];
117 }
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 }
void SymmElasticityTensor::zero ( )
inlineinherited

Definition at line 132 of file SymmElasticityTensor.h.

Referenced by calculateEntries().

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

Member Data Documentation

Real SymmAnisotropicElasticityTensor::_c11
protected
Real SymmAnisotropicElasticityTensor::_c12
protected
Real SymmAnisotropicElasticityTensor::_c44
protected
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().

DenseMatrix<Real> SymmAnisotropicElasticityTensor::_dmat
protected
DenseMatrix<Real> SymmAnisotropicElasticityTensor::_dt
protected
std::vector<Real> SymmAnisotropicElasticityTensor::_euler_angle
protected
DenseMatrix<Real> SymmAnisotropicElasticityTensor::_q
protected
DenseMatrix<Real> SymmAnisotropicElasticityTensor::_qdmat
protected
DenseMatrix<Real> SymmAnisotropicElasticityTensor::_qdt
protected

Definition at line 89 of file SymmAnisotropicElasticityTensor.h.

DenseMatrix<Real> SymmAnisotropicElasticityTensor::_qt
protected

Definition at line 92 of file SymmAnisotropicElasticityTensor.h.

DenseMatrix<Real> SymmAnisotropicElasticityTensor::_r
protected
DenseMatrix<Real> SymmAnisotropicElasticityTensor::_trans_d6_to_d9
protected

Definition at line 95 of file SymmAnisotropicElasticityTensor.h.

Referenced by form_transformation_t_matrix().

DenseMatrix<Real> SymmAnisotropicElasticityTensor::_trans_d9_to_d6
protected

Definition at line 98 of file SymmAnisotropicElasticityTensor.h.

Referenced by form_transformation_t_matrix().

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: