https://mooseframework.inl.gov
FunctionIsotropicEigenstrain.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 #include "RankTwoTensor.h"
12 #include "Function.h"
13 
14 registerMooseObject("SolidMechanicsTestApp", FunctionIsotropicEigenstrain);
15 
18 {
20  params.addClassDescription("Computes an eigenstrain equal to the identity matrix times a "
21  "function. Also computes the gradient of that eigenstrain.");
22  params.addParam<FunctionName>("function", "Function defining the eigenstrain");
23  params.addParam<bool>("use_displaced_mesh", true, "Displaced mesh defaults to true");
24  return params;
25 }
26 
28  : ComputeEigenstrainBase(parameters),
29  _function(getFunction("function")),
30  _eigenstrain_gradient(declareProperty<RankThreeTensor>(_eigenstrain_name + "_gradient"))
31 {
32 }
33 
34 void
36 {
37  RealVectorValue curr_point = _q_point[_qp];
38  Real func_value = _function.value(_t, curr_point);
39  RealGradient func_gradient = _function.gradient(_t, curr_point);
40 
42 
43  _eigenstrain[_qp] = func_value * I;
44  _eigenstrain_gradient[_qp] = I.mixedProductJkI(func_gradient);
45 }
const MooseArray< Point > & _q_point
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
unsigned int _qp
FunctionIsotropicEigenstrain(const InputParameters &parameters)
static InputParameters validParams()
MaterialProperty< RankThreeTensor > & _eigenstrain_gradient
Real & _t
ComputeEigenstrainBase is the base class for eigenstrain tensors.
virtual void computeQpEigenstrain() override
Compute the eigenstrain and store in _eigenstrain.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
GenericMaterialProperty< RankTwoTensor, is_ad > & _eigenstrain
Stores the current total eigenstrain.
virtual RealGradient gradient(Real t, const Point &p) const
registerMooseObject("SolidMechanicsTestApp", FunctionIsotropicEigenstrain)
void addClassDescription(const std::string &doc_string)
virtual Real value(Real t, const Point &p) const