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

ComputeVariableIsotropicElasticityTensor defines an elasticity tensor material for isotropic materials in which the elastic constants (Young's modulus and Poisson's ratio) vary as defined by material properties. More...

#include <ComputeVariableIsotropicElasticityTensor.h>

Inheritance diagram for ComputeVariableIsotropicElasticityTensor:
[legend]

Public Member Functions

 ComputeVariableIsotropicElasticityTensor (const InputParameters &parameters)
 
bool hasGuarantee (const MaterialPropertyName &prop_name, Guarantee guarantee)
 

Protected Member Functions

virtual void initialSetup () override
 
virtual void initQpStatefulProperties () override
 
virtual void computeQpElasticityTensor () override
 
virtual void computeQpProperties ()
 
void issueGuarantee (const MaterialPropertyName &prop_name, Guarantee guarantee)
 
void revokeGuarantee (const MaterialPropertyName &prop_name, Guarantee guarantee)
 

Protected Attributes

const MaterialProperty< Real > & _youngs_modulus
 Material defininig the Young's Modulus. More...
 
const MaterialProperty< Real > & _poissons_ratio
 Material defininig the Poisson's Ratio. More...
 
const unsigned int _num_args
 number of variables the moduli depend on More...
 
std::vector< const MaterialProperty< Real > * > _dyoungs_modulus
 first derivatives of the Young's Modulus with respect to the args More...
 
std::vector< std::vector< const MaterialProperty< Real > * > > _d2youngs_modulus
 second derivatives of the Young's Modulus with respect to the args More...
 
std::vector< const MaterialProperty< Real > * > _dpoissons_ratio
 first derivatives of the Poisson's Ratio with respect to the args More...
 
std::vector< std::vector< const MaterialProperty< Real > * > > _d2poissons_ratio
 second derivatives of the Poisson's Ratio with respect to the args More...
 
std::vector< MaterialProperty< RankFourTensor > * > _delasticity_tensor
 first derivatives of the elasticity tensor with respect to the args More...
 
std::vector< std::vector< MaterialProperty< RankFourTensor > * > > _d2elasticity_tensor
 second derivatives of the elasticity tensor with respect to the args More...
 
std::vector< Real > _isotropic_elastic_constants
 Vector of elastic constants to create the elasticity tensor (member to avoid memory churn) More...
 
std::string _base_name
 
std::string _elasticity_tensor_name
 
MaterialProperty< RankFourTensor > & _elasticity_tensor
 
Function *const _prefactor_function
 prefactor function to multiply the elasticity tensor with More...
 

Detailed Description

ComputeVariableIsotropicElasticityTensor defines an elasticity tensor material for isotropic materials in which the elastic constants (Young's modulus and Poisson's ratio) vary as defined by material properties.

Definition at line 17 of file ComputeVariableIsotropicElasticityTensor.h.

Constructor & Destructor Documentation

ComputeVariableIsotropicElasticityTensor::ComputeVariableIsotropicElasticityTensor ( const InputParameters &  parameters)

Definition at line 25 of file ComputeVariableIsotropicElasticityTensor.C.

27  : ComputeElasticityTensorBase(parameters),
28  _youngs_modulus(getMaterialProperty<Real>("youngs_modulus")),
29  _poissons_ratio(getMaterialProperty<Real>("poissons_ratio")),
30  _num_args(coupledComponents("args")),
38 {
39  // all tensors created by this class are always isotropic
41 
42  // fetch prerequisite derivatives and build elasticity tensor derivatives and cross-derivatives
43  for (unsigned int i = 0; i < _num_args; ++i)
44  {
45  const VariableName & iname = getVar("args", i)->name();
46  _dyoungs_modulus[i] = &getMaterialPropertyDerivative<Real>("youngs_modulus", iname);
47  _dpoissons_ratio[i] = &getMaterialPropertyDerivative<Real>("poissons_ratio", iname);
48 
50  &declarePropertyDerivative<RankFourTensor>(_elasticity_tensor_name, iname);
51 
52  _d2youngs_modulus[i].resize(_num_args);
53  _d2poissons_ratio[i].resize(_num_args);
54  _d2elasticity_tensor[i].resize(_num_args);
55 
56  for (unsigned int j = i; j < _num_args; ++j)
57  {
58  const VariableName & jname = getVar("args", j)->name();
59  _d2youngs_modulus[i][j] =
60  &getMaterialPropertyDerivative<Real>("youngs_modulus", iname, jname);
61  _d2poissons_ratio[i][j] =
62  &getMaterialPropertyDerivative<Real>("poissons_ratio", iname, jname);
63  _d2elasticity_tensor[i][j] =
64  &declarePropertyDerivative<RankFourTensor>(_elasticity_tensor_name, iname, jname);
65  }
66  }
67 }
const MaterialProperty< Real > & _youngs_modulus
Material defininig the Young&#39;s Modulus.
std::vector< std::vector< const MaterialProperty< Real > * > > _d2poissons_ratio
second derivatives of the Poisson&#39;s Ratio with respect to the args
const MaterialProperty< Real > & _poissons_ratio
Material defininig the Poisson&#39;s Ratio.
void issueGuarantee(const MaterialPropertyName &prop_name, Guarantee guarantee)
std::vector< std::vector< MaterialProperty< RankFourTensor > * > > _d2elasticity_tensor
second derivatives of the elasticity tensor with respect to the args
const unsigned int _num_args
number of variables the moduli depend on
std::vector< const MaterialProperty< Real > * > _dpoissons_ratio
first derivatives of the Poisson&#39;s Ratio with respect to the args
std::vector< Real > _isotropic_elastic_constants
Vector of elastic constants to create the elasticity tensor (member to avoid memory churn) ...
std::vector< MaterialProperty< RankFourTensor > * > _delasticity_tensor
first derivatives of the elasticity tensor with respect to the args
ComputeElasticityTensorBase(const InputParameters &parameters)
std::vector< std::vector< const MaterialProperty< Real > * > > _d2youngs_modulus
second derivatives of the Young&#39;s Modulus with respect to the args
std::vector< const MaterialProperty< Real > * > _dyoungs_modulus
first derivatives of the Young&#39;s Modulus with respect to the args

Member Function Documentation

void ComputeVariableIsotropicElasticityTensor::computeQpElasticityTensor ( )
overrideprotectedvirtual

Implements ComputeElasticityTensorBase.

Definition at line 97 of file ComputeVariableIsotropicElasticityTensor.C.

98 {
99  const Real E = _youngs_modulus[_qp];
100  const Real nu = _poissons_ratio[_qp];
101 
102  _elasticity_tensor[_qp].fillSymmetricIsotropicEandNu(E, nu);
103 
104  // Define derivatives of the elasticity tensor
105  for (unsigned int i = 0; i < _num_args; ++i)
106  {
107  if (_delasticity_tensor[i])
108  {
109  const Real dE = (*_dyoungs_modulus[i])[_qp];
110  const Real dnu = (*_dpoissons_ratio[i])[_qp];
111 
112  const Real dlambda = (E * dnu + dE * nu) / ((1.0 + nu) * (1.0 - 2.0 * nu)) -
113  E * nu * dnu / ((1.0 + nu) * (1.0 + nu) * (1.0 - 2.0 * nu)) +
114  2.0 * E * nu * dnu / ((1.0 + nu) * (1.0 - 2.0 * nu) * (1.0 - 2.0 * nu));
115  const Real dG = dE / (2.0 * (1.0 + nu)) - 2.0 * E * dnu / (4.0 * (1.0 + nu) * (1.0 + nu));
116 
117  (*_delasticity_tensor[i])[_qp].fillGeneralIsotropic(dlambda, dG, 0.0);
118  }
119 
120  for (unsigned int j = i; j < _num_args; ++j)
121  if (_d2elasticity_tensor[i][j])
122  {
123  const Real dEi = (*_dyoungs_modulus[i])[_qp];
124  const Real dnui = (*_dpoissons_ratio[i])[_qp];
125 
126  const Real dEj = (*_dyoungs_modulus[j])[_qp];
127  const Real dnuj = (*_dpoissons_ratio[j])[_qp];
128 
129  const Real d2E = (*_d2youngs_modulus[i][j])[_qp];
130  const Real d2nu = (*_d2poissons_ratio[i][j])[_qp];
131 
132  const Real d2lambda =
133  1.0 / ((1.0 + nu) * (2.0 * nu - 1.0)) *
134  (-E * d2nu - nu * d2E - dEi * dnuj - dEj * dnui +
135  (2.0 * E * d2nu * nu + 4.0 * dnui * dnuj * E + 2.0 * dEi * dnuj * nu +
136  2.0 * dEj * dnui * nu) /
137  (2.0 * nu - 1.0) -
138  8.0 * dnui * dnuj * E * nu / ((2.0 * nu - 1.0) * (2.0 * nu - 1.0)) +
139  (E * d2nu * nu + 2.0 * E * dnui * dnuj + dEi * dnuj * nu + dEj * dnui * nu) /
140  (nu + 1.0) -
141  4.0 * E * nu * dnui * dnuj / ((1.0 + nu) * (2.0 * nu - 1.0)) -
142  2.0 * E * dnui * dnuj * nu / ((nu + 1.0) * (nu + 1.0)));
143  const Real d2G = 1.0 / (nu + 1.0) *
144  (0.5 * d2E - (E * d2nu + dEi * dnuj + dEj * dnui) / (2.0 * nu + 2.0) +
145  dnui * dnuj * E / ((nu + 1.0) * (nu + 1.0)));
146 
147  (*_d2elasticity_tensor[i][j])[_qp].fillGeneralIsotropic(d2lambda, d2G, 0.0);
148  }
149  }
150 }
const MaterialProperty< Real > & _youngs_modulus
Material defininig the Young&#39;s Modulus.
std::vector< std::vector< const MaterialProperty< Real > * > > _d2poissons_ratio
second derivatives of the Poisson&#39;s Ratio with respect to the args
const MaterialProperty< Real > & _poissons_ratio
Material defininig the Poisson&#39;s Ratio.
std::vector< std::vector< MaterialProperty< RankFourTensor > * > > _d2elasticity_tensor
second derivatives of the elasticity tensor with respect to the args
const unsigned int _num_args
number of variables the moduli depend on
std::vector< const MaterialProperty< Real > * > _dpoissons_ratio
first derivatives of the Poisson&#39;s Ratio with respect to the args
std::vector< MaterialProperty< RankFourTensor > * > _delasticity_tensor
first derivatives of the elasticity tensor with respect to the args
std::vector< std::vector< const MaterialProperty< Real > * > > _d2youngs_modulus
second derivatives of the Young&#39;s Modulus with respect to the args
std::vector< const MaterialProperty< Real > * > _dyoungs_modulus
first derivatives of the Young&#39;s Modulus with respect to the args
MaterialProperty< RankFourTensor > & _elasticity_tensor
void ComputeElasticityTensorBase::computeQpProperties ( )
protectedvirtualinherited

Definition at line 39 of file ComputeElasticityTensorBase.C.

40 {
42 
43  // Multiply by prefactor
45  _elasticity_tensor[_qp] *= _prefactor_function->value(_t, _q_point[_qp]);
46 }
Function *const _prefactor_function
prefactor function to multiply the elasticity tensor with
virtual void computeQpElasticityTensor()=0
MaterialProperty< RankFourTensor > & _elasticity_tensor
bool GuaranteeProvider::hasGuarantee ( const MaterialPropertyName &  prop_name,
Guarantee  guarantee 
)
inherited

Definition at line 14 of file GuaranteeProvider.C.

15 {
16  auto it = _guarantees.find(prop_name);
17  if (it == _guarantees.end())
18  return false;
19 
20  auto it2 = it->second.find(guarantee);
21  return it2 != it->second.end();
22 }
std::map< MaterialPropertyName, std::set< Guarantee > > _guarantees
void ComputeVariableIsotropicElasticityTensor::initialSetup ( )
overrideprotectedvirtual

Definition at line 70 of file ComputeVariableIsotropicElasticityTensor.C.

71 {
72  validateCoupling<Real>("youngs_modulus");
73  validateCoupling<Real>("poissons_ratio");
74  for (unsigned int i = 0; i < _num_args; ++i)
75  {
76  const VariableName & iname = getVar("args", i)->name();
77 
78  if (!_fe_problem.isMatPropRequested(propertyNameFirst(_elasticity_tensor_name, iname)))
79  _delasticity_tensor[i] = nullptr;
80 
81  for (unsigned int j = 0; j < _num_args; ++j)
82  {
83  const VariableName & jname = getVar("args", j)->name();
84  if (!_fe_problem.isMatPropRequested(
85  propertyNameSecond(_elasticity_tensor_name, iname, jname)))
86  _d2elasticity_tensor[i][j] = nullptr;
87  }
88  }
89 }
std::vector< std::vector< MaterialProperty< RankFourTensor > * > > _d2elasticity_tensor
second derivatives of the elasticity tensor with respect to the args
const unsigned int _num_args
number of variables the moduli depend on
std::vector< MaterialProperty< RankFourTensor > * > _delasticity_tensor
first derivatives of the elasticity tensor with respect to the args
void ComputeVariableIsotropicElasticityTensor::initQpStatefulProperties ( )
overrideprotectedvirtual

Definition at line 92 of file ComputeVariableIsotropicElasticityTensor.C.

93 {
94 }
void GuaranteeProvider::issueGuarantee ( const MaterialPropertyName &  prop_name,
Guarantee  guarantee 
)
protectedinherited
void GuaranteeProvider::revokeGuarantee ( const MaterialPropertyName &  prop_name,
Guarantee  guarantee 
)
protectedinherited

Definition at line 32 of file GuaranteeProvider.C.

Referenced by ComputeElasticityTensorCP::ComputeElasticityTensorCP().

33 {
34  auto it = _guarantees.find(prop_name);
35  if (it != _guarantees.end())
36  it->second.erase(guarantee);
37 }
std::map< MaterialPropertyName, std::set< Guarantee > > _guarantees

Member Data Documentation

std::string ComputeElasticityTensorBase::_base_name
protectedinherited
std::vector<std::vector<MaterialProperty<RankFourTensor> *> > ComputeVariableIsotropicElasticityTensor::_d2elasticity_tensor
protected

second derivatives of the elasticity tensor with respect to the args

Definition at line 49 of file ComputeVariableIsotropicElasticityTensor.h.

Referenced by computeQpElasticityTensor(), ComputeVariableIsotropicElasticityTensor(), and initialSetup().

std::vector<std::vector<const MaterialProperty<Real> *> > ComputeVariableIsotropicElasticityTensor::_d2poissons_ratio
protected

second derivatives of the Poisson's Ratio with respect to the args

Definition at line 44 of file ComputeVariableIsotropicElasticityTensor.h.

Referenced by computeQpElasticityTensor(), and ComputeVariableIsotropicElasticityTensor().

std::vector<std::vector<const MaterialProperty<Real> *> > ComputeVariableIsotropicElasticityTensor::_d2youngs_modulus
protected

second derivatives of the Young's Modulus with respect to the args

Definition at line 39 of file ComputeVariableIsotropicElasticityTensor.h.

Referenced by computeQpElasticityTensor(), and ComputeVariableIsotropicElasticityTensor().

std::vector<MaterialProperty<RankFourTensor> *> ComputeVariableIsotropicElasticityTensor::_delasticity_tensor
protected

first derivatives of the elasticity tensor with respect to the args

Definition at line 47 of file ComputeVariableIsotropicElasticityTensor.h.

Referenced by computeQpElasticityTensor(), ComputeVariableIsotropicElasticityTensor(), and initialSetup().

std::vector<const MaterialProperty<Real> *> ComputeVariableIsotropicElasticityTensor::_dpoissons_ratio
protected

first derivatives of the Poisson's Ratio with respect to the args

Definition at line 42 of file ComputeVariableIsotropicElasticityTensor.h.

Referenced by computeQpElasticityTensor(), and ComputeVariableIsotropicElasticityTensor().

std::vector<const MaterialProperty<Real> *> ComputeVariableIsotropicElasticityTensor::_dyoungs_modulus
protected

first derivatives of the Young's Modulus with respect to the args

Definition at line 37 of file ComputeVariableIsotropicElasticityTensor.h.

Referenced by computeQpElasticityTensor(), and ComputeVariableIsotropicElasticityTensor().

MaterialProperty<RankFourTensor>& ComputeElasticityTensorBase::_elasticity_tensor
protectedinherited
std::string ComputeElasticityTensorBase::_elasticity_tensor_name
protectedinherited
std::vector<Real> ComputeVariableIsotropicElasticityTensor::_isotropic_elastic_constants
protected

Vector of elastic constants to create the elasticity tensor (member to avoid memory churn)

Definition at line 52 of file ComputeVariableIsotropicElasticityTensor.h.

const unsigned int ComputeVariableIsotropicElasticityTensor::_num_args
protected

number of variables the moduli depend on

Definition at line 34 of file ComputeVariableIsotropicElasticityTensor.h.

Referenced by computeQpElasticityTensor(), ComputeVariableIsotropicElasticityTensor(), and initialSetup().

const MaterialProperty<Real>& ComputeVariableIsotropicElasticityTensor::_poissons_ratio
protected

Material defininig the Poisson's Ratio.

Definition at line 31 of file ComputeVariableIsotropicElasticityTensor.h.

Referenced by computeQpElasticityTensor().

Function* const ComputeElasticityTensorBase::_prefactor_function
protectedinherited

prefactor function to multiply the elasticity tensor with

Definition at line 34 of file ComputeElasticityTensorBase.h.

Referenced by ComputeLayeredCosseratElasticityTensor::computeQpElasticityTensor(), and ComputeElasticityTensorBase::computeQpProperties().

const MaterialProperty<Real>& ComputeVariableIsotropicElasticityTensor::_youngs_modulus
protected

Material defininig the Young's Modulus.

Definition at line 28 of file ComputeVariableIsotropicElasticityTensor.h.

Referenced by computeQpElasticityTensor().


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