www.mooseframework.org
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ComputeVariableEigenstrain Class Reference

ComputeVariableEigenstrain computes an Eigenstrain that is a function of variables defined by a base tensor and a scalar function defined in a Derivative Material. More...

#include <ComputeVariableEigenstrain.h>

Inheritance diagram for ComputeVariableEigenstrain:
[legend]

Public Member Functions

 ComputeVariableEigenstrain (const InputParameters &parameters)
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual void computeQpEigenstrain ()
 

Protected Attributes

const unsigned int _num_args
 number of variables the prefactor depends on More...
 
std::vector< const MaterialProperty< Real > * > _dprefactor
 first derivatives of the prefactor w.r.t. to the args More...
 
std::vector< std::vector< const MaterialProperty< Real > * > > _d2prefactor
 second derivatives of the prefactor w.r.t. to the args More...
 
std::vector< MaterialProperty< RankTwoTensor > * > _delastic_strain
 first derivatives of the elastic strain w.r.t. to the args More...
 
std::vector< std::vector< MaterialProperty< RankTwoTensor > * > > _d2elastic_strain
 second derivatives of the elastic strain w.r.t. to the args More...
 

Detailed Description

ComputeVariableEigenstrain computes an Eigenstrain that is a function of variables defined by a base tensor and a scalar function defined in a Derivative Material.

Definition at line 24 of file ComputeVariableEigenstrain.h.

Constructor & Destructor Documentation

◆ ComputeVariableEigenstrain()

ComputeVariableEigenstrain::ComputeVariableEigenstrain ( const InputParameters &  parameters)

Definition at line 27 of file ComputeVariableEigenstrain.C.

28  : DerivativeMaterialInterface<ComputeEigenstrain>(parameters),
29  _num_args(coupledComponents("args")),
34 {
35  // fetch prerequisite derivatives and build elastic_strain derivatives and cross-derivatives
36  for (unsigned int i = 0; i < _num_args; ++i)
37  {
38  const VariableName & iname = getVar("args", i)->name();
39  _dprefactor[i] = &getMaterialPropertyDerivative<Real>("prefactor", iname);
40  _delastic_strain[i] =
41  &declarePropertyDerivative<RankTwoTensor>(_base_name + "elastic_strain", iname);
42 
43  _d2prefactor[i].resize(_num_args);
44  _d2elastic_strain[i].resize(_num_args);
45 
46  for (unsigned int j = i; j < _num_args; ++j)
47  {
48  const VariableName & jname = getVar("args", j)->name();
49  _d2prefactor[i][j] = &getMaterialPropertyDerivative<Real>("prefactor", iname, jname);
50  _d2elastic_strain[i][j] =
51  &declarePropertyDerivative<RankTwoTensor>(_base_name + "elastic_strain", iname, jname);
52  }
53  }
54 }

Member Function Documentation

◆ computeQpEigenstrain()

void ComputeVariableEigenstrain::computeQpEigenstrain ( )
protectedvirtual

Definition at line 57 of file ComputeVariableEigenstrain.C.

58 {
60 
61  // Define derivatives of the elastic strain
62  for (unsigned int i = 0; i < _num_args; ++i)
63  {
64  (*_delastic_strain[i])[_qp] = -_eigen_base_tensor * (*_dprefactor[i])[_qp];
65  for (unsigned int j = i; j < _num_args; ++j)
66  (*_d2elastic_strain[i][j])[_qp] = -_eigen_base_tensor * (*_d2prefactor[i][j])[_qp];
67  }
68 }

◆ validParams()

InputParameters ComputeVariableEigenstrain::validParams ( )
static

Definition at line 17 of file ComputeVariableEigenstrain.C.

18 {
19  InputParameters params = ComputeEigenstrain::validParams();
20  params.addClassDescription("Computes an Eigenstrain and its derivatives that is a function of "
21  "multiple variables, where the prefactor is defined in a derivative "
22  "material");
23  params.addRequiredCoupledVar("args", "variable dependencies for the prefactor");
24  return params;
25 }

Member Data Documentation

◆ _d2elastic_strain

std::vector<std::vector<MaterialProperty<RankTwoTensor> *> > ComputeVariableEigenstrain::_d2elastic_strain
protected

second derivatives of the elastic strain w.r.t. to the args

Definition at line 45 of file ComputeVariableEigenstrain.h.

Referenced by computeQpEigenstrain(), and ComputeVariableEigenstrain().

◆ _d2prefactor

std::vector<std::vector<const MaterialProperty<Real> *> > ComputeVariableEigenstrain::_d2prefactor
protected

second derivatives of the prefactor w.r.t. to the args

Definition at line 40 of file ComputeVariableEigenstrain.h.

Referenced by computeQpEigenstrain(), and ComputeVariableEigenstrain().

◆ _delastic_strain

std::vector<MaterialProperty<RankTwoTensor> *> ComputeVariableEigenstrain::_delastic_strain
protected

first derivatives of the elastic strain w.r.t. to the args

Definition at line 43 of file ComputeVariableEigenstrain.h.

Referenced by computeQpEigenstrain(), and ComputeVariableEigenstrain().

◆ _dprefactor

std::vector<const MaterialProperty<Real> *> ComputeVariableEigenstrain::_dprefactor
protected

first derivatives of the prefactor w.r.t. to the args

Definition at line 38 of file ComputeVariableEigenstrain.h.

Referenced by computeQpEigenstrain(), and ComputeVariableEigenstrain().

◆ _num_args

const unsigned int ComputeVariableEigenstrain::_num_args
protected

number of variables the prefactor depends on

Definition at line 35 of file ComputeVariableEigenstrain.h.

Referenced by computeQpEigenstrain(), and ComputeVariableEigenstrain().


The documentation for this class was generated from the following files:
ComputeEigenstrain::computeQpEigenstrain
virtual void computeQpEigenstrain()
Compute the eigenstrain and store in _eigenstrain.
Definition: ComputeEigenstrain.C:35
ComputeVariableEigenstrain::_d2elastic_strain
std::vector< std::vector< MaterialProperty< RankTwoTensor > * > > _d2elastic_strain
second derivatives of the elastic strain w.r.t. to the args
Definition: ComputeVariableEigenstrain.h:45
ComputeVariableEigenstrain::_num_args
const unsigned int _num_args
number of variables the prefactor depends on
Definition: ComputeVariableEigenstrain.h:35
ComputeVariableEigenstrain::_delastic_strain
std::vector< MaterialProperty< RankTwoTensor > * > _delastic_strain
first derivatives of the elastic strain w.r.t. to the args
Definition: ComputeVariableEigenstrain.h:43
ComputeVariableEigenstrain::_dprefactor
std::vector< const MaterialProperty< Real > * > _dprefactor
first derivatives of the prefactor w.r.t. to the args
Definition: ComputeVariableEigenstrain.h:38
ComputeVariableEigenstrain::_d2prefactor
std::vector< std::vector< const MaterialProperty< Real > * > > _d2prefactor
second derivatives of the prefactor w.r.t. to the args
Definition: ComputeVariableEigenstrain.h:40
ComputeEigenstrain::validParams
static InputParameters validParams()
Definition: ComputeEigenstrain.C:17