www.mooseframework.org
LinearAnisotropicMaterial.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
10 
11 template <>
12 InputParameters
14 {
15 
16  InputParameters params = validParams<LinearIsotropicMaterial>();
17  params.addRequiredParam<Real>("material_constant_c11", "Material modulus C11");
18  params.addRequiredParam<Real>("material_constant_c12", "Material modulus C12");
19  params.addRequiredParam<Real>("material_constant_c44", "Material modulus C44");
20  params.addParam<Real>("euler_angle_1", 0.0, "Euler angle in direction 1");
21  params.addParam<Real>("euler_angle_2", 0.0, "Euler angle in direction 2");
22  params.addParam<Real>("euler_angle_3", 0.0, "Euler angle in direction 3");
23  return params;
24 }
25 
26 LinearAnisotropicMaterial::LinearAnisotropicMaterial(const InputParameters & parameters)
27  : LinearIsotropicMaterial(parameters),
28  _material_constant_c11(getParam<Real>("material_constant_c11")),
29  _material_constant_c12(getParam<Real>("material_constant_c12")),
30  _material_constant_c44(getParam<Real>("material_constant_c44")),
31  _euler_angle_1(getParam<Real>("euler_angle_1")),
32  _euler_angle_2(getParam<Real>("euler_angle_2")),
33  _euler_angle_3(getParam<Real>("euler_angle_3"))
34 {
36  aniso_elasticity_tensor->setMaterialConstantc11(_material_constant_c11);
37  aniso_elasticity_tensor->setMaterialConstantc12(_material_constant_c12);
38  aniso_elasticity_tensor->setMaterialConstantc44(_material_constant_c44);
39 
40  /* AMJ: I believe I have identified a logic bug with using inherited classes (e.g.,
41  LinearAnisotropicMaterial and non-zero Euler angles in conjunction with/inheriting from
42  LinearIsotropicMaterial. When using Euler angles = 0.0, no problem occurs. However,
43  using Euler angles != zero causes the _elasticity_tensor[_qp]=*_local_elasticity_tensor
44  to rotate with every single quadrature point, every time the Material class is
45  computed. This is due to the _local_elasticity_tensor->calculate(_qp) call. Because
46  we are dereferencing the _local_elasticity_tensor, we are actually changing the
47  original elasticity tensor that is supplied (from the input or material class
48  construction, etc). I've attempted to fix this by moving the relevant information
49  into a local copy_local_tensor variable, but (perhaps because I don't know enough
50  C++) I cannot get this to work in LinearIsotropicMaterial for an arbitrary derived class that
51  may use different derived kinds of Symm***ElasticityTensors. So... good luck, Chuck.
52  I might not be able to fix the problem, but I think I've identified it correctly. */
53 
54  aniso_elasticity_tensor->setFirstEulerAngle(_euler_angle_1);
55  aniso_elasticity_tensor->setSecondEulerAngle(_euler_angle_2);
56  aniso_elasticity_tensor->setThirdEulerAngle(_euler_angle_3);
57 
59  _local_elasticity_tensor = aniso_elasticity_tensor;
60 }
void setMaterialConstantc11(const Real c11)
Set the material constant c11; assumes cubic material.
LinearAnisotropicMaterial(const InputParameters &parameters)
LinearIsotropic material for use in simple applications that don&#39;t need material properties.
InputParameters validParams< LinearIsotropicMaterial >()
void setMaterialConstantc44(const Real c44)
Set the material constant c44; assumes cubic material.
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 setMaterialConstantc12(const Real c12)
Set the material constant c22; assumes cubic material.
SymmElasticityTensor * _local_elasticity_tensor
InputParameters validParams< LinearAnisotropicMaterial >()