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

Constructor & Destructor Documentation

◆ ComputeVolumetricEigenstrain()

ComputeVolumetricEigenstrain::ComputeVolumetricEigenstrain ( const InputParameters &  parameters)

Definition at line 30 of file ComputeVolumetricEigenstrain.C.

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

◆ computeQpEigenstrain()

void ComputeVolumetricEigenstrain::computeQpEigenstrain ( )
protectedvirtual

Definition at line 106 of file ComputeVolumetricEigenstrain.C.

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

◆ initialSetup()

void ComputeVolumetricEigenstrain::initialSetup ( )
protectedvirtual

Definition at line 81 of file ComputeVolumetricEigenstrain.C.

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

◆ _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 52 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 47 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 50 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 45 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 37 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 40 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 42 of file ComputeVolumetricEigenstrain.h.

Referenced by computeQpEigenstrain(), and ComputeVolumetricEigenstrain().


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