www.mooseframework.org
ComputeElasticityTensorCP.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 /****************************************************************/
8 #include "RotationTensor.h"
9 
10 template <>
11 InputParameters
13 {
14  InputParameters params = validParams<ComputeElasticityTensor>();
15  params.addClassDescription("Compute an elasticity tensor for crystal plasticity.");
16  params.addParam<UserObjectName>("read_prop_user_object",
17  "The ElementReadPropertyFile "
18  "GeneralUserObject to read element "
19  "specific property values from file");
20  return params;
21 }
22 
23 ComputeElasticityTensorCP::ComputeElasticityTensorCP(const InputParameters & parameters)
24  : ComputeElasticityTensor(parameters),
25  _read_prop_user_object(isParamValid("read_prop_user_object")
26  ? &getUserObject<ElementPropertyReadFile>("read_prop_user_object")
27  : NULL),
28  _Euler_angles_mat_prop(declareProperty<RealVectorValue>("Euler_angles")),
29  _crysrot(declareProperty<RankTwoTensor>("crysrot")),
30  _R(_Euler_angles)
31 {
32  // the base class guarantees constant in time, but in this derived class the
33  // tensor will rotate over time once plastic deformation sets in
35 }
36 
37 void
39 {
41  {
42  _Euler_angles_mat_prop[_qp](0) = _read_prop_user_object->getData(_current_elem, 0);
43  _Euler_angles_mat_prop[_qp](1) = _read_prop_user_object->getData(_current_elem, 1);
44  _Euler_angles_mat_prop[_qp](2) = _read_prop_user_object->getData(_current_elem, 2);
45  }
46  else
48 }
49 
50 void
52 {
53  // Properties assigned at the beginning of every call to material calculation
55 
57 
58  _crysrot[_qp] = _R.transpose();
60  _elasticity_tensor[_qp].rotate(_crysrot[_qp]);
61 }
InputParameters validParams< ComputeElasticityTensor >()
ComputeElasticityTensor defines an elasticity tensor material object with a given base name...
MaterialProperty< RealVectorValue > & _Euler_angles_mat_prop
ComputeElasticityTensorCP(const InputParameters &parameters)
RotationTensor _R
Rotation matrix.
Real getData(const Elem *, unsigned int) const
This function assign property data to elements.
RankFourTensor _Cijkl
Individual material information.
void revokeGuarantee(const MaterialPropertyName &prop_name, Guarantee guarantee)
MaterialProperty< RankTwoTensor > & _crysrot
Crystal Rotation Matrix.
InputParameters validParams< ComputeElasticityTensorCP >()
const ElementPropertyReadFile * _read_prop_user_object
Element property read user object Presently used to read Euler angles - see test. ...
void update(Axis axis, Real angle)
reforms the rotation matrix according to axis and angle.
MaterialProperty< RankFourTensor > & _elasticity_tensor