www.mooseframework.org
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private 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)
 

Static Public Member Functions

static InputParameters validParams ()
 

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 defining the Young's Modulus. More...
 
const MaterialProperty< Real > & _poissons_ratio
 Material defining 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...
 
const std::string _base_name
 
std::string _elasticity_tensor_name
 
MaterialProperty< RankFourTensor > & _elasticity_tensor
 
MaterialProperty< Real > & _effective_stiffness
 
const Function *const _prefactor_function
 prefactor function to multiply the elasticity tensor with More...
 

Private Attributes

std::map< MaterialPropertyName, std::set< Guarantee > > _guarantees
 

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

Constructor & Destructor Documentation

◆ ComputeVariableIsotropicElasticityTensor()

ComputeVariableIsotropicElasticityTensor::ComputeVariableIsotropicElasticityTensor ( const InputParameters &  parameters)

Definition at line 31 of file ComputeVariableIsotropicElasticityTensor.C.

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

Member Function Documentation

◆ computeQpElasticityTensor()

void ComputeVariableIsotropicElasticityTensor::computeQpElasticityTensor ( )
overrideprotectedvirtual

Implements ComputeElasticityTensorBase.

Definition at line 104 of file ComputeVariableIsotropicElasticityTensor.C.

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

◆ computeQpProperties()

void ComputeElasticityTensorBase::computeQpProperties ( )
protectedvirtualinherited

Definition at line 43 of file ComputeElasticityTensorBase.C.

44 {
45  _effective_stiffness[_qp] = 0; // Currently overriden by ComputeIsotropicElasticityTensor
47 
48  // Multiply by prefactor
50  {
51  _elasticity_tensor[_qp] *= _prefactor_function->value(_t, _q_point[_qp]);
52  _effective_stiffness[_qp] *= std::sqrt(_prefactor_function->value(_t, _q_point[_qp]));
53  }
54 }

◆ 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 }

◆ initialSetup()

void ComputeVariableIsotropicElasticityTensor::initialSetup ( )
overrideprotectedvirtual

Definition at line 76 of file ComputeVariableIsotropicElasticityTensor.C.

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

◆ initQpStatefulProperties()

void ComputeVariableIsotropicElasticityTensor::initQpStatefulProperties ( )
overrideprotectedvirtual

Definition at line 99 of file ComputeVariableIsotropicElasticityTensor.C.

100 {
101 }

◆ 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.

35 {
36  auto it = _guarantees.find(prop_name);
37  if (it != _guarantees.end())
38  it->second.erase(guarantee);
39 }

Referenced by ComputeElasticityTensorCP::ComputeElasticityTensorCP().

◆ validParams()

InputParameters ComputeVariableIsotropicElasticityTensor::validParams ( )
static

Definition at line 17 of file ComputeVariableIsotropicElasticityTensor.C.

18 {
19  InputParameters params = ComputeElasticityTensorBase::validParams();
20  params.addClassDescription("Compute an isotropic elasticity tensor for elastic constants that "
21  "change as a function of material properties");
22  params.addRequiredParam<MaterialPropertyName>("youngs_modulus",
23  "Name of material defining the Young's Modulus");
24  params.addRequiredParam<MaterialPropertyName>("poissons_ratio",
25  "Name of material defining the Poisson's Ratio");
26  params.addRequiredCoupledVar(
27  "args", "Variable dependence for the Young's Modulus and Poisson's Ratio materials");
28  return params;
29 }

Member Data Documentation

◆ _base_name

const 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 58 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 53 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 48 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 56 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 51 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 46 of file ComputeVariableIsotropicElasticityTensor.h.

Referenced by computeQpElasticityTensor(), and ComputeVariableIsotropicElasticityTensor().

◆ _effective_stiffness

MaterialProperty<Real>& ComputeElasticityTensorBase::_effective_stiffness
protectedinherited

◆ _elasticity_tensor

MaterialProperty<RankFourTensor>& ComputeElasticityTensorBase::_elasticity_tensor
protectedinherited

◆ _elasticity_tensor_name

std::string ComputeElasticityTensorBase::_elasticity_tensor_name
protectedinherited

◆ _guarantees

std::map<MaterialPropertyName, std::set<Guarantee> > GuaranteeProvider::_guarantees
privateinherited

◆ _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 61 of file ComputeVariableIsotropicElasticityTensor.h.

◆ _num_args

const unsigned int ComputeVariableIsotropicElasticityTensor::_num_args
protected

number of variables the moduli depend on

Definition at line 43 of file ComputeVariableIsotropicElasticityTensor.h.

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

◆ _poissons_ratio

const MaterialProperty<Real>& ComputeVariableIsotropicElasticityTensor::_poissons_ratio
protected

Material defining the Poisson's Ratio.

Definition at line 40 of file ComputeVariableIsotropicElasticityTensor.h.

Referenced by computeQpElasticityTensor().

◆ _prefactor_function

const Function* const ComputeElasticityTensorBase::_prefactor_function
protectedinherited

prefactor function to multiply the elasticity tensor with

Definition at line 44 of file ComputeElasticityTensorBase.h.

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

◆ _youngs_modulus

const MaterialProperty<Real>& ComputeVariableIsotropicElasticityTensor::_youngs_modulus
protected

Material defining the Young's Modulus.

Definition at line 37 of file ComputeVariableIsotropicElasticityTensor.h.

Referenced by computeQpElasticityTensor().


The documentation for this class was generated from the following files:
ComputeElasticityTensorBase::ComputeElasticityTensorBase
ComputeElasticityTensorBase(const InputParameters &parameters)
Definition: ComputeElasticityTensorBase.C:29
ComputeVariableIsotropicElasticityTensor::_dpoissons_ratio
std::vector< const MaterialProperty< Real > * > _dpoissons_ratio
first derivatives of the Poisson's Ratio with respect to the args
Definition: ComputeVariableIsotropicElasticityTensor.h:51
ComputeElasticityTensorBase::_effective_stiffness
MaterialProperty< Real > & _effective_stiffness
Definition: ComputeElasticityTensorBase.h:41
GuaranteeProvider::_guarantees
std::map< MaterialPropertyName, std::set< Guarantee > > _guarantees
Definition: GuaranteeProvider.h:37
ComputeVariableIsotropicElasticityTensor::_delasticity_tensor
std::vector< MaterialProperty< RankFourTensor > * > _delasticity_tensor
first derivatives of the elasticity tensor with respect to the args
Definition: ComputeVariableIsotropicElasticityTensor.h:56
ComputeVariableIsotropicElasticityTensor::_isotropic_elastic_constants
std::vector< Real > _isotropic_elastic_constants
Vector of elastic constants to create the elasticity tensor (member to avoid memory churn)
Definition: ComputeVariableIsotropicElasticityTensor.h:61
ComputeVariableIsotropicElasticityTensor::_d2youngs_modulus
std::vector< std::vector< const MaterialProperty< Real > * > > _d2youngs_modulus
second derivatives of the Young's Modulus with respect to the args
Definition: ComputeVariableIsotropicElasticityTensor.h:48
ComputeVariableIsotropicElasticityTensor::_dyoungs_modulus
std::vector< const MaterialProperty< Real > * > _dyoungs_modulus
first derivatives of the Young's Modulus with respect to the args
Definition: ComputeVariableIsotropicElasticityTensor.h:46
GuaranteeProvider::issueGuarantee
void issueGuarantee(const MaterialPropertyName &prop_name, Guarantee guarantee)
Definition: GuaranteeProvider.C:27
ComputeElasticityTensorBase::computeQpElasticityTensor
virtual void computeQpElasticityTensor()=0
ComputeVariableIsotropicElasticityTensor::_youngs_modulus
const MaterialProperty< Real > & _youngs_modulus
Material defining the Young's Modulus.
Definition: ComputeVariableIsotropicElasticityTensor.h:37
ComputeVariableIsotropicElasticityTensor::_d2poissons_ratio
std::vector< std::vector< const MaterialProperty< Real > * > > _d2poissons_ratio
second derivatives of the Poisson's Ratio with respect to the args
Definition: ComputeVariableIsotropicElasticityTensor.h:53
ComputeVariableIsotropicElasticityTensor::_poissons_ratio
const MaterialProperty< Real > & _poissons_ratio
Material defining the Poisson's Ratio.
Definition: ComputeVariableIsotropicElasticityTensor.h:40
ComputeElasticityTensorBase::_elasticity_tensor
MaterialProperty< RankFourTensor > & _elasticity_tensor
Definition: ComputeElasticityTensorBase.h:40
ComputeElasticityTensorBase::validParams
static InputParameters validParams()
Definition: ComputeElasticityTensorBase.C:16
ComputeElasticityTensorBase::_elasticity_tensor_name
std::string _elasticity_tensor_name
Definition: ComputeElasticityTensorBase.h:38
ComputeVariableIsotropicElasticityTensor::_d2elasticity_tensor
std::vector< std::vector< MaterialProperty< RankFourTensor > * > > _d2elasticity_tensor
second derivatives of the elasticity tensor with respect to the args
Definition: ComputeVariableIsotropicElasticityTensor.h:58
ComputeElasticityTensorBase::_prefactor_function
const Function *const _prefactor_function
prefactor function to multiply the elasticity tensor with
Definition: ComputeElasticityTensorBase.h:44
Guarantee::ISOTROPIC
ComputeVariableIsotropicElasticityTensor::_num_args
const unsigned int _num_args
number of variables the moduli depend on
Definition: ComputeVariableIsotropicElasticityTensor.h:43