www.mooseframework.org
ComputeVariableBaseEigenStrain.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 
9 template <>
10 InputParameters
12 {
13  InputParameters params = validParams<ComputeEigenstrainBase>();
14  params.addClassDescription("Computes Eigenstrain based on material property tensor base");
15  params.addRequiredParam<MaterialPropertyName>("base_tensor_property_name",
16  "Name of base tensor property");
17  params.addParam<MaterialPropertyName>(
18  "prefactor", 1.0, "Name of material defining the variable dependence");
19  params.addParam<std::vector<Real>>(
20  "offset_tensor", "Vector of values defining the constant base tensor for the Eigenstrain");
21  return params;
22 }
23 
25  : ComputeEigenstrainBase(parameters),
26  _base_tensor(getMaterialProperty<RealTensorValue>("base_tensor_property_name")),
27  _prefactor(getMaterialProperty<Real>("prefactor"))
28 {
29  if (isParamValid("offset_tensor"))
30  _offset_tensor.fillFromInputVector(getParam<std::vector<Real>>("offset_tensor"));
31  else
32  _offset_tensor.zero();
33 }
34 
35 void
37 {
38  RankTwoTensor base_rank_two_tensor = _base_tensor[_qp];
39  _eigenstrain[_qp] = base_rank_two_tensor * _prefactor[_qp] + _offset_tensor;
40 }
InputParameters validParams< ComputeEigenstrainBase >()
virtual void computeQpEigenstrain()
Compute the eigenstrain and store in _eigenstrain.
MaterialProperty< RankTwoTensor > & _eigenstrain
Stores the current total eigenstrain.
const MaterialProperty< Real > & _prefactor
ComputeVariableBaseEigenStrain(const InputParameters &parameters)
InputParameters validParams< ComputeVariableBaseEigenStrain >()
ComputeEigenstrainBase is the base class for eigenstrain tensors.
const MaterialProperty< RealTensorValue > & _base_tensor