www.mooseframework.org
ComputeElasticityTensorCP.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
11 #include "RotationTensor.h"
12 
13 registerMooseObject("TensorMechanicsApp", ComputeElasticityTensorCP);
14 
16 
17 InputParameters
19 {
20  InputParameters params = ComputeElasticityTensor::validParams();
21  params.addClassDescription("Compute an elasticity tensor for crystal plasticity.");
22  params.addParam<UserObjectName>("read_prop_user_object",
23  "The ElementReadPropertyFile "
24  "GeneralUserObject to read element "
25  "specific property values from file");
26  return params;
27 }
28 
29 ComputeElasticityTensorCP::ComputeElasticityTensorCP(const InputParameters & parameters)
30  : ComputeElasticityTensor(parameters),
31  _read_prop_user_object(isParamValid("read_prop_user_object")
32  ? &getUserObject<ElementPropertyReadFile>("read_prop_user_object")
33  : nullptr),
34  _Euler_angles_mat_prop(declareProperty<RealVectorValue>("Euler_angles")),
35  _crysrot(declareProperty<RankTwoTensor>("crysrot")),
36  _R(_Euler_angles)
37 {
38  // the base class guarantees constant in time, but in this derived class the
39  // tensor will rotate over time once plastic deformation sets in
41 
42  // the base class performs a passive rotation, but the crystal plasticity
43  // materials use active rotation: recover unrotated _Cijkl here
44  _Cijkl.rotate(_R.transpose());
45 }
46 
47 void
49 {
51  {
52  _Euler_angles_mat_prop[_qp](0) = _read_prop_user_object->getData(_current_elem, 0);
53  _Euler_angles_mat_prop[_qp](1) = _read_prop_user_object->getData(_current_elem, 1);
54  _Euler_angles_mat_prop[_qp](2) = _read_prop_user_object->getData(_current_elem, 2);
55  }
56  else
58 }
59 
60 void
62 {
63  // Properties assigned at the beginning of every call to material calculation
65 
67 
68  _crysrot[_qp] = _R.transpose();
70  _elasticity_tensor[_qp].rotate(_crysrot[_qp]);
71 }
ComputeElasticityTensor
ComputeElasticityTensor defines an elasticity tensor material object with a given base name.
Definition: ComputeElasticityTensor.h:22
ComputeElasticityTensor::_Cijkl
RankFourTensor _Cijkl
Individual material information.
Definition: ComputeElasticityTensor.h:33
registerMooseObject
registerMooseObject("TensorMechanicsApp", ComputeElasticityTensorCP)
ComputeElasticityTensorCP::ComputeElasticityTensorCP
ComputeElasticityTensorCP(const InputParameters &parameters)
Definition: ComputeElasticityTensorCP.C:29
ComputeElasticityTensorCP
ComputeElasticityTensorCP defines an elasticity tensor material object for crystal plasticity.
Definition: ComputeElasticityTensorCP.h:25
defineLegacyParams
defineLegacyParams(ComputeElasticityTensorCP)
ElementPropertyReadFile
Definition: ElementPropertyReadFile.h:27
ComputeElasticityTensorCP::assignEulerAngles
virtual void assignEulerAngles()
Definition: ComputeElasticityTensorCP.C:48
ElementPropertyReadFile::getData
Real getData(const Elem *, unsigned int) const
This function assign property data to elements.
Definition: ElementPropertyReadFile.C:126
ComputeElasticityTensorCP::computeQpElasticityTensor
virtual void computeQpElasticityTensor()
Definition: ComputeElasticityTensorCP.C:61
ComputeElasticityTensorCP::_read_prop_user_object
const ElementPropertyReadFile * _read_prop_user_object
Element property read user object Presently used to read Euler angles - see test.
Definition: ComputeElasticityTensorCP.h:41
ComputeElasticityTensor::validParams
static InputParameters validParams()
Definition: ComputeElasticityTensor.C:18
Guarantee::CONSTANT_IN_TIME
ComputeElasticityTensorCP::_crysrot
MaterialProperty< RankTwoTensor > & _crysrot
Crystal Rotation Matrix.
Definition: ComputeElasticityTensorCP.h:46
GuaranteeProvider::revokeGuarantee
void revokeGuarantee(const MaterialPropertyName &prop_name, Guarantee guarantee)
Definition: GuaranteeProvider.C:34
ComputeElasticityTensorBase::_elasticity_tensor
MaterialProperty< RankFourTensor > & _elasticity_tensor
Definition: ComputeElasticityTensorBase.h:40
ComputeElasticityTensorCP::validParams
static InputParameters validParams()
Definition: ComputeElasticityTensorCP.C:18
ComputeElasticityTensorCP::_Euler_angles_mat_prop
MaterialProperty< RealVectorValue > & _Euler_angles_mat_prop
Definition: ComputeElasticityTensorCP.h:43
ComputeRotatedElasticityTensorBase::_Euler_angles
RealVectorValue _Euler_angles
Definition: ComputeRotatedElasticityTensorBase.h:31
ComputeElasticityTensorCP.h
ComputeElasticityTensorBase::_elasticity_tensor_name
std::string _elasticity_tensor_name
Definition: ComputeElasticityTensorBase.h:38
RotationTensor.h
RankTwoTensorTempl
Definition: ACGrGrElasticDrivingForce.h:17
RotationTensor::update
void update(Axis axis, Real angle)
reforms the rotation matrix according to axis and angle.
Definition: RotationTensor.C:18
ComputeElasticityTensorCP::_R
RotationTensor _R
Rotation matrix.
Definition: ComputeElasticityTensorCP.h:49