www.mooseframework.org
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)
 

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 19 of file ComputeVolumetricEigenstrain.h.

Constructor & Destructor Documentation

ComputeVolumetricEigenstrain::ComputeVolumetricEigenstrain ( const InputParameters &  parameters)

Definition at line 25 of file ComputeVolumetricEigenstrain.C.

26  : DerivativeMaterialInterface<ComputeEigenstrainBase>(parameters),
27  _num_args(coupledComponents("args")),
28  _volumetric_material_names(getParam<std::vector<MaterialPropertyName>>("volumetric_materials")),
34 {
35  for (unsigned int i = 0; i < _volumetric_material_names.size(); ++i)
36  _volumetric_materials[i] = &getMaterialProperty<Real>(_volumetric_material_names[i]);
37 
38  // fetch prerequisite derivatives and build elastic_strain derivatives and cross-derivatives
39  for (unsigned int i = 0; i < _volumetric_material_names.size(); ++i)
40  {
41  const MaterialPropertyName & vol_matl_name = _volumetric_material_names[i];
44  for (unsigned int j = 0; j < _num_args; ++j)
45  {
46  const VariableName & jname = getVar("args", j)->name();
47  _dvolumetric_materials[i][j] = &getMaterialPropertyDerivative<Real>(vol_matl_name, jname);
48  _d2volumetric_materials[i][j].resize(_num_args);
49 
50  for (unsigned int k = j; k < _num_args; ++k)
51  {
52  const VariableName & kname = getVar("args", k)->name();
53  _d2volumetric_materials[i][j][k] =
54  &getMaterialPropertyDerivative<Real>("prefactor", jname, kname);
55  }
56  }
57  }
58 
59  for (unsigned int j = 0; j < _num_args; ++j)
60  {
61  const VariableName & jname = getVar("args", j)->name();
62  _delastic_strain[j] =
63  &declarePropertyDerivative<RankTwoTensor>(_base_name + "elastic_strain", jname);
64  _d2elastic_strain[j].resize(_num_args);
65 
66  for (unsigned int k = j; k < _num_args; ++k)
67  {
68  const VariableName & kname = getVar("args", k)->name();
69  _d2elastic_strain[j][k] =
70  &declarePropertyDerivative<RankTwoTensor>(_base_name + "elastic_strain", jname, kname);
71  }
72  }
73 }
std::vector< MaterialProperty< RankTwoTensor > * > _delastic_strain
first derivatives of the elastic strain with respect to the args
std::vector< std::vector< MaterialProperty< RankTwoTensor > * > > _d2elastic_strain
second derivatives of the elastic strain with respect to the args
std::vector< std::vector< std::vector< const MaterialProperty< Real > * > > > _d2volumetric_materials
second derivatives of the volumetric materials with respect to the args
const std::vector< MaterialPropertyName > _volumetric_material_names
Names of the material properties that define volumetric change.
const unsigned int _num_args
number of variables the material depends on
std::vector< std::vector< const MaterialProperty< Real > * > > _dvolumetric_materials
first derivatives of the volumetric materials with respect to the args
std::vector< const MaterialProperty< Real > * > _volumetric_materials
The material properties that define volumetric change.

Member Function Documentation

void ComputeVolumetricEigenstrain::computeQpEigenstrain ( )
protectedvirtual

Definition at line 101 of file ComputeVolumetricEigenstrain.C.

102 {
103  Real volumetric_strain = 0;
104  for (unsigned int i = 0; i < _volumetric_materials.size(); ++i)
105  volumetric_strain += (*_volumetric_materials[i])[_qp];
106 
107  const Real eigenstrain_comp = computeVolumetricStrainComponent(volumetric_strain);
108  _eigenstrain[_qp].zero();
109  _eigenstrain[_qp].addIa(eigenstrain_comp);
110 
111  // TODO: Compute derivatives of the elastic strain wrt the variables specified in args
112 }
std::vector< const MaterialProperty< Real > * > _volumetric_materials
The material properties that define volumetric change.
void ComputeVolumetricEigenstrain::initialSetup ( )
protectedvirtual

Definition at line 76 of file ComputeVolumetricEigenstrain.C.

77 {
78  for (auto vmn : _volumetric_material_names)
79  validateCoupling<Real>(vmn);
80 
81  for (unsigned int i = 0; i < _num_args; ++i)
82  {
83  const VariableName & iname = getVar("args", i)->name();
84  if (_fe_problem.isMatPropRequested(propertyNameFirst(_base_name + "elastic_strain", iname)))
85  mooseError("Derivative of elastic_strain requested, but not yet implemented");
86  else
87  _delastic_strain[i] = nullptr;
88  for (unsigned int j = 0; j < _num_args; ++j)
89  {
90  const VariableName & jname = getVar("args", j)->name();
91  if (_fe_problem.isMatPropRequested(
92  propertyNameSecond(_base_name + "elastic_strain", iname, jname)))
93  mooseError("Second Derivative of elastic_strain requested, but not yet implemented");
94  else
95  _d2elastic_strain[i][j] = nullptr;
96  }
97  }
98 }
std::vector< MaterialProperty< RankTwoTensor > * > _delastic_strain
first derivatives of the elastic strain with respect to the args
std::vector< std::vector< MaterialProperty< RankTwoTensor > * > > _d2elastic_strain
second derivatives of the elastic strain with respect to the args
const std::vector< MaterialPropertyName > _volumetric_material_names
Names of the material properties that define volumetric change.
const unsigned int _num_args
number of variables the material depends on

Member Data Documentation

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

second derivatives of the elastic strain with respect to the args

Definition at line 44 of file ComputeVolumetricEigenstrain.h.

Referenced by ComputeVolumetricEigenstrain(), and initialSetup().

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 39 of file ComputeVolumetricEigenstrain.h.

Referenced by ComputeVolumetricEigenstrain().

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

first derivatives of the elastic strain with respect to the args

Definition at line 42 of file ComputeVolumetricEigenstrain.h.

Referenced by ComputeVolumetricEigenstrain(), and initialSetup().

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 37 of file ComputeVolumetricEigenstrain.h.

Referenced by ComputeVolumetricEigenstrain().

const unsigned int ComputeVolumetricEigenstrain::_num_args
protected

number of variables the material depends on

Definition at line 29 of file ComputeVolumetricEigenstrain.h.

Referenced by ComputeVolumetricEigenstrain(), and initialSetup().

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

Names of the material properties that define volumetric change.

Definition at line 32 of file ComputeVolumetricEigenstrain.h.

Referenced by ComputeVolumetricEigenstrain(), and initialSetup().

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

The material properties that define volumetric change.

Definition at line 34 of file ComputeVolumetricEigenstrain.h.

Referenced by computeQpEigenstrain(), and ComputeVolumetricEigenstrain().


The documentation for this class was generated from the following files: