https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ComputeVariableBaseEigenStrain.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
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
13
16{
18 params.addClassDescription("Computes Eigenstrain based on material property tensor base");
19 params.addRequiredParam<MaterialPropertyName>("base_tensor_property_name",
20 "Name of base tensor property");
21 params.addParam<MaterialPropertyName>(
22 "prefactor", 1.0, "Name of material defining the variable dependence");
23 params.addParam<std::vector<Real>>(
24 "offset_tensor", "Vector of values defining the constant base tensor for the Eigenstrain");
25 return params;
26}
27
29 : ComputeEigenstrainBase(parameters),
30 _base_tensor(getMaterialProperty<RealTensorValue>("base_tensor_property_name")),
31 _prefactor(getMaterialProperty<Real>("prefactor"))
32{
33 if (isParamValid("offset_tensor"))
34 _offset_tensor.fillFromInputVector(getParam<std::vector<Real>>("offset_tensor"));
35 else
36 _offset_tensor.zero();
37}
38
39void
registerMooseObject("SolidMechanicsApp", ComputeVariableBaseEigenStrain)
ComputeEigenstrainBase is the base class for eigenstrain tensors.
GenericMaterialProperty< RankTwoTensor, is_ad > & _eigenstrain
Stores the current total eigenstrain.
static InputParameters validParams()
ComputeVariableBaseEigenstrain computes an Eigenstrain based on a real tensor value material property...
virtual void computeQpEigenstrain()
Compute the eigenstrain and store in _eigenstrain.
const MaterialProperty< Real > & _prefactor
ComputeVariableBaseEigenStrain(const InputParameters &parameters)
const MaterialProperty< RealTensorValue > & _base_tensor
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
unsigned int _qp
const T & getParam(const std::string &name) const
bool isParamValid(const std::string &name) const
void fillFromInputVector(const std::vector< T > &input, FillMethod fill_method=autodetect)