https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
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
34void
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}
registerMooseObject("SolidMechanicsTestApp", FunctionIsotropicEigenstrain)
ComputeEigenstrainBase is the base class for eigenstrain tensors.
GenericMaterialProperty< RankTwoTensor, is_ad > & _eigenstrain
Stores the current total eigenstrain.
static InputParameters validParams()
FunctionIsotropicEigenstrain(const InputParameters &parameters)
virtual void computeQpEigenstrain() override
Compute the eigenstrain and store in _eigenstrain.
MaterialProperty< RankThreeTensor > & _eigenstrain_gradient
virtual RealGradient gradient(Real t, const Point &p) const
virtual Real value(Real t, const Point &p) const
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 MooseArray< Point > & _q_point
RankThreeTensorTempl< T > mixedProductJkI(const libMesh::VectorValue< T > &b) const
Real & _t