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

ComputeVolumetricEigenstrain computes an eigenstrain that is defined by a set of scalar material properties that summed together define the volumetric change. More...

#include <ComputeVolumetricEigenstrain.h>

Inheritance diagram for ComputeVolumetricEigenstrain:
[legend]

Public Member Functions

 ComputeVolumetricEigenstrain (const InputParameters &parameters)
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual void initialSetup ()
 
virtual void computeQpEigenstrain ()
 

Protected Attributes

const unsigned int _num_args
 number of variables the material depends on More...
 
const std::vector< MaterialPropertyName > _volumetric_material_names
 Names of the material properties that define volumetric change. More...
 
std::vector< const MaterialProperty< Real > * > _volumetric_materials
 The material properties that define volumetric change. More...
 
std::vector< std::vector< const MaterialProperty< Real > * > > _dvolumetric_materials
 first derivatives of the volumetric materials with respect to the args More...
 
std::vector< std::vector< std::vector< const MaterialProperty< Real > * > > > _d2volumetric_materials
 second derivatives of the volumetric materials with respect to the args More...
 
std::vector< MaterialProperty< RankTwoTensor > * > _delastic_strain
 first derivatives of the elastic strain with respect to the args More...
 
std::vector< std::vector< MaterialProperty< RankTwoTensor > * > > _d2elastic_strain
 second derivatives of the elastic strain with respect to the args More...
 

Detailed Description

ComputeVolumetricEigenstrain computes an eigenstrain that is defined by a set of scalar material properties that summed together define the volumetric change.

This also computes the derivatives of that eigenstrain with respect to a supplied set of variable dependencies.");

Definition at line 26 of file ComputeVolumetricEigenstrain.h.

Constructor & Destructor Documentation

◆ ComputeVolumetricEigenstrain()

ComputeVolumetricEigenstrain::ComputeVolumetricEigenstrain ( const InputParameters &  parameters)

Definition at line 31 of file ComputeVolumetricEigenstrain.C.

32  : DerivativeMaterialInterface<ComputeEigenstrainBase>(parameters),
33  _num_args(coupledComponents("args")),
34  _volumetric_material_names(getParam<std::vector<MaterialPropertyName>>("volumetric_materials")),
40 {
41  for (unsigned int i = 0; i < _volumetric_material_names.size(); ++i)
42  _volumetric_materials[i] = &getMaterialProperty<Real>(_volumetric_material_names[i]);
43 
44  // fetch prerequisite derivatives and build elastic_strain derivatives and cross-derivatives
45  for (unsigned int i = 0; i < _volumetric_material_names.size(); ++i)
46  {
47  const MaterialPropertyName & vol_matl_name = _volumetric_material_names[i];
50  for (unsigned int j = 0; j < _num_args; ++j)
51  {
52  const VariableName & jname = getVar("args", j)->name();
53  _dvolumetric_materials[i][j] = &getMaterialPropertyDerivative<Real>(vol_matl_name, jname);
54  _d2volumetric_materials[i][j].resize(_num_args);
55 
56  for (unsigned int k = j; k < _num_args; ++k)
57  {
58  const VariableName & kname = getVar("args", k)->name();
59  _d2volumetric_materials[i][j][k] =
60  &getMaterialPropertyDerivative<Real>("prefactor", jname, kname);
61  }
62  }
63  }
64 
65  for (unsigned int j = 0; j < _num_args; ++j)
66  {
67  const VariableName & jname = getVar("args", j)->name();
68  _delastic_strain[j] =
69  &declarePropertyDerivative<RankTwoTensor>(_base_name + "elastic_strain", jname);
70  _d2elastic_strain[j].resize(_num_args);
71 
72  for (unsigned int k = j; k < _num_args; ++k)
73  {
74  const VariableName & kname = getVar("args", k)->name();
75  _d2elastic_strain[j][k] =
76  &declarePropertyDerivative<RankTwoTensor>(_base_name + "elastic_strain", jname, kname);
77  }
78  }
79 }

Member Function Documentation

◆ computeQpEigenstrain()

void ComputeVolumetricEigenstrain::computeQpEigenstrain ( )
protectedvirtual

Definition at line 108 of file ComputeVolumetricEigenstrain.C.

109 {
110  Real volumetric_strain = 0;
111  for (unsigned int i = 0; i < _volumetric_materials.size(); ++i)
112  volumetric_strain += (*_volumetric_materials[i])[_qp];
113 
114  const Real eigenstrain_comp = computeVolumetricStrainComponent(volumetric_strain);
115  _eigenstrain[_qp].zero();
116  _eigenstrain[_qp].addIa(eigenstrain_comp);
117 
118  // TODO: Compute derivatives of the elastic strain wrt the variables specified in args
119 }

◆ initialSetup()

void ComputeVolumetricEigenstrain::initialSetup ( )
protectedvirtual

Definition at line 82 of file ComputeVolumetricEigenstrain.C.

83 {
84  for (auto vmn : _volumetric_material_names)
85  validateCoupling<Real>(vmn);
86 
87  for (unsigned int i = 0; i < _num_args; ++i)
88  {
89  const VariableName & iname = getVar("args", i)->name();
90  if (_fe_problem.isMatPropRequested(
91  derivativePropertyNameFirst(_base_name + "elastic_strain", iname)))
92  mooseError("Derivative of elastic_strain requested, but not yet implemented");
93  else
94  _delastic_strain[i] = nullptr;
95  for (unsigned int j = 0; j < _num_args; ++j)
96  {
97  const VariableName & jname = getVar("args", j)->name();
98  if (_fe_problem.isMatPropRequested(
99  derivativePropertyNameSecond(_base_name + "elastic_strain", iname, jname)))
100  mooseError("Second Derivative of elastic_strain requested, but not yet implemented");
101  else
102  _d2elastic_strain[i][j] = nullptr;
103  }
104  }
105 }

◆ validParams()

InputParameters ComputeVolumetricEigenstrain::validParams ( )
static

Definition at line 18 of file ComputeVolumetricEigenstrain.C.

19 {
20  InputParameters params = ComputeEigenstrainBase::validParams();
21  params.addClassDescription("Computes an eigenstrain that is defined by a set of scalar material "
22  "properties that summed together define the volumetric change. This "
23  "also computes the derivatives of that eigenstrain with respect to a "
24  "supplied set of variable dependencies.");
25  params.addRequiredParam<std::vector<MaterialPropertyName>>(
26  "volumetric_materials", "List of scalar materials defining the volumetric change");
27  params.addRequiredCoupledVar("args", "variable dependencies for the volumetric_expansion");
28  return params;
29 }

Member Data Documentation

◆ _d2elastic_strain

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

second derivatives of the elastic strain with respect to the args

Definition at line 53 of file ComputeVolumetricEigenstrain.h.

Referenced by ComputeVolumetricEigenstrain(), and initialSetup().

◆ _d2volumetric_materials

std::vector<std::vector<std::vector<const MaterialProperty<Real> *> > > ComputeVolumetricEigenstrain::_d2volumetric_materials
protected

second derivatives of the volumetric materials with respect to the args

Definition at line 48 of file ComputeVolumetricEigenstrain.h.

Referenced by ComputeVolumetricEigenstrain().

◆ _delastic_strain

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

first derivatives of the elastic strain with respect to the args

Definition at line 51 of file ComputeVolumetricEigenstrain.h.

Referenced by ComputeVolumetricEigenstrain(), and initialSetup().

◆ _dvolumetric_materials

std::vector<std::vector<const MaterialProperty<Real> *> > ComputeVolumetricEigenstrain::_dvolumetric_materials
protected

first derivatives of the volumetric materials with respect to the args

Definition at line 46 of file ComputeVolumetricEigenstrain.h.

Referenced by ComputeVolumetricEigenstrain().

◆ _num_args

const unsigned int ComputeVolumetricEigenstrain::_num_args
protected

number of variables the material depends on

Definition at line 38 of file ComputeVolumetricEigenstrain.h.

Referenced by ComputeVolumetricEigenstrain(), and initialSetup().

◆ _volumetric_material_names

const std::vector<MaterialPropertyName> ComputeVolumetricEigenstrain::_volumetric_material_names
protected

Names of the material properties that define volumetric change.

Definition at line 41 of file ComputeVolumetricEigenstrain.h.

Referenced by ComputeVolumetricEigenstrain(), and initialSetup().

◆ _volumetric_materials

std::vector<const MaterialProperty<Real> *> ComputeVolumetricEigenstrain::_volumetric_materials
protected

The material properties that define volumetric change.

Definition at line 43 of file ComputeVolumetricEigenstrain.h.

Referenced by computeQpEigenstrain(), and ComputeVolumetricEigenstrain().


The documentation for this class was generated from the following files:
ComputeEigenstrainBase::validParams
static InputParameters validParams()
Definition: ComputeEigenstrainBase.C:17
ComputeVolumetricEigenstrain::_num_args
const unsigned int _num_args
number of variables the material depends on
Definition: ComputeVolumetricEigenstrain.h:38
ComputeVolumetricEigenstrain::_volumetric_materials
std::vector< const MaterialProperty< Real > * > _volumetric_materials
The material properties that define volumetric change.
Definition: ComputeVolumetricEigenstrain.h:43
ComputeVolumetricEigenstrain::_dvolumetric_materials
std::vector< std::vector< const MaterialProperty< Real > * > > _dvolumetric_materials
first derivatives of the volumetric materials with respect to the args
Definition: ComputeVolumetricEigenstrain.h:46
ComputeVolumetricEigenstrain::_d2elastic_strain
std::vector< std::vector< MaterialProperty< RankTwoTensor > * > > _d2elastic_strain
second derivatives of the elastic strain with respect to the args
Definition: ComputeVolumetricEigenstrain.h:53
ComputeVolumetricEigenstrain::_delastic_strain
std::vector< MaterialProperty< RankTwoTensor > * > _delastic_strain
first derivatives of the elastic strain with respect to the args
Definition: ComputeVolumetricEigenstrain.h:51
ComputeVolumetricEigenstrain::_d2volumetric_materials
std::vector< std::vector< std::vector< const MaterialProperty< Real > * > > > _d2volumetric_materials
second derivatives of the volumetric materials with respect to the args
Definition: ComputeVolumetricEigenstrain.h:48
ComputeVolumetricEigenstrain::_volumetric_material_names
const std::vector< MaterialPropertyName > _volumetric_material_names
Names of the material properties that define volumetric change.
Definition: ComputeVolumetricEigenstrain.h:41