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 25 of file ComputeVariableIsotropicElasticityTensor.h.

Constructor & Destructor Documentation

◆ ComputeVariableIsotropicElasticityTensor()

ComputeVariableIsotropicElasticityTensor::ComputeVariableIsotropicElasticityTensor ( const InputParameters &  parameters)

Definition at line 30 of file ComputeVariableIsotropicElasticityTensor.C.

32  : ComputeElasticityTensorBase(parameters),
33  _youngs_modulus(getMaterialProperty<Real>("youngs_modulus")),
34  _poissons_ratio(getMaterialProperty<Real>("poissons_ratio")),
35  _num_args(coupledComponents("args")),
43 {
44  // all tensors created by this class are always isotropic
46 
47  // fetch prerequisite derivatives and build elasticity tensor derivatives and cross-derivatives
48  for (unsigned int i = 0; i < _num_args; ++i)
49  {
50  const VariableName & iname = getVar("args", i)->name();
51  _dyoungs_modulus[i] = &getMaterialPropertyDerivative<Real>("youngs_modulus", iname);
52  _dpoissons_ratio[i] = &getMaterialPropertyDerivative<Real>("poissons_ratio", iname);
53 
55  &declarePropertyDerivative<RankFourTensor>(_elasticity_tensor_name, iname);
56 
57  _d2youngs_modulus[i].resize(_num_args);
58  _d2poissons_ratio[i].resize(_num_args);
60 
61  for (unsigned int j = i; j < _num_args; ++j)
62  {
63  const VariableName & jname = getVar("args", j)->name();
64  _d2youngs_modulus[i][j] =
65  &getMaterialPropertyDerivative<Real>("youngs_modulus", iname, jname);
66  _d2poissons_ratio[i][j] =
67  &getMaterialPropertyDerivative<Real>("poissons_ratio", iname, jname);
68  _d2elasticity_tensor[i][j] =
69  &declarePropertyDerivative<RankFourTensor>(_elasticity_tensor_name, iname, jname);
70  }
71  }
72 }
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

◆ computeQpElasticityTensor()

void ComputeVariableIsotropicElasticityTensor::computeQpElasticityTensor ( )
overrideprotectedvirtual

Implements ComputeElasticityTensorBase.

Definition at line 102 of file ComputeVariableIsotropicElasticityTensor.C.

103 {
104  const Real E = _youngs_modulus[_qp];
105  const Real nu = _poissons_ratio[_qp];
106 
107  _elasticity_tensor[_qp].fillSymmetricIsotropicEandNu(E, nu);
108 
109  // Define derivatives of the elasticity tensor
110  for (unsigned int i = 0; i < _num_args; ++i)
111  {
112  if (_delasticity_tensor[i])
113  {
114  const Real dE = (*_dyoungs_modulus[i])[_qp];
115  const Real dnu = (*_dpoissons_ratio[i])[_qp];
116 
117  const Real dlambda = (E * dnu + dE * nu) / ((1.0 + nu) * (1.0 - 2.0 * nu)) -
118  E * nu * dnu / ((1.0 + nu) * (1.0 + nu) * (1.0 - 2.0 * nu)) +
119  2.0 * E * nu * dnu / ((1.0 + nu) * (1.0 - 2.0 * nu) * (1.0 - 2.0 * nu));
120  const Real dG = dE / (2.0 * (1.0 + nu)) - 2.0 * E * dnu / (4.0 * (1.0 + nu) * (1.0 + nu));
121 
122  (*_delasticity_tensor[i])[_qp].fillGeneralIsotropic(dlambda, dG, 0.0);
123  }
124 
125  for (unsigned int j = i; j < _num_args; ++j)
126  if (_d2elasticity_tensor[i][j])
127  {
128  const Real dEi = (*_dyoungs_modulus[i])[_qp];
129  const Real dnui = (*_dpoissons_ratio[i])[_qp];
130 
131  const Real dEj = (*_dyoungs_modulus[j])[_qp];
132  const Real dnuj = (*_dpoissons_ratio[j])[_qp];
133 
134  const Real d2E = (*_d2youngs_modulus[i][j])[_qp];
135  const Real d2nu = (*_d2poissons_ratio[i][j])[_qp];
136 
137  const Real d2lambda =
138  1.0 / ((1.0 + nu) * (2.0 * nu - 1.0)) *
139  (-E * d2nu - nu * d2E - dEi * dnuj - dEj * dnui +
140  (2.0 * E * d2nu * nu + 4.0 * dnui * dnuj * E + 2.0 * dEi * dnuj * nu +
141  2.0 * dEj * dnui * nu) /
142  (2.0 * nu - 1.0) -
143  8.0 * dnui * dnuj * E * nu / ((2.0 * nu - 1.0) * (2.0 * nu - 1.0)) +
144  (E * d2nu * nu + 2.0 * E * dnui * dnuj + dEi * dnuj * nu + dEj * dnui * nu) /
145  (nu + 1.0) -
146  4.0 * E * nu * dnui * dnuj / ((1.0 + nu) * (2.0 * nu - 1.0)) -
147  2.0 * E * dnui * dnuj * nu / ((nu + 1.0) * (nu + 1.0)));
148  const Real d2G = 1.0 / (nu + 1.0) *
149  (0.5 * d2E - (E * d2nu + dEi * dnuj + dEj * dnui) / (2.0 * nu + 2.0) +
150  dnui * dnuj * E / ((nu + 1.0) * (nu + 1.0)));
151 
152  (*_d2elasticity_tensor[i][j])[_qp].fillGeneralIsotropic(d2lambda, d2G, 0.0);
153  }
154  }
155 }
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

◆ computeQpProperties()

void ComputeElasticityTensorBase::computeQpProperties ( )
protectedvirtualinherited

Definition at line 41 of file ComputeElasticityTensorBase.C.

42 {
44 
45  // Multiply by prefactor
47  _elasticity_tensor[_qp] *= _prefactor_function->value(_t, _q_point[_qp]);
48 }
Function *const _prefactor_function
prefactor function to multiply the elasticity tensor with
virtual void computeQpElasticityTensor()=0
MaterialProperty< RankFourTensor > & _elasticity_tensor

◆ hasGuarantee()

bool GuaranteeProvider::hasGuarantee ( const MaterialPropertyName &  prop_name,
Guarantee  guarantee 
)
inherited

Definition at line 16 of file GuaranteeProvider.C.

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

◆ initialSetup()

void ComputeVariableIsotropicElasticityTensor::initialSetup ( )
overrideprotectedvirtual

Definition at line 75 of file ComputeVariableIsotropicElasticityTensor.C.

76 {
77  validateCoupling<Real>("youngs_modulus");
78  validateCoupling<Real>("poissons_ratio");
79  for (unsigned int i = 0; i < _num_args; ++i)
80  {
81  const VariableName & iname = getVar("args", i)->name();
82 
83  if (!_fe_problem.isMatPropRequested(propertyNameFirst(_elasticity_tensor_name, iname)))
84  _delasticity_tensor[i] = nullptr;
85 
86  for (unsigned int j = 0; j < _num_args; ++j)
87  {
88  const VariableName & jname = getVar("args", j)->name();
89  if (!_fe_problem.isMatPropRequested(
90  propertyNameSecond(_elasticity_tensor_name, iname, jname)))
91  _d2elasticity_tensor[i][j] = nullptr;
92  }
93  }
94 }
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

◆ initQpStatefulProperties()

void ComputeVariableIsotropicElasticityTensor::initQpStatefulProperties ( )
overrideprotectedvirtual

Definition at line 97 of file ComputeVariableIsotropicElasticityTensor.C.

98 {
99 }

◆ issueGuarantee()

void GuaranteeProvider::issueGuarantee ( const MaterialPropertyName &  prop_name,
Guarantee  guarantee 
)
protectedinherited

◆ revokeGuarantee()

void GuaranteeProvider::revokeGuarantee ( const MaterialPropertyName &  prop_name,
Guarantee  guarantee 
)
protectedinherited

Definition at line 34 of file GuaranteeProvider.C.

Referenced by ComputeElasticityTensorCP::ComputeElasticityTensorCP().

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

Member Data Documentation

◆ _base_name

std::string ComputeElasticityTensorBase::_base_name
protectedinherited

◆ _d2elasticity_tensor

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

second derivatives of the elasticity tensor with respect to the args

Definition at line 57 of file ComputeVariableIsotropicElasticityTensor.h.

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

◆ _d2poissons_ratio

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 52 of file ComputeVariableIsotropicElasticityTensor.h.

Referenced by computeQpElasticityTensor(), and ComputeVariableIsotropicElasticityTensor().

◆ _d2youngs_modulus

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 47 of file ComputeVariableIsotropicElasticityTensor.h.

Referenced by computeQpElasticityTensor(), and ComputeVariableIsotropicElasticityTensor().

◆ _delasticity_tensor

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

first derivatives of the elasticity tensor with respect to the args

Definition at line 55 of file ComputeVariableIsotropicElasticityTensor.h.

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

◆ _dpoissons_ratio

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

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

Definition at line 50 of file ComputeVariableIsotropicElasticityTensor.h.

Referenced by computeQpElasticityTensor(), and ComputeVariableIsotropicElasticityTensor().

◆ _dyoungs_modulus

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

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

Definition at line 45 of file ComputeVariableIsotropicElasticityTensor.h.

Referenced by computeQpElasticityTensor(), and ComputeVariableIsotropicElasticityTensor().

◆ _elasticity_tensor

MaterialProperty<RankFourTensor>& ComputeElasticityTensorBase::_elasticity_tensor
protectedinherited

◆ _elasticity_tensor_name

std::string ComputeElasticityTensorBase::_elasticity_tensor_name
protectedinherited

◆ _isotropic_elastic_constants

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 60 of file ComputeVariableIsotropicElasticityTensor.h.

◆ _num_args

const unsigned int ComputeVariableIsotropicElasticityTensor::_num_args
protected

number of variables the moduli depend on

Definition at line 42 of file ComputeVariableIsotropicElasticityTensor.h.

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

◆ _poissons_ratio

const MaterialProperty<Real>& ComputeVariableIsotropicElasticityTensor::_poissons_ratio
protected

Material defininig the Poisson's Ratio.

Definition at line 39 of file ComputeVariableIsotropicElasticityTensor.h.

Referenced by computeQpElasticityTensor().

◆ _prefactor_function

Function* const ComputeElasticityTensorBase::_prefactor_function
protectedinherited

prefactor function to multiply the elasticity tensor with

Definition at line 42 of file ComputeElasticityTensorBase.h.

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

◆ _youngs_modulus

const MaterialProperty<Real>& ComputeVariableIsotropicElasticityTensor::_youngs_modulus
protected

Material defininig the Young's Modulus.

Definition at line 36 of file ComputeVariableIsotropicElasticityTensor.h.

Referenced by computeQpElasticityTensor().


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